diff options
Diffstat (limited to 'include/pcmcia/ss.h')
-rw-r--r-- | include/pcmcia/ss.h | 40 |
1 files changed, 23 insertions, 17 deletions
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); |