Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-22 Thread Alan Stern
On Wed, 22 May 2019, Laurentiu Tudor wrote: > >> +EXPORT_SYMBOL_GPL(usb_hcd_setup_local_mem); > > > > If you have a usb_hcd_setup_local_mem() function then you should also > > have a usb_hcd_remove_local_mem() function. > > Even if all resources that are allocated are device managed? Ah, I miss

Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-22 Thread Laurentiu Tudor
On 21.05.2019 18:27, Fredrik Noring wrote: > Thanks Laurentiu! > >> --- a/include/linux/usb/hcd.h >> +++ b/include/linux/usb/hcd.h >> @@ -216,6 +216,9 @@ struct usb_hcd { >> #defineHC_IS_RUNNING(state) ((state) & __ACTIVE) >> #defineHC_IS_SUSPENDED(state) ((state) & __SUSPEND) >> >

Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-22 Thread Laurentiu Tudor
Hello Alan, On 21.05.2019 20:20, Alan Stern wrote: > On Tue, 21 May 2019 laurentiu.tu...@nxp.com wrote: > >> From: Laurentiu Tudor >> >> For HCs that have local memory, replace the current DMA API usage >> with a genalloc generic allocator to manage the mappings for these >> devices. To help use

Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-21 Thread Alan Stern
On Tue, 21 May 2019 laurentiu.tu...@nxp.com wrote: > From: Laurentiu Tudor > > For HCs that have local memory, replace the current DMA API usage > with a genalloc generic allocator to manage the mappings for these > devices. To help users, introduce a new HCD API, > usb_hcd_setup_local_mem() tha

Re: [PATCH v5 2/5] USB: use genalloc for USB HCs with local memory

2019-05-21 Thread Fredrik Noring
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 */ >