Commit cfb0919c authored by Chad Dupuis's avatar Chad Dupuis Committed by James Bottomley

[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: default avatarSaurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarChad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent d8424f68
...@@ -1971,8 +1971,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) ...@@ -1971,8 +1971,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
"Queue delete failed.\n"); "Queue delete failed.\n");
} }
scsi_host_put(vha->host);
ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id); ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id);
scsi_host_put(vha->host);
return 0; return 0;
} }
......
...@@ -1653,7 +1653,7 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job) ...@@ -1653,7 +1653,7 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
} }
ql_dbg(ql_dbg_user, vha, 0x7000, ql_dbg(ql_dbg_user, vha, 0x7000,
"Entered %s msgcode=%d.\n", __func__, bsg_job->request->msgcode); "Entered %s msgcode=0x%x.\n", __func__, bsg_job->request->msgcode);
switch (bsg_job->request->msgcode) { switch (bsg_job->request->msgcode) {
case FC_BSG_RPT_ELS: case FC_BSG_RPT_ELS:
......
...@@ -11,15 +11,16 @@ ...@@ -11,15 +11,16 @@
* ---------------------------------------------------------------------- * ----------------------------------------------------------------------
* | Level | Last Value Used | Holes | * | Level | Last Value Used | Holes |
* ---------------------------------------------------------------------- * ----------------------------------------------------------------------
* | Module Init and Probe | 0x0116 | | * | Module Init and Probe | 0x0116 | 0xfa |
* | Mailbox commands | 0x112b | | * | Mailbox commands | 0x112b | |
* | Device Discovery | 0x2083 | | * | Device Discovery | 0x2084 | |
* | Queue Command and IO tracing | 0x302e | 0x3008 | * | Queue Command and IO tracing | 0x302f | 0x3008 |
* | DPC Thread | 0x401c | | * | DPC Thread | 0x401c | |
* | Async Events | 0x5059 | | * | Async Events | 0x5057 | 0x5052 |
* | Timer Routines | 0x6010 | 0x600e,0x600f | * | Timer Routines | 0x6011 | 0x600e,0x600f |
* | User Space Interactions | 0x709d | | * | User Space Interactions | 0x709e | |
* | Task Management | 0x8041 | 0x800b | * | Task Management | 0x803c | 0x8025-0x8026 |
* | | | 0x800b,0x8039 |
* | AER/EEH | 0x900f | | * | AER/EEH | 0x900f | |
* | Virtual Port | 0xa007 | | * | Virtual Port | 0xa007 | |
* | ISP82XX Specific | 0xb052 | | * | ISP82XX Specific | 0xb052 | |
...@@ -1650,6 +1651,15 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked) ...@@ -1650,6 +1651,15 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
/****************************************************************************/ /****************************************************************************/
/* Driver Debug Functions. */ /* Driver Debug Functions. */
/****************************************************************************/ /****************************************************************************/
static inline int
ql_mask_match(uint32_t level)
{
if (ql2xextended_error_logging == 1)
ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
return (level & ql2xextended_error_logging) == level;
}
/* /*
* This function is for formatting and logging debug information. * This function is for formatting and logging debug information.
* It is to be used when vha is available. It formats the message * 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,7 +1679,7 @@ ql_dbg(uint32_t level, scsi_qla_host_t *vha, int32_t id, const char *fmt, ...)
va_list va; va_list va;
struct va_format vaf; struct va_format vaf;
if ((level & ql2xextended_error_logging) != level) if (!ql_mask_match(level))
return; return;
va_start(va, fmt); va_start(va, fmt);
...@@ -1715,7 +1725,7 @@ ql_dbg_pci(uint32_t level, struct pci_dev *pdev, int32_t id, ...@@ -1715,7 +1725,7 @@ ql_dbg_pci(uint32_t level, struct pci_dev *pdev, int32_t id,
if (pdev == NULL) if (pdev == NULL)
return; return;
if ((level & ql2xextended_error_logging) != level) if (!ql_mask_match(level))
return; return;
va_start(va, fmt); va_start(va, fmt);
...@@ -1852,20 +1862,20 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id) ...@@ -1852,20 +1862,20 @@ ql_dump_regs(uint32_t level, scsi_qla_host_t *vha, int32_t id)
struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82; struct device_reg_82xx __iomem *reg82 = &ha->iobase->isp82;
uint16_t __iomem *mbx_reg; uint16_t __iomem *mbx_reg;
if ((level & ql2xextended_error_logging) == level) { if (!ql_mask_match(level))
return;
if (IS_QLA82XX(ha))
mbx_reg = &reg82->mailbox_in[0];
else if (IS_FWI2_CAPABLE(ha))
mbx_reg = &reg24->mailbox0;
else
mbx_reg = MAILBOX_REG(ha, reg, 0);
ql_dbg(level, vha, id, "Mailbox registers:\n"); if (IS_QLA82XX(ha))
for (i = 0; i < 6; i++) mbx_reg = &reg82->mailbox_in[0];
ql_dbg(level, vha, id, else if (IS_FWI2_CAPABLE(ha))
"mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++)); mbx_reg = &reg24->mailbox0;
} else
mbx_reg = MAILBOX_REG(ha, reg, 0);
ql_dbg(level, vha, id, "Mailbox registers:\n");
for (i = 0; i < 6; i++)
ql_dbg(level, vha, id,
"mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++));
} }
...@@ -1875,24 +1885,25 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id, ...@@ -1875,24 +1885,25 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
{ {
uint32_t cnt; uint32_t cnt;
uint8_t c; uint8_t c;
if ((level & ql2xextended_error_logging) == level) {
if (!ql_mask_match(level))
ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 " return;
"9 Ah Bh Ch Dh Eh Fh\n");
ql_dbg(level, vha, id, "----------------------------------" ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 "
"----------------------------\n"); "9 Ah Bh Ch Dh Eh Fh\n");
ql_dbg(level, vha, id, "----------------------------------"
ql_dbg(level, vha, id, " "); "----------------------------\n");
for (cnt = 0; cnt < size;) {
c = *b++; ql_dbg(level, vha, id, " ");
printk("%02x", (uint32_t) c); for (cnt = 0; cnt < size;) {
cnt++; c = *b++;
if (!(cnt % 16)) printk("%02x", (uint32_t) c);
printk("\n"); cnt++;
else if (!(cnt % 16))
printk(" "); printk("\n");
} else
if (cnt % 16) printk(" ");
ql_dbg(level, vha, id, "\n");
} }
if (cnt % 16)
ql_dbg(level, vha, id, "\n");
} }
...@@ -232,6 +232,7 @@ struct qla2xxx_fw_dump { ...@@ -232,6 +232,7 @@ struct qla2xxx_fw_dump {
}; };
#define QL_MSGHDR "qla2xxx" #define QL_MSGHDR "qla2xxx"
#define QL_DBG_DEFAULT1_MASK 0x1e400000
#define ql_log_fatal 0 /* display fatal errors */ #define ql_log_fatal 0 /* display fatal errors */
#define ql_log_warn 1 /* display critical errors */ #define ql_log_warn 1 /* display critical errors */
......
...@@ -2978,10 +2978,6 @@ typedef struct scsi_qla_host { ...@@ -2978,10 +2978,6 @@ typedef struct scsi_qla_host {
atomic_dec(&__vha->vref_count); \ atomic_dec(&__vha->vref_count); \
} while (0) } while (0)
#define qla_printk(level, ha, format, arg...) \
dev_printk(level , &((ha)->pdev->dev) , format , ## arg)
/* /*
* qla2x00 local function return status codes * qla2x00 local function return status codes
*/ */
......
...@@ -758,7 +758,7 @@ qla2x00_sns_ga_nxt(scsi_qla_host_t *vha, fc_port_t *fcport) ...@@ -758,7 +758,7 @@ qla2x00_sns_ga_nxt(scsi_qla_host_t *vha, fc_port_t *fcport)
"GA_NXT Send SNS failed (%d).\n", rval); "GA_NXT Send SNS failed (%d).\n", rval);
} else if (sns_cmd->p.gan_data[8] != 0x80 || } else if (sns_cmd->p.gan_data[8] != 0x80 ||
sns_cmd->p.gan_data[9] != 0x02) { sns_cmd->p.gan_data[9] != 0x02) {
ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x207d, ql_dbg(ql_dbg_disc + ql_dbg_buffer, vha, 0x2084,
"GA_NXT failed, rejected request ga_nxt_rsp:\n"); "GA_NXT failed, rejected request ga_nxt_rsp:\n");
ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x2074, ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x2074,
sns_cmd->p.gan_data, 16); sns_cmd->p.gan_data, 16);
......
...@@ -154,8 +154,8 @@ qla2x00_async_iocb_timeout(srb_t *sp) ...@@ -154,8 +154,8 @@ qla2x00_async_iocb_timeout(srb_t *sp)
struct srb_ctx *ctx = sp->ctx; struct srb_ctx *ctx = sp->ctx;
ql_dbg(ql_dbg_disc, fcport->vha, 0x2071, ql_dbg(ql_dbg_disc, fcport->vha, 0x2071,
"Async-%s timeout - portid=%02x%02x%02x.\n", "Async-%s timeout - hdl=%x portid=%02x%02x%02x.\n",
ctx->name, fcport->d_id.b.domain, fcport->d_id.b.area, ctx->name, sp->handle, fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa); fcport->d_id.b.al_pa);
fcport->flags &= ~FCF_ASYNC_SENT; fcport->flags &= ~FCF_ASYNC_SENT;
...@@ -211,9 +211,10 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport, ...@@ -211,9 +211,10 @@ qla2x00_async_login(struct scsi_qla_host *vha, fc_port_t *fcport,
goto done_free_sp; goto done_free_sp;
ql_dbg(ql_dbg_disc, vha, 0x2072, ql_dbg(ql_dbg_disc, vha, 0x2072,
"Async-login - loopid=%x portid=%02x%02x%02x retries=%d.\n", "Async-login - hdl=%x, loopid=%x portid=%02x%02x%02x "
fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, "retries=%d.\n", sp->handle, fcport->loop_id,
fcport->d_id.b.al_pa, fcport->login_retry); fcport->d_id.b.domain, fcport->d_id.b.area, fcport->d_id.b.al_pa,
fcport->login_retry);
return rval; return rval;
done_free_sp: done_free_sp:
...@@ -258,9 +259,9 @@ qla2x00_async_logout(struct scsi_qla_host *vha, fc_port_t *fcport) ...@@ -258,9 +259,9 @@ qla2x00_async_logout(struct scsi_qla_host *vha, fc_port_t *fcport)
goto done_free_sp; goto done_free_sp;
ql_dbg(ql_dbg_disc, vha, 0x2070, ql_dbg(ql_dbg_disc, vha, 0x2070,
"Async-logout - loop-id=%x portid=%02x%02x%02x.\n", "Async-logout - hdl=%x loop-id=%x portid=%02x%02x%02x.\n",
fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, sp->handle, fcport->loop_id, fcport->d_id.b.domain,
fcport->d_id.b.al_pa); fcport->d_id.b.area, fcport->d_id.b.al_pa);
return rval; return rval;
done_free_sp: done_free_sp:
...@@ -308,9 +309,9 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport, ...@@ -308,9 +309,9 @@ qla2x00_async_adisc(struct scsi_qla_host *vha, fc_port_t *fcport,
goto done_free_sp; goto done_free_sp;
ql_dbg(ql_dbg_disc, vha, 0x206f, ql_dbg(ql_dbg_disc, vha, 0x206f,
"Async-adisc - loopid=%x portid=%02x%02x%02x.\n", "Async-adisc - hdl=%x loopid=%x portid=%02x%02x%02x.\n",
fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, sp->handle, fcport->loop_id, fcport->d_id.b.domain,
fcport->d_id.b.al_pa); fcport->d_id.b.area, fcport->d_id.b.al_pa);
return rval; return rval;
done_free_sp: done_free_sp:
...@@ -360,9 +361,9 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun, ...@@ -360,9 +361,9 @@ qla2x00_async_tm_cmd(fc_port_t *fcport, uint32_t flags, uint32_t lun,
goto done_free_sp; goto done_free_sp;
ql_dbg(ql_dbg_taskm, vha, 0x802f, ql_dbg(ql_dbg_taskm, vha, 0x802f,
"Async-tmf loop-id=%x portid=%02x%02x%02x.\n", "Async-tmf hdl=%x loop-id=%x portid=%02x%02x%02x.\n",
fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, sp->handle, fcport->loop_id, fcport->d_id.b.domain,
fcport->d_id.b.al_pa); fcport->d_id.b.area, fcport->d_id.b.al_pa);
return rval; return rval;
done_free_sp: done_free_sp:
...@@ -514,7 +515,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha) ...@@ -514,7 +515,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
set_bit(0, ha->req_qid_map); set_bit(0, ha->req_qid_map);
set_bit(0, ha->rsp_qid_map); set_bit(0, ha->rsp_qid_map);
ql_log(ql_log_info, vha, 0x0040, ql_dbg(ql_dbg_init, vha, 0x0040,
"Configuring PCI space...\n"); "Configuring PCI space...\n");
rval = ha->isp_ops->pci_config(vha); rval = ha->isp_ops->pci_config(vha);
if (rval) { if (rval) {
...@@ -533,7 +534,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha) ...@@ -533,7 +534,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
} }
ha->isp_ops->get_flash_version(vha, req->ring); ha->isp_ops->get_flash_version(vha, req->ring);
ql_log(ql_log_info, vha, 0x0061, ql_dbg(ql_dbg_init, vha, 0x0061,
"Configure NVRAM parameters...\n"); "Configure NVRAM parameters...\n");
ha->isp_ops->nvram_config(vha); ha->isp_ops->nvram_config(vha);
...@@ -550,7 +551,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha) ...@@ -550,7 +551,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha)
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
} }
ql_log(ql_log_info, vha, 0x0078, ql_dbg(ql_dbg_init, vha, 0x0078,
"Verifying loaded RISC code...\n"); "Verifying loaded RISC code...\n");
if (qla2x00_isp_firmware(vha) != QLA_SUCCESS) { if (qla2x00_isp_firmware(vha) != QLA_SUCCESS) {
...@@ -1294,7 +1295,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1294,7 +1295,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
ha->flags.fce_enabled = 0; ha->flags.fce_enabled = 0;
goto try_eft; goto try_eft;
} }
ql_log(ql_log_info, vha, 0x00c0, ql_dbg(ql_dbg_init, vha, 0x00c0,
"Allocate (%d KB) for FCE...\n", FCE_SIZE / 1024); "Allocate (%d KB) for FCE...\n", FCE_SIZE / 1024);
fce_size = sizeof(struct qla2xxx_fce_chain) + FCE_SIZE; fce_size = sizeof(struct qla2xxx_fce_chain) + FCE_SIZE;
...@@ -1321,7 +1322,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1321,7 +1322,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
tc_dma); tc_dma);
goto cont_alloc; goto cont_alloc;
} }
ql_log(ql_log_info, vha, 0x00c3, ql_dbg(ql_dbg_init, vha, 0x00c3,
"Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024); "Allocated (%d KB) EFT ...\n", EFT_SIZE / 1024);
eft_size = EFT_SIZE; eft_size = EFT_SIZE;
...@@ -1358,7 +1359,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha) ...@@ -1358,7 +1359,7 @@ qla2x00_alloc_fw_dump(scsi_qla_host_t *vha)
} }
return; return;
} }
ql_log(ql_log_info, vha, 0x00c5, ql_dbg(ql_dbg_init, vha, 0x00c5,
"Allocated (%d KB) for firmware dump.\n", dump_size / 1024); "Allocated (%d KB) for firmware dump.\n", dump_size / 1024);
ha->fw_dump_len = dump_size; ha->fw_dump_len = dump_size;
...@@ -1929,7 +1930,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) ...@@ -1929,7 +1930,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
rval = qla84xx_init_chip(vha); rval = qla84xx_init_chip(vha);
if (rval != QLA_SUCCESS) { if (rval != QLA_SUCCESS) {
ql_log(ql_log_warn, ql_log(ql_log_warn,
vha, 0x8026, vha, 0x8007,
"Init chip failed.\n"); "Init chip failed.\n");
break; break;
} }
...@@ -1938,7 +1939,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) ...@@ -1938,7 +1939,7 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
cs84xx_time = jiffies - cs84xx_time; cs84xx_time = jiffies - cs84xx_time;
wtime += cs84xx_time; wtime += cs84xx_time;
mtime += cs84xx_time; mtime += cs84xx_time;
ql_dbg(ql_dbg_taskm, vha, 0x8025, ql_dbg(ql_dbg_taskm, vha, 0x8008,
"Increasing wait time by %ld. " "Increasing wait time by %ld. "
"New time %ld.\n", cs84xx_time, "New time %ld.\n", cs84xx_time,
wtime); wtime);
...@@ -1981,16 +1982,13 @@ qla2x00_fw_ready(scsi_qla_host_t *vha) ...@@ -1981,16 +1982,13 @@ qla2x00_fw_ready(scsi_qla_host_t *vha)
/* Delay for a while */ /* Delay for a while */
msleep(500); msleep(500);
ql_dbg(ql_dbg_taskm, vha, 0x8039,
"fw_state=%x curr time=%lx.\n", state[0], jiffies);
} while (1); } while (1);
ql_dbg(ql_dbg_taskm, vha, 0x803a, ql_dbg(ql_dbg_taskm, vha, 0x803a,
"fw_state=%x (%x, %x, %x, %x) " "curr time=%lx.\n", state[0], "fw_state=%x (%x, %x, %x, %x) " "curr time=%lx.\n", state[0],
state[1], state[2], state[3], state[4], jiffies); state[1], state[2], state[3], state[4], jiffies);
if (rval) { if (rval && !(vha->device_flags & DFLG_NO_CABLE)) {
ql_log(ql_log_warn, vha, 0x803b, ql_log(ql_log_warn, vha, 0x803b,
"Firmware ready **** FAILED ****.\n"); "Firmware ready **** FAILED ****.\n");
} }
...@@ -2386,7 +2384,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha) ...@@ -2386,7 +2384,7 @@ qla2x00_nvram_config(scsi_qla_host_t *vha)
* internal driver logging. * internal driver logging.
*/ */
if (nv->host_p[0] & BIT_7) if (nv->host_p[0] & BIT_7)
ql2xextended_error_logging = 0x7fffffff; ql2xextended_error_logging = QL_DBG_DEFAULT1_MASK;
ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0);
/* Always load RISC code on non ISP2[12]00 chips. */ /* Always load RISC code on non ISP2[12]00 chips. */
if (!IS_QLA2100(ha) && !IS_QLA2200(ha)) 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,7 +4637,7 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr,
struct req_que *req = ha->req_q_map[0]; struct req_que *req = ha->req_q_map[0];
ql_dbg(ql_dbg_init, vha, 0x008b, ql_dbg(ql_dbg_init, vha, 0x008b,
"Loading firmware from flash (%x).\n", faddr); "FW: Loading firmware from flash (%x).\n", faddr);
rval = QLA_SUCCESS; rval = QLA_SUCCESS;
...@@ -4837,8 +4835,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) ...@@ -4837,8 +4835,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
} }
ql_log(ql_log_info, vha, 0x0092, ql_dbg(ql_dbg_init, vha, 0x0092,
"Loading via request-firmware.\n"); "FW: Loading via request-firmware.\n");
rval = QLA_SUCCESS; rval = QLA_SUCCESS;
...@@ -5426,7 +5424,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha) ...@@ -5426,7 +5424,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
if ((vha->device_flags & DFLG_NO_CABLE)) if ((vha->device_flags & DFLG_NO_CABLE))
status = 0; status = 0;
ql_log(ql_log_info, vha, 0x803d, ql_log(ql_log_info, vha, 0x8000,
"Configure loop done, status = 0x%x.\n", status); "Configure loop done, status = 0x%x.\n", status);
} }
...@@ -5459,7 +5457,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha) ...@@ -5459,7 +5457,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
ha->fce_dma, ha->fce_bufs, ha->fce_mb, ha->fce_dma, ha->fce_bufs, ha->fce_mb,
&ha->fce_bufs); &ha->fce_bufs);
if (rval) { if (rval) {
ql_log(ql_log_warn, vha, 0x803e, ql_log(ql_log_warn, vha, 0x8001,
"Unable to reinitialize FCE (%d).\n", "Unable to reinitialize FCE (%d).\n",
rval); rval);
ha->flags.fce_enabled = 0; ha->flags.fce_enabled = 0;
...@@ -5471,7 +5469,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha) ...@@ -5471,7 +5469,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
rval = qla2x00_enable_eft_trace(vha, rval = qla2x00_enable_eft_trace(vha,
ha->eft_dma, EFT_NUM_BUFFERS); ha->eft_dma, EFT_NUM_BUFFERS);
if (rval) { if (rval) {
ql_log(ql_log_warn, vha, 0x803f, ql_log(ql_log_warn, vha, 0x8010,
"Unable to reinitialize EFT (%d).\n", "Unable to reinitialize EFT (%d).\n",
rval); rval);
} }
...@@ -5479,7 +5477,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha) ...@@ -5479,7 +5477,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
} }
if (!status) { if (!status) {
ql_dbg(ql_dbg_taskm, vha, 0x8040, ql_dbg(ql_dbg_taskm, vha, 0x8011,
"qla82xx_restart_isp succeeded.\n"); "qla82xx_restart_isp succeeded.\n");
spin_lock_irqsave(&ha->vport_slock, flags); spin_lock_irqsave(&ha->vport_slock, flags);
...@@ -5497,7 +5495,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha) ...@@ -5497,7 +5495,7 @@ qla82xx_restart_isp(scsi_qla_host_t *vha)
spin_unlock_irqrestore(&ha->vport_slock, flags); spin_unlock_irqrestore(&ha->vport_slock, flags);
} else { } else {
ql_log(ql_log_warn, vha, 0x8041, ql_log(ql_log_warn, vha, 0x8016,
"qla82xx_restart_isp **** FAILED ****.\n"); "qla82xx_restart_isp **** FAILED ****.\n");
} }
...@@ -5645,12 +5643,20 @@ qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *vha, fc_port_t *fcport) ...@@ -5645,12 +5643,20 @@ qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *vha, fc_port_t *fcport)
return QLA_FUNCTION_FAILED; return QLA_FUNCTION_FAILED;
ret = qla24xx_set_fcp_prio(vha, fcport->loop_id, priority, mb); ret = qla24xx_set_fcp_prio(vha, fcport->loop_id, priority, mb);
if (ret == QLA_SUCCESS) if (ret == QLA_SUCCESS) {
if (fcport->fcp_prio != priority)
ql_dbg(ql_dbg_user, vha, 0x709e,
"Updated FCP_CMND priority - value=%d loop_id=%d "
"port_id=%02x%02x%02x.\n", priority,
fcport->loop_id, fcport->d_id.b.domain,
fcport->d_id.b.area, fcport->d_id.b.al_pa);
fcport->fcp_prio = priority; fcport->fcp_prio = priority;
else } else
ql_dbg(ql_dbg_user, vha, 0x704f, ql_dbg(ql_dbg_user, vha, 0x704f,
"Unable to activate fcp priority, ret=0x%x.\n", ret); "Unable to update FCP_CMND priority - ret=0x%x for "
"loop_id=%d port_id=%02x%02x%02x.\n", ret, fcport->loop_id,
fcport->d_id.b.domain, fcport->d_id.b.area,
fcport->d_id.b.al_pa);
return ret; return ret;
} }
......
This diff is collapsed.
...@@ -2023,13 +2023,9 @@ qla82xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0) ...@@ -2023,13 +2023,9 @@ qla82xx_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0)
wptr++; wptr++;
} }
if (ha->mcp) { if (!ha->mcp)
ql_dbg(ql_dbg_async, vha, 0x5052,
"Got mailbox completion. cmd=%x.\n", ha->mcp->mb[0]);
} else {
ql_dbg(ql_dbg_async, vha, 0x5053, ql_dbg(ql_dbg_async, vha, 0x5053,
"MBX pointer ERROR.\n"); "MBX pointer ERROR.\n");
}
} }
/* /*
......
...@@ -83,6 +83,9 @@ MODULE_PARM_DESC(ql2xextended_error_logging, ...@@ -83,6 +83,9 @@ MODULE_PARM_DESC(ql2xextended_error_logging,
"\t\t0x00080000 - P3P Specific. 0x00040000 - Virtual Port.\n" "\t\t0x00080000 - P3P Specific. 0x00040000 - Virtual Port.\n"
"\t\t0x00020000 - Buffer Dump. 0x00010000 - Misc.\n" "\t\t0x00020000 - Buffer Dump. 0x00010000 - Misc.\n"
"\t\t0x7fffffff - For enabling all logs, can be too many logs.\n" "\t\t0x7fffffff - For enabling all logs, can be too many logs.\n"
"\t\t0x1e400000 - Preferred value for capturing essential "
"debug information (equivalent to old "
"ql2xextended_error_logging=1).\n"
"\t\tDo LOGICAL OR of the value to enable more than one level"); "\t\tDo LOGICAL OR of the value to enable more than one level");
int ql2xshiftctondsd = 6; int ql2xshiftctondsd = 6;
...@@ -847,14 +850,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) ...@@ -847,14 +850,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
int wait = 0; int wait = 0;
struct qla_hw_data *ha = vha->hw; struct qla_hw_data *ha = vha->hw;
ql_dbg(ql_dbg_taskm, vha, 0x8000,
"Entered %s for cmd=%p.\n", __func__, cmd);
if (!CMD_SP(cmd)) if (!CMD_SP(cmd))
return SUCCESS; return SUCCESS;
ret = fc_block_scsi_eh(cmd); ret = fc_block_scsi_eh(cmd);
ql_dbg(ql_dbg_taskm, vha, 0x8001,
"Return value of fc_block_scsi_eh=%d.\n", ret);
if (ret != 0) if (ret != 0)
return ret; return ret;
ret = SUCCESS; ret = SUCCESS;
...@@ -870,7 +869,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) ...@@ -870,7 +869,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
} }
ql_dbg(ql_dbg_taskm, vha, 0x8002, ql_dbg(ql_dbg_taskm, vha, 0x8002,
"Aborting sp=%p cmd=%p from RISC ", sp, cmd); "Aborting from RISC nexus=%ld:%d:%d sp=%p cmd=%p\n",
vha->host_no, id, lun, sp, cmd);
/* Get a reference to the sp and drop the lock.*/ /* Get a reference to the sp and drop the lock.*/
sp_get(sp); sp_get(sp);
...@@ -878,10 +878,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) ...@@ -878,10 +878,10 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
spin_unlock_irqrestore(&ha->hardware_lock, flags); spin_unlock_irqrestore(&ha->hardware_lock, flags);
if (ha->isp_ops->abort_command(sp)) { if (ha->isp_ops->abort_command(sp)) {
ql_dbg(ql_dbg_taskm, vha, 0x8003, ql_dbg(ql_dbg_taskm, vha, 0x8003,
"Abort command mbx failed for cmd=%p.\n", cmd); "Abort command mbx failed cmd=%p.\n", cmd);
} else { } else {
ql_dbg(ql_dbg_taskm, vha, 0x8004, ql_dbg(ql_dbg_taskm, vha, 0x8004,
"Abort command mbx success.\n"); "Abort command mbx success cmd=%p.\n", cmd);
wait = 1; wait = 1;
} }
...@@ -897,13 +897,14 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) ...@@ -897,13 +897,14 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd)
if (wait) { if (wait) {
if (qla2x00_eh_wait_on_command(cmd) != QLA_SUCCESS) { if (qla2x00_eh_wait_on_command(cmd) != QLA_SUCCESS) {
ql_log(ql_log_warn, vha, 0x8006, ql_log(ql_log_warn, vha, 0x8006,
"Abort handler timed out for cmd=%p.\n", cmd); "Abort handler timed out cmd=%p.\n", cmd);
ret = FAILED; ret = FAILED;
} }
} }
ql_log(ql_log_info, vha, 0x801c, ql_log(ql_log_info, vha, 0x801c,
"Abort command issued -- %d %x.\n", wait, ret); "Abort command issued nexus=%ld:%d:%d -- %d %x.\n",
vha->host_no, id, lun, wait, ret);
return ret; return ret;
} }
...@@ -972,19 +973,15 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, ...@@ -972,19 +973,15 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
int err; int err;
if (!fcport) { if (!fcport) {
ql_log(ql_log_warn, vha, 0x8007,
"fcport is NULL.\n");
return FAILED; return FAILED;
} }
err = fc_block_scsi_eh(cmd); err = fc_block_scsi_eh(cmd);
ql_dbg(ql_dbg_taskm, vha, 0x8008,
"fc_block_scsi_eh ret=%d.\n", err);
if (err != 0) if (err != 0)
return err; return err;
ql_log(ql_log_info, vha, 0x8009, ql_log(ql_log_info, vha, 0x8009,
"%s RESET ISSUED for id %d lun %d cmd=%p.\n", name, "%s RESET ISSUED nexus=%ld:%d:%d cmd=%p.\n", name, vha->host_no,
cmd->device->id, cmd->device->lun, cmd); cmd->device->id, cmd->device->lun, cmd);
err = 0; err = 0;
...@@ -1009,15 +1006,16 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, ...@@ -1009,15 +1006,16 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type,
} }
ql_log(ql_log_info, vha, 0x800e, ql_log(ql_log_info, vha, 0x800e,
"%s RESET SUCCEEDED for id %d lun %d cmd=%p.\n", name, "%s RESET SUCCEEDED nexus:%ld:%d:%d cmd=%p.\n", name,
cmd->device->id, cmd->device->lun, cmd); vha->host_no, cmd->device->id, cmd->device->lun, cmd);
return SUCCESS; return SUCCESS;
eh_reset_failed: eh_reset_failed:
ql_log(ql_log_info, vha, 0x800f, ql_log(ql_log_info, vha, 0x800f,
"%s RESET FAILED: %s for id %d lun %d cmd=%p.\n", name, "%s RESET FAILED: %s nexus=%ld:%d:%d cmd=%p.\n", name,
reset_errors[err], cmd->device->id, cmd->device->lun, cmd); reset_errors[err], vha->host_no, cmd->device->id, cmd->device->lun,
cmd);
return FAILED; return FAILED;
} }
...@@ -1068,20 +1066,16 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) ...@@ -1068,20 +1066,16 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
lun = cmd->device->lun; lun = cmd->device->lun;
if (!fcport) { if (!fcport) {
ql_log(ql_log_warn, vha, 0x8010,
"fcport is NULL.\n");
return ret; return ret;
} }
ret = fc_block_scsi_eh(cmd); ret = fc_block_scsi_eh(cmd);
ql_dbg(ql_dbg_taskm, vha, 0x8011,
"fc_block_scsi_eh ret=%d.\n", ret);
if (ret != 0) if (ret != 0)
return ret; return ret;
ret = FAILED; ret = FAILED;
ql_log(ql_log_info, vha, 0x8012, ql_log(ql_log_info, vha, 0x8012,
"BUS RESET ISSUED for id %d lun %d.\n", id, lun); "BUS RESET ISSUED nexus=%ld:%d%d.\n", vha->host_no, id, lun);
if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) { if (qla2x00_wait_for_hba_online(vha) != QLA_SUCCESS) {
ql_log(ql_log_fatal, vha, 0x8013, ql_log(ql_log_fatal, vha, 0x8013,
...@@ -1105,7 +1099,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) ...@@ -1105,7 +1099,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd)
eh_bus_reset_done: eh_bus_reset_done:
ql_log(ql_log_warn, vha, 0x802b, ql_log(ql_log_warn, vha, 0x802b,
"BUS RESET %s.\n", (ret == FAILED) ? "FAILED" : "SUCCEDED"); "BUS RESET %s nexus=%ld:%d:%d.\n",
(ret == FAILED) ? "FAILED" : "SUCCEDED", vha->host_no, id, lun);
return ret; return ret;
} }
...@@ -1139,20 +1134,16 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) ...@@ -1139,20 +1134,16 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
lun = cmd->device->lun; lun = cmd->device->lun;
if (!fcport) { if (!fcport) {
ql_log(ql_log_warn, vha, 0x8016,
"fcport is NULL.\n");
return ret; return ret;
} }
ret = fc_block_scsi_eh(cmd); ret = fc_block_scsi_eh(cmd);
ql_dbg(ql_dbg_taskm, vha, 0x8017,
"fc_block_scsi_eh ret=%d.\n", ret);
if (ret != 0) if (ret != 0)
return ret; return ret;
ret = FAILED; ret = FAILED;
ql_log(ql_log_info, vha, 0x8018, ql_log(ql_log_info, vha, 0x8018,
"ADAPTER RESET ISSUED for id %d lun %d.\n", id, lun); "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun);
if (qla2x00_wait_for_reset_ready(vha) != QLA_SUCCESS) if (qla2x00_wait_for_reset_ready(vha) != QLA_SUCCESS)
goto eh_host_reset_lock; goto eh_host_reset_lock;
...@@ -1193,8 +1184,9 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) ...@@ -1193,8 +1184,9 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd)
ret = SUCCESS; ret = SUCCESS;
eh_host_reset_lock: eh_host_reset_lock:
qla_printk(KERN_INFO, ha, "%s: reset %s.\n", __func__, ql_log(ql_log_info, vha, 0x8017,
(ret == FAILED) ? "failed" : "succeeded"); "ADAPTER RESET %s nexus=%ld:%d:%d.\n",
(ret == FAILED) ? "FAILED" : "SUCCEEDED", vha->host_no, id, lun);
return ret; return ret;
} }
...@@ -1344,10 +1336,8 @@ static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth) ...@@ -1344,10 +1336,8 @@ static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth)
return; return;
ql_dbg(ql_dbg_io, fcport->vha, 0x3029, ql_dbg(ql_dbg_io, fcport->vha, 0x3029,
"Queue depth adjusted-down " "Queue depth adjusted-down to %d for nexus=%ld:%d:%d.\n",
"to %d for scsi(%ld:%d:%d:%d).\n", sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun);
sdev->queue_depth, fcport->vha->host_no,
sdev->channel, sdev->id, sdev->lun);
} }
static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth) static 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,10 +1359,8 @@ static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth)
scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth); scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth);
ql_dbg(ql_dbg_io, vha, 0x302a, ql_dbg(ql_dbg_io, vha, 0x302a,
"Queue depth adjusted-up to %d for " "Queue depth adjusted-up to %d for nexus=%ld:%d:%d.\n",
"scsi(%ld:%d:%d:%d).\n", sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun);
sdev->queue_depth, fcport->vha->host_no,
sdev->channel, sdev->id, sdev->lun);
} }
static int static int
...@@ -2382,9 +2370,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2382,9 +2370,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
qla2x00_dfs_setup(base_vha); qla2x00_dfs_setup(base_vha);
ql_log(ql_log_info, base_vha, 0x00fa,
"QLogic Fibre Channed HBA Driver: %s.\n",
qla2x00_version_str);
ql_log(ql_log_info, base_vha, 0x00fb, ql_log(ql_log_info, base_vha, 0x00fb,
"QLogic %s - %s.\n", "QLogic %s - %s.\n",
ha->model_number, ha->model_desc ? ha->model_desc : ""); ha->model_number, ha->model_desc ? ha->model_desc : "");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment