Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Revert previous and fix properly by just removing...



details:   https://anonhg.NetBSD.org/src/rev/994b9be07ce7
branches:  trunk
changeset: 768878:994b9be07ce7
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Aug 28 10:21:41 2011 +0000

description:
Revert previous and fix properly by just removing the #error and a bogus
KASSERT() (these 2 are leftover from the experiments on the fuloong
and were not intended to be commited).

diffstat:

 sys/dev/ic/wdc.c |  20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diffs (70 lines):

diff -r c25cec4d2d97 -r 994b9be07ce7 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Sun Aug 28 10:13:03 2011 +0000
+++ b/sys/dev/ic/wdc.c  Sun Aug 28 10:21:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.264 2011/08/28 09:32:21 christos Exp $ */
+/*     $NetBSD: wdc.c,v 1.265 2011/08/28 10:21:41 bouyer Exp $ */
 
 /*
  * Copyright (c) 1998, 2001, 2003 Manuel Bouyer.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.264 2011/08/28 09:32:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.265 2011/08/28 10:21:41 bouyer Exp $");
 
 #include "opt_ata.h"
 #include "opt_wdc.h"
@@ -299,9 +299,7 @@
                return;
        }
 
-#ifndef WDC_NO_IDS
        s = splbio();
-#endif
        /* for ATA/OLD drives, wait for DRDY, 3s timeout */
        for (i = 0; i < mstohz(3000); i++) {
                /*
@@ -340,12 +338,10 @@
                 * delay instead
                 */
                delay(1000000 / hz);
-       }
 #else
                tsleep(&params, PRIBIO, "atadrdy", 1);
+#endif
        }
-       s = splbio();
-#endif
        if ((st0 & WDCS_DRDY) == 0)
                chp->ch_drive[0].drive_flags &= ~(DRIVE_ATA|DRIVE_OLD);
        if ((st1 & WDCS_DRDY) == 0)
@@ -1099,7 +1095,6 @@
        u_int8_t sc0 = 0, sn0 = 0, cl0 = 0, ch0 = 0;
        u_int8_t sc1 = 0, sn1 = 0, cl1 = 0, ch1 = 0;
 #endif
-       KASSERT(poll == RESET_POLL);
        if (poll)
                nloop = WDCNDELAY_RST;
        else
@@ -1508,13 +1503,16 @@
                drive_flags = chp->ch_drive[xfer->c_drive].drive_flags;
        }
 
-#ifndef WDC_NO_IDS
+#ifdef WDC_NO_IDS
+       wflags = AT_POLL;
+#else
        if ((ata_c->flags & (AT_WAIT | AT_POLL)) == (AT_WAIT | AT_POLL)) {
                /* both wait and poll, we can tsleep here */
                wflags = AT_WAIT | AT_POLL;
-       } else
+       } else {
+               wflags = AT_POLL;
+       }
 #endif
-               wflags = AT_POLL;
 
  again:
        ATADEBUG_PRINT(("__wdccommand_intr %s:%d:%d\n",



Home | Main Index | Thread Index | Old Index