Re: Retry scsi_mode_sense if UNIT ATTENTION occurs

James Bottomley
2003-07-29T23:23:46Z

On Mon, 2003-07-28 at 10:10, Alan Stern wrote:
> Jens:
>
> This patch changes the scsi_mode_sense() routine to retry up to a total of
> 3 times if a command fails with a UNIT ATTENTION sense key value.
>
> Without this change, sr.c does not properly read the capabilities mode
> page for a just-powered-up cdrom drive -- it gives up upon receiving a
> Device Reset Occurred code.
>
> The patch looks lengthy, but most of it just changes the indentation
> level.

Actually, this isn't really the correct place for it. The problem
occurs in sr not sd because sd already does an initial TUR to clear the
unit attention.

Before OLS got in the way and I got submerged in writing presentations,
I had some patches that Matt Dharm was testing out to add the TUR to the
initial sr code.

I'll pick that up (...er, when I get caught back up at work).

James