[PATCH] serverworks should not take ahold of megaraid'd controllers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I've noticed what might be a small bug with the serverworks driver in
2.6.12.3.  The IBM HS20 blade has a ServerWorks CSB6 IDE controller with
an optional LSI MegaIDE RAID BIOS (BIOS assisted software raid, iow).
When this megaide BIOS is enabled on the HS20, the PCI
subvendor/subdevice IDs on the CSB6 are changed from the default
(ServerWorks) to IBM.  However, the serverworks driver doesn't notice
this and will attach to the controller anyway, thus allowing raw access
to the disks in the RAID.  An unsuspecting user can then read and write
whatever they want to the drive, which could very well degrade or
destroy the array, which is clearly not desirable behavior.

The attached patch against 2.6.12.3 makes the serverworks driver ignore
a megaraided CSB6.  If desired, I can respin this patch with a debugging
knob to force the serverworks driver to use the old behavior.  This
patch has been tested on the HS20 mentioned above, and I haven't seen
any problems with it.

Please let me know what you think of this patch; I'm not cc'd on lkml or
linux-ide.

--Darrick
diff -Naur linux-2.6.12.3_0/drivers/ide/pci/serverworks.c linux-2.6.12.3_1/drivers/ide/pci/serverworks.c
--- linux-2.6.12.3_0/drivers/ide/pci/serverworks.c	2005-07-15 14:18:57.000000000 -0700
+++ linux-2.6.12.3_1/drivers/ide/pci/serverworks.c	2005-07-21 13:02:54.469552989 -0700
@@ -645,6 +647,15 @@
 {
 	ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
 
+	/* Refuse to acknowledge CSB6 in MegaRAID mode on IBM HS20/40 blade. */
+	if (	dev->subsystem_vendor == PCI_VENDOR_ID_IBM &&
+		dev->subsystem_device == PCI_DEVICE_ID_SERVERWORKS_CSB6IDE)
+	{
+		printk(KERN_INFO "svwks: MegaRAID detected; ignoring.\n");
+		return -ENODEV;
+	}
+
+
 	return d->init_setup(dev, d);
 }
 

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux