Subject: port-i386/229: bug in wt driver
To: None <gnats-admin>
From: Rafal Boni <rafal@rafal.slip.uiuc.edu>
List: netbsd-bugs
Date: 04/20/1994 16:35:04
>Number: 229
>Category: port-i386
>Synopsis: wtprobe/attach return wrong # of IO ports used.
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 20 16:35:02 1994
>Originator: Rafal Boni
>Organization:
Me organized?? Ha!
>Release: -current as of Apr. 19th
>Environment:
System: NetBSD rafal.slip.uiuc.edu 0.9a RAFAL#0 i386
wt driver configured in kernel
Everex QIC-02 controller
Current kernel as of 4/19
>Description:
the wt driver was never fully updated to the new standard for
probe and attach routines, it still returns the # of ports from
probe, instead of sticking it in the proper struct...
>How-To-Repeat:
1. build kernel with wt in it...
2. let wt probe your controller...
3. watch the kernel tell you "wt0 at isa0 0x280-0x87c" or something
else absurd.
>Fix:
*** src/wt.c.orig Tue Apr 12 22:20:26 1994
--- src/wt.c Tue Apr 12 22:20:07 1994
***************
*** 200,209 ****
sc->BUSY = WT_BUSY; sc->NOEXCEP = WT_NOEXCEP;
sc->RESETMASK = WT_RESETMASK; sc->RESETVAL = WT_RESETVAL;
sc->ONLINE = WT_ONLINE; sc->RESET = WT_RESET;
sc->REQUEST = WT_REQUEST; sc->IEN = WT_IEN;
! if (wtreset(sc))
! return WT_NPORT;
/* Try Archive. */
sc->type = ARCHIVE;
sc->CTLPORT = AV_CTLPORT(iobase);
--- 200,211 ----
sc->BUSY = WT_BUSY; sc->NOEXCEP = WT_NOEXCEP;
sc->RESETMASK = WT_RESETMASK; sc->RESETVAL = WT_RESETVAL;
sc->ONLINE = WT_ONLINE; sc->RESET = WT_RESET;
sc->REQUEST = WT_REQUEST; sc->IEN = WT_IEN;
! if (wtreset(sc)) {
! ia->ia_iosize = WT_NPORT;
! return 1;
! }
/* Try Archive. */
sc->type = ARCHIVE;
sc->CTLPORT = AV_CTLPORT(iobase);
***************
*** 215,224 ****
sc->BUSY = AV_BUSY; sc->NOEXCEP = AV_NOEXCEP;
sc->RESETMASK = AV_RESETMASK; sc->RESETVAL = AV_RESETVAL;
sc->ONLINE = 0; sc->RESET = AV_RESET;
sc->REQUEST = AV_REQUEST; sc->IEN = AV_IEN;
! if (wtreset(sc))
! return AV_NPORT;
/* Tape controller not found. */
sc->type = UNKNOWN;
return 0;
--- 217,228 ----
sc->BUSY = AV_BUSY; sc->NOEXCEP = AV_NOEXCEP;
sc->RESETMASK = AV_RESETMASK; sc->RESETVAL = AV_RESETVAL;
sc->ONLINE = 0; sc->RESET = AV_RESET;
sc->REQUEST = AV_REQUEST; sc->IEN = AV_IEN;
! if (wtreset(sc)) {
! ia->ia_iosize = AV_NPORT;
! return 1;
! }
/* Tape controller not found. */
sc->type = UNKNOWN;
return 0;
>Audit-Trail:
>Unformatted:
------------------------------------------------------------------------------