svn commit: r189256 - head/sys/dev/ata/chipsets
Alexander Motin
mav at FreeBSD.org
Sun Mar 1 14:50:15 PST 2009
Author: mav
Date: Sun Mar 1 22:50:14 2009
New Revision: 189256
URL: http://svn.freebsd.org/changeset/base/189256
Log:
Give controller a chance to issue Soft Reset clear command before checking
ready status. Most of controllers managed to issue coommand and set BUSY
bit almost simultaneously, before we will read it, but at least JMicron JMB363
don't. Ignore timeout errors to keep old behavior when error there was
impossible.
For me this fixes timeout errors on the first command after channel attach
or reinit. Boot in my case is not affected, as there is much time passing
between reset and next command giving reset time to complete.
Modified:
head/sys/dev/ata/chipsets/ata-ahci.c
Modified: head/sys/dev/ata/chipsets/ata-ahci.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-ahci.c Sun Mar 1 22:48:18 2009 (r189255)
+++ head/sys/dev/ata/chipsets/ata-ahci.c Sun Mar 1 22:50:14 2009 (r189256)
@@ -683,8 +683,7 @@ ata_ahci_softreset(device_t dev, int por
ctp->cfis[1] = port & 0x0f;
//ctp->cfis[7] = ATA_D_LBA | ATA_D_IBM;
ctp->cfis[15] = ATA_A_4BIT;
- if (ata_ahci_issue_cmd(dev, 0, 0))
- return -1;
+ ata_ahci_issue_cmd(dev, 0, 1000);
if (ata_ahci_wait_ready(dev, 1000)) {
device_printf(dev, "software reset clear timeout\n");
More information about the svn-src-head
mailing list