PATCH: Stop megaraid trashing other i960 based devices

From: Alan Cox (alan_at_redhat.com)
Date: 05/22/04

  • Next message: hch_at_infradead.org: "Re: PATCH: Stop megaraid trashing other i960 based devices"
    Date:	Sat, 22 May 2004 11:46:59 -0400
    To: linux-kernel@vger.kernel.org, linux-megaraid-devel@dell.com, akpm@osdl.org
    
    

    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.

    --- drivers/scsi/megaraid.c~ 2004-05-22 16:34:01.976198176 +0100
    +++ drivers/scsi/megaraid.c 2004-05-22 16:38:58.176168936 +0100
    @@ -4609,6 +4609,21 @@
     
             pci_bus = pdev->bus->number;
             pci_dev_func = pdev->devfn;
    +
    + if(pdev->vendor == PCI_VENDOR_ID_INTEL) /* The megaraid3 stuff reports the id of the intel
    + part which is not remotely specific to the megaraid */
    + {
    + 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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: hch_at_infradead.org: "Re: PATCH: Stop megaraid trashing other i960 based devices"

    Relevant Pages

    • RE: How to add/drop SCSI drives from within the driver?
      ... scsi disk, ... Now load the megaraid driver, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH][BUGFIX] : megaraid patch for 2.10.1 (irq disable bug fix)
      ... > The following patch fixes a bug in megaraid driver version 2.10.1 ... > where irq was erroneously being disabled. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Megaraid random loss of luns
      ... > possible (if the megaraid driver was at fault or the raid controller)? ... controller problem ... ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Megaraid abort errors
      ... Well, there's this bug in the megaraid driver, ... but it only affects certain architectures. ... The SCSI megaraid drive goes to great effort to kmap ... To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • RE: [PATCH]: megaraid 2.20.4: Fixes a data corruption bug
      ... On Fri, 2004-10-01 at 18:52, Bagalkote, Sreenivas wrote: ... > Would you please send us your version of megaraid driver that will ... you can get it in the -mm tree: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)