NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: large disks



On Sun, Sep 30, 2012 at 11:20:07PM +0200, Martin Husemann wrote:
> Here your problem is:
> 
> > viaide2: BSY never cleared, status 0x80
> > viaide2 channel 0: reset failed for drive 0
> 
> I don't know anything about this driver - Manuel, are you around?

This is coming from wdc_sataprobe() in sys/dev/ic/wdc.c
The PHY has established communications with the drive, but the
drive doens't come out of reset within the allowed time (5s).
I guess before these messages there was something like
viaide2 port 0: device present, speed: XXX
right ?

I see that FreeBSD does clear the SATA error register after a link up,
maybe this is what's missing here. If so, the attached patch should
help.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--
Index: wdc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/wdc.c,v
retrieving revision 1.274
diff -u -p -u -r1.274 wdc.c
--- wdc.c       31 Jul 2012 15:50:34 -0000      1.274
+++ wdc.c       2 Oct 2012 20:37:59 -0000
@@ -214,6 +214,8 @@ wdc_sataprobe(struct ata_channel *chp)
        switch (sata_reset_interface(chp, wdr->sata_iot, wdr->sata_control,
            wdr->sata_status)) {
        case SStatus_DET_DEV:
+               /* clear error */
+               bus_space_write_4(wdr->sata_iot, wdr->sata_error, 0xffffffff);
                /* wait 5s for BSY to clear */
                for (i = 0; i < WDC_PROBE_WAIT * hz; i++) {
                        bus_space_write_1(wdr->cmd_iot,


Home | Main Index | Thread Index | Old Index