Skip to contentSkip to conversation

[2.5] ns87415 irq

parisc-linux Matthew Wilcox 4 participants 10 messages Jul 11, 2003

lore
Share & tools
lore
#0 lore raw

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 ...)

drivers/ide/pci/ns87415.c +1 -1
@@ -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 */
 
Signature · 3 lines
"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
#1 lore raw
Quoted 3 lines · Matthew Wilcox

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

Quoted 10 lines
drivers/ide/pci/ns87415.c +1 -1
@@ -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 */
#2 lore raw
Quoted 11 lines · Bartlomiej Zolnierkiewicz

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).

Quoted 2 lines

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.

Signature · 3 lines
"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
#4 lore raw
In reply to Matthew Wilcox
Quoted 3 lines · Matthew Wilcox

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

#5 lore raw
Quoted 8 lines · Alan Cox
Quoted 3 lines · Matthew Wilcox

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.

Signature · 3 lines
"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
#3 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 1 line · Bartlomiej Zolnierkiewicz

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

#6 lore raw
In reply to Matthew Wilcox
Quoted 6 lines · Matthew Wilcox
Quoted 5 lines · Alan Cox
Quoted 3 lines · Matthew Wilcox

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 ...)

Quoted 7 lines
Quoted 3 lines

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?

Quoted 2 lines

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. :-)

Quoted 4 lines

--
"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

#7 lore raw
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines

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.

Signature · 3 lines
"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
#8 lore raw
Quoted 7 lines · Matthew Wilcox
Quoted 4 lines · Bartlomiej Zolnierkiewicz
Quoted 2 lines

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...

Quoted 4 lines

--
"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

#9 lore raw
In reply to Bartlomiej Zolnierkiewicz
Quoted 5 lines · Bartlomiej Zolnierkiewicz
Quoted 3 lines

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)

Quoted 4 lines
Quoted 2 lines

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.