]> git.hungrycats.org Git - linux/commitdiff
[PATCH] correct LoEj logic
authorJens Axboe <axboe@suse.de>
Mon, 26 Apr 2004 05:17:44 +0000 (22:17 -0700)
committerJens Axboe <axboe@suse.de>
Mon, 26 Apr 2004 05:17:44 +0000 (22:17 -0700)
The logic got a little foo-bar'ed in the last patch, we should have keep
the old logic.  Ie LoEj bit (2nd) must always be set, just clear it for
known non-capable of loading drives.

drivers/ide/ide-cd.c

index 4c75ed5fdf3568f4714edb9db9aedceb68c7ecc4..95a44a93b873389df20cdd8246ac68c470d3493f 100644 (file)
@@ -2160,7 +2160,7 @@ static int cdrom_eject(ide_drive_t *drive, int ejectflag,
                       struct request_sense *sense)
 {
        struct request req;
-       char loej = 0;
+       char loej = 0x02;
 
        if (CDROM_CONFIG_FLAGS(drive)->no_eject && !ejectflag)
                return -EDRIVE_CANT_DO_THIS;
@@ -2172,8 +2172,8 @@ static int cdrom_eject(ide_drive_t *drive, int ejectflag,
        cdrom_prepare_request(&req);
 
        /* only tell drive to close tray if open, if it can do that */
-       if (ejectflag && CDROM_CONFIG_FLAGS(drive)->close_tray)
-               loej = 0x02;
+       if (ejectflag && !CDROM_CONFIG_FLAGS(drive)->close_tray)
+               loej = 0;
 
        req.sense = sense;
        req.cmd[0] = GPCMD_START_STOP_UNIT;