Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-14 Thread Jagan Teki
On Thu, Dec 13, 2018 at 7:00 PM Marek Vasut wrote: > > On 12/13/2018 08:14 AM, Stefan Mavrodiev wrote: > > > > On 12/5/18 3:16 PM, Marek Vasut wrote: > >> On 12/05/2018 02:06 PM, Stefan Mavrodiev wrote: > >>> On 12/5/18 2:57 PM, Marek Vasut wrote: > On 12/05/2018 01:49 PM, Stefan Mavrodiev

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-13 Thread Marek Vasut
On 12/13/2018 04:40 PM, Jean-Jacques Hiblot wrote: > > On 13/12/2018 15:05, Marek Vasut wrote: >> On 12/13/2018 03:03 PM, Jean-Jacques Hiblot wrote: >>> On 05/12/2018 13:57, Marek Vasut wrote: On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: > When the device is in peripheral mode

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-13 Thread Jean-Jacques Hiblot
On 13/12/2018 15:05, Marek Vasut wrote: On 12/13/2018 03:03 PM, Jean-Jacques Hiblot wrote: On 05/12/2018 13:57, Marek Vasut wrote: On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: When the device is in peripheral mode Can you have two devices, one in peripheral mode and one in host mode, on

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-13 Thread Marek Vasut
On 12/13/2018 03:03 PM, Jean-Jacques Hiblot wrote: > > On 05/12/2018 13:57, Marek Vasut wrote: >> On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: >>> When the device is in peripheral mode >> Can you have two devices, one in peripheral mode and one in host mode, >> on the same system ? > > It is

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-13 Thread Jean-Jacques Hiblot
On 05/12/2018 13:57, Marek Vasut wrote: On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: When the device is in peripheral mode Can you have two devices, one in peripheral mode and one in host mode, on the same system ? It is possible with the musb-new. Using DM_USB and DM_USB_GADGET, I did

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-13 Thread Marek Vasut
On 12/13/2018 08:14 AM, Stefan Mavrodiev wrote: > > On 12/5/18 3:16 PM, Marek Vasut wrote: >> On 12/05/2018 02:06 PM, Stefan Mavrodiev wrote: >>> On 12/5/18 2:57 PM, Marek Vasut wrote: On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: > When the device is in peripheral mode Can you

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-12 Thread Stefan Mavrodiev
On 12/5/18 3:16 PM, Marek Vasut wrote: On 12/05/2018 02:06 PM, Stefan Mavrodiev wrote: On 12/5/18 2:57 PM, Marek Vasut wrote: On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: When the device is in peripheral mode Can you have two devices, one in peripheral mode and one in host mode, on the

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-05 Thread Marek Vasut
On 12/05/2018 02:06 PM, Stefan Mavrodiev wrote: > > On 12/5/18 2:57 PM, Marek Vasut wrote: >> On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: >>> When the device is in peripheral mode >> Can you have two devices, one in peripheral mode and one in host mode, >> on the same system ? > > Not 100%

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-05 Thread Maxime Ripard
On Wed, Dec 05, 2018 at 01:57:14PM +0100, Marek Vasut wrote: > On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: > > When the device is in peripheral mode > > Can you have two devices, one in peripheral mode and one in host mode, > on the same system ? No, or at least, on all of the SoCs that

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-05 Thread Stefan Mavrodiev
On 12/5/18 2:57 PM, Marek Vasut wrote: On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: When the device is in peripheral mode Can you have two devices, one in peripheral mode and one in host mode, on the same system ? Not 100% sure, but I'm thinking there is only one OTG port for all sunxi

Re: [U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-05 Thread Marek Vasut
On 12/05/2018 01:49 PM, Stefan Mavrodiev wrote: > When the device is in peripheral mode Can you have two devices, one in peripheral mode and one in host mode, on the same system ? > there is no > struct usb_bus_priv allocated pointer, as the uclass driver > ("usb_dev_generic") doesn't call

[U-Boot] [PATCH 1/1] usb: musb-new: sunxi: Fix null pointer access

2018-12-05 Thread Stefan Mavrodiev
When the device is in peripheral mode there is no struct usb_bus_priv allocated pointer, as the uclass driver ("usb_dev_generic") doesn't call per_device_auto_alloc_size. This results in writing to the internal SDRAM at priv->desc_before_addr = true; Signed-off-by: Stefan Mavrodiev ---