ath9k: remove unneeded calculation of minimal calibration power
[linux-2.6/next.git] / drivers / scsi / bfa / include / defs / bfa_defs_mfg.h
blobc5bd9c36ad4d972d877e9a18acf2dd77750fe312
1 /*
2 * Copyright (c) 2005-2009 Brocade Communications Systems, Inc.
3 * All rights reserved
4 * www.brocade.com
6 * Linux driver for Brocade Fibre Channel Host Bus Adapter.
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
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.
17 #ifndef __BFA_DEFS_MFG_H__
18 #define __BFA_DEFS_MFG_H__
20 #include <bfa_os_inc.h>
22 /**
23 * Manufacturing block version
25 #define BFA_MFG_VERSION 2
27 /**
28 * Manufacturing block encrypted version
30 #define BFA_MFG_ENC_VER 2
32 /**
33 * Manufacturing block version 1 length
35 #define BFA_MFG_VER1_LEN 128
37 /**
38 * Manufacturing block header length
40 #define BFA_MFG_HDR_LEN 4
42 /**
43 * Checksum size
45 #define BFA_MFG_CHKSUM_SIZE 16
47 /**
48 * Manufacturing block encrypted version
50 #define BFA_MFG_ENC_VER 2
52 /**
53 * Manufacturing block version 1 length
55 #define BFA_MFG_VER1_LEN 128
57 /**
58 * Manufacturing block header length
60 #define BFA_MFG_HDR_LEN 4
62 /**
63 * Checksum size
65 #define BFA_MFG_CHKSUM_SIZE 16
67 /**
68 * Manufacturing block format
70 #define BFA_MFG_SERIALNUM_SIZE 11
71 #define BFA_MFG_PARTNUM_SIZE 14
72 #define BFA_MFG_SUPPLIER_ID_SIZE 10
73 #define BFA_MFG_SUPPLIER_PARTNUM_SIZE 20
74 #define BFA_MFG_SUPPLIER_SERIALNUM_SIZE 20
75 #define BFA_MFG_SUPPLIER_REVISION_SIZE 4
76 #define STRSZ(_n) (((_n) + 4) & ~3)
78 /**
79 * Manufacturing card type
81 enum {
82 BFA_MFG_TYPE_CB_MAX = 825, /* Crossbow card type max */
83 BFA_MFG_TYPE_FC8P2 = 825, /* 8G 2port FC card */
84 BFA_MFG_TYPE_FC8P1 = 815, /* 8G 1port FC card */
85 BFA_MFG_TYPE_FC4P2 = 425, /* 4G 2port FC card */
86 BFA_MFG_TYPE_FC4P1 = 415, /* 4G 1port FC card */
87 BFA_MFG_TYPE_CNA10P2 = 1020, /* 10G 2port CNA card */
88 BFA_MFG_TYPE_CNA10P1 = 1010, /* 10G 1port CNA card */
91 #pragma pack(1)
93 /**
94 * Card type to port number conversion
96 #define bfa_mfg_type2port_num(card_type) (((card_type) / 10) % 10)
99 /**
100 * All numerical fields are in big-endian format.
102 struct bfa_mfg_block_s {
106 * VPD data length
108 #define BFA_MFG_VPD_LEN 512
110 #define BFA_MFG_VPD_PCI_HDR_OFF 137
111 #define BFA_MFG_VPD_PCI_VER_MASK 0x07 /* version mask 3 bits */
112 #define BFA_MFG_VPD_PCI_VDR_MASK 0xf8 /* vendor mask 5 bits */
115 * VPD vendor tag
117 enum {
118 BFA_MFG_VPD_UNKNOWN = 0, /* vendor unknown */
119 BFA_MFG_VPD_IBM = 1, /* vendor IBM */
120 BFA_MFG_VPD_HP = 2, /* vendor HP */
121 BFA_MFG_VPD_DELL = 3, /* vendor DELL */
122 BFA_MFG_VPD_PCI_IBM = 0x08, /* PCI VPD IBM */
123 BFA_MFG_VPD_PCI_HP = 0x10, /* PCI VPD HP */
124 BFA_MFG_VPD_PCI_DELL = 0x20, /* PCI VPD DELL */
125 BFA_MFG_VPD_PCI_BRCD = 0xf8, /* PCI VPD Brocade */
129 * All numerical fields are in big-endian format.
131 struct bfa_mfg_vpd_s {
132 u8 version; /* vpd data version */
133 u8 vpd_sig[3]; /* characters 'V', 'P', 'D' */
134 u8 chksum; /* u8 checksum */
135 u8 vendor; /* vendor */
136 u8 len; /* vpd data length excluding header */
137 u8 rsv;
138 u8 data[BFA_MFG_VPD_LEN]; /* vpd data */
141 #pragma pack()
143 #endif /* __BFA_DEFS_MFG_H__ */