Commit 79bdf12f authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Greg Kroah-Hartman

scsi_dh_rdac: always retry MODE SELECT on command lock violation

commit d2d06d4f 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: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 14f6db54
...@@ -569,7 +569,7 @@ static int mode_select_handle_sense(struct scsi_device *sdev, ...@@ -569,7 +569,7 @@ static int mode_select_handle_sense(struct scsi_device *sdev,
/* /*
* Command Lock contention * Command Lock contention
*/ */
err = SCSI_DH_RETRY; err = SCSI_DH_IMM_RETRY;
break; break;
default: default:
break; break;
...@@ -619,6 +619,8 @@ static void send_mode_select(struct work_struct *work) ...@@ -619,6 +619,8 @@ static void send_mode_select(struct work_struct *work)
err = mode_select_handle_sense(sdev, h->sense); err = mode_select_handle_sense(sdev, h->sense);
if (err == SCSI_DH_RETRY && retry_cnt--) if (err == SCSI_DH_RETRY && retry_cnt--)
goto retry; goto retry;
if (err == SCSI_DH_IMM_RETRY)
goto retry;
} }
if (err == SCSI_DH_OK) { if (err == SCSI_DH_OK) {
h->state = RDAC_STATE_ACTIVE; h->state = RDAC_STATE_ACTIVE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment