public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: HighPoint Linux Team <linux@highpoint-tech.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	James.Bottomley@SteelEye.com
Subject: Re: [PATCH] hptiop: adding new firmware interface and more PCI device IDs
Date: Wed, 29 Aug 2007 06:39:50 -0400	[thread overview]
Message-ID: <46D54CF6.7060009@garzik.org> (raw)
In-Reply-To: <200708291510.53793.linux@highpoint-tech.com>

HighPoint Linux Team wrote:
> +	if (hba->firmware_version > 0x01020000 || hba->interface_version > 0x01020000) {
[...]
> +	if (hba->firmware_version > 0x01020000 ||
> +				hba->interface_version > 0x01020000) {

Rather than repeating this test, you should do it once at probe time, 
and set a "new interface" single-bit flag in some hptiop_hba field.

Less maintenance intensive, less prone to error, and removes expensive 
tests from the driver hotpath.


>  static struct pci_device_id hptiop_id_table[] = {
> -	{ PCI_DEVICE(0x1103, 0x3220) },
> -	{ PCI_DEVICE(0x1103, 0x3320) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x3220) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x3320) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x3520) },
> +	{ PCI_DEVICE(PCI_VENDOR_ID_TTI, 0x4320) },
>  	{},

Using the PCI_VDEVICE() macro can make this even shorter:

	{ PCI_VDEVICE(TTI, 0x4320) }

Regards,

	Jeff



  reply	other threads:[~2007-08-29 10:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200605101704.27491.linux@highpoint-tech.com>
     [not found] ` <200605121107.48597.linux@highpoint-tech.com>
2006-05-16  6:38   ` [PATCH] hptiop: HighPoint RocketRAID 3xxx controller driver HighPoint Linux Team
2006-06-10 15:36     ` James Bottomley
2006-06-10 16:47       ` Andrew Morton
2006-06-10 18:11         ` James Bottomley
2007-08-29  7:10     ` [PATCH] hptiop: adding new firmware interface and more PCI device IDs HighPoint Linux Team
2007-08-29 10:39       ` Jeff Garzik [this message]
2007-08-30 10:06       ` [PATCH/RESENT] " HighPoint Linux Team
2007-08-30 10:53         ` Jeff Garzik
2007-10-15  6:42       ` [PATCH] hptiop: avoid buffer overflow when returning sense data HighPoint Linux Team
2007-10-15  6:40         ` Andrew Morton
2007-10-15  7:48         ` HighPoint Linux Team

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=46D54CF6.7060009@garzik.org \
    --to=jeff@garzik.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@highpoint-tech.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