Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework

Laurentiu Tudor
2019-05-20T11:34:55Z

Hello Fredrik,

On 17.05.2019 20:41, Fredrik Noring wrote:
> Hi Laurentiu,
>
>>> that I tracked down to the calls
>>>
>>> hub_port_init
>>> -> usb_control_msg
>>> -> usb_internal_control_msg
>>> -> usb_start_wait_urb
>>> -> usb_submit_urb
>>> -> usb_hcd_submit_urb
>>> -> hcd->driver->urb_enqueue
>>> -> ohci_urb_enqueue
>>> -> ed_get
>>> -> ed_alloc
>
> I found that the generic OHCI driver takes a wrong turn here, in ed_alloc,
> and eventually also in td_alloc. Fortunately, your patch can be easily
> extended to fix them as well. Please see attached patch below.
>
> With that, the OHCI seems to work as expected with HCD_LOCAL_MEM. :)

Wow, that's excellent news! Thanks a lot for looking into this.
Are you ok if I add your Signed-Off-by and maybe also Tested-by in the
first patch of the series?
As a side note, I plan to add a new HCD function and name it something
like hcd_setup_local_mem() that would take care of setting up the
genalloc for drivers.

> Would you like me to submit gen_pool_dma_zalloc as a separate patch?

Yes, I think it would make sense to put the new API in a distinct patch.
I think we can either include it in the next version of the patch series
or you can submit separately and I'll mention it as dependency for this
patch series, however you prefer.

---
Thanks & Best Regards, Laurentiu