diff options
author | James Smart <James.Smart@Emulex.Com> | 2007-08-02 11:10:09 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-08-01 13:21:26 -0400 |
commit | e8b62011d88d6fdba585fb2bb77c9274a63cadab (patch) | |
tree | 838c3abee73ec571456ae3ae83e51ecbed8e4a64 /drivers/scsi/lpfc | |
parent | 3de2a653a127c468284c48e233719dc39769e354 (diff) |
[SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro
Rework the lpfc_printf_log() macro so that logging is enabled on a
per-vport basis. Used to be on a physical-port basis, thus logging
with large numbers of vports became a mess. Required redefinition of
the macro, and an update of every use.
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/lpfc')
-rw-r--r-- | drivers/scsi/lpfc/lpfc.h | 3 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_attr.c | 110 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 190 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_debugfs.c | 62 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 533 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hbadisc.c | 310 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_init.c | 74 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_logmsg.h | 10 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_mbox.c | 12 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_nportdisc.c | 118 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 246 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_sli.c | 248 | ||||
-rw-r--r-- | drivers/scsi/lpfc/lpfc_vport.c | 73 |
13 files changed, 852 insertions, 1137 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h index fb56ff9d5da2..5a76d2b4253b 100644 --- a/drivers/scsi/lpfc/lpfc.h +++ b/drivers/scsi/lpfc/lpfc.h | |||
@@ -349,6 +349,7 @@ struct lpfc_vport { | |||
349 | uint32_t cfg_use_adisc; | 349 | uint32_t cfg_use_adisc; |
350 | uint32_t cfg_fdmi_on; | 350 | uint32_t cfg_fdmi_on; |
351 | uint32_t cfg_discovery_threads; | 351 | uint32_t cfg_discovery_threads; |
352 | uint32_t cfg_log_verbose; | ||
352 | uint32_t cfg_max_luns; | 353 | uint32_t cfg_max_luns; |
353 | 354 | ||
354 | uint32_t dev_loss_tmo_changed; | 355 | uint32_t dev_loss_tmo_changed; |
@@ -446,8 +447,6 @@ struct lpfc_hba { | |||
446 | uint64_t cfg_soft_wwpn; | 447 | uint64_t cfg_soft_wwpn; |
447 | uint32_t cfg_hba_queue_depth; | 448 | uint32_t cfg_hba_queue_depth; |
448 | 449 | ||
449 | /* Config paramters that should be in the vport */ | ||
450 | uint32_t cfg_log_verbose; | ||
451 | 450 | ||
452 | lpfc_vpd_t vpd; /* vital product data */ | 451 | lpfc_vpd_t vpd; /* vital product data */ |
453 | 452 | ||
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c index 61d251b1b03b..c1cedc3d1b70 100644 --- a/drivers/scsi/lpfc/lpfc_attr.c +++ b/drivers/scsi/lpfc/lpfc_attr.c | |||
@@ -319,9 +319,8 @@ lpfc_do_offline(struct lpfc_hba *phba, uint32_t type) | |||
319 | if (cnt++ > 3000) { | 319 | if (cnt++ > 3000) { |
320 | lpfc_printf_log(phba, | 320 | lpfc_printf_log(phba, |
321 | KERN_WARNING, LOG_INIT, | 321 | KERN_WARNING, LOG_INIT, |
322 | "%d:0466 Outstanding IO when " | 322 | "0466 Outstanding IO when " |
323 | "bringing Adapter offline\n", | 323 | "bringing Adapter offline\n"); |
324 | phba->brd_no); | ||
325 | break; | 324 | break; |
326 | } | 325 | } |
327 | } | 326 | } |
@@ -694,9 +693,8 @@ lpfc_##attr##_init(struct lpfc_hba *phba, int val) \ | |||
694 | return 0;\ | 693 | return 0;\ |
695 | }\ | 694 | }\ |
696 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \ | 695 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \ |
697 | "%d:0449 lpfc_"#attr" attribute cannot be set to %d, "\ | 696 | "0449 lpfc_"#attr" attribute cannot be set to %d, "\ |
698 | "allowed range is ["#minval", "#maxval"]\n", \ | 697 | "allowed range is ["#minval", "#maxval"]\n", val); \ |
699 | phba->brd_no, val); \ | ||
700 | phba->cfg_##attr = default;\ | 698 | phba->cfg_##attr = default;\ |
701 | return -EINVAL;\ | 699 | return -EINVAL;\ |
702 | } | 700 | } |
@@ -710,9 +708,8 @@ lpfc_##attr##_set(struct lpfc_hba *phba, int val) \ | |||
710 | return 0;\ | 708 | return 0;\ |
711 | }\ | 709 | }\ |
712 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \ | 710 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, \ |
713 | "%d:0450 lpfc_"#attr" attribute cannot be set to %d, "\ | 711 | "0450 lpfc_"#attr" attribute cannot be set to %d, "\ |
714 | "allowed range is ["#minval", "#maxval"]\n", \ | 712 | "allowed range is ["#minval", "#maxval"]\n", val); \ |
715 | phba->brd_no, val); \ | ||
716 | return -EINVAL;\ | 713 | return -EINVAL;\ |
717 | } | 714 | } |
718 | 715 | ||
@@ -764,10 +761,9 @@ lpfc_##attr##_init(struct lpfc_vport *vport, int val) \ | |||
764 | vport->cfg_##attr = val;\ | 761 | vport->cfg_##attr = val;\ |
765 | return 0;\ | 762 | return 0;\ |
766 | }\ | 763 | }\ |
767 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, \ | 764 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \ |
768 | "%d:0449 lpfc_"#attr" attribute cannot be set to %d, "\ | 765 | "0449 lpfc_"#attr" attribute cannot be set to %d, "\ |
769 | "allowed range is ["#minval", "#maxval"]\n", \ | 766 | "allowed range is ["#minval", "#maxval"]\n", val); \ |
770 | vport->phba->brd_no, val); \ | ||
771 | vport->cfg_##attr = default;\ | 767 | vport->cfg_##attr = default;\ |
772 | return -EINVAL;\ | 768 | return -EINVAL;\ |
773 | } | 769 | } |
@@ -780,10 +776,9 @@ lpfc_##attr##_set(struct lpfc_vport *vport, int val) \ | |||
780 | vport->cfg_##attr = val;\ | 776 | vport->cfg_##attr = val;\ |
781 | return 0;\ | 777 | return 0;\ |
782 | }\ | 778 | }\ |
783 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, \ | 779 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, \ |
784 | "%d:0450 lpfc_"#attr" attribute cannot be set to %d, "\ | 780 | "0450 lpfc_"#attr" attribute cannot be set to %d, "\ |
785 | "allowed range is ["#minval", "#maxval"]\n", \ | 781 | "allowed range is ["#minval", "#maxval"]\n", val); \ |
786 | vport->phba->brd_no, val); \ | ||
787 | return -EINVAL;\ | 782 | return -EINVAL;\ |
788 | } | 783 | } |
789 | 784 | ||
@@ -1023,17 +1018,15 @@ lpfc_soft_wwpn_store(struct class_device *cdev, const char *buf, size_t count) | |||
1023 | stat1 = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); | 1018 | stat1 = lpfc_do_offline(phba, LPFC_EVT_OFFLINE); |
1024 | if (stat1) | 1019 | if (stat1) |
1025 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1020 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
1026 | "%d:0463 lpfc_soft_wwpn attribute set failed to reinit " | 1021 | "0463 lpfc_soft_wwpn attribute set failed to " |
1027 | "adapter - %d\n", phba->brd_no, stat1); | 1022 | "reinit adapter - %d\n", stat1); |
1028 | |||
1029 | init_completion(&online_compl); | 1023 | init_completion(&online_compl); |
1030 | lpfc_workq_post_event(phba, &stat2, &online_compl, LPFC_EVT_ONLINE); | 1024 | lpfc_workq_post_event(phba, &stat2, &online_compl, LPFC_EVT_ONLINE); |
1031 | wait_for_completion(&online_compl); | 1025 | wait_for_completion(&online_compl); |
1032 | if (stat2) | 1026 | if (stat2) |
1033 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1027 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
1034 | "%d:0464 lpfc_soft_wwpn attribute set failed to reinit " | 1028 | "0464 lpfc_soft_wwpn attribute set failed to " |
1035 | "adapter - %d\n", phba->brd_no, stat2); | 1029 | "reinit adapter - %d\n", stat2); |
1036 | |||
1037 | return (stat1 || stat2) ? -EIO : count; | 1030 | return (stat1 || stat2) ? -EIO : count; |
1038 | } | 1031 | } |
1039 | static CLASS_DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,\ | 1032 | static CLASS_DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,\ |
@@ -1145,11 +1138,10 @@ lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val) | |||
1145 | if (vport->cfg_devloss_tmo != LPFC_DEF_DEVLOSS_TMO) { | 1138 | if (vport->cfg_devloss_tmo != LPFC_DEF_DEVLOSS_TMO) { |
1146 | vport->cfg_nodev_tmo = vport->cfg_devloss_tmo; | 1139 | vport->cfg_nodev_tmo = vport->cfg_devloss_tmo; |
1147 | if (val != LPFC_DEF_DEVLOSS_TMO) | 1140 | if (val != LPFC_DEF_DEVLOSS_TMO) |
1148 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1141 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1149 | "%d (%d):0402 Ignoring nodev_tmo module" | 1142 | "0402 Ignoring nodev_tmo module " |
1150 | " parameter because devloss_tmo is" | 1143 | "parameter because devloss_tmo is " |
1151 | " set.\n", | 1144 | "set.\n"); |
1152 | vport->phba->brd_no, vport->vpi); | ||
1153 | return 0; | 1145 | return 0; |
1154 | } | 1146 | } |
1155 | 1147 | ||
@@ -1158,11 +1150,10 @@ lpfc_nodev_tmo_init(struct lpfc_vport *vport, int val) | |||
1158 | vport->cfg_devloss_tmo = val; | 1150 | vport->cfg_devloss_tmo = val; |
1159 | return 0; | 1151 | return 0; |
1160 | } | 1152 | } |
1161 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1153 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1162 | "%d (%d):0400 lpfc_nodev_tmo attribute cannot be set to" | 1154 | "0400 lpfc_nodev_tmo attribute cannot be set to" |
1163 | " %d, allowed range is [%d, %d]\n", | 1155 | " %d, allowed range is [%d, %d]\n", |
1164 | vport->phba->brd_no, vport->vpi, val, | 1156 | val, LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO); |
1165 | LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO); | ||
1166 | vport->cfg_nodev_tmo = LPFC_DEF_DEVLOSS_TMO; | 1157 | vport->cfg_nodev_tmo = LPFC_DEF_DEVLOSS_TMO; |
1167 | return -EINVAL; | 1158 | return -EINVAL; |
1168 | } | 1159 | } |
@@ -1195,10 +1186,9 @@ lpfc_nodev_tmo_set(struct lpfc_vport *vport, int val) | |||
1195 | { | 1186 | { |
1196 | if (vport->dev_loss_tmo_changed || | 1187 | if (vport->dev_loss_tmo_changed || |
1197 | (lpfc_devloss_tmo != LPFC_DEF_DEVLOSS_TMO)) { | 1188 | (lpfc_devloss_tmo != LPFC_DEF_DEVLOSS_TMO)) { |
1198 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1189 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1199 | "%d (%d):0401 Ignoring change to nodev_tmo " | 1190 | "0401 Ignoring change to nodev_tmo " |
1200 | "because devloss_tmo is set.\n", | 1191 | "because devloss_tmo is set.\n"); |
1201 | vport->phba->brd_no, vport->vpi); | ||
1202 | return 0; | 1192 | return 0; |
1203 | } | 1193 | } |
1204 | if (val >= LPFC_MIN_DEVLOSS_TMO && val <= LPFC_MAX_DEVLOSS_TMO) { | 1194 | if (val >= LPFC_MIN_DEVLOSS_TMO && val <= LPFC_MAX_DEVLOSS_TMO) { |
@@ -1207,11 +1197,10 @@ lpfc_nodev_tmo_set(struct lpfc_vport *vport, int val) | |||
1207 | lpfc_update_rport_devloss_tmo(vport); | 1197 | lpfc_update_rport_devloss_tmo(vport); |
1208 | return 0; | 1198 | return 0; |
1209 | } | 1199 | } |
1210 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1200 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1211 | "%d (%d):0403 lpfc_nodev_tmo attribute cannot be set to" | 1201 | "0403 lpfc_nodev_tmo attribute cannot be set to" |
1212 | "%d, allowed range is [%d, %d]\n", | 1202 | "%d, allowed range is [%d, %d]\n", |
1213 | vport->phba->brd_no, vport->vpi, val, | 1203 | val, LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO); |
1214 | LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO); | ||
1215 | return -EINVAL; | 1204 | return -EINVAL; |
1216 | } | 1205 | } |
1217 | 1206 | ||
@@ -1243,11 +1232,10 @@ lpfc_devloss_tmo_set(struct lpfc_vport *vport, int val) | |||
1243 | return 0; | 1232 | return 0; |
1244 | } | 1233 | } |
1245 | 1234 | ||
1246 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1235 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1247 | "%d:0404 lpfc_devloss_tmo attribute cannot be set to" | 1236 | "0404 lpfc_devloss_tmo attribute cannot be set to" |
1248 | " %d, allowed range is [%d, %d]\n", | 1237 | " %d, allowed range is [%d, %d]\n", |
1249 | vport->phba->brd_no, val, LPFC_MIN_DEVLOSS_TMO, | 1238 | val, LPFC_MIN_DEVLOSS_TMO, LPFC_MAX_DEVLOSS_TMO); |
1250 | LPFC_MAX_DEVLOSS_TMO); | ||
1251 | return -EINVAL; | 1239 | return -EINVAL; |
1252 | } | 1240 | } |
1253 | 1241 | ||
@@ -1273,7 +1261,8 @@ static CLASS_DEVICE_ATTR(lpfc_devloss_tmo, S_IRUGO | S_IWUSR, | |||
1273 | # LOG_LIBDFC 0x2000 LIBDFC events | 1261 | # LOG_LIBDFC 0x2000 LIBDFC events |
1274 | # LOG_ALL_MSG 0xffff LOG all messages | 1262 | # LOG_ALL_MSG 0xffff LOG all messages |
1275 | */ | 1263 | */ |
1276 | LPFC_ATTR_HEX_RW(log_verbose, 0x0, 0x0, 0xffff, "Verbose logging bit-mask"); | 1264 | LPFC_VPORT_ATTR_HEX_RW(log_verbose, 0x0, 0x0, 0xffff, |
1265 | "Verbose logging bit-mask"); | ||
1277 | 1266 | ||
1278 | /* | 1267 | /* |
1279 | # lun_queue_depth: This parameter is used to limit the number of outstanding | 1268 | # lun_queue_depth: This parameter is used to limit the number of outstanding |
@@ -1326,10 +1315,10 @@ static int | |||
1326 | lpfc_restrict_login_init(struct lpfc_vport *vport, int val) | 1315 | lpfc_restrict_login_init(struct lpfc_vport *vport, int val) |
1327 | { | 1316 | { |
1328 | if (val < 0 || val > 1) { | 1317 | if (val < 0 || val > 1) { |
1329 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1318 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1330 | "%d:0449 lpfc_restrict_login attribute cannot " | 1319 | "0449 lpfc_restrict_login attribute cannot " |
1331 | "be set to %d, allowed range is [0, 1]\n", | 1320 | "be set to %d, allowed range is [0, 1]\n", |
1332 | vport->phba->brd_no, val); | 1321 | val); |
1333 | vport->cfg_restrict_login = 1; | 1322 | vport->cfg_restrict_login = 1; |
1334 | return -EINVAL; | 1323 | return -EINVAL; |
1335 | } | 1324 | } |
@@ -1345,18 +1334,17 @@ static int | |||
1345 | lpfc_restrict_login_set(struct lpfc_vport *vport, int val) | 1334 | lpfc_restrict_login_set(struct lpfc_vport *vport, int val) |
1346 | { | 1335 | { |
1347 | if (val < 0 || val > 1) { | 1336 | if (val < 0 || val > 1) { |
1348 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1337 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1349 | "%d:0450 lpfc_restrict_login attribute cannot " | 1338 | "0450 lpfc_restrict_login attribute cannot " |
1350 | "be set to %d, allowed range is [0, 1]\n", | 1339 | "be set to %d, allowed range is [0, 1]\n", |
1351 | vport->phba->brd_no, val); | 1340 | val); |
1352 | vport->cfg_restrict_login = 1; | 1341 | vport->cfg_restrict_login = 1; |
1353 | return -EINVAL; | 1342 | return -EINVAL; |
1354 | } | 1343 | } |
1355 | if (vport->port_type == LPFC_PHYSICAL_PORT && val != 0) { | 1344 | if (vport->port_type == LPFC_PHYSICAL_PORT && val != 0) { |
1356 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_INIT, | 1345 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
1357 | "%d:0468 lpfc_restrict_login must be 0 for " | 1346 | "0468 lpfc_restrict_login must be 0 for " |
1358 | "Physical ports.\n", | 1347 | "Physical ports.\n"); |
1359 | vport->phba->brd_no); | ||
1360 | vport->cfg_restrict_login = 0; | 1348 | vport->cfg_restrict_login = 0; |
1361 | return 0; | 1349 | return 0; |
1362 | } | 1350 | } |
@@ -2435,7 +2423,6 @@ struct fc_function_template lpfc_vport_transport_functions = { | |||
2435 | void | 2423 | void |
2436 | lpfc_get_cfgparam(struct lpfc_hba *phba) | 2424 | lpfc_get_cfgparam(struct lpfc_hba *phba) |
2437 | { | 2425 | { |
2438 | lpfc_log_verbose_init(phba, lpfc_log_verbose); | ||
2439 | lpfc_cr_delay_init(phba, lpfc_cr_delay); | 2426 | lpfc_cr_delay_init(phba, lpfc_cr_delay); |
2440 | lpfc_cr_count_init(phba, lpfc_cr_count); | 2427 | lpfc_cr_count_init(phba, lpfc_cr_count); |
2441 | lpfc_multi_ring_support_init(phba, lpfc_multi_ring_support); | 2428 | lpfc_multi_ring_support_init(phba, lpfc_multi_ring_support); |
@@ -2469,6 +2456,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba) | |||
2469 | void | 2456 | void |
2470 | lpfc_get_vport_cfgparam(struct lpfc_vport *vport) | 2457 | lpfc_get_vport_cfgparam(struct lpfc_vport *vport) |
2471 | { | 2458 | { |
2459 | lpfc_log_verbose_init(vport, lpfc_log_verbose); | ||
2472 | lpfc_lun_queue_depth_init(vport, lpfc_lun_queue_depth); | 2460 | lpfc_lun_queue_depth_init(vport, lpfc_lun_queue_depth); |
2473 | lpfc_devloss_tmo_init(vport, lpfc_devloss_tmo); | 2461 | lpfc_devloss_tmo_init(vport, lpfc_devloss_tmo); |
2474 | lpfc_nodev_tmo_init(vport, lpfc_nodev_tmo); | 2462 | lpfc_nodev_tmo_init(vport, lpfc_nodev_tmo); |
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 8b7e90eac5c3..ad7f33a31567 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c | |||
@@ -341,11 +341,11 @@ lpfc_gen_req(struct lpfc_vport *vport, struct lpfc_dmabuf *bmp, | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /* Issue GEN REQ IOCB for NPORT <did> */ | 343 | /* Issue GEN REQ IOCB for NPORT <did> */ |
344 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 344 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
345 | "%d (%d):0119 Issue GEN REQ IOCB to NPORT x%x " | 345 | "0119 Issue GEN REQ IOCB to NPORT x%x " |
346 | "Data: x%x x%x\n", phba->brd_no, vport->vpi, | 346 | "Data: x%x x%x\n", |
347 | ndlp->nlp_DID, icmd->ulpIoTag, | 347 | ndlp->nlp_DID, icmd->ulpIoTag, |
348 | vport->port_state); | 348 | vport->port_state); |
349 | geniocb->iocb_cmpl = cmpl; | 349 | geniocb->iocb_cmpl = cmpl; |
350 | geniocb->drvrTimeout = icmd->ulpTimeout + LPFC_DRVR_TIMEOUT; | 350 | geniocb->drvrTimeout = icmd->ulpTimeout + LPFC_DRVR_TIMEOUT; |
351 | geniocb->vport = vport; | 351 | geniocb->vport = vport; |
@@ -464,14 +464,13 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint32_t Size) | |||
464 | Did, ndlp->nlp_flag, | 464 | Did, ndlp->nlp_flag, |
465 | vport->fc_flag); | 465 | vport->fc_flag); |
466 | 466 | ||
467 | lpfc_printf_log(phba, KERN_INFO, | 467 | lpfc_printf_vlog(vport, |
468 | KERN_INFO, | ||
468 | LOG_DISCOVERY, | 469 | LOG_DISCOVERY, |
469 | "%d (%d):0238 Process " | 470 | "0238 Process " |
470 | "x%x NameServer Rsp" | 471 | "x%x NameServer Rsp" |
471 | "Data: x%x x%x x%x\n", | 472 | "Data: x%x x%x x%x\n", |
472 | phba->brd_no, | 473 | Did, ndlp->nlp_flag, |
473 | vport->vpi, Did, | ||
474 | ndlp->nlp_flag, | ||
475 | vport->fc_flag, | 474 | vport->fc_flag, |
476 | vport->fc_rscn_id_cnt); | 475 | vport->fc_rscn_id_cnt); |
477 | } else { | 476 | } else { |
@@ -482,14 +481,13 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint32_t Size) | |||
482 | Did, vport->fc_flag, | 481 | Did, vport->fc_flag, |
483 | vport->fc_rscn_id_cnt); | 482 | vport->fc_rscn_id_cnt); |
484 | 483 | ||
485 | lpfc_printf_log(phba, KERN_INFO, | 484 | lpfc_printf_vlog(vport, |
485 | KERN_INFO, | ||
486 | LOG_DISCOVERY, | 486 | LOG_DISCOVERY, |
487 | "%d (%d):0239 Skip x%x " | 487 | "0239 Skip x%x " |
488 | "NameServer Rsp Data: " | 488 | "NameServer Rsp Data: " |
489 | "x%x x%x\n", | 489 | "x%x x%x\n", |
490 | phba->brd_no, | 490 | Did, vport->fc_flag, |
491 | vport->vpi, Did, | ||
492 | vport->fc_flag, | ||
493 | vport->fc_rscn_id_cnt); | 491 | vport->fc_rscn_id_cnt); |
494 | } | 492 | } |
495 | 493 | ||
@@ -516,14 +514,13 @@ lpfc_ns_rsp(struct lpfc_vport *vport, struct lpfc_dmabuf *mp, uint32_t Size) | |||
516 | Did, vport->fc_flag, | 514 | Did, vport->fc_flag, |
517 | vport->fc_rscn_id_cnt); | 515 | vport->fc_rscn_id_cnt); |
518 | 516 | ||
519 | lpfc_printf_log(phba, KERN_INFO, | 517 | lpfc_printf_vlog(vport, |
518 | KERN_INFO, | ||
520 | LOG_DISCOVERY, | 519 | LOG_DISCOVERY, |
521 | "%d (%d):0245 Skip x%x " | 520 | "0245 Skip x%x " |
522 | "NameServer Rsp Data: " | 521 | "NameServer Rsp Data: " |
523 | "x%x x%x\n", | 522 | "x%x x%x\n", |
524 | phba->brd_no, | 523 | Did, vport->fc_flag, |
525 | vport->vpi, Did, | ||
526 | vport->fc_flag, | ||
527 | vport->fc_rscn_id_cnt); | 524 | vport->fc_rscn_id_cnt); |
528 | } | 525 | } |
529 | } | 526 | } |
@@ -570,9 +567,8 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
570 | 567 | ||
571 | 568 | ||
572 | if (lpfc_els_chk_latt(vport) || lpfc_error_lost_link(irsp)) { | 569 | if (lpfc_els_chk_latt(vport) || lpfc_error_lost_link(irsp)) { |
573 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 570 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
574 | "%d (%d):0216 Link event during NS query\n", | 571 | "0216 Link event during NS query\n"); |
575 | phba->brd_no, vport->vpi); | ||
576 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 572 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
577 | goto out; | 573 | goto out; |
578 | } | 574 | } |
@@ -590,20 +586,17 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
590 | goto out; | 586 | goto out; |
591 | } | 587 | } |
592 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 588 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
593 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 589 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
594 | "%d (%d):0257 GID_FT Query error: 0x%x 0x%x\n", | 590 | "0257 GID_FT Query error: 0x%x 0x%x\n", |
595 | phba->brd_no, vport->vpi, irsp->ulpStatus, | 591 | irsp->ulpStatus, vport->fc_ns_retry); |
596 | vport->fc_ns_retry); | ||
597 | } else { | 592 | } else { |
598 | /* Good status, continue checking */ | 593 | /* Good status, continue checking */ |
599 | CTrsp = (struct lpfc_sli_ct_request *) outp->virt; | 594 | CTrsp = (struct lpfc_sli_ct_request *) outp->virt; |
600 | if (CTrsp->CommandResponse.bits.CmdRsp == | 595 | if (CTrsp->CommandResponse.bits.CmdRsp == |
601 | be16_to_cpu(SLI_CT_RESPONSE_FS_ACC)) { | 596 | be16_to_cpu(SLI_CT_RESPONSE_FS_ACC)) { |
602 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 597 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
603 | "%d (%d):0208 NameServer Rsp " | 598 | "0208 NameServer Rsp Data: x%x\n", |
604 | "Data: x%x\n", | 599 | vport->fc_flag); |
605 | phba->brd_no, vport->vpi, | ||
606 | vport->fc_flag); | ||
607 | lpfc_ns_rsp(vport, outp, | 600 | lpfc_ns_rsp(vport, outp, |
608 | (uint32_t) (irsp->un.genreq64.bdl.bdeSize)); | 601 | (uint32_t) (irsp->un.genreq64.bdl.bdeSize)); |
609 | } else if (CTrsp->CommandResponse.bits.CmdRsp == | 602 | } else if (CTrsp->CommandResponse.bits.CmdRsp == |
@@ -611,10 +604,10 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
611 | /* NameServer Rsp Error */ | 604 | /* NameServer Rsp Error */ |
612 | if ((CTrsp->ReasonCode == SLI_CT_UNABLE_TO_PERFORM_REQ) | 605 | if ((CTrsp->ReasonCode == SLI_CT_UNABLE_TO_PERFORM_REQ) |
613 | && (CTrsp->Explanation == SLI_CT_NO_FC4_TYPES)) { | 606 | && (CTrsp->Explanation == SLI_CT_NO_FC4_TYPES)) { |
614 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 607 | lpfc_printf_vlog(vport, KERN_INFO, |
615 | "%d (%d):0269 No NameServer Entries " | 608 | LOG_DISCOVERY, |
609 | "0269 No NameServer Entries " | ||
616 | "Data: x%x x%x x%x x%x\n", | 610 | "Data: x%x x%x x%x x%x\n", |
617 | phba->brd_no, vport->vpi, | ||
618 | CTrsp->CommandResponse.bits.CmdRsp, | 611 | CTrsp->CommandResponse.bits.CmdRsp, |
619 | (uint32_t) CTrsp->ReasonCode, | 612 | (uint32_t) CTrsp->ReasonCode, |
620 | (uint32_t) CTrsp->Explanation, | 613 | (uint32_t) CTrsp->Explanation, |
@@ -625,12 +618,11 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
625 | (uint32_t)CTrsp->CommandResponse.bits.CmdRsp, | 618 | (uint32_t)CTrsp->CommandResponse.bits.CmdRsp, |
626 | (uint32_t) CTrsp->ReasonCode, | 619 | (uint32_t) CTrsp->ReasonCode, |
627 | (uint32_t) CTrsp->Explanation); | 620 | (uint32_t) CTrsp->Explanation); |
628 | } | 621 | } else { |
629 | else { | 622 | lpfc_printf_vlog(vport, KERN_INFO, |
630 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 623 | LOG_DISCOVERY, |
631 | "%d (%d):0240 NameServer Rsp Error " | 624 | "0240 NameServer Rsp Error " |
632 | "Data: x%x x%x x%x x%x\n", | 625 | "Data: x%x x%x x%x x%x\n", |
633 | phba->brd_no, vport->vpi, | ||
634 | CTrsp->CommandResponse.bits.CmdRsp, | 626 | CTrsp->CommandResponse.bits.CmdRsp, |
635 | (uint32_t) CTrsp->ReasonCode, | 627 | (uint32_t) CTrsp->ReasonCode, |
636 | (uint32_t) CTrsp->Explanation, | 628 | (uint32_t) CTrsp->Explanation, |
@@ -646,10 +638,9 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
646 | 638 | ||
647 | } else { | 639 | } else { |
648 | /* NameServer Rsp Error */ | 640 | /* NameServer Rsp Error */ |
649 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 641 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
650 | "%d (%d):0241 NameServer Rsp Error " | 642 | "0241 NameServer Rsp Error " |
651 | "Data: x%x x%x x%x x%x\n", | 643 | "Data: x%x x%x x%x x%x\n", |
652 | phba->brd_no, vport->vpi, | ||
653 | CTrsp->CommandResponse.bits.CmdRsp, | 644 | CTrsp->CommandResponse.bits.CmdRsp, |
654 | (uint32_t) CTrsp->ReasonCode, | 645 | (uint32_t) CTrsp->ReasonCode, |
655 | (uint32_t) CTrsp->Explanation, | 646 | (uint32_t) CTrsp->Explanation, |
@@ -717,40 +708,37 @@ lpfc_cmpl_ct_cmd_gff_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
717 | be16_to_cpu(SLI_CT_RESPONSE_FS_ACC)) { | 708 | be16_to_cpu(SLI_CT_RESPONSE_FS_ACC)) { |
718 | if ((fbits & FC4_FEATURE_INIT) && | 709 | if ((fbits & FC4_FEATURE_INIT) && |
719 | !(fbits & FC4_FEATURE_TARGET)) { | 710 | !(fbits & FC4_FEATURE_TARGET)) { |
720 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 711 | lpfc_printf_vlog(vport, KERN_INFO, |
721 | "%d (%d):0270 Skip x%x GFF " | 712 | LOG_DISCOVERY, |
722 | "NameServer Rsp Data: (init) " | 713 | "0270 Skip x%x GFF " |
723 | "x%x x%x\n", phba->brd_no, | 714 | "NameServer Rsp Data: (init) " |
724 | vport->vpi, did, fbits, | 715 | "x%x x%x\n", did, fbits, |
725 | vport->fc_rscn_id_cnt); | 716 | vport->fc_rscn_id_cnt); |
726 | goto out; | 717 | goto out; |
727 | } | 718 | } |
728 | } | 719 | } |
729 | } | 720 | } |
730 | else { | 721 | else { |
731 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 722 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
732 | "%d (%d):0267 NameServer GFF Rsp" | 723 | "0267 NameServer GFF Rsp " |
733 | " x%x Error (%d %d) Data: x%x x%x\n", | 724 | "x%x Error (%d %d) Data: x%x x%x\n", |
734 | phba->brd_no, vport->vpi, did, | 725 | did, irsp->ulpStatus, irsp->un.ulpWord[4], |
735 | irsp->ulpStatus, irsp->un.ulpWord[4], | 726 | vport->fc_flag, vport->fc_rscn_id_cnt) |
736 | vport->fc_flag, vport->fc_rscn_id_cnt) | ||
737 | } | 727 | } |
738 | 728 | ||
739 | /* This is a target port, unregistered port, or the GFF_ID failed */ | 729 | /* This is a target port, unregistered port, or the GFF_ID failed */ |
740 | ndlp = lpfc_setup_disc_node(vport, did); | 730 | ndlp = lpfc_setup_disc_node(vport, did); |
741 | if (ndlp) { | 731 | if (ndlp) { |
742 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 732 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
743 | "%d (%d):0242 Process x%x GFF " | 733 | "0242 Process x%x GFF " |
744 | "NameServer Rsp Data: x%x x%x x%x\n", | 734 | "NameServer Rsp Data: x%x x%x x%x\n", |
745 | phba->brd_no, vport->vpi, | 735 | did, ndlp->nlp_flag, vport->fc_flag, |
746 | did, ndlp->nlp_flag, vport->fc_flag, | 736 | vport->fc_rscn_id_cnt); |
747 | vport->fc_rscn_id_cnt); | ||
748 | } else { | 737 | } else { |
749 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 738 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
750 | "%d (%d):0243 Skip x%x GFF " | 739 | "0243 Skip x%x GFF " |
751 | "NameServer Rsp Data: x%x x%x\n", | 740 | "NameServer Rsp Data: x%x x%x\n", did, |
752 | phba->brd_no, vport->vpi, did, | 741 | vport->fc_flag, vport->fc_rscn_id_cnt); |
753 | vport->fc_flag, vport->fc_rscn_id_cnt); | ||
754 | } | 742 | } |
755 | out: | 743 | out: |
756 | /* Link up / RSCN discovery */ | 744 | /* Link up / RSCN discovery */ |
@@ -806,22 +794,21 @@ lpfc_cmpl_ct_cmd_rft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
806 | latt = lpfc_els_chk_latt(vport); | 794 | latt = lpfc_els_chk_latt(vport); |
807 | 795 | ||
808 | /* RFT request completes status <ulpStatus> CmdRsp <CmdRsp> */ | 796 | /* RFT request completes status <ulpStatus> CmdRsp <CmdRsp> */ |
809 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 797 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
810 | "%d (%d):0209 RFT request completes, latt %d, " | 798 | "0209 RFT request completes, latt %d, " |
811 | "ulpStatus x%x CmdRsp x%x, Context x%x, Tag x%x\n", | 799 | "ulpStatus x%x CmdRsp x%x, Context x%x, Tag x%x\n", |
812 | phba->brd_no, vport->vpi, latt, irsp->ulpStatus, | 800 | latt, irsp->ulpStatus, |
813 | CTrsp->CommandResponse.bits.CmdRsp, | 801 | CTrsp->CommandResponse.bits.CmdRsp, |
814 | cmdiocb->iocb.ulpContext, cmdiocb->iocb.ulpIoTag); | 802 | cmdiocb->iocb.ulpContext, cmdiocb->iocb.ulpIoTag); |
815 | 803 | ||
816 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, | 804 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_CT, |
817 | "CT cmd cmpl: status:x%x/x%x cmd:x%x", | 805 | "CT cmd cmpl: status:x%x/x%x cmd:x%x", |
818 | irsp->ulpStatus, irsp->un.ulpWord[4], cmdcode); | 806 | irsp->ulpStatus, irsp->un.ulpWord[4], cmdcode); |
819 | 807 | ||
820 | if (irsp->ulpStatus) { | 808 | if (irsp->ulpStatus) { |
821 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 809 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
822 | "%d (%d):0268 NS cmd %x Error (%d %d)\n", | 810 | "0268 NS cmd %x Error (%d %d)\n", |
823 | phba->brd_no, vport->vpi, cmdcode, | 811 | cmdcode, irsp->ulpStatus, irsp->un.ulpWord[4]); |
824 | irsp->ulpStatus, irsp->un.ulpWord[4]); | ||
825 | 812 | ||
826 | if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) && | 813 | if ((irsp->ulpStatus == IOSTAT_LOCAL_REJECT) && |
827 | ((irsp->un.ulpWord[4] == IOERR_SLI_DOWN) || | 814 | ((irsp->un.ulpWord[4] == IOERR_SLI_DOWN) || |
@@ -833,9 +820,8 @@ lpfc_cmpl_ct_cmd_rft_id(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
833 | goto out; | 820 | goto out; |
834 | 821 | ||
835 | retry++; | 822 | retry++; |
836 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 823 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
837 | "%d (%d):0216 Retrying NS cmd %x\n", | 824 | "0216 Retrying NS cmd %x\n", cmdcode); |
838 | phba->brd_no, vport->vpi, cmdcode); | ||
839 | rc = lpfc_ns_cmd(vport, cmdcode, retry, 0); | 825 | rc = lpfc_ns_cmd(vport, cmdcode, retry, 0); |
840 | if (rc == 0) | 826 | if (rc == 0) |
841 | goto out; | 827 | goto out; |
@@ -979,10 +965,9 @@ lpfc_ns_cmd(struct lpfc_vport *vport, int cmdcode, | |||
979 | } | 965 | } |
980 | 966 | ||
981 | /* NameServer Req */ | 967 | /* NameServer Req */ |
982 | lpfc_printf_log(phba, KERN_INFO ,LOG_DISCOVERY, | 968 | lpfc_printf_vlog(vport, KERN_INFO ,LOG_DISCOVERY, |
983 | "%d (%d):0236 NameServer Req Data: x%x x%x x%x\n", | 969 | "0236 NameServer Req Data: x%x x%x x%x\n", |
984 | phba->brd_no, vport->vpi, cmdcode, vport->fc_flag, | 970 | cmdcode, vport->fc_flag, vport->fc_rscn_id_cnt); |
985 | vport->fc_rscn_id_cnt); | ||
986 | 971 | ||
987 | bpl = (struct ulp_bde64 *) bmp->virt; | 972 | bpl = (struct ulp_bde64 *) bmp->virt; |
988 | memset(bpl, 0, sizeof(struct ulp_bde64)); | 973 | memset(bpl, 0, sizeof(struct ulp_bde64)); |
@@ -1099,10 +1084,9 @@ ns_cmd_free_mpvirt: | |||
1099 | ns_cmd_free_mp: | 1084 | ns_cmd_free_mp: |
1100 | kfree(mp); | 1085 | kfree(mp); |
1101 | ns_cmd_exit: | 1086 | ns_cmd_exit: |
1102 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 1087 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
1103 | "%d (%d):0266 Issue NameServer Req x%x err %d Data: x%x x%x\n", | 1088 | "0266 Issue NameServer Req x%x err %d Data: x%x x%x\n", |
1104 | phba->brd_no, vport->vpi, cmdcode, rc, vport->fc_flag, | 1089 | cmdcode, rc, vport->fc_flag, vport->fc_rscn_id_cnt); |
1105 | vport->fc_rscn_id_cnt); | ||
1106 | return 1; | 1090 | return 1; |
1107 | } | 1091 | } |
1108 | 1092 | ||
@@ -1128,12 +1112,11 @@ lpfc_cmpl_ct_cmd_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1128 | irsp->ulpStatus, irsp->un.ulpWord[4], latt); | 1112 | irsp->ulpStatus, irsp->un.ulpWord[4], latt); |
1129 | 1113 | ||
1130 | if (latt || irsp->ulpStatus) { | 1114 | if (latt || irsp->ulpStatus) { |
1131 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1115 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1132 | "%d (%d):0229 FDMI cmd %04x failed, latt = %d " | 1116 | "0229 FDMI cmd %04x failed, latt = %d " |
1133 | "ulpStatus: x%x, rid x%x\n", | 1117 | "ulpStatus: x%x, rid x%x\n", |
1134 | phba->brd_no, vport->vpi, | 1118 | be16_to_cpu(fdmi_cmd), latt, irsp->ulpStatus, |
1135 | be16_to_cpu(fdmi_cmd), latt, irsp->ulpStatus, | 1119 | irsp->un.ulpWord[4]); |
1136 | irsp->un.ulpWord[4]); | ||
1137 | lpfc_ct_free_iocb(phba, cmdiocb); | 1120 | lpfc_ct_free_iocb(phba, cmdiocb); |
1138 | return; | 1121 | return; |
1139 | } | 1122 | } |
@@ -1141,10 +1124,9 @@ lpfc_cmpl_ct_cmd_fdmi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1141 | ndlp = lpfc_findnode_did(vport, FDMI_DID); | 1124 | ndlp = lpfc_findnode_did(vport, FDMI_DID); |
1142 | if (fdmi_rsp == be16_to_cpu(SLI_CT_RESPONSE_FS_RJT)) { | 1125 | if (fdmi_rsp == be16_to_cpu(SLI_CT_RESPONSE_FS_RJT)) { |
1143 | /* FDMI rsp failed */ | 1126 | /* FDMI rsp failed */ |
1144 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1127 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1145 | "%d (%d):0220 FDMI rsp failed Data: x%x\n", | 1128 | "0220 FDMI rsp failed Data: x%x\n", |
1146 | phba->brd_no, vport->vpi, | 1129 | be16_to_cpu(fdmi_cmd)); |
1147 | be16_to_cpu(fdmi_cmd)); | ||
1148 | } | 1130 | } |
1149 | 1131 | ||
1150 | switch (be16_to_cpu(fdmi_cmd)) { | 1132 | switch (be16_to_cpu(fdmi_cmd)) { |
@@ -1207,11 +1189,9 @@ lpfc_fdmi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, int cmdcode) | |||
1207 | INIT_LIST_HEAD(&bmp->list); | 1189 | INIT_LIST_HEAD(&bmp->list); |
1208 | 1190 | ||
1209 | /* FDMI request */ | 1191 | /* FDMI request */ |
1210 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1192 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1211 | "%d (%d):0218 FDMI Request Data: x%x x%x x%x\n", | 1193 | "0218 FDMI Request Data: x%x x%x x%x\n", |
1212 | phba->brd_no, vport->vpi, vport->fc_flag, | 1194 | vport->fc_flag, vport->port_state, cmdcode); |
1213 | vport->port_state, cmdcode); | ||
1214 | |||
1215 | CtReq = (struct lpfc_sli_ct_request *) mp->virt; | 1195 | CtReq = (struct lpfc_sli_ct_request *) mp->virt; |
1216 | 1196 | ||
1217 | memset(CtReq, 0, sizeof(struct lpfc_sli_ct_request)); | 1197 | memset(CtReq, 0, sizeof(struct lpfc_sli_ct_request)); |
@@ -1534,9 +1514,9 @@ fdmi_cmd_free_mp: | |||
1534 | kfree(mp); | 1514 | kfree(mp); |
1535 | fdmi_cmd_exit: | 1515 | fdmi_cmd_exit: |
1536 | /* Issue FDMI request failed */ | 1516 | /* Issue FDMI request failed */ |
1537 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1517 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1538 | "%d (%d):0244 Issue FDMI request failed Data: x%x\n", | 1518 | "0244 Issue FDMI request failed Data: x%x\n", |
1539 | phba->brd_no, vport->vpi, cmdcode); | 1519 | cmdcode); |
1540 | return 1; | 1520 | return 1; |
1541 | } | 1521 | } |
1542 | 1522 | ||
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c index 2310a2d1d8ce..dc7b858b95fa 100644 --- a/drivers/scsi/lpfc/lpfc_debugfs.c +++ b/drivers/scsi/lpfc/lpfc_debugfs.c | |||
@@ -642,13 +642,11 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
642 | lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL); | 642 | lpfc_debugfs_root = debugfs_create_dir("lpfc", NULL); |
643 | atomic_set(&lpfc_debugfs_hba_count, 0); | 643 | atomic_set(&lpfc_debugfs_hba_count, 0); |
644 | if (!lpfc_debugfs_root) { | 644 | if (!lpfc_debugfs_root) { |
645 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 645 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
646 | "%d:0409 Cannot create debugfs root (lpfc)", | 646 | "0409 Cannot create debugfs root\n"); |
647 | phba->brd_no); | ||
648 | goto debug_failed; | 647 | goto debug_failed; |
649 | } | 648 | } |
650 | } | 649 | } |
651 | |||
652 | if (!lpfc_debugfs_start_time) | 650 | if (!lpfc_debugfs_start_time) |
653 | lpfc_debugfs_start_time = jiffies; | 651 | lpfc_debugfs_start_time = jiffies; |
654 | 652 | ||
@@ -658,9 +656,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
658 | phba->hba_debugfs_root = | 656 | phba->hba_debugfs_root = |
659 | debugfs_create_dir(name, lpfc_debugfs_root); | 657 | debugfs_create_dir(name, lpfc_debugfs_root); |
660 | if (!phba->hba_debugfs_root) { | 658 | if (!phba->hba_debugfs_root) { |
661 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 659 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
662 | "%d:0409 Cannot create debugfs hba (lpfc%d)", | 660 | "0409 Cannot create debugfs hba\n"); |
663 | phba->brd_no, phba->brd_no); | ||
664 | goto debug_failed; | 661 | goto debug_failed; |
665 | } | 662 | } |
666 | atomic_inc(&lpfc_debugfs_hba_count); | 663 | atomic_inc(&lpfc_debugfs_hba_count); |
@@ -673,9 +670,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
673 | phba->hba_debugfs_root, | 670 | phba->hba_debugfs_root, |
674 | phba, &lpfc_debugfs_op_dumpslim); | 671 | phba, &lpfc_debugfs_op_dumpslim); |
675 | if (!phba->debug_dumpslim) { | 672 | if (!phba->debug_dumpslim) { |
676 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 673 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
677 | "%d:0409 Cannot create debugfs dumpslim (lpfc%d)", | 674 | "0409 Cannot create debugfs dumpslim\n"); |
678 | phba->brd_no, phba->brd_no); | ||
679 | goto debug_failed; | 675 | goto debug_failed; |
680 | } | 676 | } |
681 | 677 | ||
@@ -692,8 +688,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
692 | } | 688 | } |
693 | lpfc_debugfs_max_slow_ring_trc = (1 << i); | 689 | lpfc_debugfs_max_slow_ring_trc = (1 << i); |
694 | printk(KERN_ERR | 690 | printk(KERN_ERR |
695 | "lpfc_debugfs_max_slow_ring_trc change to %d\n", | 691 | "lpfc_debugfs_max_disc_trc changed to " |
696 | lpfc_debugfs_max_slow_ring_trc); | 692 | "%d\n", lpfc_debugfs_max_disc_trc); |
697 | } | 693 | } |
698 | } | 694 | } |
699 | 695 | ||
@@ -704,10 +700,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
704 | phba->hba_debugfs_root, | 700 | phba->hba_debugfs_root, |
705 | phba, &lpfc_debugfs_op_slow_ring_trc); | 701 | phba, &lpfc_debugfs_op_slow_ring_trc); |
706 | if (!phba->debug_slow_ring_trc) { | 702 | if (!phba->debug_slow_ring_trc) { |
707 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 703 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
708 | "%d:0409 Cannot create debugfs " | 704 | "0409 Cannot create debugfs " |
709 | "slow_ring_trace (lpfc%d)", | 705 | "slow_ring_trace\n"); |
710 | phba->brd_no, phba->brd_no); | ||
711 | goto debug_failed; | 706 | goto debug_failed; |
712 | } | 707 | } |
713 | if (!phba->slow_ring_trc) { | 708 | if (!phba->slow_ring_trc) { |
@@ -716,10 +711,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
716 | lpfc_debugfs_max_slow_ring_trc), | 711 | lpfc_debugfs_max_slow_ring_trc), |
717 | GFP_KERNEL); | 712 | GFP_KERNEL); |
718 | if (!phba->slow_ring_trc) { | 713 | if (!phba->slow_ring_trc) { |
719 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 714 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
720 | "%d:0409 Cannot create debugfs " | 715 | "0409 Cannot create debugfs " |
721 | "slow_ring buffer (lpfc%d)", | 716 | "slow_ring buffer\n"); |
722 | phba->brd_no, phba->brd_no); | ||
723 | goto debug_failed; | 717 | goto debug_failed; |
724 | } | 718 | } |
725 | atomic_set(&phba->slow_ring_trc_cnt, 0); | 719 | atomic_set(&phba->slow_ring_trc_cnt, 0); |
@@ -734,9 +728,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
734 | vport->vport_debugfs_root = | 728 | vport->vport_debugfs_root = |
735 | debugfs_create_dir(name, phba->hba_debugfs_root); | 729 | debugfs_create_dir(name, phba->hba_debugfs_root); |
736 | if (!vport->vport_debugfs_root) { | 730 | if (!vport->vport_debugfs_root) { |
737 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 731 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
738 | "%d:0409 Cant create debugfs vport%d (lpfc%d)", | 732 | "0409 Cant create debugfs"); |
739 | phba->brd_no, vport->vpi, phba->brd_no); | ||
740 | goto debug_failed; | 733 | goto debug_failed; |
741 | } | 734 | } |
742 | atomic_inc(&phba->debugfs_vport_count); | 735 | atomic_inc(&phba->debugfs_vport_count); |
@@ -754,8 +747,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
754 | } | 747 | } |
755 | lpfc_debugfs_max_disc_trc = (1 << i); | 748 | lpfc_debugfs_max_disc_trc = (1 << i); |
756 | printk(KERN_ERR | 749 | printk(KERN_ERR |
757 | "lpfc_debugfs_max_disc_trc changed to %d\n", | 750 | "lpfc_debugfs_max_disc_trc changed to %d\n", |
758 | lpfc_debugfs_max_disc_trc); | 751 | lpfc_debugfs_max_disc_trc); |
759 | } | 752 | } |
760 | } | 753 | } |
761 | 754 | ||
@@ -764,10 +757,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
764 | GFP_KERNEL); | 757 | GFP_KERNEL); |
765 | 758 | ||
766 | if (!vport->disc_trc) { | 759 | if (!vport->disc_trc) { |
767 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 760 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
768 | "%d:0409 Cannot create debugfs " | 761 | "0409 Cannot create debugfs disc trace " |
769 | "vport%d disc trace buffer (lpfc%d)", | 762 | "buffer\n"); |
770 | phba->brd_no, vport->vpi, phba->brd_no); | ||
771 | goto debug_failed; | 763 | goto debug_failed; |
772 | } | 764 | } |
773 | atomic_set(&vport->disc_trc_cnt, 0); | 765 | atomic_set(&vport->disc_trc_cnt, 0); |
@@ -780,10 +772,9 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
780 | vport->vport_debugfs_root, | 772 | vport->vport_debugfs_root, |
781 | vport, &lpfc_debugfs_op_disc_trc); | 773 | vport, &lpfc_debugfs_op_disc_trc); |
782 | if (!vport->debug_disc_trc) { | 774 | if (!vport->debug_disc_trc) { |
783 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 775 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
784 | "%d:0409 Cannot create debugfs " | 776 | "0409 Cannot create debugfs " |
785 | "vport%d discovery_trace (lpfc%d)", | 777 | "discovery_trace\n"); |
786 | phba->brd_no, vport->vpi, phba->brd_no); | ||
787 | goto debug_failed; | 778 | goto debug_failed; |
788 | } | 779 | } |
789 | snprintf(name, sizeof(name), "nodelist"); | 780 | snprintf(name, sizeof(name), "nodelist"); |
@@ -792,9 +783,8 @@ lpfc_debugfs_initialize(struct lpfc_vport *vport) | |||
792 | vport->vport_debugfs_root, | 783 | vport->vport_debugfs_root, |
793 | vport, &lpfc_debugfs_op_nodelist); | 784 | vport, &lpfc_debugfs_op_nodelist); |
794 | if (!vport->debug_nodelist) { | 785 | if (!vport->debug_nodelist) { |
795 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 786 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT, |
796 | "%d:0409 Cant create debugfs vport%d nodelist (lpfc%d)", | 787 | "0409 Cant create debugfs nodelist"); |
797 | phba->brd_no, vport->vpi, phba->brd_no); | ||
798 | goto debug_failed; | 788 | goto debug_failed; |
799 | } | 789 | } |
800 | debug_failed: | 790 | debug_failed: |
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 4aed0cffe92f..9365e19696e2 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -63,10 +63,10 @@ lpfc_els_chk_latt(struct lpfc_vport *vport) | |||
63 | return 0; | 63 | return 0; |
64 | 64 | ||
65 | /* Pending Link Event during Discovery */ | 65 | /* Pending Link Event during Discovery */ |
66 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 66 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
67 | "%d (%d):0237 Pending Link Event during " | 67 | "0237 Pending Link Event during " |
68 | "Discovery: State x%x\n", | 68 | "Discovery: State x%x\n", |
69 | phba->brd_no, vport->vpi, phba->pport->port_state); | 69 | phba->pport->port_state); |
70 | 70 | ||
71 | /* CLEAR_LA should re-enable link attention events and | 71 | /* CLEAR_LA should re-enable link attention events and |
72 | * we should then imediately take a LATT event. The | 72 | * we should then imediately take a LATT event. The |
@@ -208,23 +208,21 @@ lpfc_prep_els_iocb(struct lpfc_vport *vport, uint8_t expectRsp, | |||
208 | if (prsp) { | 208 | if (prsp) { |
209 | list_add(&prsp->list, &pcmd->list); | 209 | list_add(&prsp->list, &pcmd->list); |
210 | } | 210 | } |
211 | |||
212 | if (expectRsp) { | 211 | if (expectRsp) { |
213 | /* Xmit ELS command <elsCmd> to remote NPORT <did> */ | 212 | /* Xmit ELS command <elsCmd> to remote NPORT <did> */ |
214 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 213 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
215 | "%d (%d):0116 Xmit ELS command x%x to remote " | 214 | "0116 Xmit ELS command x%x to remote " |
216 | "NPORT x%x I/O tag: x%x, port state: x%x\n", | 215 | "NPORT x%x I/O tag: x%x, port state: x%x\n", |
217 | phba->brd_no, vport->vpi, elscmd, did, | 216 | elscmd, did, elsiocb->iotag, |
218 | elsiocb->iotag, vport->port_state); | 217 | vport->port_state); |
219 | } else { | 218 | } else { |
220 | /* Xmit ELS response <elsCmd> to remote NPORT <did> */ | 219 | /* Xmit ELS response <elsCmd> to remote NPORT <did> */ |
221 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 220 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
222 | "%d (%d):0117 Xmit ELS response x%x to remote " | 221 | "0117 Xmit ELS response x%x to remote " |
223 | "NPORT x%x I/O tag: x%x, size: x%x\n", | 222 | "NPORT x%x I/O tag: x%x, size: x%x\n", |
224 | phba->brd_no, vport->vpi, elscmd, | 223 | elscmd, ndlp->nlp_DID, elsiocb->iotag, |
225 | ndlp->nlp_DID, elsiocb->iotag, cmdSize); | 224 | cmdSize); |
226 | } | 225 | } |
227 | |||
228 | return elsiocb; | 226 | return elsiocb; |
229 | } | 227 | } |
230 | 228 | ||
@@ -285,9 +283,8 @@ fail_free_mbox: | |||
285 | 283 | ||
286 | fail: | 284 | fail: |
287 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 285 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
288 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 286 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
289 | "%d (%d):0249 Cannot issue Register Fabric login\n", | 287 | "0249 Cannot issue Register Fabric login\n"); |
290 | phba->brd_no, vport->vpi); | ||
291 | return -ENXIO; | 288 | return -ENXIO; |
292 | } | 289 | } |
293 | 290 | ||
@@ -340,20 +337,19 @@ lpfc_cmpl_els_flogi_fabric(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
340 | 337 | ||
341 | if (phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) { | 338 | if (phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) { |
342 | if (sp->cmn.response_multiple_NPort) { | 339 | if (sp->cmn.response_multiple_NPort) { |
343 | lpfc_printf_log(phba, KERN_WARNING, LOG_ELS | LOG_VPORT, | 340 | lpfc_printf_vlog(vport, KERN_WARNING, |
344 | "%d:1816 FLOGI NPIV supported, " | 341 | LOG_ELS | LOG_VPORT, |
345 | "response data 0x%x\n", | 342 | "1816 FLOGI NPIV supported, " |
346 | phba->brd_no, | 343 | "response data 0x%x\n", |
347 | sp->cmn.response_multiple_NPort); | 344 | sp->cmn.response_multiple_NPort); |
348 | phba->link_flag |= LS_NPIV_FAB_SUPPORTED; | 345 | phba->link_flag |= LS_NPIV_FAB_SUPPORTED; |
349 | |||
350 | } else { | 346 | } else { |
351 | /* Because we asked f/w for NPIV it still expects us | 347 | /* Because we asked f/w for NPIV it still expects us |
352 | to call reg_vnpid atleast for the physcial host */ | 348 | to call reg_vnpid atleast for the physcial host */ |
353 | lpfc_printf_log(phba, KERN_WARNING, LOG_ELS | LOG_VPORT, | 349 | lpfc_printf_vlog(vport, KERN_WARNING, |
354 | "%d:1817 Fabric does not support NPIV " | 350 | LOG_ELS | LOG_VPORT, |
355 | "- configuring single port mode.\n", | 351 | "1817 Fabric does not support NPIV " |
356 | phba->brd_no); | 352 | "- configuring single port mode.\n"); |
357 | phba->link_flag &= ~LS_NPIV_FAB_SUPPORTED; | 353 | phba->link_flag &= ~LS_NPIV_FAB_SUPPORTED; |
358 | } | 354 | } |
359 | } | 355 | } |
@@ -522,12 +518,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
522 | } | 518 | } |
523 | 519 | ||
524 | /* FLOGI failure */ | 520 | /* FLOGI failure */ |
525 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 521 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
526 | "%d (%d):0100 FLOGI failure Data: x%x x%x " | 522 | "0100 FLOGI failure Data: x%x x%x " |
527 | "x%x\n", | 523 | "x%x\n", |
528 | phba->brd_no, vport->vpi, | 524 | irsp->ulpStatus, irsp->un.ulpWord[4], |
529 | irsp->ulpStatus, irsp->un.ulpWord[4], | 525 | irsp->ulpTimeout); |
530 | irsp->ulpTimeout); | ||
531 | goto flogifail; | 526 | goto flogifail; |
532 | } | 527 | } |
533 | 528 | ||
@@ -540,12 +535,11 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
540 | sp = prsp->virt + sizeof(uint32_t); | 535 | sp = prsp->virt + sizeof(uint32_t); |
541 | 536 | ||
542 | /* FLOGI completes successfully */ | 537 | /* FLOGI completes successfully */ |
543 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 538 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
544 | "%d (%d):0101 FLOGI completes sucessfully " | 539 | "0101 FLOGI completes sucessfully " |
545 | "Data: x%x x%x x%x x%x\n", | 540 | "Data: x%x x%x x%x x%x\n", |
546 | phba->brd_no, vport->vpi, | 541 | irsp->un.ulpWord[4], sp->cmn.e_d_tov, |
547 | irsp->un.ulpWord[4], sp->cmn.e_d_tov, | 542 | sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution); |
548 | sp->cmn.w2.r_a_tov, sp->cmn.edtovResolution); | ||
549 | 543 | ||
550 | if (vport->port_state == LPFC_FLOGI) { | 544 | if (vport->port_state == LPFC_FLOGI) { |
551 | /* | 545 | /* |
@@ -662,8 +656,8 @@ lpfc_els_abort_flogi(struct lpfc_hba *phba) | |||
662 | 656 | ||
663 | /* Abort outstanding I/O on NPort <nlp_DID> */ | 657 | /* Abort outstanding I/O on NPort <nlp_DID> */ |
664 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 658 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, |
665 | "%d:0201 Abort outstanding I/O on NPort x%x\n", | 659 | "0201 Abort outstanding I/O on NPort x%x\n", |
666 | phba->brd_no, Fabric_DID); | 660 | Fabric_DID); |
667 | 661 | ||
668 | pring = &phba->sli.ring[LPFC_ELS_RING]; | 662 | pring = &phba->sli.ring[LPFC_ELS_RING]; |
669 | 663 | ||
@@ -736,18 +730,16 @@ static void | |||
736 | lpfc_more_plogi(struct lpfc_vport *vport) | 730 | lpfc_more_plogi(struct lpfc_vport *vport) |
737 | { | 731 | { |
738 | int sentplogi; | 732 | int sentplogi; |
739 | struct lpfc_hba *phba = vport->phba; | ||
740 | 733 | ||
741 | if (vport->num_disc_nodes) | 734 | if (vport->num_disc_nodes) |
742 | vport->num_disc_nodes--; | 735 | vport->num_disc_nodes--; |
743 | 736 | ||
744 | /* Continue discovery with <num_disc_nodes> PLOGIs to go */ | 737 | /* Continue discovery with <num_disc_nodes> PLOGIs to go */ |
745 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 738 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
746 | "%d (%d):0232 Continue discovery with %d PLOGIs to go " | 739 | "0232 Continue discovery with %d PLOGIs to go " |
747 | "Data: x%x x%x x%x\n", | 740 | "Data: x%x x%x x%x\n", |
748 | phba->brd_no, vport->vpi, vport->num_disc_nodes, | 741 | vport->num_disc_nodes, vport->fc_plogi_cnt, |
749 | vport->fc_plogi_cnt, vport->fc_flag, vport->port_state); | 742 | vport->fc_flag, vport->port_state); |
750 | |||
751 | /* Check to see if there are more PLOGIs to be sent */ | 743 | /* Check to see if there are more PLOGIs to be sent */ |
752 | if (vport->fc_flag & FC_NLP_MORE) | 744 | if (vport->fc_flag & FC_NLP_MORE) |
753 | /* go thru NPR nodes and issue any remaining ELS PLOGIs */ | 745 | /* go thru NPR nodes and issue any remaining ELS PLOGIs */ |
@@ -833,11 +825,12 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
833 | 825 | ||
834 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); | 826 | ndlp = lpfc_findnode_did(vport, irsp->un.elsreq64.remoteID); |
835 | if (!ndlp) { | 827 | if (!ndlp) { |
836 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 828 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
837 | "%d (%d):0136 PLOGI completes to NPort x%x " | 829 | "0136 PLOGI completes to NPort x%x " |
838 | "with no ndlp. Data: x%x x%x x%x\n", | 830 | "with no ndlp. Data: x%x x%x x%x\n", |
839 | phba->brd_no, vport->vpi, irsp->un.elsreq64.remoteID, | 831 | irsp->un.elsreq64.remoteID, |
840 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpIoTag); | 832 | irsp->ulpStatus, irsp->un.ulpWord[4], |
833 | irsp->ulpIoTag); | ||
841 | goto out; | 834 | goto out; |
842 | } | 835 | } |
843 | 836 | ||
@@ -851,13 +844,11 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
851 | rc = 0; | 844 | rc = 0; |
852 | 845 | ||
853 | /* PLOGI completes to NPort <nlp_DID> */ | 846 | /* PLOGI completes to NPort <nlp_DID> */ |
854 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 847 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
855 | "%d (%d):0102 PLOGI completes to NPort x%x " | 848 | "0102 PLOGI completes to NPort x%x " |
856 | "Data: x%x x%x x%x x%x x%x\n", | 849 | "Data: x%x x%x x%x x%x x%x\n", |
857 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 850 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
858 | irsp->ulpStatus, irsp->un.ulpWord[4], | 851 | irsp->ulpTimeout, disc, vport->num_disc_nodes); |
859 | irsp->ulpTimeout, disc, vport->num_disc_nodes); | ||
860 | |||
861 | /* Check to see if link went down during discovery */ | 852 | /* Check to see if link went down during discovery */ |
862 | if (lpfc_els_chk_latt(vport)) { | 853 | if (lpfc_els_chk_latt(vport)) { |
863 | spin_lock_irq(shost->host_lock); | 854 | spin_lock_irq(shost->host_lock); |
@@ -881,17 +872,14 @@ lpfc_cmpl_els_plogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
881 | } | 872 | } |
882 | goto out; | 873 | goto out; |
883 | } | 874 | } |
884 | |||
885 | /* PLOGI failed */ | 875 | /* PLOGI failed */ |
886 | if (ndlp->nlp_DID == NameServer_DID) { | 876 | if (ndlp->nlp_DID == NameServer_DID) { |
887 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 877 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
888 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 878 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
889 | "%d (%d):0250 Nameserver login error: " | 879 | "0250 Nameserver login error: " |
890 | "0x%x / 0x%x\n", | 880 | "0x%x / 0x%x\n", |
891 | phba->brd_no, vport->vpi, | 881 | irsp->ulpStatus, irsp->un.ulpWord[4]); |
892 | irsp->ulpStatus, irsp->un.ulpWord[4]); | ||
893 | } | 882 | } |
894 | |||
895 | /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ | 883 | /* Do not call DSM for lpfc_els_abort'ed ELS cmds */ |
896 | if (lpfc_error_lost_link(irsp)) { | 884 | if (lpfc_error_lost_link(irsp)) { |
897 | rc = NLP_STE_FREED_NODE; | 885 | rc = NLP_STE_FREED_NODE; |
@@ -1017,14 +1005,12 @@ lpfc_cmpl_els_prli(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1017 | "PRLI cmpl: status:x%x/x%x did:x%x", | 1005 | "PRLI cmpl: status:x%x/x%x did:x%x", |
1018 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1006 | irsp->ulpStatus, irsp->un.ulpWord[4], |
1019 | ndlp->nlp_DID); | 1007 | ndlp->nlp_DID); |
1020 | |||
1021 | /* PRLI completes to NPort <nlp_DID> */ | 1008 | /* PRLI completes to NPort <nlp_DID> */ |
1022 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1009 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1023 | "%d (%d):0103 PRLI completes to NPort x%x " | 1010 | "0103 PRLI completes to NPort x%x " |
1024 | "Data: x%x x%x x%x x%x\n", | 1011 | "Data: x%x x%x x%x x%x\n", |
1025 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 1012 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
1026 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpTimeout, | 1013 | irsp->ulpTimeout, vport->num_disc_nodes); |
1027 | vport->num_disc_nodes); | ||
1028 | 1014 | ||
1029 | vport->fc_prli_sent--; | 1015 | vport->fc_prli_sent--; |
1030 | /* Check to see if link went down during discovery */ | 1016 | /* Check to see if link went down during discovery */ |
@@ -1129,18 +1115,15 @@ static void | |||
1129 | lpfc_more_adisc(struct lpfc_vport *vport) | 1115 | lpfc_more_adisc(struct lpfc_vport *vport) |
1130 | { | 1116 | { |
1131 | int sentadisc; | 1117 | int sentadisc; |
1132 | struct lpfc_hba *phba = vport->phba; | ||
1133 | 1118 | ||
1134 | if (vport->num_disc_nodes) | 1119 | if (vport->num_disc_nodes) |
1135 | vport->num_disc_nodes--; | 1120 | vport->num_disc_nodes--; |
1136 | |||
1137 | /* Continue discovery with <num_disc_nodes> ADISCs to go */ | 1121 | /* Continue discovery with <num_disc_nodes> ADISCs to go */ |
1138 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1122 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1139 | "%d (%d):0210 Continue discovery with %d ADISCs to go " | 1123 | "0210 Continue discovery with %d ADISCs to go " |
1140 | "Data: x%x x%x x%x\n", | 1124 | "Data: x%x x%x x%x\n", |
1141 | phba->brd_no, vport->vpi, vport->num_disc_nodes, | 1125 | vport->num_disc_nodes, vport->fc_adisc_cnt, |
1142 | vport->fc_adisc_cnt, vport->fc_flag, vport->port_state); | 1126 | vport->fc_flag, vport->port_state); |
1143 | |||
1144 | /* Check to see if there are more ADISCs to be sent */ | 1127 | /* Check to see if there are more ADISCs to be sent */ |
1145 | if (vport->fc_flag & FC_NLP_MORE) { | 1128 | if (vport->fc_flag & FC_NLP_MORE) { |
1146 | lpfc_set_disctmo(vport); | 1129 | lpfc_set_disctmo(vport); |
@@ -1206,15 +1189,12 @@ lpfc_cmpl_els_adisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1206 | disc = (ndlp->nlp_flag & NLP_NPR_2B_DISC); | 1189 | disc = (ndlp->nlp_flag & NLP_NPR_2B_DISC); |
1207 | ndlp->nlp_flag &= ~(NLP_ADISC_SND | NLP_NPR_2B_DISC); | 1190 | ndlp->nlp_flag &= ~(NLP_ADISC_SND | NLP_NPR_2B_DISC); |
1208 | spin_unlock_irq(shost->host_lock); | 1191 | spin_unlock_irq(shost->host_lock); |
1209 | |||
1210 | /* ADISC completes to NPort <nlp_DID> */ | 1192 | /* ADISC completes to NPort <nlp_DID> */ |
1211 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1193 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1212 | "%d (%d):0104 ADISC completes to NPort x%x " | 1194 | "0104 ADISC completes to NPort x%x " |
1213 | "Data: x%x x%x x%x x%x x%x\n", | 1195 | "Data: x%x x%x x%x x%x x%x\n", |
1214 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 1196 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
1215 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpTimeout, | 1197 | irsp->ulpTimeout, disc, vport->num_disc_nodes); |
1216 | disc, vport->num_disc_nodes); | ||
1217 | |||
1218 | /* Check to see if link went down during discovery */ | 1198 | /* Check to see if link went down during discovery */ |
1219 | if (lpfc_els_chk_latt(vport)) { | 1199 | if (lpfc_els_chk_latt(vport)) { |
1220 | spin_lock_irq(shost->host_lock); | 1200 | spin_lock_irq(shost->host_lock); |
@@ -1374,15 +1354,12 @@ lpfc_cmpl_els_logo(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1374 | "LOGO cmpl: status:x%x/x%x did:x%x", | 1354 | "LOGO cmpl: status:x%x/x%x did:x%x", |
1375 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1355 | irsp->ulpStatus, irsp->un.ulpWord[4], |
1376 | ndlp->nlp_DID); | 1356 | ndlp->nlp_DID); |
1377 | |||
1378 | /* LOGO completes to NPort <nlp_DID> */ | 1357 | /* LOGO completes to NPort <nlp_DID> */ |
1379 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1358 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1380 | "%d (%d):0105 LOGO completes to NPort x%x " | 1359 | "0105 LOGO completes to NPort x%x " |
1381 | "Data: x%x x%x x%x x%x\n", | 1360 | "Data: x%x x%x x%x x%x\n", |
1382 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 1361 | ndlp->nlp_DID, irsp->ulpStatus, irsp->un.ulpWord[4], |
1383 | irsp->ulpStatus, irsp->un.ulpWord[4], irsp->ulpTimeout, | 1362 | irsp->ulpTimeout, vport->num_disc_nodes); |
1384 | vport->num_disc_nodes); | ||
1385 | |||
1386 | /* Check to see if link went down during discovery */ | 1363 | /* Check to see if link went down during discovery */ |
1387 | if (lpfc_els_chk_latt(vport)) | 1364 | if (lpfc_els_chk_latt(vport)) |
1388 | goto out; | 1365 | goto out; |
@@ -1488,15 +1465,11 @@ lpfc_cmpl_els_cmd(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1488 | "ELS cmd cmpl: status:x%x/x%x did:x%x", | 1465 | "ELS cmd cmpl: status:x%x/x%x did:x%x", |
1489 | irsp->ulpStatus, irsp->un.ulpWord[4], | 1466 | irsp->ulpStatus, irsp->un.ulpWord[4], |
1490 | irsp->un.elsreq64.remoteID); | 1467 | irsp->un.elsreq64.remoteID); |
1491 | |||
1492 | /* ELS cmd tag <ulpIoTag> completes */ | 1468 | /* ELS cmd tag <ulpIoTag> completes */ |
1493 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1469 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1494 | "%d (%d):0106 ELS cmd tag x%x completes Data: x%x x%x " | 1470 | "0106 ELS cmd tag x%x completes Data: x%x x%x x%x\n", |
1495 | "x%x\n", | 1471 | irsp->ulpIoTag, irsp->ulpStatus, |
1496 | phba->brd_no, vport->vpi, | 1472 | irsp->un.ulpWord[4], irsp->ulpTimeout); |
1497 | irsp->ulpIoTag, irsp->ulpStatus, | ||
1498 | irsp->un.ulpWord[4], irsp->ulpTimeout); | ||
1499 | |||
1500 | /* Check to see if link went down during discovery */ | 1473 | /* Check to see if link went down during discovery */ |
1501 | lpfc_els_chk_latt(vport); | 1474 | lpfc_els_chk_latt(vport); |
1502 | lpfc_els_free_iocb(phba, cmdiocb); | 1475 | lpfc_els_free_iocb(phba, cmdiocb); |
@@ -1831,9 +1804,9 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1831 | case IOERR_ILLEGAL_COMMAND: | 1804 | case IOERR_ILLEGAL_COMMAND: |
1832 | if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) && | 1805 | if ((phba->sli3_options & LPFC_SLI3_VPORT_TEARDOWN) && |
1833 | (cmd == ELS_CMD_FDISC)) { | 1806 | (cmd == ELS_CMD_FDISC)) { |
1834 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1807 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1835 | "%d (%d):0124 FDISC failed (3/6) retrying...\n", | 1808 | "0124 FDISC failed (3/6) " |
1836 | phba->brd_no, vport->vpi); | 1809 | "retrying...\n"); |
1837 | lpfc_mbx_unreg_vpi(vport); | 1810 | lpfc_mbx_unreg_vpi(vport); |
1838 | retry = 1; | 1811 | retry = 1; |
1839 | /* Always retry for this case */ | 1812 | /* Always retry for this case */ |
@@ -1898,10 +1871,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1898 | if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && | 1871 | if ((phba->sli3_options & LPFC_SLI3_NPIV_ENABLED) && |
1899 | (cmd == ELS_CMD_FDISC) && | 1872 | (cmd == ELS_CMD_FDISC) && |
1900 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){ | 1873 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_OUT_OF_RESOURCE)){ |
1901 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1874 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1902 | "%d (%d):0125 FDISC Failed (x%x)." | 1875 | "0125 FDISC Failed (x%x). " |
1903 | " Fabric out of resources\n", | 1876 | "Fabric out of resources\n", |
1904 | phba->brd_no, vport->vpi, stat.un.lsRjtError); | 1877 | stat.un.lsRjtError); |
1905 | lpfc_vport_set_state(vport, | 1878 | lpfc_vport_set_state(vport, |
1906 | FC_VPORT_NO_FABRIC_RSCS); | 1879 | FC_VPORT_NO_FABRIC_RSCS); |
1907 | } | 1880 | } |
@@ -1926,10 +1899,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1926 | ((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) || | 1899 | ((stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_PNAME) || |
1927 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID)) | 1900 | (stat.un.b.lsRjtRsnCodeExp == LSEXP_INVALID_NPORT_ID)) |
1928 | ) { | 1901 | ) { |
1929 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1902 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1930 | "%d (%d):0123 FDISC Failed (x%x)." | 1903 | "0123 FDISC Failed (x%x). " |
1931 | " Fabric Detected Bad WWN\n", | 1904 | "Fabric Detected Bad WWN\n", |
1932 | phba->brd_no, vport->vpi, stat.un.lsRjtError); | 1905 | stat.un.lsRjtError); |
1933 | lpfc_vport_set_state(vport, | 1906 | lpfc_vport_set_state(vport, |
1934 | FC_VPORT_FABRIC_REJ_WWN); | 1907 | FC_VPORT_FABRIC_REJ_WWN); |
1935 | } | 1908 | } |
@@ -1959,11 +1932,10 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
1959 | if (retry) { | 1932 | if (retry) { |
1960 | 1933 | ||
1961 | /* Retry ELS command <elsCmd> to remote NPORT <did> */ | 1934 | /* Retry ELS command <elsCmd> to remote NPORT <did> */ |
1962 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 1935 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
1963 | "%d (%d):0107 Retry ELS command x%x to remote " | 1936 | "0107 Retry ELS command x%x to remote " |
1964 | "NPORT x%x Data: x%x x%x\n", | 1937 | "NPORT x%x Data: x%x x%x\n", |
1965 | phba->brd_no, vport->vpi, | 1938 | cmd, did, cmdiocb->retry, delay); |
1966 | cmd, did, cmdiocb->retry, delay); | ||
1967 | 1939 | ||
1968 | if (((cmd == ELS_CMD_PLOGI) || (cmd == ELS_CMD_ADISC)) && | 1940 | if (((cmd == ELS_CMD_PLOGI) || (cmd == ELS_CMD_ADISC)) && |
1969 | ((irsp->ulpStatus != IOSTAT_LOCAL_REJECT) || | 1941 | ((irsp->ulpStatus != IOSTAT_LOCAL_REJECT) || |
@@ -2031,7 +2003,6 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2031 | return 1; | 2003 | return 1; |
2032 | } | 2004 | } |
2033 | } | 2005 | } |
2034 | |||
2035 | /* No retry ELS command <elsCmd> to remote NPORT <did> */ | 2006 | /* No retry ELS command <elsCmd> to remote NPORT <did> */ |
2036 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | 2007 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
2037 | "0108 No retry ELS command x%x to remote " | 2008 | "0108 No retry ELS command x%x to remote " |
@@ -2086,14 +2057,12 @@ lpfc_cmpl_els_logo_acc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2086 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, | 2057 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, |
2087 | "ACC LOGO cmpl: status:x%x/x%x did:x%x", | 2058 | "ACC LOGO cmpl: status:x%x/x%x did:x%x", |
2088 | irsp->ulpStatus, irsp->un.ulpWord[4], ndlp->nlp_DID); | 2059 | irsp->ulpStatus, irsp->un.ulpWord[4], ndlp->nlp_DID); |
2089 | |||
2090 | /* ACC to LOGO completes to NPort <nlp_DID> */ | 2060 | /* ACC to LOGO completes to NPort <nlp_DID> */ |
2091 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2061 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2092 | "%d (%d):0109 ACC to LOGO completes to NPort x%x " | 2062 | "0109 ACC to LOGO completes to NPort x%x " |
2093 | "Data: x%x x%x x%x\n", | 2063 | "Data: x%x x%x x%x\n", |
2094 | phba->brd_no, vport->vpi, ndlp->nlp_DID, | 2064 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2095 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2065 | ndlp->nlp_rpi); |
2096 | |||
2097 | switch (ndlp->nlp_state) { | 2066 | switch (ndlp->nlp_state) { |
2098 | case NLP_STE_UNUSED_NODE: /* node is just allocated */ | 2067 | case NLP_STE_UNUSED_NODE: /* node is just allocated */ |
2099 | lpfc_drop_node(vport, ndlp); | 2068 | lpfc_drop_node(vport, ndlp); |
@@ -2155,17 +2124,14 @@ lpfc_cmpl_els_rsp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
2155 | "ACC cmpl: status:x%x/x%x did:x%x", | 2124 | "ACC cmpl: status:x%x/x%x did:x%x", |
2156 | irsp->ulpStatus, irsp->un.ulpWord[4], | 2125 | irsp->ulpStatus, irsp->un.ulpWord[4], |
2157 | irsp->un.rcvels.remoteID); | 2126 | irsp->un.rcvels.remoteID); |
2158 | |||
2159 | /* ELS response tag <ulpIoTag> completes */ | 2127 | /* ELS response tag <ulpIoTag> completes */ |
2160 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2128 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2161 | "%d (%d):0110 ELS response tag x%x completes " | 2129 | "0110 ELS response tag x%x completes " |
2162 | "Data: x%x x%x x%x x%x x%x x%x x%x\n", | 2130 | "Data: x%x x%x x%x x%x x%x x%x x%x\n", |
2163 | phba->brd_no, vport->vpi, | 2131 | cmdiocb->iocb.ulpIoTag, rspiocb->iocb.ulpStatus, |
2164 | cmdiocb->iocb.ulpIoTag, rspiocb->iocb.ulpStatus, | 2132 | rspiocb->iocb.un.ulpWord[4], rspiocb->iocb.ulpTimeout, |
2165 | rspiocb->iocb.un.ulpWord[4], rspiocb->iocb.ulpTimeout, | 2133 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2166 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, | 2134 | ndlp->nlp_rpi); |
2167 | ndlp->nlp_rpi); | ||
2168 | |||
2169 | if (mbox) { | 2135 | if (mbox) { |
2170 | if ((rspiocb->iocb.ulpStatus == 0) | 2136 | if ((rspiocb->iocb.ulpStatus == 0) |
2171 | && (ndlp->nlp_flag & NLP_ACC_REGLOGIN)) { | 2137 | && (ndlp->nlp_flag & NLP_ACC_REGLOGIN)) { |
@@ -2309,15 +2275,13 @@ lpfc_els_rsp_acc(struct lpfc_vport *vport, uint32_t flag, | |||
2309 | lpfc_nlp_put(ndlp); | 2275 | lpfc_nlp_put(ndlp); |
2310 | elsiocb->context1 = NULL; | 2276 | elsiocb->context1 = NULL; |
2311 | } | 2277 | } |
2312 | |||
2313 | /* Xmit ELS ACC response tag <ulpIoTag> */ | 2278 | /* Xmit ELS ACC response tag <ulpIoTag> */ |
2314 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2279 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2315 | "%d (%d):0128 Xmit ELS ACC response tag x%x, XRI: x%x, " | 2280 | "0128 Xmit ELS ACC response tag x%x, XRI: x%x, " |
2316 | "DID: x%x, nlp_flag: x%x nlp_state: x%x RPI: x%x\n", | 2281 | "DID: x%x, nlp_flag: x%x nlp_state: x%x RPI: x%x\n", |
2317 | phba->brd_no, vport->vpi, elsiocb->iotag, | 2282 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
2318 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2283 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2319 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2284 | ndlp->nlp_rpi); |
2320 | |||
2321 | if (ndlp->nlp_flag & NLP_LOGO_ACC) { | 2285 | if (ndlp->nlp_flag & NLP_LOGO_ACC) { |
2322 | spin_lock_irq(shost->host_lock); | 2286 | spin_lock_irq(shost->host_lock); |
2323 | ndlp->nlp_flag &= ~NLP_LOGO_ACC; | 2287 | ndlp->nlp_flag &= ~NLP_LOGO_ACC; |
@@ -2375,14 +2339,13 @@ lpfc_els_rsp_reject(struct lpfc_vport *vport, uint32_t rejectError, | |||
2375 | } | 2339 | } |
2376 | 2340 | ||
2377 | /* Xmit ELS RJT <err> response tag <ulpIoTag> */ | 2341 | /* Xmit ELS RJT <err> response tag <ulpIoTag> */ |
2378 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2342 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2379 | "%d (%d):0129 Xmit ELS RJT x%x response tag x%x " | 2343 | "0129 Xmit ELS RJT x%x response tag x%x " |
2380 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " | 2344 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " |
2381 | "rpi x%x\n", | 2345 | "rpi x%x\n", |
2382 | phba->brd_no, vport->vpi, rejectError, elsiocb->iotag, | 2346 | rejectError, elsiocb->iotag, |
2383 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2347 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, |
2384 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2348 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); |
2385 | |||
2386 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, | 2349 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_RSP, |
2387 | "Issue LS_RJT: did:x%x flg:x%x err:x%x", | 2350 | "Issue LS_RJT: did:x%x flg:x%x err:x%x", |
2388 | ndlp->nlp_DID, ndlp->nlp_flag, rejectError); | 2351 | ndlp->nlp_DID, ndlp->nlp_flag, rejectError); |
@@ -2422,13 +2385,12 @@ lpfc_els_rsp_adisc_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb, | |||
2422 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ | 2385 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ |
2423 | 2386 | ||
2424 | /* Xmit ADISC ACC response tag <ulpIoTag> */ | 2387 | /* Xmit ADISC ACC response tag <ulpIoTag> */ |
2425 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2388 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2426 | "%d (%d):0130 Xmit ADISC ACC response iotag x%x xri: " | 2389 | "0130 Xmit ADISC ACC response iotag x%x xri: " |
2427 | "x%x, did x%x, nlp_flag x%x, nlp_state x%x rpi x%x\n", | 2390 | "x%x, did x%x, nlp_flag x%x, nlp_state x%x rpi x%x\n", |
2428 | phba->brd_no, vport->vpi, elsiocb->iotag, | 2391 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
2429 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2392 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2430 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2393 | ndlp->nlp_rpi); |
2431 | |||
2432 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 2394 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
2433 | 2395 | ||
2434 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; | 2396 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; |
@@ -2482,15 +2444,13 @@ lpfc_els_rsp_prli_acc(struct lpfc_vport *vport, struct lpfc_iocbq *oldiocb, | |||
2482 | icmd = &elsiocb->iocb; | 2444 | icmd = &elsiocb->iocb; |
2483 | oldcmd = &oldiocb->iocb; | 2445 | oldcmd = &oldiocb->iocb; |
2484 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ | 2446 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ |
2485 | |||
2486 | /* Xmit PRLI ACC response tag <ulpIoTag> */ | 2447 | /* Xmit PRLI ACC response tag <ulpIoTag> */ |
2487 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2448 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2488 | "%d (%d):0131 Xmit PRLI ACC response tag x%x xri x%x, " | 2449 | "0131 Xmit PRLI ACC response tag x%x xri x%x, " |
2489 | "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", | 2450 | "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", |
2490 | phba->brd_no, vport->vpi, elsiocb->iotag, | 2451 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
2491 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 2452 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
2492 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 2453 | ndlp->nlp_rpi); |
2493 | |||
2494 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 2454 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
2495 | 2455 | ||
2496 | *((uint32_t *) (pcmd)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)); | 2456 | *((uint32_t *) (pcmd)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)); |
@@ -2564,16 +2524,11 @@ lpfc_els_rsp_rnid_acc(struct lpfc_vport *vport, uint8_t format, | |||
2564 | icmd = &elsiocb->iocb; | 2524 | icmd = &elsiocb->iocb; |
2565 | oldcmd = &oldiocb->iocb; | 2525 | oldcmd = &oldiocb->iocb; |
2566 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ | 2526 | icmd->ulpContext = oldcmd->ulpContext; /* Xri */ |
2567 | |||
2568 | /* Xmit RNID ACC response tag <ulpIoTag> */ | 2527 | /* Xmit RNID ACC response tag <ulpIoTag> */ |
2569 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 2528 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
2570 | "%d (%d):0132 Xmit RNID ACC response tag x%x " | 2529 | "0132 Xmit RNID ACC response tag x%x xri x%x\n", |
2571 | "xri x%x\n", | 2530 | elsiocb->iotag, elsiocb->iocb.ulpContext); |
2572 | phba->brd_no, vport->vpi, elsiocb->iotag, | ||
2573 | elsiocb->iocb.ulpContext); | ||
2574 | |||
2575 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); | 2531 | pcmd = (uint8_t *) (((struct lpfc_dmabuf *) elsiocb->context2)->virt); |
2576 | |||
2577 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; | 2532 | *((uint32_t *) (pcmd)) = ELS_CMD_ACC; |
2578 | pcmd += sizeof(uint32_t); | 2533 | pcmd += sizeof(uint32_t); |
2579 | 2534 | ||
@@ -2716,7 +2671,6 @@ lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did) | |||
2716 | D_ID rscn_did; | 2671 | D_ID rscn_did; |
2717 | uint32_t *lp; | 2672 | uint32_t *lp; |
2718 | uint32_t payload_len, i; | 2673 | uint32_t payload_len, i; |
2719 | struct lpfc_hba *phba = vport->phba; | ||
2720 | 2674 | ||
2721 | ns_did.un.word = did; | 2675 | ns_did.un.word = did; |
2722 | 2676 | ||
@@ -2751,12 +2705,10 @@ lpfc_rscn_payload_check(struct lpfc_vport *vport, uint32_t did) | |||
2751 | break; | 2705 | break; |
2752 | default: | 2706 | default: |
2753 | /* Unknown Identifier in RSCN node */ | 2707 | /* Unknown Identifier in RSCN node */ |
2754 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2708 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2755 | "%d (%d):0217 Unknown " | 2709 | "0217 Unknown Identifier in " |
2756 | "Identifier in RSCN payload " | 2710 | "RSCN payload Data: x%x\n", |
2757 | "Data: x%x\n", | 2711 | rscn_did.un.word); |
2758 | phba->brd_no, vport->vpi, | ||
2759 | rscn_did.un.word); | ||
2760 | case 3: /* Whole Fabric effected */ | 2712 | case 3: /* Whole Fabric effected */ |
2761 | return did; | 2713 | return did; |
2762 | } | 2714 | } |
@@ -2813,13 +2765,10 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
2813 | 2765 | ||
2814 | payload_len = be32_to_cpu(*lp++ & ~ELS_CMD_MASK); | 2766 | payload_len = be32_to_cpu(*lp++ & ~ELS_CMD_MASK); |
2815 | payload_len -= sizeof(uint32_t); /* take off word 0 */ | 2767 | payload_len -= sizeof(uint32_t); /* take off word 0 */ |
2816 | |||
2817 | /* RSCN received */ | 2768 | /* RSCN received */ |
2818 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2769 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2819 | "%d (%d):0214 RSCN received Data: x%x x%x x%x x%x\n", | 2770 | "0214 RSCN received Data: x%x x%x x%x x%x\n", |
2820 | phba->brd_no, vport->vpi, vport->fc_flag, payload_len, | 2771 | vport->fc_flag, payload_len, *lp, rscn_cnt); |
2821 | *lp, rscn_cnt); | ||
2822 | |||
2823 | for (i = 0; i < payload_len/sizeof(uint32_t); i++) | 2772 | for (i = 0; i < payload_len/sizeof(uint32_t); i++) |
2824 | fc_host_post_event(shost, fc_get_event_number(), | 2773 | fc_host_post_event(shost, fc_get_event_number(), |
2825 | FCH_EVT_RSCN, lp[i]); | 2774 | FCH_EVT_RSCN, lp[i]); |
@@ -2854,11 +2803,11 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
2854 | } | 2803 | } |
2855 | if (rscn_id == hba_id) { | 2804 | if (rscn_id == hba_id) { |
2856 | /* ALL NPortIDs in RSCN are on HBA */ | 2805 | /* ALL NPortIDs in RSCN are on HBA */ |
2857 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2806 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2858 | "%d (%d):0214 Ignore RSCN Data: x%x x%x x%x x%x\n", | 2807 | "0214 Ignore RSCN " |
2859 | phba->brd_no, vport->vpi, vport->fc_flag, payload_len, | 2808 | "Data: x%x x%x x%x x%x\n", |
2860 | *lp, rscn_cnt); | 2809 | vport->fc_flag, payload_len, |
2861 | 2810 | *lp, rscn_cnt); | |
2862 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, | 2811 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, |
2863 | "RCV RSCN vport: did:x%x/ste:x%x flg:x%x", | 2812 | "RCV RSCN vport: did:x%x/ste:x%x flg:x%x", |
2864 | ndlp->nlp_DID, vport->port_state, | 2813 | ndlp->nlp_DID, vport->port_state, |
@@ -2904,23 +2853,21 @@ lpfc_els_rcv_rscn(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
2904 | } | 2853 | } |
2905 | 2854 | ||
2906 | /* Deferred RSCN */ | 2855 | /* Deferred RSCN */ |
2907 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2856 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2908 | "%d (%d):0235 Deferred RSCN " | 2857 | "0235 Deferred RSCN " |
2909 | "Data: x%x x%x x%x\n", | 2858 | "Data: x%x x%x x%x\n", |
2910 | phba->brd_no, vport->vpi, | 2859 | vport->fc_rscn_id_cnt, vport->fc_flag, |
2911 | vport->fc_rscn_id_cnt, vport->fc_flag, | 2860 | vport->port_state); |
2912 | vport->port_state); | ||
2913 | } else { | 2861 | } else { |
2914 | spin_lock_irq(shost->host_lock); | 2862 | spin_lock_irq(shost->host_lock); |
2915 | vport->fc_flag |= FC_RSCN_DISCOVERY; | 2863 | vport->fc_flag |= FC_RSCN_DISCOVERY; |
2916 | spin_unlock_irq(shost->host_lock); | 2864 | spin_unlock_irq(shost->host_lock); |
2917 | /* ReDiscovery RSCN */ | 2865 | /* ReDiscovery RSCN */ |
2918 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2866 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2919 | "%d (%d):0234 ReDiscovery RSCN " | 2867 | "0234 ReDiscovery RSCN " |
2920 | "Data: x%x x%x x%x\n", | 2868 | "Data: x%x x%x x%x\n", |
2921 | phba->brd_no, vport->vpi, | 2869 | vport->fc_rscn_id_cnt, vport->fc_flag, |
2922 | vport->fc_rscn_id_cnt, vport->fc_flag, | 2870 | vport->port_state); |
2923 | vport->port_state); | ||
2924 | } | 2871 | } |
2925 | /* Send back ACC */ | 2872 | /* Send back ACC */ |
2926 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, | 2873 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, |
@@ -2973,11 +2920,10 @@ lpfc_els_handle_rscn(struct lpfc_vport *vport) | |||
2973 | lpfc_set_disctmo(vport); | 2920 | lpfc_set_disctmo(vport); |
2974 | 2921 | ||
2975 | /* RSCN processed */ | 2922 | /* RSCN processed */ |
2976 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2923 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2977 | "%d (%d):0215 RSCN processed Data: x%x x%x x%x x%x\n", | 2924 | "0215 RSCN processed Data: x%x x%x x%x x%x\n", |
2978 | phba->brd_no, vport->vpi, | 2925 | vport->fc_flag, 0, vport->fc_rscn_id_cnt, |
2979 | vport->fc_flag, 0, vport->fc_rscn_id_cnt, | 2926 | vport->port_state); |
2980 | vport->port_state); | ||
2981 | 2927 | ||
2982 | /* To process RSCN, first compare RSCN data with NameServer */ | 2928 | /* To process RSCN, first compare RSCN data with NameServer */ |
2983 | vport->fc_ns_retry = 0; | 2929 | vport->fc_ns_retry = 0; |
@@ -3045,10 +2991,10 @@ lpfc_els_rcv_flogi(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3045 | 2991 | ||
3046 | /* An FLOGI ELS command <elsCmd> was received from DID <did> in | 2992 | /* An FLOGI ELS command <elsCmd> was received from DID <did> in |
3047 | Loop Mode */ | 2993 | Loop Mode */ |
3048 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 2994 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
3049 | "%d (%d):0113 An FLOGI ELS command x%x was " | 2995 | "0113 An FLOGI ELS command x%x was " |
3050 | "received from DID x%x in Loop Mode\n", | 2996 | "received from DID x%x in Loop Mode\n", |
3051 | phba->brd_no, vport->vpi, cmd, did); | 2997 | cmd, did); |
3052 | return 1; | 2998 | return 1; |
3053 | } | 2999 | } |
3054 | 3000 | ||
@@ -3219,16 +3165,13 @@ lpfc_els_rsp_rps_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
3219 | rps_rsp->primSeqErrCnt = be32_to_cpu(mb->un.varRdLnk.primSeqErrCnt); | 3165 | rps_rsp->primSeqErrCnt = be32_to_cpu(mb->un.varRdLnk.primSeqErrCnt); |
3220 | rps_rsp->invalidXmitWord = be32_to_cpu(mb->un.varRdLnk.invalidXmitWord); | 3166 | rps_rsp->invalidXmitWord = be32_to_cpu(mb->un.varRdLnk.invalidXmitWord); |
3221 | rps_rsp->crcCnt = be32_to_cpu(mb->un.varRdLnk.crcCnt); | 3167 | rps_rsp->crcCnt = be32_to_cpu(mb->un.varRdLnk.crcCnt); |
3222 | |||
3223 | /* Xmit ELS RPS ACC response tag <ulpIoTag> */ | 3168 | /* Xmit ELS RPS ACC response tag <ulpIoTag> */ |
3224 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3169 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_ELS, |
3225 | "%d (%d):0118 Xmit ELS RPS ACC response tag x%x " | 3170 | "0118 Xmit ELS RPS ACC response tag x%x xri x%x, " |
3226 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " | 3171 | "did x%x, nlp_flag x%x, nlp_state x%x, rpi x%x\n", |
3227 | "rpi x%x\n", | 3172 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
3228 | phba->brd_no, ndlp->vport->vpi, elsiocb->iotag, | 3173 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
3229 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 3174 | ndlp->nlp_rpi); |
3230 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | ||
3231 | |||
3232 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; | 3175 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; |
3233 | phba->fc_stat.elsXmitACC++; | 3176 | phba->fc_stat.elsXmitACC++; |
3234 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) | 3177 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) |
@@ -3330,21 +3273,16 @@ lpfc_els_rsp_rpl_acc(struct lpfc_vport *vport, uint16_t cmdsize, | |||
3330 | rpl_rsp.port_num_blk.portID = be32_to_cpu(vport->fc_myDID); | 3273 | rpl_rsp.port_num_blk.portID = be32_to_cpu(vport->fc_myDID); |
3331 | memcpy(&rpl_rsp.port_num_blk.portName, &vport->fc_portname, | 3274 | memcpy(&rpl_rsp.port_num_blk.portName, &vport->fc_portname, |
3332 | sizeof(struct lpfc_name)); | 3275 | sizeof(struct lpfc_name)); |
3333 | |||
3334 | memcpy(pcmd, &rpl_rsp, cmdsize - sizeof(uint32_t)); | 3276 | memcpy(pcmd, &rpl_rsp, cmdsize - sizeof(uint32_t)); |
3335 | |||
3336 | |||
3337 | /* Xmit ELS RPL ACC response tag <ulpIoTag> */ | 3277 | /* Xmit ELS RPL ACC response tag <ulpIoTag> */ |
3338 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3278 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3339 | "%d (%d):0120 Xmit ELS RPL ACC response tag x%x " | 3279 | "0120 Xmit ELS RPL ACC response tag x%x " |
3340 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " | 3280 | "xri x%x, did x%x, nlp_flag x%x, nlp_state x%x, " |
3341 | "rpi x%x\n", | 3281 | "rpi x%x\n", |
3342 | phba->brd_no, vport->vpi, elsiocb->iotag, | 3282 | elsiocb->iotag, elsiocb->iocb.ulpContext, |
3343 | elsiocb->iocb.ulpContext, ndlp->nlp_DID, | 3283 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
3344 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 3284 | ndlp->nlp_rpi); |
3345 | |||
3346 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; | 3285 | elsiocb->iocb_cmpl = lpfc_cmpl_els_rsp; |
3347 | |||
3348 | phba->fc_stat.elsXmitACC++; | 3286 | phba->fc_stat.elsXmitACC++; |
3349 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) { | 3287 | if (lpfc_sli_issue_iocb(phba, pring, elsiocb, 0) == IOCB_ERROR) { |
3350 | lpfc_els_free_iocb(phba, elsiocb); | 3288 | lpfc_els_free_iocb(phba, elsiocb); |
@@ -3397,7 +3335,6 @@ static int | |||
3397 | lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | 3335 | lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, |
3398 | struct lpfc_nodelist *ndlp) | 3336 | struct lpfc_nodelist *ndlp) |
3399 | { | 3337 | { |
3400 | struct lpfc_hba *phba = vport->phba; | ||
3401 | struct lpfc_dmabuf *pcmd; | 3338 | struct lpfc_dmabuf *pcmd; |
3402 | uint32_t *lp; | 3339 | uint32_t *lp; |
3403 | IOCB_t *icmd; | 3340 | IOCB_t *icmd; |
@@ -3411,12 +3348,9 @@ lpfc_els_rcv_farp(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3411 | 3348 | ||
3412 | cmd = *lp++; | 3349 | cmd = *lp++; |
3413 | fp = (FARP *) lp; | 3350 | fp = (FARP *) lp; |
3414 | |||
3415 | /* FARP-REQ received from DID <did> */ | 3351 | /* FARP-REQ received from DID <did> */ |
3416 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3352 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3417 | "%d (%d):0601 FARP-REQ received from DID x%x\n", | 3353 | "0601 FARP-REQ received from DID x%x\n", did); |
3418 | phba->brd_no, vport->vpi, did); | ||
3419 | |||
3420 | /* We will only support match on WWPN or WWNN */ | 3354 | /* We will only support match on WWPN or WWNN */ |
3421 | if (fp->Mflags & ~(FARP_MATCH_NODE | FARP_MATCH_PORT)) { | 3355 | if (fp->Mflags & ~(FARP_MATCH_NODE | FARP_MATCH_PORT)) { |
3422 | return 0; | 3356 | return 0; |
@@ -3464,7 +3398,6 @@ lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3464 | uint32_t *lp; | 3398 | uint32_t *lp; |
3465 | IOCB_t *icmd; | 3399 | IOCB_t *icmd; |
3466 | uint32_t cmd, did; | 3400 | uint32_t cmd, did; |
3467 | struct lpfc_hba *phba = vport->phba; | ||
3468 | 3401 | ||
3469 | icmd = &cmdiocb->iocb; | 3402 | icmd = &cmdiocb->iocb; |
3470 | did = icmd->un.elsreq64.remoteID; | 3403 | did = icmd->un.elsreq64.remoteID; |
@@ -3473,9 +3406,8 @@ lpfc_els_rcv_farpr(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3473 | 3406 | ||
3474 | cmd = *lp++; | 3407 | cmd = *lp++; |
3475 | /* FARP-RSP received from DID <did> */ | 3408 | /* FARP-RSP received from DID <did> */ |
3476 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3409 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3477 | "%d (%d):0600 FARP-RSP received from DID x%x\n", | 3410 | "0600 FARP-RSP received from DID x%x\n", did); |
3478 | phba->brd_no, vport->vpi, did); | ||
3479 | /* ACCEPT the Farp resp request */ | 3411 | /* ACCEPT the Farp resp request */ |
3480 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); | 3412 | lpfc_els_rsp_acc(vport, ELS_CMD_ACC, cmdiocb, ndlp, NULL, 0); |
3481 | 3413 | ||
@@ -3495,10 +3427,8 @@ lpfc_els_rcv_fan(struct lpfc_vport *vport, struct lpfc_iocbq *cmdiocb, | |||
3495 | struct lpfc_hba *phba = vport->phba; | 3427 | struct lpfc_hba *phba = vport->phba; |
3496 | 3428 | ||
3497 | /* FAN received */ | 3429 | /* FAN received */ |
3498 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3430 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3499 | "%d (%d):0265 FAN received\n", | 3431 | "0265 FAN received\n"); |
3500 | phba->brd_no, vport->vpi); | ||
3501 | |||
3502 | icmd = &cmdiocb->iocb; | 3432 | icmd = &cmdiocb->iocb; |
3503 | did = icmd->un.elsreq64.remoteID; | 3433 | did = icmd->un.elsreq64.remoteID; |
3504 | pcmd = (struct lpfc_dmabuf *)cmdiocb->context2; | 3434 | pcmd = (struct lpfc_dmabuf *)cmdiocb->context2; |
@@ -3657,13 +3587,10 @@ lpfc_els_timeout_handler(struct lpfc_vport *vport) | |||
3657 | if (ndlp) | 3587 | if (ndlp) |
3658 | remote_ID = ndlp->nlp_DID; | 3588 | remote_ID = ndlp->nlp_DID; |
3659 | } | 3589 | } |
3660 | 3590 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | |
3661 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3591 | "0127 ELS timeout Data: x%x x%x x%x " |
3662 | "%d (%d):0127 ELS timeout Data: x%x x%x x%x " | 3592 | "x%x\n", els_command, |
3663 | "x%x\n", | 3593 | remote_ID, cmd->ulpCommand, cmd->ulpIoTag); |
3664 | phba->brd_no, vport->vpi, els_command, | ||
3665 | remote_ID, cmd->ulpCommand, cmd->ulpIoTag); | ||
3666 | |||
3667 | lpfc_sli_issue_abort_iotag(phba, pring, piocb); | 3594 | lpfc_sli_issue_abort_iotag(phba, pring, piocb); |
3668 | } | 3595 | } |
3669 | spin_unlock_irq(&phba->hbalock); | 3596 | spin_unlock_irq(&phba->hbalock); |
@@ -3838,11 +3765,9 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
3838 | cmd &= ELS_CMD_MASK; | 3765 | cmd &= ELS_CMD_MASK; |
3839 | } | 3766 | } |
3840 | /* ELS command <elsCmd> received from NPORT <did> */ | 3767 | /* ELS command <elsCmd> received from NPORT <did> */ |
3841 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3768 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
3842 | "%d (%d):0112 ELS command x%x received from NPORT x%x " | 3769 | "0112 ELS command x%x received from NPORT x%x " |
3843 | "Data: x%x\n", phba->brd_no, vport->vpi, cmd, did, | 3770 | "Data: x%x\n", cmd, did, vport->port_state); |
3844 | vport->port_state); | ||
3845 | |||
3846 | switch (cmd) { | 3771 | switch (cmd) { |
3847 | case ELS_CMD_PLOGI: | 3772 | case ELS_CMD_PLOGI: |
3848 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, | 3773 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_UNSOL, |
@@ -4011,10 +3936,9 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
4011 | rjt_err = LSRJT_INVALID_CMD; | 3936 | rjt_err = LSRJT_INVALID_CMD; |
4012 | 3937 | ||
4013 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ | 3938 | /* Unknown ELS command <elsCmd> received from NPORT <did> */ |
4014 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3939 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4015 | "%d (%d):0115 Unknown ELS command x%x " | 3940 | "0115 Unknown ELS command x%x " |
4016 | "received from NPORT x%x\n", | 3941 | "received from NPORT x%x\n", cmd, did); |
4017 | phba->brd_no, vport->vpi, cmd, did); | ||
4018 | if (newnode) | 3942 | if (newnode) |
4019 | lpfc_drop_node(vport, ndlp); | 3943 | lpfc_drop_node(vport, ndlp); |
4020 | break; | 3944 | break; |
@@ -4035,11 +3959,10 @@ lpfc_els_unsol_buffer(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
4035 | 3959 | ||
4036 | dropit: | 3960 | dropit: |
4037 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 3961 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, |
4038 | "%d (%d):0111 Dropping received ELS cmd " | 3962 | "(%d):0111 Dropping received ELS cmd " |
4039 | "Data: x%x x%x x%x\n", | 3963 | "Data: x%x x%x x%x\n", |
4040 | phba->brd_no, vport ? vport->vpi : 0xffff, | 3964 | vport ? vport->vpi : 0xffff, icmd->ulpStatus, |
4041 | icmd->ulpStatus, icmd->un.ulpWord[4], | 3965 | icmd->un.ulpWord[4], icmd->ulpTimeout); |
4042 | icmd->ulpTimeout); | ||
4043 | phba->fc_stat.elsRcvDrop++; | 3966 | phba->fc_stat.elsRcvDrop++; |
4044 | } | 3967 | } |
4045 | 3968 | ||
@@ -4151,9 +4074,8 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
4151 | return; | 4074 | return; |
4152 | } | 4075 | } |
4153 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4076 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4154 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4077 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4155 | "%d (%d):0251 NameServer login: no memory\n", | 4078 | "0251 NameServer login: no memory\n"); |
4156 | phba->brd_no, vport->vpi); | ||
4157 | return; | 4079 | return; |
4158 | } | 4080 | } |
4159 | lpfc_nlp_init(vport, ndlp, NameServer_DID); | 4081 | lpfc_nlp_init(vport, ndlp, NameServer_DID); |
@@ -4164,9 +4086,8 @@ lpfc_do_scr_ns_plogi(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
4164 | 4086 | ||
4165 | if (lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0)) { | 4087 | if (lpfc_issue_els_plogi(vport, ndlp->nlp_DID, 0)) { |
4166 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4088 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4167 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4089 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4168 | "%d (%d):0252 Cannot issue NameServer login\n", | 4090 | "0252 Cannot issue NameServer login\n"); |
4169 | phba->brd_no, vport->vpi); | ||
4170 | return; | 4091 | return; |
4171 | } | 4092 | } |
4172 | 4093 | ||
@@ -4197,9 +4118,9 @@ lpfc_cmpl_reg_new_vport(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
4197 | lpfc_nlp_put(ndlp); | 4118 | lpfc_nlp_put(ndlp); |
4198 | 4119 | ||
4199 | if (mb->mbxStatus) { | 4120 | if (mb->mbxStatus) { |
4200 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 4121 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
4201 | "%d (%d):0915 Register VPI failed: 0x%x\n", | 4122 | "0915 Register VPI failed: 0x%x\n", |
4202 | phba->brd_no, vport->vpi, mb->mbxStatus); | 4123 | mb->mbxStatus); |
4203 | 4124 | ||
4204 | switch (mb->mbxStatus) { | 4125 | switch (mb->mbxStatus) { |
4205 | case 0x11: /* unsupported feature */ | 4126 | case 0x11: /* unsupported feature */ |
@@ -4248,17 +4169,14 @@ lpfc_register_new_vport(struct lpfc_hba *phba, struct lpfc_vport *vport, | |||
4248 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; | 4169 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; |
4249 | 4170 | ||
4250 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4171 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4251 | 4172 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, | |
4252 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 4173 | "0253 Register VPI: Can't send mbox\n"); |
4253 | "%d (%d):0253 Register VPI: Cannot send mbox\n", | ||
4254 | phba->brd_no, vport->vpi); | ||
4255 | } | 4174 | } |
4256 | } else { | 4175 | } else { |
4257 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4176 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4258 | 4177 | ||
4259 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 4178 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
4260 | "%d (%d):0254 Register VPI: no memory\n", | 4179 | "0254 Register VPI: no memory\n"); |
4261 | phba->brd_no, vport->vpi); | ||
4262 | 4180 | ||
4263 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; | 4181 | vport->fc_flag &= ~FC_VPORT_NEEDS_REG_VPI; |
4264 | lpfc_nlp_put(ndlp); | 4182 | lpfc_nlp_put(ndlp); |
@@ -4277,11 +4195,10 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
4277 | IOCB_t *irsp = &rspiocb->iocb; | 4195 | IOCB_t *irsp = &rspiocb->iocb; |
4278 | struct lpfc_iocbq *piocb; | 4196 | struct lpfc_iocbq *piocb; |
4279 | 4197 | ||
4280 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 4198 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
4281 | "%d (%d):0123 FDISC completes. x%x/x%x prevDID: x%x\n", | 4199 | "0123 FDISC completes. x%x/x%x prevDID: x%x\n", |
4282 | phba->brd_no, vport->vpi, | 4200 | irsp->ulpStatus, irsp->un.ulpWord[4], |
4283 | irsp->ulpStatus, irsp->un.ulpWord[4], vport->fc_prevDID); | 4201 | vport->fc_prevDID); |
4284 | |||
4285 | /* Since all FDISCs are being single threaded, we | 4202 | /* Since all FDISCs are being single threaded, we |
4286 | * must reset the discovery timer for ALL vports | 4203 | * must reset the discovery timer for ALL vports |
4287 | * waiting to send FDISC when one completes. | 4204 | * waiting to send FDISC when one completes. |
@@ -4298,13 +4215,10 @@ lpfc_cmpl_els_fdisc(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
4298 | /* Check for retry */ | 4215 | /* Check for retry */ |
4299 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) | 4216 | if (lpfc_els_retry(phba, cmdiocb, rspiocb)) |
4300 | goto out; | 4217 | goto out; |
4301 | |||
4302 | /* FDISC failed */ | 4218 | /* FDISC failed */ |
4303 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4219 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
4304 | "%d (%d):0124 FDISC failed. (%d/%d)\n", | 4220 | "0124 FDISC failed. (%d/%d)\n", |
4305 | phba->brd_no, vport->vpi, | 4221 | irsp->ulpStatus, irsp->un.ulpWord[4]); |
4306 | irsp->ulpStatus, irsp->un.ulpWord[4]); | ||
4307 | |||
4308 | if (vport->fc_vport->vport_state == FC_VPORT_INITIALIZING) | 4222 | if (vport->fc_vport->vport_state == FC_VPORT_INITIALIZING) |
4309 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4223 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4310 | 4224 | ||
@@ -4370,10 +4284,8 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
4370 | ELS_CMD_FDISC); | 4284 | ELS_CMD_FDISC); |
4371 | if (!elsiocb) { | 4285 | if (!elsiocb) { |
4372 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4286 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4373 | 4287 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | |
4374 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4288 | "0255 Issue FDISC: no IOCB\n"); |
4375 | "%d (%d):0255 Issue FDISC: no IOCB\n", | ||
4376 | phba->brd_no, vport->vpi); | ||
4377 | return 1; | 4289 | return 1; |
4378 | } | 4290 | } |
4379 | 4291 | ||
@@ -4419,11 +4331,8 @@ lpfc_issue_els_fdisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
4419 | if (rc == IOCB_ERROR) { | 4331 | if (rc == IOCB_ERROR) { |
4420 | lpfc_els_free_iocb(phba, elsiocb); | 4332 | lpfc_els_free_iocb(phba, elsiocb); |
4421 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 4333 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
4422 | 4334 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, | |
4423 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 4335 | "0256 Issue FDISC: Cannot send IOCB\n"); |
4424 | "%d (%d):0256 Issue FDISC: Cannot send IOCB\n", | ||
4425 | phba->brd_no, vport->vpi); | ||
4426 | |||
4427 | return 1; | 4336 | return 1; |
4428 | } | 4337 | } |
4429 | lpfc_vport_set_state(vport, FC_VPORT_INITIALIZING); | 4338 | lpfc_vport_set_state(vport, FC_VPORT_INITIALIZING); |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 914e74ac11e5..55c4e5455a57 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c | |||
@@ -201,25 +201,23 @@ lpfc_dev_loss_tmo_handler(struct lpfc_nodelist *ndlp) | |||
201 | warn_on = 0; | 201 | warn_on = 0; |
202 | 202 | ||
203 | if (warn_on) { | 203 | if (warn_on) { |
204 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 204 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
205 | "%d (%d):0203 Devloss timeout on " | 205 | "0203 Devloss timeout on " |
206 | "WWPN %x:%x:%x:%x:%x:%x:%x:%x " | 206 | "WWPN %x:%x:%x:%x:%x:%x:%x:%x " |
207 | "NPort x%x Data: x%x x%x x%x\n", | 207 | "NPort x%x Data: x%x x%x x%x\n", |
208 | phba->brd_no, vport->vpi, | 208 | *name, *(name+1), *(name+2), *(name+3), |
209 | *name, *(name+1), *(name+2), *(name+3), | 209 | *(name+4), *(name+5), *(name+6), *(name+7), |
210 | *(name+4), *(name+5), *(name+6), *(name+7), | 210 | ndlp->nlp_DID, ndlp->nlp_flag, |
211 | ndlp->nlp_DID, ndlp->nlp_flag, | 211 | ndlp->nlp_state, ndlp->nlp_rpi); |
212 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
213 | } else { | 212 | } else { |
214 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 213 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
215 | "%d (%d):0204 Devloss timeout on " | 214 | "0204 Devloss timeout on " |
216 | "WWPN %x:%x:%x:%x:%x:%x:%x:%x " | 215 | "WWPN %x:%x:%x:%x:%x:%x:%x:%x " |
217 | "NPort x%x Data: x%x x%x x%x\n", | 216 | "NPort x%x Data: x%x x%x x%x\n", |
218 | phba->brd_no, vport->vpi, | 217 | *name, *(name+1), *(name+2), *(name+3), |
219 | *name, *(name+1), *(name+2), *(name+3), | 218 | *(name+4), *(name+5), *(name+6), *(name+7), |
220 | *(name+4), *(name+5), *(name+6), *(name+7), | 219 | ndlp->nlp_DID, ndlp->nlp_flag, |
221 | ndlp->nlp_DID, ndlp->nlp_flag, | 220 | ndlp->nlp_state, ndlp->nlp_rpi); |
222 | ndlp->nlp_state, ndlp->nlp_rpi); | ||
223 | } | 221 | } |
224 | 222 | ||
225 | if (!(vport->load_flag & FC_UNLOADING) && | 223 | if (!(vport->load_flag & FC_UNLOADING) && |
@@ -750,12 +748,10 @@ lpfc_mbx_cmpl_clear_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
750 | /* Check for error */ | 748 | /* Check for error */ |
751 | if ((mb->mbxStatus) && (mb->mbxStatus != 0x1601)) { | 749 | if ((mb->mbxStatus) && (mb->mbxStatus != 0x1601)) { |
752 | /* CLEAR_LA mbox error <mbxStatus> state <hba_state> */ | 750 | /* CLEAR_LA mbox error <mbxStatus> state <hba_state> */ |
753 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 751 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
754 | "%d (%d):0320 CLEAR_LA mbxStatus error x%x hba " | 752 | "0320 CLEAR_LA mbxStatus error x%x hba " |
755 | "state x%x\n", | 753 | "state x%x\n", |
756 | phba->brd_no, vport->vpi, mb->mbxStatus, | 754 | mb->mbxStatus, vport->port_state); |
757 | vport->port_state); | ||
758 | |||
759 | phba->link_state = LPFC_HBA_ERROR; | 755 | phba->link_state = LPFC_HBA_ERROR; |
760 | goto out; | 756 | goto out; |
761 | } | 757 | } |
@@ -787,10 +783,8 @@ lpfc_mbx_cmpl_clear_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
787 | 783 | ||
788 | out: | 784 | out: |
789 | /* Device Discovery completes */ | 785 | /* Device Discovery completes */ |
790 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 786 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
791 | "%d (%d):0225 Device Discovery completes\n", | 787 | "0225 Device Discovery completes\n"); |
792 | phba->brd_no, vport->vpi); | ||
793 | |||
794 | mempool_free(pmb, phba->mbox_mem_pool); | 788 | mempool_free(pmb, phba->mbox_mem_pool); |
795 | 789 | ||
796 | spin_lock_irq(shost->host_lock); | 790 | spin_lock_irq(shost->host_lock); |
@@ -847,19 +841,17 @@ lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
847 | return; | 841 | return; |
848 | 842 | ||
849 | out: | 843 | out: |
850 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 844 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
851 | "%d (%d):0306 CONFIG_LINK mbxStatus error x%x " | 845 | "0306 CONFIG_LINK mbxStatus error x%x " |
852 | "HBA state x%x\n", | 846 | "HBA state x%x\n", |
853 | phba->brd_no, vport->vpi, pmb->mb.mbxStatus, | 847 | pmb->mb.mbxStatus, vport->port_state); |
854 | vport->port_state); | ||
855 | |||
856 | mempool_free(pmb, phba->mbox_mem_pool); | 848 | mempool_free(pmb, phba->mbox_mem_pool); |
857 | 849 | ||
858 | lpfc_linkdown(phba); | 850 | lpfc_linkdown(phba); |
859 | 851 | ||
860 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 852 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
861 | "%d (%d):0200 CONFIG_LINK bad hba state x%x\n", | 853 | "0200 CONFIG_LINK bad hba state x%x\n", |
862 | phba->brd_no, vport->vpi, vport->port_state); | 854 | vport->port_state); |
863 | 855 | ||
864 | lpfc_issue_clear_la(phba, vport); | 856 | lpfc_issue_clear_la(phba, vport); |
865 | return; | 857 | return; |
@@ -876,12 +868,10 @@ lpfc_mbx_cmpl_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
876 | /* Check for error */ | 868 | /* Check for error */ |
877 | if (mb->mbxStatus) { | 869 | if (mb->mbxStatus) { |
878 | /* READ_SPARAM mbox error <mbxStatus> state <hba_state> */ | 870 | /* READ_SPARAM mbox error <mbxStatus> state <hba_state> */ |
879 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 871 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
880 | "%d (%d):0319 READ_SPARAM mbxStatus error x%x " | 872 | "0319 READ_SPARAM mbxStatus error x%x " |
881 | "hba state x%x>\n", | 873 | "hba state x%x>\n", |
882 | phba->brd_no, vport->vpi, mb->mbxStatus, | 874 | mb->mbxStatus, vport->port_state); |
883 | vport->port_state); | ||
884 | |||
885 | lpfc_linkdown(phba); | 875 | lpfc_linkdown(phba); |
886 | goto out; | 876 | goto out; |
887 | } | 877 | } |
@@ -964,7 +954,7 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) | |||
964 | if (i == 0) { | 954 | if (i == 0) { |
965 | phba->alpa_map[0] = 0; | 955 | phba->alpa_map[0] = 0; |
966 | } else { | 956 | } else { |
967 | if (phba->cfg_log_verbose & LOG_LINK_EVENT) { | 957 | if (vport->cfg_log_verbose & LOG_LINK_EVENT) { |
968 | int numalpa, j, k; | 958 | int numalpa, j, k; |
969 | union { | 959 | union { |
970 | uint8_t pamap[16]; | 960 | uint8_t pamap[16]; |
@@ -990,10 +980,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) | |||
990 | lpfc_printf_log(phba, | 980 | lpfc_printf_log(phba, |
991 | KERN_WARNING, | 981 | KERN_WARNING, |
992 | LOG_LINK_EVENT, | 982 | LOG_LINK_EVENT, |
993 | "%d:1304 Link Up Event " | 983 | "1304 Link Up Event " |
994 | "ALPA map Data: x%x " | 984 | "ALPA map Data: x%x " |
995 | "x%x x%x x%x\n", | 985 | "x%x x%x x%x\n", |
996 | phba->brd_no, | ||
997 | un.pa.wd1, un.pa.wd2, | 986 | un.pa.wd1, un.pa.wd2, |
998 | un.pa.wd3, un.pa.wd4); | 987 | un.pa.wd3, un.pa.wd4); |
999 | } | 988 | } |
@@ -1041,11 +1030,9 @@ lpfc_mbx_process_link_up(struct lpfc_hba *phba, READ_LA_VAR *la) | |||
1041 | } | 1030 | } |
1042 | out: | 1031 | out: |
1043 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 1032 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
1044 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 1033 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
1045 | "%d (%d):0263 Discovery Mailbox error: state: 0x%x : %p %p\n", | 1034 | "0263 Discovery Mailbox error: state: 0x%x : %p %p\n", |
1046 | phba->brd_no, vport->vpi, | 1035 | vport->port_state, sparam_mbox, cfglink_mbox); |
1047 | vport->port_state, sparam_mbox, cfglink_mbox); | ||
1048 | |||
1049 | lpfc_issue_clear_la(phba, vport); | 1036 | lpfc_issue_clear_la(phba, vport); |
1050 | return; | 1037 | return; |
1051 | } | 1038 | } |
@@ -1086,8 +1073,8 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1086 | /* Check for error */ | 1073 | /* Check for error */ |
1087 | if (mb->mbxStatus) { | 1074 | if (mb->mbxStatus) { |
1088 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, | 1075 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, |
1089 | "%d:1307 READ_LA mbox error x%x state x%x\n", | 1076 | "1307 READ_LA mbox error x%x state x%x\n", |
1090 | phba->brd_no, mb->mbxStatus, vport->port_state); | 1077 | mb->mbxStatus, vport->port_state); |
1091 | lpfc_mbx_issue_link_down(phba); | 1078 | lpfc_mbx_issue_link_down(phba); |
1092 | phba->link_state = LPFC_HBA_ERROR; | 1079 | phba->link_state = LPFC_HBA_ERROR; |
1093 | goto lpfc_mbx_cmpl_read_la_free_mbuf; | 1080 | goto lpfc_mbx_cmpl_read_la_free_mbuf; |
@@ -1118,26 +1105,26 @@ lpfc_mbx_cmpl_read_la(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1118 | phba->fc_stat.LinkUp++; | 1105 | phba->fc_stat.LinkUp++; |
1119 | if (phba->link_flag & LS_LOOPBACK_MODE) { | 1106 | if (phba->link_flag & LS_LOOPBACK_MODE) { |
1120 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, | 1107 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, |
1121 | "%d:1306 Link Up Event in loop back mode " | 1108 | "1306 Link Up Event in loop back mode " |
1122 | "x%x received Data: x%x x%x x%x x%x\n", | 1109 | "x%x received Data: x%x x%x x%x x%x\n", |
1123 | phba->brd_no, la->eventTag, phba->fc_eventTag, | 1110 | la->eventTag, phba->fc_eventTag, |
1124 | la->granted_AL_PA, la->UlnkSpeed, | 1111 | la->granted_AL_PA, la->UlnkSpeed, |
1125 | phba->alpa_map[0]); | 1112 | phba->alpa_map[0]); |
1126 | } else { | 1113 | } else { |
1127 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, | 1114 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, |
1128 | "%d:1303 Link Up Event x%x received " | 1115 | "1303 Link Up Event x%x received " |
1129 | "Data: x%x x%x x%x x%x\n", | 1116 | "Data: x%x x%x x%x x%x\n", |
1130 | phba->brd_no, la->eventTag, phba->fc_eventTag, | 1117 | la->eventTag, phba->fc_eventTag, |
1131 | la->granted_AL_PA, la->UlnkSpeed, | 1118 | la->granted_AL_PA, la->UlnkSpeed, |
1132 | phba->alpa_map[0]); | 1119 | phba->alpa_map[0]); |
1133 | } | 1120 | } |
1134 | lpfc_mbx_process_link_up(phba, la); | 1121 | lpfc_mbx_process_link_up(phba, la); |
1135 | } else { | 1122 | } else { |
1136 | phba->fc_stat.LinkDown++; | 1123 | phba->fc_stat.LinkDown++; |
1137 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, | 1124 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, |
1138 | "%d:1305 Link Down Event x%x received " | 1125 | "1305 Link Down Event x%x received " |
1139 | "Data: x%x x%x x%x\n", | 1126 | "Data: x%x x%x x%x\n", |
1140 | phba->brd_no, la->eventTag, phba->fc_eventTag, | 1127 | la->eventTag, phba->fc_eventTag, |
1141 | phba->pport->port_state, vport->fc_flag); | 1128 | phba->pport->port_state, vport->fc_flag); |
1142 | lpfc_mbx_issue_link_down(phba); | 1129 | lpfc_mbx_issue_link_down(phba); |
1143 | } | 1130 | } |
@@ -1185,10 +1172,9 @@ lpfc_mbx_cmpl_unreg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1185 | case 0x0011: | 1172 | case 0x0011: |
1186 | case 0x0020: | 1173 | case 0x0020: |
1187 | case 0x9700: | 1174 | case 0x9700: |
1188 | lpfc_printf_log(phba, KERN_INFO, LOG_NODE, | 1175 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
1189 | "%d (%d):0911 cmpl_unreg_vpi, " | 1176 | "0911 cmpl_unreg_vpi, mb status = 0x%x\n", |
1190 | "mb status = 0x%x\n", | 1177 | mb->mbxStatus); |
1191 | phba->brd_no, vport->vpi, mb->mbxStatus); | ||
1192 | break; | 1178 | break; |
1193 | } | 1179 | } |
1194 | vport->unreg_vpi_cmpl = VPORT_OK; | 1180 | vport->unreg_vpi_cmpl = VPORT_OK; |
@@ -1217,9 +1203,8 @@ lpfc_mbx_unreg_vpi(struct lpfc_vport *vport) | |||
1217 | mbox->mbox_cmpl = lpfc_mbx_cmpl_unreg_vpi; | 1203 | mbox->mbox_cmpl = lpfc_mbx_cmpl_unreg_vpi; |
1218 | rc = lpfc_sli_issue_mbox(phba, mbox, (MBX_NOWAIT | MBX_STOP_IOCB)); | 1204 | rc = lpfc_sli_issue_mbox(phba, mbox, (MBX_NOWAIT | MBX_STOP_IOCB)); |
1219 | if (rc == MBX_NOT_FINISHED) { | 1205 | if (rc == MBX_NOT_FINISHED) { |
1220 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_VPORT, | 1206 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT, |
1221 | "%d (%d):1800 Could not issue unreg_vpi\n", | 1207 | "1800 Could not issue unreg_vpi\n"); |
1222 | phba->brd_no, vport->vpi); | ||
1223 | mempool_free(mbox, phba->mbox_mem_pool); | 1208 | mempool_free(mbox, phba->mbox_mem_pool); |
1224 | vport->unreg_vpi_cmpl = VPORT_ERROR; | 1209 | vport->unreg_vpi_cmpl = VPORT_ERROR; |
1225 | } | 1210 | } |
@@ -1236,9 +1221,9 @@ lpfc_mbx_cmpl_reg_vpi(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1236 | case 0x0011: | 1221 | case 0x0011: |
1237 | case 0x9601: | 1222 | case 0x9601: |
1238 | case 0x9602: | 1223 | case 0x9602: |
1239 | lpfc_printf_log(phba, KERN_INFO, LOG_NODE, | 1224 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
1240 | "%d (%d):0912 cmpl_reg_vpi, mb status = 0x%x\n", | 1225 | "0912 cmpl_reg_vpi, mb status = 0x%x\n", |
1241 | phba->brd_no, vport->vpi, mb->mbxStatus); | 1226 | mb->mbxStatus); |
1242 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 1227 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
1243 | spin_lock_irq(shost->host_lock); | 1228 | spin_lock_irq(shost->host_lock); |
1244 | vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); | 1229 | vport->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); |
@@ -1300,10 +1285,9 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1300 | } | 1285 | } |
1301 | 1286 | ||
1302 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 1287 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
1303 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 1288 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX, |
1304 | "%d (%d):0258 Register Fabric login error: 0x%x\n", | 1289 | "0258 Register Fabric login error: 0x%x\n", |
1305 | phba->brd_no, vport->vpi, mb->mbxStatus); | 1290 | mb->mbxStatus); |
1306 | |||
1307 | return; | 1291 | return; |
1308 | } | 1292 | } |
1309 | 1293 | ||
@@ -1327,11 +1311,10 @@ lpfc_mbx_cmpl_fabric_reg_login(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb) | |||
1327 | LPFC_SLI3_NPIV_ENABLED) { | 1311 | LPFC_SLI3_NPIV_ENABLED) { |
1328 | lpfc_vport_set_state(vports[i], | 1312 | lpfc_vport_set_state(vports[i], |
1329 | FC_VPORT_NO_FABRIC_SUPP); | 1313 | FC_VPORT_NO_FABRIC_SUPP); |
1330 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1314 | lpfc_printf_vlog(vport, KERN_ERR, |
1331 | "%d (%d):0259 No NPIV " | 1315 | LOG_ELS, |
1332 | "Fabric support\n", | 1316 | "0259 No NPIV " |
1333 | phba->brd_no, | 1317 | "Fabric support\n"); |
1334 | vports[i]->vpi); | ||
1335 | } | 1318 | } |
1336 | } | 1319 | } |
1337 | lpfc_destroy_vport_work_array(vports); | 1320 | lpfc_destroy_vport_work_array(vports); |
@@ -1378,9 +1361,9 @@ out: | |||
1378 | return; | 1361 | return; |
1379 | } | 1362 | } |
1380 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 1363 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
1381 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 1364 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
1382 | "%d (%d):0260 Register NameServer error: 0x%x\n", | 1365 | "0260 Register NameServer error: 0x%x\n", |
1383 | phba->brd_no, vport->vpi, mb->mbxStatus); | 1366 | mb->mbxStatus); |
1384 | return; | 1367 | return; |
1385 | } | 1368 | } |
1386 | 1369 | ||
@@ -1605,12 +1588,11 @@ lpfc_nlp_set_state(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
1605 | int old_state = ndlp->nlp_state; | 1588 | int old_state = ndlp->nlp_state; |
1606 | char name1[16], name2[16]; | 1589 | char name1[16], name2[16]; |
1607 | 1590 | ||
1608 | lpfc_printf_log(vport->phba, KERN_INFO, LOG_NODE, | 1591 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
1609 | "%d (%d):0904 NPort state transition x%06x, %s -> %s\n", | 1592 | "0904 NPort state transition x%06x, %s -> %s\n", |
1610 | vport->phba->brd_no, vport->vpi, | 1593 | ndlp->nlp_DID, |
1611 | ndlp->nlp_DID, | 1594 | lpfc_nlp_state_name(name1, sizeof(name1), old_state), |
1612 | lpfc_nlp_state_name(name1, sizeof(name1), old_state), | 1595 | lpfc_nlp_state_name(name2, sizeof(name2), state)); |
1613 | lpfc_nlp_state_name(name2, sizeof(name2), state)); | ||
1614 | 1596 | ||
1615 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_NODE, | 1597 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_NODE, |
1616 | "node statechg did:x%x old:%d ste:%d", | 1598 | "node statechg did:x%x old:%d ste:%d", |
@@ -1702,12 +1684,12 @@ lpfc_set_disctmo(struct lpfc_vport *vport) | |||
1702 | spin_unlock_irq(shost->host_lock); | 1684 | spin_unlock_irq(shost->host_lock); |
1703 | 1685 | ||
1704 | /* Start Discovery Timer state <hba_state> */ | 1686 | /* Start Discovery Timer state <hba_state> */ |
1705 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1687 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1706 | "%d (%d):0247 Start Discovery Timer state x%x " | 1688 | "0247 Start Discovery Timer state x%x " |
1707 | "Data: x%x x%lx x%x x%x\n", | 1689 | "Data: x%x x%lx x%x x%x\n", |
1708 | phba->brd_no, vport->vpi, vport->port_state, tmo, | 1690 | vport->port_state, tmo, |
1709 | (unsigned long)&vport->fc_disctmo, vport->fc_plogi_cnt, | 1691 | (unsigned long)&vport->fc_disctmo, vport->fc_plogi_cnt, |
1710 | vport->fc_adisc_cnt); | 1692 | vport->fc_adisc_cnt); |
1711 | 1693 | ||
1712 | return; | 1694 | return; |
1713 | } | 1695 | } |
@@ -1719,7 +1701,6 @@ int | |||
1719 | lpfc_can_disctmo(struct lpfc_vport *vport) | 1701 | lpfc_can_disctmo(struct lpfc_vport *vport) |
1720 | { | 1702 | { |
1721 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 1703 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
1722 | struct lpfc_hba *phba = vport->phba; | ||
1723 | unsigned long iflags; | 1704 | unsigned long iflags; |
1724 | 1705 | ||
1725 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD, | 1706 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_ELS_CMD, |
@@ -1738,13 +1719,11 @@ lpfc_can_disctmo(struct lpfc_vport *vport) | |||
1738 | } | 1719 | } |
1739 | 1720 | ||
1740 | /* Cancel Discovery Timer state <hba_state> */ | 1721 | /* Cancel Discovery Timer state <hba_state> */ |
1741 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 1722 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
1742 | "%d (%d):0248 Cancel Discovery Timer state x%x " | 1723 | "0248 Cancel Discovery Timer state x%x " |
1743 | "Data: x%x x%x x%x\n", | 1724 | "Data: x%x x%x x%x\n", |
1744 | phba->brd_no, vport->vpi, vport->port_state, | 1725 | vport->port_state, vport->fc_flag, |
1745 | vport->fc_flag, vport->fc_plogi_cnt, | 1726 | vport->fc_plogi_cnt, vport->fc_adisc_cnt); |
1746 | vport->fc_adisc_cnt); | ||
1747 | |||
1748 | return 0; | 1727 | return 0; |
1749 | } | 1728 | } |
1750 | 1729 | ||
@@ -1927,10 +1906,9 @@ lpfc_unreg_default_rpis(struct lpfc_vport *vport) | |||
1927 | rc = lpfc_sli_issue_mbox(phba, mbox, | 1906 | rc = lpfc_sli_issue_mbox(phba, mbox, |
1928 | (MBX_NOWAIT | MBX_STOP_IOCB)); | 1907 | (MBX_NOWAIT | MBX_STOP_IOCB)); |
1929 | if (rc == MBX_NOT_FINISHED) { | 1908 | if (rc == MBX_NOT_FINISHED) { |
1930 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_VPORT, | 1909 | lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX | LOG_VPORT, |
1931 | "%d (%d):1815 Could not issue " | 1910 | "1815 Could not issue " |
1932 | "unreg_did (default rpis)\n", | 1911 | "unreg_did (default rpis)\n"); |
1933 | phba->brd_no, vport->vpi); | ||
1934 | mempool_free(mbox, phba->mbox_mem_pool); | 1912 | mempool_free(mbox, phba->mbox_mem_pool); |
1935 | } | 1913 | } |
1936 | } | 1914 | } |
@@ -1949,12 +1927,11 @@ lpfc_cleanup_node(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp) | |||
1949 | struct lpfc_dmabuf *mp; | 1927 | struct lpfc_dmabuf *mp; |
1950 | 1928 | ||
1951 | /* Cleanup node for NPort <nlp_DID> */ | 1929 | /* Cleanup node for NPort <nlp_DID> */ |
1952 | lpfc_printf_log(phba, KERN_INFO, LOG_NODE, | 1930 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
1953 | "%d (%d):0900 Cleanup node for NPort x%x " | 1931 | "0900 Cleanup node for NPort x%x " |
1954 | "Data: x%x x%x x%x\n", | 1932 | "Data: x%x x%x x%x\n", |
1955 | phba->brd_no, vport->vpi, ndlp->nlp_DID, ndlp->nlp_flag, | 1933 | ndlp->nlp_DID, ndlp->nlp_flag, |
1956 | ndlp->nlp_state, ndlp->nlp_rpi); | 1934 | ndlp->nlp_state, ndlp->nlp_rpi); |
1957 | |||
1958 | lpfc_dequeue_node(vport, ndlp); | 1935 | lpfc_dequeue_node(vport, ndlp); |
1959 | 1936 | ||
1960 | /* cleanup any ndlp on mbox q waiting for reglogin cmpl */ | 1937 | /* cleanup any ndlp on mbox q waiting for reglogin cmpl */ |
@@ -2086,7 +2063,6 @@ lpfc_matchdid(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
2086 | static struct lpfc_nodelist * | 2063 | static struct lpfc_nodelist * |
2087 | __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did) | 2064 | __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did) |
2088 | { | 2065 | { |
2089 | struct lpfc_hba *phba = vport->phba; | ||
2090 | struct lpfc_nodelist *ndlp; | 2066 | struct lpfc_nodelist *ndlp; |
2091 | uint32_t data1; | 2067 | uint32_t data1; |
2092 | 2068 | ||
@@ -2096,20 +2072,18 @@ __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did) | |||
2096 | ((uint32_t) ndlp->nlp_xri << 16) | | 2072 | ((uint32_t) ndlp->nlp_xri << 16) | |
2097 | ((uint32_t) ndlp->nlp_type << 8) | | 2073 | ((uint32_t) ndlp->nlp_type << 8) | |
2098 | ((uint32_t) ndlp->nlp_rpi & 0xff)); | 2074 | ((uint32_t) ndlp->nlp_rpi & 0xff)); |
2099 | lpfc_printf_log(phba, KERN_INFO, LOG_NODE, | 2075 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
2100 | "%d (%d):0929 FIND node DID " | 2076 | "0929 FIND node DID " |
2101 | " Data: x%p x%x x%x x%x\n", | 2077 | "Data: x%p x%x x%x x%x\n", |
2102 | phba->brd_no, vport->vpi, | 2078 | ndlp, ndlp->nlp_DID, |
2103 | ndlp, ndlp->nlp_DID, | 2079 | ndlp->nlp_flag, data1); |
2104 | ndlp->nlp_flag, data1); | ||
2105 | return ndlp; | 2080 | return ndlp; |
2106 | } | 2081 | } |
2107 | } | 2082 | } |
2108 | 2083 | ||
2109 | /* FIND node did <did> NOT FOUND */ | 2084 | /* FIND node did <did> NOT FOUND */ |
2110 | lpfc_printf_log(phba, KERN_INFO, LOG_NODE, | 2085 | lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE, |
2111 | "%d (%d):0932 FIND node did x%x NOT FOUND.\n", | 2086 | "0932 FIND node did x%x NOT FOUND.\n", did); |
2112 | phba->brd_no, vport->vpi, did); | ||
2113 | return NULL; | 2087 | return NULL; |
2114 | } | 2088 | } |
2115 | 2089 | ||
@@ -2301,12 +2275,11 @@ lpfc_disc_start(struct lpfc_vport *vport) | |||
2301 | vport->num_disc_nodes = 0; | 2275 | vport->num_disc_nodes = 0; |
2302 | 2276 | ||
2303 | /* Start Discovery state <hba_state> */ | 2277 | /* Start Discovery state <hba_state> */ |
2304 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2278 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2305 | "%d (%d):0202 Start Discovery hba state x%x " | 2279 | "0202 Start Discovery hba state x%x " |
2306 | "Data: x%x x%x x%x\n", | 2280 | "Data: x%x x%x x%x\n", |
2307 | phba->brd_no, vport->vpi, vport->port_state, | 2281 | vport->port_state, vport->fc_flag, vport->fc_plogi_cnt, |
2308 | vport->fc_flag, vport->fc_plogi_cnt, | 2282 | vport->fc_adisc_cnt); |
2309 | vport->fc_adisc_cnt); | ||
2310 | 2283 | ||
2311 | /* First do ADISCs - if any */ | 2284 | /* First do ADISCs - if any */ |
2312 | num_sent = lpfc_els_disc_adisc(vport); | 2285 | num_sent = lpfc_els_disc_adisc(vport); |
@@ -2524,10 +2497,8 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2524 | * FAN | 2497 | * FAN |
2525 | */ | 2498 | */ |
2526 | /* FAN timeout */ | 2499 | /* FAN timeout */ |
2527 | lpfc_printf_log(phba, KERN_WARNING, LOG_DISCOVERY, | 2500 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_DISCOVERY, |
2528 | "%d (%d):0221 FAN timeout\n", | 2501 | "0221 FAN timeout\n"); |
2529 | phba->brd_no, vport->vpi); | ||
2530 | |||
2531 | /* Start discovery by sending FLOGI, clean up old rpis */ | 2502 | /* Start discovery by sending FLOGI, clean up old rpis */ |
2532 | list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, | 2503 | list_for_each_entry_safe(ndlp, next_ndlp, &vport->fc_nodes, |
2533 | nlp_listp) { | 2504 | nlp_listp) { |
@@ -2554,10 +2525,9 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2554 | case LPFC_FLOGI: | 2525 | case LPFC_FLOGI: |
2555 | /* port_state is identically LPFC_FLOGI while waiting for FLOGI cmpl */ | 2526 | /* port_state is identically LPFC_FLOGI while waiting for FLOGI cmpl */ |
2556 | /* Initial FLOGI timeout */ | 2527 | /* Initial FLOGI timeout */ |
2557 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2528 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2558 | "%d (%d):0222 Initial %s timeout\n", | 2529 | "0222 Initial %s timeout\n", |
2559 | phba->brd_no, vport->vpi, | 2530 | vport->vpi ? "FLOGI" : "FDISC"); |
2560 | vport->vpi ? "FLOGI" : "FDISC"); | ||
2561 | 2531 | ||
2562 | /* Assume no Fabric and go on with discovery. | 2532 | /* Assume no Fabric and go on with discovery. |
2563 | * Check for outstanding ELS FLOGI to abort. | 2533 | * Check for outstanding ELS FLOGI to abort. |
@@ -2573,11 +2543,9 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2573 | case LPFC_FABRIC_CFG_LINK: | 2543 | case LPFC_FABRIC_CFG_LINK: |
2574 | /* hba_state is identically LPFC_FABRIC_CFG_LINK while waiting for | 2544 | /* hba_state is identically LPFC_FABRIC_CFG_LINK while waiting for |
2575 | NameServer login */ | 2545 | NameServer login */ |
2576 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2546 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2577 | "%d (%d):0223 Timeout while waiting for " | 2547 | "0223 Timeout while waiting for " |
2578 | "NameServer login\n", | 2548 | "NameServer login\n"); |
2579 | phba->brd_no, vport->vpi); | ||
2580 | |||
2581 | /* Next look for NameServer ndlp */ | 2549 | /* Next look for NameServer ndlp */ |
2582 | ndlp = lpfc_findnode_did(vport, NameServer_DID); | 2550 | ndlp = lpfc_findnode_did(vport, NameServer_DID); |
2583 | if (ndlp) | 2551 | if (ndlp) |
@@ -2588,11 +2556,10 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2588 | 2556 | ||
2589 | case LPFC_NS_QRY: | 2557 | case LPFC_NS_QRY: |
2590 | /* Check for wait for NameServer Rsp timeout */ | 2558 | /* Check for wait for NameServer Rsp timeout */ |
2591 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2559 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2592 | "%d (%d):0224 NameServer Query timeout " | 2560 | "0224 NameServer Query timeout " |
2593 | "Data: x%x x%x\n", | 2561 | "Data: x%x x%x\n", |
2594 | phba->brd_no, vport->vpi, | 2562 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); |
2595 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); | ||
2596 | 2563 | ||
2597 | if (vport->fc_ns_retry < LPFC_MAX_NS_RETRY) { | 2564 | if (vport->fc_ns_retry < LPFC_MAX_NS_RETRY) { |
2598 | /* Try it one more time */ | 2565 | /* Try it one more time */ |
@@ -2619,10 +2586,9 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2619 | /* Setup and issue mailbox INITIALIZE LINK command */ | 2586 | /* Setup and issue mailbox INITIALIZE LINK command */ |
2620 | initlinkmbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 2587 | initlinkmbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
2621 | if (!initlinkmbox) { | 2588 | if (!initlinkmbox) { |
2622 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2589 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2623 | "%d (%d):0206 Device Discovery " | 2590 | "0206 Device Discovery " |
2624 | "completion error\n", | 2591 | "completion error\n"); |
2625 | phba->brd_no, vport->vpi); | ||
2626 | phba->link_state = LPFC_HBA_ERROR; | 2592 | phba->link_state = LPFC_HBA_ERROR; |
2627 | break; | 2593 | break; |
2628 | } | 2594 | } |
@@ -2643,9 +2609,8 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2643 | 2609 | ||
2644 | case LPFC_DISC_AUTH: | 2610 | case LPFC_DISC_AUTH: |
2645 | /* Node Authentication timeout */ | 2611 | /* Node Authentication timeout */ |
2646 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2612 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2647 | "%d (%d):0227 Node Authentication timeout\n", | 2613 | "0227 Node Authentication timeout\n"); |
2648 | phba->brd_no, vport->vpi); | ||
2649 | lpfc_disc_flush_list(vport); | 2614 | lpfc_disc_flush_list(vport); |
2650 | 2615 | ||
2651 | /* | 2616 | /* |
@@ -2662,11 +2627,10 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2662 | 2627 | ||
2663 | case LPFC_VPORT_READY: | 2628 | case LPFC_VPORT_READY: |
2664 | if (vport->fc_flag & FC_RSCN_MODE) { | 2629 | if (vport->fc_flag & FC_RSCN_MODE) { |
2665 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2630 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2666 | "%d (%d):0231 RSCN timeout Data: x%x " | 2631 | "0231 RSCN timeout Data: x%x " |
2667 | "x%x\n", | 2632 | "x%x\n", |
2668 | phba->brd_no, vport->vpi, | 2633 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); |
2669 | vport->fc_ns_retry, LPFC_MAX_NS_RETRY); | ||
2670 | 2634 | ||
2671 | /* Cleanup any outstanding ELS commands */ | 2635 | /* Cleanup any outstanding ELS commands */ |
2672 | lpfc_els_flush_cmd(vport); | 2636 | lpfc_els_flush_cmd(vport); |
@@ -2677,20 +2641,17 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2677 | break; | 2641 | break; |
2678 | 2642 | ||
2679 | default: | 2643 | default: |
2680 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2644 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2681 | "%d (%d):0229 Unexpected discovery timeout, " | 2645 | "0229 Unexpected discovery timeout, " |
2682 | "vport State x%x\n", | 2646 | "vport State x%x\n", vport->port_state); |
2683 | phba->brd_no, vport->vpi, vport->port_state); | ||
2684 | |||
2685 | break; | 2647 | break; |
2686 | } | 2648 | } |
2687 | 2649 | ||
2688 | switch (phba->link_state) { | 2650 | switch (phba->link_state) { |
2689 | case LPFC_CLEAR_LA: | 2651 | case LPFC_CLEAR_LA: |
2690 | /* CLEAR LA timeout */ | 2652 | /* CLEAR LA timeout */ |
2691 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2653 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2692 | "%d (%d):0228 CLEAR LA timeout\n", | 2654 | "0228 CLEAR LA timeout\n"); |
2693 | phba->brd_no, vport->vpi); | ||
2694 | clrlaerr = 1; | 2655 | clrlaerr = 1; |
2695 | break; | 2656 | break; |
2696 | 2657 | ||
@@ -2701,10 +2662,9 @@ lpfc_disc_timeout_handler(struct lpfc_vport *vport) | |||
2701 | case LPFC_LINK_DOWN: | 2662 | case LPFC_LINK_DOWN: |
2702 | case LPFC_LINK_UP: | 2663 | case LPFC_LINK_UP: |
2703 | case LPFC_HBA_ERROR: | 2664 | case LPFC_HBA_ERROR: |
2704 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 2665 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
2705 | "%d (%d):0230 Unexpected timeout, hba link " | 2666 | "0230 Unexpected timeout, hba link " |
2706 | "state x%x\n", | 2667 | "state x%x\n", phba->link_state); |
2707 | phba->brd_no, vport->vpi, phba->link_state); | ||
2708 | clrlaerr = 1; | 2668 | clrlaerr = 1; |
2709 | break; | 2669 | break; |
2710 | 2670 | ||
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 83855a5a1826..7e5ea0774e58 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c | |||
@@ -107,10 +107,9 @@ lpfc_config_port_prep(struct lpfc_hba *phba) | |||
107 | 107 | ||
108 | if (rc != MBX_SUCCESS) { | 108 | if (rc != MBX_SUCCESS) { |
109 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, | 109 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX, |
110 | "%d:0324 Config Port initialization " | 110 | "0324 Config Port initialization " |
111 | "error, mbxCmd x%x READ_NVPARM, " | 111 | "error, mbxCmd x%x READ_NVPARM, " |
112 | "mbxStatus x%x\n", | 112 | "mbxStatus x%x\n", |
113 | phba->brd_no, | ||
114 | mb->mbxCommand, mb->mbxStatus); | 113 | mb->mbxCommand, mb->mbxStatus); |
115 | mempool_free(pmb, phba->mbox_mem_pool); | 114 | mempool_free(pmb, phba->mbox_mem_pool); |
116 | return -ERESTART; | 115 | return -ERESTART; |
@@ -128,9 +127,8 @@ lpfc_config_port_prep(struct lpfc_hba *phba) | |||
128 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 127 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
129 | if (rc != MBX_SUCCESS) { | 128 | if (rc != MBX_SUCCESS) { |
130 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 129 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
131 | "%d:0439 Adapter failed to init, mbxCmd x%x " | 130 | "0439 Adapter failed to init, mbxCmd x%x " |
132 | "READ_REV, mbxStatus x%x\n", | 131 | "READ_REV, mbxStatus x%x\n", |
133 | phba->brd_no, | ||
134 | mb->mbxCommand, mb->mbxStatus); | 132 | mb->mbxCommand, mb->mbxStatus); |
135 | mempool_free( pmb, phba->mbox_mem_pool); | 133 | mempool_free( pmb, phba->mbox_mem_pool); |
136 | return -ERESTART; | 134 | return -ERESTART; |
@@ -144,9 +142,8 @@ lpfc_config_port_prep(struct lpfc_hba *phba) | |||
144 | if (mb->un.varRdRev.rr == 0) { | 142 | if (mb->un.varRdRev.rr == 0) { |
145 | vp->rev.rBit = 0; | 143 | vp->rev.rBit = 0; |
146 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 144 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
147 | "%d:0440 Adapter failed to init, READ_REV has " | 145 | "0440 Adapter failed to init, READ_REV has " |
148 | "missing revision information.\n", | 146 | "missing revision information.\n"); |
149 | phba->brd_no); | ||
150 | mempool_free(pmb, phba->mbox_mem_pool); | 147 | mempool_free(pmb, phba->mbox_mem_pool); |
151 | return -ERESTART; | 148 | return -ERESTART; |
152 | } | 149 | } |
@@ -197,9 +194,8 @@ lpfc_config_port_prep(struct lpfc_hba *phba) | |||
197 | 194 | ||
198 | if (rc != MBX_SUCCESS) { | 195 | if (rc != MBX_SUCCESS) { |
199 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 196 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
200 | "%d:0441 VPD not present on adapter, " | 197 | "0441 VPD not present on adapter, " |
201 | "mbxCmd x%x DUMP VPD, mbxStatus x%x\n", | 198 | "mbxCmd x%x DUMP VPD, mbxStatus x%x\n", |
202 | phba->brd_no, | ||
203 | mb->mbxCommand, mb->mbxStatus); | 199 | mb->mbxCommand, mb->mbxStatus); |
204 | mb->un.varDmp.word_cnt = 0; | 200 | mb->un.varDmp.word_cnt = 0; |
205 | } | 201 | } |
@@ -253,9 +249,8 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
253 | pmb->vport = vport; | 249 | pmb->vport = vport; |
254 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { | 250 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { |
255 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 251 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
256 | "%d:0448 Adapter failed init, mbxCmd x%x " | 252 | "0448 Adapter failed init, mbxCmd x%x " |
257 | "READ_SPARM mbxStatus x%x\n", | 253 | "READ_SPARM mbxStatus x%x\n", |
258 | phba->brd_no, | ||
259 | mb->mbxCommand, mb->mbxStatus); | 254 | mb->mbxCommand, mb->mbxStatus); |
260 | phba->link_state = LPFC_HBA_ERROR; | 255 | phba->link_state = LPFC_HBA_ERROR; |
261 | mp = (struct lpfc_dmabuf *) pmb->context1; | 256 | mp = (struct lpfc_dmabuf *) pmb->context1; |
@@ -312,9 +307,8 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
312 | pmb->vport = vport; | 307 | pmb->vport = vport; |
313 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { | 308 | if (lpfc_sli_issue_mbox(phba, pmb, MBX_POLL) != MBX_SUCCESS) { |
314 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 309 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
315 | "%d:0453 Adapter failed to init, mbxCmd x%x " | 310 | "0453 Adapter failed to init, mbxCmd x%x " |
316 | "READ_CONFIG, mbxStatus x%x\n", | 311 | "READ_CONFIG, mbxStatus x%x\n", |
317 | phba->brd_no, | ||
318 | mb->mbxCommand, mb->mbxStatus); | 312 | mb->mbxCommand, mb->mbxStatus); |
319 | phba->link_state = LPFC_HBA_ERROR; | 313 | phba->link_state = LPFC_HBA_ERROR; |
320 | mempool_free( pmb, phba->mbox_mem_pool); | 314 | mempool_free( pmb, phba->mbox_mem_pool); |
@@ -344,9 +338,8 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
344 | && !(phba->lmt & LMT_10Gb))) { | 338 | && !(phba->lmt & LMT_10Gb))) { |
345 | /* Reset link speed to auto */ | 339 | /* Reset link speed to auto */ |
346 | lpfc_printf_log(phba, KERN_WARNING, LOG_LINK_EVENT, | 340 | lpfc_printf_log(phba, KERN_WARNING, LOG_LINK_EVENT, |
347 | "%d:1302 Invalid speed for this board: " | 341 | "1302 Invalid speed for this board: " |
348 | "Reset link speed to auto: x%x\n", | 342 | "Reset link speed to auto: x%x\n", |
349 | phba->brd_no, | ||
350 | phba->cfg_link_speed); | 343 | phba->cfg_link_speed); |
351 | phba->cfg_link_speed = LINK_SPEED_AUTO; | 344 | phba->cfg_link_speed = LINK_SPEED_AUTO; |
352 | } | 345 | } |
@@ -402,9 +395,8 @@ lpfc_config_port_post(struct lpfc_hba *phba) | |||
402 | lpfc_set_loopback_flag(phba); | 395 | lpfc_set_loopback_flag(phba); |
403 | if (rc != MBX_SUCCESS) { | 396 | if (rc != MBX_SUCCESS) { |
404 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 397 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
405 | "%d:0454 Adapter failed to init, mbxCmd x%x " | 398 | "0454 Adapter failed to init, mbxCmd x%x " |
406 | "INIT_LINK, mbxStatus x%x\n", | 399 | "INIT_LINK, mbxStatus x%x\n", |
407 | phba->brd_no, | ||
408 | mb->mbxCommand, mb->mbxStatus); | 400 | mb->mbxCommand, mb->mbxStatus); |
409 | 401 | ||
410 | /* Clear all interrupt enable conditions */ | 402 | /* Clear all interrupt enable conditions */ |
@@ -588,8 +580,8 @@ lpfc_hb_timeout_handler(struct lpfc_hba *phba) | |||
588 | * need to take the HBA offline. | 580 | * need to take the HBA offline. |
589 | */ | 581 | */ |
590 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 582 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
591 | "%d:0459 Adapter heartbeat failure, taking " | 583 | "0459 Adapter heartbeat failure, taking " |
592 | "this port offline.\n", phba->brd_no); | 584 | "this port offline.\n"); |
593 | 585 | ||
594 | spin_lock_irq(&phba->hbalock); | 586 | spin_lock_irq(&phba->hbalock); |
595 | psli->sli_flag &= ~LPFC_SLI2_ACTIVE; | 587 | psli->sli_flag &= ~LPFC_SLI2_ACTIVE; |
@@ -631,9 +623,9 @@ lpfc_handle_eratt(struct lpfc_hba *phba) | |||
631 | phba->work_hs & HS_FFER5) { | 623 | phba->work_hs & HS_FFER5) { |
632 | /* Re-establishing Link */ | 624 | /* Re-establishing Link */ |
633 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, | 625 | lpfc_printf_log(phba, KERN_INFO, LOG_LINK_EVENT, |
634 | "%d:1301 Re-establishing Link " | 626 | "1301 Re-establishing Link " |
635 | "Data: x%x x%x x%x\n", | 627 | "Data: x%x x%x x%x\n", |
636 | phba->brd_no, phba->work_hs, | 628 | phba->work_hs, |
637 | phba->work_status[0], phba->work_status[1]); | 629 | phba->work_status[0], phba->work_status[1]); |
638 | vports = lpfc_create_vport_work_array(phba); | 630 | vports = lpfc_create_vport_work_array(phba); |
639 | if (vports != NULL) | 631 | if (vports != NULL) |
@@ -679,9 +671,9 @@ lpfc_handle_eratt(struct lpfc_hba *phba) | |||
679 | * twice. This is the adapter hardware error path. | 671 | * twice. This is the adapter hardware error path. |
680 | */ | 672 | */ |
681 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 673 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
682 | "%d:0457 Adapter Hardware Error " | 674 | "0457 Adapter Hardware Error " |
683 | "Data: x%x x%x x%x\n", | 675 | "Data: x%x x%x x%x\n", |
684 | phba->brd_no, phba->work_hs, | 676 | phba->work_hs, |
685 | phba->work_status[0], phba->work_status[1]); | 677 | phba->work_status[0], phba->work_status[1]); |
686 | 678 | ||
687 | event_data = FC_REG_DUMP_EVENT; | 679 | event_data = FC_REG_DUMP_EVENT; |
@@ -777,8 +769,7 @@ lpfc_handle_latt_err_exit: | |||
777 | /* The other case is an error from issue_mbox */ | 769 | /* The other case is an error from issue_mbox */ |
778 | if (rc == -ENOMEM) | 770 | if (rc == -ENOMEM) |
779 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, | 771 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, |
780 | "%d:0300 READ_LA: no buffers\n", | 772 | "0300 READ_LA: no buffers\n"); |
781 | phba->brd_no); | ||
782 | 773 | ||
783 | return; | 774 | return; |
784 | } | 775 | } |
@@ -803,8 +794,7 @@ lpfc_parse_vpd(struct lpfc_hba *phba, uint8_t *vpd, int len) | |||
803 | 794 | ||
804 | /* Vital Product */ | 795 | /* Vital Product */ |
805 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 796 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
806 | "%d:0455 Vital Product Data: x%x x%x x%x x%x\n", | 797 | "0455 Vital Product Data: x%x x%x x%x x%x\n", |
807 | phba->brd_no, | ||
808 | (uint32_t) vpd[0], (uint32_t) vpd[1], (uint32_t) vpd[2], | 798 | (uint32_t) vpd[0], (uint32_t) vpd[1], (uint32_t) vpd[2], |
809 | (uint32_t) vpd[3]); | 799 | (uint32_t) vpd[3]); |
810 | while (!finished && (index < (len - 4))) { | 800 | while (!finished && (index < (len - 4))) { |
@@ -1323,10 +1313,9 @@ lpfc_establish_link_tmo(unsigned long ptr) | |||
1323 | 1313 | ||
1324 | /* Re-establishing Link, timer expired */ | 1314 | /* Re-establishing Link, timer expired */ |
1325 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, | 1315 | lpfc_printf_log(phba, KERN_ERR, LOG_LINK_EVENT, |
1326 | "%d:1300 Re-establishing Link, timer expired " | 1316 | "1300 Re-establishing Link, timer expired " |
1327 | "Data: x%x x%x\n", | 1317 | "Data: x%x x%x\n", |
1328 | phba->brd_no, phba->pport->fc_flag, | 1318 | phba->pport->fc_flag, phba->pport->port_state); |
1329 | phba->pport->port_state); | ||
1330 | vports = lpfc_create_vport_work_array(phba); | 1319 | vports = lpfc_create_vport_work_array(phba); |
1331 | if (vports != NULL) | 1320 | if (vports != NULL) |
1332 | for(i = 0; i < LPFC_MAX_VPORTS && vports[i] != NULL; i++) { | 1321 | for(i = 0; i < LPFC_MAX_VPORTS && vports[i] != NULL; i++) { |
@@ -1382,8 +1371,7 @@ lpfc_online(struct lpfc_hba *phba) | |||
1382 | return 0; | 1371 | return 0; |
1383 | 1372 | ||
1384 | lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, | 1373 | lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, |
1385 | "%d:0458 Bring Adapter online\n", | 1374 | "0458 Bring Adapter online\n"); |
1386 | phba->brd_no); | ||
1387 | 1375 | ||
1388 | lpfc_block_mgmt_io(phba); | 1376 | lpfc_block_mgmt_io(phba); |
1389 | 1377 | ||
@@ -1468,8 +1456,7 @@ lpfc_offline(struct lpfc_hba *phba) | |||
1468 | /* stop all timers associated with this hba */ | 1456 | /* stop all timers associated with this hba */ |
1469 | lpfc_stop_phba_timers(phba); | 1457 | lpfc_stop_phba_timers(phba); |
1470 | lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, | 1458 | lpfc_printf_log(phba, KERN_WARNING, LOG_INIT, |
1471 | "%d:0460 Bring Adapter offline\n", | 1459 | "0460 Bring Adapter offline\n"); |
1472 | phba->brd_no); | ||
1473 | /* Bring down the SLI Layer and cleanup. The HBA is offline | 1460 | /* Bring down the SLI Layer and cleanup. The HBA is offline |
1474 | now. */ | 1461 | now. */ |
1475 | lpfc_sli_hba_down(phba); | 1462 | lpfc_sli_hba_down(phba); |
@@ -1648,17 +1635,15 @@ int lpfc_scan_finished(struct Scsi_Host *shost, unsigned long time) | |||
1648 | } | 1635 | } |
1649 | if (time >= 30 * HZ) { | 1636 | if (time >= 30 * HZ) { |
1650 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 1637 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
1651 | "%d:0461 Scanning longer than 30 " | 1638 | "0461 Scanning longer than 30 " |
1652 | "seconds. Continuing initialization\n", | 1639 | "seconds. Continuing initialization\n"); |
1653 | phba->brd_no); | ||
1654 | stat = 1; | 1640 | stat = 1; |
1655 | goto finished; | 1641 | goto finished; |
1656 | } | 1642 | } |
1657 | if (time >= 15 * HZ && phba->link_state <= LPFC_LINK_DOWN) { | 1643 | if (time >= 15 * HZ && phba->link_state <= LPFC_LINK_DOWN) { |
1658 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 1644 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
1659 | "%d:0465 Link down longer than 15 " | 1645 | "0465 Link down longer than 15 " |
1660 | "seconds. Continuing initialization\n", | 1646 | "seconds. Continuing initialization\n"); |
1661 | phba->brd_no); | ||
1662 | stat = 1; | 1647 | stat = 1; |
1663 | goto finished; | 1648 | goto finished; |
1664 | } | 1649 | } |
@@ -1910,17 +1895,16 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid) | |||
1910 | if (phba->cfg_use_msi) { | 1895 | if (phba->cfg_use_msi) { |
1911 | error = pci_enable_msi(phba->pcidev); | 1896 | error = pci_enable_msi(phba->pcidev); |
1912 | if (error) | 1897 | if (error) |
1913 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, "%d:0452 " | 1898 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
1914 | "Enable MSI failed, continuing with " | 1899 | "0452 Enable MSI failed, continuing " |
1915 | "IRQ\n", phba->brd_no); | 1900 | "with IRQ\n"); |
1916 | } | 1901 | } |
1917 | 1902 | ||
1918 | error = request_irq(phba->pcidev->irq, lpfc_intr_handler, IRQF_SHARED, | 1903 | error = request_irq(phba->pcidev->irq, lpfc_intr_handler, IRQF_SHARED, |
1919 | LPFC_DRIVER_NAME, phba); | 1904 | LPFC_DRIVER_NAME, phba); |
1920 | if (error) { | 1905 | if (error) { |
1921 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 1906 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
1922 | "%d:0451 Enable interrupt handler failed\n", | 1907 | "0451 Enable interrupt handler failed\n"); |
1923 | phba->brd_no); | ||
1924 | goto out_disable_msi; | 1908 | goto out_disable_msi; |
1925 | } | 1909 | } |
1926 | 1910 | ||
diff --git a/drivers/scsi/lpfc/lpfc_logmsg.h b/drivers/scsi/lpfc/lpfc_logmsg.h index 8a6ceffeabcf..626e4d878725 100644 --- a/drivers/scsi/lpfc/lpfc_logmsg.h +++ b/drivers/scsi/lpfc/lpfc_logmsg.h | |||
@@ -33,6 +33,12 @@ | |||
33 | #define LOG_VPORT 0x4000 /* NPIV events */ | 33 | #define LOG_VPORT 0x4000 /* NPIV events */ |
34 | #define LOG_ALL_MSG 0xffff /* LOG all messages */ | 34 | #define LOG_ALL_MSG 0xffff /* LOG all messages */ |
35 | 35 | ||
36 | #define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \ | ||
37 | { if (((mask) &(vport)->cfg_log_verbose) || (level[1] <= '3')) \ | ||
38 | dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \ | ||
39 | fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } | ||
40 | |||
36 | #define lpfc_printf_log(phba, level, mask, fmt, arg...) \ | 41 | #define lpfc_printf_log(phba, level, mask, fmt, arg...) \ |
37 | { if (((mask) &(phba)->cfg_log_verbose) || (level[1] <= '3')) \ | 42 | { if (((mask) &(phba)->pport->cfg_log_verbose) || (level[1] <= '3')) \ |
38 | dev_printk(level, &((phba)->pcidev)->dev, fmt, ##arg); } | 43 | dev_printk(level, &((phba)->pcidev)->dev, "%d:" \ |
44 | fmt, phba->brd_no, ##arg); } | ||
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c index 8f42fbfdd29e..5fa1c6f70a98 100644 --- a/drivers/scsi/lpfc/lpfc_mbox.c +++ b/drivers/scsi/lpfc/lpfc_mbox.c | |||
@@ -275,11 +275,8 @@ lpfc_read_sparam(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb, int vpi) | |||
275 | kfree(mp); | 275 | kfree(mp); |
276 | mb->mbxCommand = MBX_READ_SPARM64; | 276 | mb->mbxCommand = MBX_READ_SPARM64; |
277 | /* READ_SPARAM: no buffers */ | 277 | /* READ_SPARAM: no buffers */ |
278 | lpfc_printf_log(phba, | 278 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, |
279 | KERN_WARNING, | 279 | "0301 READ_SPARAM: no buffers\n"); |
280 | LOG_MBOX, | ||
281 | "%d:0301 READ_SPARAM: no buffers\n", | ||
282 | phba->brd_no); | ||
283 | return (1); | 280 | return (1); |
284 | } | 281 | } |
285 | INIT_LIST_HEAD(&mp->list); | 282 | INIT_LIST_HEAD(&mp->list); |
@@ -378,9 +375,8 @@ lpfc_reg_login(struct lpfc_hba *phba, uint16_t vpi, uint32_t did, | |||
378 | mb->mbxCommand = MBX_REG_LOGIN64; | 375 | mb->mbxCommand = MBX_REG_LOGIN64; |
379 | /* REG_LOGIN: no buffers */ | 376 | /* REG_LOGIN: no buffers */ |
380 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, | 377 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX, |
381 | "%d (%d):0302 REG_LOGIN: no buffers, DID x%x, " | 378 | "0302 REG_LOGIN: no buffers, VPI:%d DID:x%x, " |
382 | "flag x%x\n", | 379 | "flag x%x\n", vpi, did, flag); |
383 | phba->brd_no, vpi, did, flag); | ||
384 | return (1); | 380 | return (1); |
385 | } | 381 | } |
386 | INIT_LIST_HEAD(&mp->list); | 382 | INIT_LIST_HEAD(&mp->list); |
diff --git a/drivers/scsi/lpfc/lpfc_nportdisc.c b/drivers/scsi/lpfc/lpfc_nportdisc.c index 9c159a8e6e8c..66ba51cbeb50 100644 --- a/drivers/scsi/lpfc/lpfc_nportdisc.c +++ b/drivers/scsi/lpfc/lpfc_nportdisc.c | |||
@@ -133,15 +133,15 @@ lpfc_check_sparm(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
133 | memcpy(&ndlp->nlp_portname, &sp->portName, sizeof (struct lpfc_name)); | 133 | memcpy(&ndlp->nlp_portname, &sp->portName, sizeof (struct lpfc_name)); |
134 | return 1; | 134 | return 1; |
135 | bad_service_param: | 135 | bad_service_param: |
136 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_DISCOVERY, | 136 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
137 | "%d (%d):0207 Device %x " | 137 | "0207 Device %x " |
138 | "(%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x) sent " | 138 | "(%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x) sent " |
139 | "invalid service parameters. Ignoring device.\n", | 139 | "invalid service parameters. Ignoring device.\n", |
140 | vport->phba->brd_no, ndlp->vport->vpi, ndlp->nlp_DID, | 140 | ndlp->nlp_DID, |
141 | sp->nodeName.u.wwn[0], sp->nodeName.u.wwn[1], | 141 | sp->nodeName.u.wwn[0], sp->nodeName.u.wwn[1], |
142 | sp->nodeName.u.wwn[2], sp->nodeName.u.wwn[3], | 142 | sp->nodeName.u.wwn[2], sp->nodeName.u.wwn[3], |
143 | sp->nodeName.u.wwn[4], sp->nodeName.u.wwn[5], | 143 | sp->nodeName.u.wwn[4], sp->nodeName.u.wwn[5], |
144 | sp->nodeName.u.wwn[6], sp->nodeName.u.wwn[7]); | 144 | sp->nodeName.u.wwn[6], sp->nodeName.u.wwn[7]); |
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
@@ -194,11 +194,11 @@ lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp) | |||
194 | IOCB_t *cmd; | 194 | IOCB_t *cmd; |
195 | 195 | ||
196 | /* Abort outstanding I/O on NPort <nlp_DID> */ | 196 | /* Abort outstanding I/O on NPort <nlp_DID> */ |
197 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 197 | lpfc_printf_vlog(ndlp->vport, KERN_INFO, LOG_DISCOVERY, |
198 | "%d (%d):0205 Abort outstanding I/O on NPort x%x " | 198 | "0205 Abort outstanding I/O on NPort x%x " |
199 | "Data: x%x x%x x%x\n", | 199 | "Data: x%x x%x x%x\n", |
200 | phba->brd_no, ndlp->vport->vpi, ndlp->nlp_DID, | 200 | ndlp->nlp_DID, ndlp->nlp_flag, ndlp->nlp_state, |
201 | ndlp->nlp_flag, ndlp->nlp_state, ndlp->nlp_rpi); | 201 | ndlp->nlp_rpi); |
202 | 202 | ||
203 | lpfc_fabric_abort_nport(ndlp); | 203 | lpfc_fabric_abort_nport(ndlp); |
204 | 204 | ||
@@ -298,11 +298,10 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
298 | icmd = &cmdiocb->iocb; | 298 | icmd = &cmdiocb->iocb; |
299 | 299 | ||
300 | /* PLOGI chkparm OK */ | 300 | /* PLOGI chkparm OK */ |
301 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 301 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
302 | "%d (%d):0114 PLOGI chkparm OK Data: x%x x%x x%x x%x\n", | 302 | "0114 PLOGI chkparm OK Data: x%x x%x x%x x%x\n", |
303 | phba->brd_no, vport->vpi, | 303 | ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag, |
304 | ndlp->nlp_DID, ndlp->nlp_state, ndlp->nlp_flag, | 304 | ndlp->nlp_rpi); |
305 | ndlp->nlp_rpi); | ||
306 | 305 | ||
307 | if (vport->cfg_fcp_class == 2 && sp->cls2.classValid) | 306 | if (vport->cfg_fcp_class == 2 && sp->cls2.classValid) |
308 | ndlp->nlp_fcp_info |= CLASS2; | 307 | ndlp->nlp_fcp_info |= CLASS2; |
@@ -582,12 +581,11 @@ static uint32_t | |||
582 | lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | 581 | lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, |
583 | void *arg, uint32_t evt) | 582 | void *arg, uint32_t evt) |
584 | { | 583 | { |
585 | lpfc_printf_log(vport->phba, KERN_ERR, LOG_DISCOVERY, | 584 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
586 | "%d (%d):0253 Illegal State Transition: node x%x " | 585 | "0253 Illegal State Transition: node x%x " |
587 | "event x%x, state x%x Data: x%x x%x\n", | 586 | "event x%x, state x%x Data: x%x x%x\n", |
588 | vport->phba->brd_no, vport->vpi, | 587 | ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, |
589 | ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi, | 588 | ndlp->nlp_flag); |
590 | ndlp->nlp_flag); | ||
591 | return ndlp->nlp_state; | 589 | return ndlp->nlp_state; |
592 | } | 590 | } |
593 | 591 | ||
@@ -777,15 +775,11 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
777 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); | 775 | sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t)); |
778 | if (!lpfc_check_sparm(vport, ndlp, sp, CLASS3)) | 776 | if (!lpfc_check_sparm(vport, ndlp, sp, CLASS3)) |
779 | goto out; | 777 | goto out; |
780 | |||
781 | /* PLOGI chkparm OK */ | 778 | /* PLOGI chkparm OK */ |
782 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 779 | lpfc_printf_vlog(vport, KERN_INFO, LOG_ELS, |
783 | "%d (%d):0121 PLOGI chkparm OK " | 780 | "0121 PLOGI chkparm OK Data: x%x x%x x%x x%x\n", |
784 | "Data: x%x x%x x%x x%x\n", | 781 | ndlp->nlp_DID, ndlp->nlp_state, |
785 | phba->brd_no, vport->vpi, | 782 | ndlp->nlp_flag, ndlp->nlp_rpi); |
786 | ndlp->nlp_DID, ndlp->nlp_state, | ||
787 | ndlp->nlp_flag, ndlp->nlp_rpi); | ||
788 | |||
789 | if (vport->cfg_fcp_class == 2 && (sp->cls2.classValid)) | 783 | if (vport->cfg_fcp_class == 2 && (sp->cls2.classValid)) |
790 | ndlp->nlp_fcp_info |= CLASS2; | 784 | ndlp->nlp_fcp_info |= CLASS2; |
791 | else | 785 | else |
@@ -805,10 +799,9 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
805 | 799 | ||
806 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); | 800 | mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL); |
807 | if (!mbox) { | 801 | if (!mbox) { |
808 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 802 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
809 | "%d (%d):0133 PLOGI: no memory for reg_login " | 803 | "0133 PLOGI: no memory for reg_login " |
810 | "Data: x%x x%x x%x x%x\n", | 804 | "Data: x%x x%x x%x x%x\n", |
811 | phba->brd_no, vport->vpi, | ||
812 | ndlp->nlp_DID, ndlp->nlp_state, | 805 | ndlp->nlp_DID, ndlp->nlp_state, |
813 | ndlp->nlp_flag, ndlp->nlp_rpi); | 806 | ndlp->nlp_flag, ndlp->nlp_rpi); |
814 | goto out; | 807 | goto out; |
@@ -843,30 +836,27 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport, | |||
843 | kfree(mp); | 836 | kfree(mp); |
844 | mempool_free(mbox, phba->mbox_mem_pool); | 837 | mempool_free(mbox, phba->mbox_mem_pool); |
845 | 838 | ||
846 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 839 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
847 | "%d (%d):0134 PLOGI: cannot issue reg_login " | 840 | "0134 PLOGI: cannot issue reg_login " |
848 | "Data: x%x x%x x%x x%x\n", | 841 | "Data: x%x x%x x%x x%x\n", |
849 | phba->brd_no, vport->vpi, | 842 | ndlp->nlp_DID, ndlp->nlp_state, |
850 | ndlp->nlp_DID, ndlp->nlp_state, | 843 | ndlp->nlp_flag, ndlp->nlp_rpi); |
851 | ndlp->nlp_flag, ndlp->nlp_rpi); | ||
852 | } else { | 844 | } else { |
853 | mempool_free(mbox, phba->mbox_mem_pool); | 845 | mempool_free(mbox, phba->mbox_mem_pool); |
854 | 846 | ||
855 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 847 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
856 | "%d (%d):0135 PLOGI: cannot format reg_login " | 848 | "0135 PLOGI: cannot format reg_login " |
857 | "Data: x%x x%x x%x x%x\n", | 849 | "Data: x%x x%x x%x x%x\n", |
858 | phba->brd_no, vport->vpi, | 850 | ndlp->nlp_DID, ndlp->nlp_state, |
859 | ndlp->nlp_DID, ndlp->nlp_state, | 851 | ndlp->nlp_flag, ndlp->nlp_rpi); |
860 | ndlp->nlp_flag, ndlp->nlp_rpi); | ||
861 | } | 852 | } |
862 | 853 | ||
863 | 854 | ||
864 | out: | 855 | out: |
865 | if (ndlp->nlp_DID == NameServer_DID) { | 856 | if (ndlp->nlp_DID == NameServer_DID) { |
866 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 857 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
867 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 858 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
868 | "%d (%d):0261 Cannot Register NameServer login\n", | 859 | "0261 Cannot Register NameServer login\n"); |
869 | phba->brd_no, vport->vpi); | ||
870 | } | 860 | } |
871 | 861 | ||
872 | /* Free this node since the driver cannot login or has the wrong | 862 | /* Free this node since the driver cannot login or has the wrong |
@@ -1188,19 +1178,15 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport, | |||
1188 | uint32_t evt) | 1178 | uint32_t evt) |
1189 | { | 1179 | { |
1190 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); | 1180 | struct Scsi_Host *shost = lpfc_shost_from_vport(vport); |
1191 | struct lpfc_hba *phba = vport->phba; | ||
1192 | LPFC_MBOXQ_t *pmb = (LPFC_MBOXQ_t *) arg; | 1181 | LPFC_MBOXQ_t *pmb = (LPFC_MBOXQ_t *) arg; |
1193 | MAILBOX_t *mb = &pmb->mb; | 1182 | MAILBOX_t *mb = &pmb->mb; |
1194 | uint32_t did = mb->un.varWords[1]; | 1183 | uint32_t did = mb->un.varWords[1]; |
1195 | 1184 | ||
1196 | if (mb->mbxStatus) { | 1185 | if (mb->mbxStatus) { |
1197 | /* RegLogin failed */ | 1186 | /* RegLogin failed */ |
1198 | lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY, | 1187 | lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY, |
1199 | "%d (%d):0246 RegLogin failed Data: x%x x%x " | 1188 | "0246 RegLogin failed Data: x%x x%x x%x\n", |
1200 | "x%x\n", | ||
1201 | phba->brd_no, vport->vpi, | ||
1202 | did, mb->mbxStatus, vport->port_state); | 1189 | did, mb->mbxStatus, vport->port_state); |
1203 | |||
1204 | /* | 1190 | /* |
1205 | * If RegLogin failed due to lack of HBA resources do not | 1191 | * If RegLogin failed due to lack of HBA resources do not |
1206 | * retry discovery. | 1192 | * retry discovery. |
@@ -2046,7 +2032,6 @@ int | |||
2046 | lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | 2032 | lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, |
2047 | void *arg, uint32_t evt) | 2033 | void *arg, uint32_t evt) |
2048 | { | 2034 | { |
2049 | struct lpfc_hba *phba = vport->phba; | ||
2050 | uint32_t cur_state, rc; | 2035 | uint32_t cur_state, rc; |
2051 | uint32_t(*func) (struct lpfc_vport *, struct lpfc_nodelist *, void *, | 2036 | uint32_t(*func) (struct lpfc_vport *, struct lpfc_nodelist *, void *, |
2052 | uint32_t); | 2037 | uint32_t); |
@@ -2055,11 +2040,10 @@ lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
2055 | cur_state = ndlp->nlp_state; | 2040 | cur_state = ndlp->nlp_state; |
2056 | 2041 | ||
2057 | /* DSM in event <evt> on NPort <nlp_DID> in state <cur_state> */ | 2042 | /* DSM in event <evt> on NPort <nlp_DID> in state <cur_state> */ |
2058 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2043 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2059 | "%d (%d):0211 DSM in event x%x on NPort x%x in " | 2044 | "0211 DSM in event x%x on NPort x%x in " |
2060 | "state %d Data: x%x\n", | 2045 | "state %d Data: x%x\n", |
2061 | phba->brd_no, vport->vpi, | 2046 | evt, ndlp->nlp_DID, cur_state, ndlp->nlp_flag); |
2062 | evt, ndlp->nlp_DID, cur_state, ndlp->nlp_flag); | ||
2063 | 2047 | ||
2064 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_DSM, | 2048 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_DSM, |
2065 | "DSM in: evt:%d ste:%d did:x%x", | 2049 | "DSM in: evt:%d ste:%d did:x%x", |
@@ -2069,11 +2053,9 @@ lpfc_disc_state_machine(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp, | |||
2069 | rc = (func) (vport, ndlp, arg, evt); | 2053 | rc = (func) (vport, ndlp, arg, evt); |
2070 | 2054 | ||
2071 | /* DSM out state <rc> on NPort <nlp_DID> */ | 2055 | /* DSM out state <rc> on NPort <nlp_DID> */ |
2072 | lpfc_printf_log(phba, KERN_INFO, LOG_DISCOVERY, | 2056 | lpfc_printf_vlog(vport, KERN_INFO, LOG_DISCOVERY, |
2073 | "%d (%d):0212 DSM out state %d on NPort x%x " | 2057 | "0212 DSM out state %d on NPort x%x Data: x%x\n", |
2074 | "Data: x%x\n", | 2058 | rc, ndlp->nlp_DID, ndlp->nlp_flag); |
2075 | phba->brd_no, vport->vpi, | ||
2076 | rc, ndlp->nlp_DID, ndlp->nlp_flag); | ||
2077 | 2059 | ||
2078 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_DSM, | 2060 | lpfc_debugfs_disc_trc(vport, LPFC_DISC_TRC_DSM, |
2079 | "DSM out: ste:%d did:x%x flg:x%x", | 2061 | "DSM out: ste:%d did:x%x flg:x%x", |
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 78666c62330e..9ee2927ad82a 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -406,9 +406,7 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
406 | struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; | 406 | struct scsi_cmnd *cmnd = lpfc_cmd->pCmd; |
407 | struct fcp_cmnd *fcpcmd = lpfc_cmd->fcp_cmnd; | 407 | struct fcp_cmnd *fcpcmd = lpfc_cmd->fcp_cmnd; |
408 | struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; | 408 | struct fcp_rsp *fcprsp = lpfc_cmd->fcp_rsp; |
409 | struct lpfc_hba *phba = vport->phba; | ||
410 | uint32_t fcpi_parm = rsp_iocb->iocb.un.fcpi.fcpi_parm; | 409 | uint32_t fcpi_parm = rsp_iocb->iocb.un.fcpi.fcpi_parm; |
411 | uint32_t vpi = vport->vpi; | ||
412 | uint32_t resp_info = fcprsp->rspStatus2; | 410 | uint32_t resp_info = fcprsp->rspStatus2; |
413 | uint32_t scsi_status = fcprsp->rspStatus3; | 411 | uint32_t scsi_status = fcprsp->rspStatus3; |
414 | uint32_t *lp; | 412 | uint32_t *lp; |
@@ -440,15 +438,15 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
440 | if (!scsi_status && (resp_info & RESID_UNDER)) | 438 | if (!scsi_status && (resp_info & RESID_UNDER)) |
441 | logit = LOG_FCP; | 439 | logit = LOG_FCP; |
442 | 440 | ||
443 | lpfc_printf_log(phba, KERN_WARNING, logit, | 441 | lpfc_printf_vlog(vport, KERN_WARNING, logit, |
444 | "%d (%d):0730 FCP command x%x failed: x%x SNS x%x x%x " | 442 | "0730 FCP command x%x failed: x%x SNS x%x x%x " |
445 | "Data: x%x x%x x%x x%x x%x\n", | 443 | "Data: x%x x%x x%x x%x x%x\n", |
446 | phba->brd_no, vpi, cmnd->cmnd[0], scsi_status, | 444 | cmnd->cmnd[0], scsi_status, |
447 | be32_to_cpu(*lp), be32_to_cpu(*(lp + 3)), resp_info, | 445 | be32_to_cpu(*lp), be32_to_cpu(*(lp + 3)), resp_info, |
448 | be32_to_cpu(fcprsp->rspResId), | 446 | be32_to_cpu(fcprsp->rspResId), |
449 | be32_to_cpu(fcprsp->rspSnsLen), | 447 | be32_to_cpu(fcprsp->rspSnsLen), |
450 | be32_to_cpu(fcprsp->rspRspLen), | 448 | be32_to_cpu(fcprsp->rspRspLen), |
451 | fcprsp->rspInfo3); | 449 | fcprsp->rspInfo3); |
452 | 450 | ||
453 | if (resp_info & RSP_LEN_VALID) { | 451 | if (resp_info & RSP_LEN_VALID) { |
454 | rsplen = be32_to_cpu(fcprsp->rspRspLen); | 452 | rsplen = be32_to_cpu(fcprsp->rspRspLen); |
@@ -463,12 +461,12 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
463 | if (resp_info & RESID_UNDER) { | 461 | if (resp_info & RESID_UNDER) { |
464 | scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); | 462 | scsi_set_resid(cmnd, be32_to_cpu(fcprsp->rspResId)); |
465 | 463 | ||
466 | lpfc_printf_log(phba, KERN_INFO, LOG_FCP, | 464 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
467 | "%d (%d):0716 FCP Read Underrun, expected %d, " | 465 | "0716 FCP Read Underrun, expected %d, " |
468 | "residual %d Data: x%x x%x x%x\n", | 466 | "residual %d Data: x%x x%x x%x\n", |
469 | phba->brd_no, vpi, be32_to_cpu(fcpcmd->fcpDl), | 467 | be32_to_cpu(fcpcmd->fcpDl), |
470 | scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0], | 468 | scsi_get_resid(cmnd), fcpi_parm, cmnd->cmnd[0], |
471 | cmnd->underflow); | 469 | cmnd->underflow); |
472 | 470 | ||
473 | /* | 471 | /* |
474 | * If there is an under run check if under run reported by | 472 | * If there is an under run check if under run reported by |
@@ -478,14 +476,13 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
478 | if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && | 476 | if ((cmnd->sc_data_direction == DMA_FROM_DEVICE) && |
479 | fcpi_parm && | 477 | fcpi_parm && |
480 | (scsi_get_resid(cmnd) != fcpi_parm)) { | 478 | (scsi_get_resid(cmnd) != fcpi_parm)) { |
481 | lpfc_printf_log(phba, KERN_WARNING, | 479 | lpfc_printf_vlog(vport, KERN_WARNING, |
482 | LOG_FCP | LOG_FCP_ERROR, | 480 | LOG_FCP | LOG_FCP_ERROR, |
483 | "%d (%d):0735 FCP Read Check Error " | 481 | "0735 FCP Read Check Error " |
484 | "and Underrun Data: x%x x%x x%x x%x\n", | 482 | "and Underrun Data: x%x x%x x%x x%x\n", |
485 | phba->brd_no, vpi, | 483 | be32_to_cpu(fcpcmd->fcpDl), |
486 | be32_to_cpu(fcpcmd->fcpDl), | 484 | scsi_get_resid(cmnd), fcpi_parm, |
487 | scsi_get_resid(cmnd), fcpi_parm, | 485 | cmnd->cmnd[0]); |
488 | cmnd->cmnd[0]); | ||
489 | scsi_set_resid(cmnd, scsi_bufflen(cmnd)); | 486 | scsi_set_resid(cmnd, scsi_bufflen(cmnd)); |
490 | host_status = DID_ERROR; | 487 | host_status = DID_ERROR; |
491 | } | 488 | } |
@@ -499,21 +496,19 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
499 | (scsi_status == SAM_STAT_GOOD) && | 496 | (scsi_status == SAM_STAT_GOOD) && |
500 | (scsi_bufflen(cmnd) - scsi_get_resid(cmnd) | 497 | (scsi_bufflen(cmnd) - scsi_get_resid(cmnd) |
501 | < cmnd->underflow)) { | 498 | < cmnd->underflow)) { |
502 | lpfc_printf_log(phba, KERN_INFO, LOG_FCP, | 499 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
503 | "%d (%d):0717 FCP command x%x residual " | 500 | "0717 FCP command x%x residual " |
504 | "underrun converted to error " | 501 | "underrun converted to error " |
505 | "Data: x%x x%x x%x\n", | 502 | "Data: x%x x%x x%x\n", |
506 | phba->brd_no, vpi, cmnd->cmnd[0], | 503 | cmnd->cmnd[0], cmnd->request_bufflen, |
507 | scsi_bufflen(cmnd), | 504 | scsi_get_resid(cmnd), cmnd->underflow); |
508 | scsi_get_resid(cmnd), cmnd->underflow); | ||
509 | host_status = DID_ERROR; | 505 | host_status = DID_ERROR; |
510 | } | 506 | } |
511 | } else if (resp_info & RESID_OVER) { | 507 | } else if (resp_info & RESID_OVER) { |
512 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP, | 508 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
513 | "%d (%d):0720 FCP command x%x residual " | 509 | "0720 FCP command x%x residual overrun error. " |
514 | "overrun error. Data: x%x x%x \n", | 510 | "Data: x%x x%x \n", cmnd->cmnd[0], |
515 | phba->brd_no, vpi, cmnd->cmnd[0], | 511 | scsi_bufflen(cmnd), scsi_get_resid(cmnd)); |
516 | scsi_bufflen(cmnd), scsi_get_resid(cmnd)); | ||
517 | host_status = DID_ERROR; | 512 | host_status = DID_ERROR; |
518 | 513 | ||
519 | /* | 514 | /* |
@@ -522,13 +517,12 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, | |||
522 | */ | 517 | */ |
523 | } else if ((scsi_status == SAM_STAT_GOOD) && fcpi_parm && | 518 | } else if ((scsi_status == SAM_STAT_GOOD) && fcpi_parm && |
524 | (cmnd->sc_data_direction == DMA_FROM_DEVICE)) { | 519 | (cmnd->sc_data_direction == DMA_FROM_DEVICE)) { |
525 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP | LOG_FCP_ERROR, | 520 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP | LOG_FCP_ERROR, |
526 | "%d (%d):0734 FCP Read Check Error Data: " | 521 | "0734 FCP Read Check Error Data: " |
527 | "x%x x%x x%x x%x\n", | 522 | "x%x x%x x%x x%x\n", |
528 | phba->brd_no, vpi, | 523 | be32_to_cpu(fcpcmd->fcpDl), |
529 | be32_to_cpu(fcpcmd->fcpDl), | 524 | be32_to_cpu(fcprsp->rspResId), |
530 | be32_to_cpu(fcprsp->rspResId), | 525 | fcpi_parm, cmnd->cmnd[0]); |
531 | fcpi_parm, cmnd->cmnd[0]); | ||
532 | host_status = DID_ERROR; | 526 | host_status = DID_ERROR; |
533 | scsi_set_resid(cmnd, scsi_bufflen(cmnd)); | 527 | scsi_set_resid(cmnd, scsi_bufflen(cmnd)); |
534 | } | 528 | } |
@@ -547,9 +541,6 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
547 | struct lpfc_rport_data *rdata = lpfc_cmd->rdata; | 541 | struct lpfc_rport_data *rdata = lpfc_cmd->rdata; |
548 | struct lpfc_nodelist *pnode = rdata->pnode; | 542 | struct lpfc_nodelist *pnode = rdata->pnode; |
549 | struct scsi_cmnd *cmd = lpfc_cmd->pCmd; | 543 | struct scsi_cmnd *cmd = lpfc_cmd->pCmd; |
550 | uint32_t vpi = (lpfc_cmd->cur_iocbq.vport | ||
551 | ? lpfc_cmd->cur_iocbq.vport->vpi | ||
552 | : 0); | ||
553 | int result; | 544 | int result; |
554 | struct scsi_device *sdev, *tmp_sdev; | 545 | struct scsi_device *sdev, *tmp_sdev; |
555 | int depth = 0; | 546 | int depth = 0; |
@@ -564,15 +555,15 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
564 | else if (lpfc_cmd->status >= IOSTAT_CNT) | 555 | else if (lpfc_cmd->status >= IOSTAT_CNT) |
565 | lpfc_cmd->status = IOSTAT_DEFAULT; | 556 | lpfc_cmd->status = IOSTAT_DEFAULT; |
566 | 557 | ||
567 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP, | 558 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
568 | "%d (%d):0729 FCP cmd x%x failed <%d/%d> " | 559 | "0729 FCP cmd x%x failed <%d/%d> " |
569 | "status: x%x result: x%x Data: x%x x%x\n", | 560 | "status: x%x result: x%x Data: x%x x%x\n", |
570 | phba->brd_no, vpi, cmd->cmnd[0], | 561 | cmd->cmnd[0], |
571 | cmd->device ? cmd->device->id : 0xffff, | 562 | cmd->device ? cmd->device->id : 0xffff, |
572 | cmd->device ? cmd->device->lun : 0xffff, | 563 | cmd->device ? cmd->device->lun : 0xffff, |
573 | lpfc_cmd->status, lpfc_cmd->result, | 564 | lpfc_cmd->status, lpfc_cmd->result, |
574 | pIocbOut->iocb.ulpContext, | 565 | pIocbOut->iocb.ulpContext, |
575 | lpfc_cmd->cur_iocbq.iocb.ulpIoTag); | 566 | lpfc_cmd->cur_iocbq.iocb.ulpIoTag); |
576 | 567 | ||
577 | switch (lpfc_cmd->status) { | 568 | switch (lpfc_cmd->status) { |
578 | case IOSTAT_FCP_RSP_ERROR: | 569 | case IOSTAT_FCP_RSP_ERROR: |
@@ -605,13 +596,12 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
605 | if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { | 596 | if (cmd->result || lpfc_cmd->fcp_rsp->rspSnsLen) { |
606 | uint32_t *lp = (uint32_t *)cmd->sense_buffer; | 597 | uint32_t *lp = (uint32_t *)cmd->sense_buffer; |
607 | 598 | ||
608 | lpfc_printf_log(phba, KERN_INFO, LOG_FCP, | 599 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
609 | "%d (%d):0710 Iodone <%d/%d> cmd %p, error " | 600 | "0710 Iodone <%d/%d> cmd %p, error " |
610 | "x%x SNS x%x x%x Data: x%x x%x\n", | 601 | "x%x SNS x%x x%x Data: x%x x%x\n", |
611 | phba->brd_no, vpi, cmd->device->id, | 602 | cmd->device->id, cmd->device->lun, cmd, |
612 | cmd->device->lun, cmd, cmd->result, | 603 | cmd->result, *lp, *(lp + 3), cmd->retries, |
613 | *lp, *(lp + 3), cmd->retries, | 604 | scsi_get_resid(cmd)); |
614 | scsi_get_resid(cmd)); | ||
615 | } | 605 | } |
616 | 606 | ||
617 | result = cmd->result; | 607 | result = cmd->result; |
@@ -675,10 +665,9 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, | |||
675 | depth = sdev->host->cmd_per_lun; | 665 | depth = sdev->host->cmd_per_lun; |
676 | 666 | ||
677 | if (depth) { | 667 | if (depth) { |
678 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP, | 668 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
679 | "%d (%d):0711 detected queue full - " | 669 | "0711 detected queue full - lun queue " |
680 | "lun queue depth adjusted to %d.\n", | 670 | "depth adjusted to %d.\n", depth); |
681 | phba->brd_no, vpi, depth); | ||
682 | } | 671 | } |
683 | } | 672 | } |
684 | 673 | ||
@@ -848,12 +837,9 @@ lpfc_scsi_tgt_reset(struct lpfc_scsi_buf *lpfc_cmd, struct lpfc_vport *vport, | |||
848 | return FAILED; | 837 | return FAILED; |
849 | 838 | ||
850 | /* Issue Target Reset to TGT <num> */ | 839 | /* Issue Target Reset to TGT <num> */ |
851 | lpfc_printf_log(phba, KERN_INFO, LOG_FCP, | 840 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
852 | "%d (%d):0702 Issue Target Reset to TGT %d " | 841 | "0702 Issue Target Reset to TGT %d Data: x%x x%x\n", |
853 | "Data: x%x x%x\n", | 842 | tgt_id, rdata->pnode->nlp_rpi, rdata->pnode->nlp_flag); |
854 | phba->brd_no, vport->vpi, tgt_id, | ||
855 | rdata->pnode->nlp_rpi, rdata->pnode->nlp_flag); | ||
856 | |||
857 | ret = lpfc_sli_issue_iocb_wait(phba, | 843 | ret = lpfc_sli_issue_iocb_wait(phba, |
858 | &phba->sli.ring[phba->sli.fcp_ring], | 844 | &phba->sli.ring[phba->sli.fcp_ring], |
859 | iocbq, iocbqrsp, lpfc_cmd->timeout); | 845 | iocbq, iocbqrsp, lpfc_cmd->timeout); |
@@ -960,10 +946,9 @@ lpfc_queuecommand(struct scsi_cmnd *cmnd, void (*done) (struct scsi_cmnd *)) | |||
960 | if (lpfc_cmd == NULL) { | 946 | if (lpfc_cmd == NULL) { |
961 | lpfc_adjust_queue_depth(phba); | 947 | lpfc_adjust_queue_depth(phba); |
962 | 948 | ||
963 | lpfc_printf_log(phba, KERN_INFO, LOG_FCP, | 949 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
964 | "%d (%d):0707 driver's buffer pool is empty, " | 950 | "0707 driver's buffer pool is empty, " |
965 | "IO busied\n", | 951 | "IO busied\n"); |
966 | phba->brd_no, vport->vpi); | ||
967 | goto out_host_busy; | 952 | goto out_host_busy; |
968 | } | 953 | } |
969 | 954 | ||
@@ -1104,22 +1089,19 @@ lpfc_abort_handler(struct scsi_cmnd *cmnd) | |||
1104 | 1089 | ||
1105 | if (lpfc_cmd->pCmd == cmnd) { | 1090 | if (lpfc_cmd->pCmd == cmnd) { |
1106 | ret = FAILED; | 1091 | ret = FAILED; |
1107 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1092 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1108 | "%d (%d):0748 abort handler timed out waiting " | 1093 | "0748 abort handler timed out waiting " |
1109 | "for abort to complete: ret %#x, ID %d, " | 1094 | "for abort to complete: ret %#x, ID %d, " |
1110 | "LUN %d, snum %#lx\n", | 1095 | "LUN %d, snum %#lx\n", |
1111 | phba->brd_no, vport->vpi, ret, | 1096 | ret, cmnd->device->id, cmnd->device->lun, |
1112 | cmnd->device->id, cmnd->device->lun, | 1097 | cmnd->serial_number); |
1113 | cmnd->serial_number); | ||
1114 | } | 1098 | } |
1115 | 1099 | ||
1116 | out: | 1100 | out: |
1117 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP, | 1101 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
1118 | "%d (%d):0749 SCSI Layer I/O Abort Request " | 1102 | "0749 SCSI Layer I/O Abort Request Status x%x ID %d " |
1119 | "Status x%x ID %d LUN %d snum %#lx\n", | 1103 | "LUN %d snum %#lx\n", ret, cmnd->device->id, |
1120 | phba->brd_no, vport->vpi, ret, cmnd->device->id, | 1104 | cmnd->device->lun, cmnd->serial_number); |
1121 | cmnd->device->lun, cmnd->serial_number); | ||
1122 | |||
1123 | return ret; | 1105 | return ret; |
1124 | } | 1106 | } |
1125 | 1107 | ||
@@ -1154,11 +1136,10 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
1154 | rdata = cmnd->device->hostdata; | 1136 | rdata = cmnd->device->hostdata; |
1155 | if (!rdata || | 1137 | if (!rdata || |
1156 | (loopcnt > ((vport->cfg_devloss_tmo * 2) + 1))){ | 1138 | (loopcnt > ((vport->cfg_devloss_tmo * 2) + 1))){ |
1157 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1139 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1158 | "%d (%d):0721 LUN Reset rport " | 1140 | "0721 LUN Reset rport " |
1159 | "failure: cnt x%x rdata x%p\n", | 1141 | "failure: cnt x%x rdata x%p\n", |
1160 | phba->brd_no, vport->vpi, | 1142 | loopcnt, rdata); |
1161 | loopcnt, rdata); | ||
1162 | goto out; | 1143 | goto out; |
1163 | } | 1144 | } |
1164 | pnode = rdata->pnode; | 1145 | pnode = rdata->pnode; |
@@ -1188,12 +1169,10 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
1188 | if (iocbqrsp == NULL) | 1169 | if (iocbqrsp == NULL) |
1189 | goto out_free_scsi_buf; | 1170 | goto out_free_scsi_buf; |
1190 | 1171 | ||
1191 | lpfc_printf_log(phba, KERN_INFO, LOG_FCP, | 1172 | lpfc_printf_vlog(vport, KERN_INFO, LOG_FCP, |
1192 | "%d (%d):0703 Issue target reset to TGT %d LUN %d " | 1173 | "0703 Issue target reset to TGT %d LUN %d " |
1193 | "rpi x%x nlp_flag x%x\n", | 1174 | "rpi x%x nlp_flag x%x\n", cmnd->device->id, |
1194 | phba->brd_no, vport->vpi, cmnd->device->id, | 1175 | cmnd->device->lun, pnode->nlp_rpi, pnode->nlp_flag); |
1195 | cmnd->device->lun, pnode->nlp_rpi, pnode->nlp_flag); | ||
1196 | |||
1197 | iocb_status = lpfc_sli_issue_iocb_wait(phba, | 1176 | iocb_status = lpfc_sli_issue_iocb_wait(phba, |
1198 | &phba->sli.ring[phba->sli.fcp_ring], | 1177 | &phba->sli.ring[phba->sli.fcp_ring], |
1199 | iocbq, iocbqrsp, lpfc_cmd->timeout); | 1178 | iocbq, iocbqrsp, lpfc_cmd->timeout); |
@@ -1239,10 +1218,9 @@ lpfc_device_reset_handler(struct scsi_cmnd *cmnd) | |||
1239 | } | 1218 | } |
1240 | 1219 | ||
1241 | if (cnt) { | 1220 | if (cnt) { |
1242 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1221 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1243 | "%d (%d):0719 device reset I/O flush failure: " | 1222 | "0719 device reset I/O flush failure: " |
1244 | "cnt x%x\n", | 1223 | "cnt x%x\n", cnt); |
1245 | phba->brd_no, vport->vpi, cnt); | ||
1246 | ret = FAILED; | 1224 | ret = FAILED; |
1247 | } | 1225 | } |
1248 | 1226 | ||
@@ -1250,12 +1228,11 @@ out_free_scsi_buf: | |||
1250 | if (iocb_status != IOCB_TIMEDOUT) { | 1228 | if (iocb_status != IOCB_TIMEDOUT) { |
1251 | lpfc_release_scsi_buf(phba, lpfc_cmd); | 1229 | lpfc_release_scsi_buf(phba, lpfc_cmd); |
1252 | } | 1230 | } |
1253 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1231 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1254 | "%d (%d):0713 SCSI layer issued device reset (%d, %d) " | 1232 | "0713 SCSI layer issued device reset (%d, %d) " |
1255 | "return x%x status x%x result x%x\n", | 1233 | "return x%x status x%x result x%x\n", |
1256 | phba->brd_no, vport->vpi, cmnd->device->id, | 1234 | cmnd->device->id, cmnd->device->lun, ret, |
1257 | cmnd->device->lun, ret, cmd_status, cmd_result); | 1235 | cmd_status, cmd_result); |
1258 | |||
1259 | out: | 1236 | out: |
1260 | return ret; | 1237 | return ret; |
1261 | } | 1238 | } |
@@ -1306,10 +1283,9 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) | |||
1306 | cmnd->device->lun, | 1283 | cmnd->device->lun, |
1307 | ndlp->rport->dd_data); | 1284 | ndlp->rport->dd_data); |
1308 | if (ret != SUCCESS) { | 1285 | if (ret != SUCCESS) { |
1309 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1286 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1310 | "%d (%d):0700 Bus Reset on target %d " | 1287 | "0700 Bus Reset on target %d failed\n", |
1311 | "failed\n", | 1288 | i); |
1312 | phba->brd_no, vport->vpi, i); | ||
1313 | err_count++; | 1289 | err_count++; |
1314 | break; | 1290 | break; |
1315 | } | 1291 | } |
@@ -1347,16 +1323,14 @@ lpfc_bus_reset_handler(struct scsi_cmnd *cmnd) | |||
1347 | } | 1323 | } |
1348 | 1324 | ||
1349 | if (cnt) { | 1325 | if (cnt) { |
1350 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1326 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1351 | "%d (%d):0715 Bus Reset I/O flush failure: " | 1327 | "0715 Bus Reset I/O flush failure: " |
1352 | "cnt x%x left x%x\n", | 1328 | "cnt x%x left x%x\n", cnt, i); |
1353 | phba->brd_no, vport->vpi, cnt, i); | ||
1354 | ret = FAILED; | 1329 | ret = FAILED; |
1355 | } | 1330 | } |
1356 | 1331 | ||
1357 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1332 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1358 | "%d (%d):0714 SCSI layer issued Bus Reset Data: x%x\n", | 1333 | "0714 SCSI layer issued Bus Reset Data: x%x\n", ret); |
1359 | phba->brd_no, vport->vpi, ret); | ||
1360 | out: | 1334 | out: |
1361 | return ret; | 1335 | return ret; |
1362 | } | 1336 | } |
@@ -1389,32 +1363,28 @@ lpfc_slave_alloc(struct scsi_device *sdev) | |||
1389 | 1363 | ||
1390 | /* Allow some exchanges to be available always to complete discovery */ | 1364 | /* Allow some exchanges to be available always to complete discovery */ |
1391 | if (total >= phba->cfg_hba_queue_depth - LPFC_DISC_IOCB_BUFF_COUNT ) { | 1365 | if (total >= phba->cfg_hba_queue_depth - LPFC_DISC_IOCB_BUFF_COUNT ) { |
1392 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP, | 1366 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
1393 | "%d (%d):0704 At limitation of %d " | 1367 | "0704 At limitation of %d preallocated " |
1394 | "preallocated command buffers\n", | 1368 | "command buffers\n", total); |
1395 | phba->brd_no, vport->vpi, total); | ||
1396 | return 0; | 1369 | return 0; |
1397 | |||
1398 | /* Allow some exchanges to be available always to complete discovery */ | 1370 | /* Allow some exchanges to be available always to complete discovery */ |
1399 | } else if (total + num_to_alloc > | 1371 | } else if (total + num_to_alloc > |
1400 | phba->cfg_hba_queue_depth - LPFC_DISC_IOCB_BUFF_COUNT ) { | 1372 | phba->cfg_hba_queue_depth - LPFC_DISC_IOCB_BUFF_COUNT ) { |
1401 | lpfc_printf_log(phba, KERN_WARNING, LOG_FCP, | 1373 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, |
1402 | "%d (%d):0705 Allocation request of %d " | 1374 | "0705 Allocation request of %d " |
1403 | "command buffers will exceed max of %d. " | 1375 | "command buffers will exceed max of %d. " |
1404 | "Reducing allocation request to %d.\n", | 1376 | "Reducing allocation request to %d.\n", |
1405 | phba->brd_no, vport->vpi, num_to_alloc, | 1377 | num_to_alloc, phba->cfg_hba_queue_depth, |
1406 | phba->cfg_hba_queue_depth, | 1378 | (phba->cfg_hba_queue_depth - total)); |
1407 | (phba->cfg_hba_queue_depth - total)); | ||
1408 | num_to_alloc = phba->cfg_hba_queue_depth - total; | 1379 | num_to_alloc = phba->cfg_hba_queue_depth - total; |
1409 | } | 1380 | } |
1410 | 1381 | ||
1411 | for (i = 0; i < num_to_alloc; i++) { | 1382 | for (i = 0; i < num_to_alloc; i++) { |
1412 | scsi_buf = lpfc_new_scsi_buf(vport); | 1383 | scsi_buf = lpfc_new_scsi_buf(vport); |
1413 | if (!scsi_buf) { | 1384 | if (!scsi_buf) { |
1414 | lpfc_printf_log(phba, KERN_ERR, LOG_FCP, | 1385 | lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP, |
1415 | "%d (%d):0706 Failed to allocate " | 1386 | "0706 Failed to allocate " |
1416 | "command buffer\n", | 1387 | "command buffer\n"); |
1417 | phba->brd_no, vport->vpi); | ||
1418 | break; | 1388 | break; |
1419 | } | 1389 | } |
1420 | 1390 | ||
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c index 14fe6b000b59..2da75d85de84 100644 --- a/drivers/scsi/lpfc/lpfc_sli.c +++ b/drivers/scsi/lpfc/lpfc_sli.c | |||
@@ -49,9 +49,8 @@ | |||
49 | lpfc_printf_log(phba, \ | 49 | lpfc_printf_log(phba, \ |
50 | KERN_INFO, \ | 50 | KERN_INFO, \ |
51 | LOG_MBOX | LOG_SLI, \ | 51 | LOG_MBOX | LOG_SLI, \ |
52 | "%d (%d):0311 Mailbox command x%x cannot " \ | 52 | "(%d):0311 Mailbox command x%x cannot " \ |
53 | "issue Data: x%x x%x x%x\n", \ | 53 | "issue Data: x%x x%x x%x\n", \ |
54 | phba->brd_no, \ | ||
55 | pmbox->vport ? pmbox->vport->vpi : 0, \ | 54 | pmbox->vport ? pmbox->vport->vpi : 0, \ |
56 | pmbox->mb.mbxCommand, \ | 55 | pmbox->mb.mbxCommand, \ |
57 | phba->pport->port_state, \ | 56 | phba->pport->port_state, \ |
@@ -231,13 +230,11 @@ lpfc_sli_ring_map(struct lpfc_hba *phba) | |||
231 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 230 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
232 | if (rc != MBX_SUCCESS) { | 231 | if (rc != MBX_SUCCESS) { |
233 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 232 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
234 | "%d:0446 Adapter failed to init (%d), " | 233 | "0446 Adapter failed to init (%d), " |
235 | "mbxCmd x%x CFG_RING, mbxStatus x%x, " | 234 | "mbxCmd x%x CFG_RING, mbxStatus x%x, " |
236 | "ring %d\n", | 235 | "ring %d\n", |
237 | phba->brd_no, rc, | 236 | rc, pmbox->mbxCommand, |
238 | pmbox->mbxCommand, | 237 | pmbox->mbxStatus, i); |
239 | pmbox->mbxStatus, | ||
240 | i); | ||
241 | phba->link_state = LPFC_HBA_ERROR; | 238 | phba->link_state = LPFC_HBA_ERROR; |
242 | ret = -ENXIO; | 239 | ret = -ENXIO; |
243 | break; | 240 | break; |
@@ -296,9 +293,9 @@ lpfc_sli_next_iocb_slot (struct lpfc_hba *phba, struct lpfc_sli_ring *pring) | |||
296 | 293 | ||
297 | if (unlikely(pring->local_getidx >= max_cmd_idx)) { | 294 | if (unlikely(pring->local_getidx >= max_cmd_idx)) { |
298 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 295 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
299 | "%d:0315 Ring %d issue: portCmdGet %d " | 296 | "0315 Ring %d issue: portCmdGet %d " |
300 | "is bigger then cmd ring %d\n", | 297 | "is bigger then cmd ring %d\n", |
301 | phba->brd_no, pring->ringno, | 298 | pring->ringno, |
302 | pring->local_getidx, max_cmd_idx); | 299 | pring->local_getidx, max_cmd_idx); |
303 | 300 | ||
304 | phba->link_state = LPFC_HBA_ERROR; | 301 | phba->link_state = LPFC_HBA_ERROR; |
@@ -380,8 +377,8 @@ lpfc_sli_next_iotag(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq) | |||
380 | spin_unlock_irq(&phba->hbalock); | 377 | spin_unlock_irq(&phba->hbalock); |
381 | 378 | ||
382 | lpfc_printf_log(phba, KERN_ERR,LOG_SLI, | 379 | lpfc_printf_log(phba, KERN_ERR,LOG_SLI, |
383 | "%d:0318 Failed to allocate IOTAG.last IOTAG is %d\n", | 380 | "0318 Failed to allocate IOTAG.last IOTAG is %d\n", |
384 | phba->brd_no, psli->last_iotag); | 381 | psli->last_iotag); |
385 | 382 | ||
386 | return 0; | 383 | return 0; |
387 | } | 384 | } |
@@ -535,10 +532,9 @@ lpfc_sli_next_hbq_slot(struct lpfc_hba *phba, uint32_t hbqno) | |||
535 | if (unlikely(hbqp->local_hbqGetIdx >= hbqp->entry_count)) { | 532 | if (unlikely(hbqp->local_hbqGetIdx >= hbqp->entry_count)) { |
536 | lpfc_printf_log(phba, KERN_ERR, | 533 | lpfc_printf_log(phba, KERN_ERR, |
537 | LOG_SLI | LOG_VPORT, | 534 | LOG_SLI | LOG_VPORT, |
538 | "%d:1802 HBQ %d: local_hbqGetIdx " | 535 | "1802 HBQ %d: local_hbqGetIdx " |
539 | "%u is > than hbqp->entry_count %u\n", | 536 | "%u is > than hbqp->entry_count %u\n", |
540 | phba->brd_no, hbqno, | 537 | hbqno, hbqp->local_hbqGetIdx, |
541 | hbqp->local_hbqGetIdx, | ||
542 | hbqp->entry_count); | 538 | hbqp->entry_count); |
543 | 539 | ||
544 | phba->link_state = LPFC_HBA_ERROR; | 540 | phba->link_state = LPFC_HBA_ERROR; |
@@ -666,9 +662,8 @@ lpfc_sli_hbqbuf_find(struct lpfc_hba *phba, uint32_t tag) | |||
666 | } | 662 | } |
667 | } | 663 | } |
668 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI | LOG_VPORT, | 664 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI | LOG_VPORT, |
669 | "%d:1803 Bad hbq tag. Data: x%x x%x\n", | 665 | "1803 Bad hbq tag. Data: x%x x%x\n", |
670 | phba->brd_no, tag, | 666 | tag, lpfc_hbq_defs[tag >> 16]->buffer_count); |
671 | lpfc_hbq_defs[tag >> 16]->buffer_count); | ||
672 | return NULL; | 667 | return NULL; |
673 | } | 668 | } |
674 | 669 | ||
@@ -845,12 +840,10 @@ lpfc_sli_handle_mb_event(struct lpfc_hba *phba) | |||
845 | */ | 840 | */ |
846 | if (lpfc_sli_chk_mbx_command(pmbox->mbxCommand) == | 841 | if (lpfc_sli_chk_mbx_command(pmbox->mbxCommand) == |
847 | MBX_SHUTDOWN) { | 842 | MBX_SHUTDOWN) { |
848 | |||
849 | /* Unknow mailbox command compl */ | 843 | /* Unknow mailbox command compl */ |
850 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 844 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, |
851 | "%d (%d):0323 Unknown Mailbox command " | 845 | "(%d):0323 Unknown Mailbox command " |
852 | "%x Cmpl\n", | 846 | "%x Cmpl\n", |
853 | phba->brd_no, | ||
854 | pmb->vport ? pmb->vport->vpi : 0, | 847 | pmb->vport ? pmb->vport->vpi : 0, |
855 | pmbox->mbxCommand); | 848 | pmbox->mbxCommand); |
856 | phba->link_state = LPFC_HBA_ERROR; | 849 | phba->link_state = LPFC_HBA_ERROR; |
@@ -865,10 +858,9 @@ lpfc_sli_handle_mb_event(struct lpfc_hba *phba) | |||
865 | /* Mbox cmd cmpl error - RETRYing */ | 858 | /* Mbox cmd cmpl error - RETRYing */ |
866 | lpfc_printf_log(phba, KERN_INFO, | 859 | lpfc_printf_log(phba, KERN_INFO, |
867 | LOG_MBOX | LOG_SLI, | 860 | LOG_MBOX | LOG_SLI, |
868 | "%d (%d):0305 Mbox cmd cmpl " | 861 | "(%d):0305 Mbox cmd cmpl " |
869 | "error - RETRYing Data: x%x " | 862 | "error - RETRYing Data: x%x " |
870 | "x%x x%x x%x\n", | 863 | "x%x x%x x%x\n", |
871 | phba->brd_no, | ||
872 | pmb->vport ? pmb->vport->vpi :0, | 864 | pmb->vport ? pmb->vport->vpi :0, |
873 | pmbox->mbxCommand, | 865 | pmbox->mbxCommand, |
874 | pmbox->mbxStatus, | 866 | pmbox->mbxStatus, |
@@ -887,9 +879,8 @@ lpfc_sli_handle_mb_event(struct lpfc_hba *phba) | |||
887 | 879 | ||
888 | /* Mailbox cmd <cmd> Cmpl <cmpl> */ | 880 | /* Mailbox cmd <cmd> Cmpl <cmpl> */ |
889 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, | 881 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, |
890 | "%d (%d):0307 Mailbox cmd x%x Cmpl x%p " | 882 | "(%d):0307 Mailbox cmd x%x Cmpl x%p " |
891 | "Data: x%x x%x x%x x%x x%x x%x x%x x%x x%x\n", | 883 | "Data: x%x x%x x%x x%x x%x x%x x%x x%x x%x\n", |
892 | phba->brd_no, | ||
893 | pmb->vport ? pmb->vport->vpi : 0, | 884 | pmb->vport ? pmb->vport->vpi : 0, |
894 | pmbox->mbxCommand, | 885 | pmbox->mbxCommand, |
895 | pmb->mbox_cmpl, | 886 | pmb->mbox_cmpl, |
@@ -1004,12 +995,9 @@ lpfc_sli_process_unsol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
1004 | /* Ring <ringno> handler: unexpected | 995 | /* Ring <ringno> handler: unexpected |
1005 | Rctl <Rctl> Type <Type> received */ | 996 | Rctl <Rctl> Type <Type> received */ |
1006 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, | 997 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, |
1007 | "%d:0313 Ring %d handler: unexpected Rctl x%x " | 998 | "0313 Ring %d handler: unexpected Rctl x%x " |
1008 | "Type x%x received\n", | 999 | "Type x%x received\n", |
1009 | phba->brd_no, | 1000 | pring->ringno, Rctl, Type); |
1010 | pring->ringno, | ||
1011 | Rctl, | ||
1012 | Type); | ||
1013 | } | 1001 | } |
1014 | return 1; | 1002 | return 1; |
1015 | } | 1003 | } |
@@ -1032,10 +1020,9 @@ lpfc_sli_iocbq_lookup(struct lpfc_hba *phba, | |||
1032 | } | 1020 | } |
1033 | 1021 | ||
1034 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1022 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
1035 | "%d:0317 iotag x%x is out off " | 1023 | "0317 iotag x%x is out off " |
1036 | "range: max iotag x%x wd0 x%x\n", | 1024 | "range: max iotag x%x wd0 x%x\n", |
1037 | phba->brd_no, iotag, | 1025 | iotag, phba->sli.last_iotag, |
1038 | phba->sli.last_iotag, | ||
1039 | *(((uint32_t *) &prspiocb->iocb) + 7)); | 1026 | *(((uint32_t *) &prspiocb->iocb) + 7)); |
1040 | return NULL; | 1027 | return NULL; |
1041 | } | 1028 | } |
@@ -1083,18 +1070,16 @@ lpfc_sli_process_sol_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
1083 | * Ring <ringno> handler: unexpected completion IoTag | 1070 | * Ring <ringno> handler: unexpected completion IoTag |
1084 | * <IoTag> | 1071 | * <IoTag> |
1085 | */ | 1072 | */ |
1086 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, | 1073 | lpfc_printf_vlog(cmdiocbp->vport, KERN_WARNING, LOG_SLI, |
1087 | "%d (%d):0322 Ring %d handler: " | 1074 | "0322 Ring %d handler: " |
1088 | "unexpected completion IoTag x%x " | 1075 | "unexpected completion IoTag x%x " |
1089 | "Data: x%x x%x x%x x%x\n", | 1076 | "Data: x%x x%x x%x x%x\n", |
1090 | phba->brd_no, | 1077 | pring->ringno, |
1091 | cmdiocbp->vport->vpi, | 1078 | saveq->iocb.ulpIoTag, |
1092 | pring->ringno, | 1079 | saveq->iocb.ulpStatus, |
1093 | saveq->iocb.ulpIoTag, | 1080 | saveq->iocb.un.ulpWord[4], |
1094 | saveq->iocb.ulpStatus, | 1081 | saveq->iocb.ulpCommand, |
1095 | saveq->iocb.un.ulpWord[4], | 1082 | saveq->iocb.ulpContext); |
1096 | saveq->iocb.ulpCommand, | ||
1097 | saveq->iocb.ulpContext); | ||
1098 | } | 1083 | } |
1099 | } | 1084 | } |
1100 | 1085 | ||
@@ -1112,10 +1097,9 @@ lpfc_sli_rsp_pointers_error(struct lpfc_hba *phba, struct lpfc_sli_ring *pring) | |||
1112 | * rsp ring <portRspMax> | 1097 | * rsp ring <portRspMax> |
1113 | */ | 1098 | */ |
1114 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1099 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
1115 | "%d:0312 Ring %d handler: portRspPut %d " | 1100 | "0312 Ring %d handler: portRspPut %d " |
1116 | "is bigger then rsp ring %d\n", | 1101 | "is bigger then rsp ring %d\n", |
1117 | phba->brd_no, pring->ringno, | 1102 | pring->ringno, le32_to_cpu(pgp->rspPutInx), |
1118 | le32_to_cpu(pgp->rspPutInx), | ||
1119 | pring->numRiocb); | 1103 | pring->numRiocb); |
1120 | 1104 | ||
1121 | phba->link_state = LPFC_HBA_ERROR; | 1105 | phba->link_state = LPFC_HBA_ERROR; |
@@ -1185,9 +1169,9 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_hba *phba) | |||
1185 | if (unlikely(irsp->ulpStatus)) { | 1169 | if (unlikely(irsp->ulpStatus)) { |
1186 | /* Rsp ring <ringno> error: IOCB */ | 1170 | /* Rsp ring <ringno> error: IOCB */ |
1187 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, | 1171 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, |
1188 | "%d:0326 Rsp Ring %d error: IOCB Data: " | 1172 | "0326 Rsp Ring %d error: IOCB Data: " |
1189 | "x%x x%x x%x x%x x%x x%x x%x x%x\n", | 1173 | "x%x x%x x%x x%x x%x x%x x%x x%x\n", |
1190 | phba->brd_no, pring->ringno, | 1174 | pring->ringno, |
1191 | irsp->un.ulpWord[0], | 1175 | irsp->un.ulpWord[0], |
1192 | irsp->un.ulpWord[1], | 1176 | irsp->un.ulpWord[1], |
1193 | irsp->un.ulpWord[2], | 1177 | irsp->un.ulpWord[2], |
@@ -1207,9 +1191,9 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_hba *phba) | |||
1207 | */ | 1191 | */ |
1208 | if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) { | 1192 | if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) { |
1209 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 1193 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
1210 | "%d:0314 IOCB cmd 0x%x" | 1194 | "0314 IOCB cmd 0x%x " |
1211 | " processed. Skipping" | 1195 | "processed. Skipping " |
1212 | " completion", phba->brd_no, | 1196 | "completion", |
1213 | irsp->ulpCommand); | 1197 | irsp->ulpCommand); |
1214 | break; | 1198 | break; |
1215 | } | 1199 | } |
@@ -1234,10 +1218,9 @@ void lpfc_sli_poll_fcp_ring(struct lpfc_hba *phba) | |||
1234 | } else { | 1218 | } else { |
1235 | /* Unknown IOCB command */ | 1219 | /* Unknown IOCB command */ |
1236 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1220 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
1237 | "%d:0321 Unknown IOCB command " | 1221 | "0321 Unknown IOCB command " |
1238 | "Data: x%x, x%x x%x x%x x%x\n", | 1222 | "Data: x%x, x%x x%x x%x x%x\n", |
1239 | phba->brd_no, type, | 1223 | type, irsp->ulpCommand, |
1240 | irsp->ulpCommand, | ||
1241 | irsp->ulpStatus, | 1224 | irsp->ulpStatus, |
1242 | irsp->ulpIoTag, | 1225 | irsp->ulpIoTag, |
1243 | irsp->ulpContext); | 1226 | irsp->ulpContext); |
@@ -1361,9 +1344,9 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba, | |||
1361 | 1344 | ||
1362 | /* Rsp ring <ringno> error: IOCB */ | 1345 | /* Rsp ring <ringno> error: IOCB */ |
1363 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, | 1346 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, |
1364 | "%d:0336 Rsp Ring %d error: IOCB Data: " | 1347 | "0336 Rsp Ring %d error: IOCB Data: " |
1365 | "x%x x%x x%x x%x x%x x%x x%x x%x\n", | 1348 | "x%x x%x x%x x%x x%x x%x x%x x%x\n", |
1366 | phba->brd_no, pring->ringno, | 1349 | pring->ringno, |
1367 | irsp->un.ulpWord[0], | 1350 | irsp->un.ulpWord[0], |
1368 | irsp->un.ulpWord[1], | 1351 | irsp->un.ulpWord[1], |
1369 | irsp->un.ulpWord[2], | 1352 | irsp->un.ulpWord[2], |
@@ -1383,10 +1366,9 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba, | |||
1383 | */ | 1366 | */ |
1384 | if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) { | 1367 | if (unlikely(irsp->ulpCommand == CMD_XRI_ABORTED_CX)) { |
1385 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 1368 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
1386 | "%d:0333 IOCB cmd 0x%x" | 1369 | "0333 IOCB cmd 0x%x" |
1387 | " processed. Skipping" | 1370 | " processed. Skipping" |
1388 | " completion\n", | 1371 | " completion\n", |
1389 | phba->brd_no, | ||
1390 | irsp->ulpCommand); | 1372 | irsp->ulpCommand); |
1391 | break; | 1373 | break; |
1392 | } | 1374 | } |
@@ -1423,10 +1405,9 @@ lpfc_sli_handle_fast_ring_event(struct lpfc_hba *phba, | |||
1423 | } else { | 1405 | } else { |
1424 | /* Unknown IOCB command */ | 1406 | /* Unknown IOCB command */ |
1425 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1407 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
1426 | "%d:0334 Unknown IOCB command " | 1408 | "0334 Unknown IOCB command " |
1427 | "Data: x%x, x%x x%x x%x x%x\n", | 1409 | "Data: x%x, x%x x%x x%x x%x\n", |
1428 | phba->brd_no, type, | 1410 | type, irsp->ulpCommand, |
1429 | irsp->ulpCommand, | ||
1430 | irsp->ulpStatus, | 1411 | irsp->ulpStatus, |
1431 | irsp->ulpIoTag, | 1412 | irsp->ulpIoTag, |
1432 | irsp->ulpContext); | 1413 | irsp->ulpContext); |
@@ -1504,10 +1485,9 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba *phba, | |||
1504 | * rsp ring <portRspMax> | 1485 | * rsp ring <portRspMax> |
1505 | */ | 1486 | */ |
1506 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1487 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
1507 | "%d:0303 Ring %d handler: portRspPut %d " | 1488 | "0303 Ring %d handler: portRspPut %d " |
1508 | "is bigger then rsp ring %d\n", | 1489 | "is bigger then rsp ring %d\n", |
1509 | phba->brd_no, pring->ringno, portRspPut, | 1490 | pring->ringno, portRspPut, portRspMax); |
1510 | portRspMax); | ||
1511 | 1491 | ||
1512 | phba->link_state = LPFC_HBA_ERROR; | 1492 | phba->link_state = LPFC_HBA_ERROR; |
1513 | spin_unlock_irqrestore(&phba->hbalock, iflag); | 1493 | spin_unlock_irqrestore(&phba->hbalock, iflag); |
@@ -1596,13 +1576,12 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba *phba, | |||
1596 | if (irsp->ulpStatus) { | 1576 | if (irsp->ulpStatus) { |
1597 | /* Rsp ring <ringno> error: IOCB */ | 1577 | /* Rsp ring <ringno> error: IOCB */ |
1598 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, | 1578 | lpfc_printf_log(phba, KERN_WARNING, LOG_SLI, |
1599 | "%d:0328 Rsp Ring %d error: " | 1579 | "0328 Rsp Ring %d error: " |
1600 | "IOCB Data: " | 1580 | "IOCB Data: " |
1601 | "x%x x%x x%x x%x " | 1581 | "x%x x%x x%x x%x " |
1602 | "x%x x%x x%x x%x " | 1582 | "x%x x%x x%x x%x " |
1603 | "x%x x%x x%x x%x " | 1583 | "x%x x%x x%x x%x " |
1604 | "x%x x%x x%x x%x\n", | 1584 | "x%x x%x x%x x%x\n", |
1605 | phba->brd_no, | ||
1606 | pring->ringno, | 1585 | pring->ringno, |
1607 | irsp->un.ulpWord[0], | 1586 | irsp->un.ulpWord[0], |
1608 | irsp->un.ulpWord[1], | 1587 | irsp->un.ulpWord[1], |
@@ -1677,10 +1656,9 @@ lpfc_sli_handle_slow_ring_event(struct lpfc_hba *phba, | |||
1677 | } else { | 1656 | } else { |
1678 | /* Unknown IOCB command */ | 1657 | /* Unknown IOCB command */ |
1679 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 1658 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
1680 | "%d:0335 Unknown IOCB " | 1659 | "0335 Unknown IOCB " |
1681 | "command Data: x%x " | 1660 | "command Data: x%x " |
1682 | "x%x x%x x%x\n", | 1661 | "x%x x%x x%x\n", |
1683 | phba->brd_no, | ||
1684 | irsp->ulpCommand, | 1662 | irsp->ulpCommand, |
1685 | irsp->ulpStatus, | 1663 | irsp->ulpStatus, |
1686 | irsp->ulpIoTag, | 1664 | irsp->ulpIoTag, |
@@ -1908,8 +1886,8 @@ lpfc_sli_brdkill(struct lpfc_hba *phba) | |||
1908 | 1886 | ||
1909 | /* Kill HBA */ | 1887 | /* Kill HBA */ |
1910 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 1888 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
1911 | "%d:0329 Kill HBA Data: x%x x%x\n", | 1889 | "0329 Kill HBA Data: x%x x%x\n", |
1912 | phba->brd_no, phba->pport->port_state, psli->sli_flag); | 1890 | phba->pport->port_state, psli->sli_flag); |
1913 | 1891 | ||
1914 | if ((pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, | 1892 | if ((pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool, |
1915 | GFP_KERNEL)) == 0) | 1893 | GFP_KERNEL)) == 0) |
@@ -1982,7 +1960,7 @@ lpfc_sli_brdreset(struct lpfc_hba *phba) | |||
1982 | 1960 | ||
1983 | /* Reset HBA */ | 1961 | /* Reset HBA */ |
1984 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 1962 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
1985 | "%d:0325 Reset HBA Data: x%x x%x\n", phba->brd_no, | 1963 | "0325 Reset HBA Data: x%x x%x\n", |
1986 | phba->pport->port_state, psli->sli_flag); | 1964 | phba->pport->port_state, psli->sli_flag); |
1987 | 1965 | ||
1988 | /* perform board reset */ | 1966 | /* perform board reset */ |
@@ -2037,7 +2015,7 @@ lpfc_sli_brdrestart(struct lpfc_hba *phba) | |||
2037 | 2015 | ||
2038 | /* Restart HBA */ | 2016 | /* Restart HBA */ |
2039 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 2017 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
2040 | "%d:0337 Restart HBA Data: x%x x%x\n", phba->brd_no, | 2018 | "0337 Restart HBA Data: x%x x%x\n", |
2041 | phba->pport->port_state, psli->sli_flag); | 2019 | phba->pport->port_state, psli->sli_flag); |
2042 | 2020 | ||
2043 | word0 = 0; | 2021 | word0 = 0; |
@@ -2102,9 +2080,8 @@ lpfc_sli_chipset_init(struct lpfc_hba *phba) | |||
2102 | /* Adapter failed to init, timeout, status reg | 2080 | /* Adapter failed to init, timeout, status reg |
2103 | <status> */ | 2081 | <status> */ |
2104 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2082 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
2105 | "%d:0436 Adapter failed to init, " | 2083 | "0436 Adapter failed to init, " |
2106 | "timeout, status reg x%x\n", | 2084 | "timeout, status reg x%x\n", status); |
2107 | phba->brd_no, status); | ||
2108 | phba->link_state = LPFC_HBA_ERROR; | 2085 | phba->link_state = LPFC_HBA_ERROR; |
2109 | return -ETIMEDOUT; | 2086 | return -ETIMEDOUT; |
2110 | } | 2087 | } |
@@ -2115,10 +2092,8 @@ lpfc_sli_chipset_init(struct lpfc_hba *phba) | |||
2115 | /* Adapter failed to init, chipset, status reg | 2092 | /* Adapter failed to init, chipset, status reg |
2116 | <status> */ | 2093 | <status> */ |
2117 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2094 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
2118 | "%d:0437 Adapter failed to init, " | 2095 | "0437 Adapter failed to init, " |
2119 | "chipset, status reg x%x\n", | 2096 | "chipset, status reg x%x\n", status); |
2120 | phba->brd_no, | ||
2121 | status); | ||
2122 | phba->link_state = LPFC_HBA_ERROR; | 2097 | phba->link_state = LPFC_HBA_ERROR; |
2123 | return -EIO; | 2098 | return -EIO; |
2124 | } | 2099 | } |
@@ -2145,10 +2120,8 @@ lpfc_sli_chipset_init(struct lpfc_hba *phba) | |||
2145 | /* ERROR: During chipset initialization */ | 2120 | /* ERROR: During chipset initialization */ |
2146 | /* Adapter failed to init, chipset, status reg <status> */ | 2121 | /* Adapter failed to init, chipset, status reg <status> */ |
2147 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2122 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
2148 | "%d:0438 Adapter failed to init, chipset, " | 2123 | "0438 Adapter failed to init, chipset, " |
2149 | "status reg x%x\n", | 2124 | "status reg x%x\n", status); |
2150 | phba->brd_no, | ||
2151 | status); | ||
2152 | phba->link_state = LPFC_HBA_ERROR; | 2125 | phba->link_state = LPFC_HBA_ERROR; |
2153 | return -EIO; | 2126 | return -EIO; |
2154 | } | 2127 | } |
@@ -2226,9 +2199,9 @@ lpfc_sli_hbq_setup(struct lpfc_hba *phba) | |||
2226 | 2199 | ||
2227 | lpfc_printf_log(phba, KERN_ERR, | 2200 | lpfc_printf_log(phba, KERN_ERR, |
2228 | LOG_SLI | LOG_VPORT, | 2201 | LOG_SLI | LOG_VPORT, |
2229 | "%d:1805 Adapter failed to init. " | 2202 | "1805 Adapter failed to init. " |
2230 | "Data: x%x x%x x%x\n", | 2203 | "Data: x%x x%x x%x\n", |
2231 | phba->brd_no, pmbox->mbxCommand, | 2204 | pmbox->mbxCommand, |
2232 | pmbox->mbxStatus, hbqno); | 2205 | pmbox->mbxStatus, hbqno); |
2233 | 2206 | ||
2234 | phba->link_state = LPFC_HBA_ERROR; | 2207 | phba->link_state = LPFC_HBA_ERROR; |
@@ -2295,10 +2268,9 @@ lpfc_do_config_port(struct lpfc_hba *phba, int sli_mode) | |||
2295 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); | 2268 | rc = lpfc_sli_issue_mbox(phba, pmb, MBX_POLL); |
2296 | if (rc != MBX_SUCCESS) { | 2269 | if (rc != MBX_SUCCESS) { |
2297 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 2270 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
2298 | "%d:0442 Adapter failed to init, mbxCmd x%x " | 2271 | "0442 Adapter failed to init, mbxCmd x%x " |
2299 | "CONFIG_PORT, mbxStatus x%x Data: x%x\n", | 2272 | "CONFIG_PORT, mbxStatus x%x Data: x%x\n", |
2300 | phba->brd_no, pmb->mb.mbxCommand, | 2273 | pmb->mb.mbxCommand, pmb->mb.mbxStatus, 0); |
2301 | pmb->mb.mbxStatus, 0); | ||
2302 | spin_lock_irq(&phba->hbalock); | 2274 | spin_lock_irq(&phba->hbalock); |
2303 | phba->sli.sli_flag &= ~LPFC_SLI2_ACTIVE; | 2275 | phba->sli.sli_flag &= ~LPFC_SLI2_ACTIVE; |
2304 | spin_unlock_irq(&phba->hbalock); | 2276 | spin_unlock_irq(&phba->hbalock); |
@@ -2339,9 +2311,9 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) | |||
2339 | case 2: | 2311 | case 2: |
2340 | if (phba->cfg_npiv_enable) { | 2312 | if (phba->cfg_npiv_enable) { |
2341 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 2313 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, |
2342 | "%d:1824 NPIV enabled: Override lpfc_sli_mode " | 2314 | "1824 NPIV enabled: Override lpfc_sli_mode " |
2343 | "parameter (%d) to auto (0).\n", | 2315 | "parameter (%d) to auto (0).\n", |
2344 | phba->brd_no, lpfc_sli_mode); | 2316 | lpfc_sli_mode); |
2345 | break; | 2317 | break; |
2346 | } | 2318 | } |
2347 | mode = 2; | 2319 | mode = 2; |
@@ -2351,9 +2323,8 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) | |||
2351 | break; | 2323 | break; |
2352 | default: | 2324 | default: |
2353 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 2325 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, |
2354 | "%d:1819 Unrecognized lpfc_sli_mode " | 2326 | "1819 Unrecognized lpfc_sli_mode " |
2355 | "parameter: %d.\n", | 2327 | "parameter: %d.\n", lpfc_sli_mode); |
2356 | phba->brd_no, lpfc_sli_mode); | ||
2357 | 2328 | ||
2358 | break; | 2329 | break; |
2359 | } | 2330 | } |
@@ -2361,9 +2332,8 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) | |||
2361 | rc = lpfc_do_config_port(phba, mode); | 2332 | rc = lpfc_do_config_port(phba, mode); |
2362 | if (rc && lpfc_sli_mode == 3) | 2333 | if (rc && lpfc_sli_mode == 3) |
2363 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 2334 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, |
2364 | "%d:1820 Unable to select SLI-3. " | 2335 | "1820 Unable to select SLI-3. " |
2365 | "Not supported by adapter.\n", | 2336 | "Not supported by adapter.\n"); |
2366 | phba->brd_no); | ||
2367 | if (rc && mode != 2) | 2337 | if (rc && mode != 2) |
2368 | rc = lpfc_do_config_port(phba, 2); | 2338 | rc = lpfc_do_config_port(phba, 2); |
2369 | if (rc) | 2339 | if (rc) |
@@ -2382,8 +2352,8 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) | |||
2382 | } | 2352 | } |
2383 | 2353 | ||
2384 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 2354 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
2385 | "%d:0444 Firmware in SLI %x mode. Max_vpi %d\n", | 2355 | "0444 Firmware in SLI %x mode. Max_vpi %d\n", |
2386 | phba->brd_no, phba->sli_rev, phba->max_vpi); | 2356 | phba->sli_rev, phba->max_vpi); |
2387 | rc = lpfc_sli_ring_map(phba); | 2357 | rc = lpfc_sli_ring_map(phba); |
2388 | 2358 | ||
2389 | if (rc) | 2359 | if (rc) |
@@ -2408,8 +2378,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba) | |||
2408 | lpfc_sli_hba_setup_error: | 2378 | lpfc_sli_hba_setup_error: |
2409 | phba->link_state = LPFC_HBA_ERROR; | 2379 | phba->link_state = LPFC_HBA_ERROR; |
2410 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, | 2380 | lpfc_printf_log(phba, KERN_INFO, LOG_INIT, |
2411 | "%d:0445 Firmware initialization failed\n", | 2381 | "0445 Firmware initialization failed\n"); |
2412 | phba->brd_no); | ||
2413 | return rc; | 2382 | return rc; |
2414 | } | 2383 | } |
2415 | 2384 | ||
@@ -2461,9 +2430,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
2461 | 2430 | ||
2462 | /* Mbox cmd <mbxCommand> timeout */ | 2431 | /* Mbox cmd <mbxCommand> timeout */ |
2463 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 2432 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, |
2464 | "%d:0310 Mailbox command x%x timeout Data: x%x x%x " | 2433 | "0310 Mailbox command x%x timeout Data: x%x x%x x%p\n", |
2465 | "x%p\n", | ||
2466 | phba->brd_no, | ||
2467 | mb->mbxCommand, | 2434 | mb->mbxCommand, |
2468 | phba->pport->port_state, | 2435 | phba->pport->port_state, |
2469 | phba->sli.sli_flag, | 2436 | phba->sli.sli_flag, |
@@ -2486,8 +2453,7 @@ lpfc_mbox_timeout_handler(struct lpfc_hba *phba) | |||
2486 | lpfc_sli_abort_iocb_ring(phba, pring); | 2453 | lpfc_sli_abort_iocb_ring(phba, pring); |
2487 | 2454 | ||
2488 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, | 2455 | lpfc_printf_log(phba, KERN_ERR, LOG_MBOX | LOG_SLI, |
2489 | "%d:0316 Resetting board due to mailbox timeout\n", | 2456 | "0316 Resetting board due to mailbox timeout\n"); |
2490 | phba->brd_no); | ||
2491 | /* | 2457 | /* |
2492 | * lpfc_offline calls lpfc_sli_hba_down which will clean up | 2458 | * lpfc_offline calls lpfc_sli_hba_down which will clean up |
2493 | * on oustanding mailbox commands. | 2459 | * on oustanding mailbox commands. |
@@ -2518,8 +2484,7 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag) | |||
2518 | if(!pmbox->vport) { | 2484 | if(!pmbox->vport) { |
2519 | lpfc_printf_log(phba, KERN_ERR, | 2485 | lpfc_printf_log(phba, KERN_ERR, |
2520 | LOG_MBOX | LOG_VPORT, | 2486 | LOG_MBOX | LOG_VPORT, |
2521 | "%d:1806 Mbox x%x failed. No vport\n", | 2487 | "1806 Mbox x%x failed. No vport\n", |
2522 | phba->brd_no, | ||
2523 | pmbox->mb.mbxCommand); | 2488 | pmbox->mb.mbxCommand); |
2524 | dump_stack(); | 2489 | dump_stack(); |
2525 | return MBXERR_ERROR; | 2490 | return MBXERR_ERROR; |
@@ -2596,9 +2561,8 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag) | |||
2596 | 2561 | ||
2597 | /* Mbox cmd issue - BUSY */ | 2562 | /* Mbox cmd issue - BUSY */ |
2598 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, | 2563 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, |
2599 | "%d (%d):0308 Mbox cmd issue - BUSY Data: " | 2564 | "(%d):0308 Mbox cmd issue - BUSY Data: " |
2600 | "x%x x%x x%x x%x\n", | 2565 | "x%x x%x x%x x%x\n", |
2601 | phba->brd_no, | ||
2602 | pmbox->vport ? pmbox->vport->vpi : 0xffffff, | 2566 | pmbox->vport ? pmbox->vport->vpi : 0xffffff, |
2603 | mb->mbxCommand, phba->pport->port_state, | 2567 | mb->mbxCommand, phba->pport->port_state, |
2604 | psli->sli_flag, flag); | 2568 | psli->sli_flag, flag); |
@@ -2660,9 +2624,9 @@ lpfc_sli_issue_mbox(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmbox, uint32_t flag) | |||
2660 | 2624 | ||
2661 | /* Mailbox cmd <cmd> issue */ | 2625 | /* Mailbox cmd <cmd> issue */ |
2662 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, | 2626 | lpfc_printf_log(phba, KERN_INFO, LOG_MBOX | LOG_SLI, |
2663 | "%d (%d):0309 Mailbox cmd x%x issue Data: x%x x%x " | 2627 | "(%d):0309 Mailbox cmd x%x issue Data: x%x x%x " |
2664 | "x%x\n", | 2628 | "x%x\n", |
2665 | phba->brd_no, pmbox->vport ? pmbox->vport->vpi : 0, | 2629 | pmbox->vport ? pmbox->vport->vpi : 0, |
2666 | mb->mbxCommand, phba->pport->port_state, | 2630 | mb->mbxCommand, phba->pport->port_state, |
2667 | psli->sli_flag, flag); | 2631 | psli->sli_flag, flag); |
2668 | 2632 | ||
@@ -2864,8 +2828,7 @@ __lpfc_sli_issue_iocb(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
2864 | (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) { | 2828 | (piocb->iocb.ulpCommand != CMD_CLOSE_XRI_CN)) { |
2865 | lpfc_printf_log(phba, KERN_ERR, | 2829 | lpfc_printf_log(phba, KERN_ERR, |
2866 | LOG_SLI | LOG_VPORT, | 2830 | LOG_SLI | LOG_VPORT, |
2867 | "%d:1807 IOCB x%x failed. No vport\n", | 2831 | "1807 IOCB x%x failed. No vport\n", |
2868 | phba->brd_no, | ||
2869 | piocb->iocb.ulpCommand); | 2832 | piocb->iocb.ulpCommand); |
2870 | dump_stack(); | 2833 | dump_stack(); |
2871 | return IOCB_ERROR; | 2834 | return IOCB_ERROR; |
@@ -3096,11 +3059,10 @@ lpfc_sli_setup(struct lpfc_hba *phba) | |||
3096 | } | 3059 | } |
3097 | if (totiocbsize > MAX_SLIM_IOCB_SIZE) { | 3060 | if (totiocbsize > MAX_SLIM_IOCB_SIZE) { |
3098 | /* Too many cmd / rsp ring entries in SLI2 SLIM */ | 3061 | /* Too many cmd / rsp ring entries in SLI2 SLIM */ |
3099 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3062 | printk(KERN_ERR "%d:0462 Too many cmd / rsp ring entries in " |
3100 | "%d:0462 Too many cmd / rsp ring entries in " | 3063 | "SLI2 SLIM Data: x%x x%lx\n", |
3101 | "SLI2 SLIM Data: x%x x%lx\n", | 3064 | phba->brd_no, totiocbsize, |
3102 | phba->brd_no, totiocbsize, | 3065 | (unsigned long) MAX_SLIM_IOCB_SIZE); |
3103 | (unsigned long) MAX_SLIM_IOCB_SIZE); | ||
3104 | } | 3066 | } |
3105 | if (phba->cfg_multi_ring_support == 2) | 3067 | if (phba->cfg_multi_ring_support == 2) |
3106 | lpfc_extra_ring_setup(phba); | 3068 | lpfc_extra_ring_setup(phba); |
@@ -3321,9 +3283,9 @@ lpfc_sli_ringpostbuf_get(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
3321 | 3283 | ||
3322 | spin_unlock_irq(&phba->hbalock); | 3284 | spin_unlock_irq(&phba->hbalock); |
3323 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, | 3285 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT, |
3324 | "%d:0410 Cannot find virtual addr for mapped buf on " | 3286 | "0410 Cannot find virtual addr for mapped buf on " |
3325 | "ring %d Data x%llx x%p x%p x%x\n", | 3287 | "ring %d Data x%llx x%p x%p x%x\n", |
3326 | phba->brd_no, pring->ringno, (unsigned long long)phys, | 3288 | pring->ringno, (unsigned long long)phys, |
3327 | slp->next, slp->prev, pring->postbufq_cnt); | 3289 | slp->next, slp->prev, pring->postbufq_cnt); |
3328 | return NULL; | 3290 | return NULL; |
3329 | } | 3291 | } |
@@ -3348,12 +3310,11 @@ lpfc_sli_abort_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
3348 | abort_iocb = phba->sli.iocbq_lookup[abort_iotag]; | 3310 | abort_iocb = phba->sli.iocbq_lookup[abort_iotag]; |
3349 | 3311 | ||
3350 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS | LOG_SLI, | 3312 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS | LOG_SLI, |
3351 | "%d:0327 Cannot abort els iocb %p " | 3313 | "0327 Cannot abort els iocb %p " |
3352 | "with tag %x context %x, abort status %x, " | 3314 | "with tag %x context %x, abort status %x, " |
3353 | "abort code %x\n", | 3315 | "abort code %x\n", |
3354 | phba->brd_no, abort_iocb, abort_iotag, | 3316 | abort_iocb, abort_iotag, abort_context, |
3355 | abort_context, irsp->ulpStatus, | 3317 | irsp->ulpStatus, irsp->un.ulpWord[4]); |
3356 | irsp->un.ulpWord[4]); | ||
3357 | 3318 | ||
3358 | /* | 3319 | /* |
3359 | * make sure we have the right iocbq before taking it | 3320 | * make sure we have the right iocbq before taking it |
@@ -3387,9 +3348,9 @@ lpfc_ignore_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, | |||
3387 | 3348 | ||
3388 | /* ELS cmd tag <ulpIoTag> completes */ | 3349 | /* ELS cmd tag <ulpIoTag> completes */ |
3389 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, | 3350 | lpfc_printf_log(phba, KERN_INFO, LOG_ELS, |
3390 | "%d (X):0133 Ignoring ELS cmd tag x%x completion Data: " | 3351 | "0133 Ignoring ELS cmd tag x%x completion Data: " |
3391 | "x%x x%x x%x\n", | 3352 | "x%x x%x x%x\n", |
3392 | phba->brd_no, irsp->ulpIoTag, irsp->ulpStatus, | 3353 | irsp->ulpIoTag, irsp->ulpStatus, |
3393 | irsp->un.ulpWord[4], irsp->ulpTimeout); | 3354 | irsp->un.ulpWord[4], irsp->ulpTimeout); |
3394 | if (cmdiocb->iocb.ulpCommand == CMD_GEN_REQUEST64_CR) | 3355 | if (cmdiocb->iocb.ulpCommand == CMD_GEN_REQUEST64_CR) |
3395 | lpfc_ct_free_iocb(phba, cmdiocb); | 3356 | lpfc_ct_free_iocb(phba, cmdiocb); |
@@ -3455,12 +3416,11 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring, | |||
3455 | 3416 | ||
3456 | abtsiocbp->iocb_cmpl = lpfc_sli_abort_els_cmpl; | 3417 | abtsiocbp->iocb_cmpl = lpfc_sli_abort_els_cmpl; |
3457 | 3418 | ||
3458 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 3419 | lpfc_printf_vlog(vport, KERN_INFO, LOG_SLI, |
3459 | "%d (%d):0339 Abort xri x%x, original iotag x%x, " | 3420 | "0339 Abort xri x%x, original iotag x%x, " |
3460 | "abort cmd iotag x%x\n", | 3421 | "abort cmd iotag x%x\n", |
3461 | phba->brd_no, vport->vpi, | 3422 | iabt->un.acxri.abortContextTag, |
3462 | iabt->un.acxri.abortContextTag, | 3423 | iabt->un.acxri.abortIoTag, abtsiocbp->iotag); |
3463 | iabt->un.acxri.abortIoTag, abtsiocbp->iotag); | ||
3464 | retval = __lpfc_sli_issue_iocb(phba, pring, abtsiocbp, 0); | 3424 | retval = __lpfc_sli_issue_iocb(phba, pring, abtsiocbp, 0); |
3465 | 3425 | ||
3466 | abort_iotag_exit: | 3426 | abort_iotag_exit: |
@@ -3663,25 +3623,23 @@ lpfc_sli_issue_iocb_wait(struct lpfc_hba *phba, | |||
3663 | 3623 | ||
3664 | if (piocb->iocb_flag & LPFC_IO_WAKE) { | 3624 | if (piocb->iocb_flag & LPFC_IO_WAKE) { |
3665 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 3625 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
3666 | "%d:0331 IOCB wake signaled\n", | 3626 | "0331 IOCB wake signaled\n"); |
3667 | phba->brd_no); | ||
3668 | } else if (timeleft == 0) { | 3627 | } else if (timeleft == 0) { |
3669 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3628 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
3670 | "%d:0338 IOCB wait timeout error - no " | 3629 | "0338 IOCB wait timeout error - no " |
3671 | "wake response Data x%x\n", | 3630 | "wake response Data x%x\n", timeout); |
3672 | phba->brd_no, timeout); | ||
3673 | retval = IOCB_TIMEDOUT; | 3631 | retval = IOCB_TIMEDOUT; |
3674 | } else { | 3632 | } else { |
3675 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, | 3633 | lpfc_printf_log(phba, KERN_ERR, LOG_SLI, |
3676 | "%d:0330 IOCB wake NOT set, " | 3634 | "0330 IOCB wake NOT set, " |
3677 | "Data x%x x%lx\n", phba->brd_no, | 3635 | "Data x%x x%lx\n", |
3678 | timeout, (timeleft / jiffies)); | 3636 | timeout, (timeleft / jiffies)); |
3679 | retval = IOCB_TIMEDOUT; | 3637 | retval = IOCB_TIMEDOUT; |
3680 | } | 3638 | } |
3681 | } else { | 3639 | } else { |
3682 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, | 3640 | lpfc_printf_log(phba, KERN_INFO, LOG_SLI, |
3683 | "%d:0332 IOCB wait issue failed, Data x%x\n", | 3641 | ":0332 IOCB wait issue failed, Data x%x\n", |
3684 | phba->brd_no, retval); | 3642 | retval); |
3685 | retval = IOCB_ERROR; | 3643 | retval = IOCB_ERROR; |
3686 | } | 3644 | } |
3687 | 3645 | ||
@@ -3932,12 +3890,10 @@ lpfc_intr_handler(int irq, void *dev_id) | |||
3932 | */ | 3890 | */ |
3933 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | | 3891 | lpfc_printf_log(phba, KERN_WARNING, LOG_MBOX | |
3934 | LOG_SLI, | 3892 | LOG_SLI, |
3935 | "%d (%d):0304 Stray Mailbox " | 3893 | "(%d):0304 Stray Mailbox " |
3936 | "Interrupt mbxCommand x%x " | 3894 | "Interrupt mbxCommand x%x " |
3937 | "mbxStatus x%x\n", | 3895 | "mbxStatus x%x\n", |
3938 | phba->brd_no, | 3896 | (vport ? vport->vpi : 0), |
3939 | (vport | ||
3940 | ? vport->vpi : 0), | ||
3941 | pmbox->mbxCommand, | 3897 | pmbox->mbxCommand, |
3942 | pmbox->mbxStatus); | 3898 | pmbox->mbxStatus); |
3943 | } | 3899 | } |
diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c index 70e1bc34fd48..77067d17c39d 100644 --- a/drivers/scsi/lpfc/lpfc_vport.c +++ b/drivers/scsi/lpfc/lpfc_vport.c | |||
@@ -125,11 +125,10 @@ lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport) | |||
125 | pmb->vport = vport; | 125 | pmb->vport = vport; |
126 | rc = lpfc_sli_issue_mbox_wait(phba, pmb, phba->fc_ratov * 2); | 126 | rc = lpfc_sli_issue_mbox_wait(phba, pmb, phba->fc_ratov * 2); |
127 | if (rc != MBX_SUCCESS) { | 127 | if (rc != MBX_SUCCESS) { |
128 | lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, | 128 | lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT, |
129 | "%d (%d):1818 VPort failed init, mbxCmd x%x " | 129 | "1818 VPort failed init, mbxCmd x%x " |
130 | "READ_SPARM mbxStatus x%x, rc = x%x\n", | 130 | "READ_SPARM mbxStatus x%x, rc = x%x\n", |
131 | phba->brd_no, vport->vpi, | 131 | mb->mbxCommand, mb->mbxStatus, rc); |
132 | mb->mbxCommand, mb->mbxStatus, rc); | ||
133 | lpfc_mbuf_free(phba, mp->virt, mp->phys); | 132 | lpfc_mbuf_free(phba, mp->virt, mp->phys); |
134 | kfree(mp); | 133 | kfree(mp); |
135 | if (rc != MBX_TIMEOUT) | 134 | if (rc != MBX_TIMEOUT) |
@@ -162,9 +161,9 @@ lpfc_valid_wwn_format(struct lpfc_hba *phba, struct lpfc_name *wwn, | |||
162 | return 1; | 161 | return 1; |
163 | 162 | ||
164 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 163 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |
165 | "%d:1822 Invalid %s: %02x:%02x:%02x:%02x:" | 164 | "1822 Invalid %s: %02x:%02x:%02x:%02x:" |
166 | "%02x:%02x:%02x:%02x\n", | 165 | "%02x:%02x:%02x:%02x\n", |
167 | phba->brd_no, name_type, | 166 | name_type, |
168 | wwn->u.wwn[0], wwn->u.wwn[1], | 167 | wwn->u.wwn[0], wwn->u.wwn[1], |
169 | wwn->u.wwn[2], wwn->u.wwn[3], | 168 | wwn->u.wwn[2], wwn->u.wwn[3], |
170 | wwn->u.wwn[4], wwn->u.wwn[5], | 169 | wwn->u.wwn[4], wwn->u.wwn[5], |
@@ -209,9 +208,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
209 | if ((phba->sli_rev < 3) || | 208 | if ((phba->sli_rev < 3) || |
210 | !(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED)) { | 209 | !(phba->sli3_options & LPFC_SLI3_NPIV_ENABLED)) { |
211 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 210 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |
212 | "%d:1808 Create VPORT failed: " | 211 | "1808 Create VPORT failed: " |
213 | "NPIV is not enabled: SLImode:%d\n", | 212 | "NPIV is not enabled: SLImode:%d\n", |
214 | phba->brd_no, phba->sli_rev); | 213 | phba->sli_rev); |
215 | rc = VPORT_INVAL; | 214 | rc = VPORT_INVAL; |
216 | goto error_out; | 215 | goto error_out; |
217 | } | 216 | } |
@@ -219,9 +218,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
219 | vpi = lpfc_alloc_vpi(phba); | 218 | vpi = lpfc_alloc_vpi(phba); |
220 | if (vpi == 0) { | 219 | if (vpi == 0) { |
221 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 220 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |
222 | "%d:1809 Create VPORT failed: " | 221 | "1809 Create VPORT failed: " |
223 | "Max VPORTs (%d) exceeded\n", | 222 | "Max VPORTs (%d) exceeded\n", |
224 | phba->brd_no, phba->max_vpi); | 223 | phba->max_vpi); |
225 | rc = VPORT_NORESOURCES; | 224 | rc = VPORT_NORESOURCES; |
226 | goto error_out; | 225 | goto error_out; |
227 | } | 226 | } |
@@ -230,8 +229,8 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
230 | /* Assign an unused board number */ | 229 | /* Assign an unused board number */ |
231 | if ((instance = lpfc_get_instance()) < 0) { | 230 | if ((instance = lpfc_get_instance()) < 0) { |
232 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 231 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |
233 | "%d:1810 Create VPORT failed: Cannot get " | 232 | "1810 Create VPORT failed: Cannot get " |
234 | "instance number\n", phba->brd_no); | 233 | "instance number\n"); |
235 | lpfc_free_vpi(phba, vpi); | 234 | lpfc_free_vpi(phba, vpi); |
236 | rc = VPORT_NORESOURCES; | 235 | rc = VPORT_NORESOURCES; |
237 | goto error_out; | 236 | goto error_out; |
@@ -240,8 +239,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
240 | vport = lpfc_create_port(phba, instance, &fc_vport->dev); | 239 | vport = lpfc_create_port(phba, instance, &fc_vport->dev); |
241 | if (!vport) { | 240 | if (!vport) { |
242 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 241 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, |
243 | "%d:1811 Create VPORT failed: vpi x%x\n", | 242 | "1811 Create VPORT failed: vpi x%x\n", vpi); |
244 | phba->brd_no, vpi); | ||
245 | lpfc_free_vpi(phba, vpi); | 243 | lpfc_free_vpi(phba, vpi); |
246 | rc = VPORT_NORESOURCES; | 244 | rc = VPORT_NORESOURCES; |
247 | goto error_out; | 245 | goto error_out; |
@@ -251,10 +249,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
251 | lpfc_debugfs_initialize(vport); | 249 | lpfc_debugfs_initialize(vport); |
252 | 250 | ||
253 | if (lpfc_vport_sparm(phba, vport)) { | 251 | if (lpfc_vport_sparm(phba, vport)) { |
254 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 252 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, |
255 | "%d:1813 Create VPORT failed: vpi:%d " | 253 | "1813 Create VPORT failed. " |
256 | "Cannot get sparam\n", | 254 | "Cannot get sparam\n"); |
257 | phba->brd_no, vpi); | ||
258 | lpfc_free_vpi(phba, vpi); | 255 | lpfc_free_vpi(phba, vpi); |
259 | destroy_port(vport); | 256 | destroy_port(vport); |
260 | rc = VPORT_NORESOURCES; | 257 | rc = VPORT_NORESOURCES; |
@@ -274,10 +271,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
274 | 271 | ||
275 | if (!lpfc_valid_wwn_format(phba, &vport->fc_sparam.nodeName, "WWNN") || | 272 | if (!lpfc_valid_wwn_format(phba, &vport->fc_sparam.nodeName, "WWNN") || |
276 | !lpfc_valid_wwn_format(phba, &vport->fc_sparam.portName, "WWPN")) { | 273 | !lpfc_valid_wwn_format(phba, &vport->fc_sparam.portName, "WWPN")) { |
277 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 274 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, |
278 | "%d:1821 Create VPORT failed: vpi:%d " | 275 | "1821 Create VPORT failed. " |
279 | "Invalid WWN format\n", | 276 | "Invalid WWN format\n"); |
280 | phba->brd_no, vpi); | ||
281 | lpfc_free_vpi(phba, vpi); | 277 | lpfc_free_vpi(phba, vpi); |
282 | destroy_port(vport); | 278 | destroy_port(vport); |
283 | rc = VPORT_INVAL; | 279 | rc = VPORT_INVAL; |
@@ -285,10 +281,9 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
285 | } | 281 | } |
286 | 282 | ||
287 | if (!lpfc_unique_wwpn(phba, vport)) { | 283 | if (!lpfc_unique_wwpn(phba, vport)) { |
288 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 284 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, |
289 | "%d:1823 Create VPORT failed: vpi:%d " | 285 | "1823 Create VPORT failed. " |
290 | "Duplicate WWN on HBA\n", | 286 | "Duplicate WWN on HBA\n"); |
291 | phba->brd_no, vpi); | ||
292 | lpfc_free_vpi(phba, vpi); | 287 | lpfc_free_vpi(phba, vpi); |
293 | destroy_port(vport); | 288 | destroy_port(vport); |
294 | rc = VPORT_INVAL; | 289 | rc = VPORT_INVAL; |
@@ -320,10 +315,8 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable) | |||
320 | lpfc_initial_fdisc(vport); | 315 | lpfc_initial_fdisc(vport); |
321 | } else { | 316 | } else { |
322 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); | 317 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); |
323 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 318 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
324 | "%d (%d):0262 No NPIV Fabric " | 319 | "0262 No NPIV Fabric support\n"); |
325 | "support\n", | ||
326 | phba->brd_no, vport->vpi); | ||
327 | } | 320 | } |
328 | } else { | 321 | } else { |
329 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 322 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
@@ -409,10 +402,8 @@ enable_vport(struct fc_vport *fc_vport) | |||
409 | lpfc_initial_fdisc(vport); | 402 | lpfc_initial_fdisc(vport); |
410 | } else { | 403 | } else { |
411 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); | 404 | lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP); |
412 | lpfc_printf_log(phba, KERN_ERR, LOG_ELS, | 405 | lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS, |
413 | "%d (%d):0264 No NPIV Fabric " | 406 | "0264 No NPIV Fabric support\n"); |
414 | "support\n", | ||
415 | phba->brd_no, vport->vpi); | ||
416 | } | 407 | } |
417 | } else { | 408 | } else { |
418 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); | 409 | lpfc_vport_set_state(vport, FC_VPORT_FAILED); |
@@ -462,9 +453,9 @@ lpfc_vport_delete(struct fc_vport *fc_vport) | |||
462 | return VPORT_INVAL; | 453 | return VPORT_INVAL; |
463 | 454 | ||
464 | if (vport->port_type == LPFC_PHYSICAL_PORT) { | 455 | if (vport->port_type == LPFC_PHYSICAL_PORT) { |
465 | lpfc_printf_log(phba, KERN_ERR, LOG_VPORT, | 456 | lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT, |
466 | "%d:1812 vport_delete failed: Cannot delete " | 457 | "1812 vport_delete failed: Cannot delete " |
467 | "physical host\n", phba->brd_no); | 458 | "physical host\n"); |
468 | goto out; | 459 | goto out; |
469 | } | 460 | } |
470 | 461 | ||
@@ -544,8 +535,12 @@ lpfc_create_vport_work_array(struct lpfc_hba *phba) | |||
544 | return NULL; | 535 | return NULL; |
545 | spin_lock_irq(&phba->hbalock); | 536 | spin_lock_irq(&phba->hbalock); |
546 | list_for_each_entry(port_iterator, &phba->port_list, listentry) { | 537 | list_for_each_entry(port_iterator, &phba->port_list, listentry) { |
547 | if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) | 538 | if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) { |
539 | lpfc_printf_vlog(port_iterator, KERN_ERR, LOG_VPORT, | ||
540 | "1801 Create vport work array FAILED: " | ||
541 | "cannot do scsi_host_get\n"); | ||
548 | continue; | 542 | continue; |
543 | } | ||
549 | vports[index++] = port_iterator; | 544 | vports[index++] = port_iterator; |
550 | } | 545 | } |
551 | spin_unlock_irq(&phba->hbalock); | 546 | spin_unlock_irq(&phba->hbalock); |