aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorArun Easi <arun.easi@qlogic.com>2012-02-09 14:15:51 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-02-19 09:23:45 -0500
commit5e19ed90f95f9e3799f2c6a06f87cb043c212102 (patch)
treeef791b37da2238d3a2749a759ed986f0c8744b08 /drivers
parent557cf7857cbf396f899034f1a7a13e245ef7e914 (diff)
[SCSI] qla2xxx: Log messages to use correct vha.
Signed-off-by: Arun Easi <arun.easi@qlogic.com> Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c34
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c60
2 files changed, 47 insertions, 47 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index f78f10f164e5..fdead64eb7d1 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1141,7 +1141,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
1141 data[1] = lio->u.logio.flags & SRB_LOGIN_RETRIED ? 1141 data[1] = lio->u.logio.flags & SRB_LOGIN_RETRIED ?
1142 QLA_LOGIO_LOGIN_RETRIED : 0; 1142 QLA_LOGIO_LOGIN_RETRIED : 0;
1143 if (logio->entry_status) { 1143 if (logio->entry_status) {
1144 ql_log(ql_log_warn, vha, 0x5034, 1144 ql_log(ql_log_warn, fcport->vha, 0x5034,
1145 "Async-%s error entry - hdl=%x" 1145 "Async-%s error entry - hdl=%x"
1146 "portid=%02x%02x%02x entry-status=%x.\n", 1146 "portid=%02x%02x%02x entry-status=%x.\n",
1147 type, sp->handle, fcport->d_id.b.domain, 1147 type, sp->handle, fcport->d_id.b.domain,
@@ -1154,7 +1154,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
1154 } 1154 }
1155 1155
1156 if (le16_to_cpu(logio->comp_status) == CS_COMPLETE) { 1156 if (le16_to_cpu(logio->comp_status) == CS_COMPLETE) {
1157 ql_dbg(ql_dbg_async, vha, 0x5036, 1157 ql_dbg(ql_dbg_async, fcport->vha, 0x5036,
1158 "Async-%s complete - hdl=%x portid=%02x%02x%02x " 1158 "Async-%s complete - hdl=%x portid=%02x%02x%02x "
1159 "iop0=%x.\n", type, sp->handle, fcport->d_id.b.domain, 1159 "iop0=%x.\n", type, sp->handle, fcport->d_id.b.domain,
1160 fcport->d_id.b.area, fcport->d_id.b.al_pa, 1160 fcport->d_id.b.area, fcport->d_id.b.al_pa,
@@ -1195,7 +1195,7 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
1195 break; 1195 break;
1196 } 1196 }
1197 1197
1198 ql_dbg(ql_dbg_async, vha, 0x5037, 1198 ql_dbg(ql_dbg_async, fcport->vha, 0x5037,
1199 "Async-%s failed - hdl=%x portid=%02x%02x%02x comp=%x " 1199 "Async-%s failed - hdl=%x portid=%02x%02x%02x comp=%x "
1200 "iop0=%x iop1=%x.\n", type, sp->handle, fcport->d_id.b.domain, 1200 "iop0=%x iop1=%x.\n", type, sp->handle, fcport->d_id.b.domain,
1201 fcport->d_id.b.area, fcport->d_id.b.al_pa, 1201 fcport->d_id.b.area, fcport->d_id.b.al_pa,
@@ -1228,24 +1228,24 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *vha, struct req_que *req,
1228 fcport = sp->fcport; 1228 fcport = sp->fcport;
1229 1229
1230 if (sts->entry_status) { 1230 if (sts->entry_status) {
1231 ql_log(ql_log_warn, vha, 0x5038, 1231 ql_log(ql_log_warn, fcport->vha, 0x5038,
1232 "Async-%s error - hdl=%x entry-status(%x).\n", 1232 "Async-%s error - hdl=%x entry-status(%x).\n",
1233 type, sp->handle, sts->entry_status); 1233 type, sp->handle, sts->entry_status);
1234 } else if (sts->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { 1234 } else if (sts->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) {
1235 ql_log(ql_log_warn, vha, 0x5039, 1235 ql_log(ql_log_warn, fcport->vha, 0x5039,
1236 "Async-%s error - hdl=%x completion status(%x).\n", 1236 "Async-%s error - hdl=%x completion status(%x).\n",
1237 type, sp->handle, sts->comp_status); 1237 type, sp->handle, sts->comp_status);
1238 } else if (!(le16_to_cpu(sts->scsi_status) & 1238 } else if (!(le16_to_cpu(sts->scsi_status) &
1239 SS_RESPONSE_INFO_LEN_VALID)) { 1239 SS_RESPONSE_INFO_LEN_VALID)) {
1240 ql_log(ql_log_warn, vha, 0x503a, 1240 ql_log(ql_log_warn, fcport->vha, 0x503a,
1241 "Async-%s error - hdl=%x no response info(%x).\n", 1241 "Async-%s error - hdl=%x no response info(%x).\n",
1242 type, sp->handle, sts->scsi_status); 1242 type, sp->handle, sts->scsi_status);
1243 } else if (le32_to_cpu(sts->rsp_data_len) < 4) { 1243 } else if (le32_to_cpu(sts->rsp_data_len) < 4) {
1244 ql_log(ql_log_warn, vha, 0x503b, 1244 ql_log(ql_log_warn, fcport->vha, 0x503b,
1245 "Async-%s error - hdl=%x not enough response(%d).\n", 1245 "Async-%s error - hdl=%x not enough response(%d).\n",
1246 type, sp->handle, sts->rsp_data_len); 1246 type, sp->handle, sts->rsp_data_len);
1247 } else if (sts->data[3]) { 1247 } else if (sts->data[3]) {
1248 ql_log(ql_log_warn, vha, 0x503c, 1248 ql_log(ql_log_warn, fcport->vha, 0x503c,
1249 "Async-%s error - hdl=%x response(%x).\n", 1249 "Async-%s error - hdl=%x response(%x).\n",
1250 type, sp->handle, sts->data[3]); 1250 type, sp->handle, sts->data[3]);
1251 } else { 1251 } else {
@@ -1630,7 +1630,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1630 par_sense_len -= rsp_info_len; 1630 par_sense_len -= rsp_info_len;
1631 } 1631 }
1632 if (rsp_info_len > 3 && rsp_info[3]) { 1632 if (rsp_info_len > 3 && rsp_info[3]) {
1633 ql_dbg(ql_dbg_io, vha, 0x3019, 1633 ql_dbg(ql_dbg_io, fcport->vha, 0x3019,
1634 "FCP I/O protocol failure (0x%x/0x%x).\n", 1634 "FCP I/O protocol failure (0x%x/0x%x).\n",
1635 rsp_info_len, rsp_info[3]); 1635 rsp_info_len, rsp_info[3]);
1636 1636
@@ -1661,7 +1661,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1661 if (!lscsi_status && 1661 if (!lscsi_status &&
1662 ((unsigned)(scsi_bufflen(cp) - resid) < 1662 ((unsigned)(scsi_bufflen(cp) - resid) <
1663 cp->underflow)) { 1663 cp->underflow)) {
1664 ql_dbg(ql_dbg_io, vha, 0x301a, 1664 ql_dbg(ql_dbg_io, fcport->vha, 0x301a,
1665 "Mid-layer underflow " 1665 "Mid-layer underflow "
1666 "detected (0x%x of 0x%x bytes).\n", 1666 "detected (0x%x of 0x%x bytes).\n",
1667 resid, scsi_bufflen(cp)); 1667 resid, scsi_bufflen(cp));
@@ -1673,7 +1673,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1673 res = DID_OK << 16 | lscsi_status; 1673 res = DID_OK << 16 | lscsi_status;
1674 1674
1675 if (lscsi_status == SAM_STAT_TASK_SET_FULL) { 1675 if (lscsi_status == SAM_STAT_TASK_SET_FULL) {
1676 ql_dbg(ql_dbg_io, vha, 0x301b, 1676 ql_dbg(ql_dbg_io, fcport->vha, 0x301b,
1677 "QUEUE FULL detected.\n"); 1677 "QUEUE FULL detected.\n");
1678 break; 1678 break;
1679 } 1679 }
@@ -1695,7 +1695,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1695 scsi_set_resid(cp, resid); 1695 scsi_set_resid(cp, resid);
1696 if (scsi_status & SS_RESIDUAL_UNDER) { 1696 if (scsi_status & SS_RESIDUAL_UNDER) {
1697 if (IS_FWI2_CAPABLE(ha) && fw_resid_len != resid_len) { 1697 if (IS_FWI2_CAPABLE(ha) && fw_resid_len != resid_len) {
1698 ql_dbg(ql_dbg_io, vha, 0x301d, 1698 ql_dbg(ql_dbg_io, fcport->vha, 0x301d,
1699 "Dropped frame(s) detected " 1699 "Dropped frame(s) detected "
1700 "(0x%x of 0x%x bytes).\n", 1700 "(0x%x of 0x%x bytes).\n",
1701 resid, scsi_bufflen(cp)); 1701 resid, scsi_bufflen(cp));
@@ -1707,7 +1707,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1707 if (!lscsi_status && 1707 if (!lscsi_status &&
1708 ((unsigned)(scsi_bufflen(cp) - resid) < 1708 ((unsigned)(scsi_bufflen(cp) - resid) <
1709 cp->underflow)) { 1709 cp->underflow)) {
1710 ql_dbg(ql_dbg_io, vha, 0x301e, 1710 ql_dbg(ql_dbg_io, fcport->vha, 0x301e,
1711 "Mid-layer underflow " 1711 "Mid-layer underflow "
1712 "detected (0x%x of 0x%x bytes).\n", 1712 "detected (0x%x of 0x%x bytes).\n",
1713 resid, scsi_bufflen(cp)); 1713 resid, scsi_bufflen(cp));
@@ -1716,7 +1716,7 @@ qla2x00_status_entry(scsi_qla_host_t *vha, struct rsp_que *rsp, void *pkt)
1716 break; 1716 break;
1717 } 1717 }
1718 } else { 1718 } else {
1719 ql_dbg(ql_dbg_io, vha, 0x301f, 1719 ql_dbg(ql_dbg_io, fcport->vha, 0x301f,
1720 "Dropped frame(s) detected (0x%x " 1720 "Dropped frame(s) detected (0x%x "
1721 "of 0x%x bytes).\n", resid, scsi_bufflen(cp)); 1721 "of 0x%x bytes).\n", resid, scsi_bufflen(cp));
1722 1722
@@ -1734,7 +1734,7 @@ check_scsi_status:
1734 */ 1734 */
1735 if (lscsi_status != 0) { 1735 if (lscsi_status != 0) {
1736 if (lscsi_status == SAM_STAT_TASK_SET_FULL) { 1736 if (lscsi_status == SAM_STAT_TASK_SET_FULL) {
1737 ql_dbg(ql_dbg_io, vha, 0x3020, 1737 ql_dbg(ql_dbg_io, fcport->vha, 0x3020,
1738 "QUEUE FULL detected.\n"); 1738 "QUEUE FULL detected.\n");
1739 logit = 1; 1739 logit = 1;
1740 break; 1740 break;
@@ -1774,7 +1774,7 @@ check_scsi_status:
1774 break; 1774 break;
1775 } 1775 }
1776 1776
1777 ql_dbg(ql_dbg_io, vha, 0x3021, 1777 ql_dbg(ql_dbg_io, fcport->vha, 0x3021,
1778 "Port down status: port-state=0x%x.\n", 1778 "Port down status: port-state=0x%x.\n",
1779 atomic_read(&fcport->state)); 1779 atomic_read(&fcport->state));
1780 1780
@@ -1796,7 +1796,7 @@ check_scsi_status:
1796 1796
1797out: 1797out:
1798 if (logit) 1798 if (logit)
1799 ql_dbg(ql_dbg_io, vha, 0x3022, 1799 ql_dbg(ql_dbg_io, fcport->vha, 0x3022,
1800 "FCP command status: 0x%x-0x%x (0x%x) " 1800 "FCP command status: 0x%x-0x%x (0x%x) "
1801 "nexus=%ld:%d:%d portid=%02x%02x%02x oxid=0x%x " 1801 "nexus=%ld:%d:%d portid=%02x%02x%02x oxid=0x%x "
1802 "cdb=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x len=0x%x " 1802 "cdb=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x len=0x%x "
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index bde3eb273b0d..957a4b88e482 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -46,17 +46,17 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
46 struct qla_hw_data *ha = vha->hw; 46 struct qla_hw_data *ha = vha->hw;
47 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev); 47 scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
48 48
49 ql_dbg(ql_dbg_mbx, base_vha, 0x1000, "Entered %s.\n", __func__); 49 ql_dbg(ql_dbg_mbx, vha, 0x1000, "Entered %s.\n", __func__);
50 50
51 if (ha->pdev->error_state > pci_channel_io_frozen) { 51 if (ha->pdev->error_state > pci_channel_io_frozen) {
52 ql_log(ql_log_warn, base_vha, 0x1001, 52 ql_log(ql_log_warn, vha, 0x1001,
53 "error_state is greater than pci_channel_io_frozen, " 53 "error_state is greater than pci_channel_io_frozen, "
54 "exiting.\n"); 54 "exiting.\n");
55 return QLA_FUNCTION_TIMEOUT; 55 return QLA_FUNCTION_TIMEOUT;
56 } 56 }
57 57
58 if (vha->device_flags & DFLG_DEV_FAILED) { 58 if (vha->device_flags & DFLG_DEV_FAILED) {
59 ql_log(ql_log_warn, base_vha, 0x1002, 59 ql_log(ql_log_warn, vha, 0x1002,
60 "Device in failed state, exiting.\n"); 60 "Device in failed state, exiting.\n");
61 return QLA_FUNCTION_TIMEOUT; 61 return QLA_FUNCTION_TIMEOUT;
62 } 62 }
@@ -69,7 +69,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
69 69
70 70
71 if (ha->flags.pci_channel_io_perm_failure) { 71 if (ha->flags.pci_channel_io_perm_failure) {
72 ql_log(ql_log_warn, base_vha, 0x1003, 72 ql_log(ql_log_warn, vha, 0x1003,
73 "Perm failure on EEH timeout MBX, exiting.\n"); 73 "Perm failure on EEH timeout MBX, exiting.\n");
74 return QLA_FUNCTION_TIMEOUT; 74 return QLA_FUNCTION_TIMEOUT;
75 } 75 }
@@ -77,7 +77,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
77 if (ha->flags.isp82xx_fw_hung) { 77 if (ha->flags.isp82xx_fw_hung) {
78 /* Setting Link-Down error */ 78 /* Setting Link-Down error */
79 mcp->mb[0] = MBS_LINK_DOWN_ERROR; 79 mcp->mb[0] = MBS_LINK_DOWN_ERROR;
80 ql_log(ql_log_warn, base_vha, 0x1004, 80 ql_log(ql_log_warn, vha, 0x1004,
81 "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); 81 "FW hung = %d.\n", ha->flags.isp82xx_fw_hung);
82 return QLA_FUNCTION_TIMEOUT; 82 return QLA_FUNCTION_TIMEOUT;
83 } 83 }
@@ -89,7 +89,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
89 */ 89 */
90 if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { 90 if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) {
91 /* Timeout occurred. Return error. */ 91 /* Timeout occurred. Return error. */
92 ql_log(ql_log_warn, base_vha, 0x1005, 92 ql_log(ql_log_warn, vha, 0x1005,
93 "Cmd access timeout, cmd=0x%x, Exiting.\n", 93 "Cmd access timeout, cmd=0x%x, Exiting.\n",
94 mcp->mb[0]); 94 mcp->mb[0]);
95 return QLA_FUNCTION_TIMEOUT; 95 return QLA_FUNCTION_TIMEOUT;
@@ -99,7 +99,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
99 /* Save mailbox command for debug */ 99 /* Save mailbox command for debug */
100 ha->mcp = mcp; 100 ha->mcp = mcp;
101 101
102 ql_dbg(ql_dbg_mbx, base_vha, 0x1006, 102 ql_dbg(ql_dbg_mbx, vha, 0x1006,
103 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); 103 "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]);
104 104
105 spin_lock_irqsave(&ha->hardware_lock, flags); 105 spin_lock_irqsave(&ha->hardware_lock, flags);
@@ -128,28 +128,28 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
128 iptr++; 128 iptr++;
129 } 129 }
130 130
131 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1111, 131 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1111,
132 "Loaded MBX registers (displayed in bytes) =.\n"); 132 "Loaded MBX registers (displayed in bytes) =.\n");
133 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1112, 133 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1112,
134 (uint8_t *)mcp->mb, 16); 134 (uint8_t *)mcp->mb, 16);
135 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1113, 135 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1113,
136 ".\n"); 136 ".\n");
137 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1114, 137 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1114,
138 ((uint8_t *)mcp->mb + 0x10), 16); 138 ((uint8_t *)mcp->mb + 0x10), 16);
139 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1115, 139 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1115,
140 ".\n"); 140 ".\n");
141 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1116, 141 ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1116,
142 ((uint8_t *)mcp->mb + 0x20), 8); 142 ((uint8_t *)mcp->mb + 0x20), 8);
143 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1117, 143 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1117,
144 "I/O Address = %p.\n", optr); 144 "I/O Address = %p.\n", optr);
145 ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x100e); 145 ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, vha, 0x100e);
146 146
147 /* Issue set host interrupt command to send cmd out. */ 147 /* Issue set host interrupt command to send cmd out. */
148 ha->flags.mbox_int = 0; 148 ha->flags.mbox_int = 0;
149 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); 149 clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags);
150 150
151 /* Unlock mbx registers and wait for interrupt */ 151 /* Unlock mbx registers and wait for interrupt */
152 ql_dbg(ql_dbg_mbx, base_vha, 0x100f, 152 ql_dbg(ql_dbg_mbx, vha, 0x100f,
153 "Going to unlock irq & waiting for interrupts. " 153 "Going to unlock irq & waiting for interrupts. "
154 "jiffies=%lx.\n", jiffies); 154 "jiffies=%lx.\n", jiffies);
155 155
@@ -164,7 +164,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
164 spin_unlock_irqrestore(&ha->hardware_lock, 164 spin_unlock_irqrestore(&ha->hardware_lock,
165 flags); 165 flags);
166 ha->flags.mbox_busy = 0; 166 ha->flags.mbox_busy = 0;
167 ql_dbg(ql_dbg_mbx, base_vha, 0x1010, 167 ql_dbg(ql_dbg_mbx, vha, 0x1010,
168 "Pending mailbox timeout, exiting.\n"); 168 "Pending mailbox timeout, exiting.\n");
169 rval = QLA_FUNCTION_TIMEOUT; 169 rval = QLA_FUNCTION_TIMEOUT;
170 goto premature_exit; 170 goto premature_exit;
@@ -181,7 +181,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
181 clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); 181 clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags);
182 182
183 } else { 183 } else {
184 ql_dbg(ql_dbg_mbx, base_vha, 0x1011, 184 ql_dbg(ql_dbg_mbx, vha, 0x1011,
185 "Cmd=%x Polling Mode.\n", command); 185 "Cmd=%x Polling Mode.\n", command);
186 186
187 if (IS_QLA82XX(ha)) { 187 if (IS_QLA82XX(ha)) {
@@ -190,7 +190,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
190 spin_unlock_irqrestore(&ha->hardware_lock, 190 spin_unlock_irqrestore(&ha->hardware_lock,
191 flags); 191 flags);
192 ha->flags.mbox_busy = 0; 192 ha->flags.mbox_busy = 0;
193 ql_dbg(ql_dbg_mbx, base_vha, 0x1012, 193 ql_dbg(ql_dbg_mbx, vha, 0x1012,
194 "Pending mailbox timeout, exiting.\n"); 194 "Pending mailbox timeout, exiting.\n");
195 rval = QLA_FUNCTION_TIMEOUT; 195 rval = QLA_FUNCTION_TIMEOUT;
196 goto premature_exit; 196 goto premature_exit;
@@ -215,7 +215,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
215 command == MBC_LOAD_RISC_RAM_EXTENDED)) 215 command == MBC_LOAD_RISC_RAM_EXTENDED))
216 msleep(10); 216 msleep(10);
217 } /* while */ 217 } /* while */
218 ql_dbg(ql_dbg_mbx, base_vha, 0x1013, 218 ql_dbg(ql_dbg_mbx, vha, 0x1013,
219 "Waited %d sec.\n", 219 "Waited %d sec.\n",
220 (uint)((jiffies - (wait_time - (mcp->tov * HZ)))/HZ)); 220 (uint)((jiffies - (wait_time - (mcp->tov * HZ)))/HZ));
221 } 221 }
@@ -224,7 +224,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
224 if (ha->flags.mbox_int) { 224 if (ha->flags.mbox_int) {
225 uint16_t *iptr2; 225 uint16_t *iptr2;
226 226
227 ql_dbg(ql_dbg_mbx, base_vha, 0x1014, 227 ql_dbg(ql_dbg_mbx, vha, 0x1014,
228 "Cmd=%x completed.\n", command); 228 "Cmd=%x completed.\n", command);
229 229
230 /* Got interrupt. Clear the flag. */ 230 /* Got interrupt. Clear the flag. */
@@ -237,7 +237,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
237 mcp->mb[0] = MBS_LINK_DOWN_ERROR; 237 mcp->mb[0] = MBS_LINK_DOWN_ERROR;
238 ha->mcp = NULL; 238 ha->mcp = NULL;
239 rval = QLA_FUNCTION_FAILED; 239 rval = QLA_FUNCTION_FAILED;
240 ql_log(ql_log_warn, base_vha, 0x1015, 240 ql_log(ql_log_warn, vha, 0x1015,
241 "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); 241 "FW hung = %d.\n", ha->flags.isp82xx_fw_hung);
242 goto premature_exit; 242 goto premature_exit;
243 } 243 }
@@ -269,13 +269,13 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
269 mb0 = RD_MAILBOX_REG(ha, &reg->isp, 0); 269 mb0 = RD_MAILBOX_REG(ha, &reg->isp, 0);
270 ictrl = RD_REG_WORD(&reg->isp.ictrl); 270 ictrl = RD_REG_WORD(&reg->isp.ictrl);
271 } 271 }
272 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1119, 272 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1119,
273 "MBX Command timeout for cmd %x.\n", command); 273 "MBX Command timeout for cmd %x.\n", command);
274 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x111a, 274 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x111a,
275 "iocontrol=%x jiffies=%lx.\n", ictrl, jiffies); 275 "iocontrol=%x jiffies=%lx.\n", ictrl, jiffies);
276 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x111b, 276 ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x111b,
277 "mb[0] = 0x%x.\n", mb0); 277 "mb[0] = 0x%x.\n", mb0);
278 ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1019); 278 ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1019);
279 279
280 rval = QLA_FUNCTION_TIMEOUT; 280 rval = QLA_FUNCTION_TIMEOUT;
281 } 281 }
@@ -286,7 +286,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
286 ha->mcp = NULL; 286 ha->mcp = NULL;
287 287
288 if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) { 288 if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) {
289 ql_dbg(ql_dbg_mbx, base_vha, 0x101a, 289 ql_dbg(ql_dbg_mbx, vha, 0x101a,
290 "Checking for additional resp interrupt.\n"); 290 "Checking for additional resp interrupt.\n");
291 291
292 /* polling mode for non isp_abort commands. */ 292 /* polling mode for non isp_abort commands. */
@@ -298,7 +298,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
298 if (!io_lock_on || (mcp->flags & IOCTL_CMD) || 298 if (!io_lock_on || (mcp->flags & IOCTL_CMD) ||
299 ha->flags.eeh_busy) { 299 ha->flags.eeh_busy) {
300 /* not in dpc. schedule it for dpc to take over. */ 300 /* not in dpc. schedule it for dpc to take over. */
301 ql_dbg(ql_dbg_mbx, base_vha, 0x101b, 301 ql_dbg(ql_dbg_mbx, vha, 0x101b,
302 "Timeout, schedule isp_abort_needed.\n"); 302 "Timeout, schedule isp_abort_needed.\n");
303 303
304 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && 304 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) &&
@@ -323,7 +323,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
323 } 323 }
324 } else if (!abort_active) { 324 } else if (!abort_active) {
325 /* call abort directly since we are in the DPC thread */ 325 /* call abort directly since we are in the DPC thread */
326 ql_dbg(ql_dbg_mbx, base_vha, 0x101d, 326 ql_dbg(ql_dbg_mbx, vha, 0x101d,
327 "Timeout, calling abort_isp.\n"); 327 "Timeout, calling abort_isp.\n");
328 328
329 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && 329 if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) &&
@@ -352,7 +352,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
352 &vha->dpc_flags); 352 &vha->dpc_flags);
353 } 353 }
354 clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); 354 clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags);
355 ql_dbg(ql_dbg_mbx, base_vha, 0x101f, 355 ql_dbg(ql_dbg_mbx, vha, 0x101f,
356 "Finished abort_isp.\n"); 356 "Finished abort_isp.\n");
357 goto mbx_done; 357 goto mbx_done;
358 } 358 }