Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282228
b: refs/heads/master
c: cfb0919
h: refs/heads/master
v: v3
  • Loading branch information
Chad Dupuis authored and James Bottomley committed Dec 15, 2011
1 parent 5edea61 commit 8c3a93e
Show file tree
Hide file tree
Showing 11 changed files with 200 additions and 217 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d8424f68c0160c45c446e56cb586fd8b9c538a1a
refs/heads/master: cfb0919c12a33132f75fb91971bbd8bdd44ebb90
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/qla2xxx/qla_attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1971,8 +1971,8 @@ qla24xx_vport_delete(struct fc_vport *fc_vport)
"Queue delete failed.\n");
}

scsi_host_put(vha->host);
ql_log(ql_log_info, vha, 0x7088, "VP[%d] deleted.\n", id);
scsi_host_put(vha->host);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/qla2xxx/qla_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,7 @@ qla24xx_bsg_request(struct fc_bsg_job *bsg_job)
}

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) {
case FC_BSG_RPT_ELS:
Expand Down
93 changes: 52 additions & 41 deletions trunk/drivers/scsi/qla2xxx/qla_dbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@
* ----------------------------------------------------------------------
* | Level | Last Value Used | Holes |
* ----------------------------------------------------------------------
* | Module Init and Probe | 0x0116 | |
* | Module Init and Probe | 0x0116 | 0xfa |
* | Mailbox commands | 0x112b | |
* | Device Discovery | 0x2083 | |
* | Queue Command and IO tracing | 0x302e | 0x3008 |
* | Device Discovery | 0x2084 | |
* | Queue Command and IO tracing | 0x302f | 0x3008 |
* | DPC Thread | 0x401c | |
* | Async Events | 0x5059 | |
* | Timer Routines | 0x6010 | 0x600e,0x600f |
* | User Space Interactions | 0x709d | |
* | Task Management | 0x8041 | 0x800b |
* | Async Events | 0x5057 | 0x5052 |
* | Timer Routines | 0x6011 | 0x600e,0x600f |
* | User Space Interactions | 0x709e | |
* | Task Management | 0x803c | 0x8025-0x8026 |
* | | | 0x800b,0x8039 |
* | AER/EEH | 0x900f | |
* | Virtual Port | 0xa007 | |
* | ISP82XX Specific | 0xb052 | |
Expand Down Expand Up @@ -1650,6 +1651,15 @@ qla81xx_fw_dump(scsi_qla_host_t *vha, int hardware_locked)
/****************************************************************************/
/* 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.
* It is to be used when vha is available. It formats the message
Expand All @@ -1669,7 +1679,7 @@ ql_dbg(uint32_t level, scsi_qla_host_t *vha, int32_t id, const char *fmt, ...)
va_list va;
struct va_format vaf;

if ((level & ql2xextended_error_logging) != level)
if (!ql_mask_match(level))
return;

va_start(va, fmt);
Expand Down Expand Up @@ -1715,7 +1725,7 @@ ql_dbg_pci(uint32_t level, struct pci_dev *pdev, int32_t id,

if (pdev == NULL)
return;
if ((level & ql2xextended_error_logging) != level)
if (!ql_mask_match(level))
return;

va_start(va, fmt);
Expand Down Expand Up @@ -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;
uint16_t __iomem *mbx_reg;

if ((level & ql2xextended_error_logging) == level) {

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);
if (!ql_mask_match(level))
return;

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++));
}
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");
for (i = 0; i < 6; i++)
ql_dbg(level, vha, id,
"mbox[%d] 0x%04x\n", i, RD_REG_WORD(mbx_reg++));
}


Expand All @@ -1875,24 +1885,25 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
{
uint32_t cnt;
uint8_t c;
if ((level & ql2xextended_error_logging) == level) {

ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 "
"9 Ah Bh Ch Dh Eh Fh\n");
ql_dbg(level, vha, id, "----------------------------------"
"----------------------------\n");

ql_dbg(level, vha, id, " ");
for (cnt = 0; cnt < size;) {
c = *b++;
printk("%02x", (uint32_t) c);
cnt++;
if (!(cnt % 16))
printk("\n");
else
printk(" ");
}
if (cnt % 16)
ql_dbg(level, vha, id, "\n");

if (!ql_mask_match(level))
return;

ql_dbg(level, vha, id, " 0 1 2 3 4 5 6 7 8 "
"9 Ah Bh Ch Dh Eh Fh\n");
ql_dbg(level, vha, id, "----------------------------------"
"----------------------------\n");

ql_dbg(level, vha, id, " ");
for (cnt = 0; cnt < size;) {
c = *b++;
printk("%02x", (uint32_t) c);
cnt++;
if (!(cnt % 16))
printk("\n");
else
printk(" ");
}
if (cnt % 16)
ql_dbg(level, vha, id, "\n");
}
1 change: 1 addition & 0 deletions trunk/drivers/scsi/qla2xxx/qla_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ struct qla2xxx_fw_dump {
};

#define QL_MSGHDR "qla2xxx"
#define QL_DBG_DEFAULT1_MASK 0x1e400000

#define ql_log_fatal 0 /* display fatal errors */
#define ql_log_warn 1 /* display critical errors */
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/scsi/qla2xxx/qla_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -2978,10 +2978,6 @@ typedef struct scsi_qla_host {
atomic_dec(&__vha->vref_count); \
} while (0)


#define qla_printk(level, ha, format, arg...) \
dev_printk(level , &((ha)->pdev->dev) , format , ## arg)

/*
* qla2x00 local function return status codes
*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/qla2xxx/qla_gs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
} else if (sns_cmd->p.gan_data[8] != 0x80 ||
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");
ql_dump_buffer(ql_dbg_disc + ql_dbg_buffer, vha, 0x2074,
sns_cmd->p.gan_data, 16);
Expand Down
Loading

0 comments on commit 8c3a93e

Please sign in to comment.