From gnb@itga.com.au Mon Mar 15 16:26:48 1999
Return-Path: <gnb@itga.com.au>
Received: from fw.bby.com.au (ns.bby.com.au [192.83.119.129])
	by hub.freebsd.org (Postfix) with ESMTP id 0E62214EEC
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 15 Mar 1999 16:26:44 -0800 (PST)
	(envelope-from gnb@itga.com.au)
Received: (from daemon@localhost) by fw.bby.com.au (8.8.8/8.6.9) id LAA03097 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 16 Mar 1999 11:26:25 +1100 (EST)
Received: from lightning.itga.com.au(192.168.71.20)
 via SMTP by fw.bby.com.au, id smtpd003095; Tue Mar 16 00:26:19 1999
Received: from hellcat.itga.com.au (hellcat.itga.com.au [192.168.71.163])
	by lightning.itga.com.au (8.9.1a/8.9.1) with ESMTP id LAA09509;
	Tue, 16 Mar 1999 11:26:18 +1100 (EST)
Received: (from gnb@localhost)
	by hellcat.itga.com.au (8.9.2/8.9.1) id LAA14331;
	Tue, 16 Mar 1999 11:26:18 +1100 (EST)
	(envelope-from gnb@itga.com.au)
Message-Id: <199903160026.LAA14331@hellcat.itga.com.au>
Date: Tue, 16 Mar 1999 11:26:18 +1100 (EST)
From: Gregory Bond <gnb@itga.com.au>
Reply-To: gnb@itga.com.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: Patch: nit with atapi.c and LS-120s
X-Send-Pr-Version: 3.2

>Number:         10606
>Category:       i386
>Synopsis:       Probablue odd error message if LS-120 is not configured
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 15 16:30:01 PST 1999
>Closed-Date:    Sat Aug 5 14:29:41 PDT 2000
>Last-Modified:  Sat Aug 05 14:30:05 PDT 2000
>Originator:     Gregory Bond
>Release:        FreeBSD 3.1-STABLE i386
>Organization:
ITG Australia Limited
>Environment:

FreeBSD 3.1-Stable
An LS-120 (or other ATAPI Direct Access device) installed but no wfd
driver configured.

>Description:

While fossicking around the atapi code I noticed that if an LS-120
(or other ATAPI Direct Access device - are there any?) is installed
but the relevent wfd driver is not configured in the kernel, then
the probe code in atapi.c falls through to the CD case.  This will
cause the acd driver to try and probe/attach the LS-120, which is
likely to give interesting error messages!

>How-To-Repeat:

Note I have no LS-120 to test this, so I am assuming this is a bug.  Inspect
the code and note that in the case WNFD == 0, th switch statement inside
atapi_attach() falls through.

>Fix:

*** ./sys/i386/isa/atapi.c.dist Mon Mar 15 18:30:21 1999
--- ./sys/i386/isa/atapi.c      Tue Mar 16 11:15:01 1999
***************
*** 291,296 ****
--- 291,299 ----
                        ata->attached[unit] = 1;
                        return (1);
                }
+ #else
+               printf ("wdc%d: ATAPI LS-120 (or other DASD) not configured\n",
 ctlr);
+               break;
  #endif
        case AT_TYPE_CDROM:             /* CD-ROM device */
  #if NACD > 0

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nbm 
State-Changed-When: Sat Aug 5 14:29:41 PDT 2000 
State-Changed-Why:  
The new ATAPI code doesn't have this possible bug. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=10606 
>Unformatted:
