5 This file explains the locking and exclusion scheme used in the PCCARD
9 A) Overview, Locking Hierarchy:
10 ===============================
12 pcmcia_socket_list_rwsem
13 - protects only the list of sockets
16 - serializes card insert / ejection
19 - serializes socket operation
25 The following functions and callbacks to struct pcmcia_socket must
26 be called with "skt_mutex" held::
28 socket_detect_change()
40 struct pcmcia_callback *callback
42 The following functions and callbacks to struct pcmcia_socket must
43 be called with "ops_mutex" held::
48 struct pccard_operations *ops
49 struct pccard_resource_ops *resource_ops;
51 Note that send_event() and `struct pcmcia_callback *callback` must not be
52 called with "ops_mutex" held.
60 struct list_head pcmcia_socket_list;
62 protected by pcmcia_socket_list_rwsem;
67 The resource_ops and their data are protected by ops_mutex.
69 The "main" struct pcmcia_socket is protected as follows (read-only fields
70 or single-use fields not mentioned):
72 - by pcmcia_socket_list_rwsem::
74 struct list_head socket_list;
78 unsigned int thread_events;
82 u_int suspended_state;
84 struct pcmcia_callback *callback;
89 socket_state_t socket;
92 pccard_mem_map cis_mem;
93 void __iomem *cis_virt;
97 struct list_head cis_cache;
104 struct list_head devices_list;
109 3. Per PCMCIA-device Data:
110 --------------------------
112 The "main" struct pcmcia_device is protected as follows (read-only fields
113 or single-use fields not mentioned):
116 - by pcmcia_socket->ops_mutex::
118 struct list_head socket_device_list;
119 struct config_t *function_config;
124 u16 allow_func_id_match:1;
128 - by the PCMCIA driver::