Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Remove the hack to attach devices responding with...



details:   https://anonhg.NetBSD.org/src/rev/2d46363bdaf3
branches:  trunk
changeset: 467788:2d46363bdaf3
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Mar 29 08:32:02 1999 +0000

description:
Remove the hack to attach devices responding with ATA signatures as atapi if
IDENTIFY said so: it doesn't help for the drive this was supposed helping,
and seems to break another device.
In interrupt routine, don't return 0 if we are polling: this should fix the
"panic: wdc_exec_command: polled command not done" some people reported
(kern/7269).

diffstat:

 sys/dev/ic/wdc.c |  16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

diffs (37 lines):

diff -r 7d9b60d99e5b -r 2d46363bdaf3 sys/dev/ic/wdc.c
--- a/sys/dev/ic/wdc.c  Mon Mar 29 07:22:02 1999 +0000
+++ b/sys/dev/ic/wdc.c  Mon Mar 29 08:32:02 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: wdc.c,v 1.63 1999/03/25 16:17:36 bouyer Exp $ */
+/*     $NetBSD: wdc.c,v 1.64 1999/03/29 08:32:02 bouyer Exp $ */
 
 
 /*
@@ -358,17 +358,6 @@
                        chp->ch_drive[i].drive_flags &=
                            ~(DRIVE_ATA | DRIVE_ATAPI);
                }
-               /*
-                * XXX some drives (e.g. some revisions of ZIP) are both ATA
-                * and ATAPI
-                */
-               if (chp->ch_drive[i].drive_flags & DRIVE_ATA) {
-                       if ((params.atap_config & WDC_CFG_ATAPI_MASK) ==
-                           WDC_CFG_ATAPI) {
-                               chp->ch_drive[i].drive_flags &= ~DRIVE_ATA;
-                               chp->ch_drive[i].drive_flags |= DRIVE_ATAPI;
-                           }
-               }
        }
        ctrl_flags = chp->wdc->sc_dev.dv_cfdata->cf_flags;
        channel_flags = (ctrl_flags >> (NBBY * chp->channel)) & 0xff;
@@ -1101,7 +1090,8 @@
            chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive), DEBUG_INTR);
        if (wdcwait(chp, wdc_c->r_st_pmask, wdc_c->r_st_pmask,
            (wdc_c->flags & AT_POLL) ? wdc_c->timeout : 0)) {
-               if ((xfer->c_flags & C_TIMEOU) == 0)
+               if ((xfer->c_flags & C_TIMEOU) == 0 && 
+                   (wdc_c->flags & AT_POLL) == 0)
                        return 0; /* IRQ was not for us */
                wdc_c->flags |= AT_TIMEOU;
                __wdccommand_done(chp, xfer);



Home | Main Index | Thread Index | Old Index