summaryrefslogtreecommitdiff
path: root/firmware/usbstack
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2013-07-24 22:40:12 +0200
committerMarcin Bukat <marcin.bukat@gmail.com>2013-07-24 23:17:13 +0200
commit49bcf3530962c40857c510af431968960ba4bdc6 (patch)
tree3252899639947412447a5ffb4cfeccc6dec94bf4 /firmware/usbstack
parent074e911859a0d3464fde9b701b3cff712c5826e0 (diff)
usb stack: add more verbose debug logf()s
Change-Id: I087aefd2854978813c7e4ed7ef7da400f3692e39
Diffstat (limited to 'firmware/usbstack')
-rw-r--r--firmware/usbstack/usb_core.c8
-rw-r--r--firmware/usbstack/usb_storage.c1
2 files changed, 7 insertions, 2 deletions
diff --git a/firmware/usbstack/usb_core.c b/firmware/usbstack/usb_core.c
index cc41e8b892..130111cdfe 100644
--- a/firmware/usbstack/usb_core.c
+++ b/firmware/usbstack/usb_core.c
@@ -440,7 +440,10 @@ void usb_core_handle_transfer_completion(
switch(ep) {
case EP_CONTROL:
- logf("ctrl handled %ld",current_tick);
+ logf("ctrl handled %ld req=0x%x",
+ current_tick,
+ ((struct usb_ctrlrequest*)event->data)->bRequest);
+
usb_core_control_request_handler(
(struct usb_ctrlrequest*)event->data);
break;
@@ -825,6 +828,7 @@ static void request_handler_endpoint_standard(struct usb_ctrlrequest* req)
usb_drv_send(EP_CONTROL, NULL, 0);
break;
case USB_REQ_SET_FEATURE:
+ logf("usb_core: SET FEATURE (%d)", req->wValue);
if(req->wValue == USB_ENDPOINT_HALT)
usb_drv_stall(EP_NUM(req->wIndex), true, EP_DIR(req->wIndex));
@@ -959,7 +963,7 @@ void usb_core_control_request(struct usb_ctrlrequest* req)
completion_event->data = (void*)req;
completion_event->status = 0;
completion_event->length = 0;
- logf("ctrl received %ld", current_tick);
+ logf("ctrl received %ld, req=0x%x", current_tick, req->bRequest);
usb_signal_transfer_completion(completion_event);
}
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c
index 85a0e2b843..c51b0faa4c 100644
--- a/firmware/usbstack/usb_storage.c
+++ b/firmware/usbstack/usb_storage.c
@@ -753,6 +753,7 @@ static void handle_scsi(struct command_block_wrapper* cbw)
unsigned int block_size_mult = 1;
if(letoh32(cbw->signature) != CBW_SIGNATURE) {
+ logf("ums: bad cbw signature (%x)", cbw->signature);
usb_drv_stall(ep_in, true,true);
usb_drv_stall(ep_out, true,false);
return;