]> err.no Git - linux-2.6/commitdiff
libata: don't schedule LPM action seperately during probing
authorTejun Heo <htejun@gmail.com>
Sun, 18 May 2008 16:15:12 +0000 (01:15 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 19 May 2008 21:51:48 +0000 (17:51 -0400)
There's no reason to schedule LPM action after probing is complete
causing another EH iteration.  Just schedule it together with probing
itself.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/libata-core.c

index ffc689d9e972620482474d3d7074fd475c9a2660..a12a27eb8c7721d66f55c1e750bece8dd6011ecb 100644 (file)
@@ -5615,7 +5615,7 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
                        spin_lock_irqsave(ap->lock, flags);
 
                        ehi->probe_mask |= ATA_ALL_DEVICES;
-                       ehi->action |= ATA_EH_RESET;
+                       ehi->action |= ATA_EH_RESET | ATA_EH_LPM;
                        ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET;
 
                        ap->pflags &= ~ATA_PFLAG_INITIALIZING;
@@ -5648,7 +5648,6 @@ int ata_host_register(struct ata_host *host, struct scsi_host_template *sht)
                struct ata_port *ap = host->ports[i];
 
                ata_scsi_scan_host(ap, 1);
-               ata_lpm_schedule(ap, ap->pm_policy);
        }
 
        return 0;