diff --git a/common/cmd_usb_mass_storage.c b/common/cmd_usb_mass_storage.c
index 99487f4d0f686a6db2bc4c87caf0282941fd1a00..5f557d5f857df2916cc5f818abbd8ac1b5e08b1c 100644
--- a/common/cmd_usb_mass_storage.c
+++ b/common/cmd_usb_mass_storage.c
@@ -42,6 +42,30 @@ int do_usb_mass_storage(cmd_tbl_t *cmdtp, int flag,
 
 	g_dnl_register("ums");
 
+	/* Timeout unit: seconds */
+	int cable_ready_timeout = UMS_CABLE_READY_TIMEOUT;
+
+	if (!usb_cable_connected()) {
+		puts("Please connect USB cable.\n");
+
+		while (!usb_cable_connected()) {
+			if (ctrlc()) {
+				puts("\rCTRL+C - Operation aborted.\n");
+				goto exit;
+			}
+			if (!cable_ready_timeout) {
+				puts("\rUSB cable not detected.\n" \
+				     "Command exit.\n");
+				goto exit;
+			}
+
+			printf("\rAuto exit in: %.2d s.", cable_ready_timeout);
+			mdelay(1000);
+			cable_ready_timeout--;
+		}
+		puts("\r\n");
+	}
+
 	while (1) {
 		usb_gadget_handle_interrupts();
 
diff --git a/include/usb_mass_storage.h b/include/usb_mass_storage.h
index 9df3adcf2a8e042bcc3b953c0f357a9c5945d9d5..058dcf11740423569c13a4cd8e5957aa09afb0fd 100644
--- a/include/usb_mass_storage.h
+++ b/include/usb_mass_storage.h
@@ -20,6 +20,9 @@
 #define UMS_NUM_SECTORS		0
 #endif
 
+/* Wait at maximum 60 seconds for cable connection */
+#define UMS_CABLE_READY_TIMEOUT	60
+
 struct ums {
 	int (*read_sector)(struct ums *ums_dev,
 			   ulong start, lbaint_t blkcnt, void *buf);