Skip to contentSkip to conversation

disable legacy floppy related ioctl32s

PATCH In review Arun Sharma 4 participants 8 messages Sep 30, 2003 – Oct 1, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 disable legacy floppy related ioctl32s

Since we don't support legacy floppy devices on ia64, this patch disables the corresponding ioctl32.

-Arun

include/linux/compat_ioctl.h +1 -1
@@ -68,7 +68,7 @@
 COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
 COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
 COMPATIBLE_IOCTL(HDIO_SET_NICE)
-#ifndef CONFIG_ARCH_S390
+#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_IA64)
 /* 0x02 -- Floppy ioctls */
 COMPATIBLE_IOCTL(FDMSGON)
 COMPATIBLE_IOCTL(FDMSGOFF)
fs/compat_ioctl.c +2 -0
@@ -2936,6 +2936,7 @@
 HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans)
 HANDLE_IOCTL(HDIO_GET_NOWERR, hdio_ioctl_trans)
 HANDLE_IOCTL(HDIO_GET_NICE, hdio_ioctl_trans)
+#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_IA64)
 HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans)
 HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans)
 HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans)
@@ -2945,6 +2946,7 @@
 HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans)
 HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans)
 HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans)
+#endif
 HANDLE_IOCTL(SG_IO,sg_ioctl_trans)
 HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans)
 HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans)
#1 lore raw
Quoted 1 line · Arun Sharma

Since we don't support legacy floppy devices on ia64, this patch disables the corresponding ioctl32.

	-#ifndef CONFIG_ARCH_S390
	+#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_IA64)
	 /* 0x02 -- Floppy ioctls */
	 COMPATIBLE_IOCTL(FDMSGON)
	 COMPATIBLE_IOCTL(FDMSGOFF)

Could this be done with config symbols somehow, i.e., CONFIG_BLK_DEV_FD? It seems sort of ugly to encode the knowledge about which platforms support legacy floppy both in Kconfig and in the actual source.

BTW, it looks like one can still select legacy floppy support on ia64:

config BLK_DEV_FD
tristate "Normal floppy disk support"
depends on !X86_PC9800 && !ARCH_S390

#2 lore raw
In reply to Arun Sharma

On Tue, 30 Sep 2003 14:55:00 -0600 Bjorn Helgaas <[email protected]> wrote:

| On Tuesday 30 September 2003 2:16 pm, Arun Sharma wrote:
| > Since we don't support legacy floppy devices on ia64, this patch disables the corresponding ioctl32.
| 
| 	-#ifndef CONFIG_ARCH_S390
| 	+#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_IA64)
| 	 /* 0x02 -- Floppy ioctls */
| 	 COMPATIBLE_IOCTL(FDMSGON)
| 	 COMPATIBLE_IOCTL(FDMSGOFF)
| 
| Could this be done with config symbols somehow, i.e., CONFIG_BLK_DEV_FD?
| It seems sort of ugly to encode the knowledge about which platforms
| support legacy floppy both in Kconfig and in the actual source.
| 
| BTW, it looks like one can still select legacy floppy support on ia64:
| 
| config BLK_DEV_FD
|         tristate "Normal floppy disk support"
|         depends on !X86_PC9800 && !ARCH_S390

Yes, I submitted a patch for that (and others), but it was rejected by reasoning that we can't and don't want to keep up with fixing all of these...

--
~Randy

#3 lore raw
In reply to Arun Sharma
Quoted 10 lines · Randy.Dunlap

On Tue, 30 Sep 2003 14:55:00 -0600 Bjorn Helgaas <[email protected]> wrote:

| BTW, it looks like one can still select legacy floppy support on ia64:
| 
| config BLK_DEV_FD
|         tristate "Normal floppy disk support"
|         depends on !X86_PC9800 && !ARCH_S390

Yes, I submitted a patch for that (and others), but it was rejected by reasoning that we can't and don't want to keep up with fixing all of these...

Heh. Your patch (http://www.ussg.iu.edu/hypermail/linux/kernel/0308.3/0320.html)
contained:

config BLK_DEV_FD
tristate "Normal floppy disk support"
- depends on !X86_PC9800
+ depends on !X86_PC9800 && !IA64

so obviously somebody decided it was reasonable to do it for s390, but not for ia64 :-) I didn't see the rejection rationale on the list, but it's hard enough to build a working .config without distractions like being asked about drivers that can't possibly work (and probably don't even compile) on my architecture.

Bjorn

