linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sean O. Stalley" <sean.stalley@intel.com>
To: Martin Mares <mj@ucw.cz>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com,
	alex.williamson@redhat.com, david.daney@cavium.com
Subject: Re: [PATCH v3 2/2] Add support for enhanced allocation regions
Date: Tue, 9 Feb 2016 16:54:38 -0800	[thread overview]
Message-ID: <20160210005438.GA3691@sean.stalley.intel.com> (raw)
In-Reply-To: <mj+md-20160209.095136.61181.nikam@ucw.cz>

Thanks for reviewing Martin. My response is inline.

-Sean

On Tue, Feb 09, 2016 at 10:54:53AM +0100, Martin Mares wrote:
> Hello!
> 
> > diff --git a/lib/header.h b/lib/header.h
> > index b8f7dc1..7b9a803 100644
> > --- a/lib/header.h
> > +++ b/lib/header.h
> > @@ -1235,3 +1235,7 @@
> >  
> >  #define PCI_VENDOR_ID_INTEL		0x8086
> >  #define PCI_VENDOR_ID_COMPAQ		0x0e11
> > +
> > +/* taken from <include/linux/ioport.h> */
> > +
> > +#define IORESOURCE_PCI_EA_BEI          (1<<5)
> > diff --git a/lib/pci.h b/lib/pci.h
> > index 9c1e281..a88e156 100644
> > --- a/lib/pci.h
> > +++ b/lib/pci.h
> > @@ -129,8 +129,10 @@ struct pci_dev {
> >    int irq;				/* IRQ number */
> >    pciaddr_t base_addr[6];		/* Base addresses including flags in lower bits */
> >    pciaddr_t size[6];			/* Region sizes */
> > +  pciaddr_t flags[6];			/* Region flags */
> >    pciaddr_t rom_base_addr;		/* Expansion ROM base address */
> >    pciaddr_t rom_size;			/* Expansion ROM size */
> > +  pciaddr_t rom_flags;			/* Expansion ROM flags */
> 
> First, please explain in comments how does this thing work.
> 

Sure thing. Would you like multiple lines,
or just a few words about where the flags come from?

> Second, please try not to break binary compatibility. New fields should
> be added at the end of the public part of the structure. You also have to
> define a new version of pci_fill_info(), so that applications using the
> new layout of the structure will require a new version of libpci.
> 

I moved the new fields to the end of the public data in the struct.
I'll increment the API version number and add the appropriate checks.
I was hoping to send out a new version of the patchset today,
but adding the versioning added more time than I expected. 

> > +      if (p->flags[i] & IORESOURCE_PCI_EA_BEI)
> > +	{
> > +	  printf("[enhanced] ");
> > +	}
> 
> Please follow the style of the rest of the code. One-statement conditions
> do not have braces.

Ok, will do.

      reply	other threads:[~2016-02-10  0:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-05 19:59 [PATCH v3 0/2] pci/lspci: Identify Enhanced Allocation (EA) Resources Sean O. Stalley
2016-02-05 19:59 ` [PATCH v3 1/2] pci: Identify Enhanced Allocation (EA) BAR Equivalent resources Sean O. Stalley
2016-02-05 19:59 ` [PATCH v3 2/2] Add support for enhanced allocation regions Sean O. Stalley
2016-02-09  9:54   ` Martin Mares
2016-02-10  0:54     ` Sean O. Stalley [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=20160210005438.GA3691@sean.stalley.intel.com \
    --to=sean.stalley@intel.com \
    --cc=alex.williamson@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=david.daney@cavium.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=mj@ucw.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;
as well as URLs for NNTP newsgroup(s).