Skip to contentSkip to conversation

remove drivers/pcmcia/pcmcia_ioctl.c

PATCH In review Adrian Bunk 3 participants 4 messages Nov 7, 2005 – Nov 9, 2005

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

PATCH 1/1 remove drivers/pcmcia/pcmcia_ioctl.c

This patch contains the scheduled removal of drivers/pcmcia/pcmcia_ioctl.c plus the fallout of additional cleanups after this removal.

---

 Documentation/Changes                      |   19 
 Documentation/feature-removal-schedule.txt |   17 
 Documentation/ioctl-mess.txt               |   26 
 arch/frv/Kconfig                           |    4 
 arch/m68k/Kconfig                          |    4 
 arch/sparc/Kconfig                         |    4 
 arch/sparc64/Kconfig                       |    4 
 drivers/net/Kconfig                        |    3 
 drivers/pcmcia/Kconfig                     |   16 
 drivers/pcmcia/Makefile                    |    1 
 drivers/pcmcia/cs.c                        |   71 -
 drivers/pcmcia/cs_internal.h               |    4 
 drivers/pcmcia/ds.c                        |   24 
 drivers/pcmcia/ds_internal.h               |   21 
 drivers/pcmcia/pcmcia_ioctl.c              |  771 ---------------------
 drivers/pcmcia/pcmcia_resource.c           |   66 -
 drivers/pcmcia/rsrc_mgr.c                  |   76 --
 drivers/pnp/pnpbios/Kconfig                |    3 
 include/pcmcia/cs.h                        |    3 
 include/pcmcia/ds.h                        |   43 -
 include/pcmcia/ss.h                        |    6 
 scripts/ver_linux                          |    3 
 22 files changed, 25 insertions(+), 1164 deletions(-)
Documentation/feature-removal-schedule.txt renamed from Documentation/feature-removal-schedule.txt.old +0 -17
@@ -92,23 +92,6 @@
 
 ---------------------------
 
-What:	PCMCIA control ioctl (needed for pcmcia-cs [cardmgr, cardctl])
-When:	November 2005
-Files:	drivers/pcmcia/: pcmcia_ioctl.c
-Why:	With the 16-bit PCMCIA subsystem now behaving (almost) like a
-	normal hotpluggable bus, and with it using the default kernel
-	infrastructure (hotplug, driver core, sysfs) keeping the PCMCIA
-	control ioctl needed by cardmgr and cardctl from pcmcia-cs is
-	unnecessary, and makes further cleanups and integration of the
-	PCMCIA subsystem into the Linux kernel device driver model more
-	difficult. The features provided by cardmgr and cardctl are either
-	handled by the kernel itself now or are available in the new
-	pcmciautils package available at
-	http://kernel.org/pub/linux/utils/kernel/pcmcia/
-Who:	Dominik Brodowski <[email protected]>
-
----------------------------
-
 What:	ip_queue and ip6_queue (old ipv4-only and ipv6-only netfilter queue)
 When:	December 2005
 Why:	This interface has been obsoleted by the new layer3-independent
Documentation/ioctl-mess.txt renamed from Documentation/ioctl-mess.txt.old +0 -26
@@ -1283,32 +1283,6 @@
 I: struct drm_lock
 O: -
 
-DS_ACCESS_CONFIGURATION_REGISTER
-DS_ADJUST_RESOURCE_INFO
-DS_BIND_MTD
-DS_BIND_REQUEST
-DS_EJECT_CARD
-DS_GET_CONFIGURATION_INFO
-DS_GET_DEVICE_INFO
-DS_GET_FIRST_REGION
-DS_GET_FIRST_TUPLE
-DS_GET_FIRST_WINDOW
-DS_GET_MEM_PAGE
-DS_GET_NEXT_DEVICE
-DS_GET_NEXT_REGION
-DS_GET_NEXT_TUPLE
-DS_GET_NEXT_WINDOW
-DS_GET_STATUS
-DS_GET_TUPLE_DATA
-DS_INSERT_CARD
-DS_PARSE_TUPLE
-DS_REPLACE_CIS
-DS_RESET_CARD
-DS_RESUME_CARD
-DS_SUSPEND_CARD
-DS_UNBIND_REQUEST
-DS_VALIDATE_CIS
-
 N: DV1394_IOC_RECEIVE_FRAMES
 I: (unsigned int) arg
 O: -
