qla2xxx -- Properly schedule mailbox command timeouts.
Subsystems (2)
PATCH 1/1 qla2xxx -- Properly schedule mailbox command timeouts.
James,
For mailbox commands which the firmware internally times-out in 2 * R_A_TOV, the driver should timeout no sooner than 2.5 * R_A_TOV so we do not inappropriately schedule an ISP abort.
Please apply.
Regards,
Andrew Vasquez
drivers/scsi/qla2xxx/qla_mbx.c +5 -7
@@ -1421,7 +1421,7 @@ mcp->in_mb =MBX_0 ; mcp->buf_size =PORT_DATABASE_SIZE ; mcp->flags =MBX_DMA_IN ; - mcp->tov = ha->login_timeout *2 ; + mcp->tov = (ha->login_timeout *2 ) + (ha->login_timeout /2 ); rval =qla2x00_mailbox_command (ha, mcp);if (rval ==QLA_SUCCESS ) {
@@ -1774,8 +1774,7 @@ mcp->in_mb =MBX_0 |MBX_1 ; mcp->buf_size = buf_size; mcp->flags =MBX_DMA_OUT |MBX_DMA_IN ; -/*mcp->tov = ha->retry_count * ha->login_timeout * 2;*/ - mcp->tov = ha->login_timeout *2 ; + mcp->tov = (ha->login_timeout *2 ) + (ha->login_timeout /2 ); rval =qla2x00_mailbox_command (ha, mcp);if (rval !=QLA_SUCCESS ) {
@@ -1836,8 +1835,7 @@ mcp->mb[3 ] = area <<8 | al_pa; mcp->in_mb =MBX_7 |MBX_6 |MBX_2 |MBX_1 |MBX_0 ; -/*mcp->tov = ha->retry_count * ha->login_timeout * 2;*/ - mcp->tov = ha->login_timeout *2 ; + mcp->tov = (ha->login_timeout *2 ) + (ha->login_timeout /2 ); mcp->flags =0 ; rval =qla2x00_mailbox_command (ha, mcp);
@@ -1909,7 +1907,7 @@ mcp->mb[2 ] = opt; mcp->out_mb =MBX_2 |MBX_1 |MBX_0 ; mcp->in_mb =MBX_7 |MBX_6 |MBX_1 |MBX_0 ; - mcp->tov = ha->login_timeout *2 ; + mcp->tov = (ha->login_timeout *2 ) + (ha->login_timeout /2 ); mcp->flags =0 ; rval =qla2x00_mailbox_command (ha, mcp);
@@ -2412,7 +2410,7 @@ mcp->in_mb =MBX_1 |MBX_0 ; mcp->buf_size =FCAL_MAP_SIZE ; mcp->flags =MBX_DMA_IN ; - mcp->tov = ha->login_timeout *2 ; + mcp->tov = (ha->login_timeout *2 ) + (ha->login_timeout /2 ); rval =qla2x00_mailbox_command (ha, mcp);if (rval ==QLA_SUCCESS ) {