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

2019-05-17 Thread Fredrik Noring
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 > >

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

2019-05-17 Thread Laurentiu Tudor
Hi Fredrik, On 16.05.2019 18:15, Fredrik Noring wrote: > Hi Laurentiu, > >> I took your code, added the missing mapping and placed it in a patch. >> Please see attached (compile tested only). > > Thanks! Unfortunately, the OHCI fails with errors such as > > usb 1-1: device descriptor read

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

2019-05-16 Thread Fredrik Noring
Hi Laurentiu, > I took your code, added the missing mapping and placed it in a patch. > Please see attached (compile tested only). Thanks! Unfortunately, the OHCI fails with errors such as usb 1-1: device descriptor read/64, error -12 that I tracked down to the calls hub_po

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

2019-05-16 Thread Fredrik Noring
Hi Laurentiu, > > The kernel oopses with "unable to handle kernel paging request at virtual > > address 000aba0b" in hcd_alloc_coherent via usb_hcd_map_urb_for_dma. > > By any chance, does this address looks like the dma_addr that the device > should target? Yes, that looks like a typical devi

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

2019-05-16 Thread Laurentiu Tudor
Hi Fredrick, On 15.05.2019 19:28, Fredrik Noring wrote: > Hi Lauretniu, > >> I think that any recent kernel will do, so I'd say your current branch >> should be fine. > > The kernel oopses with "unable to handle kernel paging request at virtual > address 000aba0b" in hcd_alloc_coherent via usb_h

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

2019-05-16 Thread Laurentiu Tudor
Hi Fredrik, Thanks very much for taking the time to look into this. Please see comments inline. On 15.05.2019 19:28, Fredrik Noring wrote: > Hi Lauretniu, > >> I think that any recent kernel will do, so I'd say your current branch >> should be fine. > > The kernel oopses with "unable to handle

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

2019-05-15 Thread Fredrik Noring
Hi Lauretniu, > I think that any recent kernel will do, so I'd say your current branch > should be fine. The kernel oopses with "unable to handle kernel paging request at virtual address 000aba0b" in hcd_alloc_coherent via usb_hcd_map_urb_for_dma. This relates to patch 2/3 that I didn't quite un

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

2019-05-15 Thread Laurentiu Tudor
Hello, On 14.05.2019 21:29, Fredrik Noring wrote: > Thanks Robin! > >>> For HCs that have local memory, replace the current DMA API usage >>> with a genalloc generic allocator to manage the mappings for these >>> devices. >>> This is in preparation for dropping the existing "coherent" dma >>> mem

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

2019-05-14 Thread Fredrik Noring
Thanks Robin! > > For HCs that have local memory, replace the current DMA API usage > > with a genalloc generic allocator to manage the mappings for these > > devices. > > This is in preparation for dropping the existing "coherent" dma > > mem declaration APIs. Current implementation was relying o

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

2019-05-14 Thread Robin Murphy
+Fredrik, Juergen On 14/05/2019 15:38, 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. This is in preparation for dropping the existing "coherent"

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

2019-05-14 Thread laurentiu . tudor
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. This is in preparation for dropping the existing "coherent" dma mem declaration APIs. Current implementation was relying on a short c