ATAng regression: cdcontrol close not working
Bruce Evans
bde at zeta.org.au
Sun Sep 14 13:32:52 PDT 2003
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
More information about the freebsd-current
mailing list