From owner-freebsd-current@FreeBSD.ORG Sun Sep 14 13:32:52 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3EFE16A4BF; Sun, 14 Sep 2003 13:32:51 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5075C43FE3; Sun, 14 Sep 2003 13:32:50 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id GAA21858; Mon, 15 Sep 2003 06:32:41 +1000 Date: Mon, 15 Sep 2003 06:32:40 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Pav Lucistnik In-Reply-To: <1063570391.670.2.camel@hood.oook.cz> Message-ID: <20030915063116.V2580@gamplex.bde.org> References: <1062856314.734.8.camel@hood.oook.cz> <20030907052713.E11673@delplex.bde.org> <1063570391.670.2.camel@hood.oook.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE cc: freebsd-current@freebsd.org Subject: Re: ATAng regression: cdcontrol close not working X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2003 20:32:52 -0000 On Sun, 14 Sep 2003, Pav Lucistnik wrote: > V so, 06. 09. 2003 v 21:41, Bruce Evans p=ED=B9e: > > On Sat, 6 Sep 2003, Pav Lucistnik wrote: > > > > > after recent ATAng changes, cdcontrol close stopped working > > > with my CD-ROM drive. It used to close the tray. It works with -f > > > /dev/cd0 but not with /dev/acd0. cdcontrol eject still works fine. > > > > I use the following fix: > > > > %%% > > Index: atapi-cd.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: /home/ncvs/src/sys/dev/ata/atapi-cd.c,v > > retrieving revision 1.142 > > diff -u -2 -r1.142 atapi-cd.c > > --- atapi-cd.c=095 Sep 2003 10:40:16 -0000=091.142 > > +++ atapi-cd.c=096 Sep 2003 17:16:16 -0000 > > @@ -1870,7 +1913,7 @@ > > int error; > > > > - if ((error =3D acd_start_stop(cdp, 0)) =3D=3D EBUSY) { > > + if ((error =3D acd_start_stop(cdp, 0)) =3D=3D EBUSY || close) { > > =09if (!close) > > -=09 return 0; > > +=09 return EBUSY; > > =09if ((error =3D acd_start_stop(cdp, 3))) > > =09 return error; > > @@ -1882,6 +1925,4 @@ > > if (error) > > =09return error; > > - if (close) > > -=09return 0; > > acd_prevent_allow(cdp, 0); > > cdp->flags &=3D ~F_LOCKED; > > %%% > > > > acd_eject() doesn't seem to have been changed by ATAng, so I don't see = how > > close it could have ever worked, but I seem to remember it working. > > This patch works for me. Any chance to get it committed? Up to the maintainer :-). Bruce