Skip to contentSkip to conversation

ums: respect CONFIG_USB_CABLE_CHECK

PATCH New Stephen Warren 2 participants 3 messages Apr 30, 2014 – May 1, 2014

lore
Share & tools
lore
#0 lore raw

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.

Cc Przemyslaw Marczak <[email protected]>
Cc Lukasz Majewski <[email protected]>
---
 common/cmd_usb_mass_storage.c | 2 ++
 1 file changed, 2 insertions(+)
common/cmd_usb_mass_storage.c +2 -0
index 5f557d5f857d..2f69a53acc67 100644
@@ -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
#1 lore raw

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_CHECK is used elsewhere to indicate whether a board does support that function. Enhance cmd_usb_mass_storage.c to honor that config variable.

Cc Przemyslaw Marczak <[email protected]>
Cc Lukasz Majewski <[email protected]>
---
 common/cmd_usb_mass_storage.c | 2 ++
 1 file changed, 2 insertions(+)
common/cmd_usb_mass_storage.c +1 -0
index 5f557d5f857d..2f69a53acc67 100644
@@ -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

#2 lore raw

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_CHECK is used elsewhere to indicate whether a board does support that function. Enhance cmd_usb_mass_storage.c to honor that config variable.

...

Quoted 4 lines

Please look at:
[PATCH v5 03/12] usb: dfu: fix boards wo USB cable detection

Does this work for you instead ?

Yes, it does. Please consider that patch,