scsi/ahci: replace schedule_timeout() with
Subsystems (2)
PATCH 1/1 scsi/ahci: replace schedule_timeout() with
Any comments would be, as always, appreciated.
-Nish
Description: Uses msleep() / ssleep() [as appropriate] instead of schedule_timeout() to guarantee the task delays as expected.
Signed-off-by Nishanth Aravamudan <[email protected]>
drivers/scsi/ahci.c +3 -6
@@ -363,8 +363,7 @@ static void ahci_port_stop(struct ata_po/* spec says 500 msecs for each PORT_CMD_{START,FIS_RX} bit, so * this is slightly incorrect. */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout ((HZ /2 ) +1 ); +msleep (500 ); ap->private_data =NULL ; pci_free_consistent(pdev, AHCI_PORT_PRIV_DMA_SZ,
@@ -719,8 +718,7 @@ static int ahci_host_init(struct ata_pro/* reset must complete within 1 second, or * the hardware should be considered fried. */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout (HZ +1 ); +ssleep (1 ); tmp =readl (mmio +HOST_CTL );if (tmp &HOST_RESET ) {
@@ -798,8 +796,7 @@ static int ahci_host_init(struct ata_pro/* spec says 500 msecs for each bit, so * this is slightly incorrect. */ -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout ((HZ /2 ) +1 ); +msleep (500 ); }writel (PORT_CMD_SPIN_UP , port_mmio +PORT_CMD );
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors