aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_mbx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_mbx.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c41
1 files changed, 25 insertions, 16 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index a99976f5fabd..db4df45234a5 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -123,8 +123,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
123 123
124 /* Wait for mbx cmd completion until timeout */ 124 /* Wait for mbx cmd completion until timeout */
125 125
126 if (!abort_active && io_lock_on) { 126 if ((!abort_active && io_lock_on) || IS_NOPOLLING_TYPE(ha)) {
127
128 set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); 127 set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags);
129 128
130 if (IS_FWI2_CAPABLE(ha)) 129 if (IS_FWI2_CAPABLE(ha))
@@ -218,7 +217,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
218 /* Clean up */ 217 /* Clean up */
219 ha->mcp = NULL; 218 ha->mcp = NULL;
220 219
221 if (abort_active || !io_lock_on) { 220 if ((abort_active || !io_lock_on) && !IS_NOPOLLING_TYPE(ha)) {
222 DEBUG11(printk("%s(%ld): checking for additional resp " 221 DEBUG11(printk("%s(%ld): checking for additional resp "
223 "interrupt.\n", __func__, base_vha->host_no)); 222 "interrupt.\n", __func__, base_vha->host_no));
224 223
@@ -412,7 +411,8 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
412 */ 411 */
413void 412void
414qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor, 413qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
415 uint16_t *subminor, uint16_t *attributes, uint32_t *memory) 414 uint16_t *subminor, uint16_t *attributes, uint32_t *memory, uint8_t *mpi,
415 uint32_t *mpi_caps)
416{ 416{
417 int rval; 417 int rval;
418 mbx_cmd_t mc; 418 mbx_cmd_t mc;
@@ -423,6 +423,8 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
423 mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; 423 mcp->mb[0] = MBC_GET_FIRMWARE_VERSION;
424 mcp->out_mb = MBX_0; 424 mcp->out_mb = MBX_0;
425 mcp->in_mb = MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; 425 mcp->in_mb = MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0;
426 if (IS_QLA81XX(vha->hw))
427 mcp->in_mb |= MBX_13|MBX_12|MBX_11|MBX_10;
426 mcp->flags = 0; 428 mcp->flags = 0;
427 mcp->tov = MBX_TOV_SECONDS; 429 mcp->tov = MBX_TOV_SECONDS;
428 rval = qla2x00_mailbox_command(vha, mcp); 430 rval = qla2x00_mailbox_command(vha, mcp);
@@ -436,6 +438,13 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
436 *memory = 0x1FFFF; /* Defaults to 128KB. */ 438 *memory = 0x1FFFF; /* Defaults to 128KB. */
437 else 439 else
438 *memory = (mcp->mb[5] << 16) | mcp->mb[4]; 440 *memory = (mcp->mb[5] << 16) | mcp->mb[4];
441 if (IS_QLA81XX(vha->hw)) {
442 mpi[0] = mcp->mb[10] >> 8;
443 mpi[1] = mcp->mb[10] & 0xff;
444 mpi[2] = mcp->mb[11] >> 8;
445 mpi[3] = mcp->mb[11] & 0xff;
446 *mpi_caps = (mcp->mb[12] << 16) | mcp->mb[13];
447 }
439 448
440 if (rval != QLA_SUCCESS) { 449 if (rval != QLA_SUCCESS) {
441 /*EMPTY*/ 450 /*EMPTY*/
@@ -568,7 +577,6 @@ int
568qla2x00_mbx_reg_test(scsi_qla_host_t *vha) 577qla2x00_mbx_reg_test(scsi_qla_host_t *vha)
569{ 578{
570 int rval; 579 int rval;
571 struct qla_hw_data *ha = vha->hw;
572 mbx_cmd_t mc; 580 mbx_cmd_t mc;
573 mbx_cmd_t *mcp = &mc; 581 mbx_cmd_t *mcp = &mc;
574 582
@@ -595,14 +603,6 @@ qla2x00_mbx_reg_test(scsi_qla_host_t *vha)
595 if (mcp->mb[5] != 0xA5A5 || mcp->mb[6] != 0x5A5A || 603 if (mcp->mb[5] != 0xA5A5 || mcp->mb[6] != 0x5A5A ||
596 mcp->mb[7] != 0x2525) 604 mcp->mb[7] != 0x2525)
597 rval = QLA_FUNCTION_FAILED; 605 rval = QLA_FUNCTION_FAILED;
598 if (rval == QLA_FUNCTION_FAILED) {
599 struct device_reg_24xx __iomem *reg =
600 &ha->iobase->isp24;
601
602 qla2xxx_hw_event_log(vha, HW_EVENT_ISP_ERR, 0,
603 LSW(RD_REG_DWORD(&reg->hccr)),
604 LSW(RD_REG_DWORD(&reg->istatus)));
605 }
606 } 606 }
607 607
608 if (rval != QLA_SUCCESS) { 608 if (rval != QLA_SUCCESS) {
@@ -1363,7 +1363,13 @@ qla2x00_lip_reset(scsi_qla_host_t *vha)
1363 1363
1364 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); 1364 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no));
1365 1365
1366 if (IS_FWI2_CAPABLE(vha->hw)) { 1366 if (IS_QLA81XX(vha->hw)) {
1367 /* Logout across all FCFs. */
1368 mcp->mb[0] = MBC_LIP_FULL_LOGIN;
1369 mcp->mb[1] = BIT_1;
1370 mcp->mb[2] = 0;
1371 mcp->out_mb = MBX_2|MBX_1|MBX_0;
1372 } else if (IS_FWI2_CAPABLE(vha->hw)) {
1367 mcp->mb[0] = MBC_LIP_FULL_LOGIN; 1373 mcp->mb[0] = MBC_LIP_FULL_LOGIN;
1368 mcp->mb[1] = BIT_6; 1374 mcp->mb[1] = BIT_6;
1369 mcp->mb[2] = 0; 1375 mcp->mb[2] = 0;
@@ -1853,6 +1859,9 @@ qla2x00_full_login_lip(scsi_qla_host_t *vha)
1853 mbx_cmd_t mc; 1859 mbx_cmd_t mc;
1854 mbx_cmd_t *mcp = &mc; 1860 mbx_cmd_t *mcp = &mc;
1855 1861
1862 if (IS_QLA81XX(vha->hw))
1863 return QLA_SUCCESS;
1864
1856 DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n", 1865 DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n",
1857 vha->host_no)); 1866 vha->host_no));
1858 1867
@@ -2512,7 +2521,7 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *vha, dma_addr_t fce_dma,
2512 mbx_cmd_t mc; 2521 mbx_cmd_t mc;
2513 mbx_cmd_t *mcp = &mc; 2522 mbx_cmd_t *mcp = &mc;
2514 2523
2515 if (!IS_QLA25XX(vha->hw)) 2524 if (!IS_QLA25XX(vha->hw) && !IS_QLA81XX(vha->hw))
2516 return QLA_FUNCTION_FAILED; 2525 return QLA_FUNCTION_FAILED;
2517 2526
2518 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); 2527 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no));
@@ -3155,7 +3164,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp,
3155 mcp->mb[7] = LSW(MSD(rsp->dma)); 3164 mcp->mb[7] = LSW(MSD(rsp->dma));
3156 mcp->mb[5] = rsp->length; 3165 mcp->mb[5] = rsp->length;
3157 mcp->mb[11] = rsp->vp_idx; 3166 mcp->mb[11] = rsp->vp_idx;
3158 mcp->mb[14] = rsp->msix->vector; 3167 mcp->mb[14] = rsp->msix->entry;
3159 mcp->mb[13] = rsp->rid; 3168 mcp->mb[13] = rsp->rid;
3160 3169
3161 reg = (struct device_reg_25xxmq *)((void *)(ha->mqiobase) + 3170 reg = (struct device_reg_25xxmq *)((void *)(ha->mqiobase) +