diff options
author | Saurav Kashyap <saurav.kashyap@qlogic.com> | 2011-07-14 15:00:13 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-07-27 06:16:17 -0400 |
commit | 7c3df1320e5e875478775e78d01a09aee96b8abe (patch) | |
tree | 215326b999b3db03f4a2268a79c3848803daaf7d /drivers/scsi/qla2xxx/qla_mbx.c | |
parent | 3ce8866ceae87258cf66d1f7fd72abc918753cec (diff) |
[SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.
The code is changed to support the new dynamic logging infrastructure.
Following are the levels added.
Default is 0 - no logging. 0x40000000 - Module Init & Probe.
0x20000000 - Mailbox Cmnds. 0x10000000 - Device Discovery.
0x08000000 - IO tracing. 0x04000000 - DPC Thread.
0x02000000 - Async events. 0x01000000 - Timer routines.
0x00800000 - User space. 0x00400000 - Task Management.
0x00200000 - AER/EEH. 0x00100000 - Multi Q.
0x00080000 - P3P Specific. 0x00040000 - Virtual Port.
0x00020000 - Buffer Dump. 0x00010000 - Misc.
0x7fffffff - For enabling all logs, can be too many logs.
Setting ql2xextended_error_logging module parameter to any of the above
value, will enable the debug for that particular level.
Do LOGICAL OR of the value to enable more than one level.
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 1091 |
1 files changed, 517 insertions, 574 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index c26f0acdfecc..f7604ea1af83 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -46,14 +46,18 @@ 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 | if (ha->pdev->error_state > pci_channel_io_frozen) | 49 | ql_dbg(ql_dbg_mbx, base_vha, 0x1000, "Entered %s.\n", __func__); |
50 | |||
51 | if (ha->pdev->error_state > pci_channel_io_frozen) { | ||
52 | ql_log(ql_log_warn, base_vha, 0x1001, | ||
53 | "error_state is greater than pci_channel_io_frozen, " | ||
54 | "exiting.\n"); | ||
50 | return QLA_FUNCTION_TIMEOUT; | 55 | return QLA_FUNCTION_TIMEOUT; |
56 | } | ||
51 | 57 | ||
52 | if (vha->device_flags & DFLG_DEV_FAILED) { | 58 | if (vha->device_flags & DFLG_DEV_FAILED) { |
53 | DEBUG2_3_11(qla_printk(KERN_WARNING, ha, | 59 | ql_log(ql_log_warn, base_vha, 0x1002, |
54 | "%s(%ld): Device in failed state, " | 60 | "Device in failed state, exiting.\n"); |
55 | "timeout MBX Exiting.\n", | ||
56 | __func__, base_vha->host_no)); | ||
57 | return QLA_FUNCTION_TIMEOUT; | 61 | return QLA_FUNCTION_TIMEOUT; |
58 | } | 62 | } |
59 | 63 | ||
@@ -63,17 +67,18 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
63 | rval = QLA_SUCCESS; | 67 | rval = QLA_SUCCESS; |
64 | abort_active = test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); | 68 | abort_active = test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags); |
65 | 69 | ||
66 | DEBUG11(printk("%s(%ld): entered.\n", __func__, base_vha->host_no)); | ||
67 | 70 | ||
68 | if (ha->flags.pci_channel_io_perm_failure) { | 71 | if (ha->flags.pci_channel_io_perm_failure) { |
69 | DEBUG(printk("%s(%ld): Perm failure on EEH, timeout MBX " | 72 | ql_log(ql_log_warn, base_vha, 0x1003, |
70 | "Exiting.\n", __func__, vha->host_no)); | 73 | "Perm failure on EEH timeout MBX, exiting.\n"); |
71 | return QLA_FUNCTION_TIMEOUT; | 74 | return QLA_FUNCTION_TIMEOUT; |
72 | } | 75 | } |
73 | 76 | ||
74 | if (ha->flags.isp82xx_fw_hung) { | 77 | if (ha->flags.isp82xx_fw_hung) { |
75 | /* Setting Link-Down error */ | 78 | /* Setting Link-Down error */ |
76 | mcp->mb[0] = MBS_LINK_DOWN_ERROR; | 79 | mcp->mb[0] = MBS_LINK_DOWN_ERROR; |
80 | ql_log(ql_log_warn, base_vha, 0x1004, | ||
81 | "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); | ||
77 | rval = QLA_FUNCTION_FAILED; | 82 | rval = QLA_FUNCTION_FAILED; |
78 | goto premature_exit; | 83 | goto premature_exit; |
79 | } | 84 | } |
@@ -85,8 +90,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
85 | */ | 90 | */ |
86 | if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { | 91 | if (!wait_for_completion_timeout(&ha->mbx_cmd_comp, mcp->tov * HZ)) { |
87 | /* Timeout occurred. Return error. */ | 92 | /* Timeout occurred. Return error. */ |
88 | DEBUG2_3_11(printk("%s(%ld): cmd access timeout. " | 93 | ql_log(ql_log_warn, base_vha, 0x1005, |
89 | "Exiting.\n", __func__, base_vha->host_no)); | 94 | "Cmd access timeout, Exiting.\n"); |
90 | return QLA_FUNCTION_TIMEOUT; | 95 | return QLA_FUNCTION_TIMEOUT; |
91 | } | 96 | } |
92 | 97 | ||
@@ -94,8 +99,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
94 | /* Save mailbox command for debug */ | 99 | /* Save mailbox command for debug */ |
95 | ha->mcp = mcp; | 100 | ha->mcp = mcp; |
96 | 101 | ||
97 | DEBUG11(printk("scsi(%ld): prepare to issue mbox cmd=0x%x.\n", | 102 | ql_dbg(ql_dbg_mbx, base_vha, 0x1006, |
98 | base_vha->host_no, mcp->mb[0])); | 103 | "Prepare to issue mbox cmd=0x%x.\n", mcp->mb[0]); |
99 | 104 | ||
100 | spin_lock_irqsave(&ha->hardware_lock, flags); | 105 | spin_lock_irqsave(&ha->hardware_lock, flags); |
101 | 106 | ||
@@ -123,27 +128,30 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
123 | iptr++; | 128 | iptr++; |
124 | } | 129 | } |
125 | 130 | ||
126 | #if defined(QL_DEBUG_LEVEL_1) | 131 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1111, |
127 | printk("%s(%ld): Loaded MBX registers (displayed in bytes) = \n", | 132 | "Loaded MBX registers (displayed in bytes) =.\n"); |
128 | __func__, base_vha->host_no); | 133 | ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1112, |
129 | qla2x00_dump_buffer((uint8_t *)mcp->mb, 16); | 134 | (uint8_t *)mcp->mb, 16); |
130 | printk("\n"); | 135 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1113, |
131 | qla2x00_dump_buffer(((uint8_t *)mcp->mb + 0x10), 16); | 136 | ".\n"); |
132 | printk("\n"); | 137 | ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1114, |
133 | qla2x00_dump_buffer(((uint8_t *)mcp->mb + 0x20), 8); | 138 | ((uint8_t *)mcp->mb + 0x10), 16); |
134 | printk("\n"); | 139 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1115, |
135 | printk("%s(%ld): I/O address = %p.\n", __func__, base_vha->host_no, | 140 | ".\n"); |
136 | optr); | 141 | ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1116, |
137 | qla2x00_dump_regs(base_vha); | 142 | ((uint8_t *)mcp->mb + 0x20), 8); |
138 | #endif | 143 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1117, |
144 | "I/O Address = %p.\n", optr); | ||
145 | ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x100e); | ||
139 | 146 | ||
140 | /* Issue set host interrupt command to send cmd out. */ | 147 | /* Issue set host interrupt command to send cmd out. */ |
141 | ha->flags.mbox_int = 0; | 148 | ha->flags.mbox_int = 0; |
142 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); | 149 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); |
143 | 150 | ||
144 | /* Unlock mbx registers and wait for interrupt */ | 151 | /* Unlock mbx registers and wait for interrupt */ |
145 | DEBUG11(printk("%s(%ld): going to unlock irq & waiting for interrupt. " | 152 | ql_dbg(ql_dbg_mbx, base_vha, 0x100f, |
146 | "jiffies=%lx.\n", __func__, base_vha->host_no, jiffies)); | 153 | "Going to unlock irq & waiting for interrupts. " |
154 | "jiffies=%lx.\n", jiffies); | ||
147 | 155 | ||
148 | /* Wait for mbx cmd completion until timeout */ | 156 | /* Wait for mbx cmd completion until timeout */ |
149 | 157 | ||
@@ -155,9 +163,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
155 | HINT_MBX_INT_PENDING) { | 163 | HINT_MBX_INT_PENDING) { |
156 | spin_unlock_irqrestore(&ha->hardware_lock, | 164 | spin_unlock_irqrestore(&ha->hardware_lock, |
157 | flags); | 165 | flags); |
158 | DEBUG2_3_11(printk(KERN_INFO | 166 | ql_dbg(ql_dbg_mbx, base_vha, 0x1010, |
159 | "%s(%ld): Pending Mailbox timeout. " | 167 | "Pending mailbox timeout, exiting.\n"); |
160 | "Exiting.\n", __func__, base_vha->host_no)); | ||
161 | rval = QLA_FUNCTION_TIMEOUT; | 168 | rval = QLA_FUNCTION_TIMEOUT; |
162 | goto premature_exit; | 169 | goto premature_exit; |
163 | } | 170 | } |
@@ -173,17 +180,16 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
173 | clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); | 180 | clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); |
174 | 181 | ||
175 | } else { | 182 | } else { |
176 | DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__, | 183 | ql_dbg(ql_dbg_mbx, base_vha, 0x1011, |
177 | base_vha->host_no, command)); | 184 | "Cmd=%x Polling Mode.\n", command); |
178 | 185 | ||
179 | if (IS_QLA82XX(ha)) { | 186 | if (IS_QLA82XX(ha)) { |
180 | if (RD_REG_DWORD(®->isp82.hint) & | 187 | if (RD_REG_DWORD(®->isp82.hint) & |
181 | HINT_MBX_INT_PENDING) { | 188 | HINT_MBX_INT_PENDING) { |
182 | spin_unlock_irqrestore(&ha->hardware_lock, | 189 | spin_unlock_irqrestore(&ha->hardware_lock, |
183 | flags); | 190 | flags); |
184 | DEBUG2_3_11(printk(KERN_INFO | 191 | ql_dbg(ql_dbg_mbx, base_vha, 0x1012, |
185 | "%s(%ld): Pending Mailbox timeout. " | 192 | "Pending mailbox timeout, exiting.\n"); |
186 | "Exiting.\n", __func__, base_vha->host_no)); | ||
187 | rval = QLA_FUNCTION_TIMEOUT; | 193 | rval = QLA_FUNCTION_TIMEOUT; |
188 | goto premature_exit; | 194 | goto premature_exit; |
189 | } | 195 | } |
@@ -207,17 +213,17 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
207 | command == MBC_LOAD_RISC_RAM_EXTENDED)) | 213 | command == MBC_LOAD_RISC_RAM_EXTENDED)) |
208 | msleep(10); | 214 | msleep(10); |
209 | } /* while */ | 215 | } /* while */ |
210 | DEBUG17(qla_printk(KERN_WARNING, ha, | 216 | ql_dbg(ql_dbg_mbx, base_vha, 0x1013, |
211 | "Waited %d sec\n", | 217 | "Waited %d sec.\n", |
212 | (uint)((jiffies - (wait_time - (mcp->tov * HZ)))/HZ))); | 218 | (uint)((jiffies - (wait_time - (mcp->tov * HZ)))/HZ)); |
213 | } | 219 | } |
214 | 220 | ||
215 | /* Check whether we timed out */ | 221 | /* Check whether we timed out */ |
216 | if (ha->flags.mbox_int) { | 222 | if (ha->flags.mbox_int) { |
217 | uint16_t *iptr2; | 223 | uint16_t *iptr2; |
218 | 224 | ||
219 | DEBUG3_11(printk("%s(%ld): cmd %x completed.\n", __func__, | 225 | ql_dbg(ql_dbg_mbx, base_vha, 0x1014, |
220 | base_vha->host_no, command)); | 226 | "Cmd=%x completed.\n", command); |
221 | 227 | ||
222 | /* Got interrupt. Clear the flag. */ | 228 | /* Got interrupt. Clear the flag. */ |
223 | ha->flags.mbox_int = 0; | 229 | ha->flags.mbox_int = 0; |
@@ -229,6 +235,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
229 | mcp->mb[0] = MBS_LINK_DOWN_ERROR; | 235 | mcp->mb[0] = MBS_LINK_DOWN_ERROR; |
230 | ha->mcp = NULL; | 236 | ha->mcp = NULL; |
231 | rval = QLA_FUNCTION_FAILED; | 237 | rval = QLA_FUNCTION_FAILED; |
238 | ql_log(ql_log_warn, base_vha, 0x1015, | ||
239 | "FW hung = %d.\n", ha->flags.isp82xx_fw_hung); | ||
232 | goto premature_exit; | 240 | goto premature_exit; |
233 | } | 241 | } |
234 | 242 | ||
@@ -249,8 +257,6 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
249 | } | 257 | } |
250 | } else { | 258 | } else { |
251 | 259 | ||
252 | #if defined(QL_DEBUG_LEVEL_2) || defined(QL_DEBUG_LEVEL_3) || \ | ||
253 | defined(QL_DEBUG_LEVEL_11) | ||
254 | uint16_t mb0; | 260 | uint16_t mb0; |
255 | uint32_t ictrl; | 261 | uint32_t ictrl; |
256 | 262 | ||
@@ -261,14 +267,13 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
261 | mb0 = RD_MAILBOX_REG(ha, ®->isp, 0); | 267 | mb0 = RD_MAILBOX_REG(ha, ®->isp, 0); |
262 | ictrl = RD_REG_WORD(®->isp.ictrl); | 268 | ictrl = RD_REG_WORD(®->isp.ictrl); |
263 | } | 269 | } |
264 | printk("%s(%ld): **** MB Command Timeout for cmd %x ****\n", | 270 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1119, |
265 | __func__, base_vha->host_no, command); | 271 | "MBX Command timeout for cmd %x.\n", command); |
266 | printk("%s(%ld): icontrol=%x jiffies=%lx\n", __func__, | 272 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x111a, |
267 | base_vha->host_no, ictrl, jiffies); | 273 | "iocontrol=%x jiffies=%lx.\n", ictrl, jiffies); |
268 | printk("%s(%ld): *** mailbox[0] = 0x%x ***\n", __func__, | 274 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x111b, |
269 | base_vha->host_no, mb0); | 275 | "mb[0] = 0x%x.\n", mb0); |
270 | qla2x00_dump_regs(base_vha); | 276 | ql_dump_regs(ql_dbg_mbx + ql_dbg_buffer, base_vha, 0x1019); |
271 | #endif | ||
272 | 277 | ||
273 | rval = QLA_FUNCTION_TIMEOUT; | 278 | rval = QLA_FUNCTION_TIMEOUT; |
274 | } | 279 | } |
@@ -279,8 +284,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
279 | ha->mcp = NULL; | 284 | ha->mcp = NULL; |
280 | 285 | ||
281 | if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) { | 286 | if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) { |
282 | DEBUG11(printk("%s(%ld): checking for additional resp " | 287 | ql_dbg(ql_dbg_mbx, base_vha, 0x101a, |
283 | "interrupt.\n", __func__, base_vha->host_no)); | 288 | "Checking for additional resp interrupt.\n"); |
284 | 289 | ||
285 | /* polling mode for non isp_abort commands. */ | 290 | /* polling mode for non isp_abort commands. */ |
286 | qla2x00_poll(ha->rsp_q_map[0]); | 291 | qla2x00_poll(ha->rsp_q_map[0]); |
@@ -291,38 +296,32 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
291 | if (!io_lock_on || (mcp->flags & IOCTL_CMD) || | 296 | if (!io_lock_on || (mcp->flags & IOCTL_CMD) || |
292 | ha->flags.eeh_busy) { | 297 | ha->flags.eeh_busy) { |
293 | /* not in dpc. schedule it for dpc to take over. */ | 298 | /* not in dpc. schedule it for dpc to take over. */ |
294 | DEBUG(printk("%s(%ld): timeout schedule " | 299 | ql_dbg(ql_dbg_mbx, base_vha, 0x101b, |
295 | "isp_abort_needed.\n", __func__, | 300 | "Timeout, schedule isp_abort_needed.\n"); |
296 | base_vha->host_no)); | ||
297 | DEBUG2_3_11(printk("%s(%ld): timeout schedule " | ||
298 | "isp_abort_needed.\n", __func__, | ||
299 | base_vha->host_no)); | ||
300 | 301 | ||
301 | if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && | 302 | if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && |
302 | !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && | 303 | !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && |
303 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | 304 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { |
304 | 305 | ||
305 | qla_printk(KERN_WARNING, ha, | 306 | ql_log(ql_log_info, base_vha, 0x101c, |
306 | "Mailbox command timeout occurred. " | 307 | "Mailbox cmd timeout occured. " |
307 | "Scheduling ISP " "abort. eeh_busy: 0x%x\n", | 308 | "Scheduling ISP abort eeh_busy=0x%x.\n", |
308 | ha->flags.eeh_busy); | 309 | ha->flags.eeh_busy); |
309 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 310 | set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
310 | qla2xxx_wake_dpc(vha); | 311 | qla2xxx_wake_dpc(vha); |
311 | } | 312 | } |
312 | } else if (!abort_active) { | 313 | } else if (!abort_active) { |
313 | /* call abort directly since we are in the DPC thread */ | 314 | /* call abort directly since we are in the DPC thread */ |
314 | DEBUG(printk("%s(%ld): timeout calling abort_isp\n", | 315 | ql_dbg(ql_dbg_mbx, base_vha, 0x101d, |
315 | __func__, base_vha->host_no)); | 316 | "Timeout, calling abort_isp.\n"); |
316 | DEBUG2_3_11(printk("%s(%ld): timeout calling " | ||
317 | "abort_isp\n", __func__, base_vha->host_no)); | ||
318 | 317 | ||
319 | if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && | 318 | if (!test_bit(ISP_ABORT_NEEDED, &vha->dpc_flags) && |
320 | !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && | 319 | !test_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags) && |
321 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { | 320 | !test_bit(ISP_ABORT_RETRY, &vha->dpc_flags)) { |
322 | 321 | ||
323 | qla_printk(KERN_WARNING, ha, | 322 | ql_log(ql_log_info, base_vha, 0x101e, |
324 | "Mailbox command timeout occurred. " | 323 | "Mailbox cmd timeout occured. " |
325 | "Issuing ISP abort.\n"); | 324 | "Scheduling ISP abort.\n"); |
326 | 325 | ||
327 | set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | 326 | set_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); |
328 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); | 327 | clear_bit(ISP_ABORT_NEEDED, &vha->dpc_flags); |
@@ -332,11 +331,8 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) | |||
332 | &vha->dpc_flags); | 331 | &vha->dpc_flags); |
333 | } | 332 | } |
334 | clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); | 333 | clear_bit(ABORT_ISP_ACTIVE, &vha->dpc_flags); |
335 | DEBUG(printk("%s(%ld): finished abort_isp\n", | 334 | ql_dbg(ql_dbg_mbx, base_vha, 0x101f, |
336 | __func__, vha->host_no)); | 335 | "Finished abort_isp.\n"); |
337 | DEBUG2_3_11(printk( | ||
338 | "%s(%ld): finished abort_isp\n", | ||
339 | __func__, vha->host_no)); | ||
340 | } | 336 | } |
341 | } | 337 | } |
342 | } | 338 | } |
@@ -346,12 +342,11 @@ premature_exit: | |||
346 | complete(&ha->mbx_cmd_comp); | 342 | complete(&ha->mbx_cmd_comp); |
347 | 343 | ||
348 | if (rval) { | 344 | if (rval) { |
349 | DEBUG2_3_11(printk("%s(%ld): **** FAILED. mbx0=%x, mbx1=%x, " | 345 | ql_dbg(ql_dbg_mbx, base_vha, 0x1020, |
350 | "mbx2=%x, cmd=%x ****\n", __func__, base_vha->host_no, | 346 | "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, cmd=%x ****.\n", |
351 | mcp->mb[0], mcp->mb[1], mcp->mb[2], command)); | 347 | mcp->mb[0], mcp->mb[1], mcp->mb[2], command); |
352 | } else { | 348 | } else { |
353 | DEBUG11(printk("%s(%ld): done.\n", __func__, | 349 | ql_dbg(ql_dbg_mbx, base_vha, 0x1021, "Done %s.\n", __func__); |
354 | base_vha->host_no)); | ||
355 | } | 350 | } |
356 | 351 | ||
357 | return rval; | 352 | return rval; |
@@ -366,7 +361,7 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr, | |||
366 | mbx_cmd_t mc; | 361 | mbx_cmd_t mc; |
367 | mbx_cmd_t *mcp = &mc; | 362 | mbx_cmd_t *mcp = &mc; |
368 | 363 | ||
369 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 364 | ql_dbg(ql_dbg_mbx, vha, 0x1022, "Entered %s.\n", __func__); |
370 | 365 | ||
371 | if (MSW(risc_addr) || IS_FWI2_CAPABLE(ha)) { | 366 | if (MSW(risc_addr) || IS_FWI2_CAPABLE(ha)) { |
372 | mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; | 367 | mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; |
@@ -397,10 +392,10 @@ qla2x00_load_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t risc_addr, | |||
397 | rval = qla2x00_mailbox_command(vha, mcp); | 392 | rval = qla2x00_mailbox_command(vha, mcp); |
398 | 393 | ||
399 | if (rval != QLA_SUCCESS) { | 394 | if (rval != QLA_SUCCESS) { |
400 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 395 | ql_dbg(ql_dbg_mbx, vha, 0x1023, |
401 | vha->host_no, rval, mcp->mb[0])); | 396 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
402 | } else { | 397 | } else { |
403 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 398 | ql_dbg(ql_dbg_mbx, vha, 0x1024, "Done %s.\n", __func__); |
404 | } | 399 | } |
405 | 400 | ||
406 | return rval; | 401 | return rval; |
@@ -430,7 +425,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) | |||
430 | mbx_cmd_t mc; | 425 | mbx_cmd_t mc; |
431 | mbx_cmd_t *mcp = &mc; | 426 | mbx_cmd_t *mcp = &mc; |
432 | 427 | ||
433 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 428 | ql_dbg(ql_dbg_mbx, vha, 0x1025, "Entered %s.\n", __func__); |
434 | 429 | ||
435 | mcp->mb[0] = MBC_EXECUTE_FIRMWARE; | 430 | mcp->mb[0] = MBC_EXECUTE_FIRMWARE; |
436 | mcp->out_mb = MBX_0; | 431 | mcp->out_mb = MBX_0; |
@@ -461,15 +456,14 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) | |||
461 | rval = qla2x00_mailbox_command(vha, mcp); | 456 | rval = qla2x00_mailbox_command(vha, mcp); |
462 | 457 | ||
463 | if (rval != QLA_SUCCESS) { | 458 | if (rval != QLA_SUCCESS) { |
464 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 459 | ql_dbg(ql_dbg_mbx, vha, 0x1026, |
465 | vha->host_no, rval, mcp->mb[0])); | 460 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
466 | } else { | 461 | } else { |
467 | if (IS_FWI2_CAPABLE(ha)) { | 462 | if (IS_FWI2_CAPABLE(ha)) { |
468 | DEBUG11(printk("%s(%ld): done exchanges=%x.\n", | 463 | ql_dbg(ql_dbg_mbx, vha, 0x1027, |
469 | __func__, vha->host_no, mcp->mb[1])); | 464 | "Done exchanges=%x.\n", mcp->mb[1]); |
470 | } else { | 465 | } else { |
471 | DEBUG11(printk("%s(%ld): done.\n", __func__, | 466 | ql_dbg(ql_dbg_mbx, vha, 0x1028, "Done %s.\n", __func__); |
472 | vha->host_no)); | ||
473 | } | 467 | } |
474 | } | 468 | } |
475 | 469 | ||
@@ -501,7 +495,7 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor, | |||
501 | mbx_cmd_t mc; | 495 | mbx_cmd_t mc; |
502 | mbx_cmd_t *mcp = &mc; | 496 | mbx_cmd_t *mcp = &mc; |
503 | 497 | ||
504 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 498 | ql_dbg(ql_dbg_mbx, vha, 0x1029, "Entered %s.\n", __func__); |
505 | 499 | ||
506 | mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; | 500 | mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; |
507 | mcp->out_mb = MBX_0; | 501 | mcp->out_mb = MBX_0; |
@@ -535,11 +529,10 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor, | |||
535 | failed: | 529 | failed: |
536 | if (rval != QLA_SUCCESS) { | 530 | if (rval != QLA_SUCCESS) { |
537 | /*EMPTY*/ | 531 | /*EMPTY*/ |
538 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 532 | ql_dbg(ql_dbg_mbx, vha, 0x102a, "Failed=%x.\n", rval); |
539 | vha->host_no, rval)); | ||
540 | } else { | 533 | } else { |
541 | /*EMPTY*/ | 534 | /*EMPTY*/ |
542 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 535 | ql_dbg(ql_dbg_mbx, vha, 0x102b, "Done %s.\n", __func__); |
543 | } | 536 | } |
544 | return rval; | 537 | return rval; |
545 | } | 538 | } |
@@ -565,7 +558,7 @@ qla2x00_get_fw_options(scsi_qla_host_t *vha, uint16_t *fwopts) | |||
565 | mbx_cmd_t mc; | 558 | mbx_cmd_t mc; |
566 | mbx_cmd_t *mcp = &mc; | 559 | mbx_cmd_t *mcp = &mc; |
567 | 560 | ||
568 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 561 | ql_dbg(ql_dbg_mbx, vha, 0x102c, "Entered %s.\n", __func__); |
569 | 562 | ||
570 | mcp->mb[0] = MBC_GET_FIRMWARE_OPTION; | 563 | mcp->mb[0] = MBC_GET_FIRMWARE_OPTION; |
571 | mcp->out_mb = MBX_0; | 564 | mcp->out_mb = MBX_0; |
@@ -576,15 +569,14 @@ qla2x00_get_fw_options(scsi_qla_host_t *vha, uint16_t *fwopts) | |||
576 | 569 | ||
577 | if (rval != QLA_SUCCESS) { | 570 | if (rval != QLA_SUCCESS) { |
578 | /*EMPTY*/ | 571 | /*EMPTY*/ |
579 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 572 | ql_dbg(ql_dbg_mbx, vha, 0x102d, "Failed=%x.\n", rval); |
580 | vha->host_no, rval)); | ||
581 | } else { | 573 | } else { |
582 | fwopts[0] = mcp->mb[0]; | 574 | fwopts[0] = mcp->mb[0]; |
583 | fwopts[1] = mcp->mb[1]; | 575 | fwopts[1] = mcp->mb[1]; |
584 | fwopts[2] = mcp->mb[2]; | 576 | fwopts[2] = mcp->mb[2]; |
585 | fwopts[3] = mcp->mb[3]; | 577 | fwopts[3] = mcp->mb[3]; |
586 | 578 | ||
587 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 579 | ql_dbg(ql_dbg_mbx, vha, 0x102e, "Done %s.\n", __func__); |
588 | } | 580 | } |
589 | 581 | ||
590 | return rval; | 582 | return rval; |
@@ -612,7 +604,7 @@ qla2x00_set_fw_options(scsi_qla_host_t *vha, uint16_t *fwopts) | |||
612 | mbx_cmd_t mc; | 604 | mbx_cmd_t mc; |
613 | mbx_cmd_t *mcp = &mc; | 605 | mbx_cmd_t *mcp = &mc; |
614 | 606 | ||
615 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 607 | ql_dbg(ql_dbg_mbx, vha, 0x102f, "Entered %s.\n", __func__); |
616 | 608 | ||
617 | mcp->mb[0] = MBC_SET_FIRMWARE_OPTION; | 609 | mcp->mb[0] = MBC_SET_FIRMWARE_OPTION; |
618 | mcp->mb[1] = fwopts[1]; | 610 | mcp->mb[1] = fwopts[1]; |
@@ -636,11 +628,11 @@ qla2x00_set_fw_options(scsi_qla_host_t *vha, uint16_t *fwopts) | |||
636 | 628 | ||
637 | if (rval != QLA_SUCCESS) { | 629 | if (rval != QLA_SUCCESS) { |
638 | /*EMPTY*/ | 630 | /*EMPTY*/ |
639 | DEBUG2_3_11(printk("%s(%ld): failed=%x (%x/%x).\n", __func__, | 631 | ql_dbg(ql_dbg_mbx, vha, 0x1030, |
640 | vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 632 | "Failed=%x (%x/%x).\n", rval, mcp->mb[0], mcp->mb[1]); |
641 | } else { | 633 | } else { |
642 | /*EMPTY*/ | 634 | /*EMPTY*/ |
643 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 635 | ql_dbg(ql_dbg_mbx, vha, 0x1031, "Done %s.\n", __func__); |
644 | } | 636 | } |
645 | 637 | ||
646 | return rval; | 638 | return rval; |
@@ -668,7 +660,7 @@ qla2x00_mbx_reg_test(scsi_qla_host_t *vha) | |||
668 | mbx_cmd_t mc; | 660 | mbx_cmd_t mc; |
669 | mbx_cmd_t *mcp = &mc; | 661 | mbx_cmd_t *mcp = &mc; |
670 | 662 | ||
671 | DEBUG11(printk("qla2x00_mbx_reg_test(%ld): entered.\n", vha->host_no)); | 663 | ql_dbg(ql_dbg_mbx, vha, 0x1032, "Entered %s.\n", __func__); |
672 | 664 | ||
673 | mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; | 665 | mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; |
674 | mcp->mb[1] = 0xAAAA; | 666 | mcp->mb[1] = 0xAAAA; |
@@ -695,12 +687,10 @@ qla2x00_mbx_reg_test(scsi_qla_host_t *vha) | |||
695 | 687 | ||
696 | if (rval != QLA_SUCCESS) { | 688 | if (rval != QLA_SUCCESS) { |
697 | /*EMPTY*/ | 689 | /*EMPTY*/ |
698 | DEBUG2_3_11(printk("qla2x00_mbx_reg_test(%ld): failed=%x.\n", | 690 | ql_dbg(ql_dbg_mbx, vha, 0x1033, "Failed=%x.\n", rval); |
699 | vha->host_no, rval)); | ||
700 | } else { | 691 | } else { |
701 | /*EMPTY*/ | 692 | /*EMPTY*/ |
702 | DEBUG11(printk("qla2x00_mbx_reg_test(%ld): done.\n", | 693 | ql_dbg(ql_dbg_mbx, vha, 0x1034, "Done %s.\n", __func__); |
703 | vha->host_no)); | ||
704 | } | 694 | } |
705 | 695 | ||
706 | return rval; | 696 | return rval; |
@@ -728,7 +718,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *vha, uint32_t risc_addr) | |||
728 | mbx_cmd_t mc; | 718 | mbx_cmd_t mc; |
729 | mbx_cmd_t *mcp = &mc; | 719 | mbx_cmd_t *mcp = &mc; |
730 | 720 | ||
731 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 721 | ql_dbg(ql_dbg_mbx, vha, 0x1035, "Entered %s.\n", __func__); |
732 | 722 | ||
733 | mcp->mb[0] = MBC_VERIFY_CHECKSUM; | 723 | mcp->mb[0] = MBC_VERIFY_CHECKSUM; |
734 | mcp->out_mb = MBX_0; | 724 | mcp->out_mb = MBX_0; |
@@ -749,11 +739,11 @@ qla2x00_verify_checksum(scsi_qla_host_t *vha, uint32_t risc_addr) | |||
749 | rval = qla2x00_mailbox_command(vha, mcp); | 739 | rval = qla2x00_mailbox_command(vha, mcp); |
750 | 740 | ||
751 | if (rval != QLA_SUCCESS) { | 741 | if (rval != QLA_SUCCESS) { |
752 | DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__, | 742 | ql_dbg(ql_dbg_mbx, vha, 0x1036, |
753 | vha->host_no, rval, IS_FWI2_CAPABLE(vha->hw) ? | 743 | "Failed=%x chm sum=%x.\n", rval, IS_FWI2_CAPABLE(vha->hw) ? |
754 | (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1])); | 744 | (mcp->mb[2] << 16) | mcp->mb[1] : mcp->mb[1]); |
755 | } else { | 745 | } else { |
756 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 746 | ql_dbg(ql_dbg_mbx, vha, 0x1037, "Done %s.\n", __func__); |
757 | } | 747 | } |
758 | 748 | ||
759 | return rval; | 749 | return rval; |
@@ -785,6 +775,8 @@ qla2x00_issue_iocb_timeout(scsi_qla_host_t *vha, void *buffer, | |||
785 | mbx_cmd_t mc; | 775 | mbx_cmd_t mc; |
786 | mbx_cmd_t *mcp = &mc; | 776 | mbx_cmd_t *mcp = &mc; |
787 | 777 | ||
778 | ql_dbg(ql_dbg_mbx, vha, 0x1038, "Entered %s.\n", __func__); | ||
779 | |||
788 | mcp->mb[0] = MBC_IOCB_COMMAND_A64; | 780 | mcp->mb[0] = MBC_IOCB_COMMAND_A64; |
789 | mcp->mb[1] = 0; | 781 | mcp->mb[1] = 0; |
790 | mcp->mb[2] = MSW(phys_addr); | 782 | mcp->mb[2] = MSW(phys_addr); |
@@ -799,14 +791,14 @@ qla2x00_issue_iocb_timeout(scsi_qla_host_t *vha, void *buffer, | |||
799 | 791 | ||
800 | if (rval != QLA_SUCCESS) { | 792 | if (rval != QLA_SUCCESS) { |
801 | /*EMPTY*/ | 793 | /*EMPTY*/ |
802 | DEBUG(printk("qla2x00_issue_iocb(%ld): failed rval 0x%x\n", | 794 | ql_dbg(ql_dbg_mbx, vha, 0x1039, "Failed=%x.\n", rval); |
803 | vha->host_no, rval)); | ||
804 | } else { | 795 | } else { |
805 | sts_entry_t *sts_entry = (sts_entry_t *) buffer; | 796 | sts_entry_t *sts_entry = (sts_entry_t *) buffer; |
806 | 797 | ||
807 | /* Mask reserved bits. */ | 798 | /* Mask reserved bits. */ |
808 | sts_entry->entry_status &= | 799 | sts_entry->entry_status &= |
809 | IS_FWI2_CAPABLE(vha->hw) ? RF_MASK_24XX : RF_MASK; | 800 | IS_FWI2_CAPABLE(vha->hw) ? RF_MASK_24XX : RF_MASK; |
801 | ql_dbg(ql_dbg_mbx, vha, 0x103a, "Done %s.\n", __func__); | ||
810 | } | 802 | } |
811 | 803 | ||
812 | return rval; | 804 | return rval; |
@@ -847,7 +839,7 @@ qla2x00_abort_command(srb_t *sp) | |||
847 | struct qla_hw_data *ha = vha->hw; | 839 | struct qla_hw_data *ha = vha->hw; |
848 | struct req_que *req = vha->req; | 840 | struct req_que *req = vha->req; |
849 | 841 | ||
850 | DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", vha->host_no)); | 842 | ql_dbg(ql_dbg_mbx, vha, 0x103b, "Entered %s.\n", __func__); |
851 | 843 | ||
852 | spin_lock_irqsave(&ha->hardware_lock, flags); | 844 | spin_lock_irqsave(&ha->hardware_lock, flags); |
853 | for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { | 845 | for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { |
@@ -876,11 +868,9 @@ qla2x00_abort_command(srb_t *sp) | |||
876 | rval = qla2x00_mailbox_command(vha, mcp); | 868 | rval = qla2x00_mailbox_command(vha, mcp); |
877 | 869 | ||
878 | if (rval != QLA_SUCCESS) { | 870 | if (rval != QLA_SUCCESS) { |
879 | DEBUG2_3_11(printk("qla2x00_abort_command(%ld): failed=%x.\n", | 871 | ql_dbg(ql_dbg_mbx, vha, 0x103c, "Failed=%x.\n", rval); |
880 | vha->host_no, rval)); | ||
881 | } else { | 872 | } else { |
882 | DEBUG11(printk("qla2x00_abort_command(%ld): done.\n", | 873 | ql_dbg(ql_dbg_mbx, vha, 0x103d, "Done %s.\n", __func__); |
883 | vha->host_no)); | ||
884 | } | 874 | } |
885 | 875 | ||
886 | return rval; | 876 | return rval; |
@@ -896,10 +886,11 @@ qla2x00_abort_target(struct fc_port *fcport, unsigned int l, int tag) | |||
896 | struct req_que *req; | 886 | struct req_que *req; |
897 | struct rsp_que *rsp; | 887 | struct rsp_que *rsp; |
898 | 888 | ||
899 | DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->vha->host_no)); | ||
900 | |||
901 | l = l; | 889 | l = l; |
902 | vha = fcport->vha; | 890 | vha = fcport->vha; |
891 | |||
892 | ql_dbg(ql_dbg_mbx, vha, 0x103e, "Entered %s.\n", __func__); | ||
893 | |||
903 | req = vha->hw->req_q_map[0]; | 894 | req = vha->hw->req_q_map[0]; |
904 | rsp = req->rsp; | 895 | rsp = req->rsp; |
905 | mcp->mb[0] = MBC_ABORT_TARGET; | 896 | mcp->mb[0] = MBC_ABORT_TARGET; |
@@ -919,18 +910,17 @@ qla2x00_abort_target(struct fc_port *fcport, unsigned int l, int tag) | |||
919 | mcp->flags = 0; | 910 | mcp->flags = 0; |
920 | rval = qla2x00_mailbox_command(vha, mcp); | 911 | rval = qla2x00_mailbox_command(vha, mcp); |
921 | if (rval != QLA_SUCCESS) { | 912 | if (rval != QLA_SUCCESS) { |
922 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 913 | ql_dbg(ql_dbg_mbx, vha, 0x103f, "Failed=%x.\n", rval); |
923 | vha->host_no, rval)); | ||
924 | } | 914 | } |
925 | 915 | ||
926 | /* Issue marker IOCB. */ | 916 | /* Issue marker IOCB. */ |
927 | rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, 0, | 917 | rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, 0, |
928 | MK_SYNC_ID); | 918 | MK_SYNC_ID); |
929 | if (rval2 != QLA_SUCCESS) { | 919 | if (rval2 != QLA_SUCCESS) { |
930 | DEBUG2_3_11(printk("%s(%ld): failed to issue Marker IOCB " | 920 | ql_dbg(ql_dbg_mbx, vha, 0x1040, |
931 | "(%x).\n", __func__, vha->host_no, rval2)); | 921 | "Failed to issue marker IOCB (%x).\n", rval2); |
932 | } else { | 922 | } else { |
933 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 923 | ql_dbg(ql_dbg_mbx, vha, 0x1041, "Done %s.\n", __func__); |
934 | } | 924 | } |
935 | 925 | ||
936 | return rval; | 926 | return rval; |
@@ -946,9 +936,10 @@ qla2x00_lun_reset(struct fc_port *fcport, unsigned int l, int tag) | |||
946 | struct req_que *req; | 936 | struct req_que *req; |
947 | struct rsp_que *rsp; | 937 | struct rsp_que *rsp; |
948 | 938 | ||
949 | DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->vha->host_no)); | ||
950 | |||
951 | vha = fcport->vha; | 939 | vha = fcport->vha; |
940 | |||
941 | ql_dbg(ql_dbg_mbx, vha, 0x1042, "Entered %s.\n", __func__); | ||
942 | |||
952 | req = vha->hw->req_q_map[0]; | 943 | req = vha->hw->req_q_map[0]; |
953 | rsp = req->rsp; | 944 | rsp = req->rsp; |
954 | mcp->mb[0] = MBC_LUN_RESET; | 945 | mcp->mb[0] = MBC_LUN_RESET; |
@@ -966,18 +957,17 @@ qla2x00_lun_reset(struct fc_port *fcport, unsigned int l, int tag) | |||
966 | mcp->flags = 0; | 957 | mcp->flags = 0; |
967 | rval = qla2x00_mailbox_command(vha, mcp); | 958 | rval = qla2x00_mailbox_command(vha, mcp); |
968 | if (rval != QLA_SUCCESS) { | 959 | if (rval != QLA_SUCCESS) { |
969 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 960 | ql_dbg(ql_dbg_mbx, vha, 0x1043, "Failed=%x.\n", rval); |
970 | vha->host_no, rval)); | ||
971 | } | 961 | } |
972 | 962 | ||
973 | /* Issue marker IOCB. */ | 963 | /* Issue marker IOCB. */ |
974 | rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, l, | 964 | rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, l, |
975 | MK_SYNC_ID_LUN); | 965 | MK_SYNC_ID_LUN); |
976 | if (rval2 != QLA_SUCCESS) { | 966 | if (rval2 != QLA_SUCCESS) { |
977 | DEBUG2_3_11(printk("%s(%ld): failed to issue Marker IOCB " | 967 | ql_dbg(ql_dbg_mbx, vha, 0x1044, |
978 | "(%x).\n", __func__, vha->host_no, rval2)); | 968 | "Failed to issue marker IOCB (%x).\n", rval2); |
979 | } else { | 969 | } else { |
980 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 970 | ql_dbg(ql_dbg_mbx, vha, 0x1045, "Done %s.\n", __func__); |
981 | } | 971 | } |
982 | 972 | ||
983 | return rval; | 973 | return rval; |
@@ -1011,8 +1001,7 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa, | |||
1011 | mbx_cmd_t mc; | 1001 | mbx_cmd_t mc; |
1012 | mbx_cmd_t *mcp = &mc; | 1002 | mbx_cmd_t *mcp = &mc; |
1013 | 1003 | ||
1014 | DEBUG11(printk("qla2x00_get_adapter_id(%ld): entered.\n", | 1004 | ql_dbg(ql_dbg_mbx, vha, 0x1046, "Entered %s.\n", __func__); |
1015 | vha->host_no)); | ||
1016 | 1005 | ||
1017 | mcp->mb[0] = MBC_GET_ADAPTER_LOOP_ID; | 1006 | mcp->mb[0] = MBC_GET_ADAPTER_LOOP_ID; |
1018 | mcp->mb[9] = vha->vp_idx; | 1007 | mcp->mb[9] = vha->vp_idx; |
@@ -1038,11 +1027,9 @@ qla2x00_get_adapter_id(scsi_qla_host_t *vha, uint16_t *id, uint8_t *al_pa, | |||
1038 | 1027 | ||
1039 | if (rval != QLA_SUCCESS) { | 1028 | if (rval != QLA_SUCCESS) { |
1040 | /*EMPTY*/ | 1029 | /*EMPTY*/ |
1041 | DEBUG2_3_11(printk("qla2x00_get_adapter_id(%ld): failed=%x.\n", | 1030 | ql_dbg(ql_dbg_mbx, vha, 0x1047, "Failed=%x.\n", rval); |
1042 | vha->host_no, rval)); | ||
1043 | } else { | 1031 | } else { |
1044 | DEBUG11(printk("qla2x00_get_adapter_id(%ld): done.\n", | 1032 | ql_dbg(ql_dbg_mbx, vha, 0x1048, "Done %s.\n", __func__); |
1045 | vha->host_no)); | ||
1046 | 1033 | ||
1047 | if (IS_QLA8XXX_TYPE(vha->hw)) { | 1034 | if (IS_QLA8XXX_TYPE(vha->hw)) { |
1048 | vha->fcoe_vlan_id = mcp->mb[9] & 0xfff; | 1035 | vha->fcoe_vlan_id = mcp->mb[9] & 0xfff; |
@@ -1083,8 +1070,7 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *vha, uint8_t *retry_cnt, uint8_t *tov, | |||
1083 | mbx_cmd_t mc; | 1070 | mbx_cmd_t mc; |
1084 | mbx_cmd_t *mcp = &mc; | 1071 | mbx_cmd_t *mcp = &mc; |
1085 | 1072 | ||
1086 | DEBUG11(printk("qla2x00_get_retry_cnt(%ld): entered.\n", | 1073 | ql_dbg(ql_dbg_mbx, vha, 0x1049, "Entered %s.\n", __func__); |
1087 | vha->host_no)); | ||
1088 | 1074 | ||
1089 | mcp->mb[0] = MBC_GET_RETRY_COUNT; | 1075 | mcp->mb[0] = MBC_GET_RETRY_COUNT; |
1090 | mcp->out_mb = MBX_0; | 1076 | mcp->out_mb = MBX_0; |
@@ -1095,8 +1081,8 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *vha, uint8_t *retry_cnt, uint8_t *tov, | |||
1095 | 1081 | ||
1096 | if (rval != QLA_SUCCESS) { | 1082 | if (rval != QLA_SUCCESS) { |
1097 | /*EMPTY*/ | 1083 | /*EMPTY*/ |
1098 | DEBUG2_3_11(printk("qla2x00_get_retry_cnt(%ld): failed = %x.\n", | 1084 | ql_dbg(ql_dbg_mbx, vha, 0x104a, |
1099 | vha->host_no, mcp->mb[0])); | 1085 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
1100 | } else { | 1086 | } else { |
1101 | /* Convert returned data and check our values. */ | 1087 | /* Convert returned data and check our values. */ |
1102 | *r_a_tov = mcp->mb[3] / 2; | 1088 | *r_a_tov = mcp->mb[3] / 2; |
@@ -1107,8 +1093,8 @@ qla2x00_get_retry_cnt(scsi_qla_host_t *vha, uint8_t *retry_cnt, uint8_t *tov, | |||
1107 | *tov = ratov; | 1093 | *tov = ratov; |
1108 | } | 1094 | } |
1109 | 1095 | ||
1110 | DEBUG11(printk("qla2x00_get_retry_cnt(%ld): done. mb3=%d " | 1096 | ql_dbg(ql_dbg_mbx, vha, 0x104b, |
1111 | "ratov=%d.\n", vha->host_no, mcp->mb[3], ratov)); | 1097 | "Done %s mb3=%d ratov=%d.\n", __func__, mcp->mb[3], ratov); |
1112 | } | 1098 | } |
1113 | 1099 | ||
1114 | return rval; | 1100 | return rval; |
@@ -1139,8 +1125,7 @@ qla2x00_init_firmware(scsi_qla_host_t *vha, uint16_t size) | |||
1139 | mbx_cmd_t *mcp = &mc; | 1125 | mbx_cmd_t *mcp = &mc; |
1140 | struct qla_hw_data *ha = vha->hw; | 1126 | struct qla_hw_data *ha = vha->hw; |
1141 | 1127 | ||
1142 | DEBUG11(printk("qla2x00_init_firmware(%ld): entered.\n", | 1128 | ql_dbg(ql_dbg_mbx, vha, 0x104c, "Entered %s.\n", __func__); |
1143 | vha->host_no)); | ||
1144 | 1129 | ||
1145 | if (IS_QLA82XX(ha) && ql2xdbwr) | 1130 | if (IS_QLA82XX(ha) && ql2xdbwr) |
1146 | qla82xx_wr_32(ha, ha->nxdb_wr_ptr, | 1131 | qla82xx_wr_32(ha, ha->nxdb_wr_ptr, |
@@ -1174,13 +1159,11 @@ qla2x00_init_firmware(scsi_qla_host_t *vha, uint16_t size) | |||
1174 | 1159 | ||
1175 | if (rval != QLA_SUCCESS) { | 1160 | if (rval != QLA_SUCCESS) { |
1176 | /*EMPTY*/ | 1161 | /*EMPTY*/ |
1177 | DEBUG2_3_11(printk("qla2x00_init_firmware(%ld): failed=%x " | 1162 | ql_dbg(ql_dbg_mbx, vha, 0x104d, |
1178 | "mb0=%x.\n", | 1163 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
1179 | vha->host_no, rval, mcp->mb[0])); | ||
1180 | } else { | 1164 | } else { |
1181 | /*EMPTY*/ | 1165 | /*EMPTY*/ |
1182 | DEBUG11(printk("qla2x00_init_firmware(%ld): done.\n", | 1166 | ql_dbg(ql_dbg_mbx, vha, 0x104e, "Done %s.\n", __func__); |
1183 | vha->host_no)); | ||
1184 | } | 1167 | } |
1185 | 1168 | ||
1186 | return rval; | 1169 | return rval; |
@@ -1213,13 +1196,13 @@ qla2x00_get_port_database(scsi_qla_host_t *vha, fc_port_t *fcport, uint8_t opt) | |||
1213 | dma_addr_t pd_dma; | 1196 | dma_addr_t pd_dma; |
1214 | struct qla_hw_data *ha = vha->hw; | 1197 | struct qla_hw_data *ha = vha->hw; |
1215 | 1198 | ||
1216 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 1199 | ql_dbg(ql_dbg_mbx, vha, 0x104f, "Entered %s.\n", __func__); |
1217 | 1200 | ||
1218 | pd24 = NULL; | 1201 | pd24 = NULL; |
1219 | pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); | 1202 | pd = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pd_dma); |
1220 | if (pd == NULL) { | 1203 | if (pd == NULL) { |
1221 | DEBUG2_3(printk("%s(%ld): failed to allocate Port Database " | 1204 | ql_log(ql_log_warn, vha, 0x1050, |
1222 | "structure.\n", __func__, vha->host_no)); | 1205 | "Failed to allocate port database structure.\n"); |
1223 | return QLA_MEMORY_ALLOC_FAILED; | 1206 | return QLA_MEMORY_ALLOC_FAILED; |
1224 | } | 1207 | } |
1225 | memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE)); | 1208 | memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE)); |
@@ -1261,12 +1244,10 @@ qla2x00_get_port_database(scsi_qla_host_t *vha, fc_port_t *fcport, uint8_t opt) | |||
1261 | /* Check for logged in state. */ | 1244 | /* Check for logged in state. */ |
1262 | if (pd24->current_login_state != PDS_PRLI_COMPLETE && | 1245 | if (pd24->current_login_state != PDS_PRLI_COMPLETE && |
1263 | pd24->last_login_state != PDS_PRLI_COMPLETE) { | 1246 | pd24->last_login_state != PDS_PRLI_COMPLETE) { |
1264 | DEBUG2(qla_printk(KERN_WARNING, ha, | 1247 | ql_dbg(ql_dbg_mbx, vha, 0x1051, |
1265 | "scsi(%ld): Unable to verify login-state (%x/%x) " | 1248 | "Unable to verify login-state (%x/%x) for " |
1266 | " - portid=%02x%02x%02x.\n", vha->host_no, | 1249 | "loop_id %x.\n", pd24->current_login_state, |
1267 | pd24->current_login_state, pd24->last_login_state, | 1250 | pd24->last_login_state, fcport->loop_id); |
1268 | fcport->d_id.b.domain, fcport->d_id.b.area, | ||
1269 | fcport->d_id.b.al_pa)); | ||
1270 | rval = QLA_FUNCTION_FAILED; | 1251 | rval = QLA_FUNCTION_FAILED; |
1271 | goto gpd_error_out; | 1252 | goto gpd_error_out; |
1272 | } | 1253 | } |
@@ -1290,12 +1271,11 @@ qla2x00_get_port_database(scsi_qla_host_t *vha, fc_port_t *fcport, uint8_t opt) | |||
1290 | /* Check for logged in state. */ | 1271 | /* Check for logged in state. */ |
1291 | if (pd->master_state != PD_STATE_PORT_LOGGED_IN && | 1272 | if (pd->master_state != PD_STATE_PORT_LOGGED_IN && |
1292 | pd->slave_state != PD_STATE_PORT_LOGGED_IN) { | 1273 | pd->slave_state != PD_STATE_PORT_LOGGED_IN) { |
1293 | DEBUG2(qla_printk(KERN_WARNING, ha, | 1274 | ql_dbg(ql_dbg_mbx, vha, 0x100a, |
1294 | "scsi(%ld): Unable to verify login-state (%x/%x) " | 1275 | "Unable to verify login-state (%x/%x) - " |
1295 | " - portid=%02x%02x%02x.\n", vha->host_no, | 1276 | "portid=%02x%02x%02x.\n", pd->master_state, |
1296 | pd->master_state, pd->slave_state, | 1277 | pd->slave_state, fcport->d_id.b.domain, |
1297 | fcport->d_id.b.domain, fcport->d_id.b.area, | 1278 | fcport->d_id.b.area, fcport->d_id.b.al_pa); |
1298 | fcport->d_id.b.al_pa)); | ||
1299 | rval = QLA_FUNCTION_FAILED; | 1279 | rval = QLA_FUNCTION_FAILED; |
1300 | goto gpd_error_out; | 1280 | goto gpd_error_out; |
1301 | } | 1281 | } |
@@ -1325,10 +1305,11 @@ gpd_error_out: | |||
1325 | dma_pool_free(ha->s_dma_pool, pd, pd_dma); | 1305 | dma_pool_free(ha->s_dma_pool, pd, pd_dma); |
1326 | 1306 | ||
1327 | if (rval != QLA_SUCCESS) { | 1307 | if (rval != QLA_SUCCESS) { |
1328 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 1308 | ql_dbg(ql_dbg_mbx, vha, 0x1052, |
1329 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 1309 | "Failed=%x mb[0]=%x mb[1]=%x.\n", rval, |
1310 | mcp->mb[0], mcp->mb[1]); | ||
1330 | } else { | 1311 | } else { |
1331 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 1312 | ql_dbg(ql_dbg_mbx, vha, 0x1053, "Done %s.\n", __func__); |
1332 | } | 1313 | } |
1333 | 1314 | ||
1334 | return rval; | 1315 | return rval; |
@@ -1357,8 +1338,7 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states) | |||
1357 | mbx_cmd_t mc; | 1338 | mbx_cmd_t mc; |
1358 | mbx_cmd_t *mcp = &mc; | 1339 | mbx_cmd_t *mcp = &mc; |
1359 | 1340 | ||
1360 | DEBUG11(printk("qla2x00_get_firmware_state(%ld): entered.\n", | 1341 | ql_dbg(ql_dbg_mbx, vha, 0x1054, "Entered %s.\n", __func__); |
1361 | vha->host_no)); | ||
1362 | 1342 | ||
1363 | mcp->mb[0] = MBC_GET_FIRMWARE_STATE; | 1343 | mcp->mb[0] = MBC_GET_FIRMWARE_STATE; |
1364 | mcp->out_mb = MBX_0; | 1344 | mcp->out_mb = MBX_0; |
@@ -1381,12 +1361,10 @@ qla2x00_get_firmware_state(scsi_qla_host_t *vha, uint16_t *states) | |||
1381 | 1361 | ||
1382 | if (rval != QLA_SUCCESS) { | 1362 | if (rval != QLA_SUCCESS) { |
1383 | /*EMPTY*/ | 1363 | /*EMPTY*/ |
1384 | DEBUG2_3_11(printk("qla2x00_get_firmware_state(%ld): " | 1364 | ql_dbg(ql_dbg_mbx, vha, 0x1055, "Failed=%x.\n", rval); |
1385 | "failed=%x.\n", vha->host_no, rval)); | ||
1386 | } else { | 1365 | } else { |
1387 | /*EMPTY*/ | 1366 | /*EMPTY*/ |
1388 | DEBUG11(printk("qla2x00_get_firmware_state(%ld): done.\n", | 1367 | ql_dbg(ql_dbg_mbx, vha, 0x1056, "Done %s.\n", __func__); |
1389 | vha->host_no)); | ||
1390 | } | 1368 | } |
1391 | 1369 | ||
1392 | return rval; | 1370 | return rval; |
@@ -1418,8 +1396,7 @@ qla2x00_get_port_name(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t *name, | |||
1418 | mbx_cmd_t mc; | 1396 | mbx_cmd_t mc; |
1419 | mbx_cmd_t *mcp = &mc; | 1397 | mbx_cmd_t *mcp = &mc; |
1420 | 1398 | ||
1421 | DEBUG11(printk("qla2x00_get_port_name(%ld): entered.\n", | 1399 | ql_dbg(ql_dbg_mbx, vha, 0x1057, "Entered %s.\n", __func__); |
1422 | vha->host_no)); | ||
1423 | 1400 | ||
1424 | mcp->mb[0] = MBC_GET_PORT_NAME; | 1401 | mcp->mb[0] = MBC_GET_PORT_NAME; |
1425 | mcp->mb[9] = vha->vp_idx; | 1402 | mcp->mb[9] = vha->vp_idx; |
@@ -1439,8 +1416,7 @@ qla2x00_get_port_name(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t *name, | |||
1439 | 1416 | ||
1440 | if (rval != QLA_SUCCESS) { | 1417 | if (rval != QLA_SUCCESS) { |
1441 | /*EMPTY*/ | 1418 | /*EMPTY*/ |
1442 | DEBUG2_3_11(printk("qla2x00_get_port_name(%ld): failed=%x.\n", | 1419 | ql_dbg(ql_dbg_mbx, vha, 0x1058, "Failed=%x.\n", rval); |
1443 | vha->host_no, rval)); | ||
1444 | } else { | 1420 | } else { |
1445 | if (name != NULL) { | 1421 | if (name != NULL) { |
1446 | /* This function returns name in big endian. */ | 1422 | /* This function returns name in big endian. */ |
@@ -1454,8 +1430,7 @@ qla2x00_get_port_name(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t *name, | |||
1454 | name[7] = LSB(mcp->mb[7]); | 1430 | name[7] = LSB(mcp->mb[7]); |
1455 | } | 1431 | } |
1456 | 1432 | ||
1457 | DEBUG11(printk("qla2x00_get_port_name(%ld): done.\n", | 1433 | ql_dbg(ql_dbg_mbx, vha, 0x1059, "Done %s.\n", __func__); |
1458 | vha->host_no)); | ||
1459 | } | 1434 | } |
1460 | 1435 | ||
1461 | return rval; | 1436 | return rval; |
@@ -1483,7 +1458,7 @@ qla2x00_lip_reset(scsi_qla_host_t *vha) | |||
1483 | mbx_cmd_t mc; | 1458 | mbx_cmd_t mc; |
1484 | mbx_cmd_t *mcp = &mc; | 1459 | mbx_cmd_t *mcp = &mc; |
1485 | 1460 | ||
1486 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 1461 | ql_dbg(ql_dbg_mbx, vha, 0x105a, "Entered %s.\n", __func__); |
1487 | 1462 | ||
1488 | if (IS_QLA8XXX_TYPE(vha->hw)) { | 1463 | if (IS_QLA8XXX_TYPE(vha->hw)) { |
1489 | /* Logout across all FCFs. */ | 1464 | /* Logout across all FCFs. */ |
@@ -1517,11 +1492,10 @@ qla2x00_lip_reset(scsi_qla_host_t *vha) | |||
1517 | 1492 | ||
1518 | if (rval != QLA_SUCCESS) { | 1493 | if (rval != QLA_SUCCESS) { |
1519 | /*EMPTY*/ | 1494 | /*EMPTY*/ |
1520 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", | 1495 | ql_dbg(ql_dbg_mbx, vha, 0x105b, "Failed=%x.\n", rval); |
1521 | __func__, vha->host_no, rval)); | ||
1522 | } else { | 1496 | } else { |
1523 | /*EMPTY*/ | 1497 | /*EMPTY*/ |
1524 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 1498 | ql_dbg(ql_dbg_mbx, vha, 0x105c, "Done %s.\n", __func__); |
1525 | } | 1499 | } |
1526 | 1500 | ||
1527 | return rval; | 1501 | return rval; |
@@ -1553,12 +1527,11 @@ qla2x00_send_sns(scsi_qla_host_t *vha, dma_addr_t sns_phys_address, | |||
1553 | mbx_cmd_t mc; | 1527 | mbx_cmd_t mc; |
1554 | mbx_cmd_t *mcp = &mc; | 1528 | mbx_cmd_t *mcp = &mc; |
1555 | 1529 | ||
1556 | DEBUG11(printk("qla2x00_send_sns(%ld): entered.\n", | 1530 | ql_dbg(ql_dbg_mbx, vha, 0x105d, "Entered %s.\n", __func__); |
1557 | vha->host_no)); | ||
1558 | 1531 | ||
1559 | DEBUG11(printk("qla2x00_send_sns: retry cnt=%d ratov=%d total " | 1532 | ql_dbg(ql_dbg_mbx, vha, 0x105e, |
1560 | "tov=%d.\n", vha->hw->retry_count, vha->hw->login_timeout, | 1533 | "Retry cnt=%d ratov=%d total tov=%d.\n", |
1561 | mcp->tov)); | 1534 | vha->hw->retry_count, vha->hw->login_timeout, mcp->tov); |
1562 | 1535 | ||
1563 | mcp->mb[0] = MBC_SEND_SNS_COMMAND; | 1536 | mcp->mb[0] = MBC_SEND_SNS_COMMAND; |
1564 | mcp->mb[1] = cmd_size; | 1537 | mcp->mb[1] = cmd_size; |
@@ -1575,13 +1548,12 @@ qla2x00_send_sns(scsi_qla_host_t *vha, dma_addr_t sns_phys_address, | |||
1575 | 1548 | ||
1576 | if (rval != QLA_SUCCESS) { | 1549 | if (rval != QLA_SUCCESS) { |
1577 | /*EMPTY*/ | 1550 | /*EMPTY*/ |
1578 | DEBUG(printk("qla2x00_send_sns(%ld): failed=%x mb[0]=%x " | 1551 | ql_dbg(ql_dbg_mbx, vha, 0x105f, |
1579 | "mb[1]=%x.\n", vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 1552 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
1580 | DEBUG2_3_11(printk("qla2x00_send_sns(%ld): failed=%x mb[0]=%x " | 1553 | rval, mcp->mb[0], mcp->mb[1]); |
1581 | "mb[1]=%x.\n", vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | ||
1582 | } else { | 1554 | } else { |
1583 | /*EMPTY*/ | 1555 | /*EMPTY*/ |
1584 | DEBUG11(printk("qla2x00_send_sns(%ld): done.\n", vha->host_no)); | 1556 | ql_dbg(ql_dbg_mbx, vha, 0x1060, "Done %s.\n", __func__); |
1585 | } | 1557 | } |
1586 | 1558 | ||
1587 | return rval; | 1559 | return rval; |
@@ -1600,7 +1572,7 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1600 | struct req_que *req; | 1572 | struct req_que *req; |
1601 | struct rsp_que *rsp; | 1573 | struct rsp_que *rsp; |
1602 | 1574 | ||
1603 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 1575 | ql_dbg(ql_dbg_mbx, vha, 0x1061, "Entered %s.\n", __func__); |
1604 | 1576 | ||
1605 | if (ha->flags.cpu_affinity_enabled) | 1577 | if (ha->flags.cpu_affinity_enabled) |
1606 | req = ha->req_q_map[0]; | 1578 | req = ha->req_q_map[0]; |
@@ -1610,8 +1582,8 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1610 | 1582 | ||
1611 | lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); | 1583 | lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); |
1612 | if (lg == NULL) { | 1584 | if (lg == NULL) { |
1613 | DEBUG2_3(printk("%s(%ld): failed to allocate Login IOCB.\n", | 1585 | ql_log(ql_log_warn, vha, 0x1062, |
1614 | __func__, vha->host_no)); | 1586 | "Failed to allocate login IOCB.\n"); |
1615 | return QLA_MEMORY_ALLOC_FAILED; | 1587 | return QLA_MEMORY_ALLOC_FAILED; |
1616 | } | 1588 | } |
1617 | memset(lg, 0, sizeof(struct logio_entry_24xx)); | 1589 | memset(lg, 0, sizeof(struct logio_entry_24xx)); |
@@ -1631,21 +1603,21 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1631 | lg->vp_index = vha->vp_idx; | 1603 | lg->vp_index = vha->vp_idx; |
1632 | rval = qla2x00_issue_iocb(vha, lg, lg_dma, 0); | 1604 | rval = qla2x00_issue_iocb(vha, lg, lg_dma, 0); |
1633 | if (rval != QLA_SUCCESS) { | 1605 | if (rval != QLA_SUCCESS) { |
1634 | DEBUG2_3_11(printk("%s(%ld): failed to issue Login IOCB " | 1606 | ql_dbg(ql_dbg_mbx, vha, 0x1063, |
1635 | "(%x).\n", __func__, vha->host_no, rval)); | 1607 | "Failed to issue login IOCB (%x).\n", rval); |
1636 | } else if (lg->entry_status != 0) { | 1608 | } else if (lg->entry_status != 0) { |
1637 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 1609 | ql_dbg(ql_dbg_mbx, vha, 0x1064, |
1638 | "-- error status (%x).\n", __func__, vha->host_no, | 1610 | "Failed to complete IOCB -- error status (%x).\n", |
1639 | lg->entry_status)); | 1611 | lg->entry_status); |
1640 | rval = QLA_FUNCTION_FAILED; | 1612 | rval = QLA_FUNCTION_FAILED; |
1641 | } else if (lg->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { | 1613 | } else if (lg->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { |
1642 | iop[0] = le32_to_cpu(lg->io_parameter[0]); | 1614 | iop[0] = le32_to_cpu(lg->io_parameter[0]); |
1643 | iop[1] = le32_to_cpu(lg->io_parameter[1]); | 1615 | iop[1] = le32_to_cpu(lg->io_parameter[1]); |
1644 | 1616 | ||
1645 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 1617 | ql_dbg(ql_dbg_mbx, vha, 0x1065, |
1646 | "-- completion status (%x) ioparam=%x/%x.\n", __func__, | 1618 | "Failed to complete IOCB -- completion status (%x) " |
1647 | vha->host_no, le16_to_cpu(lg->comp_status), iop[0], | 1619 | "ioparam=%x/%x.\n", le16_to_cpu(lg->comp_status), |
1648 | iop[1])); | 1620 | iop[0], iop[1]); |
1649 | 1621 | ||
1650 | switch (iop[0]) { | 1622 | switch (iop[0]) { |
1651 | case LSC_SCODE_PORTID_USED: | 1623 | case LSC_SCODE_PORTID_USED: |
@@ -1673,7 +1645,7 @@ qla24xx_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1673 | break; | 1645 | break; |
1674 | } | 1646 | } |
1675 | } else { | 1647 | } else { |
1676 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 1648 | ql_dbg(ql_dbg_mbx, vha, 0x1066, "Done %s.\n", __func__); |
1677 | 1649 | ||
1678 | iop[0] = le32_to_cpu(lg->io_parameter[0]); | 1650 | iop[0] = le32_to_cpu(lg->io_parameter[0]); |
1679 | 1651 | ||
@@ -1728,7 +1700,7 @@ qla2x00_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1728 | mbx_cmd_t *mcp = &mc; | 1700 | mbx_cmd_t *mcp = &mc; |
1729 | struct qla_hw_data *ha = vha->hw; | 1701 | struct qla_hw_data *ha = vha->hw; |
1730 | 1702 | ||
1731 | DEBUG11(printk("qla2x00_login_fabric(%ld): entered.\n", vha->host_no)); | 1703 | ql_dbg(ql_dbg_mbx, vha, 0x1067, "Entered %s.\n", __func__); |
1732 | 1704 | ||
1733 | mcp->mb[0] = MBC_LOGIN_FABRIC_PORT; | 1705 | mcp->mb[0] = MBC_LOGIN_FABRIC_PORT; |
1734 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; | 1706 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; |
@@ -1771,13 +1743,12 @@ qla2x00_login_fabric(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1771 | rval = QLA_SUCCESS; | 1743 | rval = QLA_SUCCESS; |
1772 | 1744 | ||
1773 | /*EMPTY*/ | 1745 | /*EMPTY*/ |
1774 | DEBUG2_3_11(printk("qla2x00_login_fabric(%ld): failed=%x " | 1746 | ql_dbg(ql_dbg_mbx, vha, 0x1068, |
1775 | "mb[0]=%x mb[1]=%x mb[2]=%x.\n", vha->host_no, rval, | 1747 | "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", |
1776 | mcp->mb[0], mcp->mb[1], mcp->mb[2])); | 1748 | rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); |
1777 | } else { | 1749 | } else { |
1778 | /*EMPTY*/ | 1750 | /*EMPTY*/ |
1779 | DEBUG11(printk("qla2x00_login_fabric(%ld): done.\n", | 1751 | ql_dbg(ql_dbg_mbx, vha, 0x1069, "Done %s.\n", __func__); |
1780 | vha->host_no)); | ||
1781 | } | 1752 | } |
1782 | 1753 | ||
1783 | return rval; | 1754 | return rval; |
@@ -1808,13 +1779,13 @@ qla2x00_login_local_device(scsi_qla_host_t *vha, fc_port_t *fcport, | |||
1808 | mbx_cmd_t *mcp = &mc; | 1779 | mbx_cmd_t *mcp = &mc; |
1809 | struct qla_hw_data *ha = vha->hw; | 1780 | struct qla_hw_data *ha = vha->hw; |
1810 | 1781 | ||
1782 | ql_dbg(ql_dbg_mbx, vha, 0x106a, "Entered %s.\n", __func__); | ||
1783 | |||
1811 | if (IS_FWI2_CAPABLE(ha)) | 1784 | if (IS_FWI2_CAPABLE(ha)) |
1812 | return qla24xx_login_fabric(vha, fcport->loop_id, | 1785 | return qla24xx_login_fabric(vha, fcport->loop_id, |
1813 | fcport->d_id.b.domain, fcport->d_id.b.area, | 1786 | fcport->d_id.b.domain, fcport->d_id.b.area, |
1814 | fcport->d_id.b.al_pa, mb_ret, opt); | 1787 | fcport->d_id.b.al_pa, mb_ret, opt); |
1815 | 1788 | ||
1816 | DEBUG3(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
1817 | |||
1818 | mcp->mb[0] = MBC_LOGIN_LOOP_PORT; | 1789 | mcp->mb[0] = MBC_LOGIN_LOOP_PORT; |
1819 | if (HAS_EXTENDED_IDS(ha)) | 1790 | if (HAS_EXTENDED_IDS(ha)) |
1820 | mcp->mb[1] = fcport->loop_id; | 1791 | mcp->mb[1] = fcport->loop_id; |
@@ -1845,15 +1816,12 @@ qla2x00_login_local_device(scsi_qla_host_t *vha, fc_port_t *fcport, | |||
1845 | if (mcp->mb[0] == 0x4005 || mcp->mb[0] == 0x4006) | 1816 | if (mcp->mb[0] == 0x4005 || mcp->mb[0] == 0x4006) |
1846 | rval = QLA_SUCCESS; | 1817 | rval = QLA_SUCCESS; |
1847 | 1818 | ||
1848 | DEBUG(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " | 1819 | ql_dbg(ql_dbg_mbx, vha, 0x106b, |
1849 | "mb[6]=%x mb[7]=%x.\n", __func__, vha->host_no, rval, | 1820 | "Failed=%x mb[0]=%x mb[1]=%x mb[6]=%x mb[7]=%x.\n", |
1850 | mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7])); | 1821 | rval, mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]); |
1851 | DEBUG2_3(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " | ||
1852 | "mb[6]=%x mb[7]=%x.\n", __func__, vha->host_no, rval, | ||
1853 | mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7])); | ||
1854 | } else { | 1822 | } else { |
1855 | /*EMPTY*/ | 1823 | /*EMPTY*/ |
1856 | DEBUG3(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 1824 | ql_dbg(ql_dbg_mbx, vha, 0x106c, "Done %s.\n", __func__); |
1857 | } | 1825 | } |
1858 | 1826 | ||
1859 | return (rval); | 1827 | return (rval); |
@@ -1870,12 +1838,12 @@ qla24xx_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1870 | struct req_que *req; | 1838 | struct req_que *req; |
1871 | struct rsp_que *rsp; | 1839 | struct rsp_que *rsp; |
1872 | 1840 | ||
1873 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 1841 | ql_dbg(ql_dbg_mbx, vha, 0x106d, "Entered %s.\n", __func__); |
1874 | 1842 | ||
1875 | lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); | 1843 | lg = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &lg_dma); |
1876 | if (lg == NULL) { | 1844 | if (lg == NULL) { |
1877 | DEBUG2_3(printk("%s(%ld): failed to allocate Logout IOCB.\n", | 1845 | ql_log(ql_log_warn, vha, 0x106e, |
1878 | __func__, vha->host_no)); | 1846 | "Failed to allocate logout IOCB.\n"); |
1879 | return QLA_MEMORY_ALLOC_FAILED; | 1847 | return QLA_MEMORY_ALLOC_FAILED; |
1880 | } | 1848 | } |
1881 | memset(lg, 0, sizeof(struct logio_entry_24xx)); | 1849 | memset(lg, 0, sizeof(struct logio_entry_24xx)); |
@@ -1899,22 +1867,22 @@ qla24xx_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1899 | 1867 | ||
1900 | rval = qla2x00_issue_iocb(vha, lg, lg_dma, 0); | 1868 | rval = qla2x00_issue_iocb(vha, lg, lg_dma, 0); |
1901 | if (rval != QLA_SUCCESS) { | 1869 | if (rval != QLA_SUCCESS) { |
1902 | DEBUG2_3_11(printk("%s(%ld): failed to issue Logout IOCB " | 1870 | ql_dbg(ql_dbg_mbx, vha, 0x106f, |
1903 | "(%x).\n", __func__, vha->host_no, rval)); | 1871 | "Failed to issue logout IOCB (%x).\n", rval); |
1904 | } else if (lg->entry_status != 0) { | 1872 | } else if (lg->entry_status != 0) { |
1905 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 1873 | ql_dbg(ql_dbg_mbx, vha, 0x1070, |
1906 | "-- error status (%x).\n", __func__, vha->host_no, | 1874 | "Failed to complete IOCB -- error status (%x).\n", |
1907 | lg->entry_status)); | 1875 | lg->entry_status); |
1908 | rval = QLA_FUNCTION_FAILED; | 1876 | rval = QLA_FUNCTION_FAILED; |
1909 | } else if (lg->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { | 1877 | } else if (lg->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { |
1910 | DEBUG2_3_11(printk("%s(%ld %d): failed to complete IOCB " | 1878 | ql_dbg(ql_dbg_mbx, vha, 0x1071, |
1911 | "-- completion status (%x) ioparam=%x/%x.\n", __func__, | 1879 | "Failed to complete IOCB -- completion status (%x) " |
1912 | vha->host_no, vha->vp_idx, le16_to_cpu(lg->comp_status), | 1880 | "ioparam=%x/%x.\n", le16_to_cpu(lg->comp_status), |
1913 | le32_to_cpu(lg->io_parameter[0]), | 1881 | le32_to_cpu(lg->io_parameter[0]), |
1914 | le32_to_cpu(lg->io_parameter[1]))); | 1882 | le32_to_cpu(lg->io_parameter[1])); |
1915 | } else { | 1883 | } else { |
1916 | /*EMPTY*/ | 1884 | /*EMPTY*/ |
1917 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 1885 | ql_dbg(ql_dbg_mbx, vha, 0x1072, "Done %s.\n", __func__); |
1918 | } | 1886 | } |
1919 | 1887 | ||
1920 | dma_pool_free(ha->s_dma_pool, lg, lg_dma); | 1888 | dma_pool_free(ha->s_dma_pool, lg, lg_dma); |
@@ -1946,8 +1914,7 @@ qla2x00_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1946 | mbx_cmd_t mc; | 1914 | mbx_cmd_t mc; |
1947 | mbx_cmd_t *mcp = &mc; | 1915 | mbx_cmd_t *mcp = &mc; |
1948 | 1916 | ||
1949 | DEBUG11(printk("qla2x00_fabric_logout(%ld): entered.\n", | 1917 | ql_dbg(ql_dbg_mbx, vha, 0x1073, "Entered %s.\n", __func__); |
1950 | vha->host_no)); | ||
1951 | 1918 | ||
1952 | mcp->mb[0] = MBC_LOGOUT_FABRIC_PORT; | 1919 | mcp->mb[0] = MBC_LOGOUT_FABRIC_PORT; |
1953 | mcp->out_mb = MBX_1|MBX_0; | 1920 | mcp->out_mb = MBX_1|MBX_0; |
@@ -1966,12 +1933,11 @@ qla2x00_fabric_logout(scsi_qla_host_t *vha, uint16_t loop_id, uint8_t domain, | |||
1966 | 1933 | ||
1967 | if (rval != QLA_SUCCESS) { | 1934 | if (rval != QLA_SUCCESS) { |
1968 | /*EMPTY*/ | 1935 | /*EMPTY*/ |
1969 | DEBUG2_3_11(printk("qla2x00_fabric_logout(%ld): failed=%x " | 1936 | ql_dbg(ql_dbg_mbx, vha, 0x1074, |
1970 | "mbx1=%x.\n", vha->host_no, rval, mcp->mb[1])); | 1937 | "Failed=%x mb[1]=%x.\n", rval, mcp->mb[1]); |
1971 | } else { | 1938 | } else { |
1972 | /*EMPTY*/ | 1939 | /*EMPTY*/ |
1973 | DEBUG11(printk("qla2x00_fabric_logout(%ld): done.\n", | 1940 | ql_dbg(ql_dbg_mbx, vha, 0x1075, "Done %s.\n", __func__); |
1974 | vha->host_no)); | ||
1975 | } | 1941 | } |
1976 | 1942 | ||
1977 | return rval; | 1943 | return rval; |
@@ -1999,8 +1965,7 @@ qla2x00_full_login_lip(scsi_qla_host_t *vha) | |||
1999 | mbx_cmd_t mc; | 1965 | mbx_cmd_t mc; |
2000 | mbx_cmd_t *mcp = &mc; | 1966 | mbx_cmd_t *mcp = &mc; |
2001 | 1967 | ||
2002 | DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n", | 1968 | ql_dbg(ql_dbg_mbx, vha, 0x1076, "Entered %s.\n", __func__); |
2003 | vha->host_no)); | ||
2004 | 1969 | ||
2005 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; | 1970 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; |
2006 | mcp->mb[1] = IS_FWI2_CAPABLE(vha->hw) ? BIT_3 : 0; | 1971 | mcp->mb[1] = IS_FWI2_CAPABLE(vha->hw) ? BIT_3 : 0; |
@@ -2014,12 +1979,10 @@ qla2x00_full_login_lip(scsi_qla_host_t *vha) | |||
2014 | 1979 | ||
2015 | if (rval != QLA_SUCCESS) { | 1980 | if (rval != QLA_SUCCESS) { |
2016 | /*EMPTY*/ | 1981 | /*EMPTY*/ |
2017 | DEBUG2_3_11(printk("qla2x00_full_login_lip(%ld): failed=%x.\n", | 1982 | ql_dbg(ql_dbg_mbx, vha, 0x1077, "Failed=%x.\n", rval); |
2018 | vha->host_no, rval)); | ||
2019 | } else { | 1983 | } else { |
2020 | /*EMPTY*/ | 1984 | /*EMPTY*/ |
2021 | DEBUG11(printk("qla2x00_full_login_lip(%ld): done.\n", | 1985 | ql_dbg(ql_dbg_mbx, vha, 0x1078, "Done %s.\n", __func__); |
2022 | vha->host_no)); | ||
2023 | } | 1986 | } |
2024 | 1987 | ||
2025 | return rval; | 1988 | return rval; |
@@ -2045,8 +2008,7 @@ qla2x00_get_id_list(scsi_qla_host_t *vha, void *id_list, dma_addr_t id_list_dma, | |||
2045 | mbx_cmd_t mc; | 2008 | mbx_cmd_t mc; |
2046 | mbx_cmd_t *mcp = &mc; | 2009 | mbx_cmd_t *mcp = &mc; |
2047 | 2010 | ||
2048 | DEBUG11(printk("qla2x00_get_id_list(%ld): entered.\n", | 2011 | ql_dbg(ql_dbg_mbx, vha, 0x1079, "Entered %s.\n", __func__); |
2049 | vha->host_no)); | ||
2050 | 2012 | ||
2051 | if (id_list == NULL) | 2013 | if (id_list == NULL) |
2052 | return QLA_FUNCTION_FAILED; | 2014 | return QLA_FUNCTION_FAILED; |
@@ -2075,12 +2037,10 @@ qla2x00_get_id_list(scsi_qla_host_t *vha, void *id_list, dma_addr_t id_list_dma, | |||
2075 | 2037 | ||
2076 | if (rval != QLA_SUCCESS) { | 2038 | if (rval != QLA_SUCCESS) { |
2077 | /*EMPTY*/ | 2039 | /*EMPTY*/ |
2078 | DEBUG2_3_11(printk("qla2x00_get_id_list(%ld): failed=%x.\n", | 2040 | ql_dbg(ql_dbg_mbx, vha, 0x107a, "Failed=%x.\n", rval); |
2079 | vha->host_no, rval)); | ||
2080 | } else { | 2041 | } else { |
2081 | *entries = mcp->mb[1]; | 2042 | *entries = mcp->mb[1]; |
2082 | DEBUG11(printk("qla2x00_get_id_list(%ld): done.\n", | 2043 | ql_dbg(ql_dbg_mbx, vha, 0x107b, "Done %s.\n", __func__); |
2083 | vha->host_no)); | ||
2084 | } | 2044 | } |
2085 | 2045 | ||
2086 | return rval; | 2046 | return rval; |
@@ -2108,7 +2068,7 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, | |||
2108 | mbx_cmd_t mc; | 2068 | mbx_cmd_t mc; |
2109 | mbx_cmd_t *mcp = &mc; | 2069 | mbx_cmd_t *mcp = &mc; |
2110 | 2070 | ||
2111 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2071 | ql_dbg(ql_dbg_mbx, vha, 0x107c, "Entered %s.\n", __func__); |
2112 | 2072 | ||
2113 | mcp->mb[0] = MBC_GET_RESOURCE_COUNTS; | 2073 | mcp->mb[0] = MBC_GET_RESOURCE_COUNTS; |
2114 | mcp->out_mb = MBX_0; | 2074 | mcp->out_mb = MBX_0; |
@@ -2121,14 +2081,14 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, | |||
2121 | 2081 | ||
2122 | if (rval != QLA_SUCCESS) { | 2082 | if (rval != QLA_SUCCESS) { |
2123 | /*EMPTY*/ | 2083 | /*EMPTY*/ |
2124 | DEBUG2_3_11(printk("%s(%ld): failed = %x.\n", __func__, | 2084 | ql_dbg(ql_dbg_mbx, vha, 0x107d, |
2125 | vha->host_no, mcp->mb[0])); | 2085 | "Failed mb[0]=%x.\n", mcp->mb[0]); |
2126 | } else { | 2086 | } else { |
2127 | DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x " | 2087 | ql_dbg(ql_dbg_mbx, vha, 0x107e, |
2128 | "mb7=%x mb10=%x mb11=%x mb12=%x.\n", __func__, | 2088 | "Done %s mb1=%x mb2=%x mb3=%x mb6=%x mb7=%x mb10=%x " |
2129 | vha->host_no, mcp->mb[1], mcp->mb[2], mcp->mb[3], | 2089 | "mb11=%x mb12=%x.\n", __func__, mcp->mb[1], mcp->mb[2], |
2130 | mcp->mb[6], mcp->mb[7], mcp->mb[10], mcp->mb[11], | 2090 | mcp->mb[3], mcp->mb[6], mcp->mb[7], mcp->mb[10], |
2131 | mcp->mb[12])); | 2091 | mcp->mb[11], mcp->mb[12]); |
2132 | 2092 | ||
2133 | if (cur_xchg_cnt) | 2093 | if (cur_xchg_cnt) |
2134 | *cur_xchg_cnt = mcp->mb[3]; | 2094 | *cur_xchg_cnt = mcp->mb[3]; |
@@ -2147,7 +2107,6 @@ qla2x00_get_resource_cnts(scsi_qla_host_t *vha, uint16_t *cur_xchg_cnt, | |||
2147 | return (rval); | 2107 | return (rval); |
2148 | } | 2108 | } |
2149 | 2109 | ||
2150 | #if defined(QL_DEBUG_LEVEL_3) | ||
2151 | /* | 2110 | /* |
2152 | * qla2x00_get_fcal_position_map | 2111 | * qla2x00_get_fcal_position_map |
2153 | * Get FCAL (LILP) position map using mailbox command | 2112 | * Get FCAL (LILP) position map using mailbox command |
@@ -2172,10 +2131,12 @@ qla2x00_get_fcal_position_map(scsi_qla_host_t *vha, char *pos_map) | |||
2172 | dma_addr_t pmap_dma; | 2131 | dma_addr_t pmap_dma; |
2173 | struct qla_hw_data *ha = vha->hw; | 2132 | struct qla_hw_data *ha = vha->hw; |
2174 | 2133 | ||
2134 | ql_dbg(ql_dbg_mbx, vha, 0x107f, "Entered %s.\n", __func__); | ||
2135 | |||
2175 | pmap = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pmap_dma); | 2136 | pmap = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &pmap_dma); |
2176 | if (pmap == NULL) { | 2137 | if (pmap == NULL) { |
2177 | DEBUG2_3_11(printk("%s(%ld): **** Mem Alloc Failed ****", | 2138 | ql_log(ql_log_warn, vha, 0x1080, |
2178 | __func__, vha->host_no)); | 2139 | "Memory alloc failed.\n"); |
2179 | return QLA_MEMORY_ALLOC_FAILED; | 2140 | return QLA_MEMORY_ALLOC_FAILED; |
2180 | } | 2141 | } |
2181 | memset(pmap, 0, FCAL_MAP_SIZE); | 2142 | memset(pmap, 0, FCAL_MAP_SIZE); |
@@ -2193,10 +2154,11 @@ qla2x00_get_fcal_position_map(scsi_qla_host_t *vha, char *pos_map) | |||
2193 | rval = qla2x00_mailbox_command(vha, mcp); | 2154 | rval = qla2x00_mailbox_command(vha, mcp); |
2194 | 2155 | ||
2195 | if (rval == QLA_SUCCESS) { | 2156 | if (rval == QLA_SUCCESS) { |
2196 | DEBUG11(printk("%s(%ld): (mb0=%x/mb1=%x) FC/AL Position Map " | 2157 | ql_dbg(ql_dbg_mbx, vha, 0x1081, |
2197 | "size (%x)\n", __func__, vha->host_no, mcp->mb[0], | 2158 | "mb0/mb1=%x/%X FC/AL position map size (%x).\n", |
2198 | mcp->mb[1], (unsigned)pmap[0])); | 2159 | mcp->mb[0], mcp->mb[1], (unsigned)pmap[0]); |
2199 | DEBUG11(qla2x00_dump_buffer(pmap, pmap[0] + 1)); | 2160 | ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x111d, |
2161 | pmap, pmap[0] + 1); | ||
2200 | 2162 | ||
2201 | if (pos_map) | 2163 | if (pos_map) |
2202 | memcpy(pos_map, pmap, FCAL_MAP_SIZE); | 2164 | memcpy(pos_map, pmap, FCAL_MAP_SIZE); |
@@ -2204,15 +2166,13 @@ qla2x00_get_fcal_position_map(scsi_qla_host_t *vha, char *pos_map) | |||
2204 | dma_pool_free(ha->s_dma_pool, pmap, pmap_dma); | 2166 | dma_pool_free(ha->s_dma_pool, pmap, pmap_dma); |
2205 | 2167 | ||
2206 | if (rval != QLA_SUCCESS) { | 2168 | if (rval != QLA_SUCCESS) { |
2207 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2169 | ql_dbg(ql_dbg_mbx, vha, 0x1082, "Failed=%x.\n", rval); |
2208 | vha->host_no, rval)); | ||
2209 | } else { | 2170 | } else { |
2210 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2171 | ql_dbg(ql_dbg_mbx, vha, 0x1083, "Done %s.\n", __func__); |
2211 | } | 2172 | } |
2212 | 2173 | ||
2213 | return rval; | 2174 | return rval; |
2214 | } | 2175 | } |
2215 | #endif | ||
2216 | 2176 | ||
2217 | /* | 2177 | /* |
2218 | * qla2x00_get_link_status | 2178 | * qla2x00_get_link_status |
@@ -2237,7 +2197,7 @@ qla2x00_get_link_status(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2237 | uint32_t *siter, *diter, dwords; | 2197 | uint32_t *siter, *diter, dwords; |
2238 | struct qla_hw_data *ha = vha->hw; | 2198 | struct qla_hw_data *ha = vha->hw; |
2239 | 2199 | ||
2240 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2200 | ql_dbg(ql_dbg_mbx, vha, 0x1084, "Entered %s.\n", __func__); |
2241 | 2201 | ||
2242 | mcp->mb[0] = MBC_GET_LINK_STATUS; | 2202 | mcp->mb[0] = MBC_GET_LINK_STATUS; |
2243 | mcp->mb[2] = MSW(stats_dma); | 2203 | mcp->mb[2] = MSW(stats_dma); |
@@ -2266,11 +2226,12 @@ qla2x00_get_link_status(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2266 | 2226 | ||
2267 | if (rval == QLA_SUCCESS) { | 2227 | if (rval == QLA_SUCCESS) { |
2268 | if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { | 2228 | if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { |
2269 | DEBUG2_3_11(printk("%s(%ld): cmd failed. mbx0=%x.\n", | 2229 | ql_dbg(ql_dbg_mbx, vha, 0x1085, |
2270 | __func__, vha->host_no, mcp->mb[0])); | 2230 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
2271 | rval = QLA_FUNCTION_FAILED; | 2231 | rval = QLA_FUNCTION_FAILED; |
2272 | } else { | 2232 | } else { |
2273 | /* Copy over data -- firmware data is LE. */ | 2233 | /* Copy over data -- firmware data is LE. */ |
2234 | ql_dbg(ql_dbg_mbx, vha, 0x1086, "Done %s.\n", __func__); | ||
2274 | dwords = offsetof(struct link_statistics, unused1) / 4; | 2235 | dwords = offsetof(struct link_statistics, unused1) / 4; |
2275 | siter = diter = &stats->link_fail_cnt; | 2236 | siter = diter = &stats->link_fail_cnt; |
2276 | while (dwords--) | 2237 | while (dwords--) |
@@ -2278,8 +2239,7 @@ qla2x00_get_link_status(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2278 | } | 2239 | } |
2279 | } else { | 2240 | } else { |
2280 | /* Failed. */ | 2241 | /* Failed. */ |
2281 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2242 | ql_dbg(ql_dbg_mbx, vha, 0x1087, "Failed=%x.\n", rval); |
2282 | vha->host_no, rval)); | ||
2283 | } | 2243 | } |
2284 | 2244 | ||
2285 | return rval; | 2245 | return rval; |
@@ -2294,7 +2254,7 @@ qla24xx_get_isp_stats(scsi_qla_host_t *vha, struct link_statistics *stats, | |||
2294 | mbx_cmd_t *mcp = &mc; | 2254 | mbx_cmd_t *mcp = &mc; |
2295 | uint32_t *siter, *diter, dwords; | 2255 | uint32_t *siter, *diter, dwords; |
2296 | 2256 | ||
2297 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2257 | ql_dbg(ql_dbg_mbx, vha, 0x1088, "Entered %s.\n", __func__); |
2298 | 2258 | ||
2299 | mcp->mb[0] = MBC_GET_LINK_PRIV_STATS; | 2259 | mcp->mb[0] = MBC_GET_LINK_PRIV_STATS; |
2300 | mcp->mb[2] = MSW(stats_dma); | 2260 | mcp->mb[2] = MSW(stats_dma); |
@@ -2312,10 +2272,11 @@ qla24xx_get_isp_stats(scsi_qla_host_t *vha, struct link_statistics *stats, | |||
2312 | 2272 | ||
2313 | if (rval == QLA_SUCCESS) { | 2273 | if (rval == QLA_SUCCESS) { |
2314 | if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { | 2274 | if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { |
2315 | DEBUG2_3_11(printk("%s(%ld): cmd failed. mbx0=%x.\n", | 2275 | ql_dbg(ql_dbg_mbx, vha, 0x1089, |
2316 | __func__, vha->host_no, mcp->mb[0])); | 2276 | "Failed mb[0]=%x.\n", mcp->mb[0]); |
2317 | rval = QLA_FUNCTION_FAILED; | 2277 | rval = QLA_FUNCTION_FAILED; |
2318 | } else { | 2278 | } else { |
2279 | ql_dbg(ql_dbg_mbx, vha, 0x108a, "Done %s.\n", __func__); | ||
2319 | /* Copy over data -- firmware data is LE. */ | 2280 | /* Copy over data -- firmware data is LE. */ |
2320 | dwords = sizeof(struct link_statistics) / 4; | 2281 | dwords = sizeof(struct link_statistics) / 4; |
2321 | siter = diter = &stats->link_fail_cnt; | 2282 | siter = diter = &stats->link_fail_cnt; |
@@ -2324,8 +2285,7 @@ qla24xx_get_isp_stats(scsi_qla_host_t *vha, struct link_statistics *stats, | |||
2324 | } | 2285 | } |
2325 | } else { | 2286 | } else { |
2326 | /* Failed. */ | 2287 | /* Failed. */ |
2327 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2288 | ql_dbg(ql_dbg_mbx, vha, 0x108b, "Failed=%x.\n", rval); |
2328 | vha->host_no, rval)); | ||
2329 | } | 2289 | } |
2330 | 2290 | ||
2331 | return rval; | 2291 | return rval; |
@@ -2345,7 +2305,7 @@ qla24xx_abort_command(srb_t *sp) | |||
2345 | struct qla_hw_data *ha = vha->hw; | 2305 | struct qla_hw_data *ha = vha->hw; |
2346 | struct req_que *req = vha->req; | 2306 | struct req_que *req = vha->req; |
2347 | 2307 | ||
2348 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2308 | ql_dbg(ql_dbg_mbx, vha, 0x108c, "Entered %s.\n", __func__); |
2349 | 2309 | ||
2350 | spin_lock_irqsave(&ha->hardware_lock, flags); | 2310 | spin_lock_irqsave(&ha->hardware_lock, flags); |
2351 | for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { | 2311 | for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { |
@@ -2360,8 +2320,8 @@ qla24xx_abort_command(srb_t *sp) | |||
2360 | 2320 | ||
2361 | abt = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &abt_dma); | 2321 | abt = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &abt_dma); |
2362 | if (abt == NULL) { | 2322 | if (abt == NULL) { |
2363 | DEBUG2_3(printk("%s(%ld): failed to allocate Abort IOCB.\n", | 2323 | ql_log(ql_log_warn, vha, 0x108d, |
2364 | __func__, vha->host_no)); | 2324 | "Failed to allocate abort IOCB.\n"); |
2365 | return QLA_MEMORY_ALLOC_FAILED; | 2325 | return QLA_MEMORY_ALLOC_FAILED; |
2366 | } | 2326 | } |
2367 | memset(abt, 0, sizeof(struct abort_entry_24xx)); | 2327 | memset(abt, 0, sizeof(struct abort_entry_24xx)); |
@@ -2380,20 +2340,20 @@ qla24xx_abort_command(srb_t *sp) | |||
2380 | 2340 | ||
2381 | rval = qla2x00_issue_iocb(vha, abt, abt_dma, 0); | 2341 | rval = qla2x00_issue_iocb(vha, abt, abt_dma, 0); |
2382 | if (rval != QLA_SUCCESS) { | 2342 | if (rval != QLA_SUCCESS) { |
2383 | DEBUG2_3_11(printk("%s(%ld): failed to issue IOCB (%x).\n", | 2343 | ql_dbg(ql_dbg_mbx, vha, 0x108e, |
2384 | __func__, vha->host_no, rval)); | 2344 | "Failed to issue IOCB (%x).\n", rval); |
2385 | } else if (abt->entry_status != 0) { | 2345 | } else if (abt->entry_status != 0) { |
2386 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2346 | ql_dbg(ql_dbg_mbx, vha, 0x108f, |
2387 | "-- error status (%x).\n", __func__, vha->host_no, | 2347 | "Failed to complete IOCB -- error status (%x).\n", |
2388 | abt->entry_status)); | 2348 | abt->entry_status); |
2389 | rval = QLA_FUNCTION_FAILED; | 2349 | rval = QLA_FUNCTION_FAILED; |
2390 | } else if (abt->nport_handle != __constant_cpu_to_le16(0)) { | 2350 | } else if (abt->nport_handle != __constant_cpu_to_le16(0)) { |
2391 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2351 | ql_dbg(ql_dbg_mbx, vha, 0x1090, |
2392 | "-- completion status (%x).\n", __func__, vha->host_no, | 2352 | "Failed to complete IOCB -- completion status (%x).\n", |
2393 | le16_to_cpu(abt->nport_handle))); | 2353 | le16_to_cpu(abt->nport_handle)); |
2394 | rval = QLA_FUNCTION_FAILED; | 2354 | rval = QLA_FUNCTION_FAILED; |
2395 | } else { | 2355 | } else { |
2396 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2356 | ql_dbg(ql_dbg_mbx, vha, 0x1091, "Done %s.\n", __func__); |
2397 | } | 2357 | } |
2398 | 2358 | ||
2399 | dma_pool_free(ha->s_dma_pool, abt, abt_dma); | 2359 | dma_pool_free(ha->s_dma_pool, abt, abt_dma); |
@@ -2421,19 +2381,20 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport, | |||
2421 | struct req_que *req; | 2381 | struct req_que *req; |
2422 | struct rsp_que *rsp; | 2382 | struct rsp_que *rsp; |
2423 | 2383 | ||
2424 | DEBUG11(printk("%s(%ld): entered.\n", __func__, fcport->vha->host_no)); | ||
2425 | |||
2426 | vha = fcport->vha; | 2384 | vha = fcport->vha; |
2427 | ha = vha->hw; | 2385 | ha = vha->hw; |
2428 | req = vha->req; | 2386 | req = vha->req; |
2387 | |||
2388 | ql_dbg(ql_dbg_mbx, vha, 0x1092, "Entered %s.\n", __func__); | ||
2389 | |||
2429 | if (ha->flags.cpu_affinity_enabled) | 2390 | if (ha->flags.cpu_affinity_enabled) |
2430 | rsp = ha->rsp_q_map[tag + 1]; | 2391 | rsp = ha->rsp_q_map[tag + 1]; |
2431 | else | 2392 | else |
2432 | rsp = req->rsp; | 2393 | rsp = req->rsp; |
2433 | tsk = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &tsk_dma); | 2394 | tsk = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &tsk_dma); |
2434 | if (tsk == NULL) { | 2395 | if (tsk == NULL) { |
2435 | DEBUG2_3(printk("%s(%ld): failed to allocate Task Management " | 2396 | ql_log(ql_log_warn, vha, 0x1093, |
2436 | "IOCB.\n", __func__, vha->host_no)); | 2397 | "Failed to allocate task management IOCB.\n"); |
2437 | return QLA_MEMORY_ALLOC_FAILED; | 2398 | return QLA_MEMORY_ALLOC_FAILED; |
2438 | } | 2399 | } |
2439 | memset(tsk, 0, sizeof(struct tsk_mgmt_cmd)); | 2400 | memset(tsk, 0, sizeof(struct tsk_mgmt_cmd)); |
@@ -2457,30 +2418,30 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport, | |||
2457 | sts = &tsk->p.sts; | 2418 | sts = &tsk->p.sts; |
2458 | rval = qla2x00_issue_iocb(vha, tsk, tsk_dma, 0); | 2419 | rval = qla2x00_issue_iocb(vha, tsk, tsk_dma, 0); |
2459 | if (rval != QLA_SUCCESS) { | 2420 | if (rval != QLA_SUCCESS) { |
2460 | DEBUG2_3_11(printk("%s(%ld): failed to issue %s Reset IOCB " | 2421 | ql_dbg(ql_dbg_mbx, vha, 0x1094, |
2461 | "(%x).\n", __func__, vha->host_no, name, rval)); | 2422 | "Failed to issue %s reset IOCB (%x).\n", name, rval); |
2462 | } else if (sts->entry_status != 0) { | 2423 | } else if (sts->entry_status != 0) { |
2463 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2424 | ql_dbg(ql_dbg_mbx, vha, 0x1095, |
2464 | "-- error status (%x).\n", __func__, vha->host_no, | 2425 | "Failed to complete IOCB -- error status (%x).\n", |
2465 | sts->entry_status)); | 2426 | sts->entry_status); |
2466 | rval = QLA_FUNCTION_FAILED; | 2427 | rval = QLA_FUNCTION_FAILED; |
2467 | } else if (sts->comp_status != | 2428 | } else if (sts->comp_status != |
2468 | __constant_cpu_to_le16(CS_COMPLETE)) { | 2429 | __constant_cpu_to_le16(CS_COMPLETE)) { |
2469 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2430 | ql_dbg(ql_dbg_mbx, vha, 0x1096, |
2470 | "-- completion status (%x).\n", __func__, | 2431 | "Failed to complete IOCB -- completion status (%x).\n", |
2471 | vha->host_no, le16_to_cpu(sts->comp_status))); | 2432 | le16_to_cpu(sts->comp_status)); |
2472 | rval = QLA_FUNCTION_FAILED; | 2433 | rval = QLA_FUNCTION_FAILED; |
2473 | } else if (le16_to_cpu(sts->scsi_status) & | 2434 | } else if (le16_to_cpu(sts->scsi_status) & |
2474 | SS_RESPONSE_INFO_LEN_VALID) { | 2435 | SS_RESPONSE_INFO_LEN_VALID) { |
2475 | if (le32_to_cpu(sts->rsp_data_len) < 4) { | 2436 | if (le32_to_cpu(sts->rsp_data_len) < 4) { |
2476 | DEBUG2_3_11(printk("%s(%ld): ignoring inconsistent " | 2437 | ql_dbg(ql_dbg_mbx, vha, 0x1097, |
2477 | "data length -- not enough response info (%d).\n", | 2438 | "Ignoring inconsistent data length -- not enough " |
2478 | __func__, vha->host_no, | 2439 | "response info (%d).\n", |
2479 | le32_to_cpu(sts->rsp_data_len))); | 2440 | le32_to_cpu(sts->rsp_data_len)); |
2480 | } else if (sts->data[3]) { | 2441 | } else if (sts->data[3]) { |
2481 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2442 | ql_dbg(ql_dbg_mbx, vha, 0x1098, |
2482 | "-- response (%x).\n", __func__, | 2443 | "Failed to complete IOCB -- response (%x).\n", |
2483 | vha->host_no, sts->data[3])); | 2444 | sts->data[3]); |
2484 | rval = QLA_FUNCTION_FAILED; | 2445 | rval = QLA_FUNCTION_FAILED; |
2485 | } | 2446 | } |
2486 | } | 2447 | } |
@@ -2489,10 +2450,10 @@ __qla24xx_issue_tmf(char *name, uint32_t type, struct fc_port *fcport, | |||
2489 | rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, l, | 2450 | rval2 = qla2x00_marker(vha, req, rsp, fcport->loop_id, l, |
2490 | type == TCF_LUN_RESET ? MK_SYNC_ID_LUN: MK_SYNC_ID); | 2451 | type == TCF_LUN_RESET ? MK_SYNC_ID_LUN: MK_SYNC_ID); |
2491 | if (rval2 != QLA_SUCCESS) { | 2452 | if (rval2 != QLA_SUCCESS) { |
2492 | DEBUG2_3_11(printk("%s(%ld): failed to issue Marker IOCB " | 2453 | ql_dbg(ql_dbg_mbx, vha, 0x1099, |
2493 | "(%x).\n", __func__, vha->host_no, rval2)); | 2454 | "Failed to issue marker IOCB (%x).\n", rval2); |
2494 | } else { | 2455 | } else { |
2495 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2456 | ql_dbg(ql_dbg_mbx, vha, 0x109a, "Done %s.\n", __func__); |
2496 | } | 2457 | } |
2497 | 2458 | ||
2498 | dma_pool_free(ha->s_dma_pool, tsk, tsk_dma); | 2459 | dma_pool_free(ha->s_dma_pool, tsk, tsk_dma); |
@@ -2533,7 +2494,7 @@ qla2x00_system_error(scsi_qla_host_t *vha) | |||
2533 | if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha)) | 2494 | if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha)) |
2534 | return QLA_FUNCTION_FAILED; | 2495 | return QLA_FUNCTION_FAILED; |
2535 | 2496 | ||
2536 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2497 | ql_dbg(ql_dbg_mbx, vha, 0x109b, "Entered %s.\n", __func__); |
2537 | 2498 | ||
2538 | mcp->mb[0] = MBC_GEN_SYSTEM_ERROR; | 2499 | mcp->mb[0] = MBC_GEN_SYSTEM_ERROR; |
2539 | mcp->out_mb = MBX_0; | 2500 | mcp->out_mb = MBX_0; |
@@ -2543,10 +2504,9 @@ qla2x00_system_error(scsi_qla_host_t *vha) | |||
2543 | rval = qla2x00_mailbox_command(vha, mcp); | 2504 | rval = qla2x00_mailbox_command(vha, mcp); |
2544 | 2505 | ||
2545 | if (rval != QLA_SUCCESS) { | 2506 | if (rval != QLA_SUCCESS) { |
2546 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2507 | ql_dbg(ql_dbg_mbx, vha, 0x109c, "Failed=%x.\n", rval); |
2547 | vha->host_no, rval)); | ||
2548 | } else { | 2508 | } else { |
2549 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2509 | ql_dbg(ql_dbg_mbx, vha, 0x109d, "Done %s.\n", __func__); |
2550 | } | 2510 | } |
2551 | 2511 | ||
2552 | return rval; | 2512 | return rval; |
@@ -2566,7 +2526,7 @@ qla2x00_set_serdes_params(scsi_qla_host_t *vha, uint16_t sw_em_1g, | |||
2566 | mbx_cmd_t mc; | 2526 | mbx_cmd_t mc; |
2567 | mbx_cmd_t *mcp = &mc; | 2527 | mbx_cmd_t *mcp = &mc; |
2568 | 2528 | ||
2569 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2529 | ql_dbg(ql_dbg_mbx, vha, 0x109e, "Entered %s.\n", __func__); |
2570 | 2530 | ||
2571 | mcp->mb[0] = MBC_SERDES_PARAMS; | 2531 | mcp->mb[0] = MBC_SERDES_PARAMS; |
2572 | mcp->mb[1] = BIT_0; | 2532 | mcp->mb[1] = BIT_0; |
@@ -2581,11 +2541,11 @@ qla2x00_set_serdes_params(scsi_qla_host_t *vha, uint16_t sw_em_1g, | |||
2581 | 2541 | ||
2582 | if (rval != QLA_SUCCESS) { | 2542 | if (rval != QLA_SUCCESS) { |
2583 | /*EMPTY*/ | 2543 | /*EMPTY*/ |
2584 | DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__, | 2544 | ql_dbg(ql_dbg_mbx, vha, 0x109f, |
2585 | vha->host_no, rval, mcp->mb[0])); | 2545 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
2586 | } else { | 2546 | } else { |
2587 | /*EMPTY*/ | 2547 | /*EMPTY*/ |
2588 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2548 | ql_dbg(ql_dbg_mbx, vha, 0x10a0, "Done %s.\n", __func__); |
2589 | } | 2549 | } |
2590 | 2550 | ||
2591 | return rval; | 2551 | return rval; |
@@ -2601,7 +2561,7 @@ qla2x00_stop_firmware(scsi_qla_host_t *vha) | |||
2601 | if (!IS_FWI2_CAPABLE(vha->hw)) | 2561 | if (!IS_FWI2_CAPABLE(vha->hw)) |
2602 | return QLA_FUNCTION_FAILED; | 2562 | return QLA_FUNCTION_FAILED; |
2603 | 2563 | ||
2604 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 2564 | ql_dbg(ql_dbg_mbx, vha, 0x10a1, "Entered %s.\n", __func__); |
2605 | 2565 | ||
2606 | mcp->mb[0] = MBC_STOP_FIRMWARE; | 2566 | mcp->mb[0] = MBC_STOP_FIRMWARE; |
2607 | mcp->out_mb = MBX_0; | 2567 | mcp->out_mb = MBX_0; |
@@ -2611,12 +2571,11 @@ qla2x00_stop_firmware(scsi_qla_host_t *vha) | |||
2611 | rval = qla2x00_mailbox_command(vha, mcp); | 2571 | rval = qla2x00_mailbox_command(vha, mcp); |
2612 | 2572 | ||
2613 | if (rval != QLA_SUCCESS) { | 2573 | if (rval != QLA_SUCCESS) { |
2614 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2574 | ql_dbg(ql_dbg_mbx, vha, 0x10a2, "Failed=%x.\n", rval); |
2615 | vha->host_no, rval)); | ||
2616 | if (mcp->mb[0] == MBS_INVALID_COMMAND) | 2575 | if (mcp->mb[0] == MBS_INVALID_COMMAND) |
2617 | rval = QLA_INVALID_COMMAND; | 2576 | rval = QLA_INVALID_COMMAND; |
2618 | } else { | 2577 | } else { |
2619 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2578 | ql_dbg(ql_dbg_mbx, vha, 0x10a3, "Done %s.\n", __func__); |
2620 | } | 2579 | } |
2621 | 2580 | ||
2622 | return rval; | 2581 | return rval; |
@@ -2630,14 +2589,14 @@ qla2x00_enable_eft_trace(scsi_qla_host_t *vha, dma_addr_t eft_dma, | |||
2630 | mbx_cmd_t mc; | 2589 | mbx_cmd_t mc; |
2631 | mbx_cmd_t *mcp = &mc; | 2590 | mbx_cmd_t *mcp = &mc; |
2632 | 2591 | ||
2592 | ql_dbg(ql_dbg_mbx, vha, 0x10a4, "Entered %s.\n", __func__); | ||
2593 | |||
2633 | if (!IS_FWI2_CAPABLE(vha->hw)) | 2594 | if (!IS_FWI2_CAPABLE(vha->hw)) |
2634 | return QLA_FUNCTION_FAILED; | 2595 | return QLA_FUNCTION_FAILED; |
2635 | 2596 | ||
2636 | if (unlikely(pci_channel_offline(vha->hw->pdev))) | 2597 | if (unlikely(pci_channel_offline(vha->hw->pdev))) |
2637 | return QLA_FUNCTION_FAILED; | 2598 | return QLA_FUNCTION_FAILED; |
2638 | 2599 | ||
2639 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
2640 | |||
2641 | mcp->mb[0] = MBC_TRACE_CONTROL; | 2600 | mcp->mb[0] = MBC_TRACE_CONTROL; |
2642 | mcp->mb[1] = TC_EFT_ENABLE; | 2601 | mcp->mb[1] = TC_EFT_ENABLE; |
2643 | mcp->mb[2] = LSW(eft_dma); | 2602 | mcp->mb[2] = LSW(eft_dma); |
@@ -2652,10 +2611,11 @@ qla2x00_enable_eft_trace(scsi_qla_host_t *vha, dma_addr_t eft_dma, | |||
2652 | mcp->flags = 0; | 2611 | mcp->flags = 0; |
2653 | rval = qla2x00_mailbox_command(vha, mcp); | 2612 | rval = qla2x00_mailbox_command(vha, mcp); |
2654 | if (rval != QLA_SUCCESS) { | 2613 | if (rval != QLA_SUCCESS) { |
2655 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 2614 | ql_dbg(ql_dbg_mbx, vha, 0x10a5, |
2656 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 2615 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
2616 | rval, mcp->mb[0], mcp->mb[1]); | ||
2657 | } else { | 2617 | } else { |
2658 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2618 | ql_dbg(ql_dbg_mbx, vha, 0x10a6, "Done %s.\n", __func__); |
2659 | } | 2619 | } |
2660 | 2620 | ||
2661 | return rval; | 2621 | return rval; |
@@ -2668,14 +2628,14 @@ qla2x00_disable_eft_trace(scsi_qla_host_t *vha) | |||
2668 | mbx_cmd_t mc; | 2628 | mbx_cmd_t mc; |
2669 | mbx_cmd_t *mcp = &mc; | 2629 | mbx_cmd_t *mcp = &mc; |
2670 | 2630 | ||
2631 | ql_dbg(ql_dbg_mbx, vha, 0x10a7, "Entered %s.\n", __func__); | ||
2632 | |||
2671 | if (!IS_FWI2_CAPABLE(vha->hw)) | 2633 | if (!IS_FWI2_CAPABLE(vha->hw)) |
2672 | return QLA_FUNCTION_FAILED; | 2634 | return QLA_FUNCTION_FAILED; |
2673 | 2635 | ||
2674 | if (unlikely(pci_channel_offline(vha->hw->pdev))) | 2636 | if (unlikely(pci_channel_offline(vha->hw->pdev))) |
2675 | return QLA_FUNCTION_FAILED; | 2637 | return QLA_FUNCTION_FAILED; |
2676 | 2638 | ||
2677 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
2678 | |||
2679 | mcp->mb[0] = MBC_TRACE_CONTROL; | 2639 | mcp->mb[0] = MBC_TRACE_CONTROL; |
2680 | mcp->mb[1] = TC_EFT_DISABLE; | 2640 | mcp->mb[1] = TC_EFT_DISABLE; |
2681 | mcp->out_mb = MBX_1|MBX_0; | 2641 | mcp->out_mb = MBX_1|MBX_0; |
@@ -2684,10 +2644,11 @@ qla2x00_disable_eft_trace(scsi_qla_host_t *vha) | |||
2684 | mcp->flags = 0; | 2644 | mcp->flags = 0; |
2685 | rval = qla2x00_mailbox_command(vha, mcp); | 2645 | rval = qla2x00_mailbox_command(vha, mcp); |
2686 | if (rval != QLA_SUCCESS) { | 2646 | if (rval != QLA_SUCCESS) { |
2687 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 2647 | ql_dbg(ql_dbg_mbx, vha, 0x10a8, |
2688 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 2648 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
2649 | rval, mcp->mb[0], mcp->mb[1]); | ||
2689 | } else { | 2650 | } else { |
2690 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2651 | ql_dbg(ql_dbg_mbx, vha, 0x10a9, "Done %s.\n", __func__); |
2691 | } | 2652 | } |
2692 | 2653 | ||
2693 | return rval; | 2654 | return rval; |
@@ -2701,14 +2662,14 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *vha, dma_addr_t fce_dma, | |||
2701 | mbx_cmd_t mc; | 2662 | mbx_cmd_t mc; |
2702 | mbx_cmd_t *mcp = &mc; | 2663 | mbx_cmd_t *mcp = &mc; |
2703 | 2664 | ||
2665 | ql_dbg(ql_dbg_mbx, vha, 0x10aa, "Entered %s.\n", __func__); | ||
2666 | |||
2704 | if (!IS_QLA25XX(vha->hw) && !IS_QLA81XX(vha->hw)) | 2667 | if (!IS_QLA25XX(vha->hw) && !IS_QLA81XX(vha->hw)) |
2705 | return QLA_FUNCTION_FAILED; | 2668 | return QLA_FUNCTION_FAILED; |
2706 | 2669 | ||
2707 | if (unlikely(pci_channel_offline(vha->hw->pdev))) | 2670 | if (unlikely(pci_channel_offline(vha->hw->pdev))) |
2708 | return QLA_FUNCTION_FAILED; | 2671 | return QLA_FUNCTION_FAILED; |
2709 | 2672 | ||
2710 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
2711 | |||
2712 | mcp->mb[0] = MBC_TRACE_CONTROL; | 2673 | mcp->mb[0] = MBC_TRACE_CONTROL; |
2713 | mcp->mb[1] = TC_FCE_ENABLE; | 2674 | mcp->mb[1] = TC_FCE_ENABLE; |
2714 | mcp->mb[2] = LSW(fce_dma); | 2675 | mcp->mb[2] = LSW(fce_dma); |
@@ -2727,10 +2688,11 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *vha, dma_addr_t fce_dma, | |||
2727 | mcp->flags = 0; | 2688 | mcp->flags = 0; |
2728 | rval = qla2x00_mailbox_command(vha, mcp); | 2689 | rval = qla2x00_mailbox_command(vha, mcp); |
2729 | if (rval != QLA_SUCCESS) { | 2690 | if (rval != QLA_SUCCESS) { |
2730 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 2691 | ql_dbg(ql_dbg_mbx, vha, 0x10ab, |
2731 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 2692 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
2693 | rval, mcp->mb[0], mcp->mb[1]); | ||
2732 | } else { | 2694 | } else { |
2733 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2695 | ql_dbg(ql_dbg_mbx, vha, 0x10ac, "Done %s.\n", __func__); |
2734 | 2696 | ||
2735 | if (mb) | 2697 | if (mb) |
2736 | memcpy(mb, mcp->mb, 8 * sizeof(*mb)); | 2698 | memcpy(mb, mcp->mb, 8 * sizeof(*mb)); |
@@ -2748,14 +2710,14 @@ qla2x00_disable_fce_trace(scsi_qla_host_t *vha, uint64_t *wr, uint64_t *rd) | |||
2748 | mbx_cmd_t mc; | 2710 | mbx_cmd_t mc; |
2749 | mbx_cmd_t *mcp = &mc; | 2711 | mbx_cmd_t *mcp = &mc; |
2750 | 2712 | ||
2713 | ql_dbg(ql_dbg_mbx, vha, 0x10ad, "Entered %s.\n", __func__); | ||
2714 | |||
2751 | if (!IS_FWI2_CAPABLE(vha->hw)) | 2715 | if (!IS_FWI2_CAPABLE(vha->hw)) |
2752 | return QLA_FUNCTION_FAILED; | 2716 | return QLA_FUNCTION_FAILED; |
2753 | 2717 | ||
2754 | if (unlikely(pci_channel_offline(vha->hw->pdev))) | 2718 | if (unlikely(pci_channel_offline(vha->hw->pdev))) |
2755 | return QLA_FUNCTION_FAILED; | 2719 | return QLA_FUNCTION_FAILED; |
2756 | 2720 | ||
2757 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
2758 | |||
2759 | mcp->mb[0] = MBC_TRACE_CONTROL; | 2721 | mcp->mb[0] = MBC_TRACE_CONTROL; |
2760 | mcp->mb[1] = TC_FCE_DISABLE; | 2722 | mcp->mb[1] = TC_FCE_DISABLE; |
2761 | mcp->mb[2] = TC_FCE_DISABLE_TRACE; | 2723 | mcp->mb[2] = TC_FCE_DISABLE_TRACE; |
@@ -2766,10 +2728,11 @@ qla2x00_disable_fce_trace(scsi_qla_host_t *vha, uint64_t *wr, uint64_t *rd) | |||
2766 | mcp->flags = 0; | 2728 | mcp->flags = 0; |
2767 | rval = qla2x00_mailbox_command(vha, mcp); | 2729 | rval = qla2x00_mailbox_command(vha, mcp); |
2768 | if (rval != QLA_SUCCESS) { | 2730 | if (rval != QLA_SUCCESS) { |
2769 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 2731 | ql_dbg(ql_dbg_mbx, vha, 0x10ae, |
2770 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 2732 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
2733 | rval, mcp->mb[0], mcp->mb[1]); | ||
2771 | } else { | 2734 | } else { |
2772 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2735 | ql_dbg(ql_dbg_mbx, vha, 0x10af, "Done %s.\n", __func__); |
2773 | 2736 | ||
2774 | if (wr) | 2737 | if (wr) |
2775 | *wr = (uint64_t) mcp->mb[5] << 48 | | 2738 | *wr = (uint64_t) mcp->mb[5] << 48 | |
@@ -2794,11 +2757,11 @@ qla2x00_get_idma_speed(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2794 | mbx_cmd_t mc; | 2757 | mbx_cmd_t mc; |
2795 | mbx_cmd_t *mcp = &mc; | 2758 | mbx_cmd_t *mcp = &mc; |
2796 | 2759 | ||
2760 | ql_dbg(ql_dbg_mbx, vha, 0x10b0, "Entered %s.\n", __func__); | ||
2761 | |||
2797 | if (!IS_IIDMA_CAPABLE(vha->hw)) | 2762 | if (!IS_IIDMA_CAPABLE(vha->hw)) |
2798 | return QLA_FUNCTION_FAILED; | 2763 | return QLA_FUNCTION_FAILED; |
2799 | 2764 | ||
2800 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
2801 | |||
2802 | mcp->mb[0] = MBC_PORT_PARAMS; | 2765 | mcp->mb[0] = MBC_PORT_PARAMS; |
2803 | mcp->mb[1] = loop_id; | 2766 | mcp->mb[1] = loop_id; |
2804 | mcp->mb[2] = mcp->mb[3] = 0; | 2767 | mcp->mb[2] = mcp->mb[3] = 0; |
@@ -2817,10 +2780,9 @@ qla2x00_get_idma_speed(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2817 | } | 2780 | } |
2818 | 2781 | ||
2819 | if (rval != QLA_SUCCESS) { | 2782 | if (rval != QLA_SUCCESS) { |
2820 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2783 | ql_dbg(ql_dbg_mbx, vha, 0x10b1, "Failed=%x.\n", rval); |
2821 | vha->host_no, rval)); | ||
2822 | } else { | 2784 | } else { |
2823 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2785 | ql_dbg(ql_dbg_mbx, vha, 0x10b2, "Done %s.\n", __func__); |
2824 | if (port_speed) | 2786 | if (port_speed) |
2825 | *port_speed = mcp->mb[3]; | 2787 | *port_speed = mcp->mb[3]; |
2826 | } | 2788 | } |
@@ -2836,11 +2798,11 @@ qla2x00_set_idma_speed(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2836 | mbx_cmd_t mc; | 2798 | mbx_cmd_t mc; |
2837 | mbx_cmd_t *mcp = &mc; | 2799 | mbx_cmd_t *mcp = &mc; |
2838 | 2800 | ||
2801 | ql_dbg(ql_dbg_mbx, vha, 0x10b3, "Entered %s.\n", __func__); | ||
2802 | |||
2839 | if (!IS_IIDMA_CAPABLE(vha->hw)) | 2803 | if (!IS_IIDMA_CAPABLE(vha->hw)) |
2840 | return QLA_FUNCTION_FAILED; | 2804 | return QLA_FUNCTION_FAILED; |
2841 | 2805 | ||
2842 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
2843 | |||
2844 | mcp->mb[0] = MBC_PORT_PARAMS; | 2806 | mcp->mb[0] = MBC_PORT_PARAMS; |
2845 | mcp->mb[1] = loop_id; | 2807 | mcp->mb[1] = loop_id; |
2846 | mcp->mb[2] = BIT_0; | 2808 | mcp->mb[2] = BIT_0; |
@@ -2863,10 +2825,9 @@ qla2x00_set_idma_speed(scsi_qla_host_t *vha, uint16_t loop_id, | |||
2863 | } | 2825 | } |
2864 | 2826 | ||
2865 | if (rval != QLA_SUCCESS) { | 2827 | if (rval != QLA_SUCCESS) { |
2866 | DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, | 2828 | ql_dbg(ql_dbg_mbx, vha, 0x10b4, "Failed=%x.\n", rval); |
2867 | vha->host_no, rval)); | ||
2868 | } else { | 2829 | } else { |
2869 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 2830 | ql_dbg(ql_dbg_mbx, vha, 0x10b5, "Done %s.\n", __func__); |
2870 | } | 2831 | } |
2871 | 2832 | ||
2872 | return rval; | 2833 | return rval; |
@@ -2882,33 +2843,36 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *vha, | |||
2882 | scsi_qla_host_t *vp; | 2843 | scsi_qla_host_t *vp; |
2883 | unsigned long flags; | 2844 | unsigned long flags; |
2884 | 2845 | ||
2846 | ql_dbg(ql_dbg_mbx, vha, 0x10b6, "Entered %s.\n", __func__); | ||
2847 | |||
2885 | if (rptid_entry->entry_status != 0) | 2848 | if (rptid_entry->entry_status != 0) |
2886 | return; | 2849 | return; |
2887 | 2850 | ||
2888 | if (rptid_entry->format == 0) { | 2851 | if (rptid_entry->format == 0) { |
2889 | DEBUG15(printk("%s:format 0 : scsi(%ld) number of VPs setup %d," | 2852 | ql_dbg(ql_dbg_mbx, vha, 0x10b7, |
2890 | " number of VPs acquired %d\n", __func__, vha->host_no, | 2853 | "Format 0 : Number of VPs setup %d, number of " |
2891 | MSB(le16_to_cpu(rptid_entry->vp_count)), | 2854 | "VPs acquired %d.\n", |
2892 | LSB(le16_to_cpu(rptid_entry->vp_count)))); | 2855 | MSB(le16_to_cpu(rptid_entry->vp_count)), |
2893 | DEBUG15(printk("%s primary port id %02x%02x%02x\n", __func__, | 2856 | LSB(le16_to_cpu(rptid_entry->vp_count))); |
2894 | rptid_entry->port_id[2], rptid_entry->port_id[1], | 2857 | ql_dbg(ql_dbg_mbx, vha, 0x10b8, |
2895 | rptid_entry->port_id[0])); | 2858 | "Primary port id %02x%02x%02x.\n", |
2859 | rptid_entry->port_id[2], rptid_entry->port_id[1], | ||
2860 | rptid_entry->port_id[0]); | ||
2896 | } else if (rptid_entry->format == 1) { | 2861 | } else if (rptid_entry->format == 1) { |
2897 | vp_idx = LSB(stat); | 2862 | vp_idx = LSB(stat); |
2898 | DEBUG15(printk("%s:format 1: scsi(%ld): VP[%d] enabled " | 2863 | ql_dbg(ql_dbg_mbx, vha, 0x10b9, |
2899 | "- status %d - " | 2864 | "Format 1: VP[%d] enabled - status %d - with " |
2900 | "with port id %02x%02x%02x\n", __func__, vha->host_no, | 2865 | "port id %02x%02x%02x.\n", vp_idx, MSB(stat), |
2901 | vp_idx, MSB(stat), | ||
2902 | rptid_entry->port_id[2], rptid_entry->port_id[1], | 2866 | rptid_entry->port_id[2], rptid_entry->port_id[1], |
2903 | rptid_entry->port_id[0])); | 2867 | rptid_entry->port_id[0]); |
2904 | 2868 | ||
2905 | vp = vha; | 2869 | vp = vha; |
2906 | if (vp_idx == 0 && (MSB(stat) != 1)) | 2870 | if (vp_idx == 0 && (MSB(stat) != 1)) |
2907 | goto reg_needed; | 2871 | goto reg_needed; |
2908 | 2872 | ||
2909 | if (MSB(stat) == 1) { | 2873 | if (MSB(stat) == 1) { |
2910 | DEBUG2(printk("scsi(%ld): Could not acquire ID for " | 2874 | ql_dbg(ql_dbg_mbx, vha, 0x10ba, |
2911 | "VP[%d].\n", vha->host_no, vp_idx)); | 2875 | "Could not acquire ID for VP[%d].\n", vp_idx); |
2912 | return; | 2876 | return; |
2913 | } | 2877 | } |
2914 | 2878 | ||
@@ -2963,10 +2927,12 @@ qla24xx_modify_vp_config(scsi_qla_host_t *vha) | |||
2963 | 2927 | ||
2964 | /* This can be called by the parent */ | 2928 | /* This can be called by the parent */ |
2965 | 2929 | ||
2930 | ql_dbg(ql_dbg_mbx, vha, 0x10bb, "Entered %s.\n", __func__); | ||
2931 | |||
2966 | vpmod = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &vpmod_dma); | 2932 | vpmod = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &vpmod_dma); |
2967 | if (!vpmod) { | 2933 | if (!vpmod) { |
2968 | DEBUG2_3(printk("%s(%ld): failed to allocate Modify VP " | 2934 | ql_log(ql_log_warn, vha, 0x10bc, |
2969 | "IOCB.\n", __func__, vha->host_no)); | 2935 | "Failed to allocate modify VP IOCB.\n"); |
2970 | return QLA_MEMORY_ALLOC_FAILED; | 2936 | return QLA_MEMORY_ALLOC_FAILED; |
2971 | } | 2937 | } |
2972 | 2938 | ||
@@ -2983,22 +2949,21 @@ qla24xx_modify_vp_config(scsi_qla_host_t *vha) | |||
2983 | 2949 | ||
2984 | rval = qla2x00_issue_iocb(base_vha, vpmod, vpmod_dma, 0); | 2950 | rval = qla2x00_issue_iocb(base_vha, vpmod, vpmod_dma, 0); |
2985 | if (rval != QLA_SUCCESS) { | 2951 | if (rval != QLA_SUCCESS) { |
2986 | DEBUG2_3_11(printk("%s(%ld): failed to issue VP config IOCB" | 2952 | ql_dbg(ql_dbg_mbx, vha, 0x10bd, |
2987 | "(%x).\n", __func__, base_vha->host_no, rval)); | 2953 | "Failed to issue VP config IOCB (%x).\n", rval); |
2988 | } else if (vpmod->comp_status != 0) { | 2954 | } else if (vpmod->comp_status != 0) { |
2989 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2955 | ql_dbg(ql_dbg_mbx, vha, 0x10be, |
2990 | "-- error status (%x).\n", __func__, base_vha->host_no, | 2956 | "Failed to complete IOCB -- error status (%x).\n", |
2991 | vpmod->comp_status)); | 2957 | vpmod->comp_status); |
2992 | rval = QLA_FUNCTION_FAILED; | 2958 | rval = QLA_FUNCTION_FAILED; |
2993 | } else if (vpmod->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { | 2959 | } else if (vpmod->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { |
2994 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 2960 | ql_dbg(ql_dbg_mbx, vha, 0x10bf, |
2995 | "-- completion status (%x).\n", __func__, base_vha->host_no, | 2961 | "Failed to complete IOCB -- completion status (%x).\n", |
2996 | le16_to_cpu(vpmod->comp_status))); | 2962 | le16_to_cpu(vpmod->comp_status)); |
2997 | rval = QLA_FUNCTION_FAILED; | 2963 | rval = QLA_FUNCTION_FAILED; |
2998 | } else { | 2964 | } else { |
2999 | /* EMPTY */ | 2965 | /* EMPTY */ |
3000 | DEBUG11(printk("%s(%ld): done.\n", __func__, | 2966 | ql_dbg(ql_dbg_mbx, vha, 0x10c0, "Done %s.\n", __func__); |
3001 | base_vha->host_no)); | ||
3002 | fc_vport_set_state(vha->fc_vport, FC_VPORT_INITIALIZING); | 2967 | fc_vport_set_state(vha->fc_vport, FC_VPORT_INITIALIZING); |
3003 | } | 2968 | } |
3004 | dma_pool_free(ha->s_dma_pool, vpmod, vpmod_dma); | 2969 | dma_pool_free(ha->s_dma_pool, vpmod, vpmod_dma); |
@@ -3032,17 +2997,16 @@ qla24xx_control_vp(scsi_qla_host_t *vha, int cmd) | |||
3032 | int vp_index = vha->vp_idx; | 2997 | int vp_index = vha->vp_idx; |
3033 | struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); | 2998 | struct scsi_qla_host *base_vha = pci_get_drvdata(ha->pdev); |
3034 | 2999 | ||
3035 | DEBUG11(printk("%s(%ld): entered. Enabling index %d\n", __func__, | 3000 | ql_dbg(ql_dbg_mbx, vha, 0x10c1, |
3036 | vha->host_no, vp_index)); | 3001 | "Entered %s enabling index %d.\n", __func__, vp_index); |
3037 | 3002 | ||
3038 | if (vp_index == 0 || vp_index >= ha->max_npiv_vports) | 3003 | if (vp_index == 0 || vp_index >= ha->max_npiv_vports) |
3039 | return QLA_PARAMETER_ERROR; | 3004 | return QLA_PARAMETER_ERROR; |
3040 | 3005 | ||
3041 | vce = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &vce_dma); | 3006 | vce = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &vce_dma); |
3042 | if (!vce) { | 3007 | if (!vce) { |
3043 | DEBUG2_3(printk("%s(%ld): " | 3008 | ql_log(ql_log_warn, vha, 0x10c2, |
3044 | "failed to allocate VP Control IOCB.\n", __func__, | 3009 | "Failed to allocate VP control IOCB.\n"); |
3045 | base_vha->host_no)); | ||
3046 | return QLA_MEMORY_ALLOC_FAILED; | 3010 | return QLA_MEMORY_ALLOC_FAILED; |
3047 | } | 3011 | } |
3048 | memset(vce, 0, sizeof(struct vp_ctrl_entry_24xx)); | 3012 | memset(vce, 0, sizeof(struct vp_ctrl_entry_24xx)); |
@@ -3063,28 +3027,20 @@ qla24xx_control_vp(scsi_qla_host_t *vha, int cmd) | |||
3063 | 3027 | ||
3064 | rval = qla2x00_issue_iocb(base_vha, vce, vce_dma, 0); | 3028 | rval = qla2x00_issue_iocb(base_vha, vce, vce_dma, 0); |
3065 | if (rval != QLA_SUCCESS) { | 3029 | if (rval != QLA_SUCCESS) { |
3066 | DEBUG2_3_11(printk("%s(%ld): failed to issue VP control IOCB" | 3030 | ql_dbg(ql_dbg_mbx, vha, 0x10c3, |
3067 | "(%x).\n", __func__, base_vha->host_no, rval)); | 3031 | "Failed to issue VP control IOCB (%x).\n", rval); |
3068 | printk("%s(%ld): failed to issue VP control IOCB" | ||
3069 | "(%x).\n", __func__, base_vha->host_no, rval); | ||
3070 | } else if (vce->entry_status != 0) { | 3032 | } else if (vce->entry_status != 0) { |
3071 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 3033 | ql_dbg(ql_dbg_mbx, vha, 0x10c4, |
3072 | "-- error status (%x).\n", __func__, base_vha->host_no, | 3034 | "Failed to complete IOCB -- error status (%x).\n", |
3073 | vce->entry_status)); | ||
3074 | printk("%s(%ld): failed to complete IOCB " | ||
3075 | "-- error status (%x).\n", __func__, base_vha->host_no, | ||
3076 | vce->entry_status); | 3035 | vce->entry_status); |
3077 | rval = QLA_FUNCTION_FAILED; | 3036 | rval = QLA_FUNCTION_FAILED; |
3078 | } else if (vce->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { | 3037 | } else if (vce->comp_status != __constant_cpu_to_le16(CS_COMPLETE)) { |
3079 | DEBUG2_3_11(printk("%s(%ld): failed to complete IOCB " | 3038 | ql_dbg(ql_dbg_mbx, vha, 0x10c5, |
3080 | "-- completion status (%x).\n", __func__, base_vha->host_no, | 3039 | "Failed to complet IOCB -- completion status (%x).\n", |
3081 | le16_to_cpu(vce->comp_status))); | ||
3082 | printk("%s(%ld): failed to complete IOCB " | ||
3083 | "-- completion status (%x).\n", __func__, base_vha->host_no, | ||
3084 | le16_to_cpu(vce->comp_status)); | 3040 | le16_to_cpu(vce->comp_status)); |
3085 | rval = QLA_FUNCTION_FAILED; | 3041 | rval = QLA_FUNCTION_FAILED; |
3086 | } else { | 3042 | } else { |
3087 | DEBUG2(printk("%s(%ld): done.\n", __func__, base_vha->host_no)); | 3043 | ql_dbg(ql_dbg_mbx, vha, 0x10c6, "Done %s.\n", __func__); |
3088 | } | 3044 | } |
3089 | 3045 | ||
3090 | dma_pool_free(ha->s_dma_pool, vce, vce_dma); | 3046 | dma_pool_free(ha->s_dma_pool, vce, vce_dma); |
@@ -3121,6 +3077,8 @@ qla2x00_send_change_request(scsi_qla_host_t *vha, uint16_t format, | |||
3121 | mbx_cmd_t mc; | 3077 | mbx_cmd_t mc; |
3122 | mbx_cmd_t *mcp = &mc; | 3078 | mbx_cmd_t *mcp = &mc; |
3123 | 3079 | ||
3080 | ql_dbg(ql_dbg_mbx, vha, 0x10c7, "Entered %s.\n", __func__); | ||
3081 | |||
3124 | /* | 3082 | /* |
3125 | * This command is implicitly executed by firmware during login for the | 3083 | * This command is implicitly executed by firmware during login for the |
3126 | * physical hosts | 3084 | * physical hosts |
@@ -3155,7 +3113,7 @@ qla2x00_dump_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t addr, | |||
3155 | mbx_cmd_t mc; | 3113 | mbx_cmd_t mc; |
3156 | mbx_cmd_t *mcp = &mc; | 3114 | mbx_cmd_t *mcp = &mc; |
3157 | 3115 | ||
3158 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 3116 | ql_dbg(ql_dbg_mbx, vha, 0x1009, "Entered %s.\n", __func__); |
3159 | 3117 | ||
3160 | if (MSW(addr) || IS_FWI2_CAPABLE(vha->hw)) { | 3118 | if (MSW(addr) || IS_FWI2_CAPABLE(vha->hw)) { |
3161 | mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; | 3119 | mcp->mb[0] = MBC_DUMP_RISC_RAM_EXTENDED; |
@@ -3186,10 +3144,10 @@ qla2x00_dump_ram(scsi_qla_host_t *vha, dma_addr_t req_dma, uint32_t addr, | |||
3186 | rval = qla2x00_mailbox_command(vha, mcp); | 3144 | rval = qla2x00_mailbox_command(vha, mcp); |
3187 | 3145 | ||
3188 | if (rval != QLA_SUCCESS) { | 3146 | if (rval != QLA_SUCCESS) { |
3189 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 3147 | ql_dbg(ql_dbg_mbx, vha, 0x1008, |
3190 | vha->host_no, rval, mcp->mb[0])); | 3148 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3191 | } else { | 3149 | } else { |
3192 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3150 | ql_dbg(ql_dbg_mbx, vha, 0x1007, "Done %s.\n", __func__); |
3193 | } | 3151 | } |
3194 | 3152 | ||
3195 | return rval; | 3153 | return rval; |
@@ -3214,12 +3172,10 @@ qla84xx_verify_chip(struct scsi_qla_host *vha, uint16_t *status) | |||
3214 | unsigned long flags; | 3172 | unsigned long flags; |
3215 | struct qla_hw_data *ha = vha->hw; | 3173 | struct qla_hw_data *ha = vha->hw; |
3216 | 3174 | ||
3217 | DEBUG16(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 3175 | ql_dbg(ql_dbg_mbx, vha, 0x10c8, "Entered %s.\n", __func__); |
3218 | 3176 | ||
3219 | mn = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); | 3177 | mn = dma_pool_alloc(ha->s_dma_pool, GFP_KERNEL, &mn_dma); |
3220 | if (mn == NULL) { | 3178 | if (mn == NULL) { |
3221 | DEBUG2_3(printk("%s(%ld): failed to allocate Verify ISP84XX " | ||
3222 | "IOCB.\n", __func__, vha->host_no)); | ||
3223 | return QLA_MEMORY_ALLOC_FAILED; | 3179 | return QLA_MEMORY_ALLOC_FAILED; |
3224 | } | 3180 | } |
3225 | 3181 | ||
@@ -3237,43 +3193,43 @@ qla84xx_verify_chip(struct scsi_qla_host *vha, uint16_t *status) | |||
3237 | mn->p.req.entry_count = 1; | 3193 | mn->p.req.entry_count = 1; |
3238 | mn->p.req.options = cpu_to_le16(options); | 3194 | mn->p.req.options = cpu_to_le16(options); |
3239 | 3195 | ||
3240 | DEBUG16(printk("%s(%ld): Dump of Verify Request.\n", __func__, | 3196 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x111c, |
3241 | vha->host_no)); | 3197 | "Dump of Verify Request.\n"); |
3242 | DEBUG16(qla2x00_dump_buffer((uint8_t *)mn, | 3198 | ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x111e, |
3243 | sizeof(*mn))); | 3199 | (uint8_t *)mn, sizeof(*mn)); |
3244 | 3200 | ||
3245 | rval = qla2x00_issue_iocb_timeout(vha, mn, mn_dma, 0, 120); | 3201 | rval = qla2x00_issue_iocb_timeout(vha, mn, mn_dma, 0, 120); |
3246 | if (rval != QLA_SUCCESS) { | 3202 | if (rval != QLA_SUCCESS) { |
3247 | DEBUG2_16(printk("%s(%ld): failed to issue Verify " | 3203 | ql_dbg(ql_dbg_mbx, vha, 0x10cb, |
3248 | "IOCB (%x).\n", __func__, vha->host_no, rval)); | 3204 | "Failed to issue verify IOCB (%x).\n", rval); |
3249 | goto verify_done; | 3205 | goto verify_done; |
3250 | } | 3206 | } |
3251 | 3207 | ||
3252 | DEBUG16(printk("%s(%ld): Dump of Verify Response.\n", __func__, | 3208 | ql_dbg(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1110, |
3253 | vha->host_no)); | 3209 | "Dump of Verify Response.\n"); |
3254 | DEBUG16(qla2x00_dump_buffer((uint8_t *)mn, | 3210 | ql_dump_buffer(ql_dbg_mbx + ql_dbg_buffer, vha, 0x1118, |
3255 | sizeof(*mn))); | 3211 | (uint8_t *)mn, sizeof(*mn)); |
3256 | 3212 | ||
3257 | status[0] = le16_to_cpu(mn->p.rsp.comp_status); | 3213 | status[0] = le16_to_cpu(mn->p.rsp.comp_status); |
3258 | status[1] = status[0] == CS_VCS_CHIP_FAILURE ? | 3214 | status[1] = status[0] == CS_VCS_CHIP_FAILURE ? |
3259 | le16_to_cpu(mn->p.rsp.failure_code) : 0; | 3215 | le16_to_cpu(mn->p.rsp.failure_code) : 0; |
3260 | DEBUG2_16(printk("%s(%ld): cs=%x fc=%x\n", __func__, | 3216 | ql_dbg(ql_dbg_mbx, vha, 0x10ce, |
3261 | vha->host_no, status[0], status[1])); | 3217 | "cs=%x fc=%x.\n", status[0], status[1]); |
3262 | 3218 | ||
3263 | if (status[0] != CS_COMPLETE) { | 3219 | if (status[0] != CS_COMPLETE) { |
3264 | rval = QLA_FUNCTION_FAILED; | 3220 | rval = QLA_FUNCTION_FAILED; |
3265 | if (!(options & VCO_DONT_UPDATE_FW)) { | 3221 | if (!(options & VCO_DONT_UPDATE_FW)) { |
3266 | DEBUG2_16(printk("%s(%ld): Firmware update " | 3222 | ql_dbg(ql_dbg_mbx, vha, 0x10cf, |
3267 | "failed. Retrying without update " | 3223 | "Firmware update failed. Retrying " |
3268 | "firmware.\n", __func__, vha->host_no)); | 3224 | "without update firmware.\n"); |
3269 | options |= VCO_DONT_UPDATE_FW; | 3225 | options |= VCO_DONT_UPDATE_FW; |
3270 | options &= ~VCO_FORCE_UPDATE; | 3226 | options &= ~VCO_FORCE_UPDATE; |
3271 | retry = 1; | 3227 | retry = 1; |
3272 | } | 3228 | } |
3273 | } else { | 3229 | } else { |
3274 | DEBUG2_16(printk("%s(%ld): firmware updated to %x.\n", | 3230 | ql_dbg(ql_dbg_mbx, vha, 0x10d0, |
3275 | __func__, vha->host_no, | 3231 | "Firmware updated to %x.\n", |
3276 | le32_to_cpu(mn->p.rsp.fw_ver))); | 3232 | le32_to_cpu(mn->p.rsp.fw_ver)); |
3277 | 3233 | ||
3278 | /* NOTE: we only update OP firmware. */ | 3234 | /* NOTE: we only update OP firmware. */ |
3279 | spin_lock_irqsave(&ha->cs84xx->access_lock, flags); | 3235 | spin_lock_irqsave(&ha->cs84xx->access_lock, flags); |
@@ -3288,10 +3244,9 @@ verify_done: | |||
3288 | dma_pool_free(ha->s_dma_pool, mn, mn_dma); | 3244 | dma_pool_free(ha->s_dma_pool, mn, mn_dma); |
3289 | 3245 | ||
3290 | if (rval != QLA_SUCCESS) { | 3246 | if (rval != QLA_SUCCESS) { |
3291 | DEBUG2_16(printk("%s(%ld): failed=%x.\n", __func__, | 3247 | ql_dbg(ql_dbg_mbx, vha, 0x10d1, "Failed=%x.\n", rval); |
3292 | vha->host_no, rval)); | ||
3293 | } else { | 3248 | } else { |
3294 | DEBUG16(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3249 | ql_dbg(ql_dbg_mbx, vha, 0x10d2, "Done %s.\n", __func__); |
3295 | } | 3250 | } |
3296 | 3251 | ||
3297 | return rval; | 3252 | return rval; |
@@ -3307,6 +3262,8 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req) | |||
3307 | struct device_reg_25xxmq __iomem *reg; | 3262 | struct device_reg_25xxmq __iomem *reg; |
3308 | struct qla_hw_data *ha = vha->hw; | 3263 | struct qla_hw_data *ha = vha->hw; |
3309 | 3264 | ||
3265 | ql_dbg(ql_dbg_mbx, vha, 0x10d3, "Entered %s.\n", __func__); | ||
3266 | |||
3310 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; | 3267 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; |
3311 | mcp->mb[1] = req->options; | 3268 | mcp->mb[1] = req->options; |
3312 | mcp->mb[2] = MSW(LSD(req->dma)); | 3269 | mcp->mb[2] = MSW(LSD(req->dma)); |
@@ -3344,9 +3301,13 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req) | |||
3344 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3301 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3345 | 3302 | ||
3346 | rval = qla2x00_mailbox_command(vha, mcp); | 3303 | rval = qla2x00_mailbox_command(vha, mcp); |
3347 | if (rval != QLA_SUCCESS) | 3304 | if (rval != QLA_SUCCESS) { |
3348 | DEBUG2_3_11(printk(KERN_WARNING "%s(%ld): failed=%x mb0=%x.\n", | 3305 | ql_dbg(ql_dbg_mbx, vha, 0x10d4, |
3349 | __func__, vha->host_no, rval, mcp->mb[0])); | 3306 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3307 | } else { | ||
3308 | ql_dbg(ql_dbg_mbx, vha, 0x10d5, "Done %s.\n", __func__); | ||
3309 | } | ||
3310 | |||
3350 | return rval; | 3311 | return rval; |
3351 | } | 3312 | } |
3352 | 3313 | ||
@@ -3360,6 +3321,8 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) | |||
3360 | struct device_reg_25xxmq __iomem *reg; | 3321 | struct device_reg_25xxmq __iomem *reg; |
3361 | struct qla_hw_data *ha = vha->hw; | 3322 | struct qla_hw_data *ha = vha->hw; |
3362 | 3323 | ||
3324 | ql_dbg(ql_dbg_mbx, vha, 0x10d6, "Entered %s.\n", __func__); | ||
3325 | |||
3363 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; | 3326 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; |
3364 | mcp->mb[1] = rsp->options; | 3327 | mcp->mb[1] = rsp->options; |
3365 | mcp->mb[2] = MSW(LSD(rsp->dma)); | 3328 | mcp->mb[2] = MSW(LSD(rsp->dma)); |
@@ -3393,10 +3356,13 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) | |||
3393 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3356 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3394 | 3357 | ||
3395 | rval = qla2x00_mailbox_command(vha, mcp); | 3358 | rval = qla2x00_mailbox_command(vha, mcp); |
3396 | if (rval != QLA_SUCCESS) | 3359 | if (rval != QLA_SUCCESS) { |
3397 | DEBUG2_3_11(printk(KERN_WARNING "%s(%ld): failed=%x " | 3360 | ql_dbg(ql_dbg_mbx, vha, 0x10d7, |
3398 | "mb0=%x.\n", __func__, | 3361 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3399 | vha->host_no, rval, mcp->mb[0])); | 3362 | } else { |
3363 | ql_dbg(ql_dbg_mbx, vha, 0x10d8, "Done %s.\n", __func__); | ||
3364 | } | ||
3365 | |||
3400 | return rval; | 3366 | return rval; |
3401 | } | 3367 | } |
3402 | 3368 | ||
@@ -3407,7 +3373,7 @@ qla81xx_idc_ack(scsi_qla_host_t *vha, uint16_t *mb) | |||
3407 | mbx_cmd_t mc; | 3373 | mbx_cmd_t mc; |
3408 | mbx_cmd_t *mcp = &mc; | 3374 | mbx_cmd_t *mcp = &mc; |
3409 | 3375 | ||
3410 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 3376 | ql_dbg(ql_dbg_mbx, vha, 0x10d9, "Entered %s.\n", __func__); |
3411 | 3377 | ||
3412 | mcp->mb[0] = MBC_IDC_ACK; | 3378 | mcp->mb[0] = MBC_IDC_ACK; |
3413 | memcpy(&mcp->mb[1], mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); | 3379 | memcpy(&mcp->mb[1], mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); |
@@ -3418,10 +3384,10 @@ qla81xx_idc_ack(scsi_qla_host_t *vha, uint16_t *mb) | |||
3418 | rval = qla2x00_mailbox_command(vha, mcp); | 3384 | rval = qla2x00_mailbox_command(vha, mcp); |
3419 | 3385 | ||
3420 | if (rval != QLA_SUCCESS) { | 3386 | if (rval != QLA_SUCCESS) { |
3421 | DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__, | 3387 | ql_dbg(ql_dbg_mbx, vha, 0x10da, |
3422 | vha->host_no, rval, mcp->mb[0])); | 3388 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3423 | } else { | 3389 | } else { |
3424 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3390 | ql_dbg(ql_dbg_mbx, vha, 0x10db, "Done %s.\n", __func__); |
3425 | } | 3391 | } |
3426 | 3392 | ||
3427 | return rval; | 3393 | return rval; |
@@ -3434,11 +3400,11 @@ qla81xx_fac_get_sector_size(scsi_qla_host_t *vha, uint32_t *sector_size) | |||
3434 | mbx_cmd_t mc; | 3400 | mbx_cmd_t mc; |
3435 | mbx_cmd_t *mcp = &mc; | 3401 | mbx_cmd_t *mcp = &mc; |
3436 | 3402 | ||
3403 | ql_dbg(ql_dbg_mbx, vha, 0x10dc, "Entered %s.\n", __func__); | ||
3404 | |||
3437 | if (!IS_QLA81XX(vha->hw)) | 3405 | if (!IS_QLA81XX(vha->hw)) |
3438 | return QLA_FUNCTION_FAILED; | 3406 | return QLA_FUNCTION_FAILED; |
3439 | 3407 | ||
3440 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3441 | |||
3442 | mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; | 3408 | mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; |
3443 | mcp->mb[1] = FAC_OPT_CMD_GET_SECTOR_SIZE; | 3409 | mcp->mb[1] = FAC_OPT_CMD_GET_SECTOR_SIZE; |
3444 | mcp->out_mb = MBX_1|MBX_0; | 3410 | mcp->out_mb = MBX_1|MBX_0; |
@@ -3448,10 +3414,11 @@ qla81xx_fac_get_sector_size(scsi_qla_host_t *vha, uint32_t *sector_size) | |||
3448 | rval = qla2x00_mailbox_command(vha, mcp); | 3414 | rval = qla2x00_mailbox_command(vha, mcp); |
3449 | 3415 | ||
3450 | if (rval != QLA_SUCCESS) { | 3416 | if (rval != QLA_SUCCESS) { |
3451 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 3417 | ql_dbg(ql_dbg_mbx, vha, 0x10dd, |
3452 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 3418 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
3419 | rval, mcp->mb[0], mcp->mb[1]); | ||
3453 | } else { | 3420 | } else { |
3454 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3421 | ql_dbg(ql_dbg_mbx, vha, 0x10de, "Done %s.\n", __func__); |
3455 | *sector_size = mcp->mb[1]; | 3422 | *sector_size = mcp->mb[1]; |
3456 | } | 3423 | } |
3457 | 3424 | ||
@@ -3468,7 +3435,7 @@ qla81xx_fac_do_write_enable(scsi_qla_host_t *vha, int enable) | |||
3468 | if (!IS_QLA81XX(vha->hw)) | 3435 | if (!IS_QLA81XX(vha->hw)) |
3469 | return QLA_FUNCTION_FAILED; | 3436 | return QLA_FUNCTION_FAILED; |
3470 | 3437 | ||
3471 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 3438 | ql_dbg(ql_dbg_mbx, vha, 0x10df, "Entered %s.\n", __func__); |
3472 | 3439 | ||
3473 | mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; | 3440 | mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; |
3474 | mcp->mb[1] = enable ? FAC_OPT_CMD_WRITE_ENABLE : | 3441 | mcp->mb[1] = enable ? FAC_OPT_CMD_WRITE_ENABLE : |
@@ -3480,10 +3447,11 @@ qla81xx_fac_do_write_enable(scsi_qla_host_t *vha, int enable) | |||
3480 | rval = qla2x00_mailbox_command(vha, mcp); | 3447 | rval = qla2x00_mailbox_command(vha, mcp); |
3481 | 3448 | ||
3482 | if (rval != QLA_SUCCESS) { | 3449 | if (rval != QLA_SUCCESS) { |
3483 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x.\n", | 3450 | ql_dbg(ql_dbg_mbx, vha, 0x10e0, |
3484 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 3451 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
3452 | rval, mcp->mb[0], mcp->mb[1]); | ||
3485 | } else { | 3453 | } else { |
3486 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3454 | ql_dbg(ql_dbg_mbx, vha, 0x10e1, "Done %s.\n", __func__); |
3487 | } | 3455 | } |
3488 | 3456 | ||
3489 | return rval; | 3457 | return rval; |
@@ -3499,7 +3467,7 @@ qla81xx_fac_erase_sector(scsi_qla_host_t *vha, uint32_t start, uint32_t finish) | |||
3499 | if (!IS_QLA81XX(vha->hw)) | 3467 | if (!IS_QLA81XX(vha->hw)) |
3500 | return QLA_FUNCTION_FAILED; | 3468 | return QLA_FUNCTION_FAILED; |
3501 | 3469 | ||
3502 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 3470 | ql_dbg(ql_dbg_mbx, vha, 0x10e2, "Entered %s.\n", __func__); |
3503 | 3471 | ||
3504 | mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; | 3472 | mcp->mb[0] = MBC_FLASH_ACCESS_CTRL; |
3505 | mcp->mb[1] = FAC_OPT_CMD_ERASE_SECTOR; | 3473 | mcp->mb[1] = FAC_OPT_CMD_ERASE_SECTOR; |
@@ -3514,11 +3482,11 @@ qla81xx_fac_erase_sector(scsi_qla_host_t *vha, uint32_t start, uint32_t finish) | |||
3514 | rval = qla2x00_mailbox_command(vha, mcp); | 3482 | rval = qla2x00_mailbox_command(vha, mcp); |
3515 | 3483 | ||
3516 | if (rval != QLA_SUCCESS) { | 3484 | if (rval != QLA_SUCCESS) { |
3517 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " | 3485 | ql_dbg(ql_dbg_mbx, vha, 0x10e3, |
3518 | "mb[2]=%x.\n", __func__, vha->host_no, rval, mcp->mb[0], | 3486 | "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", |
3519 | mcp->mb[1], mcp->mb[2])); | 3487 | rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); |
3520 | } else { | 3488 | } else { |
3521 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3489 | ql_dbg(ql_dbg_mbx, vha, 0x10e4, "Done %s.\n", __func__); |
3522 | } | 3490 | } |
3523 | 3491 | ||
3524 | return rval; | 3492 | return rval; |
@@ -3531,7 +3499,7 @@ qla81xx_restart_mpi_firmware(scsi_qla_host_t *vha) | |||
3531 | mbx_cmd_t mc; | 3499 | mbx_cmd_t mc; |
3532 | mbx_cmd_t *mcp = &mc; | 3500 | mbx_cmd_t *mcp = &mc; |
3533 | 3501 | ||
3534 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | 3502 | ql_dbg(ql_dbg_mbx, vha, 0x10e5, "Entered %s.\n", __func__); |
3535 | 3503 | ||
3536 | mcp->mb[0] = MBC_RESTART_MPI_FW; | 3504 | mcp->mb[0] = MBC_RESTART_MPI_FW; |
3537 | mcp->out_mb = MBX_0; | 3505 | mcp->out_mb = MBX_0; |
@@ -3541,10 +3509,11 @@ qla81xx_restart_mpi_firmware(scsi_qla_host_t *vha) | |||
3541 | rval = qla2x00_mailbox_command(vha, mcp); | 3509 | rval = qla2x00_mailbox_command(vha, mcp); |
3542 | 3510 | ||
3543 | if (rval != QLA_SUCCESS) { | 3511 | if (rval != QLA_SUCCESS) { |
3544 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=0x%x mb[1]=0x%x.\n", | 3512 | ql_dbg(ql_dbg_mbx, vha, 0x10e6, |
3545 | __func__, vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 3513 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
3514 | rval, mcp->mb[0], mcp->mb[1]); | ||
3546 | } else { | 3515 | } else { |
3547 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3516 | ql_dbg(ql_dbg_mbx, vha, 0x10e7, "Done %s.\n", __func__); |
3548 | } | 3517 | } |
3549 | 3518 | ||
3550 | return rval; | 3519 | return rval; |
@@ -3559,11 +3528,11 @@ qla2x00_read_sfp(scsi_qla_host_t *vha, dma_addr_t sfp_dma, uint8_t *sfp, | |||
3559 | mbx_cmd_t *mcp = &mc; | 3528 | mbx_cmd_t *mcp = &mc; |
3560 | struct qla_hw_data *ha = vha->hw; | 3529 | struct qla_hw_data *ha = vha->hw; |
3561 | 3530 | ||
3531 | ql_dbg(ql_dbg_mbx, vha, 0x10e8, "Entered %s.\n", __func__); | ||
3532 | |||
3562 | if (!IS_FWI2_CAPABLE(ha)) | 3533 | if (!IS_FWI2_CAPABLE(ha)) |
3563 | return QLA_FUNCTION_FAILED; | 3534 | return QLA_FUNCTION_FAILED; |
3564 | 3535 | ||
3565 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3566 | |||
3567 | if (len == 1) | 3536 | if (len == 1) |
3568 | opt |= BIT_0; | 3537 | opt |= BIT_0; |
3569 | 3538 | ||
@@ -3586,10 +3555,10 @@ qla2x00_read_sfp(scsi_qla_host_t *vha, dma_addr_t sfp_dma, uint8_t *sfp, | |||
3586 | *sfp = mcp->mb[1]; | 3555 | *sfp = mcp->mb[1]; |
3587 | 3556 | ||
3588 | if (rval != QLA_SUCCESS) { | 3557 | if (rval != QLA_SUCCESS) { |
3589 | DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__, | 3558 | ql_dbg(ql_dbg_mbx, vha, 0x10e9, |
3590 | vha->host_no, rval, mcp->mb[0])); | 3559 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3591 | } else { | 3560 | } else { |
3592 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3561 | ql_dbg(ql_dbg_mbx, vha, 0x10ea, "Done %s.\n", __func__); |
3593 | } | 3562 | } |
3594 | 3563 | ||
3595 | return rval; | 3564 | return rval; |
@@ -3604,11 +3573,11 @@ qla2x00_write_sfp(scsi_qla_host_t *vha, dma_addr_t sfp_dma, uint8_t *sfp, | |||
3604 | mbx_cmd_t *mcp = &mc; | 3573 | mbx_cmd_t *mcp = &mc; |
3605 | struct qla_hw_data *ha = vha->hw; | 3574 | struct qla_hw_data *ha = vha->hw; |
3606 | 3575 | ||
3576 | ql_dbg(ql_dbg_mbx, vha, 0x10eb, "Entered %s.\n", __func__); | ||
3577 | |||
3607 | if (!IS_FWI2_CAPABLE(ha)) | 3578 | if (!IS_FWI2_CAPABLE(ha)) |
3608 | return QLA_FUNCTION_FAILED; | 3579 | return QLA_FUNCTION_FAILED; |
3609 | 3580 | ||
3610 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3611 | |||
3612 | if (len == 1) | 3581 | if (len == 1) |
3613 | opt |= BIT_0; | 3582 | opt |= BIT_0; |
3614 | 3583 | ||
@@ -3631,10 +3600,10 @@ qla2x00_write_sfp(scsi_qla_host_t *vha, dma_addr_t sfp_dma, uint8_t *sfp, | |||
3631 | rval = qla2x00_mailbox_command(vha, mcp); | 3600 | rval = qla2x00_mailbox_command(vha, mcp); |
3632 | 3601 | ||
3633 | if (rval != QLA_SUCCESS) { | 3602 | if (rval != QLA_SUCCESS) { |
3634 | DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__, | 3603 | ql_dbg(ql_dbg_mbx, vha, 0x10ec, |
3635 | vha->host_no, rval, mcp->mb[0])); | 3604 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3636 | } else { | 3605 | } else { |
3637 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3606 | ql_dbg(ql_dbg_mbx, vha, 0x10ed, "Done %s.\n", __func__); |
3638 | } | 3607 | } |
3639 | 3608 | ||
3640 | return rval; | 3609 | return rval; |
@@ -3648,11 +3617,11 @@ qla2x00_get_xgmac_stats(scsi_qla_host_t *vha, dma_addr_t stats_dma, | |||
3648 | mbx_cmd_t mc; | 3617 | mbx_cmd_t mc; |
3649 | mbx_cmd_t *mcp = &mc; | 3618 | mbx_cmd_t *mcp = &mc; |
3650 | 3619 | ||
3620 | ql_dbg(ql_dbg_mbx, vha, 0x10ee, "Entered %s.\n", __func__); | ||
3621 | |||
3651 | if (!IS_QLA8XXX_TYPE(vha->hw)) | 3622 | if (!IS_QLA8XXX_TYPE(vha->hw)) |
3652 | return QLA_FUNCTION_FAILED; | 3623 | return QLA_FUNCTION_FAILED; |
3653 | 3624 | ||
3654 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3655 | |||
3656 | mcp->mb[0] = MBC_GET_XGMAC_STATS; | 3625 | mcp->mb[0] = MBC_GET_XGMAC_STATS; |
3657 | mcp->mb[2] = MSW(stats_dma); | 3626 | mcp->mb[2] = MSW(stats_dma); |
3658 | mcp->mb[3] = LSW(stats_dma); | 3627 | mcp->mb[3] = LSW(stats_dma); |
@@ -3666,11 +3635,12 @@ qla2x00_get_xgmac_stats(scsi_qla_host_t *vha, dma_addr_t stats_dma, | |||
3666 | rval = qla2x00_mailbox_command(vha, mcp); | 3635 | rval = qla2x00_mailbox_command(vha, mcp); |
3667 | 3636 | ||
3668 | if (rval != QLA_SUCCESS) { | 3637 | if (rval != QLA_SUCCESS) { |
3669 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=0x%x " | 3638 | ql_dbg(ql_dbg_mbx, vha, 0x10ef, |
3670 | "mb[1]=0x%x mb[2]=0x%x.\n", __func__, vha->host_no, rval, | 3639 | "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", |
3671 | mcp->mb[0], mcp->mb[1], mcp->mb[2])); | 3640 | rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); |
3672 | } else { | 3641 | } else { |
3673 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3642 | ql_dbg(ql_dbg_mbx, vha, 0x10f0, "Done %s.\n", __func__); |
3643 | |||
3674 | 3644 | ||
3675 | *actual_size = mcp->mb[2] << 2; | 3645 | *actual_size = mcp->mb[2] << 2; |
3676 | } | 3646 | } |
@@ -3686,11 +3656,11 @@ qla2x00_get_dcbx_params(scsi_qla_host_t *vha, dma_addr_t tlv_dma, | |||
3686 | mbx_cmd_t mc; | 3656 | mbx_cmd_t mc; |
3687 | mbx_cmd_t *mcp = &mc; | 3657 | mbx_cmd_t *mcp = &mc; |
3688 | 3658 | ||
3659 | ql_dbg(ql_dbg_mbx, vha, 0x10f1, "Entered %s.\n", __func__); | ||
3660 | |||
3689 | if (!IS_QLA8XXX_TYPE(vha->hw)) | 3661 | if (!IS_QLA8XXX_TYPE(vha->hw)) |
3690 | return QLA_FUNCTION_FAILED; | 3662 | return QLA_FUNCTION_FAILED; |
3691 | 3663 | ||
3692 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3693 | |||
3694 | mcp->mb[0] = MBC_GET_DCBX_PARAMS; | 3664 | mcp->mb[0] = MBC_GET_DCBX_PARAMS; |
3695 | mcp->mb[1] = 0; | 3665 | mcp->mb[1] = 0; |
3696 | mcp->mb[2] = MSW(tlv_dma); | 3666 | mcp->mb[2] = MSW(tlv_dma); |
@@ -3705,11 +3675,11 @@ qla2x00_get_dcbx_params(scsi_qla_host_t *vha, dma_addr_t tlv_dma, | |||
3705 | rval = qla2x00_mailbox_command(vha, mcp); | 3675 | rval = qla2x00_mailbox_command(vha, mcp); |
3706 | 3676 | ||
3707 | if (rval != QLA_SUCCESS) { | 3677 | if (rval != QLA_SUCCESS) { |
3708 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=0x%x " | 3678 | ql_dbg(ql_dbg_mbx, vha, 0x10f2, |
3709 | "mb[1]=0x%x mb[2]=0x%x.\n", __func__, vha->host_no, rval, | 3679 | "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x.\n", |
3710 | mcp->mb[0], mcp->mb[1], mcp->mb[2])); | 3680 | rval, mcp->mb[0], mcp->mb[1], mcp->mb[2]); |
3711 | } else { | 3681 | } else { |
3712 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3682 | ql_dbg(ql_dbg_mbx, vha, 0x10f3, "Done %s.\n", __func__); |
3713 | } | 3683 | } |
3714 | 3684 | ||
3715 | return rval; | 3685 | return rval; |
@@ -3722,11 +3692,11 @@ qla2x00_read_ram_word(scsi_qla_host_t *vha, uint32_t risc_addr, uint32_t *data) | |||
3722 | mbx_cmd_t mc; | 3692 | mbx_cmd_t mc; |
3723 | mbx_cmd_t *mcp = &mc; | 3693 | mbx_cmd_t *mcp = &mc; |
3724 | 3694 | ||
3695 | ql_dbg(ql_dbg_mbx, vha, 0x10f4, "Entered %s.\n", __func__); | ||
3696 | |||
3725 | if (!IS_FWI2_CAPABLE(vha->hw)) | 3697 | if (!IS_FWI2_CAPABLE(vha->hw)) |
3726 | return QLA_FUNCTION_FAILED; | 3698 | return QLA_FUNCTION_FAILED; |
3727 | 3699 | ||
3728 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3729 | |||
3730 | mcp->mb[0] = MBC_READ_RAM_EXTENDED; | 3700 | mcp->mb[0] = MBC_READ_RAM_EXTENDED; |
3731 | mcp->mb[1] = LSW(risc_addr); | 3701 | mcp->mb[1] = LSW(risc_addr); |
3732 | mcp->mb[8] = MSW(risc_addr); | 3702 | mcp->mb[8] = MSW(risc_addr); |
@@ -3736,10 +3706,10 @@ qla2x00_read_ram_word(scsi_qla_host_t *vha, uint32_t risc_addr, uint32_t *data) | |||
3736 | mcp->flags = 0; | 3706 | mcp->flags = 0; |
3737 | rval = qla2x00_mailbox_command(vha, mcp); | 3707 | rval = qla2x00_mailbox_command(vha, mcp); |
3738 | if (rval != QLA_SUCCESS) { | 3708 | if (rval != QLA_SUCCESS) { |
3739 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 3709 | ql_dbg(ql_dbg_mbx, vha, 0x10f5, |
3740 | vha->host_no, rval, mcp->mb[0])); | 3710 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3741 | } else { | 3711 | } else { |
3742 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3712 | ql_dbg(ql_dbg_mbx, vha, 0x10f6, "Done %s.\n", __func__); |
3743 | *data = mcp->mb[3] << 16 | mcp->mb[2]; | 3713 | *data = mcp->mb[3] << 16 | mcp->mb[2]; |
3744 | } | 3714 | } |
3745 | 3715 | ||
@@ -3755,7 +3725,7 @@ qla2x00_loopback_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
3755 | mbx_cmd_t *mcp = &mc; | 3725 | mbx_cmd_t *mcp = &mc; |
3756 | uint32_t iter_cnt = 0x1; | 3726 | uint32_t iter_cnt = 0x1; |
3757 | 3727 | ||
3758 | DEBUG11(printk("scsi(%ld): entered.\n", vha->host_no)); | 3728 | ql_dbg(ql_dbg_mbx, vha, 0x10f7, "Entered %s.\n", __func__); |
3759 | 3729 | ||
3760 | memset(mcp->mb, 0 , sizeof(mcp->mb)); | 3730 | memset(mcp->mb, 0 , sizeof(mcp->mb)); |
3761 | mcp->mb[0] = MBC_DIAGNOSTIC_LOOP_BACK; | 3731 | mcp->mb[0] = MBC_DIAGNOSTIC_LOOP_BACK; |
@@ -3794,15 +3764,12 @@ qla2x00_loopback_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
3794 | rval = qla2x00_mailbox_command(vha, mcp); | 3764 | rval = qla2x00_mailbox_command(vha, mcp); |
3795 | 3765 | ||
3796 | if (rval != QLA_SUCCESS) { | 3766 | if (rval != QLA_SUCCESS) { |
3797 | DEBUG2(printk(KERN_WARNING | 3767 | ql_dbg(ql_dbg_mbx, vha, 0x10f8, |
3798 | "(%ld): failed=%x mb[0]=0x%x " | 3768 | "Failed=%x mb[0]=%x mb[1]=%x mb[2]=%x mb[3]=%x mb[18]=%x " |
3799 | "mb[1]=0x%x mb[2]=0x%x mb[3]=0x%x mb[18]=0x%x " | 3769 | "mb[19]=%x.\n", rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], |
3800 | "mb[19]=0x%x.\n", | 3770 | mcp->mb[3], mcp->mb[18], mcp->mb[19]); |
3801 | vha->host_no, rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], | ||
3802 | mcp->mb[3], mcp->mb[18], mcp->mb[19])); | ||
3803 | } else { | 3771 | } else { |
3804 | DEBUG2(printk(KERN_WARNING | 3772 | ql_dbg(ql_dbg_mbx, vha, 0x10f9, "Done %s.\n", __func__); |
3805 | "scsi(%ld): done.\n", vha->host_no)); | ||
3806 | } | 3773 | } |
3807 | 3774 | ||
3808 | /* Copy mailbox information */ | 3775 | /* Copy mailbox information */ |
@@ -3819,7 +3786,7 @@ qla2x00_echo_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
3819 | mbx_cmd_t *mcp = &mc; | 3786 | mbx_cmd_t *mcp = &mc; |
3820 | struct qla_hw_data *ha = vha->hw; | 3787 | struct qla_hw_data *ha = vha->hw; |
3821 | 3788 | ||
3822 | DEBUG11(printk("scsi(%ld): entered.\n", vha->host_no)); | 3789 | ql_dbg(ql_dbg_mbx, vha, 0x10fa, "Entered %s.\n", __func__); |
3823 | 3790 | ||
3824 | memset(mcp->mb, 0 , sizeof(mcp->mb)); | 3791 | memset(mcp->mb, 0 , sizeof(mcp->mb)); |
3825 | mcp->mb[0] = MBC_DIAGNOSTIC_ECHO; | 3792 | mcp->mb[0] = MBC_DIAGNOSTIC_ECHO; |
@@ -3858,12 +3825,11 @@ qla2x00_echo_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
3858 | rval = qla2x00_mailbox_command(vha, mcp); | 3825 | rval = qla2x00_mailbox_command(vha, mcp); |
3859 | 3826 | ||
3860 | if (rval != QLA_SUCCESS) { | 3827 | if (rval != QLA_SUCCESS) { |
3861 | DEBUG2(printk(KERN_WARNING | 3828 | ql_dbg(ql_dbg_mbx, vha, 0x10fb, |
3862 | "(%ld): failed=%x mb[0]=0x%x mb[1]=0x%x.\n", | 3829 | "Failed=%x mb[0]=%x mb[1]=%x.\n", |
3863 | vha->host_no, rval, mcp->mb[0], mcp->mb[1])); | 3830 | rval, mcp->mb[0], mcp->mb[1]); |
3864 | } else { | 3831 | } else { |
3865 | DEBUG2(printk(KERN_WARNING | 3832 | ql_dbg(ql_dbg_mbx, vha, 0x10fc, "Done %s.\n", __func__); |
3866 | "scsi(%ld): done.\n", vha->host_no)); | ||
3867 | } | 3833 | } |
3868 | 3834 | ||
3869 | /* Copy mailbox information */ | 3835 | /* Copy mailbox information */ |
@@ -3872,14 +3838,14 @@ qla2x00_echo_test(scsi_qla_host_t *vha, struct msg_echo_lb *mreq, | |||
3872 | } | 3838 | } |
3873 | 3839 | ||
3874 | int | 3840 | int |
3875 | qla84xx_reset_chip(scsi_qla_host_t *ha, uint16_t enable_diagnostic) | 3841 | qla84xx_reset_chip(scsi_qla_host_t *vha, uint16_t enable_diagnostic) |
3876 | { | 3842 | { |
3877 | int rval; | 3843 | int rval; |
3878 | mbx_cmd_t mc; | 3844 | mbx_cmd_t mc; |
3879 | mbx_cmd_t *mcp = &mc; | 3845 | mbx_cmd_t *mcp = &mc; |
3880 | 3846 | ||
3881 | DEBUG16(printk("%s(%ld): enable_diag=%d entered.\n", __func__, | 3847 | ql_dbg(ql_dbg_mbx, vha, 0x10fd, |
3882 | ha->host_no, enable_diagnostic)); | 3848 | "Entered %s enable_diag=%d.\n", __func__, enable_diagnostic); |
3883 | 3849 | ||
3884 | mcp->mb[0] = MBC_ISP84XX_RESET; | 3850 | mcp->mb[0] = MBC_ISP84XX_RESET; |
3885 | mcp->mb[1] = enable_diagnostic; | 3851 | mcp->mb[1] = enable_diagnostic; |
@@ -3887,13 +3853,12 @@ qla84xx_reset_chip(scsi_qla_host_t *ha, uint16_t enable_diagnostic) | |||
3887 | mcp->in_mb = MBX_1|MBX_0; | 3853 | mcp->in_mb = MBX_1|MBX_0; |
3888 | mcp->tov = MBX_TOV_SECONDS; | 3854 | mcp->tov = MBX_TOV_SECONDS; |
3889 | mcp->flags = MBX_DMA_OUT|MBX_DMA_IN|IOCTL_CMD; | 3855 | mcp->flags = MBX_DMA_OUT|MBX_DMA_IN|IOCTL_CMD; |
3890 | rval = qla2x00_mailbox_command(ha, mcp); | 3856 | rval = qla2x00_mailbox_command(vha, mcp); |
3891 | 3857 | ||
3892 | if (rval != QLA_SUCCESS) | 3858 | if (rval != QLA_SUCCESS) |
3893 | DEBUG16(printk("%s(%ld): failed=%x.\n", __func__, ha->host_no, | 3859 | ql_dbg(ql_dbg_mbx, vha, 0x10fe, "Failed=%x.\n", rval); |
3894 | rval)); | ||
3895 | else | 3860 | else |
3896 | DEBUG16(printk("%s(%ld): done.\n", __func__, ha->host_no)); | 3861 | ql_dbg(ql_dbg_mbx, vha, 0x10ff, "Done %s.\n", __func__); |
3897 | 3862 | ||
3898 | return rval; | 3863 | return rval; |
3899 | } | 3864 | } |
@@ -3905,11 +3870,11 @@ qla2x00_write_ram_word(scsi_qla_host_t *vha, uint32_t risc_addr, uint32_t data) | |||
3905 | mbx_cmd_t mc; | 3870 | mbx_cmd_t mc; |
3906 | mbx_cmd_t *mcp = &mc; | 3871 | mbx_cmd_t *mcp = &mc; |
3907 | 3872 | ||
3873 | ql_dbg(ql_dbg_mbx, vha, 0x1100, "Entered %s.\n", __func__); | ||
3874 | |||
3908 | if (!IS_FWI2_CAPABLE(vha->hw)) | 3875 | if (!IS_FWI2_CAPABLE(vha->hw)) |
3909 | return QLA_FUNCTION_FAILED; | 3876 | return QLA_FUNCTION_FAILED; |
3910 | 3877 | ||
3911 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3912 | |||
3913 | mcp->mb[0] = MBC_WRITE_RAM_WORD_EXTENDED; | 3878 | mcp->mb[0] = MBC_WRITE_RAM_WORD_EXTENDED; |
3914 | mcp->mb[1] = LSW(risc_addr); | 3879 | mcp->mb[1] = LSW(risc_addr); |
3915 | mcp->mb[2] = LSW(data); | 3880 | mcp->mb[2] = LSW(data); |
@@ -3921,10 +3886,10 @@ qla2x00_write_ram_word(scsi_qla_host_t *vha, uint32_t risc_addr, uint32_t data) | |||
3921 | mcp->flags = 0; | 3886 | mcp->flags = 0; |
3922 | rval = qla2x00_mailbox_command(vha, mcp); | 3887 | rval = qla2x00_mailbox_command(vha, mcp); |
3923 | if (rval != QLA_SUCCESS) { | 3888 | if (rval != QLA_SUCCESS) { |
3924 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 3889 | ql_dbg(ql_dbg_mbx, vha, 0x1101, |
3925 | vha->host_no, rval, mcp->mb[0])); | 3890 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
3926 | } else { | 3891 | } else { |
3927 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | 3892 | ql_dbg(ql_dbg_mbx, vha, 0x1102, "Done %s.\n", __func__); |
3928 | } | 3893 | } |
3929 | 3894 | ||
3930 | return rval; | 3895 | return rval; |
@@ -3941,8 +3906,7 @@ qla81xx_write_mpi_register(scsi_qla_host_t *vha, uint16_t *mb) | |||
3941 | 3906 | ||
3942 | rval = QLA_SUCCESS; | 3907 | rval = QLA_SUCCESS; |
3943 | 3908 | ||
3944 | DEBUG11(qla_printk(KERN_INFO, ha, | 3909 | ql_dbg(ql_dbg_mbx, vha, 0x1103, "Entered %s.\n", __func__); |
3945 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
3946 | 3910 | ||
3947 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); | 3911 | clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); |
3948 | 3912 | ||
@@ -3982,11 +3946,10 @@ qla81xx_write_mpi_register(scsi_qla_host_t *vha, uint16_t *mb) | |||
3982 | rval = QLA_FUNCTION_FAILED; | 3946 | rval = QLA_FUNCTION_FAILED; |
3983 | 3947 | ||
3984 | if (rval != QLA_SUCCESS) { | 3948 | if (rval != QLA_SUCCESS) { |
3985 | DEBUG2_3_11(printk(KERN_INFO "%s(%ld): failed=%x mb[0]=%x.\n", | 3949 | ql_dbg(ql_dbg_mbx, vha, 0x1104, |
3986 | __func__, vha->host_no, rval, mb[0])); | 3950 | "Failed=%x mb[0]=%x.\n", rval, mb[0]); |
3987 | } else { | 3951 | } else { |
3988 | DEBUG11(printk(KERN_INFO | 3952 | ql_dbg(ql_dbg_mbx, vha, 0x1105, "Done %s.\n", __func__); |
3989 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
3990 | } | 3953 | } |
3991 | 3954 | ||
3992 | return rval; | 3955 | return rval; |
@@ -3999,12 +3962,11 @@ qla2x00_get_data_rate(scsi_qla_host_t *vha) | |||
3999 | mbx_cmd_t *mcp = &mc; | 3962 | mbx_cmd_t *mcp = &mc; |
4000 | struct qla_hw_data *ha = vha->hw; | 3963 | struct qla_hw_data *ha = vha->hw; |
4001 | 3964 | ||
3965 | ql_dbg(ql_dbg_mbx, vha, 0x1106, "Entered %s.\n", __func__); | ||
3966 | |||
4002 | if (!IS_FWI2_CAPABLE(ha)) | 3967 | if (!IS_FWI2_CAPABLE(ha)) |
4003 | return QLA_FUNCTION_FAILED; | 3968 | return QLA_FUNCTION_FAILED; |
4004 | 3969 | ||
4005 | DEBUG11(qla_printk(KERN_INFO, ha, | ||
4006 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
4007 | |||
4008 | mcp->mb[0] = MBC_DATA_RATE; | 3970 | mcp->mb[0] = MBC_DATA_RATE; |
4009 | mcp->mb[1] = 0; | 3971 | mcp->mb[1] = 0; |
4010 | mcp->out_mb = MBX_1|MBX_0; | 3972 | mcp->out_mb = MBX_1|MBX_0; |
@@ -4013,11 +3975,10 @@ qla2x00_get_data_rate(scsi_qla_host_t *vha) | |||
4013 | mcp->flags = 0; | 3975 | mcp->flags = 0; |
4014 | rval = qla2x00_mailbox_command(vha, mcp); | 3976 | rval = qla2x00_mailbox_command(vha, mcp); |
4015 | if (rval != QLA_SUCCESS) { | 3977 | if (rval != QLA_SUCCESS) { |
4016 | DEBUG2_3_11(printk(KERN_INFO "%s(%ld): failed=%x mb[0]=%x.\n", | 3978 | ql_dbg(ql_dbg_mbx, vha, 0x1107, |
4017 | __func__, vha->host_no, rval, mcp->mb[0])); | 3979 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
4018 | } else { | 3980 | } else { |
4019 | DEBUG11(printk(KERN_INFO | 3981 | ql_dbg(ql_dbg_mbx, vha, 0x1108, "Done %s.\n", __func__); |
4020 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
4021 | if (mcp->mb[1] != 0x7) | 3982 | if (mcp->mb[1] != 0x7) |
4022 | ha->link_data_rate = mcp->mb[1]; | 3983 | ha->link_data_rate = mcp->mb[1]; |
4023 | } | 3984 | } |
@@ -4033,8 +3994,7 @@ qla81xx_get_port_config(scsi_qla_host_t *vha, uint16_t *mb) | |||
4033 | mbx_cmd_t *mcp = &mc; | 3994 | mbx_cmd_t *mcp = &mc; |
4034 | struct qla_hw_data *ha = vha->hw; | 3995 | struct qla_hw_data *ha = vha->hw; |
4035 | 3996 | ||
4036 | DEBUG11(printk(KERN_INFO | 3997 | ql_dbg(ql_dbg_mbx, vha, 0x1109, "Entered %s.\n", __func__); |
4037 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
4038 | 3998 | ||
4039 | if (!IS_QLA81XX(ha)) | 3999 | if (!IS_QLA81XX(ha)) |
4040 | return QLA_FUNCTION_FAILED; | 4000 | return QLA_FUNCTION_FAILED; |
@@ -4047,15 +4007,13 @@ qla81xx_get_port_config(scsi_qla_host_t *vha, uint16_t *mb) | |||
4047 | rval = qla2x00_mailbox_command(vha, mcp); | 4007 | rval = qla2x00_mailbox_command(vha, mcp); |
4048 | 4008 | ||
4049 | if (rval != QLA_SUCCESS) { | 4009 | if (rval != QLA_SUCCESS) { |
4050 | DEBUG2_3_11(printk(KERN_WARNING | 4010 | ql_dbg(ql_dbg_mbx, vha, 0x110a, |
4051 | "%s(%ld): failed=%x (%x).\n", __func__, | 4011 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
4052 | vha->host_no, rval, mcp->mb[0])); | ||
4053 | } else { | 4012 | } else { |
4054 | /* Copy all bits to preserve original value */ | 4013 | /* Copy all bits to preserve original value */ |
4055 | memcpy(mb, &mcp->mb[1], sizeof(uint16_t) * 4); | 4014 | memcpy(mb, &mcp->mb[1], sizeof(uint16_t) * 4); |
4056 | 4015 | ||
4057 | DEBUG11(printk(KERN_INFO | 4016 | ql_dbg(ql_dbg_mbx, vha, 0x110b, "Done %s.\n", __func__); |
4058 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
4059 | } | 4017 | } |
4060 | return rval; | 4018 | return rval; |
4061 | } | 4019 | } |
@@ -4067,8 +4025,7 @@ qla81xx_set_port_config(scsi_qla_host_t *vha, uint16_t *mb) | |||
4067 | mbx_cmd_t mc; | 4025 | mbx_cmd_t mc; |
4068 | mbx_cmd_t *mcp = &mc; | 4026 | mbx_cmd_t *mcp = &mc; |
4069 | 4027 | ||
4070 | DEBUG11(printk(KERN_INFO | 4028 | ql_dbg(ql_dbg_mbx, vha, 0x110c, "Entered %s.\n", __func__); |
4071 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
4072 | 4029 | ||
4073 | mcp->mb[0] = MBC_SET_PORT_CONFIG; | 4030 | mcp->mb[0] = MBC_SET_PORT_CONFIG; |
4074 | /* Copy all bits to preserve original setting */ | 4031 | /* Copy all bits to preserve original setting */ |
@@ -4080,12 +4037,10 @@ qla81xx_set_port_config(scsi_qla_host_t *vha, uint16_t *mb) | |||
4080 | rval = qla2x00_mailbox_command(vha, mcp); | 4037 | rval = qla2x00_mailbox_command(vha, mcp); |
4081 | 4038 | ||
4082 | if (rval != QLA_SUCCESS) { | 4039 | if (rval != QLA_SUCCESS) { |
4083 | DEBUG2_3_11(printk(KERN_WARNING | 4040 | ql_dbg(ql_dbg_mbx, vha, 0x110d, |
4084 | "%s(%ld): failed=%x (%x).\n", __func__, | 4041 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
4085 | vha->host_no, rval, mcp->mb[0])); | ||
4086 | } else | 4042 | } else |
4087 | DEBUG11(printk(KERN_INFO | 4043 | ql_dbg(ql_dbg_mbx, vha, 0x110e, "Done %s.\n", __func__); |
4088 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
4089 | 4044 | ||
4090 | return rval; | 4045 | return rval; |
4091 | } | 4046 | } |
@@ -4100,12 +4055,11 @@ qla24xx_set_fcp_prio(scsi_qla_host_t *vha, uint16_t loop_id, uint16_t priority, | |||
4100 | mbx_cmd_t *mcp = &mc; | 4055 | mbx_cmd_t *mcp = &mc; |
4101 | struct qla_hw_data *ha = vha->hw; | 4056 | struct qla_hw_data *ha = vha->hw; |
4102 | 4057 | ||
4058 | ql_dbg(ql_dbg_mbx, vha, 0x110f, "Entered %s.\n", __func__); | ||
4059 | |||
4103 | if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha)) | 4060 | if (!IS_QLA24XX_TYPE(ha) && !IS_QLA25XX(ha)) |
4104 | return QLA_FUNCTION_FAILED; | 4061 | return QLA_FUNCTION_FAILED; |
4105 | 4062 | ||
4106 | DEBUG11(printk(KERN_INFO | ||
4107 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
4108 | |||
4109 | mcp->mb[0] = MBC_PORT_PARAMS; | 4063 | mcp->mb[0] = MBC_PORT_PARAMS; |
4110 | mcp->mb[1] = loop_id; | 4064 | mcp->mb[1] = loop_id; |
4111 | if (ha->flags.fcp_prio_enabled) | 4065 | if (ha->flags.fcp_prio_enabled) |
@@ -4127,12 +4081,9 @@ qla24xx_set_fcp_prio(scsi_qla_host_t *vha, uint16_t loop_id, uint16_t priority, | |||
4127 | } | 4081 | } |
4128 | 4082 | ||
4129 | if (rval != QLA_SUCCESS) { | 4083 | if (rval != QLA_SUCCESS) { |
4130 | DEBUG2_3_11(printk(KERN_WARNING | 4084 | ql_dbg(ql_dbg_mbx, vha, 0x10cd, "Failed=%x.\n", rval); |
4131 | "%s(%ld): failed=%x.\n", __func__, | ||
4132 | vha->host_no, rval)); | ||
4133 | } else { | 4085 | } else { |
4134 | DEBUG11(printk(KERN_INFO | 4086 | ql_dbg(ql_dbg_mbx, vha, 0x10cc, "Done %s.\n", __func__); |
4135 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
4136 | } | 4087 | } |
4137 | 4088 | ||
4138 | return rval; | 4089 | return rval; |
@@ -4145,13 +4096,12 @@ qla2x00_get_thermal_temp(scsi_qla_host_t *vha, uint16_t *temp, uint16_t *frac) | |||
4145 | uint8_t byte; | 4096 | uint8_t byte; |
4146 | struct qla_hw_data *ha = vha->hw; | 4097 | struct qla_hw_data *ha = vha->hw; |
4147 | 4098 | ||
4148 | DEBUG11(printk(KERN_INFO "%s(%ld): entered.\n", __func__, vha->host_no)); | 4099 | ql_dbg(ql_dbg_mbx, vha, 0x10ca, "Entered %s.\n", __func__); |
4149 | 4100 | ||
4150 | /* Integer part */ | 4101 | /* Integer part */ |
4151 | rval = qla2x00_read_sfp(vha, 0, &byte, 0x98, 0x01, 1, BIT_13|BIT_0); | 4102 | rval = qla2x00_read_sfp(vha, 0, &byte, 0x98, 0x01, 1, BIT_13|BIT_0); |
4152 | if (rval != QLA_SUCCESS) { | 4103 | if (rval != QLA_SUCCESS) { |
4153 | DEBUG2_3_11(printk(KERN_WARNING | 4104 | ql_dbg(ql_dbg_mbx, vha, 0x10c9, "Failed=%x.\n", rval); |
4154 | "%s(%ld): failed=%x.\n", __func__, vha->host_no, rval)); | ||
4155 | ha->flags.thermal_supported = 0; | 4105 | ha->flags.thermal_supported = 0; |
4156 | goto fail; | 4106 | goto fail; |
4157 | } | 4107 | } |
@@ -4160,14 +4110,13 @@ qla2x00_get_thermal_temp(scsi_qla_host_t *vha, uint16_t *temp, uint16_t *frac) | |||
4160 | /* Fraction part */ | 4110 | /* Fraction part */ |
4161 | rval = qla2x00_read_sfp(vha, 0, &byte, 0x98, 0x10, 1, BIT_13|BIT_0); | 4111 | rval = qla2x00_read_sfp(vha, 0, &byte, 0x98, 0x10, 1, BIT_13|BIT_0); |
4162 | if (rval != QLA_SUCCESS) { | 4112 | if (rval != QLA_SUCCESS) { |
4163 | DEBUG2_3_11(printk(KERN_WARNING | 4113 | ql_dbg(ql_dbg_mbx, vha, 0x1019, "Failed=%x.\n", rval); |
4164 | "%s(%ld): failed=%x.\n", __func__, vha->host_no, rval)); | ||
4165 | ha->flags.thermal_supported = 0; | 4114 | ha->flags.thermal_supported = 0; |
4166 | goto fail; | 4115 | goto fail; |
4167 | } | 4116 | } |
4168 | *frac = (byte >> 6) * 25; | 4117 | *frac = (byte >> 6) * 25; |
4169 | 4118 | ||
4170 | DEBUG11(printk(KERN_INFO "%s(%ld): done.\n", __func__, vha->host_no)); | 4119 | ql_dbg(ql_dbg_mbx, vha, 0x1018, "Done %s.\n", __func__); |
4171 | fail: | 4120 | fail: |
4172 | return rval; | 4121 | return rval; |
4173 | } | 4122 | } |
@@ -4180,12 +4129,11 @@ qla82xx_mbx_intr_enable(scsi_qla_host_t *vha) | |||
4180 | mbx_cmd_t mc; | 4129 | mbx_cmd_t mc; |
4181 | mbx_cmd_t *mcp = &mc; | 4130 | mbx_cmd_t *mcp = &mc; |
4182 | 4131 | ||
4132 | ql_dbg(ql_dbg_mbx, vha, 0x1017, "Entered %s.\n", __func__); | ||
4133 | |||
4183 | if (!IS_FWI2_CAPABLE(ha)) | 4134 | if (!IS_FWI2_CAPABLE(ha)) |
4184 | return QLA_FUNCTION_FAILED; | 4135 | return QLA_FUNCTION_FAILED; |
4185 | 4136 | ||
4186 | DEBUG11(qla_printk(KERN_INFO, ha, | ||
4187 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
4188 | |||
4189 | memset(mcp, 0, sizeof(mbx_cmd_t)); | 4137 | memset(mcp, 0, sizeof(mbx_cmd_t)); |
4190 | mcp->mb[0] = MBC_TOGGLE_INTERRUPT; | 4138 | mcp->mb[0] = MBC_TOGGLE_INTERRUPT; |
4191 | mcp->mb[1] = 1; | 4139 | mcp->mb[1] = 1; |
@@ -4197,12 +4145,10 @@ qla82xx_mbx_intr_enable(scsi_qla_host_t *vha) | |||
4197 | 4145 | ||
4198 | rval = qla2x00_mailbox_command(vha, mcp); | 4146 | rval = qla2x00_mailbox_command(vha, mcp); |
4199 | if (rval != QLA_SUCCESS) { | 4147 | if (rval != QLA_SUCCESS) { |
4200 | DEBUG2_3_11(qla_printk(KERN_WARNING, ha, | 4148 | ql_dbg(ql_dbg_mbx, vha, 0x1016, |
4201 | "%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 4149 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
4202 | vha->host_no, rval, mcp->mb[0])); | ||
4203 | } else { | 4150 | } else { |
4204 | DEBUG11(qla_printk(KERN_INFO, ha, | 4151 | ql_dbg(ql_dbg_mbx, vha, 0x100e, "Done %s.\n", __func__); |
4205 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
4206 | } | 4152 | } |
4207 | 4153 | ||
4208 | return rval; | 4154 | return rval; |
@@ -4216,12 +4162,11 @@ qla82xx_mbx_intr_disable(scsi_qla_host_t *vha) | |||
4216 | mbx_cmd_t mc; | 4162 | mbx_cmd_t mc; |
4217 | mbx_cmd_t *mcp = &mc; | 4163 | mbx_cmd_t *mcp = &mc; |
4218 | 4164 | ||
4165 | ql_dbg(ql_dbg_mbx, vha, 0x100d, "Entered %s.\n", __func__); | ||
4166 | |||
4219 | if (!IS_QLA82XX(ha)) | 4167 | if (!IS_QLA82XX(ha)) |
4220 | return QLA_FUNCTION_FAILED; | 4168 | return QLA_FUNCTION_FAILED; |
4221 | 4169 | ||
4222 | DEBUG11(qla_printk(KERN_INFO, ha, | ||
4223 | "%s(%ld): entered.\n", __func__, vha->host_no)); | ||
4224 | |||
4225 | memset(mcp, 0, sizeof(mbx_cmd_t)); | 4170 | memset(mcp, 0, sizeof(mbx_cmd_t)); |
4226 | mcp->mb[0] = MBC_TOGGLE_INTERRUPT; | 4171 | mcp->mb[0] = MBC_TOGGLE_INTERRUPT; |
4227 | mcp->mb[1] = 0; | 4172 | mcp->mb[1] = 0; |
@@ -4233,12 +4178,10 @@ qla82xx_mbx_intr_disable(scsi_qla_host_t *vha) | |||
4233 | 4178 | ||
4234 | rval = qla2x00_mailbox_command(vha, mcp); | 4179 | rval = qla2x00_mailbox_command(vha, mcp); |
4235 | if (rval != QLA_SUCCESS) { | 4180 | if (rval != QLA_SUCCESS) { |
4236 | DEBUG2_3_11(qla_printk(KERN_WARNING, ha, | 4181 | ql_dbg(ql_dbg_mbx, vha, 0x100c, |
4237 | "%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 4182 | "Failed=%x mb[0]=%x.\n", rval, mcp->mb[0]); |
4238 | vha->host_no, rval, mcp->mb[0])); | ||
4239 | } else { | 4183 | } else { |
4240 | DEBUG11(qla_printk(KERN_INFO, ha, | 4184 | ql_dbg(ql_dbg_mbx, vha, 0x100b, "Done %s.\n", __func__); |
4241 | "%s(%ld): done.\n", __func__, vha->host_no)); | ||
4242 | } | 4185 | } |
4243 | 4186 | ||
4244 | return rval; | 4187 | return rval; |