Date: Sat, 6 Jan 2001 08:15:15 -0800 (PST) From: alexandre12@mageos.com To: freebsd-gnats-submit@FreeBSD.org Subject: kern/24109: patch for making the atapi-cd drive waits for media Message-ID: <200101061615.f06GFFm07093@freefall.freebsd.org> Resent-Message-ID: <200101061620.f06GK1X07645@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 <alexandre12@mageos.com>) + */ + + 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101061615.f06GFFm07093>