iSeries_VpdInfo.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:3k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  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>                    */
  8. /*                                                                      */
  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.                                  */
  13. /*                                                                      */
  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.                         */
  18. /*                                                                      */
  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. /************************************************************************/
  30. struct pci_dev;  /* Forward Declare                      */
  31. /************************************************************************/
  32. /* Location Data extracted from the VPD list and device info.           */
  33. /************************************************************************/
  34. struct LocationDataStruct { /* Location data structure for device   */
  35. u16  Bus; /* iSeries Bus Number     0x00*/
  36. u16  Board; /* iSeries Board                    0x02*/
  37. u8   FrameId; /* iSeries spcn Frame Id            0x04*/
  38. u8   PhbId; /* iSeries Phb Location             0x05*/
  39. u16  Card; /* iSeries Card Slot                0x06*/
  40. char CardLocation[4]; /* Char format of planar vpd        0x08*/
  41. u8   AgentId; /* iSeries AgentId                  0x0C*/
  42. u8   SecondaryAgentId; /* iSeries Secondary Agent Id       0x0D*/
  43. u8   LinuxBus; /* Linux Bus Number                 0x0E*/
  44. u8   LinuxDevFn; /* Linux Device Function            0x0F*/
  45. };
  46. typedef struct LocationDataStruct  LocationData;
  47. #define LOCATION_DATA_SIZE      16
  48. /************************************************************************/
  49. /* Protypes                                                             */
  50. /************************************************************************/
  51. extern LocationData* iSeries_GetLocationData(struct pci_dev* PciDev);
  52. extern int           iSeries_Device_Information(struct pci_dev*,char*, int);
  53. #endif /* _ISERIES_VPDINFO_H */