Skip to contentSkip to conversation

Return NEEDS_RETRY for eh commands with status BUSY

PATCH New Hannes Reinecke 1 participant 1 message Jul 29, 2010 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Return NEEDS_RETRY for eh commands with status BUSY

When the transport is busy and we're sending an EH command drivers occasionally return 'BUSY'. As this in most cases is the TUR command sent as part of the error recovery this is a sure way to make the error recovery escalate. Returning 'NEEDS_RETRY' here will just retry the TUR command and eventually abort the original command, thus making error handling far smoother.

drivers/scsi/scsi_error.c +1 -0
index 225d221..41266ec 100644
@@ -544,6 +544,7 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd)
 		scsi_handle_queue_full(scmd->device);
 		/* fall through */
 	case BUSY:
+		return NEEDS_RETRY;
 	default:
 		return FAILED;
 	}