diff options
author | Alan Cox <alan@redhat.com> | 2007-05-23 20:42:38 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-05-23 20:42:38 -0400 |
commit | 2074a106f52b6371885afbd714e929d60d0e3f64 (patch) | |
tree | c78ced4709e39ac98b19477e3e854e82f9922aeb /drivers/ide/pci | |
parent | 6c6a2a8d201b4f8fd54167802da5ddbe08abd744 (diff) |
ide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE
It turns out from customer reports to Red Hat and some PCI dumps that the
MegaIDE in RAID mode doesn't provide the drive tuning data that the
serverworks driver expects but sometimes does provide something that
fools the code.
For the RAID class case skip the oem setup and don't trust the BIOS data.
We then tune from scratch and this sorts it out. (This has been confirmed
on an afflicted IBM blade)
[libata serverworks.c never trusts the BIOS in the first place so is
accidentally immune]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/serverworks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c index 6234f806c6b5..1f80c6d58805 100644 --- a/drivers/ide/pci/serverworks.c +++ b/drivers/ide/pci/serverworks.c | |||
@@ -158,6 +158,12 @@ static int svwks_tune_chipset (ide_drive_t *drive, u8 xferspeed) | |||
158 | pci_read_config_word(dev, 0x4A, &csb5_pio); | 158 | pci_read_config_word(dev, 0x4A, &csb5_pio); |
159 | pci_read_config_byte(dev, 0x54, &ultra_enable); | 159 | pci_read_config_byte(dev, 0x54, &ultra_enable); |
160 | 160 | ||
161 | /* If we are in RAID mode (eg AMI MegaIDE) then we can't it | ||
162 | turns out trust the firmware configuration */ | ||
163 | |||
164 | if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE) | ||
165 | goto oem_setup_failed; | ||
166 | |||
161 | /* Per Specified Design by OEM, and ASIC Architect */ | 167 | /* Per Specified Design by OEM, and ASIC Architect */ |
162 | if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || | 168 | if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) || |
163 | (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) { | 169 | (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) { |