Source-Changes-HG archive

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

[src/netbsd-2-0]: src/sys/dev/scsipi Pull up revision 1.70 (requested by bouy...



details:   https://anonhg.NetBSD.org/src/rev/be8065fc061d
branches:  netbsd-2-0
changeset: 561166:be8065fc061d
user:      tron <tron%NetBSD.org@localhost>
date:      Sat May 29 14:05:46 2004 +0000

description:
Pull up revision 1.70 (requested by bouyer in ticket #396):
Add a delay(10) after re-enabling interrupts in the control register.
Some controllers/drives (e.g. SataLink 3114 with WD Raptor) require
it. Should fix kern/23808 by Chris Gilbert, patch suplied by Chris Gilbert
on tech-kern, extended to all places enabling interrupts by me.

diffstat:

 sys/dev/scsipi/atapi_wdc.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 1b5ab0b987c4 -r be8065fc061d sys/dev/scsipi/atapi_wdc.c
--- a/sys/dev/scsipi/atapi_wdc.c        Sat May 29 14:03:52 2004 +0000
+++ b/sys/dev/scsipi/atapi_wdc.c        Sat May 29 14:05:46 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atapi_wdc.c,v 1.69 2004/02/03 20:55:02 bouyer Exp $    */
+/*     $NetBSD: atapi_wdc.c,v 1.69.2.1 2004/05/29 14:05:46 tron Exp $  */
 
 /*
  * Copyright (c) 1998, 2001 Manuel Bouyer.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.69 2004/02/03 20:55:02 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.69.2.1 2004/05/29 14:05:46 tron Exp $");
 
 #ifndef WDCDEBUG
 #define WDCDEBUG
@@ -475,6 +475,7 @@
                drvp->state = READY;
                bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr,
                    WDCTL_4BIT);
+               delay(10); /* some drives need a little delay here */
        }
        /* start timeout machinery */
        if ((sc_xfer->xs_control & XS_CTL_POLL) == 0)
@@ -543,6 +544,7 @@
            errstring);
        sc_xfer->error = XS_TIMEOUT;
        bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT);
+       delay(10); /* some drives need a little delay here */
        wdc_atapi_reset(chp, xfer);
        return;
 error:
@@ -553,6 +555,7 @@
        sc_xfer->error = XS_SHORTSENSE;
        sc_xfer->sense.atapi_sense = chp->ch_error;
        bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT);
+       delay(10); /* some drives need a little delay here */
        wdc_atapi_reset(chp, xfer);
        return;
 }



Home | Main Index | Thread Index | Old Index