linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: core: add urb->sgt parameter description
@ 2025-07-21 10:44 Xu Yang
  2025-07-21 11:04 ` Greg KH
  2025-07-21 18:13 ` Randy Dunlap
  0 siblings, 2 replies; 4+ messages in thread
From: Xu Yang @ 2025-07-21 10:44 UTC (permalink / raw)
  To: gregkh, sfr; +Cc: linux-usb, linux-kernel, linux-next, imx

The parameter description of urb->sgt is lost, this will add it for
completeness.

Reported-by: Stephen Rothwell<sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20250711182803.1d548467@canb.auug.org.au/
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
---
 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
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: core: add urb->sgt parameter description
  2025-07-21 10:44 [PATCH] usb: core: add urb->sgt parameter description Xu Yang
@ 2025-07-21 11:04 ` Greg KH
  2025-07-21 14:43   ` Stephen Rothwell
  2025-07-21 18:13 ` Randy Dunlap
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2025-07-21 11:04 UTC (permalink / raw)
  To: Xu Yang; +Cc: sfr, linux-usb, linux-kernel, linux-next, imx

On Mon, Jul 21, 2025 at 06:44:17PM +0800, Xu Yang wrote:
> The parameter description of urb->sgt is lost, this will add it for
> completeness.
> 
> Reported-by: Stephen Rothwell<sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20250711182803.1d548467@canb.auug.org.au/
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> ---
>  include/linux/usb.h | 4 ++++
>  1 file changed, 4 insertions(+)

What commit id does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: core: add urb->sgt parameter description
  2025-07-21 11:04 ` Greg KH
@ 2025-07-21 14:43   ` Stephen Rothwell
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2025-07-21 14:43 UTC (permalink / raw)
  To: Greg KH; +Cc: Xu Yang, linux-usb, linux-kernel, linux-next, imx

[-- Attachment #1: Type: text/plain, Size: 702 bytes --]

Hi Greg,

On Mon, 21 Jul 2025 13:04:09 +0200 Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Mon, Jul 21, 2025 at 06:44:17PM +0800, Xu Yang wrote:
> > The parameter description of urb->sgt is lost, this will add it for
> > completeness.
> > 
> > Reported-by: Stephen Rothwell<sfr@canb.auug.org.au>
> > Closes: https://lore.kernel.org/all/20250711182803.1d548467@canb.auug.org.au/
> > Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
> > ---
> >  include/linux/usb.h | 4 ++++
> >  1 file changed, 4 insertions(+)  
> 
> What commit id does this fix?

Fixes: 488e6eaab88c ("usb: core: add dma-noncoherent buffer alloc and free API")

from the usb tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: core: add urb->sgt parameter description
  2025-07-21 10:44 [PATCH] usb: core: add urb->sgt parameter description Xu Yang
  2025-07-21 11:04 ` Greg KH
@ 2025-07-21 18:13 ` Randy Dunlap
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Dunlap @ 2025-07-21 18:13 UTC (permalink / raw)
  To: Xu Yang, gregkh, sfr; +Cc: linux-usb, linux-kernel, linux-next, imx



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@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20250711182803.1d548467@canb.auug.org.au/
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-21 18:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 10:44 [PATCH] usb: core: add urb->sgt parameter description Xu Yang
2025-07-21 11:04 ` Greg KH
2025-07-21 14:43   ` Stephen Rothwell
2025-07-21 18:13 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).