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 Lee <albertcc@xxxxxxxxxx> Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> Cc: Mark Lord <liml@xxxxxx>
..
+ if (qc->tf.protocol == ATA_PROT_PIO || + qc->cdb[0] != REQUEST_SENSE) { + ata_port_printk(ap, KERN_WARNING, "DRQ=1 with device " + "error, dev_stat 0x%X\n", status); + qc->err_mask |= AC_ERR_HSM; + ap->hsm_task_state = HSM_ST_ERR; + goto fsm_start; + }
.. 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 for non-tape drives. Cheers - To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html