lkml.org 
[lkml]   [1997]   [Jan]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
DateWed, 15 Jan 1997 00:36:43 -0700
From(Erik Andersen)
SubjectA few ide-cd fixes for 2.0.29
-- 
I have a few fixes for ide-cd which should go into the stable kernel.
I have tested them, and they seem to work (at least as well as I can
verify this with my current hardware).  I am also sending this to the
linux-kernel mailing list so that everybody who uses an IDE cdrom can
check this out and see if it breaks anything for their hardware.  Unless
I get some negative responses, I recommend we put this in 2.0.29 (which
it seems will likely be out sometime).  Also note that I am adding
myself to the MAINTAINERS file for the stable kernel (I am already there
in the devel. kernel).  This should save poor scott a lot of grief, and
get the questions and bug reports going to the right place (me).

Anyway, the fixes included here are:
	* Fix errors on CDROMSTOP (If you have a "Dolphin", you must now
	   define IHAVEADOLPHIN)
	* Added an identifier so new Sanyo CD-changer works
	* Better detection if door locking isn't supported

 -Erik

--
Erik B. Andersen        Web:    http://www.et.byu.edu/~andersee/ 
2485 South State St.    email:  andersee@et.byu.edu or andersee@debian.org
Springville, Ut 84663   phone:  (801) 489-1231
--This message was written using 73% post-consumer electrons--


[PATCH FOLLOWS]

--- linux-2.0.28.old/MAINTAINERS	Wed Jan 15 00:10:23 1997
+++ linux-2.0.28/MAINTAINERS	Tue Jan 14 22:15:22 1997
@@ -195,6 +195,12 @@
 L:	linux-kernel@vger.rutgers.edu
 S:	Maintained
 
+IDE/ATAPI CDROM DRIVER 
+P:	Erik Andersen
+M:	andersee@debian.org
+L:	linux-kernel@vger.rutgers.edu
+S:	Maintained
+
 ISDN SUBSYSTEM
 P:	Fritz Elfert
 M:	fritz@wuemaus.franken.de

--- linux-2.0.28.old/drivers/block/ide-cd.c	Fri Sep 20 08:00:34 1996
+++ linux-2.0.28/drivers/block/ide-cd.c	Tue Jan 14 23:55:10 1997
@@ -1,5 +1,14 @@
+/* #define VERBOSE_IDE_CD_ERRORS 1 */
 /*
  * linux/drivers/block/ide-cd.c
+ * ATAPI cd-rom driver.  To be used with ide.c.
+ * See Documentation/cdrom/ide-cd for usage information.
+ *
+ * Copyright (C) 1994, 1995, 1996  scott snyder  <snyder@fnald0.fnal.gov>
+ * Copyright (C) 1996, 1997  Erik Andersen <andersee@debian.org>
+ *
+ * May be copied or modified under the terms of the GNU General Public License
+ * see linux/COPYING for more information.
  *
  * 1.00  Oct 31, 1994 -- Initial version.
  * 1.01  Nov  2, 1994 -- Fixed problem with starting request in
@@ -109,15 +118,30 @@
  * 3.17  Sep 17, 1996 -- Tweak audio reads for some drives.
  *                       Start changing CDROMLOADFROMSLOT to CDROM_SELECT_DISC.
  *
+ * 3.19  Nov 5, 1996  -- New ide-cd maintainer:
+ *                                 Erik B. Andersen <andersee@debian.org>
+ * 3.20  Jan 13,1997  -- Bug Fixes:
+ *                        Fix errors on CDROMSTOP (If you have a "Dolphin",
+ *                          you must define IHAVEADOLPHIN)
+ *                        Added identifier so new Sanyo CD-changer works
+ *                        Better detection if door locking isn't supported 
+ *                         
  * NOTE: Direct audio reads will only work on some types of drive.
  * So far, i've received reports of success for Sony and Toshiba drives.
  *
- * ATAPI cd-rom driver.  To be used with ide.c.
- * See Documentation/cdrom/ide-cd for usage information.
+ * ALSO NOTE:
+ *
+ *  The ide cdrom driver has undergone extensive changes for the
+ *       latest development kernel.  If you wish to add new features to
+ *       this driver, make your changes to the latest version in the
+ *       development kernel.  Only Bug fixes will be accepted for this
+ *       version.
+ *
+ *       For those wishing to work on this driver, please be sure you download
+ *       and comply with the latest ATAPI standard.  This document can be
+ *       obtained by anonymous ftp from fission.dt.wdc.com in directory:
+ *       /pub/standards/atapi/spec/SFF8020-r2.6/PDF/8020r26.pdf
  *
- * Copyright (C) 1994, 1995, 1996  scott snyder  <snyder@fnald0.fnal.gov>
- * May be copied or modified under the terms of the GNU General Public License
- * (../../COPYING).
  */
 
 
@@ -1555,7 +1579,7 @@
 		/* If we got an illegal field error, the drive
 		   probably cannot lock the door. */
 		if (reqbuf->sense_key == ILLEGAL_REQUEST &&
-		    reqbuf->asc == 0x24) {
+		    (reqbuf->asc == 0x24 || reqbuf->asc == 0x20)) {
 			printk ("%s: door locking not supported\n",
 				drive->name);
 			CDROM_CONFIG_FLAGS (drive)->no_doorlock = 1;
@@ -2065,13 +2089,18 @@
 		return cdrom_startstop (drive, 1, NULL);
 
 	case CDROMSTOP: {
+#ifdef IHAVEADOLPHIN
+		/*  Certain Drives require this.  Most don't
+		    and will produce errors upon CDROMSTOP
+		    pit says the Dolphin needs this.  If you
+		    own a dolphin, just define IHAVEADOLPHIN somewhere */
 		int stat;
-
 		stat = cdrom_startstop (drive, 0, NULL);
 		if (stat) return stat;
-		/* pit says the Dolphin needs this. */
 		return cdrom_eject (drive, 1, NULL);
-      }
+#endif /* end of IHAVEADOLPHIN  */
+		return cdrom_startstop (drive, 0, NULL);
+	}
 
 	case CDROMPLAYMSF: {
 		struct cdrom_msf msf;
@@ -2694,14 +2723,15 @@
 			CDROM_CONFIG_FLAGS (drive)->subchan_as_bcd = 1;
 		}
 
-		/* Sanyo 3 CD changer uses a non-standard command 
-                   for CD changing */
-                else if ((strcmp(drive->id->model, "CD-ROM CDR-C3 G") == 0) ||
-                         (strcmp(drive->id->model, "CD-ROM CDR-C3G") == 0)) {
-			/* uses CD in slot 0 when value is set to 3 */
-			CDROM_STATE_FLAGS (drive)->sanyo_slot = 3;
-		}
-
+                /* Sanyo 3 CD changer uses a non-standard command
+                    for CD changing */
+                 else if ((strcmp(drive->id->model, "CD-ROM CDR-C3 G") == 0) ||
+                         (strcmp(drive->id->model, "CD-ROM CDR-C3G") == 0) ||
+                         (strcmp(drive->id->model, "CD-ROM CDR_C36") == 0)) {
+                        /* uses CD in slot 0 when value is set to 3 */
+                        CDROM_STATE_FLAGS (drive)->sanyo_slot = 3;
+                }
+                
 	}
 #endif /* not STANDARD_ATAPI */
 
\
 
 \ /
  Last update: 2005-03-22 12:38    [from the cache]
©2003-2008