diff options
author | David S. Miller <davem@davemloft.net> | 2010-03-01 04:23:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-01 04:23:06 +0100 |
commit | 47871889c601d8199c51a4086f77eebd77c29b0b (patch) | |
tree | 40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /include/pcmcia | |
parent | bnx2x: Tx barriers and locks (diff) | |
parent | Merge branch 'x86-uv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/... (diff) | |
download | linux-47871889c601d8199c51a4086f77eebd77c29b0b.tar.xz linux-47871889c601d8199c51a4086f77eebd77c29b0b.zip |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
drivers/firmware/iscsi_ibft.c
Diffstat (limited to 'include/pcmcia')
-rw-r--r-- | include/pcmcia/ds.h | 2 | ||||
-rw-r--r-- | include/pcmcia/ss.h | 40 |
2 files changed, 24 insertions, 18 deletions
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h index ee148573c114..d57847f2f6c1 100644 --- a/include/pcmcia/ds.h +++ b/include/pcmcia/ds.h @@ -40,7 +40,7 @@ struct net_device; * Documentation/pcmcia/driver.txt for details. */ struct pcmcia_dynids { - spinlock_t lock; + struct mutex lock; struct list_head list; }; diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index cbfba885eb85..32896a773910 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h @@ -134,9 +134,9 @@ struct pccard_operations { struct pcmcia_socket { struct module *owner; - spinlock_t lock; socket_state_t socket; u_int state; + u_int suspended_state; /* state before suspend */ u_short functions; u_short lock_count; pccard_mem_map cis_mem; @@ -200,9 +200,14 @@ struct pcmcia_socket { struct task_struct *thread; struct completion thread_done; unsigned int thread_events; - /* protects socket h/w state */ + unsigned int sysfs_events; + + /* For the non-trivial interaction between these locks, + * see Documentation/pcmcia/locking.txt */ struct mutex skt_mutex; - /* protects thread_events */ + struct mutex ops_mutex; + + /* protects thread_events and sysfs_events */ spinlock_t thread_lock; /* pcmcia (16-bit) */ @@ -225,30 +230,19 @@ struct pcmcia_socket { u8 busy:1; /* pcmcia module is being unloaded */ u8 dead:1; - /* a multifunction-device add event is pending */ - u8 device_add_pending:1; - /* the pending event adds a mfc (1) or pfc (0) */ - u8 mfc_pfc:1; + /* the PCMCIA card consists of two pseudo devices */ + u8 has_pfc:1; - u8 reserved:3; + u8 reserved:4; } pcmcia_state; - /* for adding further pseudo-multifunction devices */ - struct work_struct device_add; - #ifdef CONFIG_PCMCIA_IOCTL struct user_info_t *user; wait_queue_head_t queue; #endif /* CONFIG_PCMCIA_IOCTL */ #endif /* CONFIG_PCMCIA */ - /* cardbus (32-bit) */ -#ifdef CONFIG_CARDBUS - struct resource *cb_cis_res; - void __iomem *cb_cis_virt; -#endif /* CONFIG_CARDBUS */ - /* socket device */ struct device dev; /* data internal to the socket driver */ @@ -263,13 +257,25 @@ struct pcmcia_socket { * - pccard_static_ops iomem and ioport areas are assigned statically * - pccard_iodyn_ops iomem areas is assigned statically, ioport * areas dynamically + * If this option is selected, use + * "select PCCARD_IODYN" in Kconfig. * - pccard_nonstatic_ops iomem and ioport areas are assigned dynamically. * If this option is selected, use * "select PCCARD_NONSTATIC" in Kconfig. + * */ extern struct pccard_resource_ops pccard_static_ops; +#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) extern struct pccard_resource_ops pccard_iodyn_ops; extern struct pccard_resource_ops pccard_nonstatic_ops; +#else +/* If PCMCIA is not used, but only CARDBUS, these functions are not used + * at all. Therefore, do not use the large (240K!) rsrc_nonstatic module + */ +#define pccard_iodyn_ops pccard_static_ops +#define pccard_nonstatic_ops pccard_static_ops +#endif + /* socket drivers are expected to use these callbacks in their .drv struct */ extern int pcmcia_socket_dev_suspend(struct device *dev); |