]> rtime.felk.cvut.cz Git - socketcan-devel.git/blob - kernel/2.6/drivers/net/can/usb/ctu_usbcan.c
Added local echo support
[socketcan-devel.git] / kernel / 2.6 / drivers / net / can / usb / ctu_usbcan.c
1 #include <linux/kernel.h>
2 #include <linux/errno.h>
3 #include <linux/init.h>
4 #include <linux/slab.h>
5 #include <linux/module.h>
6 #include <linux/kref.h>
7 #include <linux/uaccess.h>
8 #include <linux/usb.h>
9 #include <linux/mutex.h>
10 #include <linux/netdevice.h>
11 #include <linux/version.h>
12 #include <linux/kthread.h>
13 #include <linux/freezer.h>
14
15 #include <linux/can.h>
16 #include <linux/can/dev.h>
17 #include <linux/can/error.h>
18
19 // lpc17xx debug
20 #define USBCAN_VENDOR_SET_CANBTR        (9)
21 #define CTU_USBCAN_CAN_CLOCK    18000000
22 // lpc17xx debug - end
23
24 #define CTU_USBCAN_VENDOR_ID    0x1669
25 #define CTU_USBCAN_PRODUCT_ID   0x1011
26
27 #define USBCAN_TOT_RX_URBS 8
28 #define USBCAN_TOT_TX_URBS 8
29
30 #define USBCAN_TRANSFER_SIZE 16
31
32 #define CAN_MSG_LENGTH 8
33
34 #define MSG_RTR   (1<<0)
35 #define MSG_OVR   (1<<1)
36 #define MSG_EXT   (1<<2)
37 #define MSG_LOCAL (1<<3)
38
39
40 #define USBCAN_DATA_OK  (1)
41 #define USBCAN_TX_PENDING       (2)
42
43 MODULE_LICENSE("GPL");
44
45 /* table of devices that work with this driver */
46 static struct usb_device_id ctu_usbcan_table [] = {
47         { USB_DEVICE(CTU_USBCAN_VENDOR_ID, CTU_USBCAN_PRODUCT_ID) },
48         { }                                     /* Terminating entry */
49 };
50 MODULE_DEVICE_TABLE(usb, ctu_usbcan_table);
51
52
53 static struct usb_driver ctu_usbcan_driver;
54 struct ctu_usbcan_usb;
55
56
57 struct usbcan_message {
58         struct urb      *u;
59         struct ctu_usbcan_usb *dev;
60         u8      msg[USBCAN_TRANSFER_SIZE];
61         u32 echo_index;
62         u8      dlc;
63         struct list_head list_node;
64 };
65 /*
66 Structure of byte array msg in struct usbcan_message that represents CAN message (little endian):
67         msg[0] - reserved (1 byte)
68         msg[1] - length (1 byte)
69         msg[2:3] - flags (2 bytes)
70         msg[4:7] - id (4 bytes)
71         msg[8:15] - data (8 bytes)
72
73 */
74
75
76 /* Structure to hold all of our device specific stuff */
77 struct ctu_usbcan_usb {
78
79         struct can_priv can; /* must be the first member */
80
81         struct usb_device *udev;                        /* the usb device for this device */
82         struct net_device *netdev;
83
84         u8 bulk_in_endpointAddr;        /* the address of the bulk in endpoint */
85         u8 bulk_out_endpointAddr;       /* the address of the bulk out endpoint */
86
87         struct mutex            io_mutex;               /* synchronize I/O with disconnect */
88
89         struct list_head        rx_pend_list;           /* URBs waiting for data receive */
90         struct list_head        rx_ready_list;          /* URBs with valid received data */
91         struct list_head        tx_idle_list;           /* URBs prepared to hold Tx messages */
92         struct list_head        tx_pend_list;           /* URBs holding Tx messages in progress */
93         struct list_head        tx_ready_list;          /* URBs with yet confirmed Tx messages */
94
95         spinlock_t              list_lock;                      /* list lock */
96         struct task_struct *comthread;                  /* usb communication kernel thread  */
97         wait_queue_head_t queue;
98
99         volatile long flags;
100
101 };
102
103
104 static void usbcan_usb_message_move_list(struct ctu_usbcan_usb *dev,
105                         struct usbcan_message *m, struct list_head *head)
106 {
107         unsigned long flags;    
108         spin_lock_irqsave(&dev->list_lock, flags);
109         list_del(&m->list_node);
110         list_add_tail(&m->list_node, head);
111         spin_unlock_irqrestore(&dev->list_lock, flags);
112 }
113
114
115 static void ctu_usbcan_tx_callback(struct urb *urb){
116
117         struct usbcan_message *m = urb->context;
118         struct net_device_stats *stats = &m->dev->netdev->stats;
119
120         if (!netif_device_present(m->dev->netdev))
121                 return;
122
123         if (urb->status != 0){
124                 err("TX callback: error");
125                 return;
126         }
127
128         /* success */
129
130         printk("TX callback: URB successfully transmitted\n");
131
132         stats->tx_packets++;
133         stats->tx_bytes += m->dlc;
134
135         
136         can_get_echo_skb(m->dev->netdev, m->echo_index);
137
138         set_bit(USBCAN_DATA_OK,&m->dev->flags);
139         usbcan_usb_message_move_list(m->dev, m, &m->dev->tx_ready_list);
140         wake_up_process(m->dev->comthread);
141
142 }
143
144 static void ctu_usbcan_rx_callback(struct urb *urb)
145 {
146         
147         struct usbcan_message *m = urb->context;
148         
149         if (!netif_device_present(m->dev->netdev))
150                 return;
151
152
153         if(urb->status != 0){
154                 err("RX callback: error");
155                 return;
156         }
157
158         /* success */
159         
160         printk("RX callback: URB successfully received\n");
161
162         set_bit(USBCAN_DATA_OK,&m->dev->flags);
163         usbcan_usb_message_move_list(m->dev, m, &m->dev->rx_ready_list);
164         wake_up_process(m->dev->comthread);
165
166 }
167
168 static netdev_tx_t ctu_usbcan_start_xmit(struct sk_buff *skb, struct net_device *netdev)
169 {
170         struct ctu_usbcan_usb *dev = netdev_priv(netdev);
171         struct can_frame *cf = (struct can_frame *)skb->data;
172         struct usbcan_message *m;
173         int i, retval, len;
174         u8 *ptr;
175         u16 flags = 0;
176         
177         if(list_empty(&dev->tx_idle_list)) 
178                 goto exit;
179
180         m = list_first_entry(&dev->tx_idle_list, typeof(*m), list_node);
181
182         /* naplneni     */
183
184         len = cf->can_dlc;
185         if(len > CAN_MSG_LENGTH)
186                 len = CAN_MSG_LENGTH;
187
188         if (cf->can_id & CAN_RTR_FLAG)
189                 flags |= MSG_RTR;
190
191         if (cf->can_id & CAN_EFF_FLAG)
192                 flags |= MSG_EXT;
193
194         *(u8 *)(m->msg)=0;
195         *(u8 *)(m->msg+1)=len & 0xFF;
196         *(u16 *)(m->msg+2)=cpu_to_le16(flags);
197         *(u32 *)(m->msg+4)=cpu_to_le32(cf->can_id & CAN_ERR_MASK);
198
199         for(ptr=m->msg+8, i=0; i < len; ptr++,i++)
200                 *ptr= cf->data[i] & 0xFF;
201                 
202         for(; i < 8; ptr++,i++)
203                 *ptr=0;
204
205
206         m->dlc = (u8) len;
207
208         usbcan_usb_message_move_list(dev, m, &dev->tx_pend_list);
209
210         can_put_echo_skb(skb, netdev, m->echo_index);
211
212         /* odeslani     */ 
213         retval = usb_submit_urb(m->u, GFP_ATOMIC);
214         if (retval){
215                 err("Error submitting URB: %d", retval);
216                 usbcan_usb_message_move_list(dev, m, &dev->tx_idle_list);
217                 goto exit;
218         }
219
220
221 exit:
222
223         return NETDEV_TX_OK;
224
225 }
226
227 static void usbcan_kthread_free_urbs(struct ctu_usbcan_usb *dev)
228 {
229         while(!list_empty(&dev->rx_pend_list)) {
230                 struct usbcan_message *m;
231                 m = list_first_entry(&dev->rx_pend_list, typeof(*m), list_node);
232                 usb_kill_urb(m->u);
233                 usbcan_usb_message_move_list(dev, m, &dev->rx_ready_list);
234         }
235
236         while(!list_empty(&dev->tx_pend_list)) {
237                 struct usbcan_message *m;
238                 m = list_first_entry(&dev->tx_pend_list, typeof(*m), list_node);
239                 usb_kill_urb(m->u);
240                 usbcan_usb_message_move_list(dev, m, &dev->tx_idle_list);
241         }
242
243         while(!list_empty(&dev->rx_ready_list)) {
244                 struct usbcan_message *m;
245                 m = list_first_entry(&dev->rx_ready_list, typeof(*m), list_node);
246                 list_del(&m->list_node);
247                 usb_free_urb(m->u);
248                 kfree(m);
249         }
250
251         while(!list_empty(&dev->tx_ready_list)) {
252                 struct usbcan_message *m;
253                 m = list_first_entry(&dev->tx_ready_list, typeof(*m), list_node);
254                 list_del(&m->list_node);
255                 usb_free_urb(m->u);
256                 kfree(m);
257         }
258
259         while(!list_empty(&dev->tx_idle_list)) {
260                 struct usbcan_message *m;
261                 m = list_first_entry(&dev->tx_idle_list, typeof(*m), list_node);
262                 list_del(&m->list_node);
263                 usb_free_urb(m->u);
264                 kfree(m);
265         }
266
267 }
268
269 void usbcan_kthread_write_handler(struct ctu_usbcan_usb *dev, struct usbcan_message *m)
270 {
271
272         usbcan_usb_message_move_list(dev, m, &dev->tx_idle_list);
273
274 }
275
276 void usbcan_kthread_read_handler(struct ctu_usbcan_usb *dev, struct usbcan_message *m)
277 {
278
279         struct can_frame *cf;
280         struct sk_buff *skb;
281         u8 *ptr;
282         int i, len, retval;
283         u16 flags = 0;
284         struct net_device_stats *stats = &m->dev->netdev->stats;
285
286 /*
287 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32)
288         skb = alloc_can_skb(m->dev->netdev, &cf);
289 #else
290         skb = netdev_alloc_skb(m->dev->netdev, sizeof(struct can_frame)); 
291         skb->protocol = htons(ETH_P_CAN);
292         cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
293 #endif
294 */
295         skb = alloc_can_skb(m->dev->netdev, &cf);
296
297         if (skb == NULL){
298                 err("RX: error alloc skb\n");
299                 return;
300         }
301
302         
303         printk("RX: URB successfully received\n");
304
305         len=*(u8 *)(m->msg+1);
306         if(len > CAN_MSG_LENGTH) len = CAN_MSG_LENGTH;
307
308         flags = le16_to_cpu(*(u16 *)(m->msg+2));
309         cf->can_id = le32_to_cpu((*(u32 *)(m->msg+4)));
310
311         if (flags & MSG_RTR)
312                 cf->can_id |= CAN_RTR_FLAG;
313
314         if (flags & MSG_EXT)
315                 cf->can_id |= CAN_EFF_FLAG;
316
317         cf->can_dlc = len;
318
319         for(ptr=m->msg+8,i=0; i < len; ptr++,i++) {
320                 cf->data[i]=*ptr;
321         }
322
323
324         netif_rx(skb);
325
326         stats->rx_packets++;
327         stats->rx_bytes += cf->can_dlc;
328
329         /* Renewing RX urb */
330
331         usbcan_usb_message_move_list(dev, m, &dev->rx_pend_list);
332         retval = usb_submit_urb (m->u, GFP_KERNEL);
333         if (retval<0) {
334                 err("URB error %d\n", retval);
335         }
336
337
338 }
339
340
341 static int usbcan_sleep_thread(struct ctu_usbcan_usb *dev)
342 {
343         int     rc = 0;
344
345         /* Wait until a signal arrives or we are woken up */
346         for (;;) {
347                 try_to_freeze();
348                 set_current_state(TASK_INTERRUPTIBLE);
349                 if (signal_pending(current)) {
350                         rc = -EINTR;
351                         break;
352                 }
353                 if (
354                         kthread_should_stop() ||
355                         test_bit(USBCAN_DATA_OK,&dev->flags)
356                 )
357                         break;
358                 schedule();
359         }
360         __set_current_state(TASK_RUNNING);
361         return rc;
362 }
363
364 int usbcan_kthread(void *data)
365 {
366
367         struct ctu_usbcan_usb *dev=(struct ctu_usbcan_usb *) data;
368
369         int i, retval;
370
371         struct usbcan_message *m;
372         struct urb *u;
373
374         printk("CTU USBCAN: kthread running\n");
375
376         INIT_LIST_HEAD(&dev->rx_pend_list);
377         INIT_LIST_HEAD(&dev->rx_ready_list);
378         INIT_LIST_HEAD(&dev->tx_idle_list);
379         INIT_LIST_HEAD(&dev->tx_pend_list);
380         INIT_LIST_HEAD(&dev->tx_ready_list);
381
382         /* Prepare receive urbs  */
383         for (i=0;i<USBCAN_TOT_RX_URBS;i++){
384                 
385                 u = usb_alloc_urb(0, GFP_KERNEL);               
386                 m = kzalloc(sizeof(struct usbcan_message), GFP_KERNEL);
387                 
388                 if (!u){
389                         err("Error allocating usb receive urb");
390                         goto exit;
391                 }
392
393                 if(!m) {
394                         usb_free_urb(u);
395                         err("Error allocating receive usbcan_message");
396                         goto exit;
397                 }
398                 m->u = u;
399                 u->dev = dev->udev;
400                 m->dev = dev;
401                 usb_fill_bulk_urb(u, dev->udev,
402                         usb_rcvbulkpipe(dev->udev, dev->bulk_in_endpointAddr),
403                         m->msg, USBCAN_TRANSFER_SIZE, ctu_usbcan_rx_callback, m);
404
405
406                 list_add_tail(&m->list_node, &dev->rx_ready_list);
407         }
408
409         /* Prepare transmit urbs  */
410         for (i=0;i<USBCAN_TOT_TX_URBS;i++){
411
412                 u = usb_alloc_urb(0, GFP_ATOMIC);
413                 m = kzalloc(sizeof(struct usbcan_message), GFP_ATOMIC);
414
415                 if (!u){
416                         err("Error allocating usb transmit urb");
417                         goto exit;
418                 }
419         
420                 if(!m) {
421                         usb_free_urb(u);
422                         err("Error allocating transmit usbcan_message");
423                         goto exit;
424                 }
425                 m->u = u;
426                 u->dev = dev->udev;
427                 m->dev = dev;
428
429                 m->echo_index = i;
430
431                 usb_fill_bulk_urb(u, dev->udev,
432                         usb_sndbulkpipe(dev->udev, dev->bulk_out_endpointAddr),
433                         m->msg, USBCAN_TRANSFER_SIZE, ctu_usbcan_tx_callback, m);
434
435                 list_add_tail(&m->list_node, &dev->tx_idle_list);
436         }
437
438
439         for (i=0;i<USBCAN_TOT_RX_URBS;i++){
440                 
441                 m = list_first_entry(&dev->rx_ready_list, typeof(*m), list_node);
442                 usbcan_usb_message_move_list(dev, m, &dev->rx_pend_list);
443
444                 retval=usb_submit_urb(m->u, GFP_KERNEL);
445                 if (retval){
446                         err("Error submitting URB: %d", retval);
447                         goto exit;
448                 }
449         }
450
451
452         /* an endless loop in which we are doing our work */
453         for(;;)
454         {
455
456
457                 /* We need to do a memory barrier here to be sure that
458                 the flags are visible on all CPUs. */
459                 mb();
460
461                 /* fall asleep */
462                 if (!kthread_should_stop() && (usbcan_sleep_thread(dev)<0)){
463                         break;
464                 }
465                 /* We need to do a memory barrier here to be sure that the flags are visible on all CPUs. */
466                 mb();
467
468                 if (kthread_should_stop()){
469                         break;
470                 }
471
472                 mb();
473
474                 clear_bit(USBCAN_DATA_OK,&dev->flags);
475
476                 
477                 while(!list_empty(&dev->rx_ready_list)) {
478                         struct usbcan_message *m;
479                         m = list_first_entry(&dev->rx_ready_list, typeof(*m), list_node);
480                         usbcan_kthread_read_handler(dev, m);
481                 }
482
483                 while(!list_empty(&dev->tx_ready_list)) {
484                         struct usbcan_message *m;
485                         m = list_first_entry(&dev->tx_ready_list, typeof(*m), list_node);
486                         usbcan_kthread_write_handler(dev, m);
487                 }
488
489         }
490
491
492 exit:
493         usbcan_kthread_free_urbs(dev);
494         printk("CTU USBCAN: usbcan thread finished!");
495         
496         return 0;
497
498 }
499
500 static int ctu_usbcan_open(struct net_device *netdev)
501 {
502         int err;
503
504         struct ctu_usbcan_usb *dev = netdev_priv(netdev);
505
506         /* common open */       
507         err = open_candev(netdev);
508         if (err)
509                 return err;     
510
511         /* start kernel thread */
512         dev->comthread = kthread_run(usbcan_kthread, (void *)dev, "usbcan_1");
513
514         return 0;
515 }
516
517 static int ctu_usbcan_close(struct net_device *netdev)
518 {
519
520         struct ctu_usbcan_usb *dev = netdev_priv(netdev);
521         kthread_stop(dev->comthread);
522
523         close_candev(netdev);
524         
525         return 0;
526 }
527
528 static const struct net_device_ops ctu_usbcan_netdev_ops = {
529         .ndo_open = ctu_usbcan_open,
530         .ndo_stop = ctu_usbcan_close,
531         .ndo_start_xmit = ctu_usbcan_start_xmit,
532 };
533
534 static struct can_bittiming_const ctu_usbcan_bittiming_const = {
535         .name = "lpc17xx_can",
536         .tseg1_min = 1,
537         .tseg1_max = 16,
538         .tseg2_min = 1,
539         .tseg2_max = 8,
540         .sjw_max = 4,
541         .brp_min = 1,
542         .brp_max = 1024,
543         .brp_inc = 1,
544 };
545
546 static int ctu_usbcan_set_mode(struct net_device *netdev, enum can_mode mode)
547 {
548         struct ems_usb *dev = netdev_priv(netdev);
549
550         printk("SET MODE\n");
551
552         return 0;
553 }
554
555 static int ctu_usbcan_set_bittiming(struct net_device *netdev)
556 {
557         struct ctu_usbcan_usb *dev = netdev_priv(netdev);
558         struct can_bittiming *bt = &dev->can.bittiming;
559         int retval;
560         
561         u8 usbbuf[USBCAN_TRANSFER_SIZE];
562
563         printk("BRP: %d, SJW: %d, TSEG1: %d, TSEG2: %d - ", bt->brp, bt->sjw, ( bt->prop_seg + bt->phase_seg1), bt->phase_seg2);        
564
565
566         if (!dev)
567                 return -ENODEV;
568
569         *(uint32_t *)(usbbuf)=cpu_to_le32(bt->brp);             // baudrate prescaler
570         *(uint32_t *)(usbbuf+4)=cpu_to_le32(bt->sjw);   // sjw
571         *(uint32_t *)(usbbuf+8)=cpu_to_le32(bt->prop_seg + bt->phase_seg1);     // TSEG1
572         *(uint32_t *)(usbbuf+12)=cpu_to_le32(bt->phase_seg2);   // TSEG2
573
574         retval = usb_control_msg(dev->udev,
575                                 usb_sndctrlpipe(dev->udev, 0),
576                                 USBCAN_VENDOR_SET_CANBTR,
577                                 USB_TYPE_VENDOR,
578                                 cpu_to_le16(0), cpu_to_le16(0),
579                                 &usbbuf, USBCAN_TRANSFER_SIZE,
580                                 1000);
581
582         if(retval){
583                 printk("OK\n");
584                 return 0;
585         }
586         else{
587                 printk("KO\n");
588                 return retval;
589         }
590
591 }
592
593
594 static int ctu_usbcan_probe(struct usb_interface *intf,
595                                                         const struct usb_device_id *id)
596 {
597         struct net_device *netdev;
598         struct ctu_usbcan_usb *dev;
599         struct usb_host_interface *iface_desc;
600         struct usb_endpoint_descriptor *endpoint;
601         int i;
602         int err = -ENOMEM;
603
604         printk(KERN_INFO "CTU USBCAN device now attached\n");
605
606 /*
607 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,32)
608         netdev = alloc_candev(sizeof(struct ctu_usbcan_usb), USBCAN_TOT_TX_URBS);
609 #else
610         netdev = alloc_candev(sizeof(struct ctu_usbcan_usb));
611 #endif
612 */
613         netdev = alloc_candev(sizeof(struct ctu_usbcan_usb), USBCAN_TOT_TX_URBS);
614
615         if (!netdev) {
616 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,33)
617                 dev_err(&intf->dev, "Couldn't alloc candev\n");
618 #else
619                 dev_err(netdev->dev.parent, "Couldn't alloc candev\n");
620 #endif
621                 return -ENOMEM;
622         }
623
624         dev = netdev_priv(netdev);
625
626         dev->udev = interface_to_usbdev(intf);
627         dev->netdev = netdev;
628
629         dev->can.clock.freq = CTU_USBCAN_CAN_CLOCK;
630         dev->can.bittiming_const = &ctu_usbcan_bittiming_const;
631         dev->can.do_set_bittiming = ctu_usbcan_set_bittiming;
632         dev->can.do_set_mode = ctu_usbcan_set_mode;
633
634
635         netdev->netdev_ops = &ctu_usbcan_netdev_ops;
636         netdev->flags |= IFF_ECHO;
637
638         /* set up the endpoint information */
639         /* use only the first bulk-in and bulk-out endpoints */
640         iface_desc = intf->cur_altsetting;
641         for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
642                 endpoint = &iface_desc->endpoint[i].desc;
643
644                 if (!dev->bulk_in_endpointAddr &&
645                     usb_endpoint_is_bulk_in(endpoint)) {
646                         /* we found a bulk in endpoint */
647                         dev->bulk_in_endpointAddr = endpoint->bEndpointAddress;
648                 }
649
650                 if (!dev->bulk_out_endpointAddr &&
651                     usb_endpoint_is_bulk_out(endpoint)) {
652                         /* we found a bulk out endpoint */
653                         dev->bulk_out_endpointAddr = endpoint->bEndpointAddress;
654                 }
655         }
656         if (!(dev->bulk_in_endpointAddr && dev->bulk_out_endpointAddr)) {
657                 err("Could not find both bulk-in and bulk-out endpoints");
658                 goto exit;
659         }
660
661
662         usb_set_intfdata(intf, dev);
663         SET_NETDEV_DEV(netdev, &intf->dev);
664
665
666         err = register_candev(netdev);
667         if (err) {
668                 dev_err(netdev->dev.parent,
669                         "couldn't register CAN device: %d\n", err);
670         }
671
672 exit:
673
674         return 0;
675 }
676
677 /* called by the usb core when the device is removed from the system */
678 static void ctu_usbcan_disconnect(struct usb_interface *intf)
679 {
680
681         struct ctu_usbcan_usb *dev = usb_get_intfdata(intf);
682
683         printk(KERN_INFO "CTU USBCAN device now disconnected\n");
684
685         usb_set_intfdata(intf, NULL);
686
687         if (dev) {
688                 unregister_netdev(dev->netdev);
689                 free_candev(dev->netdev);
690         }
691
692 }
693
694 /* usb specific object needed to register this driver with the usb subsystem */
695 static struct usb_driver ctu_usbcan_driver = {
696         .name = "ctu_usbcan",
697         .id_table =     ctu_usbcan_table,
698         .probe =        ctu_usbcan_probe,
699         .disconnect =   ctu_usbcan_disconnect,
700 };
701
702 static int __init ctu_usbcan_init(void)
703 {
704         int result;
705
706         printk(KERN_INFO "CTU USBCAN kernel driver loaded\n");
707
708         /* register this driver with the USB subsystem */
709         result = usb_register(&ctu_usbcan_driver);
710         if (result)
711                 err("usb_register failed. Error number %d", result);
712
713         return result;
714 }
715
716 static void __exit ctu_usbcan_exit(void)
717 {
718         printk(KERN_INFO "CTU USBCAN kernel driver unloaded\n");
719
720         /* deregister this driver with the USB subsystem */
721         usb_deregister(&ctu_usbcan_driver);
722 }
723
724 module_init(ctu_usbcan_init);
725 module_exit(ctu_usbcan_exit);
726