From: "Kevin P. Fleming" <kpfleming@cox.net>
To: andre@linux-ide.org, linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] patch to make ide-probe mark ide-floppy devices as removable and clean up drive type override code
Date: Fri, 28 Jun 2002 10:41:38 -0700 [thread overview]
Message-ID: <3D1C9FD2.3060000@cox.net> (raw)
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");
reply other threads:[~2002-06-28 17:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D1C9FD2.3060000@cox.net \
--to=kpfleming@cox.net \
--cc=andre@linux-ide.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox