Re: Retry scsi_mode_sense if UNIT ATTENTION occurs

Alan Stern
2003-07-28T15:15:57Z

On Mon, 28 Jul 2003, Jeff Garzik wrote:

> On Mon, Jul 28, 2003 at 10:10:33AM -0400, 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.
>
> I'm curious, are you testing against a real SCSI device, or a faked one
> as via ide-scsi.c?

Sort of in-between. It's a USB CD-RW drive. So it's not attached to a
real SCSI bus, but it does use the genuine SCSI command set.

Alan Stern