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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ messages in thread

* Re: [parisc-linux] [2.5] ns87415 irq
       [not found] <3F10355C.2080303@tiscali.be>
@ 2003-07-14 10:41 ` Joel Soete
  0 siblings, 0 replies; 11+ messages in thread
From: Joel Soete @ 2003-07-14 10:41 UTC (permalink / raw)
  To: Joel Soete, Matthew Wilcox; +Cc: Grant Grundler, parisc-linux

Hi Willy,

>>>Is it possible to backport it to 2.4?
>
>>Already did it as 2.4.21-pa3 -- can you test that?
>
> ooh I do not see this change (sorry), I will so test this patch (just 
> have to ask you to wait Monday because here at home I have not yet 
> recover a parisc box :)

As said I come back to you with a successfull test (well by the way pa4)
as buitin device driver NS87415 :)

But as module same erronious behaviour _as previous_:

(I make the p-l and grant in cc because here i grab much detail info)

palx2000:~# modprobe ns87415
Segmentation fault

palx2000:~# lsmod 
Module                  Size  Used by    Not tainted
ns87415                 2424   1  (initializing)

palx2000 login: NS87415: IDE controller at PCI slot 00:0e.0
NS87415: chipset revision 3
NS87415: not 100% native mode: will probe irqs later
modprobe (pid 332): Illegal instruction (code 8)

     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00000000000001001111111100001111 Not tainted
r00-03  00000000 10360000 101f50f4 100ddc00
r04-07  00000000 00028820 103cb870 100ddc00
r08-11  00000000 00000000 00000000 00000000
r12-15  103cc010 00004d38 1d4d3000 00042da8
r16-19  00042da8 00042da8 0004c7f0 00000002
r20-23  00000155 fed30000 fed30000 00000002
r24-27  00000004 00007000 103cb870 102fa010
r28-31  00000000 40000000 1f6dc840 00000000
sr0-3   00000000 0000034c 00000000 0000034c
sr4-7   00000000 00000000 00000000 00000000

IASQ: 00000000 00000000 IAOQ: 10360660 10360664
 IIR: 00002ba7    ISR: 00000000  IOR: 00000000
 CPU:        0   CR30: 1f6dc000 CR31: 10398000
 ORIG_R28: 103aa59c

I do not really understand why modeprobe do an 'Illegal instruction' (pb
with modeprob or with the actual contents of ns87415.o?

(gcc -v => 3.3.1 20030626 (debian prerelease) and binutils 2.14.90.0.4-0.1)

hth,
    Joel

PS: Is it so important to track this driver as module (if only this platform
need this driver replacing tristate by bool wouldn't be enough?)


------------------------------------------------------
Soldes Tiscali ADSL : 27,50 euros/mois jusque fin 2003.
On s'habitue vite à payer son ADSL moins cher!
Plus d'info? Cliquez ici... http://reg.tiscali.be/default.asp?lg=fr 

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

end of thread, other threads:[~2003-07-14 10:41 UTC | newest]

Thread overview: 11+ 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
     [not found] <3F10355C.2080303@tiscali.be>
2003-07-14 10:41 ` Joel Soete

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.