diff options
author | Krishna Gudipati <kgudipat@brocade.com> | 2011-06-13 18:50:35 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-06-29 16:31:31 -0400 |
commit | 111892082ed7a3214bc7a7ec6b8b20e8f847501a (patch) | |
tree | fb4950f69aaf7c2bf07ce8987884bb52aa497ffa /drivers/scsi/bfa/bfi.h | |
parent | 43ffdf4dfb827babcdca5345a76031598a985dc8 (diff) |
[SCSI] bfa: Brocade-1860 Fabric Adapter Hardware Enablement
- Added support for Brocade-1860 Fabric Adapter.
- Made changes to support single firmware image per asic type.
- Combined bfi_cbreg.h and bfi_ctreg.h defines into bfi_reg.h with
only minimal defines used by host.
- Added changes to setup CPE/RME Queue register offsets based on
firmware response.
- Removed queue register offset initializations and added register offsets
to BFI config response message.
- Added Brocade-1860 asic specific interrupt status definitions and
mailbox interfaces.
Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/bfa/bfi.h')
-rw-r--r-- | drivers/scsi/bfa/bfi.h | 62 |
1 files changed, 41 insertions, 21 deletions
diff --git a/drivers/scsi/bfa/bfi.h b/drivers/scsi/bfa/bfi.h index 5b69d07af99c..391796710c8f 100644 --- a/drivers/scsi/bfa/bfi.h +++ b/drivers/scsi/bfa/bfi.h | |||
@@ -28,12 +28,6 @@ | |||
28 | */ | 28 | */ |
29 | #define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */ | 29 | #define BFI_FLASH_CHUNK_SZ 256 /* Flash chunk size */ |
30 | #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) | 30 | #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32)) |
31 | enum { | ||
32 | BFI_IMAGE_CB_FC, | ||
33 | BFI_IMAGE_CT_FC, | ||
34 | BFI_IMAGE_CT_CNA, | ||
35 | BFI_IMAGE_MAX, | ||
36 | }; | ||
37 | 31 | ||
38 | /* | 32 | /* |
39 | * Msg header common to all msgs | 33 | * Msg header common to all msgs |
@@ -193,23 +187,28 @@ enum bfi_mclass { | |||
193 | #define BFI_IOC_MAX_CQS_ASIC 8 | 187 | #define BFI_IOC_MAX_CQS_ASIC 8 |
194 | #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */ | 188 | #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */ |
195 | 189 | ||
196 | #define BFI_BOOT_TYPE_OFF 8 | ||
197 | #define BFI_BOOT_LOADER_OFF 12 | ||
198 | |||
199 | #define BFI_BOOT_TYPE_NORMAL 0 | ||
200 | #define BFI_BOOT_TYPE_FLASH 1 | ||
201 | #define BFI_BOOT_TYPE_MEMTEST 2 | ||
202 | |||
203 | #define BFI_BOOT_LOADER_OS 0 | ||
204 | #define BFI_BOOT_LOADER_BIOS 1 | ||
205 | #define BFI_BOOT_LOADER_UEFI 2 | ||
206 | |||
207 | /* | 190 | /* |
208 | *---------------------------------------------------------------------- | 191 | *---------------------------------------------------------------------- |
209 | * IOC | 192 | * IOC |
210 | *---------------------------------------------------------------------- | 193 | *---------------------------------------------------------------------- |
211 | */ | 194 | */ |
212 | 195 | ||
196 | /* | ||
197 | * Different asic generations | ||
198 | */ | ||
199 | enum bfi_asic_gen { | ||
200 | BFI_ASIC_GEN_CB = 1, /* crossbow 8G FC */ | ||
201 | BFI_ASIC_GEN_CT = 2, /* catapult 8G FC or 10G CNA */ | ||
202 | BFI_ASIC_GEN_CT2 = 3, /* catapult-2 16G FC or 10G CNA */ | ||
203 | }; | ||
204 | |||
205 | enum bfi_asic_mode { | ||
206 | BFI_ASIC_MODE_FC = 1, /* FC upto 8G speed */ | ||
207 | BFI_ASIC_MODE_FC16 = 2, /* FC upto 16G speed */ | ||
208 | BFI_ASIC_MODE_ETH = 3, /* Ethernet ports */ | ||
209 | BFI_ASIC_MODE_COMBO = 4, /* FC 16G and Ethernet 10G port */ | ||
210 | }; | ||
211 | |||
213 | enum bfi_ioc_h2i_msgs { | 212 | enum bfi_ioc_h2i_msgs { |
214 | BFI_IOC_H2I_ENABLE_REQ = 1, | 213 | BFI_IOC_H2I_ENABLE_REQ = 1, |
215 | BFI_IOC_H2I_DISABLE_REQ = 2, | 214 | BFI_IOC_H2I_DISABLE_REQ = 2, |
@@ -290,14 +289,35 @@ struct bfi_ioc_getattr_reply_s { | |||
290 | #define BFI_IOC_FW_SIGNATURE (0xbfadbfad) | 289 | #define BFI_IOC_FW_SIGNATURE (0xbfadbfad) |
291 | #define BFI_IOC_MD5SUM_SZ 4 | 290 | #define BFI_IOC_MD5SUM_SZ 4 |
292 | struct bfi_ioc_image_hdr_s { | 291 | struct bfi_ioc_image_hdr_s { |
293 | u32 signature; /* constant signature */ | 292 | u32 signature; /* constant signature */ |
294 | u32 rsvd_a; | 293 | u8 asic_gen; /* asic generation */ |
295 | u32 exec; /* exec vector */ | 294 | u8 asic_mode; |
296 | u32 param; /* parameters */ | 295 | u8 port0_mode; /* device mode for port 0 */ |
296 | u8 port1_mode; /* device mode for port 1 */ | ||
297 | u32 exec; /* exec vector */ | ||
298 | u32 bootenv; /* fimware boot env */ | ||
297 | u32 rsvd_b[4]; | 299 | u32 rsvd_b[4]; |
298 | u32 md5sum[BFI_IOC_MD5SUM_SZ]; | 300 | u32 md5sum[BFI_IOC_MD5SUM_SZ]; |
299 | }; | 301 | }; |
300 | 302 | ||
303 | #define BFI_FWBOOT_DEVMODE_OFF 4 | ||
304 | #define BFI_FWBOOT_TYPE_OFF 8 | ||
305 | #define BFI_FWBOOT_ENV_OFF 12 | ||
306 | #define BFI_FWBOOT_DEVMODE(__asic_gen, __asic_mode, __p0_mode, __p1_mode) \ | ||
307 | (((u32)(__asic_gen)) << 24 | \ | ||
308 | ((u32)(__asic_mode)) << 16 | \ | ||
309 | ((u32)(__p0_mode)) << 8 | \ | ||
310 | ((u32)(__p1_mode))) | ||
311 | |||
312 | #define BFI_FWBOOT_TYPE_NORMAL 0 | ||
313 | #define BFI_FWBOOT_TYPE_MEMTEST 1 | ||
314 | #define BFI_FWBOOT_ENV_OS 0 | ||
315 | |||
316 | enum bfi_port_mode { | ||
317 | BFI_PORT_MODE_FC = 1, | ||
318 | BFI_PORT_MODE_ETH = 2, | ||
319 | }; | ||
320 | |||
301 | /* | 321 | /* |
302 | * BFI_IOC_I2H_READY_EVENT message | 322 | * BFI_IOC_I2H_READY_EVENT message |
303 | */ | 323 | */ |