linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE in RAID mode
@ 2007-05-16 12:37 Alan Cox
  2007-05-23 23:44 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-05-16 12:37 UTC (permalink / raw)
  To: linux-ide, bzolnier

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>

--- drivers/ide/pci/serverworks.c~	2007-05-16 13:10:16.428324088 +0100
+++ drivers/ide/pci/serverworks.c	2007-05-16 13:10:16.428324088 +0100
@@ -158,6 +158,12 @@
 	pci_read_config_word(dev, 0x4A, &csb5_pio);
 	pci_read_config_byte(dev, 0x54, &ultra_enable);
 
+	/* If we are in RAID mode (eg AMI MegaIDE) then we can't it
+	   turns out trust the firmware configuration */
+
+	if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
+		goto oem_setup_failed;
+
 	/* Per Specified Design by OEM, and ASIC Architect */
 	if ((dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE) ||
 	    (dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2)) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-24  1:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-16 12:37 [PATCH] ide/pci/serverworks.c: Fix corruption/timeouts with MegaIDE in RAID mode Alan Cox
2007-05-23 23:44 ` Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).