From: Arjan van de Ven <arjan@infradead.org>
To: "Kok, Auke" <auke-jan.h.kok@intel.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
gregkh@suse.de, linux-pci@atrey.karlin.mff.cuni.cz,
linux-kernel@vger.kernel.org, grundler@parisc-linux.org,
davem@davemloft.net, davej@redhat.com
Subject: Re: [PATCH 1/2] [RESEND] PCI: read revision ID by default
Date: Mon, 25 Jun 2007 12:48:29 -0700 [thread overview]
Message-ID: <1182800909.2696.3.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <46800E35.9030209@intel.com>
On Mon, 2007-06-25 at 11:49 -0700, Kok, Auke wrote:
> Alan Cox wrote:
> > On Sun, 24 Jun 2007 20:19:18 -0700
> > Auke Kok <auke-jan.h.kok@intel.com> wrote:
> >
> >> Currently there are 97 occurrences where drivers need the pci
> >> revision ID. We can do this once for all devices. Even the pci
> >> subsystem needs the revision several times for quirks. The extra
> >> u8 member pads out nicely in the pci_dev struct.
> >>
> >> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
> >
> > Seems worth caching yes. Care needed changing the other uses however
> > that the revision isn't changeable on the hardware in some magic fashion.
>
> if that happens the device could also change pci ID... I don't think we can
> guard against that kind of abuse anyway. While this is perfectly possible (e.g.
> network cards carrying this info in their eeproms), we should still be OK with
> the core patch, but the device driver itself needs to pull the information
> manually from the device using the pci_get_config_byte() method.
the other thing btw is that this approach allows us to use quirks and
the like to fix up "crap".
Maybe a good rule-of-thumb (and as with any other rule of thumb there
are exceptions): Drivers should NEVER touch the standard part of PCI
config space without going through a specific PCI layer API for the
value they want.
prev parent reply other threads:[~2007-06-25 19:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-25 3:19 Auke Kok
2007-06-25 3:19 ` [PATCH 2/2] [RESEND] PCI: Change all drivers to use pci_device->revision Auke Kok
2007-06-25 9:04 ` Alan Cox
2007-06-25 7:20 ` [PATCH 1/2] [RESEND] PCI: read revision ID by default Greg KH
2007-06-25 9:01 ` Alan Cox
2007-06-25 18:49 ` Kok, Auke
2007-06-25 19:48 ` Arjan van de Ven [this message]
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=1182800909.2696.3.camel@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=auke-jan.h.kok@intel.com \
--cc=davej@redhat.com \
--cc=davem@davemloft.net \
--cc=gregkh@suse.de \
--cc=grundler@parisc-linux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/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®