Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/dev/scsipi Pull up revision 1.22:



details:   https://anonhg.NetBSD.org/src/rev/3118698b4c2e
branches:  netbsd-1-4
changeset: 469292:3118698b4c2e
user:      he <he%NetBSD.org@localhost>
date:      Sat Aug 28 22:02:01 1999 +0000

description:
Pull up revision 1.22:
  Retry PIO mode 3 if PIO mode < 3 fails.

diffstat:

 sys/dev/scsipi/atapi_wdc.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 2478b82c72e8 -r 3118698b4c2e sys/dev/scsipi/atapi_wdc.c
--- a/sys/dev/scsipi/atapi_wdc.c        Sat Aug 28 21:54:29 1999 +0000
+++ b/sys/dev/scsipi/atapi_wdc.c        Sat Aug 28 22:02:01 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atapi_wdc.c,v 1.20.2.3 1999/08/25 11:20:01 he Exp $    */
+/*     $NetBSD: atapi_wdc.c,v 1.20.2.4 1999/08/28 22:02:01 he Exp $    */
 
 /*
  * Copyright (c) 1998 Manuel Bouyer.
@@ -714,6 +714,7 @@
            WDSD_IBM | (xfer->drive << 4));
        switch (drvp->state) {
        case PIOMODE:
+piomode:
                /* Don't try to set mode if controller can't be adjusted */
                if ((chp->wdc->cap & WDC_CAPABILITY_MODE) == 0)
                        goto ready;
@@ -728,8 +729,14 @@
                errstring = "piomode";
                if (wait_for_unbusy(chp, delay))
                        goto timeout;
-               if (chp->ch_status & WDCS_ERR)
-                       goto error;
+               if (chp->ch_status & WDCS_ERR) {
+                       if (drvp->PIO_mode < 3) {
+                               drvp->PIO_mode = 3;
+                               goto piomode;
+                       } else {
+                               goto error;
+                       }
+               }
        /* fall through */
 
        case DMAMODE:



Home | Main Index | Thread Index | Old Index