linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PowerBook ZIP patch
@ 1999-01-11 19:50 Benjamin Herrenschmidt
  0 siblings, 0 replies; only message in thread
From: Benjamin Herrenschmidt @ 1999-01-11 19:50 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: Cort Dougan, Paul Mackerras

[-- Attachment #1: Type: text/plain, Size: 914 bytes --]

The following patch enables the PowerBook internal ZIP drive. You may
need my other patch to irq.c that fixes bogus interrupt values for the
left bay to work (should be included in Cort's new irq.c when finished).
The right bay should work "as is".


--- linux.orig/drivers/block/ide-probe.c	Thu Jan  7 14:17:32 1999
+++ linux.dev/drivers/block/ide-probe.c	Mon Jan 11 22:44:52 1999
@@ -118,8 +118,14 @@
 				}
 				type = ide_cdrom;	/* Early cdrom models used zero */
 			case ide_cdrom:
-				printk ("CDROM");
 				drive->removable = 1;
+				/* XXX kludge for Apple PowerBook internal zip */
+				if (!strstr(id->model, "CD-ROM") && strstr(id->model, "ZIP")) {
+					printk ("FLOPPY");
+					type = ide_floppy;
+					break;
+				}
+				printk ("CDROM");
 				break;
 			case ide_tape:
 				printk ("TAPE");


-- 
           E-Mail: <mailto:bh40@calva.net>
BenH.      Web   : <http://calvaweb.calvacom.fr/bh40/>



[-- Attachment #2: zip.patch --]
[-- Type: application/octet-stream, Size: 557 bytes --]

--- linux.orig/drivers/block/ide-probe.c	Thu Jan  7 14:17:32 1999
+++ linux.dev/drivers/block/ide-probe.c	Mon Jan 11 22:44:52 1999
@@ -118,8 +118,14 @@
 				}
 				type = ide_cdrom;	/* Early cdrom models used zero */
 			case ide_cdrom:
-				printk ("CDROM");
 				drive->removable = 1;
+				/* XXX kludge for Apple PowerBook internal zip */
+				if (!strstr(id->model, "CD-ROM") && strstr(id->model, "ZIP")) {
+					printk ("FLOPPY");
+					type = ide_floppy;
+					break;
+				}
+				printk ("CDROM");
 				break;
 			case ide_tape:
 				printk ("TAPE");

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-01-11 19:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-01-11 19:50 PowerBook ZIP patch Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).