void usbip_dump_urb (struct urb *purb) { if (!purb) { printk(" dump urb: null pointer!!\n"); return; } printk(" urb :%p\n", purb); printk(" dev :%p\n", purb->dev); usbip_dump_usb_device(purb->dev); printk(" pipe :%08x ", purb->pipe); usbip_dump_pipe(purb->pipe); printk(" status :%d\n", purb->status); printk(" transfer_flags :%08X\n", purb->transfer_flags); printk(" transfer_buffer :%p\n", purb->transfer_buffer); printk(" transfer_buffer_length:%d\n", purb->transfer_buffer_length); printk(" actual_length :%d\n", purb->actual_length); printk(" setup_packet :%p\n", purb->setup_packet); if (purb->setup_packet && usb_pipetype(purb->pipe) == PIPE_CONTROL) usbip_dump_usb_ctrlrequest((struct usb_ctrlrequest *) purb->setup_packet); printk(" start_frame :%d\n", purb->start_frame); printk(" number_of_packets :%d\n", purb->number_of_packets); printk(" interval :%d\n", purb->interval); printk(" error_count :%d\n", purb->error_count); printk(" context :%p\n", purb->context); printk(" complete :%p\n", purb->complete); }
void usbip_dump_urb(struct urb *urb) { struct device *dev; if (!urb) { printk(KERN_DEBUG KBUILD_MODNAME ":%s: urb: null pointer!!\n", __func__); return; } if (!urb->dev) { printk(KERN_DEBUG KBUILD_MODNAME ":%s: urb->dev: null pointer!!\n", __func__); return; } dev = &urb->dev->dev; dev_dbg(dev, " urb :%p\n", urb); dev_dbg(dev, " dev :%p\n", urb->dev); usbip_dump_usb_device(urb->dev); dev_dbg(dev, " pipe :%08x ", urb->pipe); usbip_dump_pipe(urb->pipe); dev_dbg(dev, " status :%d\n", urb->status); dev_dbg(dev, " transfer_flags :%08X\n", urb->transfer_flags); dev_dbg(dev, " transfer_buffer :%p\n", urb->transfer_buffer); dev_dbg(dev, " transfer_buffer_length:%d\n", urb->transfer_buffer_length); dev_dbg(dev, " actual_length :%d\n", urb->actual_length); dev_dbg(dev, " setup_packet :%p\n", urb->setup_packet); if (urb->setup_packet && usb_pipetype(urb->pipe) == PIPE_CONTROL) usbip_dump_usb_ctrlrequest( (struct usb_ctrlrequest *)urb->setup_packet); dev_dbg(dev, " start_frame :%d\n", urb->start_frame); dev_dbg(dev, " number_of_packets :%d\n", urb->number_of_packets); dev_dbg(dev, " interval :%d\n", urb->interval); dev_dbg(dev, " error_count :%d\n", urb->error_count); dev_dbg(dev, " context :%p\n", urb->context); dev_dbg(dev, " complete :%p\n", urb->complete); }
void usbip_dump_header(struct usbip_header *pdu) { udbg("BASE: cmd %u bus %u dev %u seq %u pipe %04x\n", pdu->base.command, pdu->base.busnum, pdu->base.devnum, pdu->base.seqnum, pdu->base.pipe); usbip_dump_pipe(pdu->base.pipe); switch(pdu->base.command) { case USBIP_CMD_SUBMIT: udbg("CMD_SUBMIT: x_flags %u x_len %u bw %u sf %u #p %u iv %u\n", pdu->u.cmd_submit.transfer_flags, pdu->u.cmd_submit.transfer_buffer_length, pdu->u.cmd_submit.bandwidth, pdu->u.cmd_submit.start_frame, pdu->u.cmd_submit.number_of_packets, pdu->u.cmd_submit.interval); break; case USBIP_CMD_UNLINK: udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum); break; case USBIP_RET_SUBMIT: udbg("RET_SUBMIT: st %d al %u bw %u sf %d ec %d\n", pdu->u.ret_submit.status, pdu->u.ret_submit.actual_length, pdu->u.ret_submit.bandwidth, pdu->u.ret_submit.start_frame, pdu->u.ret_submit.error_count); case USBIP_RET_UNLINK: udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status); break; default: /* NOT REACHED */ udbg("UNKNOWN\n"); } }
void usbip_dump_urb(struct urb *urb) { struct device *dev; if (!urb) { pr_debug("urb: null pointer!!\n"); return; } if (!urb->dev) { pr_debug("urb->dev: null pointer!!\n"); return; } dev = &urb->dev->dev; usbip_dump_usb_device(urb->dev); dev_dbg(dev, " pipe :%08x ", urb->pipe); usbip_dump_pipe(urb->pipe); dev_dbg(dev, " status :%d\n", urb->status); dev_dbg(dev, " transfer_flags :%08X\n", urb->transfer_flags); dev_dbg(dev, " transfer_buffer_length:%d\n", urb->transfer_buffer_length); dev_dbg(dev, " actual_length :%d\n", urb->actual_length); if (urb->setup_packet && usb_pipetype(urb->pipe) == PIPE_CONTROL) usbip_dump_usb_ctrlrequest( (struct usb_ctrlrequest *)urb->setup_packet); dev_dbg(dev, " start_frame :%d\n", urb->start_frame); dev_dbg(dev, " number_of_packets :%d\n", urb->number_of_packets); dev_dbg(dev, " interval :%d\n", urb->interval); dev_dbg(dev, " error_count :%d\n", urb->error_count); }