All of lore.kernel.org
 help / color / mirror / Atom feed
* [parisc-linux] [2.5] ns87415 irq
@ 2003-07-11 14:07 Matthew Wilcox
  2003-07-11 14:26 ` [parisc-linux] " Bartlomiej Zolnierkiewicz
  2003-07-11 15:02 ` [parisc-linux] " Alan Cox
  0 siblings, 2 replies; 10+ messages in thread
From: Matthew Wilcox @ 2003-07-11 14:07 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Alan Cox; +Cc: parisc-linux

Would this patch make sense for 2.5?  I have to confess not testing it
on any hardware, but it seems to be the Right Thing (and I'm sure Alan
remembers the mess we had in the 2.4 parisc tree for this ...)

--- linus-2.5/drivers/ide/pci/ns87415.c	Thu Jul 10 16:18:07 2003
+++ parisc-2.5/drivers/ide/pci/ns87415.c	Fri Jul 11 08:03:17 2003
@@ -200,7 +200,7 @@
 	}
 
 	if (!using_inta)
-		hwif->irq = hwif->channel ? 15 : 14;	/* legacy mode */
+		hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]);
 	else if (!hwif->irq && hwif->mate && hwif->mate->irq)
 		hwif->irq = hwif->mate->irq;	/* share IRQ with mate */
 

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [parisc-linux] Re: [2.5] ns87415 irq
  2003-07-11 14:07 [parisc-linux] [2.5] ns87415 irq Matthew Wilcox
@ 2003-07-11 14:26 ` Bartlomiej Zolnierkiewicz
  2003-07-11 14:43   ` Matthew Wilcox
  2003-07-11 15:24   ` Grant Grundler
  2003-07-11 15:02 ` [parisc-linux] " Alan Cox
  1 sibling, 2 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-07-11 14:26 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Alan Cox, parisc-linux

On Fri, 11 Jul 2003, Matthew Wilcox wrote:

> Would this patch make sense for 2.5?  I have to confess not testing it
> on any hardware, but it seems to be the Right Thing (and I'm sure Alan
> remembers the mess we had in the 2.4 parisc tree for this ...)

Question is on what other archs ns87415 is used because some archs
do not have ide_default_irq() ie. sparc64.

from drivers/ide/Kconfig:
config BLK_DEV_NS87415
        tristate "NS87415 chipset support"
        depends on BLK_DEV_IDEDMA_PCI
        help
          This driver adds detection and support for the NS87415 chip
          (used in SPARC64, among others).

I think sparc64 uses PCI interrupt so this is not a problem.
Are there any other archs using ns87415?
--
Bartlomiej

> --- linus-2.5/drivers/ide/pci/ns87415.c	Thu Jul 10 16:18:07 2003
> +++ parisc-2.5/drivers/ide/pci/ns87415.c	Fri Jul 11 08:03:17 2003
> @@ -200,7 +200,7 @@
>  	}
>
>  	if (!using_inta)
> -		hwif->irq = hwif->channel ? 15 : 14;	/* legacy mode */
> +		hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET]);
>  	else if (!hwif->irq && hwif->mate && hwif->mate->irq)
>  		hwif->irq = hwif->mate->irq;	/* share IRQ with mate */

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [parisc-linux] Re: [2.5] ns87415 irq
  2003-07-11 14:26 ` [parisc-linux] " Bartlomiej Zolnierkiewicz
@ 2003-07-11 14:43   ` Matthew Wilcox
  2003-07-11 15:24   ` Grant Grundler
  1 sibling, 0 replies; 10+ messages in thread
From: Matthew Wilcox @ 2003-07-11 14:43 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Matthew Wilcox, Alan Cox, parisc-linux

On Fri, Jul 11, 2003 at 04:26:21PM +0200, Bartlomiej Zolnierkiewicz wrote:
> Question is on what other archs ns87415 is used because some archs
> do not have ide_default_irq() ie. sparc64.
> 
> from drivers/ide/Kconfig:
> config BLK_DEV_NS87415
>         tristate "NS87415 chipset support"
>         depends on BLK_DEV_IDEDMA_PCI
>         help
>           This driver adds detection and support for the NS87415 chip
>           (used in SPARC64, among others).
> 
> I think sparc64 uses PCI interrupt so this is not a problem.
> Are there any other archs using ns87415?

I really don't know.  I don't think it's unreasonable to expect
architectures to add ide_default_irq().  The existing code in the driver
can't work for anything other than x86, so either everyone has a local
hack to it (like parisc does) or nobody else uses it.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
  2003-07-11 14:07 [parisc-linux] [2.5] ns87415 irq Matthew Wilcox
  2003-07-11 14:26 ` [parisc-linux] " Bartlomiej Zolnierkiewicz
