summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2017-06-02 09:12:05 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-12 20:48:08 -0400
commit2da52737521a2a65eb9b2323a0748047a454e86c (patch)
tree9f95082cc4c9c336b2dd641f27216bf10acac1c2 /drivers
parent3a33dc95b00be33f150bc357ab67331cdba7fc88 (diff)
scsi: qla2xxx: Accelerate SCSI BUSY status generation in target mode
Accelerate generation of SCSI busy to let initiators slow down when target is running low in resources. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c13
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c2
2 files changed, 13 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 08000aebe8d4..436968ad4484 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -7374,10 +7374,19 @@ qla81xx_update_fw_options(scsi_qla_host_t *vha)
}
if (qla_tgt_mode_enabled(vha) ||
- qla_dual_mode_enabled(vha))
+ qla_dual_mode_enabled(vha)) {
+ /* FW auto send SCSI status during */
+ ha->fw_options[1] |= BIT_8;
+ ha->fw_options[10] |= (u16)SAM_STAT_BUSY << 8;
+
+ /* FW perform Exchange validation */
ha->fw_options[2] |= BIT_4;
- else
+ } else {
+ ha->fw_options[1] &= ~BIT_8;
+ ha->fw_options[10] &= 0x00ff;
+
ha->fw_options[2] &= ~BIT_4;
+ }
if (ql2xetsenable) {
/* Enable ETS Burst. */
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index bebac42d9e9e..f02a2baffb5b 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -1048,6 +1048,8 @@ qla2x00_set_fw_options(scsi_qla_host_t *vha, uint16_t *fwopts)
mcp->in_mb = MBX_0;
if (IS_FWI2_CAPABLE(vha->hw)) {
mcp->in_mb |= MBX_1;
+ mcp->mb[10] = fwopts[10];
+ mcp->out_mb |= MBX_10;
} else {
mcp->mb[10] = fwopts[10];
mcp->mb[11] = fwopts[11];