linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SATAPI timing
@ 2005-01-28 15:37 gp
  2005-01-28 17:47 ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: gp @ 2005-01-28 15:37 UTC (permalink / raw)
  To: linux-ide

Jeff

I think I may have found an issue in the ATAPI code in the function 
atapi_packet_task.

 From my testing with the sata_via driver, I have been getting a timeout 
when sending the first inquiry command.


Here is the section of code of interest:


	/* make sure DRQ is set */
	status = ata_chk_status(ap);
	if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ)
		goto err_out;

	/* send SCSI cdb */
	DPRINTK("send cdb\n");
	assert(ap->cdb_len >= 12);
	ata_data_xfer(ap, qc->cdb, ap->cdb_len, 1);

** Wait is needed here to work correctly
DPRINTK("Wait for a bit\n");

	/* if we are DMA'ing, irq handler takes over from here */
	if (qc->tf.protocol == ATA_PROT_ATAPI_DMA)
		ap->ops->bmdma_start(qc);	    /* initiate bmdma */


In the test case, the dma transfer is being used. From my perusal of 
the ATA spec in section 9.8, it looks like there needs to be a definite 
state transition before issuing the bmdma_start.

Would you take a look at this and verify my theory?
Thanks for all the hard work on these drivers.

Gary


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-02-22  6:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-28 15:37 SATAPI timing gp
2005-01-28 17:47 ` Jeff Garzik
2005-02-01 10:49   ` Albert Lee
2005-02-06 15:17     ` Jeff Garzik
2005-02-19  5:15     ` Jeff Garzik
2005-02-21  7:54       ` Jens Axboe
2005-02-22  6:33         ` Albert Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).