Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Oddness in ahcisata driver
I am afraid it did not work for me.
I generally see the following:
...
ahcisata0 at pci0 dev 31 function 2: Intel 82801HBM SATA Controller
ahcisata0: interrupting at ioapic0 pin 19 (irq 10)
ahcisata0: AHCI revision 1.1, 3 ports, 32 command slots, features 0xe720e080
atabus2 at ahcisata0 channel 0
atabus3 at ahcisata0 channel 1
atabus4 at ahcisata0 channel 2
...
ahcisata0 port 0: device present, speed: 1.5Gb/s
...
wd0 at atabus2 drive 0ahcisata0 port 1: PHY offline
...
Is it possible that different channels are interfering
with each other?
I am using the attached patch currently, which is still
not a correct fix.
Manuel Bouyer wrote:
On Thu, Apr 17, 2008 at 12:08:17PM -0500, M Graff wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Yorick Hardy wrote:
| This is not a correct fix, but would you be interested in looking here?
|
| http://mail-index.netbsd.org/port-i386/2008/04/14/msg000371.html
This patch suggests retrying after a short delay. I've tested it and
while it does work, it does not ALWAYS work -- one time in 15 it has
failed me if I rapidly reboot.
I suppose we might need a:
~ maxtries = 5;
~ while (err == CMD_ERR && maxtries-- > 0) {
~ delay(...);
~ err = wd->atabus->...
~ }
Could you try with ahcisata_core.c rev 1.15 that I just commited ?
It may help for this problem.
--
Kind regards,
Yorick Hardy
--- sys/dev/ata/wd.c.orig 2008-05-01 22:32:25.000000000 +0200
+++ sys/dev/ata/wd.c 2008-05-02 00:34:58.000000000 +0200
@@ -1774,8 +1774,14 @@
int
wd_get_params(struct wd_softc *wd, u_int8_t flags, struct ataparams *params)
{
+ int err = wd->atabus->ata_get_params(wd->drvp, flags, params);
- switch (wd->atabus->ata_get_params(wd->drvp, flags, params)) {
+ while (err == CMD_ERR && wd->drvp->state != READY) {
+ delay(100);
+ err = wd->atabus->ata_get_params(wd->drvp, flags, params);
+ }
+
+ switch (err) {
case CMD_AGAIN:
return 1;
case CMD_ERR:
Home |
Main Index |
Thread Index |
Old Index