@ 2003-07-11 15:02 ` Alan Cox
  2003-07-11 15:16   ` Matthew Wilcox
  1 sibling, 1 reply; 10+ messages in thread
From: Alan Cox @ 2003-07-11 15:02 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Bartlomiej Zolnierkiewicz, HPPA List

On Gwe, 2003-07-11 at 15:07, Matthew Wilcox wrote:
> Would this patch make sense for 2.5?  I have to confess not testing it
> on any hardware, but it seems to be the Right Thing (and I'm sure Alan
> remembers the mess we had in the 2.4 parisc tree for this ...)

Yes, it makes sense to do this generally. However can you also pass
hwif to the ide_default_irq function because that lets the arch code
work out what pci bus the device is nailed to

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
  2003-07-11 15:02 ` [parisc-linux] " Alan Cox
@ 2003-07-11 15:16   ` Matthew Wilcox
  2003-07-11 15:32     ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 10+ messages in thread
From: Matthew Wilcox @ 2003-07-11 15:16 UTC (permalink / raw)
  To: Alan Cox; +Cc: Matthew Wilcox, Bartlomiej Zolnierkiewicz, HPPA List

On Fri, Jul 11, 2003 at 04:02:50PM +0100, Alan Cox wrote:
> On Gwe, 2003-07-11 at 15:07, Matthew Wilcox wrote:
> > Would this patch make sense for 2.5?  I have to confess not testing it
> > on any hardware, but it seems to be the Right Thing (and I'm sure Alan
> > remembers the mess we had in the 2.4 parisc tree for this ...)
> 
> Yes, it makes sense to do this generally. However can you also pass
> hwif to the ide_default_irq function because that lets the arch code
> work out what pci bus the device is nailed to

Erm, that seems like more work than I should be doing.  That would touch
36 files, including a lot of mips/ppc ide files.  Or did you want Bart
to make that change?

BTW, Bart, seems like sparc64 does _have_ the ide_default_irq() function,
it just returns 0.  So I think this patch shouldn't break anything.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] Re: [2.5] ns87415 irq
  2003-07-11 14:26 ` [parisc-linux] " Bartlomiej Zolnierkiewicz
  2003-07-11 14:43   ` Matthew Wilcox
@ 2003-07-11 15:24   ` Grant Grundler
  1 sibling, 0 replies; 10+ messages in thread
From: Grant Grundler @ 2003-07-11 15:24 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Matthew Wilcox, Alan Cox, parisc-linux

On Fri, Jul 11, 2003 at 04:26:21PM +0200, Bartlomiej Zolnierkiewicz wrote:
> Are there any other archs using ns87415?

Well, the original ns87415 is a PCI device.
I'd guess any arch could have interest in it.

The parisc specifc code is for "SuckyIO" (aka Nat Sem "87560")
which has ns87415 embedded as one of it's functions.
AFAIK, HP was the only customer to use NS's SuckyIO chip.

grant

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
  2003-07-11 15:16   ` Matthew Wilcox
@ 2003-07-11 15:32     ` Bartlomiej Zolnierkiewicz
  2003-07-11 15:35       ` Matthew Wilcox
  2003-07-11 17:13       ` Alan Cox
  0 siblings, 2 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-07-11 15:32 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Alan Cox, HPPA List

On Fri, 11 Jul 2003, Matthew Wilcox wrote:

> On Fri, Jul 11, 2003 at 04:02:50PM +0100, Alan Cox wrote:
> > On Gwe, 2003-07-11 at 15:07, Matthew Wilcox wrote:
> > > Would this patch make sense for 2.5?  I have to confess not testing it
> > > on any hardware, but it seems to be the Right Thing (and I'm sure Alan
> > > remembers the mess we had in the 2.4 parisc tree for this ...)
> >
> > Yes, it makes sense to do this generally. However can you also pass
> > hwif to the ide_default_irq function because that lets the arch code
> > work out what pci bus the device is nailed to
>
> Erm, that seems like more work than I should be doing.  That would touch
> 36 files, including a lot of mips/ppc ide files.  Or did you want Bart
> to make that change?

Alan, are there any benefits of doing this?

> BTW, Bart, seems like sparc64 does _have_ the ide_default_irq() function,
> it just returns 0.  So I think this patch shouldn't break anything.

Yes, but 0 != 14 && 0 != 15. I am just paranoid. :-)

> --
> "It's not Hollywood.  War is real, war is primarily not about defeat or
> victory, it is about death.  I've seen thousands and thousands of dead bodies.
> Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
  2003-07-11 15:32     ` Bartlomiej Zolnierkiewicz
