lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 25 Feb 2010 11:48:28 -0800
From:	"Matt Carlson" <mcarlson@...adcom.com>
To:	"Ben Hutchings" <bhutchings@...arflare.com>
cc:	"Matthew Carlson" <mcarlson@...adcom.com>,
	"Stephen Hemminger" <shemminger@...tta.com>,
	"jbarnes@...tuousgeek.org" <jbarnes@...tuousgeek.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"andy@...yhouse.net" <andy@...yhouse.net>,
	"Michael Chan" <mchan@...adcom.com>
Subject: Re: [PATCH 1/7] pci: Add PCI LRDT tag size and section size

On Thu, Feb 25, 2010 at 11:36:01AM -0800, Ben Hutchings wrote:
> On Thu, 2010-02-25 at 11:11 -0800, Matt Carlson wrote:
> > On Thu, Feb 25, 2010 at 10:53:45AM -0800, Stephen Hemminger wrote:
> [...]
> > > Shouldn't the function take the pci resource not just the register.
> > 
> > The functions are designed to operate on a buffer of VPD data, not from
> > the hardware directly.
> > 
> > > And finally, how common is this or is it just something unique to your hw.
> > 
> > The VPD area is defined by the PCI specs, in the section noted in the
> > comment above.  The definitions and functions introduced in this patchset
> > should be usable by any driver.  I stopped short of modifying other
> > drivers, but I certainly could have.
> > 
> > However, there are two approaches taken as to how the VPD data is
> > extracted and used.  Drivers like tg3 and bnx2 load the VPD data into
> > a buffer and operate on that.  Other drivers like niu navigate the VPD
> > by loading a dword at a time.  This API would cover the former
> > implementation which I've only found to be used by the tg3 and bnx2
> > drivers so far.
> 
> VPD *access* can be done generically through pci_read_vpd() and
> pci_write_vpd(), which use struct pci_vpd_ops.  Currently the only
> implementation of pci_vpd_ops is for standard PCI 2.2 VPD.  Other
> implementations could be provided for PCI 2.1 VPD or non-standard access
> methods.
> 
> VPD *parsing* is currently left to user-space (lspci etc.) and to a few
> drivers that need it for some reason.
> 
> I notice that bnx2 and tg3 are not using pci_read_vpd().  Presumably
> this is an optimisation?

The tg3 driver does use pci_read_vpd() for those cases where
(magic != TG3_EEPROM_MAGIC).  But yes, it is an optimization.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