diff options
author | David S. Miller <davem@davemloft.net> | 2010-02-28 22:23:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-28 22:23:06 -0500 |
commit | 47871889c601d8199c51a4086f77eebd77c29b0b (patch) | |
tree | 40cdcac3bff0ee40cc33dcca61d0577cdf965f77 /include/pcmcia | |
parent | c16cc0b464b8876cfd57ce1c1dbcb6f9a6a0bce3 (diff) | |
parent | 30ff056c42c665b9ea535d8515890857ae382540 (diff) |
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; | |||
40 | * Documentation/pcmcia/driver.txt for details. | 40 | * Documentation/pcmcia/driver.txt for details. |
41 | */ | 41 | */ |
42 | struct pcmcia_dynids { | 42 | struct pcmcia_dynids { |
43 | spinlock_t lock; | 43 | struct mutex lock; |
44 | struct list_head list; | 44 | struct list_head list; |
45 | }; | 45 | }; |
46 | 46 | ||
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 { | |||
134 | 134 | ||
135 | struct pcmcia_socket { | 135 | struct pcmcia_socket { |
136 | struct module *owner; | 136 | struct module *owner; |
137 | spinlock_t lock; | ||
138 | socket_state_t socket; | 137 | socket_state_t socket; |
139 | u_int state; | 138 | u_int state; |
139 | u_int suspended_state; /* state before suspend */ | ||
140 | u_short functions; | 140 | u_short functions; |
141 | u_short lock_count; | 141 | u_short lock_count; |
142 | pccard_mem_map cis_mem; | 142 | pccard_mem_map cis_mem; |
@@ -200,9 +200,14 @@ struct pcmcia_socket { | |||
200 | struct task_struct *thread; | 200 | struct task_struct *thread; |
201 | struct completion thread_done; | 201 | struct completion thread_done; |
202 | unsigned int thread_events; | 202 | unsigned int thread_events; |
203 | /* protects socket h/w state */ | 203 | unsigned int sysfs_events; |
204 | |||
205 | /* For the non-trivial interaction between these locks, | ||
206 | * see Documentation/pcmcia/locking.txt */ | ||
204 | struct mutex skt_mutex; | 207 | struct mutex skt_mutex; |
205 | /* protects thread_events */ | 208 | struct mutex ops_mutex; |
209 | |||
210 | /* protects thread_events and sysfs_events */ | ||
206 | spinlock_t thread_lock; | 211 | spinlock_t thread_lock; |
207 | 212 | ||
208 | /* pcmcia (16-bit) */ | 213 | /* pcmcia (16-bit) */ |
@@ -225,30 +230,19 @@ struct pcmcia_socket { | |||
225 | u8 busy:1; | 230 | u8 busy:1; |
226 | /* pcmcia module is being unloaded */ | 231 | /* pcmcia module is being unloaded */ |
227 | u8 dead:1; | 232 | u8 dead:1; |
228 | /* a multifunction-device add event is pending */ | 233 | /* the PCMCIA card consists of two pseudo devices */ |
229 | u8 device_add_pending:1; | 234 | u8 has_pfc:1; |
230 | /* the pending event adds a mfc (1) or pfc (0) */ | ||
231 | u8 mfc_pfc:1; | ||
232 | 235 | ||
233 | u8 reserved:3; | 236 | u8 reserved:4; |
234 | } pcmcia_state; | 237 | } pcmcia_state; |
235 | 238 | ||
236 | 239 | ||
237 | /* for adding further pseudo-multifunction devices */ | ||
238 | struct work_struct device_add; | ||
239 | |||
240 | #ifdef CONFIG_PCMCIA_IOCTL | 240 | #ifdef CONFIG_PCMCIA_IOCTL |
241 | struct user_info_t *user; | 241 | struct user_info_t *user; |
242 | wait_queue_head_t queue; | 242 | wait_queue_head_t queue; |
243 | #endif /* CONFIG_PCMCIA_IOCTL */ | 243 | #endif /* CONFIG_PCMCIA_IOCTL */ |
244 | #endif /* CONFIG_PCMCIA */ | 244 | #endif /* CONFIG_PCMCIA */ |
245 | 245 | ||
246 | /* cardbus (32-bit) */ | ||
247 | #ifdef CONFIG_CARDBUS | ||
248 | struct resource *cb_cis_res; | ||
249 | void __iomem *cb_cis_virt; | ||
250 | #endif /* CONFIG_CARDBUS */ | ||
251 | |||
252 | /* socket device */ | 246 | /* socket device */ |
253 | struct device dev; | 247 | struct device dev; |
254 | /* data internal to the socket driver */ | 248 | /* data internal to the socket driver */ |
@@ -263,13 +257,25 @@ struct pcmcia_socket { | |||
263 | * - pccard_static_ops iomem and ioport areas are assigned statically | 257 | * - pccard_static_ops iomem and ioport areas are assigned statically |
264 | * - pccard_iodyn_ops iomem areas is assigned statically, ioport | 258 | * - pccard_iodyn_ops iomem areas is assigned statically, ioport |
265 | * areas dynamically | 259 | * areas dynamically |
260 | * If this option is selected, use | ||
261 | * "select PCCARD_IODYN" in Kconfig. | ||
266 | * - pccard_nonstatic_ops iomem and ioport areas are assigned dynamically. | 262 | * - pccard_nonstatic_ops iomem and ioport areas are assigned dynamically. |
267 | * If this option is selected, use | 263 | * If this option is selected, use |
268 | * "select PCCARD_NONSTATIC" in Kconfig. | 264 | * "select PCCARD_NONSTATIC" in Kconfig. |
265 | * | ||
269 | */ | 266 | */ |
270 | extern struct pccard_resource_ops pccard_static_ops; | 267 | extern struct pccard_resource_ops pccard_static_ops; |
268 | #if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE) | ||
271 | extern struct pccard_resource_ops pccard_iodyn_ops; | 269 | extern struct pccard_resource_ops pccard_iodyn_ops; |
272 | extern struct pccard_resource_ops pccard_nonstatic_ops; | 270 | extern struct pccard_resource_ops pccard_nonstatic_ops; |
271 | #else | ||
272 | /* If PCMCIA is not used, but only CARDBUS, these functions are not used | ||
273 | * at all. Therefore, do not use the large (240K!) rsrc_nonstatic module | ||
274 | */ | ||
275 | #define pccard_iodyn_ops pccard_static_ops | ||
276 | #define pccard_nonstatic_ops pccard_static_ops | ||
277 | #endif | ||
278 | |||
273 | 279 | ||
274 | /* socket drivers are expected to use these callbacks in their .drv struct */ | 280 | /* socket drivers are expected to use these callbacks in their .drv struct */ |
275 | extern int pcmcia_socket_dev_suspend(struct device *dev); | 281 | extern int pcmcia_socket_dev_suspend(struct device *dev); |