public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: lisovy@gmail.com (Rostislav Lisovy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: PCI: Use PCI_CLASS_* defines for PCI class
Date: Mon, 25 Aug 2014 10:39:36 +0200	[thread overview]
Message-ID: <1408955976.8665.23.camel@umadbro> (raw)
In-Reply-To: <1407144668.21386.8.camel@umadbro>

On Mon, 2014-08-04 at 11:31 +0200, Rostislav Lisovy wrote:
> On Sun, 2014-08-03 at 09:16 -0400, Sasha Levin wrote:
> > > -     /* FIXME: add defines for class 0x68000 and 0x80103 */
> > >       if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST ||
> > > -         dev->class == 0x68000 ||
> > > -         dev->class == 0x80103) {
> > > +         dev->class == (PCI_CLASS_BRIDGE_OTHER << 8) ||
> > > +         dev->class == ((PCI_CLASS_SYSTEM_DMA << 8) | 0x03)) {
> > >               for (i = 0; i < PCI_NUM_RESOURCES; i++) {
> > >                       dev->resource[i].start = 0;
> > >                       dev->resource[i].end   = 0;
> > > 
> > 
> > Care to explain how your new code is equivalent to the old one?
> 
> The header file include/linux/pci_ids.h defines
> #define PCI_CLASS_BRIDGE_OTHER          0x0680
> #define PCI_CLASS_SYSTEM_DMA            0x0801
> 
> ((struct pci_dev*)dev)->class
> corresponds to the 3 bytes Class code in the PCI Configuration space
> header -- 1B Base class, 1B Sub-class, 1B Reg-level interface.
> 
> In that case
> (PCI_CLASS_BRIDGE_OTHER << 8)
> is equivalent to 0x68000 (imagine the leading zero)
> and
> ((PCI_CLASS_SYSTEM_DMA << 8) | 0x03))
> is equivalent to 0x80103.
> 

Just a kind reminder in case anyone is interested in reviewing and
accepting the patch.

Best regards;
Rostislav Lisovy

  reply	other threads:[~2014-08-25  8:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 14:51 [PATCH] ARM: PCI: Use PCI_CLASS_* defines for PCI class Rostislav Lisovy
2014-08-03 13:16 ` Sasha Levin
2014-08-04  9:31   ` Rostislav Lisovy
2014-08-25  8:39     ` Rostislav Lisovy [this message]
2014-08-25  9:02       ` Yijing Wang

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=1408955976.8665.23.camel@umadbro \
    --to=lisovy@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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