linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serverworks should not take ahold of megaraid'd controllers
@ 2005-07-21 22:37 Darrick J. Wong
  2005-07-21 22:51 ` Arjan van de Ven
  2005-07-22  0:46 ` Alan Cox
  0 siblings, 2 replies; 4+ messages in thread
From: Darrick J. Wong @ 2005-07-21 22:37 UTC (permalink / raw)
  To: linux-ide, linux-kernel; +Cc: AJ Johnson


[-- 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 --]

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

* Re: [PATCH] serverworks should not take ahold of megaraid'd controllers
  2005-07-21 22:37 [PATCH] serverworks should not take ahold of megaraid'd controllers Darrick J. Wong
@ 2005-07-21 22:51 ` Arjan van de Ven
  2005-07-22  0:46 ` Alan Cox
  1 sibling, 0 replies; 4+ messages in thread
From: Arjan van de Ven @ 2005-07-21 22:51 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-ide, linux-kernel, AJ Johnson

On Thu, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
> 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.

actually this is the RIGHT behavior.
This way dmraid can address the raid format and make the thing work.
Your patch will break it. That is a very bad idea.

So this is a NAK on your patch.



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

* Re: [PATCH] serverworks should not take ahold of megaraid'd controllers
  2005-07-21 22:37 [PATCH] serverworks should not take ahold of megaraid'd controllers Darrick J. Wong
  2005-07-21 22:51 ` Arjan van de Ven
@ 2005-07-22  0:46 ` Alan Cox
  2005-07-22 23:17   ` Darrick J. Wong
  1 sibling, 1 reply; 4+ messages in thread
From: Alan Cox @ 2005-07-22  0:46 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: linux-ide, linux-kernel, AJ Johnson

On Iau, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
> 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).

With a binary only proprietary driver.

> (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.

It may be appropriate for some vendor situations but it isn't
appropriate for the base kernel to default to assuming the user wants to
use binary only drivers instead of dmraid. Especially as the raid
formats for this hardware are partially known despite no assistance I
know of from the vendor.

Alan


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

* Re: [PATCH] serverworks should not take ahold of megaraid'd controllers
  2005-07-22  0:46 ` Alan Cox
@ 2005-07-22 23:17   ` Darrick J. Wong
  0 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2005-07-22 23:17 UTC (permalink / raw)
  To: linux-ide, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

Arjan, Alan:

I didn't know that dmraid supports MegaIDE nowadays.  Thanks for the
tipoff, and I apologize for the unnecessary traffic.  I'll look into dmraid.

--D

Alan Cox wrote:
> On Iau, 2005-07-21 at 15:37 -0700, Darrick J. Wong wrote:
> 
>>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).
> 
> 
> With a binary only proprietary driver.
> 
> 
>>(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.
> 
> 
> It may be appropriate for some vendor situations but it isn't
> appropriate for the base kernel to default to assuming the user wants to
> use binary only drivers instead of dmraid. Especially as the raid
> formats for this hardware are partially known despite no assistance I
> know of from the vendor.
> 
> Alan
> 
> 

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2005-07-22 23:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21 22:37 [PATCH] serverworks should not take ahold of megaraid'd controllers Darrick J. Wong
2005-07-21 22:51 ` Arjan van de Ven
2005-07-22  0:46 ` Alan Cox
2005-07-22 23:17   ` Darrick J. Wong

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).