lkml.org 
[lkml]   [1998]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectIDE CD Changer: Door Lock Fix (2.1.125)
The IDE CD support leaves CDs in CD changers locked even after they're
no longer selected. Here's a fix that unlocks CDs when new CDs are
selected.

If this is not the right behavior, please let me know...


Index: drivers/block/ide-cd.c
*************** int ide_cdrom_select_disc (struct cdrom_
*** 2601,2604 ****
--- 2601,2606 ----
}
else {
+ int was_locked;
+
if (
#if ! STANDARD_ATAPI
*************** int ide_cdrom_select_disc (struct cdrom_
*** 2609,2612 ****
--- 2611,2618 ----
}

+ was_locked = CDROM_STATE_FLAGS (drive)->door_locked;
+ if (was_locked)
+ (void) cdrom_lockdoor (drive, 0, NULL);
+
stat = cdrom_load_unload (drive, slot, NULL);
cdrom_saw_media_change (drive);
*************** int ide_cdrom_select_disc (struct cdrom_
*** 2622,2629 ****
if (stat)
return stat;
- return slot;
}
! else
! return stat;
}
}
--- 2628,2637 ----
if (stat)
return stat;
}
!
! if (was_locked)
! (void) cdrom_lockdoor (drive, 1, NULL);
!
! return stat;
}
}

--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"... under cover of afternoon in the biggest car in the county?!" //MST3K

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.237 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site