drivers/pcmcia/Kconfig renamed from drivers/pcmcia/Kconfig.old +1 -15
@@ -65,21 +65,7 @@
 	  to be loaded from userspace to work correctly. If you say Y here,
 	  and your userspace is arranged correctly, this will be loaded
 	  automatically using the in-kernel firmware loader and the hotplug
-	  subsystem, instead of relying on cardmgr from pcmcia-cs to do so.
-
-	  If unsure, say Y.
-
-config PCMCIA_IOCTL
-	bool "PCMCIA control ioctl (obsolete)"
-	depends on PCMCIA
-	default y
-	help
-	  If you say Y here, the deprecated ioctl interface to the PCMCIA
-	  subsystem will be built. It is needed by cardmgr and cardctl
-	  (pcmcia-cs) to function properly.
-
-	  You should use the new pcmciautils package instead (see
-	  <file:Documentation/Changes> for location and details).
+	  subsystem.
 
 	  If unsure, say Y.
 
include/pcmcia/ds.h renamed from include/pcmcia/ds.h.old +0 -43

49 lines not on this page · raw message

drivers/pcmcia/Makefile renamed from drivers/pcmcia/Makefile.old +0 -1
@@ -11,7 +11,6 @@
 obj-$(CONFIG_PCCARD)				+= pcmcia_core.o
 
 pcmcia-y					+= ds.o pcmcia_compat.o pcmcia_resource.o
-pcmcia-$(CONFIG_PCMCIA_IOCTL)			+= pcmcia_ioctl.o
 obj-$(CONFIG_PCMCIA)				+= pcmcia.o
 
 obj-$(CONFIG_PCCARD_NONSTATIC)			+= rsrc_nonstatic.o
drivers/pcmcia/ds.c renamed from drivers/pcmcia/ds.c.old +8 -16
@@ -32,7 +32,6 @@
 #include <pcmcia/ss.h>
 
 #include "cs_internal.h"
-#include "ds_internal.h"
 
 /*====================================================================*/
 
@@ -55,7 +54,9 @@
 #define ds_dbg(lvl, fmt, arg...) do { } while (0)
 #endif
 
-spinlock_t pcmcia_dev_list_lock;
+static spinlock_t pcmcia_dev_list_lock;
+
+static struct bus_type pcmcia_bus_type;
 
 static int unbind_request(struct pcmcia_socket *s);
 
@@ -334,7 +335,7 @@
 
 /* pcmcia_device handling */
 
-struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev)
+static struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev)
 {
 	struct device *tmp_dev;
 	tmp_dev = get_device(&p_dev->dev);
@@ -343,7 +344,7 @@
 	return to_pcmcia_dev(tmp_dev);
 }
 
-void pcmcia_put_dev(struct pcmcia_device *p_dev)
+static void pcmcia_put_dev(struct pcmcia_device *p_dev)
 {
 	if (p_dev)
 		put_device(&p_dev->dev);
@@ -501,7 +502,8 @@
  */
 static DECLARE_MUTEX(device_add_lock);
 
-struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int function)
+static struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s,
+						unsigned int function)
 {
 	struct pcmcia_device *p_dev;
 	unsigned long flags;
@@ -984,13 +986,11 @@
 		s->pcmcia_state.present = 0;
 	    	send_event(skt, event, priority);
 		unbind_request(skt);
-		handle_event(skt, event);
 		break;
 	
 	case CS_EVENT_CARD_INSERTION:
 		s->pcmcia_state.present = 1;
 		pcmcia_card_add(skt);
-		handle_event(skt, event);
 		break;
 
 	case CS_EVENT_EJECTION_REQUEST:
@@ -998,7 +998,6 @@
 		break;
 
 	default:
-		handle_event(skt, event);
 		send_event(skt, event, priority);
 		break;
     }
@@ -1175,9 +1174,6 @@
 	 */
 	msleep(250);
 
-#ifdef CONFIG_PCMCIA_IOCTL
-	init_waitqueue_head(&socket->queue);
-#endif
 	INIT_LIST_HEAD(&socket->devices_list);
 	INIT_WORK(&socket->device_add, pcmcia_delayed_add_pseudo_device, socket);
 	memset(&socket->pcmcia_state, 0, sizeof(u8));
@@ -1218,7 +1214,7 @@
 };
 
 
-struct bus_type pcmcia_bus_type = {
+static struct bus_type pcmcia_bus_type = {
 	.name = "pcmcia",
 	.hotplug = pcmcia_bus_hotplug,
 	.match = pcmcia_bus_match,
@@ -1233,8 +1229,6 @@
 	bus_register(&pcmcia_bus_type);
 	class_interface_register(&pcmcia_bus_interface);
 
-	pcmcia_setup_ioctl();
-
 	return 0;
 }
 fs_initcall(init_pcmcia_bus); /* one level after subsys_initcall so that 
@@ -1243,8 +1237,6 @@
 
 static void __exit exit_pcmcia_bus(void)
 {
-	pcmcia_cleanup_ioctl();
-
 	class_interface_unregister(&pcmcia_bus_interface);
 
 	bus_unregister(&pcmcia_bus_type);
include/pcmcia/ss.h renamed from include/pcmcia/ss.h.old +0 -6
@@ -272,10 +272,6 @@
 	struct work_struct		device_add;	/* for adding further pseudo-multifunction
 							 * devices */
 
-#ifdef CONFIG_PCMCIA_IOCTL
-	struct user_info_t		*user;
-	wait_queue_head_t		queue;
-#endif
 #endif
 
 	/* cardbus (32-bit) */
@@ -290,8 +286,6 @@
 
 };
 
-struct pcmcia_socket * pcmcia_get_socket_by_nr(unsigned int nr);
-
 
 
 extern void pcmcia_parse_events(struct pcmcia_socket *socket, unsigned int events);
drivers/pcmcia/rsrc_mgr.c renamed from drivers/pcmcia/rsrc_mgr.c.old +0 -76

82 lines not on this page · raw message

drivers/pcmcia/cs_internal.h renamed from drivers/pcmcia/cs_internal.h.old +0 -4
@@ -132,11 +132,7 @@
 /* In cs.c */
 extern struct rw_semaphore pcmcia_socket_list_rwsem;
 extern struct list_head pcmcia_socket_list;
-int pcmcia_get_window(struct pcmcia_socket *s, window_handle_t *handle, int idx, win_req_t *req);
-int pccard_get_configuration_info(struct pcmcia_socket *s, unsigned int function, config_info_t *config);
 int pccard_reset_card(struct pcmcia_socket *skt);
-int pccard_get_status(struct pcmcia_socket *s, unsigned int function, cs_status_t *status);
-int pccard_access_configuration_register(struct pcmcia_socket *s, unsigned int function, conf_reg_t *reg);
 
 
 struct pcmcia_callback{
include/pcmcia/cs.h renamed from include/pcmcia/cs.h.old +0 -3
@@ -387,7 +387,6 @@
 int pcmcia_get_first_window(window_handle_t *win, win_req_t *req);
 int pcmcia_get_next_window(window_handle_t *win, win_req_t *req);
 int pcmcia_get_status(struct pcmcia_device *p_dev, cs_status_t *status);
-int pcmcia_get_mem_page(window_handle_t win, memreq_t *req);
 int pcmcia_map_mem_page(window_handle_t win, memreq_t *req);
 int pcmcia_modify_configuration(struct pcmcia_device *p_dev, modconf_t *mod);
 int pcmcia_register_client(client_handle_t *handle, client_reg_t *req);
@@ -400,8 +399,6 @@
 int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req);
 int pcmcia_request_window(struct pcmcia_device **p_dev, win_req_t *req, window_handle_t *wh);
 int pcmcia_reset_card(struct pcmcia_device *p_dev, client_req_t *req);
-int pcmcia_suspend_card(struct pcmcia_socket *skt);
-int pcmcia_resume_card(struct pcmcia_socket *skt);
 int pcmcia_eject_card(struct pcmcia_socket *skt);
 int pcmcia_insert_card(struct pcmcia_socket *skt);
 
drivers/pcmcia/cs.c renamed from drivers/pcmcia/cs.c.old +0 -71

83 lines not on this page · raw message

drivers/pcmcia/pcmcia_resource.c renamed from drivers/pcmcia/pcmcia_resource.c.old +8 -58

102 lines not on this page · raw message

arch/frv/Kconfig renamed from arch/frv/Kconfig.old +1 -3
@@ -315,9 +315,7 @@
 	  and the newer 32 bit CardBus cards.  If you want to use CardBus
 	  cards, you need to say Y here and also to "CardBus support" below.
 
-	  To use your PC-cards, you will need supporting software from David
-	  Hinds pcmcia-cs package (see the file <file:Documentation/Changes>
-	  for location).  Please also read the PCMCIA-HOWTO, available from
+	  Please also read the PCMCIA-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>.
 
 	  To compile this driver as modules, choose M here: the
arch/m68k/Kconfig renamed from arch/m68k/Kconfig.old +1 -3
@@ -69,9 +69,7 @@
 	  and the newer 32 bit CardBus cards.  If you want to use CardBus
 	  cards, you need to say Y here and also to "CardBus support" below.
 
-	  To use your PC-cards, you will need supporting software from David
-	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-	  for location).  Please also read the PCMCIA-HOWTO, available from
+	  Please also read the PCMCIA-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>.
 
 	  To compile this driver as modules, choose M here: the
arch/sparc/Kconfig renamed from arch/sparc/Kconfig.old +1 -3
@@ -97,9 +97,7 @@
 	  and the newer 32 bit CardBus cards.  If you want to use CardBus
 	  cards, you need to say Y here and also to "CardBus support" below.
 
-	  To use your PC-cards, you will need supporting software from David
-	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-	  for location).  Please also read the PCMCIA-HOWTO, available from
+	  Please also read the PCMCIA-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>.
 
 	  To compile this driver as modules, choose M here: the
arch/sparc64/Kconfig renamed from arch/sparc64/Kconfig.old +1 -3
@@ -241,9 +241,7 @@
 	  and the newer 32 bit CardBus cards.  If you want to use CardBus
 	  cards, you need to say Y here and also to "CardBus support" below.
 
-	  To use your PC-cards, you will need supporting software from David
-	  Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
-	  for location).  Please also read the PCMCIA-HOWTO, available from
+	  Please also read the PCMCIA-HOWTO, available from
 	  <http://www.tldp.org/docs.html#howto>.
 
 	  To compile this driver as modules, choose M here: the
Documentation/Changes renamed from Documentation/Changes.old +3 -16
@@ -59,7 +59,6 @@
 o  reiser4progs           1.0.0                   # fsck.reiser4 -V
 o  xfsprogs               2.6.0                   # xfs_db -V
 o  pcmciautils            004
-o  pcmcia-cs              3.1.21                  # cardmgr -V
 o  quota-tools            3.09                    # quota -V
 o  PPP                    2.4.0                   # pppd --version
 o  isdn4k-utils           3.1pre1                 # isdnctrl 2>&1|grep version
@@ -204,17 +203,9 @@
 PCMCIAutils
 -----------
 
-PCMCIAutils replaces pcmcia-cs (see below). It properly sets up
-PCMCIA sockets at system startup and loads the appropriate modules
-for 16-bit PCMCIA devices if the kernel is modularized and the hotplug
-subsystem is used.
-
-Pcmcia-cs
----------
-
-PCMCIA (PC Card) support is now partially implemented in the main
-kernel source. The "pcmciautils" package (see above) replaces pcmcia-cs
-for newest kernels.
+PCMCIAutils replaces pcmcia-cs. It properly sets up PCMCIA sockets at
+system startup and loads the appropriate modules for 16-bit PCMCIA
+devices if the kernel is modularized and the hotplug subsystem is used.
 
 Quota-tools
 -----------
@@ -385,10 +376,6 @@
 -----------
 o  <ftp://ftp.kernel.org/pub/linux/utils/kernel/pcmcia/>
 
-Pcmcia-cs
----------
-o  <http://pcmcia-cs.sourceforge.net/>
-
 Quota-tools
 ----------
 o  <http://sourceforge.net/projects/linuxquota/>
drivers/net/Kconfig renamed from drivers/net/Kconfig.old +1 -2
@@ -1709,8 +1709,7 @@
 	  If you want to plug a network (or some other) card into the PCMCIA
 	  (or PC-card) slot of your laptop instead (PCMCIA is the standard for
 	  credit card size extension cards used by all modern laptops), you
