[ofw] RE: Allow hw\mlx4\kernel\bus\drv\pci.c to compile without warnings

Leonid Keller leonid at mellanox.co.il
Tue Jun 16 00:57:18 PDT 2009


VPD (Vital Product Data) is a part of PCI spec. Any PCI device *may*
support it. Our cards do.
VPD is really found in the internal memory of PCI card, while PCI config
space contains a gateway for reading its contents.
VPD contains mostly ASCII information, but it is not a string, it has
much more complicated structure.
Really the below print is unnecessary, it could be removed. I put it
just to see that I got VPD right.

I've added VPD support for one of the customers of our Ethernet driver,
which (the customer) wishes to print VPD out.
If there will be such a request, we can pass VPD buffer to VSTAT and
print it out also.

> -----Original Message-----
> From: Sean Hefty [mailto:sean.hefty at intel.com] 
> Sent: Tuesday, June 16, 2009 12:44 AM
> To: Smith, Stan; Leonid Keller
> Cc: ofw at lists.openfabrics.org
> Subject: RE: Allow hw\mlx4\kernel\bus\drv\pci.c to compile 
> without warnings
> 
> >  pci.c @ line 556 needs a (char*) cast on &vpd[3] in order 
> to build in 
> >the x64 build environment without warnings which kill the build.
> >
> >Stan.
> >
> >556c556,557
> ><                       ("Found VPD of size %d, beginning 
> with '%s'\n",
> >*p_vpd_size, &vpd[3]));
> >---
> >>                       ("Found VPD of size %d, beginning 
> with '%s'\n",
> >>                       *p_vpd_size, (char*)&vpd[3]));
> 
> What is vpd array, and why is it being used as a string if it 
> isn't already char *?  (I don't see this in my tree, but I 
> haven't updated in a couple of days.)
> 
> 



More information about the ofw mailing list