[PATCH 1/5] firewire: core: fulfill kerneldoc for address handler
From: Takashi Sakamoto
Date: Sun Sep 20 2026 - 04:37:18 EST
The callback for the address handler is now invoked in process context.
Update the kerneldoc for the address handler accordingly.
Signed-off-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
---
drivers/firewire/core-transaction.c | 8 +++-----
include/linux/firewire.h | 22 +++++++++++++++-------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index a2a8d755ad0a..bdd2437c6f7f 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -637,16 +637,14 @@ static int put_address_handler(struct fw_address_handler *handler)
*
* When a request is received that falls within the specified address range, the specified callback
* is invoked. The parameters passed to the callback give the details of the particular request.
- * The callback is invoked in the workqueue context in most cases. However, if the request is
- * initiated by the local node, the callback is invoked in the initiator's context.
- *
- * To be called in process context.
- * Return value: 0 on success, non-zero otherwise.
*
* The start offset of the handler's address region is determined by
* fw_core_add_address_handler() and is returned in handler->offset.
*
* Address allocations are exclusive, except for the FCP registers.
+ *
+ * Context: Process context.
+ * Returns: 0 on success, non-zero otherwise.
*/
int fw_core_add_address_handler(struct fw_address_handler *handler,
const struct fw_address_region *region)
diff --git a/include/linux/firewire.h b/include/linux/firewire.h
index 2b065f03565d..4bca5af6793d 100644
--- a/include/linux/firewire.h
+++ b/include/linux/firewire.h
@@ -298,17 +298,25 @@ union fw_transaction_callback {
fw_transaction_callback_with_tstamp_t with_tstamp;
};
-/*
- * This callback handles an inbound request subaction. If the request subaction is initiated from
- * the local node (e.g. by unit driver), the execution context depends on the initiator and is
- * unspecified. Otherwise, it runs in workqueue context.
+/**
+ * typedef fw_address_callback_t - Function to handle the request of the asynchronous transaction.
+ * @card: the card instance which receives the request
+ * @request: the request instance.
+ * @tcode: the transaction code
+ * @destination: the destination node ID
+ * @source: the source node ID
+ * @generation: the bus generation in which the request was sent
+ * @offset: the destination offset in source node.
+ * @data: the request content if available.
+ * @length: the length of data.
+ * @callback_data: the data registered with this function.
*
- * 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.
+ * This callback handles an inbound request subaction.
*
* The callback is responsible that fw_send_response() is called on the @request, except for FCP
* registers for which the core takes care of that.
+ *
+ * Context: Process context.
*/
typedef void (*fw_address_callback_t)(struct fw_card *card,
struct fw_request *request,
--
2.53.0