Commit bbe28a5d authored by Andrew Morton's avatar Andrew Morton Committed by Christoph Hellwig

[PATCH] Stop megaraid trashing other i960 based devices

From: Alan Cox <alan@redhat.com>

In 2.4 the megaraid driver was careful to avoid stepping on wrong devices.
Specifically the megaraid3 series devices used an intel pci ID (8086:1960)
which is the generic i960 identifier not their own.

The code to do this in 2.4 worked for almost all cases, but even that code has
mysteriously vanished in 2.6 meaning the megaraid driver trashes stuff like
promise i2o cards and compaq management cards.

The following patch puts back the 2.4 stuff + one additional check so that the
driver isn't quite as rude as it was before.
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 1cd50d17
......@@ -4611,6 +4611,26 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
pci_bus = pdev->bus->number;
pci_dev_func = pdev->devfn;
/*
* The megaraid3 stuff reports the ID of the Intel part which is not
* remotely specific to the megaraid
*/
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
u16 magic;
/*
* Don't fall over the Compaq management cards using the same
* PCI identifier
*/
if (pdev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ &&
pdev->subsystem_device == 0xC000)
return -ENODEV;
/* Now check the magic signature byte */
pci_read_config_word(pdev, PCI_CONF_AMISIG, &magic);
if (magic != HBA_SIGNATURE_471 && magic != HBA_SIGNATURE)
return -ENODEV;
/* Ok it is probably a megaraid */
}
/*
* For these vendor and device ids, signature offsets are not
* valid and 64 bit is implicit
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment