On 1/6/25 5:02 PM, Mike Christie wrote:
scsi_check_passthrough is always called, but it doesn't check for if a command completed successfully. As a result, if a command was successful and the caller used SCMD_FAILURE_RESULT_ANY to indicate what failures it wanted to retry, we will end up retrying the command. This will cause delays during device discovery because of the command being sent multiple times. For some USB devices it can also cause the wrong device size to be used. This patch adds a check for if the command was successful. If it is we return immediately instead of trying to match a failure.
Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>