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.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 4cb679146126..db4df45234a5 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -411,7 +411,8 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)
411 */ 411 */
412void 412void
413qla2x00_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,
414 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)
415{ 416{
416 int rval; 417 int rval;
417 mbx_cmd_t mc; 418 mbx_cmd_t mc;
@@ -422,6 +423,8 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
422 mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; 423 mcp->mb[0] = MBC_GET_FIRMWARE_VERSION;
423 mcp->out_mb = MBX_0; 424 mcp->out_mb = MBX_0;
424 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;
425 mcp->flags = 0; 428 mcp->flags = 0;
426 mcp->tov = MBX_TOV_SECONDS; 429 mcp->tov = MBX_TOV_SECONDS;
427 rval = qla2x00_mailbox_command(vha, mcp); 430 rval = qla2x00_mailbox_command(vha, mcp);
@@ -435,6 +438,13 @@ qla2x00_get_fw_version(scsi_qla_host_t *vha, uint16_t *major, uint16_t *minor,
435 *memory = 0x1FFFF; /* Defaults to 128KB. */ 438 *memory = 0x1FFFF; /* Defaults to 128KB. */
436 else 439 else
437 *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 }
438 448
439 if (rval != QLA_SUCCESS) { 449 if (rval != QLA_SUCCESS) {
440 /*EMPTY*/ 450 /*EMPTY*/
@@ -1353,7 +1363,13 @@ qla2x00_lip_reset(scsi_qla_host_t *vha)
1353 1363
1354 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); 1364 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no));
1355 1365
1356 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)) {
1357 mcp->mb[0] = MBC_LIP_FULL_LOGIN; 1373 mcp->mb[0] = MBC_LIP_FULL_LOGIN;
1358 mcp->mb[1] = BIT_6; 1374 mcp->mb[1] = BIT_6;
1359 mcp->mb[2] = 0; 1375 mcp->mb[2] = 0;
@@ -1843,6 +1859,9 @@ qla2x00_full_login_lip(scsi_qla_host_t *vha)
1843 mbx_cmd_t mc; 1859 mbx_cmd_t mc;
1844 mbx_cmd_t *mcp = &mc; 1860 mbx_cmd_t *mcp = &mc;
1845 1861
1862 if (IS_QLA81XX(vha->hw))
1863 return QLA_SUCCESS;
1864
1846 DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n", 1865 DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n",
1847 vha->host_no)); 1866 vha->host_no));
1848 1867
@@ -2502,7 +2521,7 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *vha, dma_addr_t fce_dma,
2502 mbx_cmd_t mc; 2521 mbx_cmd_t mc;
2503 mbx_cmd_t *mcp = &mc; 2522 mbx_cmd_t *mcp = &mc;
2504 2523
2505 if (!IS_QLA25XX(vha->hw)) 2524 if (!IS_QLA25XX(vha->hw) && !IS_QLA81XX(vha->hw))
2506 return QLA_FUNCTION_FAILED; 2525 return QLA_FUNCTION_FAILED;
2507 2526
2508 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); 2527 DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no));