mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
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>
This commit is contained in:
parent
35202f7d84
commit
4d50c44381
2 changed files with 18 additions and 7 deletions
|
@ -265,8 +265,16 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
|
|||
void *data, size_t length,
|
||||
void *callback_data);
|
||||
/*
|
||||
* Important note: Except for the FCP registers, the callback must guarantee
|
||||
* that either fw_send_response() or kfree() is called on the @request.
|
||||
* This callback handles an inbound request subaction. It is called in
|
||||
* RCU read-side context, therefore must not sleep.
|
||||
*
|
||||
* The callback should not initiate outbound request subactions directly.
|
||||
* Otherwise there is a danger of recursion of inbound and outbound
|
||||
* transactions from and to the local node.
|
||||
*
|
||||
* The callback is responsible that either fw_send_response() or kfree()
|
||||
* is called on the @request, except for FCP registers for which the core
|
||||
* takes care of that.
|
||||
*/
|
||||
typedef void (*fw_address_callback_t)(struct fw_card *card,
|
||||
struct fw_request *request,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue