[PATCH] sata_sil24: put port into known state before softresetting

Make sure the controller has no pending commands and ready for command
before issuing SRST.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Tejun Heo 2006-04-11 22:32:19 +09:00 committed by Jeff Garzik
parent b5bc421c96
commit 2555d6c268

View File

@ -474,6 +474,12 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class)
irq_enable = readl(port + PORT_IRQ_ENABLE_SET); irq_enable = readl(port + PORT_IRQ_ENABLE_SET);
writel(irq_enable, port + PORT_IRQ_ENABLE_CLR); writel(irq_enable, port + PORT_IRQ_ENABLE_CLR);
/* put the port into known state */
if (sil24_init_port(ap)) {
reason ="port not ready";
goto err;
}
/* /*
* XXX: Not sure whether the following sleep is needed or not. * XXX: Not sure whether the following sleep is needed or not.
* The original driver had it. So.... * The original driver had it. So....