public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] patch to make ide-probe mark ide-floppy devices as removable and clean up drive type override code
@ 2002-06-28 17:41 Kevin P. Fleming
  0 siblings, 0 replies; only message in thread
From: Kevin P. Fleming @ 2002-06-28 17:41 UTC (permalink / raw)
  To: andre, linux-kernel

Patch has been in wide use for months, but has not (yet) been integrated 
into the kernel. Patch is against 2.4.19-pre10-ac2, which has a 
different version of ide-probe.c than 2.4.19-rc1.

diff -X dontdiff -urN linux/drivers/ide/ide-probe.c 
linux-probe/drivers/ide/ide-probe.c
--- linux/drivers/ide/ide-probe.c	Thu Jun  6 10:00:50 2002
+++ linux-probe/drivers/ide/ide-probe.c	Thu Jun  6 10:37:41 2002
@@ -130,31 +130,40 @@
  	 
	goto err_misc;
  		}
  #endif /* CONFIG_BLK_DEV_PDC4030 */
+ 
	/*
+ 
	 * Handle drive type overrides for "unusual" devices
+ 
	 */
  		switch (type) {
- 
		case ide_floppy:
- 
			if (!strstr(id->model, "CD-ROM")) {
- 
				if (!strstr(id->model, "oppy") &&
- 
				    !strstr(id->model, "poyp") &&
- 
				    !strstr(id->model, "ZIP"))
- 
					printk("cdrom or floppy?, assuming ");
- 
				if (drive->media != ide_cdrom) {
- 
					printk ("FLOPPY");
- 
					break;
- 
				}
- 
			}
+ 
	case ide_floppy:
+ 
		if (strstr(id->model, "CD-ROM")) {
+ 
			type = ide_cdrom;
+ 
			break;
+ 
		}
+ 
		if (!strstr(id->model, "oppy") &&
+ 
		    !strstr(id->model, "poyp") &&
+ 
		    !strstr(id->model, "ZIP"))
+ 
			printk("cdrom or floppy?, assuming ");
+ 
		if (drive->media == ide_cdrom)
  	 
		type = ide_cdrom;	/* Early cdrom models used zero */
- 
		case ide_cdrom:
- 
			drive->removable = 1;
+ 
		break;
  #ifdef CONFIG_PPC
+ 
	case ide_cdrom:
  	 
		/* kludge for Apple PowerBook internal zip */
- 
			if (!strstr(id->model, "CD-ROM") &&
- 
			    strstr(id->model, "ZIP")) {
- 
				printk ("FLOPPY");
- 
				type = ide_floppy;
- 
				break;
- 
			}
+ 
		if (!strstr(id->model, "CD-ROM") &&
+ 
		    strstr(id->model, "ZIP")) {
+ 
			type = ide_floppy;
+ 
			break;
+ 
		}
  #endif
+ 
	}
+ 
	switch (type) {
+ 	 
	case ide_floppy:
+ 	 
		printk ("FLOPPY");
+ 	 
		drive->removable = 1;
+ 	 
		break;
+ 	 
	case ide_cdrom:
  	 
		printk ("CD/DVD-ROM");
+ 	 
		drive->removable = 1;
  	 
		break;
  	 
	case ide_tape:
  	 
		printk ("TAPE");


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

only message in thread, other threads:[~2002-06-28 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-28 17:41 [PATCH] patch to make ide-probe mark ide-floppy devices as removable and clean up drive type override code Kevin P. Fleming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox