Module Name: src Committed By: bouyer Date: Sun Aug 28 10:21:41 UTC 2011
Modified Files: src/sys/dev/ic: wdc.c Log Message: 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). To generate a diff of this commit: cvs rdiff -u -r1.264 -r1.265 src/sys/dev/ic/wdc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/wdc.c diff -u src/sys/dev/ic/wdc.c:1.264 src/sys/dev/ic/wdc.c:1.265 --- src/sys/dev/ic/wdc.c:1.264 Sun Aug 28 09:32:21 2011 +++ src/sys/dev/ic/wdc.c Sun Aug 28 10:21:41 2011 @@ -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(¶ms, PRIBIO, "atadrdy", 1); - } - 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 -#endif + } else { wflags = AT_POLL; + } +#endif again: ATADEBUG_PRINT(("__wdccommand_intr %s:%d:%d\n",