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;
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;
}
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);
* 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); */
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);
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");
}
/*
}
}
- 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
epnum = (ep->desc.bEndpointAddress & 0x7f);
if (epnum == epnum0) {
- /* uinfo("found epnum %d\n", epnum0); */
+ /* usbip_uinfo("found epnum %d\n", epnum0);*/
found = 1;
break;
}
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);
usbip_event_add(ud, SDEV_EVENT_ERROR_SUBMIT);
}
- dbg_stub_rx("Leave\n");
+ usbip_dbg_stub_rx("Leave\n");
return;
}
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));
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)) {
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);