@ 2003-07-11 15:35       ` Matthew Wilcox
  2003-07-11 15:47         ` Bartlomiej Zolnierkiewicz
  2003-07-11 17:13       ` Alan Cox
  1 sibling, 1 reply; 10+ messages in thread
From: Matthew Wilcox @ 2003-07-11 15:35 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Matthew Wilcox, Alan Cox, HPPA List

On Fri, Jul 11, 2003 at 05:32:12PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > BTW, Bart, seems like sparc64 does _have_ the ide_default_irq() function,
> > it just returns 0.  So I think this patch shouldn't break anything.
> 
> Yes, but 0 != 14 && 0 != 15. I am just paranoid. :-)

Oh, 14 and 15 are not valid sparc64 irqs.  No problem.

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
  2003-07-11 15:35       ` Matthew Wilcox
@ 2003-07-11 15:47         ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 10+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2003-07-11 15:47 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Alan Cox, HPPA List

On Fri, 11 Jul 2003, Matthew Wilcox wrote:

> On Fri, Jul 11, 2003 at 05:32:12PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > > BTW, Bart, seems like sparc64 does _have_ the ide_default_irq() function,
> > > it just returns 0.  So I think this patch shouldn't break anything.
> >
> > Yes, but 0 != 14 && 0 != 15. I am just paranoid. :-)
>
> Oh, 14 and 15 are not valid sparc64 irqs.  No problem.

Okay, patch accepted.

BTW Can we make irq detecion in init_hwif_ns87415() a bit simpler
    by using native PCI irq detection present in setup-pci.c?
    Hmmm...  I need to grab ns87415 datasheet...

> --
> "It's not Hollywood.  War is real, war is primarily not about defeat or
> victory, it is about death.  I've seen thousands and thousands of dead bodies.
> Do you think I want to have an academic debate on this subject?" -- Robert Fisk

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
  2003-07-11 15:32     ` Bartlomiej Zolnierkiewicz
  2003-07-11 15:35       ` Matthew Wilcox
@ 2003-07-11 17:13       ` Alan Cox
  1 sibling, 0 replies; 10+ messages in thread
From: Alan Cox @ 2003-07-11 17:13 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: Matthew Wilcox, HPPA List

On Gwe, 2003-07-11 at 16:32, Bartlomiej Zolnierkiewicz wrote:
> > Erm, that seems like more work than I should be doing.  That would touch
> > 36 files, including a lot of mips/ppc ide files.  Or did you want Bart
> > to make that change?
> 
> Alan, are there any benefits of doing this?

The normal process is just to break the non x86 ports 8)

> > BTW, Bart, seems like sparc64 does _have_ the ide_default_irq() function,
> > it just returns 0.  So I think this patch shouldn't break anything.
> 
> Yes, but 0 != 14 && 0 != 15. I am just paranoid. :-)

One of the things it cleans up is the 14/15 IRQ assumption.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2003-07-11 17:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-11 14:07 [parisc-linux] [2.5] ns87415 irq Matthew Wilcox
2003-07-11 14:26 ` [parisc-linux] " Bartlomiej Zolnierkiewicz
2003-07-11 14:43   ` Matthew Wilcox
2003-07-11 15:24   ` Grant Grundler
2003-07-11 15:02 ` [parisc-linux] " Alan Cox
2003-07-11 15:16   ` Matthew Wilcox
2003-07-11 15:32     ` Bartlomiej Zolnierkiewicz
2003-07-11 15:35       ` Matthew Wilcox
2003-07-11 15:47         ` Bartlomiej Zolnierkiewicz
2003-07-11 17:13       ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.