Re: [PATCH] usb: core: add urb->sgt parameter description
From: Randy Dunlap
Date: Mon Jul 21 2025 - 14:13:29 EST
On 7/21/25 3:44 AM, Xu Yang wrote:
> The parameter description of urb->sgt is lost, this will add it for
> completeness.
>
> Reported-by: Stephen Rothwell<sfr@xxxxxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/all/20250711182803.1d548467@xxxxxxxxxxxxxxxx/
> Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Thanks.
> ---
> include/linux/usb.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 535ac37198a1..9d662c6abb4d 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -1455,6 +1455,10 @@ typedef void (*usb_complete_t)(struct urb *);
> * @sg: scatter gather buffer list, the buffer size of each element in
> * the list (except the last) must be divisible by the endpoint's
> * max packet size if no_sg_constraint isn't set in 'struct usb_bus'
> + * @sgt: used to hold a scatter gather table returned by usb_alloc_noncoherent(),
> + * which describes the allocated non-coherent and possibly non-contiguous
> + * memory and is guaranteed to have 1 single DMA mapped segment. The
> + * allocated memory needs to be freed by usb_free_noncoherent().
> * @num_mapped_sgs: (internal) number of mapped sg entries
> * @num_sgs: number of entries in the sg list
> * @transfer_buffer_length: How big is transfer_buffer. The transfer may
--
~Randy