diff options
Diffstat (limited to 'drivers/staging/usbip/stub_rx.c')
-rw-r--r-- | drivers/staging/usbip/stub_rx.c | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/drivers/staging/usbip/stub_rx.c b/drivers/staging/usbip/stub_rx.c index 1c710628df0..815fb7cc3b2 100644 --- a/drivers/staging/usbip/stub_rx.c +++ b/drivers/staging/usbip/stub_rx.c @@ -65,8 +65,8 @@ static int is_reset_device_cmd(struct urb *urb) if ((req->bRequest == USB_REQ_SET_FEATURE) && (req->bRequestType == USB_RT_PORT) && - (value = USB_PORT_FEAT_RESET)) { - dbg_stub_rx("reset_device_cmd, port %u\n", index); + (value == USB_PORT_FEAT_RESET)) { + usbip_dbg_stub_rx("reset_device_cmd, port %u\n", index); return 1; } else return 0; @@ -99,11 +99,11 @@ static int tweak_clear_halt_cmd(struct urb *urb) ret = usb_clear_halt(urb->dev, target_pipe); if (ret < 0) - uinfo("clear_halt error: devnum %d endp %d, %d\n", - urb->dev->devnum, target_endp, ret); + usbip_uinfo("clear_halt error: devnum %d endp %d, %d\n", + urb->dev->devnum, target_endp, ret); else - uinfo("clear_halt done: devnum %d endp %d\n", - urb->dev->devnum, target_endp); + usbip_uinfo("clear_halt done: devnum %d endp %d\n", + urb->dev->devnum, target_endp); return ret; } @@ -119,14 +119,15 @@ static int tweak_set_interface_cmd(struct urb *urb) alternate = le16_to_cpu(req->wValue); interface = le16_to_cpu(req->wIndex); - dbg_stub_rx("set_interface: inf %u alt %u\n", interface, alternate); + usbip_dbg_stub_rx("set_interface: inf %u alt %u\n", interface, + alternate); ret = usb_set_interface(urb->dev, interface, alternate); if (ret < 0) - uinfo("set_interface error: inf %u alt %u, %d\n", - interface, alternate, ret); + usbip_uinfo("set_interface error: inf %u alt %u, %d\n", + interface, alternate, ret); else - uinfo("set_interface done: inf %u alt %u\n", + usbip_uinfo("set_interface done: inf %u alt %u\n", interface, alternate); @@ -157,8 +158,9 @@ static int tweak_set_configuration_cmd(struct urb *urb) * A user may need to set a special configuration value before * exporting the device. */ - uinfo("set_configuration (%d) to %s\n", config, dev_name(&urb->dev->dev)); - uinfo("but, skip!\n"); + usbip_uinfo("set_configuration (%d) to %s\n", config, + dev_name(&urb->dev->dev)); + usbip_uinfo("but, skip!\n"); return 0; /* return usb_driver_set_configuration(urb->dev, config); */ @@ -175,7 +177,8 @@ static int tweak_reset_device_cmd(struct urb *urb) value = le16_to_cpu(req->wValue); index = le16_to_cpu(req->wIndex); - uinfo("reset_device (port %d) to %s\n", index, dev_name(&urb->dev->dev)); + usbip_uinfo("reset_device (port %d) to %s\n", index, + dev_name(&urb->dev->dev)); /* all interfaces should be owned by usbip driver, so just reset it. */ ret = usb_lock_device_for_reset(urb->dev, NULL); @@ -220,7 +223,7 @@ static void tweak_special_requests(struct urb *urb) else if (is_reset_device_cmd(urb)) tweak_reset_device_cmd(urb); else - dbg_stub_rx("no need to tweak\n"); + usbip_dbg_stub_rx("no need to tweak\n"); } /* @@ -292,7 +295,8 @@ static int stub_recv_cmd_unlink(struct stub_device *sdev, } } - dbg_stub_rx("seqnum %d is not pending\n", pdu->u.cmd_unlink.seqnum); + usbip_dbg_stub_rx("seqnum %d is not pending\n", + pdu->u.cmd_unlink.seqnum); /* * The urb of the unlink target is not found in priv_init queue. It was @@ -383,7 +387,7 @@ static struct usb_host_endpoint *get_ep_from_epnum(struct usb_device *udev, epnum = (ep->desc.bEndpointAddress & 0x7f); if (epnum == epnum0) { - /* uinfo("found epnum %d\n", epnum0); */ + /* usbip_uinfo("found epnum %d\n", epnum0);*/ found = 1; break; } @@ -526,7 +530,8 @@ static void stub_recv_cmd_submit(struct stub_device *sdev, ret = usb_submit_urb(priv->urb, GFP_KERNEL); if (ret == 0) - dbg_stub_rx("submit urb ok, seqnum %u\n", pdu->base.seqnum); + usbip_dbg_stub_rx("submit urb ok, seqnum %u\n", + pdu->base.seqnum); else { dev_err(&sdev->interface->dev, "submit_urb error, %d\n", ret); usbip_dump_header(pdu); @@ -539,7 +544,7 @@ static void stub_recv_cmd_submit(struct stub_device *sdev, usbip_event_add(ud, SDEV_EVENT_ERROR_SUBMIT); } - dbg_stub_rx("Leave\n"); + usbip_dbg_stub_rx("Leave\n"); return; } @@ -551,7 +556,7 @@ static void stub_rx_pdu(struct usbip_device *ud) struct stub_device *sdev = container_of(ud, struct stub_device, ud); struct device *dev = &sdev->interface->dev; - dbg_stub_rx("Enter\n"); + usbip_dbg_stub_rx("Enter\n"); memset(&pdu, 0, sizeof(pdu)); @@ -565,7 +570,7 @@ static void stub_rx_pdu(struct usbip_device *ud) usbip_header_correct_endian(&pdu, 0); - if (dbg_flag_stub_rx) + if (usbip_dbg_flag_stub_rx) usbip_dump_header(&pdu); if (!valid_request(sdev, &pdu)) { @@ -598,11 +603,11 @@ void stub_rx_loop(struct usbip_task *ut) while (1) { if (signal_pending(current)) { - dbg_stub_rx("signal caught!\n"); + usbip_dbg_stub_rx("signal caught!\n"); break; } - if (usbip_event_happend(ud)) + if (usbip_event_happened(ud)) break; stub_rx_pdu(ud); |