mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: "Heasley, Seth" <seth.heasley@intel.com>
Cc: "jbarnes@virtuousgeek.org" <jbarnes@virtuousgeek.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: [PATCH 2.6.37] irq: irq and pci_ids patch for Intel DH89xxCC  DeviceIDs
Date: Mon, 10 Jan 2011 20:29:34 +0100	[thread overview]
Message-ID: <20110110202934.5e4924b8@endymion.delvare> (raw)
In-Reply-To: <CF9C39F99A89134C9CF9C4CCB68B8DDF25C1AF9090@orsmsx501.amr.corp.intel.com>

On Mon, 10 Jan 2011 11:19:15 -0800, Heasley, Seth wrote:
> >> --- linux-2.6.37/arch/x86/pci/irq.c.orig	2011-01-04
> >16:50:19.000000000 -0800
> >> +++ linux-2.6.37/arch/x86/pci/irq.c	2011-01-06 14:16:00.000000000
> >-0800
> >> @@ -611,6 +611,15 @@
> >>  		r->set = pirq_piix_set;
> >>  		return 1;
> >>  	}
> >> +
> >> +	if ((device >= PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MIN) &&
> >> +		(device <= PCI_DEVICE_ID_INTEL_DH89XXCC_LPC_MAX)) {
> >> +		r->name = "PIIX/ICH";
> >> +		r->get = pirq_piix_get;
> >> +		r->set = pirq_piix_set;
> >> +		return 1;
> >> +	}
> >> +
> >
> >I'm curious why we have separate sections for INTEL_5_3400_SERIES,
> >INTEL_COUGARPOINT and now INTEL_DH89XXCC? We do the same thing for all
> >3, so it would make sense to merge the tests to avoid duplicating the
> >code.
> 
> Some products are defining a range of DeviceIDs rather than one or two specific IDs, so these blocks are for catching any DeviceID in the range.  I'm certainly open to suggestion for a better way to handle these, and I agree that the current way is awkward.

I understand the need to have separate blocks for separate IDs and for
ID ranges. But all the ranges could be covered by the same block:

	if ((device >= PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MIN && 
	     device <= PCI_DEVICE_ID_INTEL_5_3400_SERIES_LPC_MAX)
	 || (device >= PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN && 
	     device <= PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX)) {
		r->name = "PIIX/ICH";
		r->get = pirq_piix_get;
		r->set = pirq_piix_set;
		return 1;
	}

-- 
Jean Delvare

  reply	other threads:[~2011-01-10 19:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 18:58 Seth Heasley
2011-01-10 19:14 ` Jean Delvare
2011-01-10 19:19   ` Heasley, Seth
2011-01-10 19:29     ` Jean Delvare [this message]
2011-01-10 19:32       ` Heasley, Seth

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=20110110202934.5e4924b8@endymion.delvare \
    --to=khali@linux-fr.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=seth.heasley@intel.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

all inboxes | Powered by JetHome®