#4 lore raw
In reply to Arun Sharma

On Tue, 30 Sep 2003 16:10:23 -0600 Bjorn Helgaas <[email protected]> wrote:

| On Tuesday 30 September 2003 3:01 pm, Randy.Dunlap wrote:
| > On Tue, 30 Sep 2003 14:55:00 -0600 Bjorn Helgaas <[email protected]> wrote:
| > | BTW, it looks like one can still select legacy floppy support on ia64:
| > | 
| > | config BLK_DEV_FD
| > |         tristate "Normal floppy disk support"
| > |         depends on !X86_PC9800 && !ARCH_S390
| > 
| > Yes, I submitted a patch for that (and others), but it was rejected
| > by reasoning that we can't and don't want to keep up with fixing
| > all of these...
| 
| Heh.  Your patch (http://www.ussg.iu.edu/hypermail/linux/kernel/0308.3/0320.html)
| contained:
| 
| 	 config BLK_DEV_FD
| 	 tristate "Normal floppy disk support"
| 	 - depends on !X86_PC9800
| 	 + depends on !X86_PC9800 && !IA64
| 
| so obviously somebody decided it was reasonable to do it for s390, but
| not for ia64 :-)  I didn't see the rejection rationale on the list, but
| it's hard enough to build a working .config without distractions like
| being asked about drivers that can't possibly work (and probably don't
| even compile) on my architecture.

Yes, it was a private rejection.
Yes, one does not always get the same answer when asked multiple times.

I'm all for it, but some people weren't.

--
~Randy

#5 lore raw
In reply to Arun Sharma
Quoted 8 lines · Bjorn Helgaas

Heh. Your patch (http://www.ussg.iu.edu/hypermail/linux/kernel/0308.3/0320.html)
contained:

config BLK_DEV_FD
tristate "Normal floppy disk support"
- depends on !X86_PC9800
+ depends on !X86_PC9800 && !IA64

Quoted 5 lines

so obviously somebody decided it was reasonable to do it for s390, but not for ia64 :-) I didn't see the rejection rationale on the list, but it's hard enough to build a working .config without distractions like being asked about drivers that can't possibly work (and probably don't even compile) on my architecture.

There's some discussion here too:

http://marc.theaimsgroup.com/?t6015010700002&r=1&w=2

depends on ISA || M68K || SPARC64

seems to be what was suggested in the thread, but I didn't see a patch. I also agree that the check should be in one place (KConfig). Will send a new patch.

-Arun

#6 lore raw
In reply to Arun Sharma
Quoted 5 lines · Arun Sharma

http://marc.theaimsgroup.com/?t=106015010700002&r=1&w=2

depends on ISA || M68K || SPARC64

seems to be what was suggested in the thread, but I didn't see a patch. I also agree that the check should be in one place (KConfig). Will send a new patch.

Here's the new patch. It should probably go to LKML now.

-Arun

drivers/block/Kconfig +1 -1
Index: linux-2.6/drivers/block/Kconfig
===================================================================
@@ -6,7 +6,7 @@
 
 config BLK_DEV_FD
 	tristate "Normal floppy disk support"
-	depends on !X86_PC9800
+	depends on ISA || M68K || SPARC64
 	---help---
 	  If you want to use the floppy disk drive(s) of your PC under Linux,
 	  say Y. Information about this driver, especially important for IBM
include/linux/compat_ioctl.h +1 -1
Index: linux-2.6/include/linux/compat_ioctl.h
===================================================================
@@ -68,7 +68,7 @@
 COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
 COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
 COMPATIBLE_IOCTL(HDIO_SET_NICE)
-#ifndef CONFIG_ARCH_S390
+#ifdef CONFIG_BLK_DEV_FD
 /* 0x02 -- Floppy ioctls */
 COMPATIBLE_IOCTL(FDMSGON)
 COMPATIBLE_IOCTL(FDMSGOFF)
#7 lore raw
In reply to Arun Sharma

Review

Quoted 6 lines · Arun Sharma

Here's the new patch. It should probably go to LKML now.

config BLK_DEV_FD

(quoted diff) +1 -1
 	tristate "Normal floppy disk support"
-	depends on !X86_PC9800
+	depends on ISA || M68K || SPARC64

Your tree is out of date. Latest 2.6 has:

        depends on !X86_PC9800 && !ARCH_S390

I'm not sure that ISA is a great symbol to depend on for this. "It works, but only by coincidence", IMO.

Signature · 3 lines
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk