All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Matt Carlson" <mcarlson@broadcom.com>
Cc: jbarnes@virtuousgeek.org, linux-pci@vger.kernel.org,
	netdev@vger.kernel.org, andy@greyhouse.net,
	mcarlson@broadcom.com, "Michael Chan" <mchan@broadcom.com>
Subject: Re: [PATCH 1/7] pci: Add PCI LRDT tag size and section size
Date: Thu, 25 Feb 2010 10:53:45 -0800	[thread overview]
Message-ID: <20100225105345.0baadeb4@nehalam> (raw)
In-Reply-To: <1267121962-6077-2-git-send-email-mcarlson@broadcom.com>

On Thu, 25 Feb 2010 10:19:16 -0800
"Matt Carlson" <mcarlson@broadcom.com> wrote:

> +++ b/include/linux/pci-vpd.h
> @@ -0,0 +1,26 @@
> +/*
> + *	pci-vpd.h
> + *
> + *	PCI VPD defines and function prototypes
> + *
> + *	Copyright (C) 2010 Broadcom Corporation.
> + *
> + *	For more information, please consult the following manuals (look at
> + *	http://www.pcisig.com/ for how to get them):
> + *
> + *	PCI Local Bus Specification, Rev. 3.0 : Appendix I
> + */
> +
> +#ifndef LINUX_PCI_VPD_H
> +#define LINUX_PCI_VPD_H
> +
> +#include <linux/pci.h>
> +
> +#define PCI_VPD_LRDT_TAG_SIZE	3
> +
> +static inline u16 pci_vpd_lrdt_size(u8 *lrdt)
> +{
> +	return (u16)lrdt[1] + ((u16)lrdt[2] << 8);
> +}
> +
> +#endif /* LINUX_PCI_VPD_H */
> -- 

No need for new file for this, it should be part of existing pci.h
Also need kernel doc format comment to describe usage.
Shouldn't the function take the pci resource not just the register.

And finally, how common is this or is it just something unique to your hw.

  reply	other threads:[~2010-02-25 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-25 18:19 [PATCH 1/7] pci: Add PCI LRDT tag size and section size Matt Carlson
2010-02-25 18:53 ` Stephen Hemminger [this message]
2010-02-25 19:11   ` Matt Carlson
2010-02-25 19:36     ` Ben Hutchings
2010-02-25 19:48       ` Matt Carlson

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=20100225105345.0baadeb4@nehalam \
    --to=shemminger@vyatta.com \
    --cc=andy@greyhouse.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mcarlson@broadcom.com \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.