From: "Darrick J. Wong" <djwong@us.ibm.com>
To: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: AJ Johnson <blujuice@us.ibm.com>
Subject: [PATCH] serverworks should not take ahold of megaraid'd controllers
Date: Thu, 21 Jul 2005 15:37:38 -0700 [thread overview]
Message-ID: <42E023B2.5030900@us.ibm.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1084 bytes --]
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
[-- Attachment #1.2: megaraid_svwks_blacklist-2.6.12.3-2.patch --]
[-- Type: text/x-patch, Size: 689 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2005-07-21 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-21 22:37 Darrick J. Wong [this message]
2005-07-21 22:51 ` [PATCH] serverworks should not take ahold of megaraid'd controllers Arjan van de Ven
2005-07-22 0:46 ` Alan Cox
2005-07-22 23:17 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42E023B2.5030900@us.ibm.com \
--to=djwong@us.ibm.com \
--cc=blujuice@us.ibm.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).