NetBSD Problem Report #229

From gnats  Wed Apr 20 16:26:19 1994
Received: from rafal.slip.uiuc.edu (root@rafal.slip.uiuc.edu [128.174.22.238]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id QAA00140 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Wed, 20 Apr 1994 16:26:15 -0700
Message-Id: <199404202323.SAA00406@rafal.slip.uiuc.edu>
Date: Wed, 20 Apr 1994 18:23:22 -0500
From: Rafal Boni <rafal@rafal.slip.uiuc.edu>
Reply-To: rafal@rafal.slip.uiuc.edu
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: bug in wt driver
X-Send-Pr-Version: 3.2

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 20 16:35:02 +0000 1994
>Closed-Date:    Thu Apr 21 01:10:39 +0000 1994
>Last-Modified:  
>Originator:     Rafal Boni
>Release:        -current as of Apr. 19th
>Organization:
	Me organized?? Ha! 
>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;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mycroft 
State-Changed-When: Wed Apr 20 18:10:39 PDT 1994 
State-Changed-Why:  
Fixed. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.