aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/firewire.h
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2012-09-27 15:46:09 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2012-09-28 05:47:42 -0400
commit4d50c44381c981c9caa74e82ab894d4938dac9ca (patch)
tree58ff020b13eccd0db85c6796300dd576544b9349 /include/linux/firewire.h
parent35202f7d8420fff586b372422a2419affeaba8ef (diff)
firewire: addendum to address handler RCU conversion
Follow up on commit c285f6ff6787 "firewire: remove global lock around address handlers, convert to RCU": - address_handler_lock no longer serializes the address handler, only its function to serialize updates to the list of handlers remains. Rename the lock to address_handler_list_lock. - Callers of fw_core_remove_address_handler() must be able to sleep. Comment on this in the API documentation. - The counterpart fw_core_add_address_handler() is by nature something which is used in process context. Replace spin_lock_bh() by spin_lock() in fw_core_add_address_handler() and in fw_core_remove_address_handler(), and document that process context is now required for fw_core_add_address_handler(). - Extend the documentation of fw_address_callback_t. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'include/linux/firewire.h')
-rw-r--r--include/linux/firewire.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index db04ec5121cb..191501afd7fb 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -265,8 +265,16 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
265 void *data, size_t length, 265 void *data, size_t length,
266 void *callback_data); 266 void *callback_data);
267/* 267/*
268 * Important note: Except for the FCP registers, the callback must guarantee 268 * This callback handles an inbound request subaction. It is called in
269 * that either fw_send_response() or kfree() is called on the @request. 269 * RCU read-side context, therefore must not sleep.
270 *
271 * The callback should not initiate outbound request subactions directly.
272 * Otherwise there is a danger of recursion of inbound and outbound
273 * transactions from and to the local node.
274 *
275 * The callback is responsible that either fw_send_response() or kfree()
276 * is called on the @request, except for FCP registers for which the core
277 * takes care of that.
270 */ 278 */
271typedef void (*fw_address_callback_t)(struct fw_card *card, 279typedef void (*fw_address_callback_t)(struct fw_card *card,
272 struct fw_request *request, 280 struct fw_request *request,