The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: hch@infradead.org
To: Alan Cox <alan@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-megaraid-devel@dell.com,
	akpm@osdl.org
Subject: Re: PATCH: Stop megaraid trashing other i960 based devices
Date: Sat, 22 May 2004 12:02:05 -0400	[thread overview]
Message-ID: <20040522160205.GA8643@infradead.org> (raw)
In-Reply-To: <20040522154659.GA17320@devserv.devel.redhat.com>

On Sat, May 22, 2004 at 11:46:59AM -0400, Alan Cox wrote:
> --- 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 */
> +	}

I think we should add all valid subvendor ids to the pci_id table instead.
Especially to not consude the hotplug package.


  reply	other threads:[~2004-05-22 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22 15:46 PATCH: Stop megaraid trashing other i960 based devices Alan Cox
2004-05-22 16:02 ` hch [this message]
2004-05-22 16:03   ` Alan Cox
2004-05-22 16:07     ` hch
2004-05-22 17:07       ` Matt Domsch
2004-05-22 17:11         ` Alan Cox
2004-05-22 17:11         ` hch

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=20040522160205.GA8643@infradead.org \
    --to=hch@infradead.org \
    --cc=akpm@osdl.org \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-megaraid-devel@dell.com \
    /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