[UBUNTU:libata] delay resume to wait for harddrives to spin up

Ryan Lortie desrt at desrt.ca
Sat Jun 10 16:59:01 UTC 2006

This patch was picked up from the LKML
(http://lkml.org/lkml/2006/5/28/103).  It is currently in 2.6.17-rc6.
It causes the code to spin on resume until the harddrives have finished
powering on.

I adapted it for the dapper kernel since we do some things that are no
longer done upstream on resume (like PHY reset).  I've essentially moved
the code up a bit in the function to delay before we do all of our

mjg59 says that this patch is "obviously correct" and should be included
for dapper-updates.  It also fixes a real problem on my Macbook where
the drives don't spin up fast enough.


diff -rup linux-source-2.6.15/drivers/scsi/libata-core.c linux-source-2.6.15+/drivers/scsi/libata-core.c
--- linux-source-2.6.15/drivers/scsi/libata-core.c	2006-05-02 01:01:55.000000000 -0400
+++ linux-source-2.6.15+/drivers/scsi/libata-core.c	2006-06-10 04:17:58.000000000 -0400
@@ -4303,6 +4303,9 @@ int ata_device_resume(struct ata_port *a
 	if (!ata_dev_present(dev))
 		return 0;
+ 	if (ap->flags & ATA_FLAG_SUSPENDED)
+ 		ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 200000);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 703 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060610/f7b49614/attachment.sig>

More information about the kernel-team mailing list