1 /* CAN driver for Geschwister Schneider USB/CAN devices.
3 * Copyright (C) 2013 Geschwister Schneider Technologie-,
4 * Entwicklungs- und Vertriebs UG (Haftungsbeschränkt).
6 * Many thanks to all socketcan devs!
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published
10 * by the Free Software Foundation; version 2 of the License.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
18 #include <linux/init.h>
19 #include <linux/signal.h>
20 #include <linux/module.h>
21 #include <linux/netdevice.h>
22 #include <linux/usb.h>
24 #include <linux/can.h>
25 #include <linux/can/dev.h>
26 #include <linux/can/error.h>
28 /* Device specific constants */
29 #define USB_GSUSB_1_VENDOR_ID 0x1d50
30 #define USB_GSUSB_1_PRODUCT_ID 0x606f
32 #define GSUSB_ENDPOINT_IN 1
33 #define GSUSB_ENDPOINT_OUT 2
35 /* Device specific constants */
37 GS_USB_BREQ_HOST_FORMAT = 0,
38 GS_USB_BREQ_BITTIMING,
42 GS_USB_BREQ_DEVICE_CONFIG
46 /* reset a channel. turns it off */
47 GS_CAN_MODE_RESET = 0,
48 /* starts a channel */
53 GS_CAN_STATE_ERROR_ACTIVE = 0,
54 GS_CAN_STATE_ERROR_WARNING,
55 GS_CAN_STATE_ERROR_PASSIVE,
61 /* data types passed between host and device */
62 struct gs_host_config {
65 /* All data exchanged between host and device is exchanged in host byte order,
66 * thanks to the struct gs_host_config byte_order member, which is sent first
67 * to indicate the desired byte order.
70 struct gs_device_config {
79 #define GS_CAN_MODE_NORMAL 0
80 #define GS_CAN_MODE_LISTEN_ONLY (1<<0)
81 #define GS_CAN_MODE_LOOP_BACK (1<<1)
82 #define GS_CAN_MODE_TRIPLE_SAMPLE (1<<2)
83 #define GS_CAN_MODE_ONE_SHOT (1<<3)
85 struct gs_device_mode {
90 struct gs_device_state {
96 struct gs_device_bittiming {
104 #define GS_CAN_FEATURE_LISTEN_ONLY (1<<0)
105 #define GS_CAN_FEATURE_LOOP_BACK (1<<1)
106 #define GS_CAN_FEATURE_TRIPLE_SAMPLE (1<<2)
107 #define GS_CAN_FEATURE_ONE_SHOT (1<<3)
109 struct gs_device_bt_const {
122 #define GS_CAN_FLAG_OVERFLOW 1
124 struct gs_host_frame {
135 /* The GS USB devices make use of the same flags and masks as in
136 * linux/can.h and linux/can/error.h, and no additional mapping is necessary.
139 /* Only send a max of GS_MAX_TX_URBS frames per channel at a time. */
140 #define GS_MAX_TX_URBS 10
141 /* Only launch a max of GS_MAX_RX_URBS usb requests at a time. */
142 #define GS_MAX_RX_URBS 30
143 /* Maximum number of interfaces the driver supports per device.
144 * Current hardware only supports 2 interfaces. The future may vary.
146 #define GS_MAX_INTF 2
148 struct gs_tx_context {
150 unsigned int echo_id;
154 struct can_priv can; /* must be the first member */
156 struct gs_usb *parent;
158 struct net_device *netdev;
159 struct usb_device *udev;
160 struct usb_interface *iface;
162 struct can_bittiming_const bt_const;
163 unsigned int channel; /* channel number */
165 /* This lock prevents a race condition between xmit and receive. */
166 spinlock_t tx_ctx_lock;
167 struct gs_tx_context tx_context[GS_MAX_TX_URBS];
169 struct usb_anchor tx_submitted;
170 atomic_t active_tx_urbs;
173 /* usb interface struct */
175 struct gs_can *canch[GS_MAX_INTF];
176 struct usb_anchor rx_submitted;
177 atomic_t active_channels;
178 struct usb_device *udev;
181 /* 'allocate' a tx context.
182 * returns a valid tx context or NULL if there is no space.
184 static struct gs_tx_context *gs_alloc_tx_context(struct gs_can *dev)
189 spin_lock_irqsave(&dev->tx_ctx_lock, flags);
191 for (; i < GS_MAX_TX_URBS; i++) {
192 if (dev->tx_context[i].echo_id == GS_MAX_TX_URBS) {
193 dev->tx_context[i].echo_id = i;
194 spin_unlock_irqrestore(&dev->tx_ctx_lock, flags);
195 return &dev->tx_context[i];
199 spin_unlock_irqrestore(&dev->tx_ctx_lock, flags);
203 /* releases a tx context
205 static void gs_free_tx_context(struct gs_tx_context *txc)
207 txc->echo_id = GS_MAX_TX_URBS;
210 /* Get a tx context by id.
212 static struct gs_tx_context *gs_get_tx_context(struct gs_can *dev, unsigned int id)
216 if (id < GS_MAX_TX_URBS) {
217 spin_lock_irqsave(&dev->tx_ctx_lock, flags);
218 if (dev->tx_context[id].echo_id == id) {
219 spin_unlock_irqrestore(&dev->tx_ctx_lock, flags);
220 return &dev->tx_context[id];
222 spin_unlock_irqrestore(&dev->tx_ctx_lock, flags);
227 static int gs_cmd_reset(struct gs_usb *gsusb, struct gs_can *gsdev)
229 struct gs_device_mode *dm;
230 struct usb_interface *intf = gsdev->iface;
233 dm = kzalloc(sizeof(*dm), GFP_KERNEL);
237 dm->mode = GS_CAN_MODE_RESET;
239 rc = usb_control_msg(interface_to_usbdev(intf),
240 usb_sndctrlpipe(interface_to_usbdev(intf), 0),
242 USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
254 static void gs_update_state(struct gs_can *dev, struct can_frame *cf)
256 struct can_device_stats *can_stats = &dev->can.can_stats;
258 if (cf->can_id & CAN_ERR_RESTARTED) {
259 dev->can.state = CAN_STATE_ERROR_ACTIVE;
260 can_stats->restarts++;
261 } else if (cf->can_id & CAN_ERR_BUSOFF) {
262 dev->can.state = CAN_STATE_BUS_OFF;
263 can_stats->bus_off++;
264 } else if (cf->can_id & CAN_ERR_CRTL) {
265 if ((cf->data[1] & CAN_ERR_CRTL_TX_WARNING) ||
266 (cf->data[1] & CAN_ERR_CRTL_RX_WARNING)) {
267 dev->can.state = CAN_STATE_ERROR_WARNING;
268 can_stats->error_warning++;
269 } else if ((cf->data[1] & CAN_ERR_CRTL_TX_PASSIVE) ||
270 (cf->data[1] & CAN_ERR_CRTL_RX_PASSIVE)) {
271 dev->can.state = CAN_STATE_ERROR_PASSIVE;
272 can_stats->error_passive++;
274 dev->can.state = CAN_STATE_ERROR_ACTIVE;
279 static void gs_usb_receive_bulk_callback(struct urb *urb)
281 struct gs_usb *usbcan = urb->context;
283 struct net_device *netdev;
285 struct net_device_stats *stats;
286 struct gs_host_frame *hf = urb->transfer_buffer;
287 struct gs_tx_context *txc;
288 struct can_frame *cf;
293 switch (urb->status) {
294 case 0: /* success */
300 /* do not resubmit aborted urbs. eg: when device goes down */
304 /* device reports out of range channel id */
305 if (hf->channel >= GS_MAX_INTF)
308 dev = usbcan->canch[hf->channel];
310 netdev = dev->netdev;
311 stats = &netdev->stats;
313 if (!netif_device_present(netdev))
316 if (hf->echo_id == -1) { /* normal rx */
317 skb = alloc_can_skb(dev->netdev, &cf);
321 cf->can_id = hf->can_id;
323 cf->can_dlc = get_can_dlc(hf->can_dlc);
324 memcpy(cf->data, hf->data, 8);
326 /* ERROR frames tell us information about the controller */
327 if (hf->can_id & CAN_ERR_FLAG)
328 gs_update_state(dev, cf);
330 netdev->stats.rx_packets++;
331 netdev->stats.rx_bytes += hf->can_dlc;
334 } else { /* echo_id == hf->echo_id */
335 if (hf->echo_id >= GS_MAX_TX_URBS) {
337 "Unexpected out of range echo id %d\n",
342 netdev->stats.tx_packets++;
343 netdev->stats.tx_bytes += hf->can_dlc;
345 txc = gs_get_tx_context(dev, hf->echo_id);
347 /* bad devices send bad echo_ids. */
350 "Unexpected unused echo id %d\n",
355 can_get_echo_skb(netdev, hf->echo_id);
357 gs_free_tx_context(txc);
359 atomic_dec(&dev->active_tx_urbs);
361 netif_wake_queue(netdev);
364 if (hf->flags & GS_CAN_FLAG_OVERFLOW) {
365 skb = alloc_can_err_skb(netdev, &cf);
369 cf->can_id |= CAN_ERR_CRTL;
370 cf->can_dlc = CAN_ERR_DLC;
371 cf->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
372 stats->rx_over_errors++;
378 usb_fill_bulk_urb(urb,
380 usb_rcvbulkpipe(usbcan->udev, GSUSB_ENDPOINT_IN),
382 sizeof(struct gs_host_frame),
383 gs_usb_receive_bulk_callback,
387 rc = usb_submit_urb(urb, GFP_ATOMIC);
389 /* USB failure take down all interfaces */
391 for (rc = 0; rc < GS_MAX_INTF; rc++) {
392 if (usbcan->canch[rc])
393 netif_device_detach(usbcan->canch[rc]->netdev);
398 static int gs_usb_set_bittiming(struct net_device *netdev)
400 struct gs_can *dev = netdev_priv(netdev);
401 struct can_bittiming *bt = &dev->can.bittiming;
402 struct usb_interface *intf = dev->iface;
404 struct gs_device_bittiming *dbt;
406 dbt = kmalloc(sizeof(*dbt), GFP_KERNEL);
410 dbt->prop_seg = bt->prop_seg;
411 dbt->phase_seg1 = bt->phase_seg1;
412 dbt->phase_seg2 = bt->phase_seg2;
416 /* request bit timings */
417 rc = usb_control_msg(interface_to_usbdev(intf),
418 usb_sndctrlpipe(interface_to_usbdev(intf), 0),
419 GS_USB_BREQ_BITTIMING,
420 USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
430 dev_err(netdev->dev.parent, "Couldn't set bittimings (err=%d)",
433 return (rc > 0) ? 0 : rc;
436 static void gs_usb_xmit_callback(struct urb *urb)
438 struct gs_tx_context *txc = urb->context;
439 struct gs_can *dev = txc->dev;
440 struct net_device *netdev = dev->netdev;
443 netdev_info(netdev, "usb xmit fail %d\n", txc->echo_id);
445 usb_free_coherent(urb->dev,
446 urb->transfer_buffer_length,
447 urb->transfer_buffer,
451 static netdev_tx_t gs_can_start_xmit(struct sk_buff *skb, struct net_device *netdev)
453 struct gs_can *dev = netdev_priv(netdev);
454 struct net_device_stats *stats = &dev->netdev->stats;
456 struct gs_host_frame *hf;
457 struct can_frame *cf;
460 struct gs_tx_context *txc;
462 if (can_dropped_invalid_skb(netdev, skb))
465 /* find an empty context to keep track of transmission */
466 txc = gs_alloc_tx_context(dev);
468 return NETDEV_TX_BUSY;
470 /* create a URB, and a buffer for it */
471 urb = usb_alloc_urb(0, GFP_ATOMIC);
473 netdev_err(netdev, "No memory left for URB\n");
477 hf = usb_alloc_coherent(dev->udev, sizeof(*hf), GFP_ATOMIC,
480 netdev_err(netdev, "No memory left for USB buffer\n");
486 if (idx >= GS_MAX_TX_URBS) {
487 netdev_err(netdev, "Invalid tx context %d\n", idx);
492 hf->channel = dev->channel;
494 cf = (struct can_frame *)skb->data;
496 hf->can_id = cf->can_id;
497 hf->can_dlc = cf->can_dlc;
498 memcpy(hf->data, cf->data, cf->can_dlc);
500 usb_fill_bulk_urb(urb, dev->udev,
501 usb_sndbulkpipe(dev->udev, GSUSB_ENDPOINT_OUT),
504 gs_usb_xmit_callback,
507 urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
508 usb_anchor_urb(urb, &dev->tx_submitted);
510 can_put_echo_skb(skb, netdev, idx);
512 atomic_inc(&dev->active_tx_urbs);
514 rc = usb_submit_urb(urb, GFP_ATOMIC);
515 if (unlikely(rc)) { /* usb send failed */
516 atomic_dec(&dev->active_tx_urbs);
518 can_free_echo_skb(netdev, idx);
519 gs_free_tx_context(txc);
521 usb_unanchor_urb(urb);
522 usb_free_coherent(dev->udev,
529 netif_device_detach(netdev);
531 netdev_err(netdev, "usb_submit failed (err=%d)\n", rc);
535 /* Slow down tx path */
536 if (atomic_read(&dev->active_tx_urbs) >= GS_MAX_TX_URBS)
537 netif_stop_queue(netdev);
540 /* let usb core take care of this urb */
546 usb_free_coherent(dev->udev,
554 gs_free_tx_context(txc);
560 static int gs_can_open(struct net_device *netdev)
562 struct gs_can *dev = netdev_priv(netdev);
563 struct gs_usb *parent = dev->parent;
565 struct gs_device_mode *dm;
568 rc = open_candev(netdev);
572 if (atomic_add_return(1, &parent->active_channels) == 1) {
573 for (i = 0; i < GS_MAX_RX_URBS; i++) {
578 urb = usb_alloc_urb(0, GFP_KERNEL);
581 "No memory left for URB\n");
585 /* alloc rx buffer */
586 buf = usb_alloc_coherent(dev->udev,
587 sizeof(struct gs_host_frame),
592 "No memory left for USB buffer\n");
597 /* fill, anchor, and submit rx urb */
598 usb_fill_bulk_urb(urb,
600 usb_rcvbulkpipe(dev->udev,
603 sizeof(struct gs_host_frame),
604 gs_usb_receive_bulk_callback,
606 urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
608 usb_anchor_urb(urb, &parent->rx_submitted);
610 rc = usb_submit_urb(urb, GFP_KERNEL);
613 netif_device_detach(dev->netdev);
616 "usb_submit failed (err=%d)\n",
619 usb_unanchor_urb(urb);
625 * USB core will take care of freeing it
631 dm = kmalloc(sizeof(*dm), GFP_KERNEL);
636 ctrlmode = dev->can.ctrlmode;
639 if (ctrlmode & CAN_CTRLMODE_LOOPBACK)
640 dm->flags |= GS_CAN_MODE_LOOP_BACK;
641 else if (ctrlmode & CAN_CTRLMODE_LISTENONLY)
642 dm->flags |= GS_CAN_MODE_LISTEN_ONLY;
644 /* Controller is not allowed to retry TX
645 * this mode is unavailable on atmels uc3c hardware
647 if (ctrlmode & CAN_CTRLMODE_ONE_SHOT)
648 dm->flags |= GS_CAN_MODE_ONE_SHOT;
650 if (ctrlmode & CAN_CTRLMODE_3_SAMPLES)
651 dm->flags |= GS_CAN_MODE_TRIPLE_SAMPLE;
653 /* finally start device */
654 dm->mode = GS_CAN_MODE_START;
655 rc = usb_control_msg(interface_to_usbdev(dev->iface),
656 usb_sndctrlpipe(interface_to_usbdev(dev->iface), 0),
658 USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
666 netdev_err(netdev, "Couldn't start device (err=%d)\n", rc);
673 dev->can.state = CAN_STATE_ERROR_ACTIVE;
675 if (!(dev->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
676 netif_start_queue(netdev);
681 static int gs_can_close(struct net_device *netdev)
684 struct gs_can *dev = netdev_priv(netdev);
685 struct gs_usb *parent = dev->parent;
687 netif_stop_queue(netdev);
690 if (atomic_dec_and_test(&parent->active_channels))
691 usb_kill_anchored_urbs(&parent->rx_submitted);
693 /* Stop sending URBs */
694 usb_kill_anchored_urbs(&dev->tx_submitted);
695 atomic_set(&dev->active_tx_urbs, 0);
697 /* reset the device */
698 rc = gs_cmd_reset(parent, dev);
700 netdev_warn(netdev, "Couldn't shutdown device (err=%d)", rc);
702 /* reset tx contexts */
703 for (rc = 0; rc < GS_MAX_TX_URBS; rc++) {
704 dev->tx_context[rc].dev = dev;
705 dev->tx_context[rc].echo_id = GS_MAX_TX_URBS;
708 /* close the netdev */
709 close_candev(netdev);
714 static const struct net_device_ops gs_usb_netdev_ops = {
715 .ndo_open = gs_can_open,
716 .ndo_stop = gs_can_close,
717 .ndo_start_xmit = gs_can_start_xmit,
718 .ndo_change_mtu = can_change_mtu,
721 static struct gs_can *gs_make_candev(unsigned int channel, struct usb_interface *intf)
724 struct net_device *netdev;
726 struct gs_device_bt_const *bt_const;
728 bt_const = kmalloc(sizeof(*bt_const), GFP_KERNEL);
730 return ERR_PTR(-ENOMEM);
732 /* fetch bit timing constants */
733 rc = usb_control_msg(interface_to_usbdev(intf),
734 usb_rcvctrlpipe(interface_to_usbdev(intf), 0),
735 GS_USB_BREQ_BT_CONST,
736 USB_DIR_IN|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
745 "Couldn't get bit timing const for channel (err=%d)\n",
752 netdev = alloc_candev(sizeof(struct gs_can), GS_MAX_TX_URBS);
754 dev_err(&intf->dev, "Couldn't allocate candev\n");
756 return ERR_PTR(-ENOMEM);
759 dev = netdev_priv(netdev);
761 netdev->netdev_ops = &gs_usb_netdev_ops;
763 netdev->flags |= IFF_ECHO; /* we support full roundtrip echo */
766 strcpy(dev->bt_const.name, "gs_usb");
767 dev->bt_const.tseg1_min = bt_const->tseg1_min;
768 dev->bt_const.tseg1_max = bt_const->tseg1_max;
769 dev->bt_const.tseg2_min = bt_const->tseg2_min;
770 dev->bt_const.tseg2_max = bt_const->tseg2_max;
771 dev->bt_const.sjw_max = bt_const->sjw_max;
772 dev->bt_const.brp_min = bt_const->brp_min;
773 dev->bt_const.brp_max = bt_const->brp_max;
774 dev->bt_const.brp_inc = bt_const->brp_inc;
776 dev->udev = interface_to_usbdev(intf);
778 dev->netdev = netdev;
779 dev->channel = channel;
781 init_usb_anchor(&dev->tx_submitted);
782 atomic_set(&dev->active_tx_urbs, 0);
783 spin_lock_init(&dev->tx_ctx_lock);
784 for (rc = 0; rc < GS_MAX_TX_URBS; rc++) {
785 dev->tx_context[rc].dev = dev;
786 dev->tx_context[rc].echo_id = GS_MAX_TX_URBS;
790 dev->can.state = CAN_STATE_STOPPED;
791 dev->can.clock.freq = bt_const->fclk_can;
792 dev->can.bittiming_const = &dev->bt_const;
793 dev->can.do_set_bittiming = gs_usb_set_bittiming;
795 dev->can.ctrlmode_supported = 0;
797 if (bt_const->feature & GS_CAN_FEATURE_LISTEN_ONLY)
798 dev->can.ctrlmode_supported |= CAN_CTRLMODE_LISTENONLY;
800 if (bt_const->feature & GS_CAN_FEATURE_LOOP_BACK)
801 dev->can.ctrlmode_supported |= CAN_CTRLMODE_LOOPBACK;
803 if (bt_const->feature & GS_CAN_FEATURE_TRIPLE_SAMPLE)
804 dev->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES;
806 if (bt_const->feature & GS_CAN_FEATURE_ONE_SHOT)
807 dev->can.ctrlmode_supported |= CAN_CTRLMODE_ONE_SHOT;
811 SET_NETDEV_DEV(netdev, &intf->dev);
813 rc = register_candev(dev->netdev);
815 free_candev(dev->netdev);
816 dev_err(&intf->dev, "Couldn't register candev (err=%d)\n", rc);
823 static void gs_destroy_candev(struct gs_can *dev)
825 unregister_candev(dev->netdev);
826 usb_kill_anchored_urbs(&dev->tx_submitted);
827 free_candev(dev->netdev);
830 static int gs_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
834 unsigned int icount, i;
835 struct gs_host_config *hconf;
836 struct gs_device_config *dconf;
838 hconf = kmalloc(sizeof(*hconf), GFP_KERNEL);
842 hconf->byte_order = 0x0000beef;
844 /* send host config */
845 rc = usb_control_msg(interface_to_usbdev(intf),
846 usb_sndctrlpipe(interface_to_usbdev(intf), 0),
847 GS_USB_BREQ_HOST_FORMAT,
848 USB_DIR_OUT|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
850 intf->cur_altsetting->desc.bInterfaceNumber,
858 dev_err(&intf->dev, "Couldn't send data format (err=%d)\n",
863 dconf = kmalloc(sizeof(*dconf), GFP_KERNEL);
867 /* read device config */
868 rc = usb_control_msg(interface_to_usbdev(intf),
869 usb_rcvctrlpipe(interface_to_usbdev(intf), 0),
870 GS_USB_BREQ_DEVICE_CONFIG,
871 USB_DIR_IN|USB_TYPE_VENDOR|USB_RECIP_INTERFACE,
873 intf->cur_altsetting->desc.bInterfaceNumber,
878 dev_err(&intf->dev, "Couldn't get device config: (err=%d)\n",
886 icount = dconf->icount+1;
890 dev_info(&intf->dev, "Configuring for %d interfaces\n", icount);
892 if (icount > GS_MAX_INTF) {
894 "Driver cannot handle more that %d CAN interfaces\n",
899 dev = kzalloc(sizeof(*dev), GFP_KERNEL);
902 init_usb_anchor(&dev->rx_submitted);
904 atomic_set(&dev->active_channels, 0);
906 usb_set_intfdata(intf, dev);
907 dev->udev = interface_to_usbdev(intf);
909 for (i = 0; i < icount; i++) {
910 dev->canch[i] = gs_make_candev(i, intf);
911 if (IS_ERR_OR_NULL(dev->canch[i])) {
912 /* save error code to return later */
913 rc = PTR_ERR(dev->canch[i]);
915 /* on failure destroy previously created candevs */
917 for (i = 0; i < icount; i++)
918 gs_destroy_candev(dev->canch[i]);
920 usb_kill_anchored_urbs(&dev->rx_submitted);
924 dev->canch[i]->parent = dev;
930 static void gs_usb_disconnect(struct usb_interface *intf)
933 struct gs_usb *dev = usb_get_intfdata(intf);
934 usb_set_intfdata(intf, NULL);
937 dev_err(&intf->dev, "Disconnect (nodata)\n");
941 for (i = 0; i < GS_MAX_INTF; i++)
943 gs_destroy_candev(dev->canch[i]);
945 usb_kill_anchored_urbs(&dev->rx_submitted);
949 static const struct usb_device_id gs_usb_table[] = {
950 {USB_DEVICE(USB_GSUSB_1_VENDOR_ID, USB_GSUSB_1_PRODUCT_ID)},
951 {} /* Terminating entry */
954 MODULE_DEVICE_TABLE(usb, gs_usb_table);
956 static struct usb_driver gs_usb_driver = {
958 .probe = gs_usb_probe,
959 .disconnect = gs_usb_disconnect,
960 .id_table = gs_usb_table,
963 module_usb_driver(gs_usb_driver);
965 MODULE_AUTHOR("Maximilian Schneider <mws@schneidersoft.net>");
967 "Socket CAN device driver for Geschwister Schneider Technologie-, "
968 "Entwicklungs- und Vertriebs UG. USB2.0 to CAN interfaces.");
969 MODULE_LICENSE("GPL v2");