From owner-freebsd-scsi Thu Aug 22 14:30: 8 2002 Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D42037B400 for ; Thu, 22 Aug 2002 14:30:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4B7CB43E9C for ; Thu, 22 Aug 2002 14:30:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7MLU4JU067848 for ; Thu, 22 Aug 2002 14:30:04 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7MLU4eu067847; Thu, 22 Aug 2002 14:30:04 -0700 (PDT) Date: Thu, 22 Aug 2002 14:30:04 -0700 (PDT) Message-Id: <200208222130.g7MLU4eu067847@freefall.freebsd.org> To: freebsd-scsi@FreeBSD.org Cc: From: "M. Warner Losh" Subject: Re: kern/15608: acd0 / cd0 give inconsistent errors on empty tray open() Reply-To: "M. Warner Losh" Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR kern/15608; it has been noted by GNATS. From: "M. Warner Losh" To: ken@kdm.org Cc: johan@FreeBSD.ORG, nsayer@quack.kfu.com, freebsd-gnats-submit@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG, freebsd-standards@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: kern/15608: acd0 / cd0 give inconsistent errors on empty tray open() Date: Thu, 22 Aug 2002 15:23:29 -0600 (MDT) In message: <20020822150931.A10866@panzer.kdm.org> "Kenneth D. Merry" writes: : The question is, what sort of error should we return from a peripheral : driver (cd(4), da(4), etc.) open() routine when there is no media in the : drive? : : Currently all CAM drivers will return ENXIO, and although the PR says that : the acd(4) driver returns EIO, I can't tell from acdopen that it returns : any errors at all if media isn't present. : : My guess is that EIO is getting returned sometime later in the acd(4) : driver. (If that is still the case, this PR was filed in late 1999.) : : So is there any opinion on -standards as to what sort of error we should : return on open if there is no media in a drive? EIO means "The device is there, but the driver had problems interacting with it" while ENXIO means "the device isn't there at all." As such, EIO is the more correct error to return in this case. I don't know if the standards speak to this specific issue (no or bad media in a device with removable media). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message