On 3/7/07, Tejun Heo <[EMAIL PROTECTED]> wrote:
(snip) I've read your last posting about this, but forgot to follow up. TUR is supposed to fail if ATAPI device doesn't have media loaded. TUR fails and sense data returns device not ready - media not present. That's the normal operation. Does TUR fail even with media loaded or is sense data not properly fetched?
Thank you, Tejun! I did forget to load any media :( When I load media and retry, TUR succeeds but there is still a problem: when using ahci driver, TUR will not succeed unless it runs twice, and the following loop always runs till retries==2 -------------------- code in sr.c, get_capabilities() ------------------------- retries = 0; do { memset((void *)cmd, 0, MAX_COMMAND_SIZE); cmd[0] = TEST_UNIT_READY; the_result = scsi_execute_req (cd->device, cmd, DMA_NONE, NULL, 0, &sshdr, SR_TIMEOUT, MAX_RETRIES); retries++; } while (retries < 5 && (!scsi_status_is_good(the_result) || (scsi_sense_valid(&sshdr) && sshdr.sense_key == UNIT_ATTENTION))); ------------------------------------- end code ------------------------------------- this issue only occurs in ahci driver, and libata + pata driver is OK. Conke - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/