1 #ifndef _ISERIES_VPDINFO_H
2 #define _ISERIES_VPDINFO_H
3 /************************************************************************/
4 /* File iSeries_VpdInfo.h created by Allan Trautman Feb 08 2001. */
5 /************************************************************************/
6 /* This code supports the location data fon on the IBM iSeries systems. */
7 /* Copyright (C) 20yy <Allan H Trautman> <IBM Corp> */
9 /* This program is free software; you can redistribute it and/or modify */
10 /* it under the terms of the GNU General Public License as published by */
11 /* the Free Software Foundation; either version 2 of the License, or */
12 /* (at your option) any later version. */
14 /* This program is distributed in the hope that it will be useful, */
15 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
16 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
17 /* GNU General Public License for more details. */
19 /* You should have received a copy of the GNU General Public License */
20 /* along with this program; if not, write to the: */
21 /* Free Software Foundation, Inc., */
22 /* 59 Temple Place, Suite 330, */
23 /* Boston, MA 02111-1307 USA */
24 /************************************************************************/
25 /* Change Activity: */
26 /* Created, Feg 8, 2001 */
27 /* Reformated for Card, March 8, 2001 */
28 /* End Change Activity */
29 /************************************************************************/
31 struct pci_dev; /* Forward Declare */
32 /************************************************************************/
33 /* Location Data extracted from the VPD list and device info. */
34 /************************************************************************/
35 struct LocationDataStruct { /* Location data structure for device */
36 u16 Bus; /* iSeries Bus Number 0x00*/
37 u16 Board; /* iSeries Board 0x02*/
38 u8 FrameId; /* iSeries spcn Frame Id 0x04*/
39 u8 PhbId; /* iSeries Phb Location 0x05*/
40 u16 Card; /* iSeries Card Slot 0x06*/
41 char CardLocation[4]; /* Char format of planar vpd 0x08*/
42 u8 AgentId; /* iSeries AgentId 0x0C*/
43 u8 SecondaryAgentId; /* iSeries Secondary Agent Id 0x0D*/
44 u8 LinuxBus; /* Linux Bus Number 0x0E*/
45 u8 LinuxDevFn; /* Linux Device Function 0x0F*/
47 typedef struct LocationDataStruct LocationData;
48 #define LOCATION_DATA_SIZE 16
50 /************************************************************************/
52 /************************************************************************/
53 extern LocationData* iSeries_GetLocationData(struct pci_dev* PciDev);
54 extern int iSeries_Device_Information(struct pci_dev*,char*, int);
56 #endif /* _ISERIES_VPDINFO_H */