-	  need the pcmcia-cs package (location contained in the file
-	  <file:Documentation/Changes>) and you can say N here.
+	  can say N here.
 
 	  Laptop users should read the Linux Laptop home page at
 	  <http://www.linux-on-laptops.com/> or
drivers/pnp/pnpbios/Kconfig renamed from drivers/pnp/pnpbios/Kconfig.old +0 -3
@@ -34,9 +34,6 @@
 	  Also some buggy systems will fault when accessing certain features
 	  in the PNPBIOS /proc interface (e.g. "boot" configs).
 
-	  See the latest pcmcia-cs (stand-alone package) for a nice set of
-	  PNPBIOS /proc interface tools (lspnp and setpnp).
-
 	  Unless you are debugging or have other specific reasons, it is
 	  recommended that you say N here.
 
scripts/ver_linux renamed from scripts/ver_linux.old +0 -3
@@ -48,9 +48,6 @@
 xfs_db -V 2>&1 | grep version | awk \
 'NR==1{print "xfsprogs              ", $3}'
 
-cardmgr -V 2>&1| grep version | awk \
-'NR==1{print "pcmcia-cs             ", $3}'
-
 quota -V 2>&1 | grep version | awk \
 'NR==1{print "quota-tools           ", $NF}'
 
drivers/pcmcia/ds_internal.h deleted +0 -21
@@ -1,21 +0,0 @@
-/* ds_internal.h - internal header for 16-bit PCMCIA devices management */
-
-extern spinlock_t pcmcia_dev_list_lock;
-extern struct bus_type pcmcia_bus_type;
-
-extern struct pcmcia_device * pcmcia_get_dev(struct pcmcia_device *p_dev);
-extern void pcmcia_put_dev(struct pcmcia_device *p_dev);
-
-struct pcmcia_device * pcmcia_device_add(struct pcmcia_socket *s, unsigned int function);
-
-#ifdef CONFIG_PCMCIA_IOCTL
-extern void __init pcmcia_setup_ioctl(void);
-extern void __exit pcmcia_cleanup_ioctl(void);
-extern void handle_event(struct pcmcia_socket *s, event_t event);
-extern int handle_request(struct pcmcia_socket *s, event_t event);
-#else
-static inline void __init pcmcia_setup_ioctl(void) { return; }
-static inline void __init pcmcia_cleanup_ioctl(void) { return; }
-static inline void handle_event(struct pcmcia_socket *s, event_t event) { return; }
-static inline int handle_request(struct pcmcia_socket *s, event_t event) { return CS_SUCCESS; }
-#endif
drivers/pcmcia/pcmcia_ioctl.c deleted +0 -771

771 lines not on this page · raw message

#1 lore raw
Quoted 3 lines · Adrian Bunk

This patch contains the scheduled removal of drivers/pcmcia/pcmcia_ioctl.c plus the fallout of additional cleanups after this removal.

...

Quoted 1 line

-Who: Dominik Brodowski <[email protected]>

No, not yet, please. I think I'll give it a bit (but just a bit) more time.

Dominik

#2 lore raw
In reply to Adrian Bunk
Quoted 3 lines · Adrian Bunk

This patch contains the scheduled removal of drivers/pcmcia/pcmcia_ioctl.c plus the fallout of additional cleanups after this removal.

Please don't prempt maitainers removing code which they've listed in feature-removal.txt. By doing so, you may discourage maintainers from listing stuff in there.

Instead, it may be worth sending a short reminder instead?

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#3 lore raw
Quoted 10 lines · Russell King
Quoted 3 lines · Adrian Bunk

This patch contains the scheduled removal of drivers/pcmcia/pcmcia_ioctl.c plus the fallout of additional cleanups after this removal.

Please don't prempt maitainers removing code which they've listed in feature-removal.txt. By doing so, you may discourage maintainers from listing stuff in there.

Instead, it may be worth sending a short reminder instead?

I sent reminders to all three peoples with scheduled removals for this month last week. Dominik was the only one who didn't answer.

Sending a patch, no matter how good or bad it is, is often a good way for getting an answer from a maintainer. ;-)

Quoted 1 line

Russell King

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed