mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
scsi_dh_rdac: always retry MODE SELECT on command lock violation
commit d2d06d4fe0 upstream.
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.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4c654fc935
commit
32c55052aa
@@ -562,7 +562,7 @@ static int mode_select_handle_sense(struct scsi_device *sdev,
|
||||
/*
|
||||
* Command Lock contention
|
||||
*/
|
||||
err = SCSI_DH_RETRY;
|
||||
err = SCSI_DH_IMM_RETRY;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -612,6 +612,8 @@ retry:
|
||||
err = mode_select_handle_sense(sdev, h->sense);
|
||||
if (err == SCSI_DH_RETRY && retry_cnt--)
|
||||
goto retry;
|
||||
if (err == SCSI_DH_IMM_RETRY)
|
||||
goto retry;
|
||||
}
|
||||
if (err == SCSI_DH_OK) {
|
||||
h->state = RDAC_STATE_ACTIVE;
|
||||
|
||||
Reference in New Issue
Block a user