ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
PATCH 2/3 ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y
Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.
--- drivers/ide/ide-iops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/ide-iops.c +1 -1
@@ -455,7 +455,7 @@ int drive_is_ready (ide_drive_t *drive)* an interrupt with another pci card/device. We make no assumptions * about possible isa-pnp and pci-pnp issues yet. */ -if (IDE_CONTROL_REG ) +if (hwif->pci_dev &&IDE_CONTROL_REG ) stat = hwif->INB (IDE_ALTSTATUS_REG ); else#endif /* CONFIG_IDEPCI_SHARE_IRQ */
Quoted 4 lines · On Fri, 26 Oct 2007 01:36:37 +0200 Bartlomiej Zolnierkiewicz…
Need to check if the host is a PCI one before reading
IDE_ALTSTATUS_REG.Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>
Umm why ? The altstatus register goes back to ST-506 and the original IBM XT hard disk controller card ?
Quoted 10 lines · Alan Cox
Quoted 4 lines · On Fri, 26 Oct 2007 01:36:37 +0200 Bartlomiej Zolnierkiewicz…
Need to check if the host is a PCI one before reading
IDE_ALTSTATUS_REG.Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Umm why ? The altstatus register goes back to ST-506 and the original IBM XT hard disk controller card ?
Thought that there have to be some (non-obvious) reason behing the fact that IDE_ALTSTATUS_REG reading was covered by #ifdef CONFIG_IDEPCI_SHARE_IRQ.
However if this is the case patch #2/3 can be dumped and we can go straight to patch #3/3.
Thanks,
Bart
Quoted 7 lines · On Fri, 26 Oct 2007 02:30:52 +0200 Bartlomiej Zolnierkiewicz…
Quoted 6 lines · Alan Cox
Quoted 3 lines · On Fri, 26 Oct 2007 01:36:37 +0200 Bartlomiej Zolnierkiewicz…
Need to check if the host is a PCI one before reading
IDE_ALTSTATUS_REG.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Umm why ? The altstatus register goes back to ST-506 and the original IBM XT hard disk controller card ?
Thought that there have to be some (non-obvious) reason behing the fact that
IDE_ALTSTATUS_REGreading was covered by #ifdefCONFIG_IDEPCI_SHARE_IRQ.
Only that reading altstatus is done to get the state without clearing the IRQ which a status read would do.
Alan
Quoted 9 lines · Alan Cox
Quoted 3 lines · On Fri, 26 Oct 2007 01:36:37 +0200 Bartlomiej Zolnierkiewicz…
Need to check if the host is a PCI one before reading
IDE_ALTSTATUS_REG.Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Umm why ? The altstatus register goes back to ST-506 and the original IBM XT hard disk controller card ?
I'm pretty sure there are at least a few controllers out there where the AltStatus/Control register block is simply non-existent.
Jeff
Quoted 6 lines · On Thu, 25 Oct 2007 20:42:16 -0400 Jeff Garzik <[email protected]> wrote:
Quoted 5 lines · Alan Cox
Quoted 2 lines · On Fri, 26 Oct 2007 01:36:37 +0200 Bartlomiej Zolnierkiewicz…
Need to check if the host is a PCI one before reading
IDE_ALTSTATUS_REG.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Bartlomiej Zolnierkiewicz <[email protected]>Umm why ? The altstatus register goes back to ST-506 and the original IBM XT hard disk controller card ?
I'm pretty sure there are at least a few controllers out there where the AltStatus/Control register block is simply non-existent.
One or two of the commode Amiga controllers did this. Makes error recovery rather interesting. The register itself is however present even on things like the WD10xx devices.
Alan