- patches.suse/slab-handle-memoryless-nodes-v2a.patch: Refresh.
[linux-flexiantxendom0-3.2.10.git] / drivers / scsi / bfa / include / defs / bfa_defs_mfg.h
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
20 #include <bfa_os_inc.h>
21
22 /**
23  * Manufacturing block version
24  */
25 #define BFA_MFG_VERSION                         1
26
27 /**
28  * Manufacturing block format
29  */
30 #define BFA_MFG_SERIALNUM_SIZE                  11
31 #define BFA_MFG_PARTNUM_SIZE                    14
32 #define BFA_MFG_SUPPLIER_ID_SIZE                10
33 #define BFA_MFG_SUPPLIER_PARTNUM_SIZE   20
34 #define BFA_MFG_SUPPLIER_SERIALNUM_SIZE 20
35 #define BFA_MFG_SUPPLIER_REVISION_SIZE  4
36 #define STRSZ(_n)       (((_n) + 4) & ~3)
37
38 /**
39  * VPD data length
40  */
41 #define BFA_MFG_VPD_LEN     256
42
43 /**
44  * All numerical fields are in big-endian format.
45  */
46 struct bfa_mfg_vpd_s {
47     u8     version;    /*  vpd data version */
48     u8     vpd_sig[3]; /*  characters 'V', 'P', 'D' */
49     u8     chksum;     /*  u8 checksum */
50     u8     vendor;     /*  vendor */
51     u8     len;        /*  vpd data length excluding header */
52     u8     rsv;
53     u8     data[BFA_MFG_VPD_LEN];  /*  vpd data */
54 };
55
56 #pragma pack(1)
57
58 #endif /* __BFA_DEFS_MFG_H__ */