summaryrefslogtreecommitdiff
path: root/drivers/scsi/sata_sil24.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-04-11 22:32:19 +0900
committerJeff Garzik <jeff@garzik.org>2006-04-11 13:31:36 -0400
commit2555d6c268240fb3f5f335bd62d0518025343c0f (patch)
treea4cd391fb73cf9c37fa4976d7d999ddea546d383 /drivers/scsi/sata_sil24.c
parentb5bc421c96ca56a9abaad4619da01fe0071904a2 (diff)
downloadlwn-2555d6c268240fb3f5f335bd62d0518025343c0f.tar.gz
lwn-2555d6c268240fb3f5f335bd62d0518025343c0f.zip
[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>
Diffstat (limited to 'drivers/scsi/sata_sil24.c')
-rw-r--r--drivers/scsi/sata_sil24.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index 8199527966eb..bfbd630a889c 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -474,6 +474,12 @@ static int sil24_softreset(struct ata_port *ap, unsigned int *class)
irq_enable = readl(port + PORT_IRQ_ENABLE_SET);
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.
* The original driver had it. So....