lkml.org 
[lkml]   [1998]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectATAPI cd changer fix, please try it.
If I try to use cdchange to change to a new (not empty) slot,
but there is no disk in the current slot, cdchange refuses with
"No such file or directory" error.
This was tested on a NEC CDR251 (4x4) drive.

Itai

Here is my patch:
--- linux-2.1.78-orig/drivers/block/ide-cd.c Tue Jan 6 22:53:15 1998
+++ linux-2.1.78/drivers/block/ide-cd.c Tue Jan 13 01:03:01 1998
@@ -2467,9 +2467,15 @@
if (drive->usage > 1)
return -EBUSY;

+#if 0
+ /* IMHO this test is wrong because it fails when
+ there is no disk in the current slot.
+ Tried on Nec CDR251 (4x4 changer).
+ */
stat = cdrom_check_status (drive, &my_reqbuf);
if (stat && my_reqbuf.sense_key == NOT_READY)
return -ENOENT;
+#endif

if (slot == CDSL_NONE) {
(void) cdrom_load_unload (drive, -1, NULL);
--
Itai Nahshon nahshon@actcom.co.il
Also nahshon@vnet.ibm.com
\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.030 / U:15.960 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site