V so, 06. 09. 2003 v 21:41, Bruce Evans píše:
> 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
> ===================================================================
> 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;
>
> - if ((error = acd_start_stop(cdp, 0)) == EBUSY) {
> + if ((error = acd_start_stop(cdp, 0)) == EBUSY || close) {
> if (!close)
> - return 0;
> + return EBUSY;
> if ((error = 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 &= ~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? > > Relevant dmesg parts: > > ... > > cd0 at ata1 bus 0 target 0 lun 0 > > cd0: <TEAC CD-532E-B 1.0A> 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. > > 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. -- Pav Lucistnik <[EMAIL PROTECTED]> 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
signature.asc
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?=
