Re: Retry scsi_mode_sense if UNIT ATTENTION occurs

Kai Makisara
2003-07-29T20:28:21Z

On Mon, 28 Jul 2003, 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.
>
This is dangerous or makes __scsi_mode_sense usable only in special cases.
Some high-level drivers need to process the UNIT ATTENTION sense data.

> 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.
>
One alternative is to move the retry code upwards to scsi_mode_sense and
document that it may discard UNIT ATTENTION. Those drivers that can't
tolerate this can then use __scsi_mode_sense. This would solve the sr
problem.

--
Kai