bfa_defs_mfg.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
  3. * All rights reserved
  4. * www.brocade.com
  5. *
  6. * Linux driver for Brocade Fibre Channel Host Bus Adapter.
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License (GPL) Version 2 as
  10. * published by the Free Software Foundation
  11. *
  12. * This program is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. */
  17. #ifndef __BFA_DEFS_MFG_H__
  18. #define __BFA_DEFS_MFG_H__
  19. #include <bfa_os_inc.h>
  20. /**
  21. * Manufacturing block version
  22. */
  23. #define BFA_MFG_VERSION 1
  24. /**
  25. * Manufacturing block format
  26. */
  27. #define BFA_MFG_SERIALNUM_SIZE 11
  28. #define BFA_MFG_PARTNUM_SIZE 14
  29. #define BFA_MFG_SUPPLIER_ID_SIZE 10
  30. #define BFA_MFG_SUPPLIER_PARTNUM_SIZE 20
  31. #define BFA_MFG_SUPPLIER_SERIALNUM_SIZE 20
  32. #define BFA_MFG_SUPPLIER_REVISION_SIZE 4
  33. #define STRSZ(_n) (((_n) + 4) & ~3)
  34. /**
  35. * VPD data length
  36. */
  37. #define BFA_MFG_VPD_LEN 256
  38. /**
  39. * All numerical fields are in big-endian format.
  40. */
  41. struct bfa_mfg_vpd_s {
  42. u8 version; /* vpd data version */
  43. u8 vpd_sig[3]; /* characters 'V', 'P', 'D' */
  44. u8 chksum; /* u8 checksum */
  45. u8 vendor; /* vendor */
  46. u8 len; /* vpd data length excluding header */
  47. u8 rsv;
  48. u8 data[BFA_MFG_VPD_LEN]; /* vpd data */
  49. };
  50. #pragma pack(1)
  51. #endif /* __BFA_DEFS_MFG_H__ */