diff options
Diffstat (limited to 'drivers/scsi/bfa')
-rw-r--r-- | drivers/scsi/bfa/bfa_fcpim.c | 5 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcport.c | 42 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_fcxp.c | 14 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.c | 41 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_ioc.h | 1 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_iocfc.c | 27 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_iocfc.h | 5 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_lps.c | 6 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_port_priv.h | 4 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_priv.h | 3 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_rport.c | 5 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_sgpg.c | 5 | ||||
-rw-r--r-- | drivers/scsi/bfa/bfa_uf.c | 5 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/bfi/bfi_iocfc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/bfi/bfi_pbc.h | 62 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_adapter.h | 3 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_boot.h | 10 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_mfg.h | 38 | ||||
-rw-r--r-- | drivers/scsi/bfa/include/defs/bfa_defs_pport.h | 3 |
19 files changed, 154 insertions, 127 deletions
diff --git a/drivers/scsi/bfa/bfa_fcpim.c b/drivers/scsi/bfa/bfa_fcpim.c index 790c945aeae6..12849e9071cd 100644 --- a/drivers/scsi/bfa/bfa_fcpim.c +++ b/drivers/scsi/bfa/bfa_fcpim.c | |||
@@ -80,11 +80,6 @@ bfa_fcpim_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
80 | } | 80 | } |
81 | 81 | ||
82 | static void | 82 | static void |
83 | bfa_fcpim_initdone(struct bfa_s *bfa) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | static void | ||
88 | bfa_fcpim_detach(struct bfa_s *bfa) | 83 | bfa_fcpim_detach(struct bfa_s *bfa) |
89 | { | 84 | { |
90 | struct bfa_fcpim_mod_s *fcpim = BFA_FCPIM_MOD(bfa); | 85 | struct bfa_fcpim_mod_s *fcpim = BFA_FCPIM_MOD(bfa); |
diff --git a/drivers/scsi/bfa/bfa_fcport.c b/drivers/scsi/bfa/bfa_fcport.c index c589488db0c1..4961b8da9127 100644 --- a/drivers/scsi/bfa/bfa_fcport.c +++ b/drivers/scsi/bfa/bfa_fcport.c | |||
@@ -912,25 +912,6 @@ bfa_fcport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
912 | } | 912 | } |
913 | 913 | ||
914 | static void | 914 | static void |
915 | bfa_fcport_initdone(struct bfa_s *bfa) | ||
916 | { | ||
917 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); | ||
918 | |||
919 | /** | ||
920 | * Initialize port attributes from IOC hardware data. | ||
921 | */ | ||
922 | bfa_fcport_set_wwns(fcport); | ||
923 | if (fcport->cfg.maxfrsize == 0) | ||
924 | fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc); | ||
925 | fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc); | ||
926 | fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc); | ||
927 | |||
928 | bfa_assert(fcport->cfg.maxfrsize); | ||
929 | bfa_assert(fcport->cfg.rx_bbcredit); | ||
930 | bfa_assert(fcport->speed_sup); | ||
931 | } | ||
932 | |||
933 | static void | ||
934 | bfa_fcport_detach(struct bfa_s *bfa) | 915 | bfa_fcport_detach(struct bfa_s *bfa) |
935 | { | 916 | { |
936 | } | 917 | } |
@@ -1263,6 +1244,29 @@ bfa_fcport_send_stats_clear(void *cbarg) | |||
1263 | */ | 1244 | */ |
1264 | 1245 | ||
1265 | /** | 1246 | /** |
1247 | * Called to initialize port attributes | ||
1248 | */ | ||
1249 | void | ||
1250 | bfa_fcport_init(struct bfa_s *bfa) | ||
1251 | { | ||
1252 | struct bfa_fcport_s *fcport = BFA_FCPORT_MOD(bfa); | ||
1253 | |||
1254 | /** | ||
1255 | * Initialize port attributes from IOC hardware data. | ||
1256 | */ | ||
1257 | bfa_fcport_set_wwns(fcport); | ||
1258 | if (fcport->cfg.maxfrsize == 0) | ||
1259 | fcport->cfg.maxfrsize = bfa_ioc_maxfrsize(&bfa->ioc); | ||
1260 | fcport->cfg.rx_bbcredit = bfa_ioc_rx_bbcredit(&bfa->ioc); | ||
1261 | fcport->speed_sup = bfa_ioc_speed_sup(&bfa->ioc); | ||
1262 | |||
1263 | bfa_assert(fcport->cfg.maxfrsize); | ||
1264 | bfa_assert(fcport->cfg.rx_bbcredit); | ||
1265 | bfa_assert(fcport->speed_sup); | ||
1266 | } | ||
1267 | |||
1268 | |||
1269 | /** | ||
1266 | * Firmware message handler. | 1270 | * Firmware message handler. |
1267 | */ | 1271 | */ |
1268 | void | 1272 | void |
diff --git a/drivers/scsi/bfa/bfa_fcxp.c b/drivers/scsi/bfa/bfa_fcxp.c index cf0ad6782686..8258f88bfee6 100644 --- a/drivers/scsi/bfa/bfa_fcxp.c +++ b/drivers/scsi/bfa/bfa_fcxp.c | |||
@@ -149,11 +149,6 @@ bfa_fcxp_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
149 | } | 149 | } |
150 | 150 | ||
151 | static void | 151 | static void |
152 | bfa_fcxp_initdone(struct bfa_s *bfa) | ||
153 | { | ||
154 | } | ||
155 | |||
156 | static void | ||
157 | bfa_fcxp_detach(struct bfa_s *bfa) | 152 | bfa_fcxp_detach(struct bfa_s *bfa) |
158 | { | 153 | { |
159 | } | 154 | } |
@@ -225,7 +220,7 @@ bfa_fcxp_null_comp(void *bfad_fcxp, struct bfa_fcxp_s *fcxp, void *cbarg, | |||
225 | bfa_status_t req_status, u32 rsp_len, | 220 | bfa_status_t req_status, u32 rsp_len, |
226 | u32 resid_len, struct fchs_s *rsp_fchs) | 221 | u32 resid_len, struct fchs_s *rsp_fchs) |
227 | { | 222 | { |
228 | /**discarded fcxp completion */ | 223 | /* discarded fcxp completion */ |
229 | } | 224 | } |
230 | 225 | ||
231 | static void | 226 | static void |
@@ -527,11 +522,8 @@ bfa_fcxp_alloc(void *caller, struct bfa_s *bfa, int nreq_sgles, | |||
527 | if (nreq_sgles > BFI_SGE_INLINE) { | 522 | if (nreq_sgles > BFI_SGE_INLINE) { |
528 | nreq_sgpg = BFA_SGPG_NPAGE(nreq_sgles); | 523 | nreq_sgpg = BFA_SGPG_NPAGE(nreq_sgles); |
529 | 524 | ||
530 | if (bfa_sgpg_malloc | 525 | if (bfa_sgpg_malloc(bfa, &fcxp->req_sgpg_q, nreq_sgpg) |
531 | (bfa, &fcxp->req_sgpg_q, nreq_sgpg) | ||
532 | != BFA_STATUS_OK) { | 526 | != BFA_STATUS_OK) { |
533 | /* bfa_sgpg_wait(bfa, &fcxp->req_sgpg_wqe, | ||
534 | nreq_sgpg); */ | ||
535 | /* | 527 | /* |
536 | * TODO | 528 | * TODO |
537 | */ | 529 | */ |
@@ -685,7 +677,7 @@ bfa_fcxp_send(struct bfa_fcxp_s *fcxp, struct bfa_rport_s *rport, | |||
685 | fcxp->send_cbarg = cbarg; | 677 | fcxp->send_cbarg = cbarg; |
686 | 678 | ||
687 | /** | 679 | /** |
688 | * If no room in CPE queue, wait for | 680 | * If no room in CPE queue, wait for space in request queue |
689 | */ | 681 | */ |
690 | send_req = bfa_reqq_next(bfa, BFA_REQQ_FCXP); | 682 | send_req = bfa_reqq_next(bfa, BFA_REQQ_FCXP); |
691 | if (!send_req) { | 683 | if (!send_req) { |
diff --git a/drivers/scsi/bfa/bfa_ioc.c b/drivers/scsi/bfa/bfa_ioc.c index ef3b3fefbe74..268c071ce673 100644 --- a/drivers/scsi/bfa/bfa_ioc.c +++ b/drivers/scsi/bfa/bfa_ioc.c | |||
@@ -1608,6 +1608,13 @@ bfa_ioc_error_isr(struct bfa_ioc_s *ioc) | |||
1608 | bfa_fsm_send_event(ioc, IOC_E_HWERROR); | 1608 | bfa_fsm_send_event(ioc, IOC_E_HWERROR); |
1609 | } | 1609 | } |
1610 | 1610 | ||
1611 | void | ||
1612 | bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc) | ||
1613 | { | ||
1614 | ioc->fcmode = BFA_TRUE; | ||
1615 | ioc->port_id = bfa_ioc_pcifn(ioc); | ||
1616 | } | ||
1617 | |||
1611 | #ifndef BFA_BIOS_BUILD | 1618 | #ifndef BFA_BIOS_BUILD |
1612 | 1619 | ||
1613 | /** | 1620 | /** |
@@ -1697,6 +1704,9 @@ bfa_ioc_get_adapter_attr(struct bfa_ioc_s *ioc, | |||
1697 | /* For now, model descr uses same model string */ | 1704 | /* For now, model descr uses same model string */ |
1698 | bfa_ioc_get_adapter_model(ioc, ad_attr->model_descr); | 1705 | bfa_ioc_get_adapter_model(ioc, ad_attr->model_descr); |
1699 | 1706 | ||
1707 | ad_attr->card_type = ioc_attr->card_type; | ||
1708 | ad_attr->is_mezz = bfa_mfg_is_mezz(ioc_attr->card_type); | ||
1709 | |||
1700 | if (BFI_ADAPTER_IS_SPECIAL(ioc_attr->adapter_prop)) | 1710 | if (BFI_ADAPTER_IS_SPECIAL(ioc_attr->adapter_prop)) |
1701 | ad_attr->prototype = 1; | 1711 | ad_attr->prototype = 1; |
1702 | else | 1712 | else |
@@ -1866,30 +1876,6 @@ bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc) | |||
1866 | return w.wwn; | 1876 | return w.wwn; |
1867 | } | 1877 | } |
1868 | 1878 | ||
1869 | wwn_t | ||
1870 | bfa_ioc_get_wwn_naa5(struct bfa_ioc_s *ioc, u16 inst) | ||
1871 | { | ||
1872 | union { | ||
1873 | wwn_t wwn; | ||
1874 | u8 byte[sizeof(wwn_t)]; | ||
1875 | } | ||
1876 | w , w5; | ||
1877 | |||
1878 | bfa_trc(ioc, inst); | ||
1879 | |||
1880 | w.wwn = ioc->attr->mfg_wwn; | ||
1881 | w5.byte[0] = 0x50 | w.byte[2] >> 4; | ||
1882 | w5.byte[1] = w.byte[2] << 4 | w.byte[3] >> 4; | ||
1883 | w5.byte[2] = w.byte[3] << 4 | w.byte[4] >> 4; | ||
1884 | w5.byte[3] = w.byte[4] << 4 | w.byte[5] >> 4; | ||
1885 | w5.byte[4] = w.byte[5] << 4 | w.byte[6] >> 4; | ||
1886 | w5.byte[5] = w.byte[6] << 4 | w.byte[7] >> 4; | ||
1887 | w5.byte[6] = w.byte[7] << 4 | (inst & 0x0f00) >> 8; | ||
1888 | w5.byte[7] = (inst & 0xff); | ||
1889 | |||
1890 | return w5.wwn; | ||
1891 | } | ||
1892 | |||
1893 | u64 | 1879 | u64 |
1894 | bfa_ioc_get_adid(struct bfa_ioc_s *ioc) | 1880 | bfa_ioc_get_adid(struct bfa_ioc_s *ioc) |
1895 | { | 1881 | { |
@@ -1907,13 +1893,6 @@ bfa_ioc_get_mac(struct bfa_ioc_s *ioc) | |||
1907 | return mac; | 1893 | return mac; |
1908 | } | 1894 | } |
1909 | 1895 | ||
1910 | void | ||
1911 | bfa_ioc_set_fcmode(struct bfa_ioc_s *ioc) | ||
1912 | { | ||
1913 | ioc->fcmode = BFA_TRUE; | ||
1914 | ioc->port_id = bfa_ioc_pcifn(ioc); | ||
1915 | } | ||
1916 | |||
1917 | bfa_boolean_t | 1896 | bfa_boolean_t |
1918 | bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc) | 1897 | bfa_ioc_get_fcmode(struct bfa_ioc_s *ioc) |
1919 | { | 1898 | { |
diff --git a/drivers/scsi/bfa/bfa_ioc.h b/drivers/scsi/bfa/bfa_ioc.h index 2fbb6b2efc7d..df15eccd760f 100644 --- a/drivers/scsi/bfa/bfa_ioc.h +++ b/drivers/scsi/bfa/bfa_ioc.h | |||
@@ -303,7 +303,6 @@ bfa_boolean_t bfa_ioc_fwver_cmp(struct bfa_ioc_s *ioc, | |||
303 | */ | 303 | */ |
304 | wwn_t bfa_ioc_get_pwwn(struct bfa_ioc_s *ioc); | 304 | wwn_t bfa_ioc_get_pwwn(struct bfa_ioc_s *ioc); |
305 | wwn_t bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc); | 305 | wwn_t bfa_ioc_get_nwwn(struct bfa_ioc_s *ioc); |
306 | wwn_t bfa_ioc_get_wwn_naa5(struct bfa_ioc_s *ioc, u16 inst); | ||
307 | mac_t bfa_ioc_get_mac(struct bfa_ioc_s *ioc); | 306 | mac_t bfa_ioc_get_mac(struct bfa_ioc_s *ioc); |
308 | u64 bfa_ioc_get_adid(struct bfa_ioc_s *ioc); | 307 | u64 bfa_ioc_get_adid(struct bfa_ioc_s *ioc); |
309 | 308 | ||
diff --git a/drivers/scsi/bfa/bfa_iocfc.c b/drivers/scsi/bfa/bfa_iocfc.c index 273ecece79ad..afa3da08b788 100644 --- a/drivers/scsi/bfa/bfa_iocfc.c +++ b/drivers/scsi/bfa/bfa_iocfc.c | |||
@@ -291,18 +291,6 @@ bfa_iocfc_mem_claim(struct bfa_s *bfa, struct bfa_iocfc_cfg_s *cfg, | |||
291 | } | 291 | } |
292 | 292 | ||
293 | /** | 293 | /** |
294 | * BFA submodules initialization completion notification. | ||
295 | */ | ||
296 | static void | ||
297 | bfa_iocfc_initdone_submod(struct bfa_s *bfa) | ||
298 | { | ||
299 | int i; | ||
300 | |||
301 | for (i = 0; hal_mods[i]; i++) | ||
302 | hal_mods[i]->initdone(bfa); | ||
303 | } | ||
304 | |||
305 | /** | ||
306 | * Start BFA submodules. | 294 | * Start BFA submodules. |
307 | */ | 295 | */ |
308 | static void | 296 | static void |
@@ -394,6 +382,8 @@ bfa_iocfc_cfgrsp(struct bfa_s *bfa) | |||
394 | /** | 382 | /** |
395 | * Configuration is complete - initialize/start submodules | 383 | * Configuration is complete - initialize/start submodules |
396 | */ | 384 | */ |
385 | bfa_fcport_init(bfa); | ||
386 | |||
397 | if (iocfc->action == BFA_IOCFC_ACT_INIT) | 387 | if (iocfc->action == BFA_IOCFC_ACT_INIT) |
398 | bfa_cb_queue(bfa, &iocfc->init_hcb_qe, bfa_iocfc_init_cb, bfa); | 388 | bfa_cb_queue(bfa, &iocfc->init_hcb_qe, bfa_iocfc_init_cb, bfa); |
399 | else | 389 | else |
@@ -531,7 +521,6 @@ bfa_iocfc_enable_cbfn(void *bfa_arg, enum bfa_status status) | |||
531 | return; | 521 | return; |
532 | } | 522 | } |
533 | 523 | ||
534 | bfa_iocfc_initdone_submod(bfa); | ||
535 | bfa_iocfc_send_cfg(bfa); | 524 | bfa_iocfc_send_cfg(bfa); |
536 | } | 525 | } |
537 | 526 | ||
@@ -881,6 +870,18 @@ bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t **wwns) | |||
881 | *wwns = cfgrsp->bootwwns.wwn; | 870 | *wwns = cfgrsp->bootwwns.wwn; |
882 | } | 871 | } |
883 | 872 | ||
873 | void | ||
874 | bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa, struct bfa_boot_pbc_s *pbcfg) | ||
875 | { | ||
876 | struct bfa_iocfc_s *iocfc = &bfa->iocfc; | ||
877 | struct bfi_iocfc_cfgrsp_s *cfgrsp = iocfc->cfgrsp; | ||
878 | |||
879 | pbcfg->enable = cfgrsp->pbc_cfg.boot_enabled; | ||
880 | pbcfg->nbluns = cfgrsp->pbc_cfg.nbluns; | ||
881 | pbcfg->speed = cfgrsp->pbc_cfg.port_speed; | ||
882 | memcpy(pbcfg->pblun, cfgrsp->pbc_cfg.blun, sizeof(pbcfg->pblun)); | ||
883 | } | ||
884 | |||
884 | #endif | 885 | #endif |
885 | 886 | ||
886 | 887 | ||
diff --git a/drivers/scsi/bfa/bfa_iocfc.h b/drivers/scsi/bfa/bfa_iocfc.h index fbb4bdc9d600..3ee9fe7a7967 100644 --- a/drivers/scsi/bfa/bfa_iocfc.h +++ b/drivers/scsi/bfa/bfa_iocfc.h | |||
@@ -116,7 +116,8 @@ struct bfa_iocfc_s { | |||
116 | #define bfa_isr_mode_set(__bfa, __msix) \ | 116 | #define bfa_isr_mode_set(__bfa, __msix) \ |
117 | ((__bfa)->iocfc.hwif.hw_isr_mode_set(__bfa, __msix)) | 117 | ((__bfa)->iocfc.hwif.hw_isr_mode_set(__bfa, __msix)) |
118 | #define bfa_msix_getvecs(__bfa, __vecmap, __nvecs, __maxvec) \ | 118 | #define bfa_msix_getvecs(__bfa, __vecmap, __nvecs, __maxvec) \ |
119 | (__bfa)->iocfc.hwif.hw_msix_getvecs(__bfa, __vecmap, __nvecs, __maxvec) | 119 | ((__bfa)->iocfc.hwif.hw_msix_getvecs(__bfa, __vecmap, \ |
120 | __nvecs, __maxvec)) | ||
120 | 121 | ||
121 | /* | 122 | /* |
122 | * FC specific IOC functions. | 123 | * FC specific IOC functions. |
@@ -166,6 +167,8 @@ void bfa_com_meminfo(bfa_boolean_t mincfg, u32 *dm_len); | |||
166 | void bfa_com_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi, | 167 | void bfa_com_attach(struct bfa_s *bfa, struct bfa_meminfo_s *mi, |
167 | bfa_boolean_t mincfg); | 168 | bfa_boolean_t mincfg); |
168 | void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t **wwns); | 169 | void bfa_iocfc_get_bootwwns(struct bfa_s *bfa, u8 *nwwns, wwn_t **wwns); |
170 | void bfa_iocfc_get_pbc_boot_cfg(struct bfa_s *bfa, | ||
171 | struct bfa_boot_pbc_s *pbcfg); | ||
169 | 172 | ||
170 | #endif /* __BFA_IOCFC_H__ */ | 173 | #endif /* __BFA_IOCFC_H__ */ |
171 | 174 | ||
diff --git a/drivers/scsi/bfa/bfa_lps.c b/drivers/scsi/bfa/bfa_lps.c index ad06f6189092..acabb44f092f 100644 --- a/drivers/scsi/bfa/bfa_lps.c +++ b/drivers/scsi/bfa/bfa_lps.c | |||
@@ -41,7 +41,6 @@ static void bfa_lps_attach(struct bfa_s *bfa, void *bfad, | |||
41 | struct bfa_iocfc_cfg_s *cfg, | 41 | struct bfa_iocfc_cfg_s *cfg, |
42 | struct bfa_meminfo_s *meminfo, | 42 | struct bfa_meminfo_s *meminfo, |
43 | struct bfa_pcidev_s *pcidev); | 43 | struct bfa_pcidev_s *pcidev); |
44 | static void bfa_lps_initdone(struct bfa_s *bfa); | ||
45 | static void bfa_lps_detach(struct bfa_s *bfa); | 44 | static void bfa_lps_detach(struct bfa_s *bfa); |
46 | static void bfa_lps_start(struct bfa_s *bfa); | 45 | static void bfa_lps_start(struct bfa_s *bfa); |
47 | static void bfa_lps_stop(struct bfa_s *bfa); | 46 | static void bfa_lps_stop(struct bfa_s *bfa); |
@@ -347,11 +346,6 @@ bfa_lps_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
347 | } | 346 | } |
348 | 347 | ||
349 | static void | 348 | static void |
350 | bfa_lps_initdone(struct bfa_s *bfa) | ||
351 | { | ||
352 | } | ||
353 | |||
354 | static void | ||
355 | bfa_lps_detach(struct bfa_s *bfa) | 349 | bfa_lps_detach(struct bfa_s *bfa) |
356 | { | 350 | { |
357 | } | 351 | } |
diff --git a/drivers/scsi/bfa/bfa_port_priv.h b/drivers/scsi/bfa/bfa_port_priv.h index 40e256ec67ff..c52fe56df0bd 100644 --- a/drivers/scsi/bfa/bfa_port_priv.h +++ b/drivers/scsi/bfa/bfa_port_priv.h | |||
@@ -87,5 +87,7 @@ struct bfa_fcport_s { | |||
87 | /* | 87 | /* |
88 | * public functions | 88 | * public functions |
89 | */ | 89 | */ |
90 | void bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); | 90 | void bfa_fcport_init(struct bfa_s *bfa); |
91 | void bfa_fcport_isr(struct bfa_s *bfa, struct bfi_msg_s *msg); | ||
92 | |||
91 | #endif /* __BFA_PORT_PRIV_H__ */ | 93 | #endif /* __BFA_PORT_PRIV_H__ */ |
diff --git a/drivers/scsi/bfa/bfa_priv.h b/drivers/scsi/bfa/bfa_priv.h index be80fc7e1b0e..bf4939b1676c 100644 --- a/drivers/scsi/bfa/bfa_priv.h +++ b/drivers/scsi/bfa/bfa_priv.h | |||
@@ -37,7 +37,6 @@ | |||
37 | void *bfad, struct bfa_iocfc_cfg_s *cfg, \ | 37 | void *bfad, struct bfa_iocfc_cfg_s *cfg, \ |
38 | struct bfa_meminfo_s *meminfo, \ | 38 | struct bfa_meminfo_s *meminfo, \ |
39 | struct bfa_pcidev_s *pcidev); \ | 39 | struct bfa_pcidev_s *pcidev); \ |
40 | static void bfa_ ## __mod ## _initdone(struct bfa_s *bfa); \ | ||
41 | static void bfa_ ## __mod ## _detach(struct bfa_s *bfa); \ | 40 | static void bfa_ ## __mod ## _detach(struct bfa_s *bfa); \ |
42 | static void bfa_ ## __mod ## _start(struct bfa_s *bfa); \ | 41 | static void bfa_ ## __mod ## _start(struct bfa_s *bfa); \ |
43 | static void bfa_ ## __mod ## _stop(struct bfa_s *bfa); \ | 42 | static void bfa_ ## __mod ## _stop(struct bfa_s *bfa); \ |
@@ -47,7 +46,6 @@ | |||
47 | struct bfa_module_s hal_mod_ ## __mod = { \ | 46 | struct bfa_module_s hal_mod_ ## __mod = { \ |
48 | bfa_ ## __mod ## _meminfo, \ | 47 | bfa_ ## __mod ## _meminfo, \ |
49 | bfa_ ## __mod ## _attach, \ | 48 | bfa_ ## __mod ## _attach, \ |
50 | bfa_ ## __mod ## _initdone, \ | ||
51 | bfa_ ## __mod ## _detach, \ | 49 | bfa_ ## __mod ## _detach, \ |
52 | bfa_ ## __mod ## _start, \ | 50 | bfa_ ## __mod ## _start, \ |
53 | bfa_ ## __mod ## _stop, \ | 51 | bfa_ ## __mod ## _stop, \ |
@@ -69,7 +67,6 @@ struct bfa_module_s { | |||
69 | struct bfa_iocfc_cfg_s *cfg, | 67 | struct bfa_iocfc_cfg_s *cfg, |
70 | struct bfa_meminfo_s *meminfo, | 68 | struct bfa_meminfo_s *meminfo, |
71 | struct bfa_pcidev_s *pcidev); | 69 | struct bfa_pcidev_s *pcidev); |
72 | void (*initdone) (struct bfa_s *bfa); | ||
73 | void (*detach) (struct bfa_s *bfa); | 70 | void (*detach) (struct bfa_s *bfa); |
74 | void (*start) (struct bfa_s *bfa); | 71 | void (*start) (struct bfa_s *bfa); |
75 | void (*stop) (struct bfa_s *bfa); | 72 | void (*stop) (struct bfa_s *bfa); |
diff --git a/drivers/scsi/bfa/bfa_rport.c b/drivers/scsi/bfa/bfa_rport.c index 7c509fa244e4..ccd0680f6f16 100644 --- a/drivers/scsi/bfa/bfa_rport.c +++ b/drivers/scsi/bfa/bfa_rport.c | |||
@@ -636,11 +636,6 @@ bfa_rport_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
636 | } | 636 | } |
637 | 637 | ||
638 | static void | 638 | static void |
639 | bfa_rport_initdone(struct bfa_s *bfa) | ||
640 | { | ||
641 | } | ||
642 | |||
643 | static void | ||
644 | bfa_rport_detach(struct bfa_s *bfa) | 639 | bfa_rport_detach(struct bfa_s *bfa) |
645 | { | 640 | { |
646 | } | 641 | } |
diff --git a/drivers/scsi/bfa/bfa_sgpg.c b/drivers/scsi/bfa/bfa_sgpg.c index 279d8f9b8907..ae452c42e40e 100644 --- a/drivers/scsi/bfa/bfa_sgpg.c +++ b/drivers/scsi/bfa/bfa_sgpg.c | |||
@@ -94,11 +94,6 @@ bfa_sgpg_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
94 | } | 94 | } |
95 | 95 | ||
96 | static void | 96 | static void |
97 | bfa_sgpg_initdone(struct bfa_s *bfa) | ||
98 | { | ||
99 | } | ||
100 | |||
101 | static void | ||
102 | bfa_sgpg_detach(struct bfa_s *bfa) | 97 | bfa_sgpg_detach(struct bfa_s *bfa) |
103 | { | 98 | { |
104 | } | 99 | } |
diff --git a/drivers/scsi/bfa/bfa_uf.c b/drivers/scsi/bfa/bfa_uf.c index 4b3c2417d180..b2a37fc952de 100644 --- a/drivers/scsi/bfa/bfa_uf.c +++ b/drivers/scsi/bfa/bfa_uf.c | |||
@@ -170,11 +170,6 @@ bfa_uf_attach(struct bfa_s *bfa, void *bfad, struct bfa_iocfc_cfg_s *cfg, | |||
170 | } | 170 | } |
171 | 171 | ||
172 | static void | 172 | static void |
173 | bfa_uf_initdone(struct bfa_s *bfa) | ||
174 | { | ||
175 | } | ||
176 | |||
177 | static void | ||
178 | bfa_uf_detach(struct bfa_s *bfa) | 173 | bfa_uf_detach(struct bfa_s *bfa) |
179 | { | 174 | { |
180 | } | 175 | } |
diff --git a/drivers/scsi/bfa/include/bfi/bfi_iocfc.h b/drivers/scsi/bfa/include/bfi/bfi_iocfc.h index c3760df72575..ccdfcc5d7e0b 100644 --- a/drivers/scsi/bfa/include/bfi/bfi_iocfc.h +++ b/drivers/scsi/bfa/include/bfi/bfi_iocfc.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #define __BFI_IOCFC_H__ | 19 | #define __BFI_IOCFC_H__ |
20 | 20 | ||
21 | #include "bfi.h" | 21 | #include "bfi.h" |
22 | #include <bfi/bfi_pbc.h> | ||
22 | #include <defs/bfa_defs_ioc.h> | 23 | #include <defs/bfa_defs_ioc.h> |
23 | #include <defs/bfa_defs_iocfc.h> | 24 | #include <defs/bfa_defs_iocfc.h> |
24 | #include <defs/bfa_defs_boot.h> | 25 | #include <defs/bfa_defs_boot.h> |
@@ -78,6 +79,7 @@ struct bfi_iocfc_cfgrsp_s { | |||
78 | struct bfa_iocfc_fwcfg_s fwcfg; | 79 | struct bfa_iocfc_fwcfg_s fwcfg; |
79 | struct bfa_iocfc_intr_attr_s intr_attr; | 80 | struct bfa_iocfc_intr_attr_s intr_attr; |
80 | struct bfi_iocfc_bootwwns bootwwns; | 81 | struct bfi_iocfc_bootwwns bootwwns; |
82 | struct bfi_pbc_s pbc_cfg; | ||
81 | }; | 83 | }; |
82 | 84 | ||
83 | /** | 85 | /** |
diff --git a/drivers/scsi/bfa/include/bfi/bfi_pbc.h b/drivers/scsi/bfa/include/bfi/bfi_pbc.h new file mode 100644 index 000000000000..88a4154c30c0 --- /dev/null +++ b/drivers/scsi/bfa/include/bfi/bfi_pbc.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2005-2010 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 | |||
18 | #ifndef __BFI_PBC_H__ | ||
19 | #define __BFI_PBC_H__ | ||
20 | |||
21 | #pragma pack(1) | ||
22 | |||
23 | #define BFI_PBC_MAX_BLUNS 8 | ||
24 | #define BFI_PBC_MAX_VPORTS 16 | ||
25 | |||
26 | #define BFI_PBC_PORT_DISABLED 2 | ||
27 | /** | ||
28 | * PBC boot lun configuration | ||
29 | */ | ||
30 | struct bfi_pbc_blun_s { | ||
31 | wwn_t tgt_pwwn; | ||
32 | lun_t tgt_lun; | ||
33 | }; | ||
34 | |||
35 | /** | ||
36 | * PBC virtual port configuration | ||
37 | */ | ||
38 | struct bfi_pbc_vport_s { | ||
39 | wwn_t vp_pwwn; | ||
40 | wwn_t vp_nwwn; | ||
41 | }; | ||
42 | |||
43 | /** | ||
44 | * BFI pre-boot configuration information | ||
45 | */ | ||
46 | struct bfi_pbc_s { | ||
47 | u8 port_enabled; | ||
48 | u8 boot_enabled; | ||
49 | u8 nbluns; | ||
50 | u8 nvports; | ||
51 | u8 port_speed; | ||
52 | u8 rsvd_a; | ||
53 | u16 hss; | ||
54 | wwn_t pbc_pwwn; | ||
55 | wwn_t pbc_nwwn; | ||
56 | struct bfi_pbc_blun_s blun[BFI_PBC_MAX_BLUNS]; | ||
57 | struct bfi_pbc_vport_s vport[BFI_PBC_MAX_VPORTS]; | ||
58 | }; | ||
59 | |||
60 | #pragma pack() | ||
61 | |||
62 | #endif /* __BFI_PBC_H__ */ | ||
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h b/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h index 8c208fc8e329..aea0360d67d5 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_adapter.h | |||
@@ -39,7 +39,7 @@ enum { | |||
39 | struct bfa_adapter_attr_s { | 39 | struct bfa_adapter_attr_s { |
40 | char manufacturer[BFA_ADAPTER_MFG_NAME_LEN]; | 40 | char manufacturer[BFA_ADAPTER_MFG_NAME_LEN]; |
41 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; | 41 | char serial_num[BFA_ADAPTER_SERIAL_NUM_LEN]; |
42 | u32 rsvd1; | 42 | u32 card_type; |
43 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; | 43 | char model[BFA_ADAPTER_MODEL_NAME_LEN]; |
44 | char model_descr[BFA_ADAPTER_MODEL_DESCR_LEN]; | 44 | char model_descr[BFA_ADAPTER_MODEL_DESCR_LEN]; |
45 | wwn_t pwwn; | 45 | wwn_t pwwn; |
@@ -60,6 +60,7 @@ struct bfa_adapter_attr_s { | |||
60 | u8 pcie_lanes_orig; | 60 | u8 pcie_lanes_orig; |
61 | u8 pcie_lanes; | 61 | u8 pcie_lanes; |
62 | u8 cna_capable; | 62 | u8 cna_capable; |
63 | u8 is_mezz; | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | /** | 66 | /** |
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_boot.h b/drivers/scsi/bfa/include/defs/bfa_defs_boot.h index 6f4aa5283545..0fca10b6ad10 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_boot.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_boot.h | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | enum { | 25 | enum { |
26 | BFA_BOOT_BOOTLUN_MAX = 4, /* maximum boot lun per IOC */ | 26 | BFA_BOOT_BOOTLUN_MAX = 4, /* maximum boot lun per IOC */ |
27 | BFA_PREBOOT_BOOTLUN_MAX = 8, /* maximum preboot lun per IOC */ | ||
28 | |||
27 | }; | 29 | }; |
28 | 30 | ||
29 | #define BOOT_CFG_REV1 1 | 31 | #define BOOT_CFG_REV1 1 |
@@ -67,5 +69,13 @@ struct bfa_boot_cfg_s { | |||
67 | struct bfa_boot_bootlun_s blun_disc[BFA_BOOT_BOOTLUN_MAX]; | 69 | struct bfa_boot_bootlun_s blun_disc[BFA_BOOT_BOOTLUN_MAX]; |
68 | }; | 70 | }; |
69 | 71 | ||
72 | struct bfa_boot_pbc_s { | ||
73 | u8 enable; /* enable/disable SAN boot */ | ||
74 | u8 speed; /* boot speed settings */ | ||
75 | u8 topology; /* boot topology setting */ | ||
76 | u8 rsvd1; | ||
77 | u32 nbluns; /* number of boot luns */ | ||
78 | struct bfa_boot_bootlun_s pblun[BFA_PREBOOT_BOOTLUN_MAX]; | ||
79 | }; | ||
70 | 80 | ||
71 | #endif /* __BFA_DEFS_BOOT_H__ */ | 81 | #endif /* __BFA_DEFS_BOOT_H__ */ |
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h b/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h index bfb50eb2124d..d22fb7909643 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_mfg.h | |||
@@ -45,26 +45,6 @@ | |||
45 | #define BFA_MFG_CHKSUM_SIZE 16 | 45 | #define BFA_MFG_CHKSUM_SIZE 16 |
46 | 46 | ||
47 | /** | 47 | /** |
48 | * Manufacturing block encrypted version | ||
49 | */ | ||
50 | #define BFA_MFG_ENC_VER 2 | ||
51 | |||
52 | /** | ||
53 | * Manufacturing block version 1 length | ||
54 | */ | ||
55 | #define BFA_MFG_VER1_LEN 128 | ||
56 | |||
57 | /** | ||
58 | * Manufacturing block header length | ||
59 | */ | ||
60 | #define BFA_MFG_HDR_LEN 4 | ||
61 | |||
62 | /** | ||
63 | * Checksum size | ||
64 | */ | ||
65 | #define BFA_MFG_CHKSUM_SIZE 16 | ||
66 | |||
67 | /** | ||
68 | * Manufacturing block format | 48 | * Manufacturing block format |
69 | */ | 49 | */ |
70 | #define BFA_MFG_SERIALNUM_SIZE 11 | 50 | #define BFA_MFG_SERIALNUM_SIZE 11 |
@@ -98,6 +78,24 @@ enum { | |||
98 | */ | 78 | */ |
99 | #define bfa_mfg_type2port_num(card_type) (((card_type) / 10) % 10) | 79 | #define bfa_mfg_type2port_num(card_type) (((card_type) / 10) % 10) |
100 | 80 | ||
81 | /** | ||
82 | * Check if Mezz card | ||
83 | */ | ||
84 | #define bfa_mfg_is_mezz(type) (( \ | ||
85 | (type) == BFA_MFG_TYPE_JAYHAWK || \ | ||
86 | (type) == BFA_MFG_TYPE_WANCHESE)) | ||
87 | |||
88 | /** | ||
89 | * Check if card type valid | ||
90 | */ | ||
91 | #define bfa_mfg_is_card_type_valid(type) (( \ | ||
92 | (type) == BFA_MFG_TYPE_FC8P2 || \ | ||
93 | (type) == BFA_MFG_TYPE_FC8P1 || \ | ||
94 | (type) == BFA_MFG_TYPE_FC4P2 || \ | ||
95 | (type) == BFA_MFG_TYPE_FC4P1 || \ | ||
96 | (type) == BFA_MFG_TYPE_CNA10P2 || \ | ||
97 | (type) == BFA_MFG_TYPE_CNA10P1 || \ | ||
98 | bfa_mfg_is_mezz(type))) | ||
101 | 99 | ||
102 | /** | 100 | /** |
103 | * All numerical fields are in big-endian format. | 101 | * All numerical fields are in big-endian format. |
diff --git a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h index 26e5cc78095d..de6181cf9677 100644 --- a/drivers/scsi/bfa/include/defs/bfa_defs_pport.h +++ b/drivers/scsi/bfa/include/defs/bfa_defs_pport.h | |||
@@ -38,6 +38,7 @@ enum bfa_pport_states { | |||
38 | BFA_PPORT_ST_IOCDOWN = 10, | 38 | BFA_PPORT_ST_IOCDOWN = 10, |
39 | BFA_PPORT_ST_IOCDIS = 11, | 39 | BFA_PPORT_ST_IOCDIS = 11, |
40 | BFA_PPORT_ST_FWMISMATCH = 12, | 40 | BFA_PPORT_ST_FWMISMATCH = 12, |
41 | BFA_PPORT_ST_PREBOOT_DISABLED = 13, | ||
41 | BFA_PPORT_ST_MAX_STATE, | 42 | BFA_PPORT_ST_MAX_STATE, |
42 | }; | 43 | }; |
43 | 44 | ||
@@ -203,6 +204,8 @@ struct bfa_pport_attr_s { | |||
203 | */ | 204 | */ |
204 | wwn_t nwwn; /* node wwn */ | 205 | wwn_t nwwn; /* node wwn */ |
205 | wwn_t pwwn; /* port wwn */ | 206 | wwn_t pwwn; /* port wwn */ |
207 | wwn_t factorynwwn; /* factory node wwn */ | ||
208 | wwn_t factorypwwn; /* factory port wwn */ | ||
206 | enum fc_cos cos_supported; /* supported class of services */ | 209 | enum fc_cos cos_supported; /* supported class of services */ |
207 | u32 rsvd; | 210 | u32 rsvd; |
208 | struct fc_symname_s port_symname; /* port symbolic name */ | 211 | struct fc_symname_s port_symname; /* port symbolic name */ |