From: Fredrik Noring <noring@nocrew.org>
To: laurentiu.tudor@nxp.com
Cc: hch@lst.de, stern@rowland.harvard.edu,
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
marex@denx.de, leoyang.li@nxp.com, linux-kernel@vger.kernel.org,
robin.murphy@arm.com, JuergenUrban@gmx.de
Subject: Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory
Date: Tue, 21 May 2019 17:27:43 +0200 [thread overview]
Message-ID: <20190521152743.GA4693@sx9> (raw)
In-Reply-To: <20190521140748.20012-3-laurentiu.tudor@nxp.com>
Thanks Laurentiu!
> --- a/include/linux/usb/hcd.h
> +++ b/include/linux/usb/hcd.h
> @@ -216,6 +216,9 @@ struct usb_hcd {
> #define HC_IS_RUNNING(state) ((state) & __ACTIVE)
> #define HC_IS_SUSPENDED(state) ((state) & __SUSPEND)
>
> + /* allocator for HCs having local memory */
> + struct gen_pool *localmem_pool;
> +
I have tested patches 1, 2 and 5, and they seem to work. Nice! May I
suggest clarifying the NULL pointers? I think that may help someone
debugging or maintaining this in the future. Something like this:
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -385,6 +385,8 @@ struct ohci_hcd {
/*
* memory management for queue data structures
+ *
+ * @td_cache and @ed_cache are %NULL if &usb_hcd.localmem_pool is used.
*/
struct dma_pool *td_cache;
struct dma_pool *ed_cache;
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -211,7 +211,7 @@ struct usb_hcd {
#define HC_IS_RUNNING(state) ((state) & __ACTIVE)
#define HC_IS_SUSPENDED(state) ((state) & __SUSPEND)
- /* allocator for HCs having local memory */
+ /* allocator for HCs having local memory, or %NULL */
struct gen_pool *localmem_pool;
/* more shared queuing code would be good; it should support
Fredrik
next prev parent reply other threads:[~2019-05-21 15:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-21 14:07 [PATCH v5 0/5] prerequisites for device reserved local mem rework laurentiu.tudor
2019-05-21 14:07 ` [PATCH v5 1/5] lib/genalloc.c: Add gen_pool_dma_zalloc() for zeroed DMA allocations laurentiu.tudor
2019-05-21 14:07 ` [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory laurentiu.tudor
2019-05-21 15:27 ` Fredrik Noring [this message]
2019-05-22 10:54 ` Laurentiu Tudor
2019-05-21 17:20 ` Alan Stern
2019-05-22 10:45 ` Laurentiu Tudor
2019-05-22 14:58 ` Alan Stern
2019-05-21 14:07 ` [PATCH v5 3/5] usb: host: ohci-sm501: init genalloc for " laurentiu.tudor
2019-05-21 14:07 ` [PATCH v5 4/5] usb: host: ohci-tmio: " laurentiu.tudor
2019-05-21 14:07 ` [PATCH v5 5/5] USB: drop HCD_LOCAL_MEM flag laurentiu.tudor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190521152743.GA4693@sx9 \
--to=noring@nocrew.org \
--cc=JuergenUrban@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=laurentiu.tudor@nxp.com \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marex@denx.de \
--cc=robin.murphy@arm.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).