aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Dupuis <chad.dupuis@qlogic.com>2011-11-18 12:03:07 -0500
committerJames Bottomley <JBottomley@Parallels.com>2011-12-15 01:55:02 -0500
commitcfb0919c12a33132f75fb91971bbd8bdd44ebb90 (patch)
tree9996ba3894bafbb63c1d7c523efe9baf7378c3ac
parentd8424f68c0160c45c446e56cb586fd8b9c538a1a (diff)
[SCSI] qla2xxx: Update to dynamic logging.
This patch contains minor fixes to our new logging infrastructure: - Remove extranous messages. - Re-add 'nexus' and 'hdl' information. - Adjusted the message ids to fill up the holes. - Display FCP_CMND priority on update. - Log only mail box error conditions. - Do not print "Firmware ready **** FAILED ****" if cable is unplugged. - Drop noisy 'fw_state...curr time...' message. - Correct nexus display during abort. - Add a special case error-logging set to '1'. - Catagorize I/O exception display handling. - Correct the bsg msg code printing. - Dont use dynamic logging after host is removed. Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_attr.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_bsg.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.c93
-rw-r--r--drivers/scsi/qla2xxx/qla_dbg.h1
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h4
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c84
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c152
-rw-r--r--drivers/scsi/qla2xxx/qla_nx.c6
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c69
10 files changed, 199 insertions, 216 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index 9298649514a5..efab503fc866 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1971,8 +1971,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
1971 "Queue delete failed.\n"); 1971 "Queue delete failed.\n");
1972 } 1972 }
1973 1973
1974 scsi_host_put(vha->host);
1975 ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id); 1974 ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id);
1975 scsi_host_put(vha->host);
1976 return 0; 1976 return 0;
1977} 1977}
1978 1978
diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
index 8b641a8a0c74..371d0de7e30b 100644
--- a/drivers/scsi/qla2xxx/qla_bsg.c
+++ b/drivers/scsi/qla2xxx/qla_bsg.c
@@ -1653,7 +1653,7 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
1653 } 1653 }
1654 1654
1655 ql_dbg(ql_dbg_user, vha, 0x7000, 1655 ql_dbg(ql_dbg_user, vha, 0x7000,
1656 "Entered %s msgcode=%d.\n", __func__, bsg_job->request->msgcode); 1656 "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode);
1657 1657
1658 switch (bsg_job->request->msgcode) { 1658 switch (bsg_job->request->msgcode) {
1659 case FC_BSG_RPT_ELS: 1659 case FC_BSG_RPT_ELS:
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 6db16af1a446..58e0bfbfcd33 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -11,15 +11,16 @@
11 * ---------------------------------------------------------------------- 11 * ----------------------------------------------------------------------
12 * | Level | Last Value Used | Holes | 12 * | Level | Last Value Used | Holes |
13 * ---------------------------------------------------------------------- 13 * ----------------------------------------------------------------------
14 * | Module Init and Probe | 0x0116 | | 14 * | Module Init and Probe | 0x0116 | 0xfa |
15 * | Mailbox commands | 0x112b | | 15 * | Mailbox commands | 0x112b | |
16 * | Device Discovery | 0x2083 | | 16 * | Device Discovery | 0x2084 | |
17 * | Queue Command and IO tracing | 0x302e | 0x3008 | 17 * | Queue Command and IO tracing | 0x302f | 0x3008 |
18 * | DPC Thread | 0x401c | | 18 * | DPC Thread | 0x401c | |
19 * | Async Events | 0x5059 | | 19 * | Async Events | 0x5057 | 0x5052 |
20 * | Timer Routines | 0x6010 | 0x600e,0x600f | 20 * | Timer Routines | 0x6011 | 0x600e,0x600f |
21 * | User Space Interactions | 0x709d | | 21 * | User Space Interactions | 0x709e | |
22 * | Task Management | 0x8041 | 0x800b | 22 * | Task Management | 0x803c | 0x8025-0x8026 |
23 * | | | 0x800b,0x8039 |
23 * | AER/EEH | 0x900f | | 24 * | AER/EEH | 0x900f | |
24 * | Virtual Port | 0xa007 | | 25 * | Virtual Port | 0xa007 | |
25 * | ISP82XX Specific | 0xb052 | | 26 * | ISP82XX Specific | 0xb052 | |
@@ -1650,6 +1651,15 @@ qla81xx_fw_dump_failed:
1650/****************************************************************************/ 1651/****************************************************************************/
1651/* Driver Debug Functions. */ 1652/* Driver Debug Functions. */
1652/****************************************************************************/ 1653/****************************************************************************/
1654
1655static inline int
1656ql_mask_match(uint32_t level)
1657{
1658 if (ql2xextended_error_logging == 1)
1659 ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
1660 return (level & ql2xextended_error_logging) == level;
1661}
1662
1653/* 1663/*
1654 * This function is for formatting and logging debug information. 1664 * This function is for formatting and logging debug information.
1655 * It is to be used when vha is available. It formats the message 1665 * It is to be used when vha is available. It formats the message
@@ -1669,7 +1679,7 @@ ql_dbg(uint32_t level, scsi_qla_host_t *vha, int32_t id, const char *fmt, ...)
1669 va_list va; 1679 va_list va;
1670 struct va_format vaf; 1680 struct va_format vaf;
1671 1681
1672 if ((level & ql2xextended_error_logging) != level) 1682 if (!ql_mask_match(level))
1673 return; 1683 return;
1674 1684
1675 va_start(va, fmt); 1685 va_start(va, fmt);
@@ -1715,7 +1725,7 @@ ql_dbg_pci(uint32_t level, struct pci_dev *pdev, int32_t id,
1715 1725
1716 if (pdev == NULL) 1726 if (pdev == NULL)
1717 return; 1727 return;
1718 if ((level & ql2xextended_error_logging) != level) 1728 if (!ql_mask_match(level))
1719 return; 1729 return;
1720 1730
1721 va_start(va, fmt); 1731 va_start(va, fmt);
@@ -1852,20 +1862,20 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
1852 struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; 1862 struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82;
1853 uint16_t __iomem *mbx_reg; 1863 uint16_t __iomem *mbx_reg;
1854 1864
1855 if ((level & ql2xextended_error_logging) == level) { 1865 if (!ql_mask_match(level))
1856 1866 return;
1857 if (IS_QLA82XX(ha))
1858 mbx_reg = &reg82->mailbox_in[0];
1859 else if (IS_FWI2_CAPABLE(ha))
1860 mbx_reg = &reg24->mailbox0;
1861 else
1862 mbx_reg = MAILBOX_REG(ha, reg, 0);
1863 1867
1864 ql_dbg(level, vha, id, "Mailbox registers:\n"); 1868 if (IS_QLA82XX(ha))
1865 for (i = 0; i < 6; i++) 1869 mbx_reg = &reg82->mailbox_in[0];
1866 ql_dbg(level, vha, id, 1870 else if (IS_FWI2_CAPABLE(ha))
1867 "mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++)); 1871 mbx_reg = &reg24->mailbox0;
1868 } 1872 else
1873 mbx_reg = MAILBOX_REG(ha, reg, 0);
1874
1875 ql_dbg(level, vha, id, "Mailbox registers:\n");
1876 for (i = 0; i < 6; i++)
1877 ql_dbg(level, vha, id,
1878 "mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++));
1869} 1879}
1870 1880
1871 1881
@@ -1875,24 +1885,25 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
1875{ 1885{
1876 uint32_t cnt; 1886 uint32_t cnt;
1877 uint8_t c; 1887 uint8_t c;
1878 if ((level & ql2xextended_error_logging) == level) { 1888
1879 1889 if (!ql_mask_match(level))
1880 ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 " 1890 return;
1881 "9 Ah Bh Ch Dh Eh Fh\n"); 1891
1882 ql_dbg(level, vha, id, "----------------------------------" 1892 ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 "
1883 "----------------------------\n"); 1893 "9 Ah Bh Ch Dh Eh Fh\n");
1884 1894 ql_dbg(level, vha, id, "----------------------------------"
1885 ql_dbg(level, vha, id, " "); 1895 "----------------------------\n");
1886 for (cnt = 0; cnt < size;) { 1896
1887 c = *b++; 1897 ql_dbg(level, vha, id, " ");
1888 printk("%02x", (uint32_t) c); 1898 for (cnt = 0; cnt < size;) {
1889 cnt++; 1899 c = *b++;
1890 if (!(cnt % 16)) 1900 printk("%02x", (uint32_t) c);
1891 printk("\n"); 1901 cnt++;
1892 else 1902 if (!(cnt % 16))
1893 printk(" "); 1903 printk("\n");
1894 } 1904 else
1895 if (cnt % 16) 1905 printk(" ");
1896 ql_dbg(level, vha, id, "\n");
1897 } 1906 }
1907 if (cnt % 16)
1908 ql_dbg(level, vha, id, "\n");
1898} 1909}
diff --git a/drivers/scsi/qla2xxx/qla_dbg.h b/drivers/scsi/qla2xxx/qla_dbg.h
index 29a7822848ae..5f1b6d9c3dcb 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.h
+++ b/drivers/scsi/qla2xxx/qla_dbg.h
@@ -232,6 +232,7 @@ struct qla2xxx_fw_dump {
232}; 232};
233 233
234#define QL_MSGHDR "qla2xxx" 234#define QL_MSGHDR "qla2xxx"
235#define QL_DBG_DEFAULT1_MASK 0x1e400000
235 236
236#define ql_log_fatal 0 /* display fatal errors */ 237#define ql_log_fatal 0 /* display fatal errors */
237#define ql_log_warn 1 /* display critical errors */ 238#define ql_log_warn 1 /* display critical errors */
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index fcf052c50bf5..964e2886311b 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2978,10 +2978,6 @@ typedef struct scsi_qla_host {
2978 atomic_dec(&__vha->vref_count); \ 2978 atomic_dec(&__vha->vref_count); \
2979} while (0) 2979} while (0)
2980 2980
2981
2982#define qla_printk(level, ha, format, arg...) \
2983 dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
2984
2985/* 2981/*
2986 * qla2x00 local function return status codes 2982 * qla2x00 local function return status codes
2987 */ 2983 */
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 37937aa3c3b8..4aea4ae23300 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -758,7 +758,7 @@ qla2x00_sns_ga_nxt(scsi_qla_host_t *vha, fc_port_t *fcport)
758 "GA_NXT Send SNS failed (%d).\n", rval); 758 "GA_NXT Send SNS failed (%d).\n", rval);
759 } else if (sns_cmd->p.gan_data[8] != 0x80 || 759 } else if (sns_cmd->p.gan_data[8] != 0x80 ||
760 sns_cmd->p.gan_data[9] != 0x02) { 760 sns_cmd->p.gan_data[9] != 0x02) {
761 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x207d, 761 ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x2084,
762 "GA_NXT failed, rejected request ga_nxt_rsp:\n"); 762 "GA_NXT failed, rejected request ga_nxt_rsp:\n");
763 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x2074, 763 ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x2074,
764 sns_cmd->p.gan_data, 16); 764 sns_cmd->p.gan_data, 16);
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 68cd0dd528df..ec73cc191273 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -154,8 +154,8 @@ qla2x00_async_iocb_timeout(srb_t *sp)
154 struct srb_ctx *ctx = sp->ctx; 154 struct srb_ctx *ctx = sp->ctx;
155 155
156 ql_dbg(ql_dbg_disc, fcport->vha, 0x2071, 156 ql_dbg(ql_dbg_disc, fcport->vha, 0x2071,
157 "Async-%s timeout - portid=%02x%02x%02x.\n", 157 "Async-%s timeout - hdl=%x portid=%02x%02x%02x.\n",
158 ctx->name, fcport->d_id.b.domain, fcport->d_id.b.area, 158 ctx->name, sp->handle, fcport->d_id.b.domain, fcport->d_id.b.area,
159 fcport->d_id.b.al_pa); 159 fcport->d_id.b.al_pa);
160 160
161 fcport->flags &= ~FCF_ASYNC_SENT; 161 fcport->flags &= ~FCF_ASYNC_SENT;
@@ -211,9 +211,10 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
211 goto done_free_sp; 211 goto done_free_sp;
212 212
213 ql_dbg(ql_dbg_disc, vha, 0x2072, 213 ql_dbg(ql_dbg_disc, vha, 0x2072,
214 "Async-login - loopid=%x portid=%02x%02x%02x retries=%d.\n", 214 "Async-login - hdl=%x, loopid=%x portid=%02x%02x%02x "
215 fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, 215 "retries=%d.\n", sp->handle, fcport->loop_id,
216 fcport->d_id.b.al_pa, fcport->login_retry); 216 fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa,
217 fcport->login_retry);
217 return rval; 218 return rval;
218 219
219done_free_sp: 220done_free_sp:
@@ -258,9 +259,9 @@ qla2x00_async_logout(struct scsi_qla_host *vha, fc_port_t *fcport)
258 goto done_free_sp; 259 goto done_free_sp;
259 260
260 ql_dbg(ql_dbg_disc, vha, 0x2070, 261 ql_dbg(ql_dbg_disc, vha, 0x2070,
261 "Async-logout - loop-id=%x portid=%02x%02x%02x.\n", 262 "Async-logout - hdl=%x loop-id=%x portid=%02x%02x%02x.\n",
262 fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, 263 sp->handle, fcport->loop_id, fcport->d_id.b.domain,
263 fcport->d_id.b.al_pa); 264 fcport->d_id.b.area, fcport->d_id.b.al_pa);
264 return rval; 265 return rval;
265 266
266done_free_sp: 267done_free_sp:
@@ -308,9 +309,9 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport,
308 goto done_free_sp; 309 goto done_free_sp;
309 310
310 ql_dbg(ql_dbg_disc, vha, 0x206f, 311 ql_dbg(ql_dbg_disc, vha, 0x206f,
311 "Async-adisc - loopid=%x portid=%02x%02x%02x.\n", 312 "Async-adisc - hdl=%x loopid=%x portid=%02x%02x%02x.\n",
312 fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, 313 sp->handle, fcport->loop_id, fcport->d_id.b.domain,
313 fcport->d_id.b.al_pa); 314 fcport->d_id.b.area, fcport->d_id.b.al_pa);
314 return rval; 315 return rval;
315 316
316done_free_sp: 317done_free_sp:
@@ -360,9 +361,9 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
360 goto done_free_sp; 361 goto done_free_sp;
361 362
362 ql_dbg(ql_dbg_taskm, vha, 0x802f, 363 ql_dbg(ql_dbg_taskm, vha, 0x802f,
363 "Async-tmf loop-id=%x portid=%02x%02x%02x.\n", 364 "Async-tmf hdl=%x loop-id=%x portid=%02x%02x%02x.\n",
364 fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, 365 sp->handle, fcport->loop_id, fcport->d_id.b.domain,
365 fcport->d_id.b.al_pa); 366 fcport->d_id.b.area, fcport->d_id.b.al_pa);
366 return rval; 367 return rval;
367 368
368done_free_sp: 369done_free_sp:
@@ -514,7 +515,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
514 set_bit(0, ha->req_qid_map); 515 set_bit(0, ha->req_qid_map);
515 set_bit(0, ha->rsp_qid_map); 516 set_bit(0, ha->rsp_qid_map);
516 517
517 ql_log(ql_log_info, vha, 0x0040, 518 ql_dbg(ql_dbg_init, vha, 0x0040,
518 "Configuring PCI space...\n"); 519 "Configuring PCI space...\n");
519 rval = ha->isp_ops->pci_config(vha); 520 rval = ha->isp_ops->pci_config(vha);
520 if (rval) { 521 if (rval) {
@@ -533,7 +534,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
533 } 534 }
534 535
535 ha->isp_ops->get_flash_version(vha, req->ring); 536 ha->isp_ops->get_flash_version(vha, req->ring);
536 ql_log(ql_log_info, vha, 0x0061, 537 ql_dbg(ql_dbg_init, vha, 0x0061,
537 "Configure NVRAM parameters...\n"); 538 "Configure NVRAM parameters...\n");
538 539
539 ha->isp_ops->nvram_config(vha); 540 ha->isp_ops->nvram_config(vha);
@@ -550,7 +551,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
550 return QLA_FUNCTION_FAILED; 551 return QLA_FUNCTION_FAILED;
551 } 552 }
552 553
553 ql_log(ql_log_info, vha, 0x0078, 554 ql_dbg(ql_dbg_init, vha, 0x0078,
554 "Verifying loaded RISC code...\n"); 555 "Verifying loaded RISC code...\n");
555 556
556 if (qla2x00_isp_firmware(vha) != QLA_SUCCESS) { 557 if (qla2x00_isp_firmware(vha) != QLA_SUCCESS) {
@@ -1294,7 +1295,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
1294 ha->flags.fce_enabled = 0; 1295 ha->flags.fce_enabled = 0;
1295 goto try_eft; 1296 goto try_eft;
1296 } 1297 }
1297 ql_log(ql_log_info, vha, 0x00c0, 1298 ql_dbg(ql_dbg_init, vha, 0x00c0,
1298 "Allocate (%d KB) for FCE...\n", FCE_SIZE / 1024); 1299 "Allocate (%d KB) for FCE...\n", FCE_SIZE / 1024);
1299 1300
1300 fce_size = sizeof(struct qla2xxx_fce_chain) + FCE_SIZE; 1301 fce_size = sizeof(struct qla2xxx_fce_chain) + FCE_SIZE;
@@ -1321,7 +1322,7 @@ try_eft:
1321 tc_dma); 1322 tc_dma);
1322 goto cont_alloc; 1323 goto cont_alloc;
1323 } 1324 }
1324 ql_log(ql_log_info, vha, 0x00c3, 1325 ql_dbg(ql_dbg_init, vha, 0x00c3,
1325 "Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024); 1326 "Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024);
1326 1327
1327 eft_size = EFT_SIZE; 1328 eft_size = EFT_SIZE;
@@ -1358,7 +1359,7 @@ cont_alloc:
1358 } 1359 }
1359 return; 1360 return;
1360 } 1361 }
1361 ql_log(ql_log_info, vha, 0x00c5, 1362 ql_dbg(ql_dbg_init, vha, 0x00c5,
1362 "Allocated (%d KB) for firmware dump.\n", dump_size / 1024); 1363 "Allocated (%d KB) for firmware dump.\n", dump_size / 1024);
1363 1364
1364 ha->fw_dump_len = dump_size; 1365 ha->fw_dump_len = dump_size;
@@ -1929,7 +1930,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
1929 rval = qla84xx_init_chip(vha); 1930 rval = qla84xx_init_chip(vha);
1930 if (rval != QLA_SUCCESS) { 1931 if (rval != QLA_SUCCESS) {
1931 ql_log(ql_log_warn, 1932 ql_log(ql_log_warn,
1932 vha, 0x8026, 1933 vha, 0x8007,
1933 "Init chip failed.\n"); 1934 "Init chip failed.\n");
1934 break; 1935 break;
1935 } 1936 }
@@ -1938,7 +1939,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
1938 cs84xx_time = jiffies - cs84xx_time; 1939 cs84xx_time = jiffies - cs84xx_time;
1939 wtime += cs84xx_time; 1940 wtime += cs84xx_time;
1940 mtime += cs84xx_time; 1941 mtime += cs84xx_time;
1941 ql_dbg(ql_dbg_taskm, vha, 0x8025, 1942 ql_dbg(ql_dbg_taskm, vha, 0x8008,
1942 "Increasing wait time by %ld. " 1943 "Increasing wait time by %ld. "
1943 "New time %ld.\n", cs84xx_time, 1944 "New time %ld.\n", cs84xx_time,
1944 wtime); 1945 wtime);
@@ -1981,16 +1982,13 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
1981 1982
1982 /* Delay for a while */ 1983 /* Delay for a while */
1983 msleep(500); 1984 msleep(500);
1984
1985 ql_dbg(ql_dbg_taskm, vha, 0x8039,
1986 "fw_state=%x curr time=%lx.\n", state[0], jiffies);
1987 } while (1); 1985 } while (1);
1988 1986
1989 ql_dbg(ql_dbg_taskm, vha, 0x803a, 1987 ql_dbg(ql_dbg_taskm, vha, 0x803a,
1990 "fw_state=%x (%x, %x, %x, %x) " "curr time=%lx.\n", state[0], 1988 "fw_state=%x (%x, %x, %x, %x) " "curr time=%lx.\n", state[0],
1991 state[1], state[2], state[3], state[4], jiffies); 1989 state[1], state[2], state[3], state[4], jiffies);
1992 1990
1993 if (rval) { 1991 if (rval && !(vha->device_flags & DFLG_NO_CABLE)) {
1994 ql_log(ql_log_warn, vha, 0x803b, 1992 ql_log(ql_log_warn, vha, 0x803b,
1995 "Firmware ready **** FAILED ****.\n"); 1993 "Firmware ready **** FAILED ****.\n");
1996 } 1994 }
@@ -2386,7 +2384,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
2386 * internal driver logging. 2384 * internal driver logging.
2387 */ 2385 */
2388 if (nv->host_p[0] & BIT_7) 2386 if (nv->host_p[0] & BIT_7)
2389 ql2xextended_error_logging = 0x7fffffff; 2387 ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
2390 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); 2388 ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0);
2391 /* Always load RISC code on non ISP2[12]00 chips. */ 2389 /* Always load RISC code on non ISP2[12]00 chips. */
2392 if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) 2390 if (!IS_QLA2100(ha) && !IS_QLA2200(ha))
@@ -4639,7 +4637,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr,
4639 struct req_que *req = ha->req_q_map[0]; 4637 struct req_que *req = ha->req_q_map[0];
4640 4638
4641 ql_dbg(ql_dbg_init, vha, 0x008b, 4639 ql_dbg(ql_dbg_init, vha, 0x008b,
4642 "Loading firmware from flash (%x).\n", faddr); 4640 "FW: Loading firmware from flash (%x).\n", faddr);
4643 4641
4644 rval = QLA_SUCCESS; 4642 rval = QLA_SUCCESS;
4645 4643
@@ -4837,8 +4835,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
4837 return QLA_FUNCTION_FAILED; 4835 return QLA_FUNCTION_FAILED;
4838 } 4836 }
4839 4837
4840 ql_log(ql_log_info, vha, 0x0092, 4838 ql_dbg(ql_dbg_init, vha, 0x0092,
4841 "Loading via request-firmware.\n"); 4839 "FW: Loading via request-firmware.\n");
4842 4840
4843 rval = QLA_SUCCESS; 4841 rval = QLA_SUCCESS;
4844 4842
@@ -5426,7 +5424,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
5426 if ((vha->device_flags & DFLG_NO_CABLE)) 5424 if ((vha->device_flags & DFLG_NO_CABLE))
5427 status = 0; 5425 status = 0;
5428 5426
5429 ql_log(ql_log_info, vha, 0x803d, 5427 ql_log(ql_log_info, vha, 0x8000,
5430 "Configure loop done, status = 0x%x.\n", status); 5428 "Configure loop done, status = 0x%x.\n", status);
5431 } 5429 }
5432 5430
@@ -5459,7 +5457,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
5459 ha->fce_dma, ha->fce_bufs, ha->fce_mb, 5457 ha->fce_dma, ha->fce_bufs, ha->fce_mb,
5460 &ha->fce_bufs); 5458 &ha->fce_bufs);
5461 if (rval) { 5459 if (rval) {
5462 ql_log(ql_log_warn, vha, 0x803e, 5460 ql_log(ql_log_warn, vha, 0x8001,
5463 "Unable to reinitialize FCE (%d).\n", 5461 "Unable to reinitialize FCE (%d).\n",
5464 rval); 5462 rval);
5465 ha->flags.fce_enabled = 0; 5463 ha->flags.fce_enabled = 0;
@@ -5471,7 +5469,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
5471 rval = qla2x00_enable_eft_trace(vha, 5469 rval = qla2x00_enable_eft_trace(vha,
5472 ha->eft_dma, EFT_NUM_BUFFERS); 5470 ha->eft_dma, EFT_NUM_BUFFERS);
5473 if (rval) { 5471 if (rval) {
5474 ql_log(ql_log_warn, vha, 0x803f, 5472 ql_log(ql_log_warn, vha, 0x8010,
5475 "Unable to reinitialize EFT (%d).\n", 5473 "Unable to reinitialize EFT (%d).\n",
5476 rval); 5474 rval);
5477 } 5475 }
@@ -5479,7 +5477,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
5479 } 5477 }
5480 5478
5481 if (!status) { 5479 if (!status) {
5482 ql_dbg(ql_dbg_taskm, vha, 0x8040, 5480 ql_dbg(ql_dbg_taskm, vha, 0x8011,
5483 "qla82xx_restart_isp succeeded.\n"); 5481 "qla82xx_restart_isp succeeded.\n");
5484 5482
5485 spin_lock_irqsave(&ha->vport_slock, flags); 5483 spin_lock_irqsave(&ha->vport_slock, flags);
@@ -5497,7 +5495,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
5497 spin_unlock_irqrestore(&ha->vport_slock, flags); 5495 spin_unlock_irqrestore(&ha->vport_slock, flags);
5498 5496
5499 } else { 5497 } else {
5500 ql_log(ql_log_warn, vha, 0x8041, 5498 ql_log(ql_log_warn, vha, 0x8016,
5501 "qla82xx_restart_isp **** FAILED ****.\n"); 5499 "qla82xx_restart_isp **** FAILED ****.\n");
5502 } 5500 }
5503 5501
@@ -5645,12 +5643,20 @@ qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *vha, fc_port_t *fcport)
5645 return QLA_FUNCTION_FAILED; 5643 return QLA_FUNCTION_FAILED;
5646 5644
5647 ret = qla24xx_set_fcp_prio(vha, fcport->loop_id, priority, mb); 5645 ret = qla24xx_set_fcp_prio(vha, fcport->loop_id, priority, mb);
5648 if (ret == QLA_SUCCESS) 5646 if (ret == QLA_SUCCESS) {
5647 if (fcport->fcp_prio != priority)
5648 ql_dbg(ql_dbg_user, vha, 0x709e,
5649 "Updated FCP_CMND priority - value=%d loop_id=%d "
5650 "port_id=%02x%02x%02x.\n", priority,
5651 fcport->loop_id, fcport->d_id.b.domain,
5652 fcport->d_id.b.area, fcport->d_id.b.al_pa);
5649 fcport->fcp_prio = priority; 5653 fcport->fcp_prio = priority;
5650 else 5654 } else
5651 ql_dbg(ql_dbg_user, vha, 0x704f, 5655 ql_dbg(ql_dbg_user, vha, 0x704f,
5652 "Unable to activate fcp priority, ret=0x%x.\n", ret); 5656 "Unable to update FCP_CMND priority - ret=0x%x for "
5653 5657 "loop_id=%d port_id=%02x%02x%02x.\n", ret, fcport->loop_id,
5658 fcport->d_id.b.domain, fcport->d_id.b.area,
5659 fcport->d_id.b.al_pa);
5654 return ret; 5660 return ret;
5655} 5661}
5656 5662
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 53d83d66a015..b6023e9636ea 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -262,13 +262,8 @@ qla2x00_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
262 wptr++; 262 wptr++;
263 } 263 }
264 264
265 if (ha->mcp) { 265 if (!ha->mcp)
266 ql_dbg(ql_dbg_async, vha, 0x5000, 266 ql_dbg(ql_dbg_async, vha, 0x5001, "MBX pointer ERROR.\n");
267 "Got mbx completion. cmd=%x.\n", ha->mcp->mb[0]);
268 } else {
269 ql_dbg(ql_dbg_async, vha, 0x5001,
270 "MBX pointer ERROR.\n");
271 }
272} 267}
273 268
274static void 269static void
@@ -453,7 +448,7 @@ skip_rio:
453 break; 448 break;
454 449
455 case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */ 450 case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */
456 ql_log(ql_log_info, vha, 0x5009, 451 ql_dbg(ql_dbg_async, vha, 0x5009,
457 "LIP occurred (%x).\n", mb[1]); 452 "LIP occurred (%x).\n", mb[1]);
458 453
459 if (atomic_read(&vha->loop_state) != LOOP_DOWN) { 454 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
@@ -487,7 +482,7 @@ skip_rio:
487 ha->link_data_rate = mb[1]; 482 ha->link_data_rate = mb[1];
488 } 483 }
489 484
490 ql_log(ql_log_info, vha, 0x500a, 485 ql_dbg(ql_dbg_async, vha, 0x500a,
491 "LOOP UP detected (%s Gbps).\n", link_speed); 486 "LOOP UP detected (%s Gbps).\n", link_speed);
492 487
493 vha->flags.management_server_logged_in = 0; 488 vha->flags.management_server_logged_in = 0;
@@ -497,7 +492,7 @@ skip_rio:
497 case MBA_LOOP_DOWN: /* Loop Down Event */ 492 case MBA_LOOP_DOWN: /* Loop Down Event */
498 mbx = IS_QLA81XX(ha) ? RD_REG_WORD(&reg24->mailbox4) : 0; 493 mbx = IS_QLA81XX(ha) ? RD_REG_WORD(&reg24->mailbox4) : 0;
499 mbx = IS_QLA82XX(ha) ? RD_REG_WORD(&reg82->mailbox_out[4]) : mbx; 494 mbx = IS_QLA82XX(ha) ? RD_REG_WORD(&reg82->mailbox_out[4]) : mbx;
500 ql_log(ql_log_info, vha, 0x500b, 495 ql_dbg(ql_dbg_async, vha, 0x500b,
501 "LOOP DOWN detected (%x %x %x %x).\n", 496 "LOOP DOWN detected (%x %x %x %x).\n",
502 mb[1], mb[2], mb[3], mbx); 497 mb[1], mb[2], mb[3], mbx);
503 498
@@ -519,7 +514,7 @@ skip_rio:
519 break; 514 break;
520 515
521 case MBA_LIP_RESET: /* LIP reset occurred */ 516 case MBA_LIP_RESET: /* LIP reset occurred */
522 ql_log(ql_log_info, vha, 0x500c, 517 ql_dbg(ql_dbg_async, vha, 0x500c,
523 "LIP reset occurred (%x).\n", mb[1]); 518 "LIP reset occurred (%x).\n", mb[1]);
524 519
525 if (atomic_read(&vha->loop_state) != LOOP_DOWN) { 520 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
@@ -587,7 +582,7 @@ skip_rio:
587 if (IS_QLA2100(ha)) 582 if (IS_QLA2100(ha))
588 break; 583 break;
589 584
590 ql_log(ql_log_info, vha, 0x500f, 585 ql_dbg(ql_dbg_async, vha, 0x500f,
591 "Configuration change detected: value=%x.\n", mb[1]); 586 "Configuration change detected: value=%x.\n", mb[1]);
592 587
593 if (atomic_read(&vha->loop_state) != LOOP_DOWN) { 588 if (atomic_read(&vha->loop_state) != LOOP_DOWN) {
@@ -920,15 +915,15 @@ qla2x00_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
920 QLA_LOGIO_LOGIN_RETRIED : 0; 915 QLA_LOGIO_LOGIN_RETRIED : 0;
921 if (mbx->entry_status) { 916 if (mbx->entry_status) {
922 ql_dbg(ql_dbg_async, vha, 0x5043, 917 ql_dbg(ql_dbg_async, vha, 0x5043,
923 "Async-%s error entry - portid=%02x%02x%02x " 918 "Async-%s error entry - hdl=%x portid=%02x%02x%02x "
924 "entry-status=%x status=%x state-flag=%x " 919 "entry-status=%x status=%x state-flag=%x "
925 "status-flags=%x.\n", 920 "status-flags=%x.\n", type, sp->handle,
926 type, fcport->d_id.b.domain, fcport->d_id.b.area, 921 fcport->d_id.b.domain, fcport->d_id.b.area,
927 fcport->d_id.b.al_pa, mbx->entry_status, 922 fcport->d_id.b.al_pa, mbx->entry_status,
928 le16_to_cpu(mbx->status), le16_to_cpu(mbx->state_flags), 923 le16_to_cpu(mbx->status), le16_to_cpu(mbx->state_flags),
929 le16_to_cpu(mbx->status_flags)); 924 le16_to_cpu(mbx->status_flags));
930 925
931 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5057, 926 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5029,
932 (uint8_t *)mbx, sizeof(*mbx)); 927 (uint8_t *)mbx, sizeof(*mbx));
933 928
934 goto logio_done; 929 goto logio_done;
@@ -940,9 +935,10 @@ qla2x00_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
940 status = 0; 935 status = 0;
941 if (!status && le16_to_cpu(mbx->mb0) == MBS_COMMAND_COMPLETE) { 936 if (!status && le16_to_cpu(mbx->mb0) == MBS_COMMAND_COMPLETE) {
942 ql_dbg(ql_dbg_async, vha, 0x5045, 937 ql_dbg(ql_dbg_async, vha, 0x5045,
943 "Async-%s complete - portid=%02x%02x%02x mbx1=%x.\n", 938 "Async-%s complete - hdl=%x portid=%02x%02x%02x mbx1=%x.\n",
944 type, fcport->d_id.b.domain, fcport->d_id.b.area, 939 type, sp->handle, fcport->d_id.b.domain,
945 fcport->d_id.b.al_pa, le16_to_cpu(mbx->mb1)); 940 fcport->d_id.b.area, fcport->d_id.b.al_pa,
941 le16_to_cpu(mbx->mb1));
946 942
947 data[0] = MBS_COMMAND_COMPLETE; 943 data[0] = MBS_COMMAND_COMPLETE;
948 if (ctx->type == SRB_LOGIN_CMD) { 944 if (ctx->type == SRB_LOGIN_CMD) {
@@ -968,11 +964,10 @@ qla2x00_mbx_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
968 } 964 }
969 965
970 ql_log(ql_log_warn, vha, 0x5046, 966 ql_log(ql_log_warn, vha, 0x5046,
971 "Async-%s failed - portid=%02x%02x%02x status=%x " 967 "Async-%s failed - hdl=%x portid=%02x%02x%02x status=%x "
972 "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", 968 "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", type, sp->handle,
973 type, fcport->d_id.b.domain, 969 fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa,
974 fcport->d_id.b.area, fcport->d_id.b.al_pa, status, 970 status, le16_to_cpu(mbx->mb0), le16_to_cpu(mbx->mb1),
975 le16_to_cpu(mbx->mb0), le16_to_cpu(mbx->mb1),
976 le16_to_cpu(mbx->mb2), le16_to_cpu(mbx->mb6), 971 le16_to_cpu(mbx->mb2), le16_to_cpu(mbx->mb6),
977 le16_to_cpu(mbx->mb7)); 972 le16_to_cpu(mbx->mb7));
978 973
@@ -1036,7 +1031,7 @@ qla2x00_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
1036 bsg_job->reply->result = DID_ERROR << 16; 1031 bsg_job->reply->result = DID_ERROR << 16;
1037 bsg_job->reply->reply_payload_rcv_len = 0; 1032 bsg_job->reply->reply_payload_rcv_len = 0;
1038 } 1033 }
1039 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5058, 1034 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5035,
1040 (uint8_t *)pkt, sizeof(*pkt)); 1035 (uint8_t *)pkt, sizeof(*pkt));
1041 } else { 1036 } else {
1042 bsg_job->reply->result = DID_OK << 16; 1037 bsg_job->reply->result = DID_OK << 16;
@@ -1111,9 +1106,9 @@ qla24xx_els_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
1111 le16_to_cpu(((struct els_sts_entry_24xx*)pkt)->total_byte_count); 1106 le16_to_cpu(((struct els_sts_entry_24xx*)pkt)->total_byte_count);
1112 1107
1113 ql_log(ql_log_info, vha, 0x503f, 1108 ql_log(ql_log_info, vha, 0x503f,
1114 "ELS-CT pass-through-%s error comp_status-status=0x%x " 1109 "ELS-CT pass-through-%s error hdl=%x comp_status-status=0x%x "
1115 "error subcode 1=0x%x error subcode 2=0x%x total_byte = 0x%x.\n", 1110 "error subcode 1=0x%x error subcode 2=0x%x total_byte = 0x%x.\n",
1116 type, comp_status, fw_status[1], fw_status[2], 1111 type, sp->handle, comp_status, fw_status[1], fw_status[2],
1117 le16_to_cpu(((struct els_sts_entry_24xx *) 1112 le16_to_cpu(((struct els_sts_entry_24xx *)
1118 pkt)->total_byte_count)); 1113 pkt)->total_byte_count));
1119 fw_sts_ptr = ((uint8_t*)bsg_job->req->sense) + sizeof(struct fc_bsg_reply); 1114 fw_sts_ptr = ((uint8_t*)bsg_job->req->sense) + sizeof(struct fc_bsg_reply);
@@ -1121,9 +1116,9 @@ qla24xx_els_ct_entry(scsi_qla_host_t *vha, struct req_que *req,
1121 } 1116 }
1122 else { 1117 else {
1123 ql_log(ql_log_info, vha, 0x5040, 1118 ql_log(ql_log_info, vha, 0x5040,
1124 "ELS-CT pass-through-%s error comp_status-status=0x%x " 1119 "ELS-CT pass-through-%s error hdl=%x comp_status-status=0x%x "
1125 "error subcode 1=0x%x error subcode 2=0x%x.\n", 1120 "error subcode 1=0x%x error subcode 2=0x%x.\n",
1126 type, comp_status, 1121 type, sp->handle, comp_status,
1127 le16_to_cpu(((struct els_sts_entry_24xx *) 1122 le16_to_cpu(((struct els_sts_entry_24xx *)
1128 pkt)->error_subcode_1), 1123 pkt)->error_subcode_1),
1129 le16_to_cpu(((struct els_sts_entry_24xx *) 1124 le16_to_cpu(((struct els_sts_entry_24xx *)
@@ -1184,11 +1179,12 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
1184 QLA_LOGIO_LOGIN_RETRIED : 0; 1179 QLA_LOGIO_LOGIN_RETRIED : 0;
1185 if (logio->entry_status) { 1180 if (logio->entry_status) {
1186 ql_log(ql_log_warn, vha, 0x5034, 1181 ql_log(ql_log_warn, vha, 0x5034,
1187 "Async-%s error entry - " 1182 "Async-%s error entry - hdl=%x"
1188 "portid=%02x%02x%02x entry-status=%x.\n", 1183 "portid=%02x%02x%02x entry-status=%x.\n",
1189 type, fcport->d_id.b.domain, fcport->d_id.b.area, 1184 type, sp->handle, fcport->d_id.b.domain,
1190 fcport->d_id.b.al_pa, logio->entry_status); 1185 fcport->d_id.b.area, fcport->d_id.b.al_pa,
1191 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x5059, 1186 logio->entry_status);
1187 ql_dump_buffer(ql_dbg_async + ql_dbg_buffer, vha, 0x504d,
1192 (uint8_t *)logio, sizeof(*logio)); 1188 (uint8_t *)logio, sizeof(*logio));
1193 1189
1194 goto logio_done; 1190 goto logio_done;
@@ -1196,10 +1192,9 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
1196 1192
1197 if (le16_to_cpu(logio->comp_status) == CS_COMPLETE) { 1193 if (le16_to_cpu(logio->comp_status) == CS_COMPLETE) {
1198 ql_dbg(ql_dbg_async, vha, 0x5036, 1194 ql_dbg(ql_dbg_async, vha, 0x5036,
1199 "Async-%s complete - portid=%02x%02x%02x " 1195 "Async-%s complete - hdl=%x portid=%02x%02x%02x "
1200 "iop0=%x.\n", 1196 "iop0=%x.\n", type, sp->handle, fcport->d_id.b.domain,
1201 type, fcport->d_id.b.domain, fcport->d_id.b.area, 1197 fcport->d_id.b.area, fcport->d_id.b.al_pa,
1202 fcport->d_id.b.al_pa,
1203 le32_to_cpu(logio->io_parameter[0])); 1198 le32_to_cpu(logio->io_parameter[0]));
1204 1199
1205 data[0] = MBS_COMMAND_COMPLETE; 1200 data[0] = MBS_COMMAND_COMPLETE;
@@ -1238,9 +1233,8 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
1238 } 1233 }
1239 1234
1240 ql_dbg(ql_dbg_async, vha, 0x5037, 1235 ql_dbg(ql_dbg_async, vha, 0x5037,
1241 "Async-%s failed - portid=%02x%02x%02x comp=%x " 1236 "Async-%s failed - hdl=%x portid=%02x%02x%02x comp=%x "
1242 "iop0=%x iop1=%x.\n", 1237 "iop0=%x iop1=%x.\n", type, sp->handle, fcport->d_id.b.domain,
1243 type, fcport->d_id.b.domain,
1244 fcport->d_id.b.area, fcport->d_id.b.al_pa, 1238 fcport->d_id.b.area, fcport->d_id.b.al_pa,
1245 le16_to_cpu(logio->comp_status), 1239 le16_to_cpu(logio->comp_status),
1246 le32_to_cpu(logio->io_parameter[0]), 1240 le32_to_cpu(logio->io_parameter[0]),
@@ -1274,25 +1268,25 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
1274 1268
1275 if (sts->entry_status) { 1269 if (sts->entry_status) {
1276 ql_log(ql_log_warn, vha, 0x5038, 1270 ql_log(ql_log_warn, vha, 0x5038,
1277 "Async-%s error - entry-status(%x).\n", 1271 "Async-%s error - hdl=%x entry-status(%x).\n",
1278 type, sts->entry_status); 1272 type, sp->handle, sts->entry_status);
1279 } else if (sts->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { 1273 } else if (sts->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) {
1280 ql_log(ql_log_warn, vha, 0x5039, 1274 ql_log(ql_log_warn, vha, 0x5039,
1281 "Async-%s error - completion status(%x).\n", 1275 "Async-%s error - hdl=%x completion status(%x).\n",
1282 type, sts->comp_status); 1276 type, sp->handle, sts->comp_status);
1283 } else if (!(le16_to_cpu(sts->scsi_status) & 1277 } else if (!(le16_to_cpu(sts->scsi_status) &
1284 SS_RESPONSE_INFO_LEN_VALID)) { 1278 SS_RESPONSE_INFO_LEN_VALID)) {
1285 ql_log(ql_log_warn, vha, 0x503a, 1279 ql_log(ql_log_warn, vha, 0x503a,
1286 "Async-%s error - no response info(%x).\n", 1280 "Async-%s error - hdl=%x no response info(%x).\n",
1287 type, sts->scsi_status); 1281 type, sp->handle, sts->scsi_status);
1288 } else if (le32_to_cpu(sts->rsp_data_len) < 4) { 1282 } else if (le32_to_cpu(sts->rsp_data_len) < 4) {
1289 ql_log(ql_log_warn, vha, 0x503b, 1283 ql_log(ql_log_warn, vha, 0x503b,
1290 "Async-%s error - not enough response(%d).\n", 1284 "Async-%s error - hdl=%x not enough response(%d).\n",
1291 type, sts->rsp_data_len); 1285 type, sp->handle, sts->rsp_data_len);
1292 } else if (sts->data[3]) { 1286 } else if (sts->data[3]) {
1293 ql_log(ql_log_warn, vha, 0x503c, 1287 ql_log(ql_log_warn, vha, 0x503c,
1294 "Async-%s error - response(%x).\n", 1288 "Async-%s error - hdl=%x response(%x).\n",
1295 type, sts->data[3]); 1289 type, sp->handle, sts->data[3]);
1296 } else { 1290 } else {
1297 error = 0; 1291 error = 0;
1298 } 1292 }
@@ -1337,9 +1331,6 @@ qla2x00_process_response_queue(struct rsp_que *rsp)
1337 } 1331 }
1338 1332
1339 if (pkt->entry_status != 0) { 1333 if (pkt->entry_status != 0) {
1340 ql_log(ql_log_warn, vha, 0x5035,
1341 "Process error entry.\n");
1342
1343 qla2x00_error_entry(vha, rsp, pkt); 1334 qla2x00_error_entry(vha, rsp, pkt);
1344 ((response_t *)pkt)->signature = RESPONSE_PROCESSED; 1335 ((response_t *)pkt)->signature = RESPONSE_PROCESSED;
1345 wmb(); 1336 wmb();
@@ -1391,7 +1382,6 @@ qla2x00_process_response_queue(struct rsp_que *rsp)
1391} 1382}
1392 1383
1393static inline void 1384static inline void
1394
1395qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len, 1385qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len,
1396 uint32_t sense_len, struct rsp_que *rsp) 1386 uint32_t sense_len, struct rsp_que *rsp)
1397{ 1387{
@@ -1413,13 +1403,14 @@ qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t par_sense_len,
1413 if (sp->request_sense_length != 0) 1403 if (sp->request_sense_length != 0)
1414 rsp->status_srb = sp; 1404 rsp->status_srb = sp;
1415 1405
1416 ql_dbg(ql_dbg_io, vha, 0x301c, 1406 if (sense_len) {
1417 "Check condition Sense data, scsi(%ld:%d:%d:%d) cmd=%p.\n", 1407 ql_dbg(ql_dbg_io + ql_dbg_buffer, vha, 0x301c,
1418 sp->fcport->vha->host_no, cp->device->channel, cp->device->id, 1408 "Check condition Sense data, nexus%ld:%d:%d cmd=%p.\n",
1419 cp->device->lun, cp); 1409 sp->fcport->vha->host_no, cp->device->id, cp->device->lun,
1420 if (sense_len) 1410 cp);
1421 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302b, 1411 ql_dump_buffer(ql_dbg_io + ql_dbg_buffer, vha, 0x302b,
1422 cp->sense_buffer, sense_len); 1412 cp->sense_buffer, sense_len);
1413 }
1423} 1414}
1424 1415
1425struct scsi_dif_tuple { 1416struct scsi_dif_tuple {
@@ -1506,7 +1497,7 @@ qla2x00_handle_dif_error(srb_t *sp, struct sts_entry_24xx *sts24)
1506 } 1497 }
1507 1498
1508 if (k != blocks_done) { 1499 if (k != blocks_done) {
1509 qla_printk(KERN_WARNING, sp->fcport->vha->hw, 1500 ql_log(ql_log_warn, vha, 0x302f,
1510 "unexpected tag values tag:lba=%x:%llx)\n", 1501 "unexpected tag values tag:lba=%x:%llx)\n",
1511 e_ref_tag, (unsigned long long)lba_s); 1502 e_ref_tag, (unsigned long long)lba_s);
1512 return 1; 1503 return 1;
@@ -1611,7 +1602,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1611 sp = NULL; 1602 sp = NULL;
1612 1603
1613 if (sp == NULL) { 1604 if (sp == NULL) {
1614 ql_log(ql_log_warn, vha, 0x3017, 1605 ql_dbg(ql_dbg_io, vha, 0x3017,
1615 "Invalid status handle (0x%x).\n", sts->handle); 1606 "Invalid status handle (0x%x).\n", sts->handle);
1616 1607
1617 if (IS_QLA82XX(ha)) 1608 if (IS_QLA82XX(ha))
@@ -1623,7 +1614,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1623 } 1614 }
1624 cp = sp->cmd; 1615 cp = sp->cmd;
1625 if (cp == NULL) { 1616 if (cp == NULL) {
1626 ql_log(ql_log_warn, vha, 0x3018, 1617 ql_dbg(ql_dbg_io, vha, 0x3018,
1627 "Command already returned (0x%x/%p).\n", 1618 "Command already returned (0x%x/%p).\n",
1628 sts->handle, sp); 1619 sts->handle, sp);
1629 1620
@@ -1670,7 +1661,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1670 par_sense_len -= rsp_info_len; 1661 par_sense_len -= rsp_info_len;
1671 } 1662 }
1672 if (rsp_info_len > 3 && rsp_info[3]) { 1663 if (rsp_info_len > 3 && rsp_info[3]) {
1673 ql_log(ql_log_warn, vha, 0x3019, 1664 ql_dbg(ql_dbg_io, vha, 0x3019,
1674 "FCP I/O protocol failure (0x%x/0x%x).\n", 1665 "FCP I/O protocol failure (0x%x/0x%x).\n",
1675 rsp_info_len, rsp_info[3]); 1666 rsp_info_len, rsp_info[3]);
1676 1667
@@ -1701,7 +1692,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1701 if (!lscsi_status && 1692 if (!lscsi_status &&
1702 ((unsigned)(scsi_bufflen(cp) - resid) < 1693 ((unsigned)(scsi_bufflen(cp) - resid) <
1703 cp->underflow)) { 1694 cp->underflow)) {
1704 ql_log(ql_log_warn, vha, 0x301a, 1695 ql_dbg(ql_dbg_io, vha, 0x301a,
1705 "Mid-layer underflow " 1696 "Mid-layer underflow "
1706 "detected (0x%x of 0x%x bytes).\n", 1697 "detected (0x%x of 0x%x bytes).\n",
1707 resid, scsi_bufflen(cp)); 1698 resid, scsi_bufflen(cp));
@@ -1713,7 +1704,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1713 cp->result = DID_OK << 16 | lscsi_status; 1704 cp->result = DID_OK << 16 | lscsi_status;
1714 1705
1715 if (lscsi_status == SAM_STAT_TASK_SET_FULL) { 1706 if (lscsi_status == SAM_STAT_TASK_SET_FULL) {
1716 ql_log(ql_log_warn, vha, 0x301b, 1707 ql_dbg(ql_dbg_io, vha, 0x301b,
1717 "QUEUE FULL detected.\n"); 1708 "QUEUE FULL detected.\n");
1718 break; 1709 break;
1719 } 1710 }
@@ -1735,7 +1726,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1735 scsi_set_resid(cp, resid); 1726 scsi_set_resid(cp, resid);
1736 if (scsi_status & SS_RESIDUAL_UNDER) { 1727 if (scsi_status & SS_RESIDUAL_UNDER) {
1737 if (IS_FWI2_CAPABLE(ha) && fw_resid_len != resid_len) { 1728 if (IS_FWI2_CAPABLE(ha) && fw_resid_len != resid_len) {
1738 ql_log(ql_log_warn, vha, 0x301d, 1729 ql_dbg(ql_dbg_io, vha, 0x301d,
1739 "Dropped frame(s) detected " 1730 "Dropped frame(s) detected "
1740 "(0x%x of 0x%x bytes).\n", 1731 "(0x%x of 0x%x bytes).\n",
1741 resid, scsi_bufflen(cp)); 1732 resid, scsi_bufflen(cp));
@@ -1747,7 +1738,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1747 if (!lscsi_status && 1738 if (!lscsi_status &&
1748 ((unsigned)(scsi_bufflen(cp) - resid) < 1739 ((unsigned)(scsi_bufflen(cp) - resid) <
1749 cp->underflow)) { 1740 cp->underflow)) {
1750 ql_log(ql_log_warn, vha, 0x301e, 1741 ql_dbg(ql_dbg_io, vha, 0x301e,
1751 "Mid-layer underflow " 1742 "Mid-layer underflow "
1752 "detected (0x%x of 0x%x bytes).\n", 1743 "detected (0x%x of 0x%x bytes).\n",
1753 resid, scsi_bufflen(cp)); 1744 resid, scsi_bufflen(cp));
@@ -1756,7 +1747,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1756 break; 1747 break;
1757 } 1748 }
1758 } else { 1749 } else {
1759 ql_log(ql_log_warn, vha, 0x301f, 1750 ql_dbg(ql_dbg_io, vha, 0x301f,
1760 "Dropped frame(s) detected (0x%x " 1751 "Dropped frame(s) detected (0x%x "
1761 "of 0x%x bytes).\n", resid, scsi_bufflen(cp)); 1752 "of 0x%x bytes).\n", resid, scsi_bufflen(cp));
1762 1753
@@ -1774,7 +1765,7 @@ check_scsi_status:
1774 */ 1765 */
1775 if (lscsi_status != 0) { 1766 if (lscsi_status != 0) {
1776 if (lscsi_status == SAM_STAT_TASK_SET_FULL) { 1767 if (lscsi_status == SAM_STAT_TASK_SET_FULL) {
1777 ql_log(ql_log_warn, vha, 0x3020, 1768 ql_dbg(ql_dbg_io, vha, 0x3020,
1778 "QUEUE FULL detected.\n"); 1769 "QUEUE FULL detected.\n");
1779 logit = 1; 1770 logit = 1;
1780 break; 1771 break;
@@ -1838,10 +1829,15 @@ out:
1838 if (logit) 1829 if (logit)
1839 ql_dbg(ql_dbg_io, vha, 0x3022, 1830 ql_dbg(ql_dbg_io, vha, 0x3022,
1840 "FCP command status: 0x%x-0x%x (0x%x) " 1831 "FCP command status: 0x%x-0x%x (0x%x) "
1841 "oxid=0x%x cdb=%02x%02x%02x len=0x%x " 1832 "nexus=%ld:%d:%d portid=%02x%02x%02x oxid=0x%x "
1833 "cdb=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x len=0x%x "
1842 "rsp_info=0x%x resid=0x%x fw_resid=0x%x.\n", 1834 "rsp_info=0x%x resid=0x%x fw_resid=0x%x.\n",
1843 comp_status, scsi_status, cp->result, ox_id, cp->cmnd[0], 1835 comp_status, scsi_status, cp->result, vha->host_no,
1844 cp->cmnd[1], cp->cmnd[2], scsi_bufflen(cp), rsp_info_len, 1836 cp->device->id, cp->device->lun, fcport->d_id.b.domain,
1837 fcport->d_id.b.area, fcport->d_id.b.al_pa, ox_id,
1838 cp->cmnd[0], cp->cmnd[1], cp->cmnd[2], cp->cmnd[3],
1839 cp->cmnd[4], cp->cmnd[5], cp->cmnd[6], cp->cmnd[7],
1840 cp->cmnd[8], cp->cmnd[9], scsi_bufflen(cp), rsp_info_len,
1845 resid_len, fw_resid_len); 1841 resid_len, fw_resid_len);
1846 1842
1847 if (rsp->status_srb == NULL) 1843 if (rsp->status_srb == NULL)
@@ -1991,13 +1987,8 @@ qla24xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
1991 wptr++; 1987 wptr++;
1992 } 1988 }
1993 1989
1994 if (ha->mcp) { 1990 if (!ha->mcp)
1995 ql_dbg(ql_dbg_async, vha, 0x504d, 1991 ql_dbg(ql_dbg_async, vha, 0x504e, "MBX pointer ERRROR.\n");
1996 "Got mailbox completion. cmd=%x.\n", ha->mcp->mb[0]);
1997 } else {
1998 ql_dbg(ql_dbg_async, vha, 0x504e,
1999 "MBX pointer ERROR.\n");
2000 }
2001} 1992}
2002 1993
2003/** 1994/**
@@ -2025,9 +2016,6 @@ void qla24xx_process_response_queue(struct scsi_qla_host *vha,
2025 } 2016 }
2026 2017
2027 if (pkt->entry_status != 0) { 2018 if (pkt->entry_status != 0) {
2028 ql_dbg(ql_dbg_async, vha, 0x5029,
2029 "Process error entry.\n");
2030
2031 qla2x00_error_entry(vha, rsp, (sts_entry_t *) pkt); 2019 qla2x00_error_entry(vha, rsp, (sts_entry_t *) pkt);
2032 ((response_t *)pkt)->signature = RESPONSE_PROCESSED; 2020 ((response_t *)pkt)->signature = RESPONSE_PROCESSED;
2033 wmb(); 2021 wmb();
diff --git a/drivers/scsi/qla2xxx/qla_nx.c b/drivers/scsi/qla2xxx/qla_nx.c
index 360b9cb7153f..b37c5599674b 100644
--- a/drivers/scsi/qla2xxx/qla_nx.c
+++ b/drivers/scsi/qla2xxx/qla_nx.c
@@ -2023,13 +2023,9 @@ qla82xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
2023 wptr++; 2023 wptr++;
2024 } 2024 }
2025 2025
2026 if (ha->mcp) { 2026 if (!ha->mcp)
2027 ql_dbg(ql_dbg_async, vha, 0x5052,
2028 "Got mailbox completion. cmd=%x.\n", ha->mcp->mb[0]);
2029 } else {
2030 ql_dbg(ql_dbg_async, vha, 0x5053, 2027 ql_dbg(ql_dbg_async, vha, 0x5053,
2031 "MBX pointer ERROR.\n"); 2028 "MBX pointer ERROR.\n");
2032 }
2033} 2029}
2034 2030
2035/* 2031/*
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 8b4214502e45..ae1699f6854d 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -83,6 +83,9 @@ MODULE_PARM_DESC(ql2xextended_error_logging,
83 "\t\t0x00080000 - P3P Specific. 0x00040000 - Virtual Port.\n" 83 "\t\t0x00080000 - P3P Specific. 0x00040000 - Virtual Port.\n"
84 "\t\t0x00020000 - Buffer Dump. 0x00010000 - Misc.\n" 84 "\t\t0x00020000 - Buffer Dump. 0x00010000 - Misc.\n"
85 "\t\t0x7fffffff - For enabling all logs, can be too many logs.\n" 85 "\t\t0x7fffffff - For enabling all logs, can be too many logs.\n"
86 "\t\t0x1e400000 - Preferred value for capturing essential "
87 "debug information (equivalent to old "
88 "ql2xextended_error_logging=1).\n"
86 "\t\tDo LOGICAL OR of the value to enable more than one level"); 89 "\t\tDo LOGICAL OR of the value to enable more than one level");
87 90
88int ql2xshiftctondsd = 6; 91int ql2xshiftctondsd = 6;
@@ -847,14 +850,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
847 int wait = 0; 850 int wait = 0;
848 struct qla_hw_data *ha = vha->hw; 851 struct qla_hw_data *ha = vha->hw;
849 852
850 ql_dbg(ql_dbg_taskm, vha, 0x8000,
851 "Entered %s for cmd=%p.\n", __func__, cmd);
852 if (!CMD_SP(cmd)) 853 if (!CMD_SP(cmd))
853 return SUCCESS; 854 return SUCCESS;
854 855
855 ret = fc_block_scsi_eh(cmd); 856 ret = fc_block_scsi_eh(cmd);
856 ql_dbg(ql_dbg_taskm, vha, 0x8001,
857 "Return value of fc_block_scsi_eh=%d.\n", ret);
858 if (ret != 0) 857 if (ret != 0)
859 return ret; 858 return ret;
860 ret = SUCCESS; 859 ret = SUCCESS;
@@ -870,7 +869,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
870 } 869 }
871 870
872 ql_dbg(ql_dbg_taskm, vha, 0x8002, 871 ql_dbg(ql_dbg_taskm, vha, 0x8002,
873 "Aborting sp=%p cmd=%p from RISC ", sp, cmd); 872 "Aborting from RISC nexus=%ld:%d:%d sp=%p cmd=%p\n",
873 vha->host_no, id, lun, sp, cmd);
874 874
875 /* Get a reference to the sp and drop the lock.*/ 875 /* Get a reference to the sp and drop the lock.*/
876 sp_get(sp); 876 sp_get(sp);
@@ -878,10 +878,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
878 spin_unlock_irqrestore(&ha->hardware_lock, flags); 878 spin_unlock_irqrestore(&ha->hardware_lock, flags);
879 if (ha->isp_ops->abort_command(sp)) { 879 if (ha->isp_ops->abort_command(sp)) {
880 ql_dbg(ql_dbg_taskm, vha, 0x8003, 880 ql_dbg(ql_dbg_taskm, vha, 0x8003,
881 "Abort command mbx failed for cmd=%p.\n", cmd); 881 "Abort command mbx failed cmd=%p.\n", cmd);
882 } else { 882 } else {
883 ql_dbg(ql_dbg_taskm, vha, 0x8004, 883 ql_dbg(ql_dbg_taskm, vha, 0x8004,
884 "Abort command mbx success.\n"); 884 "Abort command mbx success cmd=%p.\n", cmd);
885 wait = 1; 885 wait = 1;
886 } 886 }
887 887
@@ -897,13 +897,14 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
897 if (wait) { 897 if (wait) {
898 if (qla2x00_eh_wait_on_command(cmd) != QLA_SUCCESS) { 898 if (qla2x00_eh_wait_on_command(cmd) != QLA_SUCCESS) {
899 ql_log(ql_log_warn, vha, 0x8006, 899 ql_log(ql_log_warn, vha, 0x8006,
900 "Abort handler timed out for cmd=%p.\n", cmd); 900 "Abort handler timed out cmd=%p.\n", cmd);
901 ret = FAILED; 901 ret = FAILED;
902 } 902 }
903 } 903 }
904 904
905 ql_log(ql_log_info, vha, 0x801c, 905 ql_log(ql_log_info, vha, 0x801c,
906 "Abort command issued -- %d %x.\n", wait, ret); 906 "Abort command issued nexus=%ld:%d:%d -- %d %x.\n",
907 vha->host_no, id, lun, wait, ret);
907 908
908 return ret; 909 return ret;
909} 910}
@@ -972,19 +973,15 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
972 int err; 973 int err;
973 974
974 if (!fcport) { 975 if (!fcport) {
975 ql_log(ql_log_warn, vha, 0x8007,
976 "fcport is NULL.\n");
977 return FAILED; 976 return FAILED;
978 } 977 }
979 978
980 err = fc_block_scsi_eh(cmd); 979 err = fc_block_scsi_eh(cmd);
981 ql_dbg(ql_dbg_taskm, vha, 0x8008,
982 "fc_block_scsi_eh ret=%d.\n", err);
983 if (err != 0) 980 if (err != 0)
984 return err; 981 return err;
985 982
986 ql_log(ql_log_info, vha, 0x8009, 983 ql_log(ql_log_info, vha, 0x8009,
987 "%s RESET ISSUED for id %d lun %d cmd=%p.\n", name, 984 "%s RESET ISSUED nexus=%ld:%d:%d cmd=%p.\n", name, vha->host_no,
988 cmd->device->id, cmd->device->lun, cmd); 985 cmd->device->id, cmd->device->lun, cmd);
989 986
990 err = 0; 987 err = 0;
@@ -1009,15 +1006,16 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
1009 } 1006 }
1010 1007
1011 ql_log(ql_log_info, vha, 0x800e, 1008 ql_log(ql_log_info, vha, 0x800e,
1012 "%s RESET SUCCEEDED for id %d lun %d cmd=%p.\n", name, 1009 "%s RESET SUCCEEDED nexus:%ld:%d:%d cmd=%p.\n", name,
1013 cmd->device->id, cmd->device->lun, cmd); 1010 vha->host_no, cmd->device->id, cmd->device->lun, cmd);
1014 1011
1015 return SUCCESS; 1012 return SUCCESS;
1016 1013
1017eh_reset_failed: 1014eh_reset_failed:
1018 ql_log(ql_log_info, vha, 0x800f, 1015 ql_log(ql_log_info, vha, 0x800f,
1019 "%s RESET FAILED: %s for id %d lun %d cmd=%p.\n", name, 1016 "%s RESET FAILED: %s nexus=%ld:%d:%d cmd=%p.\n", name,
1020 reset_errors[err], cmd->device->id, cmd->device->lun, cmd); 1017 reset_errors[err], vha->host_no, cmd->device->id, cmd->device->lun,
1018 cmd);
1021 return FAILED; 1019 return FAILED;
1022} 1020}
1023 1021
@@ -1068,20 +1066,16 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
1068 lun = cmd->device->lun; 1066 lun = cmd->device->lun;
1069 1067
1070 if (!fcport) { 1068 if (!fcport) {
1071 ql_log(ql_log_warn, vha, 0x8010,
1072 "fcport is NULL.\n");
1073 return ret; 1069 return ret;
1074 } 1070 }
1075 1071
1076 ret = fc_block_scsi_eh(cmd); 1072 ret = fc_block_scsi_eh(cmd);
1077 ql_dbg(ql_dbg_taskm, vha, 0x8011,
1078 "fc_block_scsi_eh ret=%d.\n", ret);
1079 if (ret != 0) 1073 if (ret != 0)
1080 return ret; 1074 return ret;
1081 ret = FAILED; 1075 ret = FAILED;
1082 1076
1083 ql_log(ql_log_info, vha, 0x8012, 1077 ql_log(ql_log_info, vha, 0x8012,
1084 "BUS RESET ISSUED for id %d lun %d.\n", id, lun); 1078 "BUS RESET ISSUED nexus=%ld:%d%d.\n", vha->host_no, id, lun);
1085 1079
1086 if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { 1080 if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) {
1087 ql_log(ql_log_fatal, vha, 0x8013, 1081 ql_log(ql_log_fatal, vha, 0x8013,
@@ -1105,7 +1099,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
1105 1099
1106eh_bus_reset_done: 1100eh_bus_reset_done:
1107 ql_log(ql_log_warn, vha, 0x802b, 1101 ql_log(ql_log_warn, vha, 0x802b,
1108 "BUS RESET %s.\n", (ret == FAILED) ? "FAILED" : "SUCCEDED"); 1102 "BUS RESET %s nexus=%ld:%d:%d.\n",
1103 (ret == FAILED) ? "FAILED" : "SUCCEDED", vha->host_no, id, lun);
1109 1104
1110 return ret; 1105 return ret;
1111} 1106}
@@ -1139,20 +1134,16 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
1139 lun = cmd->device->lun; 1134 lun = cmd->device->lun;
1140 1135
1141 if (!fcport) { 1136 if (!fcport) {
1142 ql_log(ql_log_warn, vha, 0x8016,
1143 "fcport is NULL.\n");
1144 return ret; 1137 return ret;
1145 } 1138 }
1146 1139
1147 ret = fc_block_scsi_eh(cmd); 1140 ret = fc_block_scsi_eh(cmd);
1148 ql_dbg(ql_dbg_taskm, vha, 0x8017,
1149 "fc_block_scsi_eh ret=%d.\n", ret);
1150 if (ret != 0) 1141 if (ret != 0)
1151 return ret; 1142 return ret;
1152 ret = FAILED; 1143 ret = FAILED;
1153 1144
1154 ql_log(ql_log_info, vha, 0x8018, 1145 ql_log(ql_log_info, vha, 0x8018,
1155 "ADAPTER RESET ISSUED for id %d lun %d.\n", id, lun); 1146 "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun);
1156 1147
1157 if (qla2x00_wait_for_reset_ready(vha) != QLA_SUCCESS) 1148 if (qla2x00_wait_for_reset_ready(vha) != QLA_SUCCESS)
1158 goto eh_host_reset_lock; 1149 goto eh_host_reset_lock;
@@ -1193,8 +1184,9 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
1193 ret = SUCCESS; 1184 ret = SUCCESS;
1194 1185
1195eh_host_reset_lock: 1186eh_host_reset_lock:
1196 qla_printk(KERN_INFO, ha, "%s: reset %s.\n", __func__, 1187 ql_log(ql_log_info, vha, 0x8017,
1197 (ret == FAILED) ? "failed" : "succeeded"); 1188 "ADAPTER RESET %s nexus=%ld:%d:%d.\n",
1189 (ret == FAILED) ? "FAILED" : "SUCCEEDED", vha->host_no, id, lun);
1198 1190
1199 return ret; 1191 return ret;
1200} 1192}
@@ -1344,10 +1336,8 @@ static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth)
1344 return; 1336 return;
1345 1337
1346 ql_dbg(ql_dbg_io, fcport->vha, 0x3029, 1338 ql_dbg(ql_dbg_io, fcport->vha, 0x3029,
1347 "Queue depth adjusted-down " 1339 "Queue depth adjusted-down to %d for nexus=%ld:%d:%d.\n",
1348 "to %d for scsi(%ld:%d:%d:%d).\n", 1340 sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun);
1349 sdev->queue_depth, fcport->vha->host_no,
1350 sdev->channel, sdev->id, sdev->lun);
1351} 1341}
1352 1342
1353static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth) 1343static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth)
@@ -1369,10 +1359,8 @@ static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth)
1369 scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth); 1359 scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth);
1370 1360
1371 ql_dbg(ql_dbg_io, vha, 0x302a, 1361 ql_dbg(ql_dbg_io, vha, 0x302a,
1372 "Queue depth adjusted-up to %d for " 1362 "Queue depth adjusted-up to %d for nexus=%ld:%d:%d.\n",
1373 "scsi(%ld:%d:%d:%d).\n", 1363 sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun);
1374 sdev->queue_depth, fcport->vha->host_no,
1375 sdev->channel, sdev->id, sdev->lun);
1376} 1364}
1377 1365
1378static int 1366static int
@@ -2382,9 +2370,6 @@ skip_dpc:
2382 2370
2383 qla2x00_dfs_setup(base_vha); 2371 qla2x00_dfs_setup(base_vha);
2384 2372
2385 ql_log(ql_log_info, base_vha, 0x00fa,
2386 "QLogic Fibre Channed HBA Driver: %s.\n",
2387 qla2x00_version_str);
2388 ql_log(ql_log_info, base_vha, 0x00fb, 2373 ql_log(ql_log_info, base_vha, 0x00fb,
2389 "QLogic %s - %s.\n", 2374 "QLogic %s - %s.\n",
2390 ha->model_number, ha->model_desc ? ha->model_desc : ""); 2375 ha->model_number, ha->model_desc ? ha->model_desc : "");