ums: respect CONFIG_USB_CABLE_CHECK
PATCH 1/1 ums: respect CONFIG_USB_CABLE_CHECK
From: Stephen Warren <[email protected]>
Not all boards support usb_cable_connected(). CONFIG_USB_CABLE_CHECK is used elsewhere to indicate whether a board does support that function. Enhance cmd_usb_mass_storage.c to honor that config variable.
--- common/cmd_usb_mass_storage.c | 2 ++ 1 file changed, 2 insertions(+)
common/cmd_usb_mass_storage.c +2 -0
@@ -42,6 +42,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,g_dnl_register ("ums" ); +#ifdef CONFIG_USB_CABLE_CHECK /* Timeout unit: seconds */ int cable_ready_timeout =UMS_CABLE_READY_TIMEOUT ;
@@ -65,6 +66,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag, }puts ("\r\n" ); } +#endif while (1 ) {usb_gadget_handle_interrupts ();
Signature · 1 line
1.8.1.5
PATCH 1/1 ums: respect CONFIG_USB_CABLE_CHECK
Quoted 26 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Not all boards support
usb_cable_connected().CONFIG_USB_CABLE_CHECKis used elsewhere to indicate whether a board does support that function. Enhancecmd_usb_mass_storage.cto honor that config variable.Cc Przemyslaw Marczak <[email protected]>Cc Lukasz Majewski <[email protected]>Signed-off-by Stephen Warren <[email protected]>--- common/cmd_usb_mass_storage.c | 2 ++ 1 file changed, 2 insertions(+)common/cmd_usb_mass_storage.c +1
-0@@ -42,6 +42,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,g_dnl_register ("ums" ); +#ifdef CONFIG_USB_CABLE_CHECK /* Timeout unit: seconds */ int cable_ready_timeout =UMS_CABLE_READY_TIMEOUT ;
common/cmd_usb_mass_storage.c int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag, · line 72
Quoted 7 lines
common/cmd_usb_mass_storage.c +1
-0@@ -65,6 +66,7 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag, }puts ("\r\n" ); } +#endif while (1 ) {usb_gadget_handle_interrupts ();
Please look at:
[PATCH v5 03/12] usb: dfu: fix boards wo USB cable detection
Does this work for you instead ?
Best regards,
Marek Vasut
PATCH 1/1 ums: respect CONFIG_USB_CABLE_CHECK
Quoted 6 lines · Marek Vasut
Quoted 5 lines · Stephen Warren
From: Stephen Warren <[email protected]>
Not all boards support
usb_cable_connected().CONFIG_USB_CABLE_CHECKis used elsewhere to indicate whether a board does support that function. Enhancecmd_usb_mass_storage.cto honor that config variable.
...
Quoted 4 lines
Please look at:
[PATCH v5 03/12] usb: dfu: fix boards wo USB cable detectionDoes this work for you instead ?
Yes, it does. Please consider that patch,