drivers/block/ps2esdi.c: remove two unused functions (fwd)
PATCH 1/1 drivers/block/ps2esdi.c: remove two unused functions (fwd)
The patch below still applies and compiles against 2.6.10-mm2.
Please apply.
----- Forwarded message from Adrian Bunk <[email protected]> -----
Date: Mon, 29 Nov 2004 13:35:00 +0100
From: Adrian Bunk <[email protected]>
To: [email protected]
Subject: [2.6 patch] drivers/block/ps2esdi.c: remove two unused functions
The patch below removes two unused global functions.
diffstat output:
drivers/block/ps2esdi.c | 42 ---------------------------------------- 1 files changed, 42 deletions(-)
drivers/block/ps2esdi.c renamed from drivers/block/ps2esdi.c.old +0 -42
@@ -221,48 +221,6 @@ }#endif /* MODULE */ -/* handles boot time command line parameters */ -void __init tp720_setup (char *str,int *ints) -{ -/* no params, just sets the tp720esdi flag if it exists */ - -printk ("%s: TP 720 ESDI flag set\n" ,DEVICE_NAME ); - tp720esdi =1 ; -} - -void __init ed_setup (char *str,int *ints) -{ -int hdind =0 ; - -/* handles 3 parameters only - corresponding to -1. Number of cylinders -2. Number of heads -3. Sectors/track -*/ - -if (ints[0 ] !=3 ) -return ; - -/* print out the information - seen at boot time */ -printk ("%s: ints[0]=%d ints[1]=%d ints[2]=%d ints[3]=%d\n" , -DEVICE_NAME , ints[0 ], ints[1 ], ints[2 ], ints[3 ]); - -/* set the index into device specific information table */ -if (ps2esdi_info[0 ].head !=0 ) - hdind =1 ; - -/* set up all the device information */ - ps2esdi_info[hdind].head = ints[2 ]; - ps2esdi_info[hdind].sect = ints[3 ]; - ps2esdi_info[hdind].cyl = ints[1 ]; - ps2esdi_info[hdind].wpcom =0 ; - ps2esdi_info[hdind].lzone = ints[1 ]; - ps2esdi_info[hdind].ctl = (ints[2 ] >8 ?8 :0 ); -#if 0 /* this may be needed for PS2/Mod.80, but it hurts ThinkPad! */ - ps2esdi_drives = hdind +1 ;/* increment index for the next time */ -#endif -}/* ed_setup */ -static int ps2esdi_getinfo (char *buf,int slot,void *d) {int len =0 ;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
Quoted 11 lines · Adrian Bunk
The patch below still applies and compiles against 2.6.10-mm2.
Date: Mon, 29 Nov 2004 13:35:00 +0100
From: Adrian Bunk <[email protected]>
To: [email protected]
Subject: [2.6 patch]drivers/block/ps2esdi.c: remove two unused functionsThe patch below removes two unused global functions.
drivers/block/ps2esdi.c renamed from drivers/block/ps2esdi.c.old +0
-0
...
Quoted 2 lines
drivers/block/ps2esdi.c renamed from drivers/block/ps2esdi.c.old +0
-2-void __init tp720_setup (char *str,int *ints) -{
...
drivers/block/ps2esdi.c line 234
Quoted 3 lines
drivers/block/ps2esdi.c renamed from drivers/block/ps2esdi.c.old +0
-3- -void __init ed_setup (char *str,int *ints) -{
...
Hmm. You remove the setup functions, but not the rest of the code.
Of course it is true that nobody uses these today.
On the other hand, I imagine that there was no conscious decision to kill them. Patch 2.3.13 (August 1999) introduces the __setup/__initcall setup, and Linus wrote
"Ok, I finally did what I've wanted to do for a _loong_ time: get rid of
the horrible #ifdef CONFIG_XXXX mess in init/main.c.
...
I've fixed up a few of the old command lines and initialization functions, but I'm hoping that driver writers can re-instate their own setup functions rather than me trying to fix up them all by hand."
Many ancient drivers were broken, and perhaps nobody noticed.
For example, Documentation/kernel-parameters.txt tells us that we can use tp720=, which is false today. It becomes true upon adding a line
__setup("tp720=", tp720_setup)
and changing the tp720_setup prototype a little. (Remove the int *ints, possibly add a call to get_options().)
Since there was no storm of complaints, it may be that we can just remove all reference to tp720, possibly all of ps2esdi, and similarly for xd. For the past few years the only discussions have been about these not compiling and getting janitor-type fixes.
Is Paul Gortmaker the only Linux user who still uses this hardware?
Andries
Do PS/2 ESDI users exist?
Yesterday I mentioned that patch 2.3.13 killed the setup, so that tp720_setup and ed_setup would not be called anymore. Hand-specifying the geometry failed from then on.
Since nobody noticed, maybe nobody with compiled-in ps2esdi needed to specify the geometry.
In 2.1.128 (Nov 1998) the driver was modularised, but that patch contained a few typos so that the driver would not build as a module. Several people - all without ps2 hardware - submitted a patch, and the correction finally went into patch-2.6.0-test6 (Sep 2003).
All that time, no actual (potential) users complained. So, maybe nobody tried to use it as a module.
Google shows that lots of people have CONFIG_BLK_DEV_PS2=m. Why didn't they notice? Because that setting results (e.g. under 2.4) in #undef CONFIG_BLK_DEV_PS2
#define CONFIG_BLK_DEV_PS2_MODULE 1
in <linux/autoconf.h>, and ps2esdi.c is inside #ifdef CONFIG_BLK_DEV_PS2.
Have there ever existed ESDI users? Yes, using out-of-tree patches before 2.1.15, and in the 2.1 - 2.2 time frame. I seem to be unable to find traces of later users - just a few people who try and fail.
I wonder whether ps2esdi should be removed.
Does the present driver work for someone?
Have there been users in this millennium? With 2.3 or later?
Andries
Re: Do PS/2 ESDI users exist?
Quoted 4 lines · Andries Brouwer
I wonder whether ps2esdi should be removed.
Does the present driver work for someone?
Have there been users in this millennium? With 2.3 or later?
We could mark it CONFIG_BROKEN, leave it six months or so, see if anyone complains.
Re: Do PS/2 ESDI users exist?
Quoted 8 lines · Andrew Morton
Quoted 4 lines · Andries Brouwer
I wonder whether ps2esdi should be removed.
Does the present driver work for someone?
Have there been users in this millennium? With 2.3 or later?We could mark it
CONFIG_BROKEN, leave it six months or so, see if anyone complains.
OK.
drivers/block/Kconfig +1 -1
@@ -42,7 +42,7 @@ config MAC_FLOPPY config BLK_DEV_PS2 tristate "PS/2 ESDI hard disk support" - depends on MCA && MCA_LEGACY + depends on MCA && MCA_LEGACY && BROKEN help Say Y here if you have a PS/2 machine with a MCA bus and an ESDI hard disk.
I hesitated a bit: Just removing something means: we do no longer want to support it. That might happen even when a feature still works. For example, xiafs was removed, but it worked fine. On the other hand, saying that something is broken invites the question "what precisely is broken?", and is an invitation to fix rather than an announcement of an intention to obsolete.
Maybe I would prefer just to throw ps2esdi out, and say that 2.2 is the preferred distribution for people who need ps2esdi.
As observed earlier, ps2esdi was broken as a module, and the passing of geometry boot parameters is broken. But does it still work with kernels 2.3 or later? I think it does, but failed to verify that.
I found an IBM PS/2 model 70-A21 with 8 MB and 120 MB ESDI disk. Tried a few distribution boot floppies to see whether they would boot.
Slackware has special ibmmca bootdisks.
SW 3.3 - Linux 2.1.43 - boots fine
SW 4.0 - Linux 2.2.6 - hangs
SW 7.0 - Linux 2.2.13 - boots fine
SW 8.1 - Linux 2.4.18 - boots, but every single command is killed by OOM SW 10.0 - Linux 2.4.26 - kernel panic: no 386 supported
Then Debian:
Woody - Linux 2.2.10 - boots fine, but the rootdisk hangs Sarge - Linux 2.4.27 - does not recognize the ESDI disk, and the rootdisk
crashes by OOM.
So, good luck with 2.1 and 2.2 kernels, only failures with later kernels.
What about other people? The two major Linux/MCA sites were
http://glycerine.itsmm.uni.edu/mca (also referenced in Documentation/mca.txt) but it doesnt exist any longer, and http://www.dgmicro.com/mca/,
which still exists ("last update: Jan 28 1999"), but the binaries it refers to live on ftp.dgmicro.com, which isn't there anymore.
Concerning the speed:
I measured this ESDI disk under Linux as transferring 50 kB/s, that is 4% of the speed the IBM specs claim. Also other Linux users complained that the disk is much faster under DOS.
Andries
Re: Do PS/2 ESDI users exist?
In reply to Andries BrouwerQuoted 3 lines · Andries Brouwer
I wonder whether ps2esdi should be removed.
Does the present driver work for someone?
Have there been users in this millennium? With 2.3 or later?
If you really insist, I have an IBM PS/2 model 55/SX on my attic with an ESDI interface that I could give a try. I need to put some more memory in it though, it currently has 2MB and that's insufficient (an 80387SX/16 FPU would also be nice, I guess).
Erik
Signature · 2 lines
+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands
Re: Do PS/2 ESDI users exist?
In reply to Andries BrouwerQuoted 3 lines · Andries Brouwer
I wonder whether ps2esdi should be removed.
Does the present driver work for someone?
Have there been users in this millennium? With 2.3 or later?
Doubt it. esdi is the earlier end of the PS/2 world, and the tp720 is a specific laptop with MCA bus from prehistory. I have used p2esdi years ago but solely for the purpose of checking it worked.