From owner-freebsd-bugs Sat Jan 6 8:20: 9 2001 From owner-freebsd-bugs@FreeBSD.ORG Sat Jan 6 08:20:01 2001 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6CC5A37B402 for ; Sat, 6 Jan 2001 08:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f06GK1X07645; Sat, 6 Jan 2001 08:20:01 -0800 (PST) (envelope-from gnats) Resent-Date: Sat, 6 Jan 2001 08:20:01 -0800 (PST) Resent-Message-Id: <200101061620.f06GK1X07645@freefall.freebsd.org> Resent-From: gnats-admin@FreeBSD.org (GNATS Management) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: gnats-admin@FreeBSD.org, alexandre12@mageos.com Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BC78B37B400 for ; Sat, 6 Jan 2001 08:15:15 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f06GFFm07093; Sat, 6 Jan 2001 08:15:15 -0800 (PST) (envelope-from nobody) Message-Id: <200101061615.f06GFFm07093@freefall.freebsd.org> Date: Sat, 6 Jan 2001 08:15:15 -0800 (PST) From: alexandre12@mageos.com Sender: nobody@FreeBSD.org To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/24109: patch for making the atapi-cd drive waits for media Resent-Sender: gnats@FreeBSD.org Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 24109 >Category: kern >Synopsis: patch for making the atapi-cd drive waits for media >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 06 08:20:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: alexandre j >Release: 4.2 >Organization: - >Environment: - >Description: If you use a command (such as mount) reading the ATAPI-CDROM device (eg /dev/acd0a) and the drive is still initializing the drive, the command will fail with a "device busy" message. This patch corrects the problem by making the command waiting for the drive to be ready. >How-To-Repeat: - >Fix: apply this patch to your (4.2-RELEASE) kernel source tree : (when you are in /usr/src/sys) ** start ** --- dev/ata/atapi-cd.c.orig Sat Jan 6 16:41:54 2001 +++ dev/ata/atapi-cd.c Sat Jan 6 16:44:39 2001 @@ -490,6 +490,12 @@ struct acd_softc *cdp; int track = (dev->si_udev & 0x00ff0000) >> 16; + /* + * Close the CDROM door and waits for the media to be ready (patch by ) + */ + + acdioctl(dev, CDIOCCLOSE,0,flags, p); + if (track) { dev_t dev1 = makedev(major(dev), (dev->si_udev & 0xff0000ff)); ** end ** note that since i don't own a scsi cdrom drive, i don't know if this works with it. note2: since i can't have cvs access, i can't patch directly with the current branch and the patch should work only with the src from 4.2-release. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message