From 567a656d929c3d5c07ab70eab4aa62cc76059e6b Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Sun, 20 Sep 2026 17:36:55 +0900 Subject: [PATCH] firewire: core: fulfill kerneldoc for address handler The callback for the address handler is now invoked in process context. Update the kerneldoc for the address handler accordingly. Link: https://lore.kernel.org/r/20260920083659.191855-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto --- 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 9dc9f0da0bd8..ae37377ef65a 100644 --- a/drivers/firewire/core-transaction.c +++ b/drivers/firewire/core-transaction.c @@ -641,16 +641,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,