diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-02 14:40:03 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-12-02 14:40:03 -0500 |
commit | 6636487e8dc49a1c43fed336bdc4a2f3d7ce6881 (patch) | |
tree | f23a8f126cd63a199907bd8c20f3d2f4423ca006 /drivers/ide/ide-iops.c | |
parent | f9e3326dce0ef117308872cd234b903aa19aa40f (diff) |
amd74xx: workaround unreliable AltStatus register for nVidia controllers
It seems that on some nVidia controllers using AltStatus register
can be unreliable so default to Status register if the PCI device
is in Compatibility Mode. In order to achieve this:
* Add ide_pci_is_in_compatibility_mode() inline helper to <linux/ide.h>.
* Add IDE_HFLAG_BROKEN_ALTSTATUS host flag and set it in amd74xx host
driver for nVidia controllers in Compatibility Mode.
* Teach actual_try_to_identify() and drive_is_ready() about the new flag.
This fixes the regression caused by removal of CONFIG_IDEPCI_SHARE_IRQ
config option in 2.6.25 and using AltStatus register unconditionally when
available (kernel.org bugs #11659 and #10216).
[ Moreover for CONFIG_IDEPCI_SHARE_IRQ=y (which is what most people
and distributions use) it never worked correctly. ]
Thanks to Remy LABENE and Lars Winterfeld for help with debugging the problem.
More info at:
http://bugzilla.kernel.org/show_bug.cgi?id=11659
http://bugzilla.kernel.org/show_bug.cgi?id=10216
Reported-by: Remy LABENE <remy.labene@free.fr>
Tested-by: Remy LABENE <remy.labene@free.fr>
Tested-by: Lars Winterfeld <lars.winterfeld@tu-ilmenau.de>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 5d6ba14e211d..142b9573d64c 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c | |||
@@ -468,7 +468,8 @@ int drive_is_ready (ide_drive_t *drive) | |||
468 | * an interrupt with another pci card/device. We make no assumptions | 468 | * an interrupt with another pci card/device. We make no assumptions |
469 | * about possible isa-pnp and pci-pnp issues yet. | 469 | * about possible isa-pnp and pci-pnp issues yet. |
470 | */ | 470 | */ |
471 | if (hwif->io_ports.ctl_addr) | 471 | if (hwif->io_ports.ctl_addr && |
472 | (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0) | ||
472 | stat = hwif->tp_ops->read_altstatus(hwif); | 473 | stat = hwif->tp_ops->read_altstatus(hwif); |
473 | else | 474 | else |
474 | /* Note: this may clear a pending IRQ!! */ | 475 | /* Note: this may clear a pending IRQ!! */ |