2 * Copyright (C) 2003-2008 Takahiro Hirofuchi
4 * This is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20 #include <linux/kernel.h>
21 #include <linux/file.h>
22 #include <linux/tcp.h>
24 #include "usbip_common.h"
26 /* version information */
27 #define DRIVER_VERSION "1.0"
28 #define DRIVER_AUTHOR "Takahiro Hirofuchi <hirofuchi _at_ users.sourceforge.net>"
29 #define DRIVER_DESC "usbip common driver"
31 /*-------------------------------------------------------------------------*/
34 #ifdef CONFIG_USB_DEBUG
35 unsigned long usbip_debug_flag = 0xffffffff;
37 unsigned long usbip_debug_flag;
39 EXPORT_SYMBOL_GPL(usbip_debug_flag);
43 struct device_attribute dev_attr_usbip_debug;
44 EXPORT_SYMBOL_GPL(dev_attr_usbip_debug);
47 static ssize_t show_flag(struct device *dev, struct device_attribute *attr,
50 return sprintf(buf, "%lx\n", usbip_debug_flag);
53 static ssize_t store_flag(struct device *dev, struct device_attribute *attr,
54 const char *buf, size_t count)
58 sscanf(buf, "%lx", &flag);
59 usbip_debug_flag = flag;
63 DEVICE_ATTR(usbip_debug, (S_IRUGO | S_IWUSR), show_flag, store_flag);
65 static void usbip_dump_buffer(char *buff, int bufflen)
70 for (i = 0; i < 128; i++) {
73 printk("%02x ", (unsigned char) buff[i]);
79 printk("... (%d byte)\n", bufflen);
83 for (i = 0; i < bufflen; i++) {
86 printk("%02x ", (unsigned char) buff[i]);
96 static void usbip_dump_pipe(unsigned int p)
98 unsigned char type = usb_pipetype(p);
99 unsigned char ep = usb_pipeendpoint(p);
100 unsigned char dev = usb_pipedevice(p);
101 unsigned char dir = usb_pipein(p);
103 printk("dev(%d) ", dev);
104 printk("ep(%d) ", ep);
105 printk("%s ", dir ? "IN" : "OUT");
108 case PIPE_ISOCHRONOUS:
109 printk("%s ", "ISO");
112 printk("%s ", "INT");
115 printk("%s ", "CTL");
118 printk("%s ", "BLK");
128 static void usbip_dump_usb_device(struct usb_device *udev)
130 struct device *dev = &udev->dev;
133 dev_dbg(dev, " devnum(%d) devpath(%s)",
134 udev->devnum, udev->devpath);
136 switch (udev->speed) {
146 case USB_SPEED_UNKNOWN:
147 printk(" SPD_UNKNOWN");
150 printk(" SPD_ERROR");
153 printk(" tt %p, ttport %d", udev->tt, udev->ttport);
157 for (i = 0; i < 16; i++)
161 dev_dbg(dev, " toggle0(IN) :");
162 for (i = 0; i < 16; i++)
163 printk(" %2u", (udev->toggle[0] & (1 << i)) ? 1 : 0);
166 dev_dbg(dev, " toggle1(OUT):");
167 for (i = 0; i < 16; i++)
168 printk(" %2u", (udev->toggle[1] & (1 << i)) ? 1 : 0);
172 dev_dbg(dev, " epmaxp_in :");
173 for (i = 0; i < 16; i++) {
176 le16_to_cpu(udev->ep_in[i]->desc.wMaxPacketSize));
180 dev_dbg(dev, " epmaxp_out :");
181 for (i = 0; i < 16; i++) {
184 le16_to_cpu(udev->ep_out[i]->desc.wMaxPacketSize));
188 dev_dbg(dev, "parent %p, bus %p\n", udev->parent, udev->bus);
190 dev_dbg(dev, "descriptor %p, config %p, actconfig %p, "
191 "rawdescriptors %p\n", &udev->descriptor, udev->config,
192 udev->actconfig, udev->rawdescriptors);
194 dev_dbg(dev, "have_langid %d, string_langid %d\n",
195 udev->have_langid, udev->string_langid);
197 dev_dbg(dev, "maxchild %d, children %p\n",
198 udev->maxchild, udev->children);
201 static void usbip_dump_request_type(__u8 rt)
203 switch (rt & USB_RECIP_MASK) {
204 case USB_RECIP_DEVICE:
207 case USB_RECIP_INTERFACE:
210 case USB_RECIP_ENDPOINT:
213 case USB_RECIP_OTHER:
221 static void usbip_dump_usb_ctrlrequest(struct usb_ctrlrequest *cmd)
224 printk(" %s : null pointer\n", __func__);
229 printk("bRequestType(%02X) ", cmd->bRequestType);
230 printk("bRequest(%02X) " , cmd->bRequest);
231 printk("wValue(%04X) ", cmd->wValue);
232 printk("wIndex(%04X) ", cmd->wIndex);
233 printk("wLength(%04X) ", cmd->wLength);
237 if ((cmd->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
239 switch (cmd->bRequest) {
240 case USB_REQ_GET_STATUS:
241 printk("GET_STATUS");
243 case USB_REQ_CLEAR_FEATURE:
244 printk("CLEAR_FEAT");
246 case USB_REQ_SET_FEATURE:
249 case USB_REQ_SET_ADDRESS:
250 printk("SET_ADDRRS");
252 case USB_REQ_GET_DESCRIPTOR:
253 printk("GET_DESCRI");
255 case USB_REQ_SET_DESCRIPTOR:
256 printk("SET_DESCRI");
258 case USB_REQ_GET_CONFIGURATION:
259 printk("GET_CONFIG");
261 case USB_REQ_SET_CONFIGURATION:
262 printk("SET_CONFIG");
264 case USB_REQ_GET_INTERFACE:
265 printk("GET_INTERF");
267 case USB_REQ_SET_INTERFACE:
268 printk("SET_INTERF");
270 case USB_REQ_SYNCH_FRAME:
271 printk("SYNC_FRAME");
274 printk("REQ(%02X) ", cmd->bRequest);
278 usbip_dump_request_type(cmd->bRequestType);
280 } else if ((cmd->bRequestType & USB_TYPE_MASK) == USB_TYPE_CLASS)
283 else if ((cmd->bRequestType & USB_TYPE_MASK) == USB_TYPE_VENDOR)
286 else if ((cmd->bRequestType & USB_TYPE_MASK) == USB_TYPE_RESERVED)
292 void usbip_dump_urb(struct urb *urb)
297 printk(KERN_DEBUG KBUILD_MODNAME
298 ":%s: urb: null pointer!!\n", __func__);
303 printk(KERN_DEBUG KBUILD_MODNAME
304 ":%s: urb->dev: null pointer!!\n", __func__);
307 dev = &urb->dev->dev;
309 dev_dbg(dev, " urb :%p\n", urb);
310 dev_dbg(dev, " dev :%p\n", urb->dev);
312 usbip_dump_usb_device(urb->dev);
314 dev_dbg(dev, " pipe :%08x ", urb->pipe);
316 usbip_dump_pipe(urb->pipe);
318 dev_dbg(dev, " status :%d\n", urb->status);
319 dev_dbg(dev, " transfer_flags :%08X\n", urb->transfer_flags);
320 dev_dbg(dev, " transfer_buffer :%p\n", urb->transfer_buffer);
321 dev_dbg(dev, " transfer_buffer_length:%d\n", urb->transfer_buffer_length);
322 dev_dbg(dev, " actual_length :%d\n", urb->actual_length);
323 dev_dbg(dev, " setup_packet :%p\n", urb->setup_packet);
325 if (urb->setup_packet && usb_pipetype(urb->pipe) == PIPE_CONTROL)
326 usbip_dump_usb_ctrlrequest(
327 (struct usb_ctrlrequest *)urb->setup_packet);
329 dev_dbg(dev, " start_frame :%d\n", urb->start_frame);
330 dev_dbg(dev, " number_of_packets :%d\n", urb->number_of_packets);
331 dev_dbg(dev, " interval :%d\n", urb->interval);
332 dev_dbg(dev, " error_count :%d\n", urb->error_count);
333 dev_dbg(dev, " context :%p\n", urb->context);
334 dev_dbg(dev, " complete :%p\n", urb->complete);
336 EXPORT_SYMBOL_GPL(usbip_dump_urb);
338 void usbip_dump_header(struct usbip_header *pdu)
340 udbg("BASE: cmd %u seq %u devid %u dir %u ep %u\n",
347 switch (pdu->base.command) {
348 case USBIP_CMD_SUBMIT:
349 udbg("CMD_SUBMIT: x_flags %u x_len %u sf %u #p %u iv %u\n",
350 pdu->u.cmd_submit.transfer_flags,
351 pdu->u.cmd_submit.transfer_buffer_length,
352 pdu->u.cmd_submit.start_frame,
353 pdu->u.cmd_submit.number_of_packets,
354 pdu->u.cmd_submit.interval);
356 case USBIP_CMD_UNLINK:
357 udbg("CMD_UNLINK: seq %u\n", pdu->u.cmd_unlink.seqnum);
359 case USBIP_RET_SUBMIT:
360 udbg("RET_SUBMIT: st %d al %u sf %d ec %d\n",
361 pdu->u.ret_submit.status,
362 pdu->u.ret_submit.actual_length,
363 pdu->u.ret_submit.start_frame,
364 pdu->u.ret_submit.error_count);
365 case USBIP_RET_UNLINK:
366 udbg("RET_UNLINK: status %d\n", pdu->u.ret_unlink.status);
373 EXPORT_SYMBOL_GPL(usbip_dump_header);
376 /*-------------------------------------------------------------------------*/
377 /* thread routines */
379 int usbip_thread(void *param)
381 struct usbip_task *ut = param;
388 allow_signal(SIGKILL);
389 ut->thread = current;
392 /* srv.rb must wait for rx_thread starting */
393 complete(&ut->thread_done);
395 /* start of while loop */
401 complete_and_exit(&ut->thread_done, 0);
404 void usbip_start_threads(struct usbip_device *ud)
407 * threads are invoked per one device (per one connection).
411 retval = kernel_thread(usbip_thread, (void *)&ud->tcp_rx, 0);
413 printk(KERN_ERR "Creating tcp_rx thread for ud %p failed.\n",
417 retval = kernel_thread(usbip_thread, (void *)&ud->tcp_tx, 0);
419 printk(KERN_ERR "Creating tcp_tx thread for ud %p failed.\n",
424 /* confirm threads are starting */
425 wait_for_completion(&ud->tcp_rx.thread_done);
426 wait_for_completion(&ud->tcp_tx.thread_done);
428 EXPORT_SYMBOL_GPL(usbip_start_threads);
430 void usbip_stop_threads(struct usbip_device *ud)
432 /* kill threads related to this sdev, if v.c. exists */
433 if (ud->tcp_rx.thread != NULL) {
434 send_sig(SIGKILL, ud->tcp_rx.thread, 1);
435 wait_for_completion(&ud->tcp_rx.thread_done);
436 udbg("rx_thread for ud %p has finished\n", ud);
439 if (ud->tcp_tx.thread != NULL) {
440 send_sig(SIGKILL, ud->tcp_tx.thread, 1);
441 wait_for_completion(&ud->tcp_tx.thread_done);
442 udbg("tx_thread for ud %p has finished\n", ud);
445 EXPORT_SYMBOL_GPL(usbip_stop_threads);
447 void usbip_task_init(struct usbip_task *ut, char *name,
448 void (*loop_ops)(struct usbip_task *))
451 init_completion(&ut->thread_done);
453 ut->loop_ops = loop_ops;
455 EXPORT_SYMBOL_GPL(usbip_task_init);
458 /*-------------------------------------------------------------------------*/
459 /* socket routines */
461 /* Send/receive messages over TCP/IP. I refer drivers/block/nbd.c */
462 int usbip_xmit(int send, struct socket *sock, char *buf,
463 int size, int msg_flags)
470 /* for blocks of if (dbg_flag_xmit) */
476 if (!sock || !buf || !size) {
477 printk(KERN_ERR "%s: invalid arg, sock %p buff %p size %d\n",
478 __func__, sock, buf, size);
486 printk(KERN_DEBUG "%-10s:", current->comm);
488 printk(KERN_DEBUG "interupt :");
490 printk("%s: sending... , sock %p, buf %p, "
491 "size %d, msg_flags %d\n", __func__,
492 sock, buf, size, msg_flags);
493 usbip_dump_buffer(buf, size);
499 sock->sk->sk_allocation = GFP_NOIO;
504 msg.msg_control = NULL;
505 msg.msg_controllen = 0;
507 msg.msg_flags = msg_flags | MSG_NOSIGNAL;
510 result = kernel_sendmsg(sock, &msg, &iov, 1, size);
512 result = kernel_recvmsg(sock, &msg, &iov, 1, size,
516 udbg("usbip_xmit: %s sock %p buf %p size %u ret %d"
518 send ? "send" : "receive", sock, buf,
519 size, result, total);
533 printk(KERN_DEBUG "%-10s:", current->comm);
535 printk(KERN_DEBUG "interupt :");
537 printk("usbip_xmit: receiving....\n");
538 usbip_dump_buffer(bp, osize);
539 printk("usbip_xmit: received, osize %d ret %d size %d "
540 "total %d\n", osize, result, size,
545 printk("usbip_xmit: send, total %d\n", total);
553 EXPORT_SYMBOL_GPL(usbip_xmit);
556 /* now a usrland utility should set options. */
558 int setquickack(struct socket *socket)
566 ret = socket->ops->setsockopt(socket, SOL_TCP, TCP_QUICKACK,
567 (char __user *) &val, sizeof(ret));
573 int setnodelay(struct socket *socket)
581 ret = socket->ops->setsockopt(socket, SOL_TCP, TCP_NODELAY,
582 (char __user *) &val, sizeof(ret));
588 int setkeepalive(struct socket *socket)
596 ret = socket->ops->setsockopt(socket, SOL_SOCKET, SO_KEEPALIVE,
597 (char __user *) &val, sizeof(ret));
603 void setreuse(struct socket *socket)
605 socket->sk->sk_reuse = 1;
609 struct socket *sockfd_to_socket(unsigned int sockfd)
611 struct socket *socket;
617 printk(KERN_ERR "%s: invalid sockfd\n", __func__);
621 inode = file->f_dentry->d_inode;
623 if (!inode || !S_ISSOCK(inode->i_mode))
626 socket = SOCKET_I(inode);
630 EXPORT_SYMBOL_GPL(sockfd_to_socket);
634 /*-------------------------------------------------------------------------*/
637 /* there may be more cases to tweak the flags. */
638 static unsigned int tweak_transfer_flags(unsigned int flags)
641 if (flags & URB_NO_TRANSFER_DMA_MAP)
643 * vhci_hcd does not provide DMA-mapped I/O. The upper
644 * driver does not need to set this flag. The remote
645 * usbip.ko does not still perform DMA-mapped I/O for
646 * DMA-caplable host controllers. So, clear this flag.
648 flags &= ~URB_NO_TRANSFER_DMA_MAP;
650 if (flags & URB_NO_SETUP_DMA_MAP)
651 flags &= ~URB_NO_SETUP_DMA_MAP;
656 static void usbip_pack_cmd_submit(struct usbip_header *pdu, struct urb *urb,
659 struct usbip_header_cmd_submit *spdu = &pdu->u.cmd_submit;
662 * Some members are not still implemented in usbip. I hope this issue
663 * will be discussed when usbip is ported to other operating systems.
667 spdu->transfer_flags =
668 tweak_transfer_flags(urb->transfer_flags);
669 spdu->transfer_buffer_length = urb->transfer_buffer_length;
670 spdu->start_frame = urb->start_frame;
671 spdu->number_of_packets = urb->number_of_packets;
672 spdu->interval = urb->interval;
675 urb->transfer_flags = spdu->transfer_flags;
677 urb->transfer_buffer_length = spdu->transfer_buffer_length;
678 urb->start_frame = spdu->start_frame;
679 urb->number_of_packets = spdu->number_of_packets;
680 urb->interval = spdu->interval;
684 static void usbip_pack_ret_submit(struct usbip_header *pdu, struct urb *urb,
687 struct usbip_header_ret_submit *rpdu = &pdu->u.ret_submit;
692 rpdu->status = urb->status;
693 rpdu->actual_length = urb->actual_length;
694 rpdu->start_frame = urb->start_frame;
695 rpdu->error_count = urb->error_count;
699 urb->status = rpdu->status;
700 urb->actual_length = rpdu->actual_length;
701 urb->start_frame = rpdu->start_frame;
702 urb->error_count = rpdu->error_count;
707 void usbip_pack_pdu(struct usbip_header *pdu, struct urb *urb, int cmd,
711 case USBIP_CMD_SUBMIT:
712 usbip_pack_cmd_submit(pdu, urb, pack);
714 case USBIP_RET_SUBMIT:
715 usbip_pack_ret_submit(pdu, urb, pack);
718 err("unknown command");
723 EXPORT_SYMBOL_GPL(usbip_pack_pdu);
726 static void correct_endian_basic(struct usbip_header_basic *base, int send)
729 base->command = cpu_to_be32(base->command);
730 base->seqnum = cpu_to_be32(base->seqnum);
731 base->devid = cpu_to_be32(base->devid);
732 base->direction = cpu_to_be32(base->direction);
733 base->ep = cpu_to_be32(base->ep);
735 base->command = be32_to_cpu(base->command);
736 base->seqnum = be32_to_cpu(base->seqnum);
737 base->devid = be32_to_cpu(base->devid);
738 base->direction = be32_to_cpu(base->direction);
739 base->ep = be32_to_cpu(base->ep);
743 static void correct_endian_cmd_submit(struct usbip_header_cmd_submit *pdu,
747 pdu->transfer_flags = cpu_to_be32(pdu->transfer_flags);
749 cpu_to_be32s(&pdu->transfer_buffer_length);
750 cpu_to_be32s(&pdu->start_frame);
751 cpu_to_be32s(&pdu->number_of_packets);
752 cpu_to_be32s(&pdu->interval);
754 pdu->transfer_flags = be32_to_cpu(pdu->transfer_flags);
756 be32_to_cpus(&pdu->transfer_buffer_length);
757 be32_to_cpus(&pdu->start_frame);
758 be32_to_cpus(&pdu->number_of_packets);
759 be32_to_cpus(&pdu->interval);
763 static void correct_endian_ret_submit(struct usbip_header_ret_submit *pdu,
767 cpu_to_be32s(&pdu->status);
768 cpu_to_be32s(&pdu->actual_length);
769 cpu_to_be32s(&pdu->start_frame);
770 cpu_to_be32s(&pdu->error_count);
772 be32_to_cpus(&pdu->status);
773 be32_to_cpus(&pdu->actual_length);
774 be32_to_cpus(&pdu->start_frame);
775 be32_to_cpus(&pdu->error_count);
779 static void correct_endian_cmd_unlink(struct usbip_header_cmd_unlink *pdu,
783 pdu->seqnum = cpu_to_be32(pdu->seqnum);
785 pdu->seqnum = be32_to_cpu(pdu->seqnum);
788 static void correct_endian_ret_unlink(struct usbip_header_ret_unlink *pdu,
792 cpu_to_be32s(&pdu->status);
794 be32_to_cpus(&pdu->status);
797 void usbip_header_correct_endian(struct usbip_header *pdu, int send)
802 cmd = pdu->base.command;
804 correct_endian_basic(&pdu->base, send);
807 cmd = pdu->base.command;
810 case USBIP_CMD_SUBMIT:
811 correct_endian_cmd_submit(&pdu->u.cmd_submit, send);
813 case USBIP_RET_SUBMIT:
814 correct_endian_ret_submit(&pdu->u.ret_submit, send);
816 case USBIP_CMD_UNLINK:
817 correct_endian_cmd_unlink(&pdu->u.cmd_unlink, send);
819 case USBIP_RET_UNLINK:
820 correct_endian_ret_unlink(&pdu->u.ret_unlink, send);
824 err("unknown command in pdu header: %d", cmd);
828 EXPORT_SYMBOL_GPL(usbip_header_correct_endian);
830 static void usbip_iso_pakcet_correct_endian(
831 struct usbip_iso_packet_descriptor *iso,
834 /* does not need all members. but copy all simply. */
836 iso->offset = cpu_to_be32(iso->offset);
837 iso->length = cpu_to_be32(iso->length);
838 iso->status = cpu_to_be32(iso->status);
839 iso->actual_length = cpu_to_be32(iso->actual_length);
841 iso->offset = be32_to_cpu(iso->offset);
842 iso->length = be32_to_cpu(iso->length);
843 iso->status = be32_to_cpu(iso->status);
844 iso->actual_length = be32_to_cpu(iso->actual_length);
848 static void usbip_pack_iso(struct usbip_iso_packet_descriptor *iso,
849 struct usb_iso_packet_descriptor *uiso, int pack)
852 iso->offset = uiso->offset;
853 iso->length = uiso->length;
854 iso->status = uiso->status;
855 iso->actual_length = uiso->actual_length;
857 uiso->offset = iso->offset;
858 uiso->length = iso->length;
859 uiso->status = iso->status;
860 uiso->actual_length = iso->actual_length;
865 /* must free buffer */
866 void *usbip_alloc_iso_desc_pdu(struct urb *urb, ssize_t *bufflen)
869 struct usbip_iso_packet_descriptor *iso;
870 int np = urb->number_of_packets;
871 ssize_t size = np * sizeof(*iso);
874 buff = kzalloc(size, GFP_KERNEL);
878 for (i = 0; i < np; i++) {
879 iso = buff + (i * sizeof(*iso));
881 usbip_pack_iso(iso, &urb->iso_frame_desc[i], 1);
882 usbip_iso_pakcet_correct_endian(iso, 1);
889 EXPORT_SYMBOL_GPL(usbip_alloc_iso_desc_pdu);
891 /* some members of urb must be substituted before. */
892 int usbip_recv_iso(struct usbip_device *ud, struct urb *urb)
895 struct usbip_iso_packet_descriptor *iso;
896 int np = urb->number_of_packets;
897 int size = np * sizeof(*iso);
901 if (!usb_pipeisoc(urb->pipe))
904 /* my Bluetooth dongle gets ISO URBs which are np = 0 */
906 /* uinfo("iso np == 0\n"); */
907 /* usbip_dump_urb(urb); */
911 buff = kzalloc(size, GFP_KERNEL);
915 ret = usbip_xmit(0, ud->tcp_socket, buff, size, 0);
917 dev_err(&urb->dev->dev, "recv iso_frame_descriptor, %d\n",
921 if (ud->side == USBIP_STUB)
922 usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
924 usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
929 for (i = 0; i < np; i++) {
930 iso = buff + (i * sizeof(*iso));
932 usbip_iso_pakcet_correct_endian(iso, 0);
933 usbip_pack_iso(iso, &urb->iso_frame_desc[i], 0);
941 EXPORT_SYMBOL_GPL(usbip_recv_iso);
944 /* some members of urb must be substituted before. */
945 int usbip_recv_xbuff(struct usbip_device *ud, struct urb *urb)
950 if (ud->side == USBIP_STUB) {
952 /* the direction of urb must be OUT. */
953 if (usb_pipein(urb->pipe))
956 size = urb->transfer_buffer_length;
959 /* the direction of urb must be IN. */
960 if (usb_pipeout(urb->pipe))
963 size = urb->actual_length;
966 /* no need to recv xbuff */
970 ret = usbip_xmit(0, ud->tcp_socket, (char *)urb->transfer_buffer,
973 dev_err(&urb->dev->dev, "recv xbuf, %d\n", ret);
974 if (ud->side == USBIP_STUB) {
975 usbip_event_add(ud, SDEV_EVENT_ERROR_TCP);
977 usbip_event_add(ud, VDEV_EVENT_ERROR_TCP);
984 EXPORT_SYMBOL_GPL(usbip_recv_xbuff);
987 /*-------------------------------------------------------------------------*/
989 static int __init usbip_common_init(void)
991 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_DESC "" DRIVER_VERSION);
996 static void __exit usbip_common_exit(void)
1004 module_init(usbip_common_init);
1005 module_exit(usbip_common_exit);
1007 MODULE_AUTHOR(DRIVER_AUTHOR);
1008 MODULE_DESCRIPTION(DRIVER_DESC);
1009 MODULE_LICENSE("GPL");