From owner-freebsd-current@FreeBSD.ORG Sun Sep 14 13:13:15 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 A948816A4BF for ; Sun, 14 Sep 2003 13:13:15 -0700 (PDT) Received: from hood.oook.cz (hood.oook.cz [212.27.205.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BFDA43FCB for ; Sun, 14 Sep 2003 13:13:14 -0700 (PDT) (envelope-from pav@oook.cz) Received: from hood.oook.cz (localhost.oook.cz [127.0.0.1]) by hood.oook.cz (8.12.9/8.12.9) with ESMTP id h8EKDC4v000703; Sun, 14 Sep 2003 22:13:12 +0200 (CEST) (envelope-from pav@oook.cz) Received: (from pav@localhost) by hood.oook.cz (8.12.9/8.12.9/Submit) id h8EKDCB5000702; Sun, 14 Sep 2003 22:13:12 +0200 (CEST) (envelope-from pav@oook.cz) X-Authentication-Warning: hood.oook.cz: pav set sender to pav@oook.cz using -f From: Pav Lucistnik To: Bruce Evans In-Reply-To: <20030907052713.E11673@delplex.bde.org> References: <1062856314.734.8.camel@hood.oook.cz> <20030907052713.E11673@delplex.bde.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-dx7j5Pgl49LfJGIJHOwd" Message-Id: <1063570391.670.2.camel@hood.oook.cz> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sun, 14 Sep 2003 22:13:11 +0200 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:13:15 -0000 --=-dx7j5Pgl49LfJGIJHOwd Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable V so, 06. 09. 2003 v 21:41, Bruce Evans p=ED=B9e: > On Sat, 6 Sep 2003, Pav Lucistnik wrote: >=20 > > 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. >=20 > I use the following fix: >=20 > %%% > 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 5 Sep 2003 10:40:16 -0000 1.142 > +++ atapi-cd.c 6 Sep 2003 17:16:16 -0000 > @@ -1870,7 +1913,7 @@ > int error; >=20 > - if ((error =3D acd_start_stop(cdp, 0)) =3D=3D EBUSY) { > + if ((error =3D acd_start_stop(cdp, 0)) =3D=3D EBUSY || close) { > if (!close) > - return 0; > + return EBUSY; > if ((error =3D acd_start_stop(cdp, 3))) > return error; > @@ -1882,6 +1925,4 @@ > if (error) > return error; > - if (close) > - return 0; > acd_prevent_allow(cdp, 0); > cdp->flags &=3D ~F_LOCKED; > %%% >=20 > acd_eject() doesn't seem to have been changed by ATAng, so I don't see ho= w > close it could have ever worked, but I seem to remember it working. This patch works for me. Any chance to get it committed? > > Relevant dmesg parts: > > ... > > cd0 at ata1 bus 0 target 0 lun 0 > > cd0: Removable CD-ROM SCSI-0 device > > cd0: 16.000MB/s transfers > > cd0: cd present [357072 x 2048 byte records] > > > > I do have atapicam in my kernel. >=20 > Close works on cd0 and cd1 for me without the above patch. The code for > eject and close in scsi_cd.c is easier to understand. Yes, for me too. I haven't tought to try cdcontrol on /dev/cd0 before, thank you for the tip. --=20 Pav Lucistnik What do we know about love? Love is like a pear. Pear is sweet and have a specific shape. Try to exactly define the shape of a pear. -- Marigold: 50 Years Of Poetry --=-dx7j5Pgl49LfJGIJHOwd Content-Type: application/pgp-signature; name=signature.asc Content-Description: Toto je =?iso-8859-2?Q?digit=E1ln=EC?= =?ISO-8859-1?Q?_podepsan=E1?= =?iso-8859-2?Q?_=E8=E1st?= =?ISO-8859-1?Q?_zpr=E1vy?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/ZMvXntdYP8FOsoIRAh9HAKDDBmi28sq3lLqWKfQ2GRcJbncIawCdFfrY 4orpWV17Bv+YEf9eHGWl1xg= =hHSZ -----END PGP SIGNATURE----- --=-dx7j5Pgl49LfJGIJHOwd--