NetBSD-Users archive

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

Re: large disks



On Wed, Oct 03, 2012 at 12:12:50AM -0500, neoluddite%hushmail.com@localhost 
wrote:
> >On 10/02/2012 at 3:39 PM, "Manuel Bouyer"  wrote:>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 
>      >NetBSD: 26 ans d'experience feront toujours la difference
> >--
> The patch is having trouble building.
> 
> /usr/src/sys/dev/ic/wdc.c: In function 'wdc_sataprobe':
> /usr/src/sys/dev/ic/wdc.c:222:3: error: too few arguments to function
> 'bus_space_write_4'
> /usr/src/sys/sys/bus_proto.h:177:6: note: declared here

Ops, sorry. the attached one should be better

-- 
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       3 Oct 2012 07:21:49 -0000
@@ -214,6 +214,9 @@ 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,
+                   0, 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