[PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Albert Lee
After an error condition, some ATAPI tape drives set DRQ=1 together with ERR=1 when asking the host to transfer the CDB of the next packet command (i.e. request sense). This patch workarounds the problem by ignoring the ERR bit and proceed REQUEST SENSE. Signed-off-by: Albert Lee <[EMAIL PROTEC

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Tejun Heo
Albert Lee wrote: > After an error condition, some ATAPI tape drives set DRQ=1 together with ERR=1 > when asking the host to transfer the CDB of the next packet command (i.e. > request sense). > This patch workarounds the problem by ignoring the ERR bit and proceed > REQUEST SENSE. > > Signed-of

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Mark Lord
Albert Lee wrote: After an error condition, some ATAPI tape drives set DRQ=1 together with ERR=1 when asking the host to transfer the CDB of the next packet command (i.e. request sense). This patch workarounds the problem by ignoring the ERR bit and proceed REQUEST SENSE. Signed-off-by: Albert

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Mark Lord
Mark Lord wrote: .. NAK. There's no guarantee that the next command after an error will always be REQUEST_SENSE. Or is there? I think we should just ignore the ERR bit when DRQ is set for PACKET command. Period. Possibly only for tape drives (since they all seem to do this), and maybe not

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Alan Cox
> NAK. There's no guarantee that the next command after an error > will always be REQUEST_SENSE. Or is there? For that device over ATAPI I believe the guarantee is there, the same as for SCSI. Alan - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Mark Lord
Alan Cox wrote: NAK. There's no guarantee that the next command after an error will always be REQUEST_SENSE. Or is there? For that device over ATAPI I believe the guarantee is there, the same as for SCSI. .. Even for SG_IO w/o requesting sense data? - To unsubscribe from this list: send th

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Alan Cox
On Tue, 13 Nov 2007 12:24:45 -0500 Mark Lord <[EMAIL PROTECTED]> wrote: > Alan Cox wrote: > >> NAK. There's no guarantee that the next command after an error > >> will always be REQUEST_SENSE. Or is there? > > > > For that device over ATAPI I believe the guarantee is there, the same as > > for

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Mark Lord
Alan Cox wrote: On Tue, 13 Nov 2007 12:24:45 -0500 Mark Lord <[EMAIL PROTECTED]> wrote: Alan Cox wrote: NAK. There's no guarantee that the next command after an error will always be REQUEST_SENSE. Or is there? For that device over ATAPI I believe the guarantee is there, the same as for SCS

Re: [PATCH] libata: workaround DRQ=1 ERR=1 for ATAPI tape drives

2007-11-13 Thread Tejun Heo
Mark Lord wrote: > ERR should stay set until the next command has been written to the device. > So we could try and be clever to ignore ERR after PACKET, before CDB, only > if it was set by previous command. > > Sounds a bit complex. > > Just (unconditionally for tape) ignoring it between PACKET