[PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and CONFIG_IDEPCI_SHARE_IRQ=y

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: <linux-kernel@...>
Date: Thursday, October 25, 2007 - 7:36 pm

Need to check if the host is a PCI one before reading IDE_ALTSTATUS_REG.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide-iops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/ide/ide-iops.c
===================================================================
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -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 */
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts and ..., Bartlomiej Zolnierkiewicz..., (Thu Oct 25, 7:36 pm)
Re: [PATCH 2/3] ide: fix drive_is_ready() for non-PCI hosts ..., Bartlomiej Zolnierkiewicz..., (Thu Oct 25, 8:30 pm)