Re: ATAng regression: cdcontrol close not working

From: Bruce Evans (bde_at_zeta.org.au)
Date: 09/14/03

  • Next message: masta: "Re: mdmfs: newfs exited with error code 36"
    Date: Mon, 15 Sep 2003 06:32:40 +1000 (EST)
    To: Pav Lucistnik <pav@oook.cz>
    
    

    On Sun, 14 Sep 2003, Pav Lucistnik wrote:

    > 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?

    Up to the maintainer :-).

    Bruce
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"


  • Next message: masta: "Re: mdmfs: newfs exited with error code 36"

    Relevant Pages