Skip to content

Commit

Permalink
[PATCH] sata_sil24: put port into known state before softresetting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Apr 11, 2006
1 parent b5bc421 commit 2555d6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/scsi/sata_sil24.c
Original file line number Diff line number Diff line change
Expand Up @@ -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....
Expand Down

0 comments on commit 2555d6c

Please sign in to comment.