diff options
author | Hannes Reinecke <hare@suse.de> | 2016-01-22 09:42:41 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-02-04 22:26:06 -0500 |
commit | d2d06d4fe0f2cc2df9b17fefec96e6e1a1271d91 (patch) | |
tree | 08d98ac1423590fcd5fca64591ff2664c2244708 | |
parent | 98441221708a092eb6d3d05142cf842a95aba152 (diff) |
scsi_dh_rdac: always retry MODE SELECT on command lock violation
If MODE SELECT returns with sense '05/91/36' (command lock violation)
it should always be retried without counting the number of retries.
During an HBA upgrade or similar circumstances one might see a flood
of MODE SELECT command from various HBAs, which will easily trigger
the sense code and exceed the retry count.
Cc: <stable@vger.kernel.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/device_handler/scsi_dh_rdac.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index 361358134315..93880ed6291c 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c | |||
@@ -562,7 +562,7 @@ static int mode_select_handle_sense(struct scsi_device *sdev, | |||
562 | /* | 562 | /* |
563 | * Command Lock contention | 563 | * Command Lock contention |
564 | */ | 564 | */ |
565 | err = SCSI_DH_RETRY; | 565 | err = SCSI_DH_IMM_RETRY; |
566 | break; | 566 | break; |
567 | default: | 567 | default: |
568 | break; | 568 | break; |
@@ -612,6 +612,8 @@ retry: | |||
612 | err = mode_select_handle_sense(sdev, h->sense); | 612 | err = mode_select_handle_sense(sdev, h->sense); |
613 | if (err == SCSI_DH_RETRY && retry_cnt--) | 613 | if (err == SCSI_DH_RETRY && retry_cnt--) |
614 | goto retry; | 614 | goto retry; |
615 | if (err == SCSI_DH_IMM_RETRY) | ||
616 | goto retry; | ||
615 | } | 617 | } |
616 | if (err == SCSI_DH_OK) { | 618 | if (err == SCSI_DH_OK) { |
617 | h->state = RDAC_STATE_ACTIVE; | 619 | h->state = RDAC_STATE_ACTIVE; |