Re: broken SCSI devices and linux...

Michael Neuffer (neuffer@goofy.zdv.Uni-Mainz.de)
Fri, 1 Aug 1997 23:14:45 +0200 (CEST)


On Fri, 1 Aug 1997, Teunis Peters wrote:

> I have a BAD SCSI cdrom (3X nec - but damaged in various moves & living
> conditions)
>
> ... Sometimes it can't seek a track (when playing a CD) and then the SCSI
> system starts freezing...
> ... even worse is when I have to turn off the device to quit it seeking
> back and forth and Linux crashes:
>
> first the cdrom crash:
> scsi : aborting command due to timeout : pid 68199, scsi0, channel 0, id
> 0, lun 0 Write (6) 03 80 0e 02 00
> scsi : aborting command due to timeout : pid 68207, scsi0, channel 0, id
> 3, lun 0 Start/Stop Unit 00 00 00 02 00
> scsi : aborting command due to timeout : pid 68207, scsi0, channel 0, id
> 3, lun 0 Start/Stop Unit 00 00 00 02 00
> SCSI host 0 abort (pid 68207) timed out - resetting
>
> then the system crashes [spewing these]
> SCSI bus is being reset for host 0 channel 0.
> Sent BUS DEVICE RESET to target 3
> Sending DID_RESET for target 3
> last message repeated 9 times
>
> Is there any way to recover from this?
> The SCSI bus isn't actually _CRASHED_ (as the system still works at this
> point - just VERY slow)....
>
> [on a bad disk the host adapter HAS been known to crash taking the entire
> system with it - I have a bad SCSI disk I couldn't afford to lose for many
> years] - THAT is not recoverable. THIS is!
>
> Incidentally:
> SCSI host adapter : Adaptec 1542B (formerly 1540A)
> CDrom : NEC 3x external
>
> (I have an old 2X scsi cdrom as well to handle data CDs :)
> [incidentally - the drive still plays audio cd's but it can't handle data
> cds anymore if that matters]

The current midlevel SCSI code is very broken in design when it comes to
things like this. Work to replace the current code with something much
better designed is currently under development. Eric Youngdale and I are
working on that code.

The immediate workaround for you is to go thru the code of scsi.c sd.c
sr.c and st.c and to increase the timeouts by a factor of 10 or even 100
until those bogus timeouts disapear.

Mike

"The woods are lovely, dark and deep. But I have promises to keep,
And lines to code before I sleep, And lines to code before I sleep."