Albert Lee wrote:
..
Maybe we can wait a moment and give the slow ATAPI devices some time to set DRQ.
Could you please try if the attached patch works, thanks.
--
albert

--- linux-2.6.20.3/drivers/ata/libata-core.c    2007-03-15 18:03:27.000000000 
+0800
+++ linux-2.6.20.3-mod2/drivers/ata/libata-core.c       2007-03-17 
01:12:53.000000000 +0800
@@ -4384,6 +4384,19 @@ fsm_start:
                 */
                poll_next = (qc->tf.flags & ATA_TFLAG_POLLING);
+ /* wait for some slow ATAPI devices to set DRQ */
+               if (unlikely((status & ATA_DRQ) == 0) &&
+                   is_atapi_taskfile(&qc->tf)) {
+                       int max = 100;
+
+                       do {
+                               udelay(10);
+                               status = ata_chk_status(ap);
+                               max--;
+                               ata_port_printk(ap, KERN_ERR, "wait for DRQ 
%d\n", 100-max);  
+                       } while (((status & ATA_DRQ) == 0) && (max > 0));
+               }
+
                /* check device status */
                if (unlikely((status & ATA_DRQ) == 0)) {
                        /* handle BSY=0, DRQ=0 as error */


I patched the above in, and it was NEVER hit.

-ml
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to