diff options
author | James Smart <James.Smart@Emulex.Com> | 2009-07-19 10:01:03 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-08-22 18:51:56 -0400 |
commit | 8fa38513ddc1076f3e26c651f3567b084c273ba2 (patch) | |
tree | a13d51bd2b2deced5b2209f52118b53ad1f59bbc /drivers/scsi/lpfc/lpfc_hw4.h | |
parent | 66d6faec2f874cf6bf9bd4900966584ea9feae3d (diff) |
[SCSI] lpfc 8.3.4: Various SLI4 fixes
Various SLI4 fixes
- Fix switch name not used in the FCF record for FCoE HBAs
- Enabled HBA UE error polling error-condition action code
- Rewrite lpfc_sli4_scmd_to_wqidx_distr() to handle counter rollover cleanly
- Modify resume_rpi mailbox data structure to match current SLI4 spec
- Do not issue mailbox command in MBX_POLL mode when LPFC_HBA_ERROR is set
- Wait for HBA POST completion before checking Online and UE registers
- Fix accumulated total length not being filled in on unsolicited IOCBs
- Use PCI config space register to determine SLI rev of HBA
- Turn on starting ELS tmo function timer during device initialization
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw4.h | 74 |
1 files changed, 61 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h index 2995d128f07f..3689eee04535 100644 --- a/drivers/scsi/lpfc/lpfc_hw4.h +++ b/drivers/scsi/lpfc/lpfc_hw4.h | |||
@@ -52,6 +52,31 @@ struct dma_address { | |||
52 | uint32_t addr_hi; | 52 | uint32_t addr_hi; |
53 | }; | 53 | }; |
54 | 54 | ||
55 | #define LPFC_SLIREV_CONF_WORD 0x58 | ||
56 | struct lpfc_sli_intf { | ||
57 | uint32_t word0; | ||
58 | #define lpfc_sli_intf_iftype_MASK 0x00000007 | ||
59 | #define lpfc_sli_intf_iftype_SHIFT 0 | ||
60 | #define lpfc_sli_intf_iftype_WORD word0 | ||
61 | #define lpfc_sli_intf_rev_MASK 0x0000000f | ||
62 | #define lpfc_sli_intf_rev_SHIFT 4 | ||
63 | #define lpfc_sli_intf_rev_WORD word0 | ||
64 | #define LPFC_SLIREV_CONF_SLI4 4 | ||
65 | #define lpfc_sli_intf_family_MASK 0x000000ff | ||
66 | #define lpfc_sli_intf_family_SHIFT 8 | ||
67 | #define lpfc_sli_intf_family_WORD word0 | ||
68 | #define lpfc_sli_intf_feat1_MASK 0x000000ff | ||
69 | #define lpfc_sli_intf_feat1_SHIFT 16 | ||
70 | #define lpfc_sli_intf_feat1_WORD word0 | ||
71 | #define lpfc_sli_intf_feat2_MASK 0x0000001f | ||
72 | #define lpfc_sli_intf_feat2_SHIFT 24 | ||
73 | #define lpfc_sli_intf_feat2_WORD word0 | ||
74 | #define lpfc_sli_intf_valid_MASK 0x00000007 | ||
75 | #define lpfc_sli_intf_valid_SHIFT 29 | ||
76 | #define lpfc_sli_intf_valid_WORD word0 | ||
77 | #define LPFC_SLI_INTF_VALID 6 | ||
78 | }; | ||
79 | |||
55 | #define LPFC_SLI4_BAR0 1 | 80 | #define LPFC_SLI4_BAR0 1 |
56 | #define LPFC_SLI4_BAR1 2 | 81 | #define LPFC_SLI4_BAR1 2 |
57 | #define LPFC_SLI4_BAR2 4 | 82 | #define LPFC_SLI4_BAR2 4 |
@@ -1181,6 +1206,32 @@ struct fcf_record { | |||
1181 | #define lpfc_fcf_record_fcf_state_MASK 0x0000FFFF | 1206 | #define lpfc_fcf_record_fcf_state_MASK 0x0000FFFF |
1182 | #define lpfc_fcf_record_fcf_state_WORD word8 | 1207 | #define lpfc_fcf_record_fcf_state_WORD word8 |
1183 | uint8_t vlan_bitmap[512]; | 1208 | uint8_t vlan_bitmap[512]; |
1209 | uint32_t word137; | ||
1210 | #define lpfc_fcf_record_switch_name_0_SHIFT 0 | ||
1211 | #define lpfc_fcf_record_switch_name_0_MASK 0x000000FF | ||
1212 | #define lpfc_fcf_record_switch_name_0_WORD word137 | ||
1213 | #define lpfc_fcf_record_switch_name_1_SHIFT 8 | ||
1214 | #define lpfc_fcf_record_switch_name_1_MASK 0x000000FF | ||
1215 | #define lpfc_fcf_record_switch_name_1_WORD word137 | ||
1216 | #define lpfc_fcf_record_switch_name_2_SHIFT 16 | ||
1217 | #define lpfc_fcf_record_switch_name_2_MASK 0x000000FF | ||
1218 | #define lpfc_fcf_record_switch_name_2_WORD word137 | ||
1219 | #define lpfc_fcf_record_switch_name_3_SHIFT 24 | ||
1220 | #define lpfc_fcf_record_switch_name_3_MASK 0x000000FF | ||
1221 | #define lpfc_fcf_record_switch_name_3_WORD word137 | ||
1222 | uint32_t word138; | ||
1223 | #define lpfc_fcf_record_switch_name_4_SHIFT 0 | ||
1224 | #define lpfc_fcf_record_switch_name_4_MASK 0x000000FF | ||
1225 | #define lpfc_fcf_record_switch_name_4_WORD word138 | ||
1226 | #define lpfc_fcf_record_switch_name_5_SHIFT 8 | ||
1227 | #define lpfc_fcf_record_switch_name_5_MASK 0x000000FF | ||
1228 | #define lpfc_fcf_record_switch_name_5_WORD word138 | ||
1229 | #define lpfc_fcf_record_switch_name_6_SHIFT 16 | ||
1230 | #define lpfc_fcf_record_switch_name_6_MASK 0x000000FF | ||
1231 | #define lpfc_fcf_record_switch_name_6_WORD word138 | ||
1232 | #define lpfc_fcf_record_switch_name_7_SHIFT 24 | ||
1233 | #define lpfc_fcf_record_switch_name_7_MASK 0x000000FF | ||
1234 | #define lpfc_fcf_record_switch_name_7_WORD word138 | ||
1184 | }; | 1235 | }; |
1185 | 1236 | ||
1186 | struct lpfc_mbx_read_fcf_tbl { | 1237 | struct lpfc_mbx_read_fcf_tbl { |
@@ -1385,20 +1436,17 @@ struct lpfc_mbx_unreg_vfi { | |||
1385 | 1436 | ||
1386 | struct lpfc_mbx_resume_rpi { | 1437 | struct lpfc_mbx_resume_rpi { |
1387 | uint32_t word1; | 1438 | uint32_t word1; |
1388 | #define lpfc_resume_rpi_rpi_SHIFT 0 | 1439 | #define lpfc_resume_rpi_index_SHIFT 0 |
1389 | #define lpfc_resume_rpi_rpi_MASK 0x0000FFFF | 1440 | #define lpfc_resume_rpi_index_MASK 0x0000FFFF |
1390 | #define lpfc_resume_rpi_rpi_WORD word1 | 1441 | #define lpfc_resume_rpi_index_WORD word1 |
1442 | #define lpfc_resume_rpi_ii_SHIFT 30 | ||
1443 | #define lpfc_resume_rpi_ii_MASK 0x00000003 | ||
1444 | #define lpfc_resume_rpi_ii_WORD word1 | ||
1445 | #define RESUME_INDEX_RPI 0 | ||
1446 | #define RESUME_INDEX_VPI 1 | ||
1447 | #define RESUME_INDEX_VFI 2 | ||
1448 | #define RESUME_INDEX_FCFI 3 | ||
1391 | uint32_t event_tag; | 1449 | uint32_t event_tag; |
1392 | uint32_t word3_rsvd; | ||
1393 | uint32_t word4_rsvd; | ||
1394 | uint32_t word5_rsvd; | ||
1395 | uint32_t word6; | ||
1396 | #define lpfc_resume_rpi_vpi_SHIFT 0 | ||
1397 | #define lpfc_resume_rpi_vpi_MASK 0x0000FFFF | ||
1398 | #define lpfc_resume_rpi_vpi_WORD word6 | ||
1399 | #define lpfc_resume_rpi_vfi_SHIFT 16 | ||
1400 | #define lpfc_resume_rpi_vfi_MASK 0x0000FFFF | ||
1401 | #define lpfc_resume_rpi_vfi_WORD word6 | ||
1402 | }; | 1450 | }; |
1403 | 1451 | ||
1404 | #define REG_FCF_INVALID_QID 0xFFFF | 1452 | #define REG_FCF_INVALID_QID 0xFFFF |