From nobody@FreeBSD.ORG Mon Jun 14 22:15:04 1999
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id 8285014D6D; Mon, 14 Jun 1999 22:15:04 -0700 (PDT)
Message-Id: <19990615051504.8285014D6D@hub.freebsd.org>
Date: Mon, 14 Jun 1999 22:15:04 -0700 (PDT)
From: simonw@cinesite.com
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@freebsd.org
Subject: Eject ioctl() for wfd (ATAPI driver) doesn't work
X-Send-Pr-Version: www-1.0

>Number:         12218
>Category:       kern
>Synopsis:       Eject ioctl() for wfd (ATAPI driver) doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 14 22:20:01 PDT 1999
>Closed-Date:    Wed Jun 23 20:10:15 PDT 1999
>Last-Modified:  Wed Jun 23 20:10:31 PDT 1999
>Originator:     Simon Walton
>Release:        3.1
>Organization:
>Environment:
FreeBSD stepney 3.1-RELEASE FreeBSD 3.1-RELEASE #14: Mon May 31 21:29:49 PDT 1999     simonw@stepney:/usr/src/sys/compile/STEPNEY  i386
>Description:
wfd driver code tries to give wd driver first crack at ioctl's,
but incorrectly interprets internal error and never gets to send
eject to ATAPI device.
>How-To-Repeat:
Put zip disk in internal IDE zip drive, do:

ioctl (fd, _IO('c',24), 0)

where fd is the corresponding wfd open file descriptor. Disk
does not eject.
>Fix:
This kernel patch fixes it:

--- i386/isa/wfd.c.sav  Mon May 31 21:29:06 1999
+++ i386/isa/wfd.c      Mon May 31 21:29:34 1999
@@ -663,7 +663,7 @@
 
        error = dsioctl("wfd", dev, cmd, addr, flag, &t->dk_slices,
                        wfdstrategy1, (ds_setgeom_t *)NULL);
-       if (error != -1)
+       if (error != ENOIOCTL)
                return (error);
 
        if (t->flags & F_MEDIA_CHANGED)


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: msmith 
State-Changed-When: Wed Jun 23 20:10:15 PDT 1999 
State-Changed-Why:  
Patch committed, thanks! 
>Unformatted:
