[U-Boot] [PATCH] usb: dwc3: Correct datatype of base to unsigned long

From: Siva Durga Prasad Paladugu siva.durga.paladugu@xilinx.com
Correct type of varibale base to unsigned long as keeping it as int causes usb failures if MSB of the base address is set.
Signed-off-by: Siva Durga Prasad Paladugu sivadur@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com ---
include/dwc3-uboot.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/dwc3-uboot.h b/include/dwc3-uboot.h index 09ff8a74d669..7af2ad11e4ed 100644 --- a/include/dwc3-uboot.h +++ b/include/dwc3-uboot.h @@ -13,7 +13,7 @@ #include <linux/usb/otg.h>
struct dwc3_device { - int base; + unsigned long base; enum usb_dr_mode dr_mode; u32 maximum_speed; unsigned tx_fifo_resize:1;

On 12.05.16 08:57, Michal Simek wrote:
From: Siva Durga Prasad Paladugu siva.durga.paladugu@xilinx.com
Correct type of varibale base to unsigned long as keeping it as int causes usb failures if MSB of the base address is set.
Signed-off-by: Siva Durga Prasad Paladugu sivadur@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com
I can verify that with this patch the "usb start" doesn't crash the system anymore and it seems to start doing something intelligible (I don't have usb devices plugged in, so can't verify whether they also work).
Tested-by: Alexander Graf agraf@suse.de
Alex

Hi Marek,
On 12.5.2016 10:14, Alexander Graf wrote:
On 12.05.16 08:57, Michal Simek wrote:
From: Siva Durga Prasad Paladugu siva.durga.paladugu@xilinx.com
Correct type of varibale base to unsigned long as keeping it as int causes usb failures if MSB of the base address is set.
Signed-off-by: Siva Durga Prasad Paladugu sivadur@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com
I can verify that with this patch the "usb start" doesn't crash the system anymore and it seems to start doing something intelligible (I don't have usb devices plugged in, so can't verify whether they also work).
Tested-by: Alexander Graf agraf@suse.de
Can you please look at it?
Thanks, Michal

On 06/02/2016 12:59 PM, Michal Simek wrote:
Hi Marek,
Hi,
On 12.5.2016 10:14, Alexander Graf wrote:
On 12.05.16 08:57, Michal Simek wrote:
From: Siva Durga Prasad Paladugu siva.durga.paladugu@xilinx.com
Correct type of varibale base to unsigned long as keeping it as int causes usb failures if MSB of the base address is set.
Signed-off-by: Siva Durga Prasad Paladugu sivadur@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com
I can verify that with this patch the "usb start" doesn't crash the system anymore and it seems to start doing something intelligible (I don't have usb devices plugged in, so can't verify whether they also work).
Tested-by: Alexander Graf agraf@suse.de
Can you please look at it?
It's in u-boot-usb, PR is coming

On 2.6.2016 14:27, Marek Vasut wrote:
On 06/02/2016 12:59 PM, Michal Simek wrote:
Hi Marek,
Hi,
On 12.5.2016 10:14, Alexander Graf wrote:
On 12.05.16 08:57, Michal Simek wrote:
From: Siva Durga Prasad Paladugu siva.durga.paladugu@xilinx.com
Correct type of varibale base to unsigned long as keeping it as int causes usb failures if MSB of the base address is set.
Signed-off-by: Siva Durga Prasad Paladugu sivadur@xilinx.com Signed-off-by: Michal Simek michal.simek@xilinx.com
I can verify that with this patch the "usb start" doesn't crash the system anymore and it seems to start doing something intelligible (I don't have usb devices plugged in, so can't verify whether they also work).
Tested-by: Alexander Graf agraf@suse.de
Can you please look at it?
It's in u-boot-usb, PR is coming
Thanks, Michal
participants (4)
-
Alexander Graf
-
Marek Vasut
-
Michal Simek
-
Michal Simek