usb-dev: remove commented-out printf statements
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
c92af747cd
commit
2b0575889f
@ -18,8 +18,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
uint32_t datalen = 0;
|
uint32_t datalen = 0;
|
||||||
const usb_descriptor_list_t *list;
|
const usb_descriptor_list_t *list;
|
||||||
|
|
||||||
// printf("%s:%d SETUP packet (%04x) value: %02x index: %02x\n", __FILE__, __LINE__, setup->wRequestAndType, setup->wIndex, setup->wValue);
|
|
||||||
|
|
||||||
switch (setup->wRequestAndType)
|
switch (setup->wRequestAndType)
|
||||||
{
|
{
|
||||||
case 0x0500: // SET_ADDRESS
|
case 0x0500: // SET_ADDRESS
|
||||||
@ -46,7 +44,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
case 0x0082: // GET_STATUS (endpoint)
|
case 0x0082: // GET_STATUS (endpoint)
|
||||||
if (setup->wIndex > 0)
|
if (setup->wIndex > 0)
|
||||||
{
|
{
|
||||||
// printf("get_status (setup->wIndex: %d)\n", setup->wIndex);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -64,7 +61,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
if (setup->wIndex > 0 || setup->wValue != 0)
|
if (setup->wIndex > 0 || setup->wValue != 0)
|
||||||
{
|
{
|
||||||
// TODO: do we need to handle IN vs OUT here?
|
// TODO: do we need to handle IN vs OUT here?
|
||||||
// printf("%s:%d clear feature (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -77,7 +73,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
if (setup->wIndex > 0 || setup->wValue != 0)
|
if (setup->wIndex > 0 || setup->wValue != 0)
|
||||||
{
|
{
|
||||||
// TODO: do we need to handle IN vs OUT here?
|
// TODO: do we need to handle IN vs OUT here?
|
||||||
// printf("%s:%d clear feature (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -109,10 +104,9 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
goto send;
|
goto send;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// printf("%s:%d couldn't find descriptor %04x (%d / %d)\n", __FILE__, __LINE__, setup->wValue, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
#if 1
|
|
||||||
case (MSFT_VENDOR_CODE << 8) | 0xC0: // Get Microsoft descriptor
|
case (MSFT_VENDOR_CODE << 8) | 0xC0: // Get Microsoft descriptor
|
||||||
case (MSFT_VENDOR_CODE << 8) | 0xC1:
|
case (MSFT_VENDOR_CODE << 8) | 0xC1:
|
||||||
if (setup->wIndex == 0x0004)
|
if (setup->wIndex == 0x0004)
|
||||||
@ -122,7 +116,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
datalen = MSFT_WCID_LEN;
|
datalen = MSFT_WCID_LEN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// printf("%s:%d couldn't find microsoft descriptor (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -140,12 +133,10 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
// printf("%s:%d couldn't find webusb descriptor (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
// printf("%s:%d couldn't find webusb descriptor (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
#endif
|
|
||||||
|
|
||||||
case 0x0121: // DFU_DNLOAD
|
case 0x0121: // DFU_DNLOAD
|
||||||
if (setup->wIndex > 0)
|
if (setup->wIndex > 0)
|
||||||
{
|
{
|
||||||
// printf("%s:%d dfu download descriptor index invalid (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -203,7 +194,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
case 0x03a1: // DFU_GETSTATUS
|
case 0x03a1: // DFU_GETSTATUS
|
||||||
if (setup->wIndex > 0)
|
if (setup->wIndex > 0)
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -215,7 +205,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -224,7 +213,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
case 0x0421: // DFU_CLRSTATUS
|
case 0x0421: // DFU_CLRSTATUS
|
||||||
if (setup->wIndex > 0)
|
if (setup->wIndex > 0)
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -234,7 +222,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -242,7 +229,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
case 0x05a1: // DFU_GETSTATE
|
case 0x05a1: // DFU_GETSTATE
|
||||||
if (setup->wIndex > 0)
|
if (setup->wIndex > 0)
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -254,7 +240,6 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
case 0x0621: // DFU_ABORT
|
case 0x0621: // DFU_ABORT
|
||||||
if (setup->wIndex > 0)
|
if (setup->wIndex > 0)
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -264,13 +249,11 @@ void usb_setup(struct usb_device *dev, const struct usb_setup_request *setup)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// printf("%s:%d err (%d / %d)\n", __FILE__, __LINE__, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// printf("%s:%d unrecognized request type (%04x) value: %02x index: %02x\n", __FILE__, __LINE__, setup->wRequestAndType, setup->wIndex, setup->wValue);
|
|
||||||
usb_err(dev, 0);
|
usb_err(dev, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user