1 // SPDX-License-Identifier: GPL-2.0-only
2 /* SocketCAN driver for Microchip CAN BUS Analyzer Tool
4 * Copyright (C) 2017 Mobica Limited
6 * This driver is inspired by the 4.6.2 version of net/can/usb/usb_8dev.c
9 #include <asm/unaligned.h>
10 #include <linux/can.h>
11 #include <linux/can/dev.h>
12 #include <linux/can/error.h>
13 #include <linux/can/led.h>
14 #include <linux/module.h>
15 #include <linux/netdevice.h>
16 #include <linux/signal.h>
17 #include <linux/slab.h>
18 #include <linux/usb.h>
20 /* vendor and product id */
21 #define MCBA_MODULE_NAME "mcba_usb"
22 #define MCBA_VENDOR_ID 0x04d8
23 #define MCBA_PRODUCT_ID 0x0a30
25 /* driver constants */
26 #define MCBA_MAX_RX_URBS 20
27 #define MCBA_MAX_TX_URBS 20
28 #define MCBA_CTX_FREE MCBA_MAX_TX_URBS
30 /* RX buffer must be bigger than msg size since at the
31 * beginning USB messages are stacked.
33 #define MCBA_USB_RX_BUFF_SIZE 64
34 #define MCBA_USB_TX_BUFF_SIZE (sizeof(struct mcba_usb_msg))
36 /* MCBA endpoint numbers */
37 #define MCBA_USB_EP_IN 1
38 #define MCBA_USB_EP_OUT 1
40 /* Microchip command id */
41 #define MBCA_CMD_RECEIVE_MESSAGE 0xE3
42 #define MBCA_CMD_I_AM_ALIVE_FROM_CAN 0xF5
43 #define MBCA_CMD_I_AM_ALIVE_FROM_USB 0xF7
44 #define MBCA_CMD_CHANGE_BIT_RATE 0xA1
45 #define MBCA_CMD_TRANSMIT_MESSAGE_EV 0xA3
46 #define MBCA_CMD_SETUP_TERMINATION_RESISTANCE 0xA8
47 #define MBCA_CMD_READ_FW_VERSION 0xA9
48 #define MBCA_CMD_NOTHING_TO_SEND 0xFF
49 #define MBCA_CMD_TRANSMIT_MESSAGE_RSP 0xE2
51 #define MCBA_VER_REQ_USB 1
52 #define MCBA_VER_REQ_CAN 2
54 #define MCBA_SIDL_EXID_MASK 0x8
55 #define MCBA_DLC_MASK 0xf
56 #define MCBA_DLC_RTR_MASK 0x40
58 #define MCBA_CAN_STATE_WRN_TH 95
59 #define MCBA_CAN_STATE_ERR_PSV_TH 127
61 #define MCBA_TERMINATION_DISABLED CAN_TERMINATION_DISABLED
62 #define MCBA_TERMINATION_ENABLED 120
65 struct mcba_priv *priv;
71 /* Structure to hold all of our device specific stuff */
73 struct can_priv can; /* must be the first member */
74 struct sk_buff *echo_skb[MCBA_MAX_TX_URBS];
75 struct mcba_usb_ctx tx_context[MCBA_MAX_TX_URBS];
76 struct usb_device *udev;
77 struct net_device *netdev;
78 struct usb_anchor tx_submitted;
79 struct usb_anchor rx_submitted;
80 struct can_berr_counter bec;
81 bool usb_ka_first_pass;
82 bool can_ka_first_pass;
84 atomic_t free_ctx_cnt;
88 struct __packed mcba_usb_msg_can {
99 struct __packed mcba_usb_msg {
104 struct __packed mcba_usb_msg_ka_usb {
106 u8 termination_state;
112 struct __packed mcba_usb_msg_ka_can {
129 struct __packed mcba_usb_msg_change_bitrate {
135 struct __packed mcba_usb_msg_termination {
141 struct __packed mcba_usb_msg_fw_ver {
147 static const struct usb_device_id mcba_usb_table[] = {
148 { USB_DEVICE(MCBA_VENDOR_ID, MCBA_PRODUCT_ID) },
149 {} /* Terminating entry */
152 MODULE_DEVICE_TABLE(usb, mcba_usb_table);
154 static const u16 mcba_termination[] = { MCBA_TERMINATION_DISABLED,
155 MCBA_TERMINATION_ENABLED };
157 static const u32 mcba_bitrate[] = { 20000, 33333, 50000, 80000, 83333,
158 100000, 125000, 150000, 175000, 200000,
159 225000, 250000, 275000, 300000, 500000,
160 625000, 800000, 1000000 };
162 static inline void mcba_init_ctx(struct mcba_priv *priv)
166 for (i = 0; i < MCBA_MAX_TX_URBS; i++) {
167 priv->tx_context[i].ndx = MCBA_CTX_FREE;
168 priv->tx_context[i].priv = priv;
171 atomic_set(&priv->free_ctx_cnt, ARRAY_SIZE(priv->tx_context));
174 static inline struct mcba_usb_ctx *mcba_usb_get_free_ctx(struct mcba_priv *priv,
175 struct can_frame *cf)
178 struct mcba_usb_ctx *ctx = NULL;
180 for (i = 0; i < MCBA_MAX_TX_URBS; i++) {
181 if (priv->tx_context[i].ndx == MCBA_CTX_FREE) {
182 ctx = &priv->tx_context[i];
193 atomic_dec(&priv->free_ctx_cnt);
198 if (!atomic_read(&priv->free_ctx_cnt))
199 /* That was the last free ctx. Slow down tx path */
200 netif_stop_queue(priv->netdev);
205 /* mcba_usb_free_ctx and mcba_usb_get_free_ctx are executed by different
206 * threads. The order of execution in below function is important.
208 static inline void mcba_usb_free_ctx(struct mcba_usb_ctx *ctx)
210 /* Increase number of free ctxs before freeing ctx */
211 atomic_inc(&ctx->priv->free_ctx_cnt);
213 ctx->ndx = MCBA_CTX_FREE;
215 /* Wake up the queue once ctx is marked free */
216 netif_wake_queue(ctx->priv->netdev);
219 static void mcba_usb_write_bulk_callback(struct urb *urb)
221 struct mcba_usb_ctx *ctx = urb->context;
222 struct net_device *netdev;
226 netdev = ctx->priv->netdev;
228 /* free up our allocated buffer */
229 usb_free_coherent(urb->dev, urb->transfer_buffer_length,
230 urb->transfer_buffer, urb->transfer_dma);
233 if (!netif_device_present(netdev))
236 netdev->stats.tx_packets++;
237 netdev->stats.tx_bytes += ctx->dlc;
239 can_led_event(netdev, CAN_LED_EVENT_TX);
240 can_get_echo_skb(netdev, ctx->ndx);
244 netdev_info(netdev, "Tx URB aborted (%d)\n", urb->status);
246 /* Release the context */
247 mcba_usb_free_ctx(ctx);
250 /* Send data to device */
251 static netdev_tx_t mcba_usb_xmit(struct mcba_priv *priv,
252 struct mcba_usb_msg *usb_msg,
253 struct mcba_usb_ctx *ctx)
259 /* create a URB, and a buffer for it, and copy the data to the URB */
260 urb = usb_alloc_urb(0, GFP_ATOMIC);
264 buf = usb_alloc_coherent(priv->udev, MCBA_USB_TX_BUFF_SIZE, GFP_ATOMIC,
271 memcpy(buf, usb_msg, MCBA_USB_TX_BUFF_SIZE);
273 usb_fill_bulk_urb(urb, priv->udev,
274 usb_sndbulkpipe(priv->udev, MCBA_USB_EP_OUT), buf,
275 MCBA_USB_TX_BUFF_SIZE, mcba_usb_write_bulk_callback,
278 urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
279 usb_anchor_urb(urb, &priv->tx_submitted);
281 err = usb_submit_urb(urb, GFP_ATOMIC);
285 /* Release our reference to this URB, the USB core will eventually free
293 usb_unanchor_urb(urb);
294 usb_free_coherent(priv->udev, MCBA_USB_TX_BUFF_SIZE, buf,
298 netif_device_detach(priv->netdev);
300 netdev_warn(priv->netdev, "failed tx_urb %d\n", err);
308 /* Send data to device */
309 static netdev_tx_t mcba_usb_start_xmit(struct sk_buff *skb,
310 struct net_device *netdev)
312 struct mcba_priv *priv = netdev_priv(netdev);
313 struct can_frame *cf = (struct can_frame *)skb->data;
314 struct mcba_usb_ctx *ctx = NULL;
315 struct net_device_stats *stats = &priv->netdev->stats;
318 struct mcba_usb_msg_can usb_msg = {
319 .cmd_id = MBCA_CMD_TRANSMIT_MESSAGE_EV
322 if (can_dropped_invalid_skb(netdev, skb))
325 ctx = mcba_usb_get_free_ctx(priv, cf);
327 return NETDEV_TX_BUSY;
329 if (cf->can_id & CAN_EFF_FLAG) {
330 /* SIDH | SIDL | EIDH | EIDL
331 * 28 - 21 | 20 19 18 x x x 17 16 | 15 - 8 | 7 - 0
333 sid = MCBA_SIDL_EXID_MASK;
334 /* store 28-18 bits */
335 sid |= (cf->can_id & 0x1ffc0000) >> 13;
336 /* store 17-16 bits */
337 sid |= (cf->can_id & 0x30000) >> 16;
338 put_unaligned_be16(sid, &usb_msg.sid);
340 /* store 15-0 bits */
341 put_unaligned_be16(cf->can_id & 0xffff, &usb_msg.eid);
344 * 10 - 3 | 2 1 0 x x x x x
346 put_unaligned_be16((cf->can_id & CAN_SFF_MASK) << 5,
351 usb_msg.dlc = cf->len;
353 memcpy(usb_msg.data, cf->data, usb_msg.dlc);
355 if (cf->can_id & CAN_RTR_FLAG)
356 usb_msg.dlc |= MCBA_DLC_RTR_MASK;
358 can_put_echo_skb(skb, priv->netdev, ctx->ndx);
360 err = mcba_usb_xmit(priv, (struct mcba_usb_msg *)&usb_msg, ctx);
367 can_free_echo_skb(priv->netdev, ctx->ndx);
368 mcba_usb_free_ctx(ctx);
375 /* Send cmd to device */
376 static void mcba_usb_xmit_cmd(struct mcba_priv *priv,
377 struct mcba_usb_msg *usb_msg)
379 struct mcba_usb_ctx *ctx = NULL;
382 ctx = mcba_usb_get_free_ctx(priv, NULL);
384 netdev_err(priv->netdev,
385 "Lack of free ctx. Sending (%d) cmd aborted",
391 err = mcba_usb_xmit(priv, usb_msg, ctx);
393 netdev_err(priv->netdev, "Failed to send cmd (%d)",
397 static void mcba_usb_xmit_change_bitrate(struct mcba_priv *priv, u16 bitrate)
399 struct mcba_usb_msg_change_bitrate usb_msg = {
400 .cmd_id = MBCA_CMD_CHANGE_BIT_RATE
403 put_unaligned_be16(bitrate, &usb_msg.bitrate);
405 mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg);
408 static void mcba_usb_xmit_read_fw_ver(struct mcba_priv *priv, u8 pic)
410 struct mcba_usb_msg_fw_ver usb_msg = {
411 .cmd_id = MBCA_CMD_READ_FW_VERSION,
415 mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg);
418 static void mcba_usb_process_can(struct mcba_priv *priv,
419 struct mcba_usb_msg_can *msg)
421 struct can_frame *cf;
423 struct net_device_stats *stats = &priv->netdev->stats;
426 skb = alloc_can_skb(priv->netdev, &cf);
430 sid = get_unaligned_be16(&msg->sid);
432 if (sid & MCBA_SIDL_EXID_MASK) {
433 /* SIDH | SIDL | EIDH | EIDL
434 * 28 - 21 | 20 19 18 x x x 17 16 | 15 - 8 | 7 - 0
436 cf->can_id = CAN_EFF_FLAG;
438 /* store 28-18 bits */
439 cf->can_id |= (sid & 0xffe0) << 13;
440 /* store 17-16 bits */
441 cf->can_id |= (sid & 3) << 16;
442 /* store 15-0 bits */
443 cf->can_id |= get_unaligned_be16(&msg->eid);
446 * 10 - 3 | 2 1 0 x x x x x
448 cf->can_id = (sid & 0xffe0) >> 5;
451 if (msg->dlc & MCBA_DLC_RTR_MASK)
452 cf->can_id |= CAN_RTR_FLAG;
454 cf->len = can_cc_dlc2len(msg->dlc & MCBA_DLC_MASK);
456 memcpy(cf->data, msg->data, cf->len);
459 stats->rx_bytes += cf->len;
461 can_led_event(priv->netdev, CAN_LED_EVENT_RX);
465 static void mcba_usb_process_ka_usb(struct mcba_priv *priv,
466 struct mcba_usb_msg_ka_usb *msg)
468 if (unlikely(priv->usb_ka_first_pass)) {
469 netdev_info(priv->netdev, "PIC USB version %hhu.%hhu\n",
470 msg->soft_ver_major, msg->soft_ver_minor);
472 priv->usb_ka_first_pass = false;
475 if (msg->termination_state)
476 priv->can.termination = MCBA_TERMINATION_ENABLED;
478 priv->can.termination = MCBA_TERMINATION_DISABLED;
481 static u32 convert_can2host_bitrate(struct mcba_usb_msg_ka_can *msg)
483 const u32 bitrate = get_unaligned_be16(&msg->can_bitrate);
485 if ((bitrate == 33) || (bitrate == 83))
486 return bitrate * 1000 + 333;
488 return bitrate * 1000;
491 static void mcba_usb_process_ka_can(struct mcba_priv *priv,
492 struct mcba_usb_msg_ka_can *msg)
494 if (unlikely(priv->can_ka_first_pass)) {
495 netdev_info(priv->netdev, "PIC CAN version %hhu.%hhu\n",
496 msg->soft_ver_major, msg->soft_ver_minor);
498 priv->can_ka_first_pass = false;
501 if (unlikely(priv->can_speed_check)) {
502 const u32 bitrate = convert_can2host_bitrate(msg);
504 priv->can_speed_check = false;
506 if (bitrate != priv->can.bittiming.bitrate)
509 "Wrong bitrate reported by the device (%u). Expected %u",
510 bitrate, priv->can.bittiming.bitrate);
513 priv->bec.txerr = msg->tx_err_cnt;
514 priv->bec.rxerr = msg->rx_err_cnt;
517 priv->can.state = CAN_STATE_BUS_OFF;
519 else if ((priv->bec.txerr > MCBA_CAN_STATE_ERR_PSV_TH) ||
520 (priv->bec.rxerr > MCBA_CAN_STATE_ERR_PSV_TH))
521 priv->can.state = CAN_STATE_ERROR_PASSIVE;
523 else if ((priv->bec.txerr > MCBA_CAN_STATE_WRN_TH) ||
524 (priv->bec.rxerr > MCBA_CAN_STATE_WRN_TH))
525 priv->can.state = CAN_STATE_ERROR_WARNING;
528 static void mcba_usb_process_rx(struct mcba_priv *priv,
529 struct mcba_usb_msg *msg)
531 switch (msg->cmd_id) {
532 case MBCA_CMD_I_AM_ALIVE_FROM_CAN:
533 mcba_usb_process_ka_can(priv,
534 (struct mcba_usb_msg_ka_can *)msg);
537 case MBCA_CMD_I_AM_ALIVE_FROM_USB:
538 mcba_usb_process_ka_usb(priv,
539 (struct mcba_usb_msg_ka_usb *)msg);
542 case MBCA_CMD_RECEIVE_MESSAGE:
543 mcba_usb_process_can(priv, (struct mcba_usb_msg_can *)msg);
546 case MBCA_CMD_NOTHING_TO_SEND:
547 /* Side effect of communication between PIC_USB and PIC_CAN.
548 * PIC_CAN is telling us that it has nothing to send
552 case MBCA_CMD_TRANSMIT_MESSAGE_RSP:
553 /* Transmission response from the device containing timestamp */
557 netdev_warn(priv->netdev, "Unsupported msg (0x%hhX)",
563 /* Callback for reading data from device
565 * Check urb status, call read function and resubmit urb read operation.
567 static void mcba_usb_read_bulk_callback(struct urb *urb)
569 struct mcba_priv *priv = urb->context;
570 struct net_device *netdev;
574 netdev = priv->netdev;
576 if (!netif_device_present(netdev))
579 switch (urb->status) {
580 case 0: /* success */
590 netdev_info(netdev, "Rx URB aborted (%d)\n", urb->status);
595 while (pos < urb->actual_length) {
596 struct mcba_usb_msg *msg;
598 if (pos + sizeof(struct mcba_usb_msg) > urb->actual_length) {
599 netdev_err(priv->netdev, "format error\n");
603 msg = (struct mcba_usb_msg *)(urb->transfer_buffer + pos);
604 mcba_usb_process_rx(priv, msg);
606 pos += sizeof(struct mcba_usb_msg);
611 usb_fill_bulk_urb(urb, priv->udev,
612 usb_rcvbulkpipe(priv->udev, MCBA_USB_EP_OUT),
613 urb->transfer_buffer, MCBA_USB_RX_BUFF_SIZE,
614 mcba_usb_read_bulk_callback, priv);
616 retval = usb_submit_urb(urb, GFP_ATOMIC);
618 if (retval == -ENODEV)
619 netif_device_detach(netdev);
621 netdev_err(netdev, "failed resubmitting read bulk urb: %d\n",
625 /* Start USB device */
626 static int mcba_usb_start(struct mcba_priv *priv)
628 struct net_device *netdev = priv->netdev;
633 for (i = 0; i < MCBA_MAX_RX_URBS; i++) {
634 struct urb *urb = NULL;
637 /* create a URB, and a buffer for it */
638 urb = usb_alloc_urb(0, GFP_KERNEL);
644 buf = usb_alloc_coherent(priv->udev, MCBA_USB_RX_BUFF_SIZE,
645 GFP_KERNEL, &urb->transfer_dma);
647 netdev_err(netdev, "No memory left for USB buffer\n");
653 usb_fill_bulk_urb(urb, priv->udev,
654 usb_rcvbulkpipe(priv->udev, MCBA_USB_EP_IN),
655 buf, MCBA_USB_RX_BUFF_SIZE,
656 mcba_usb_read_bulk_callback, priv);
657 urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
658 usb_anchor_urb(urb, &priv->rx_submitted);
660 err = usb_submit_urb(urb, GFP_KERNEL);
662 usb_unanchor_urb(urb);
663 usb_free_coherent(priv->udev, MCBA_USB_RX_BUFF_SIZE,
664 buf, urb->transfer_dma);
669 /* Drop reference, USB core will take care of freeing it */
673 /* Did we submit any URBs */
675 netdev_warn(netdev, "couldn't setup read URBs\n");
679 /* Warn if we've couldn't transmit all the URBs */
680 if (i < MCBA_MAX_RX_URBS)
681 netdev_warn(netdev, "rx performance may be slow\n");
683 mcba_usb_xmit_read_fw_ver(priv, MCBA_VER_REQ_USB);
684 mcba_usb_xmit_read_fw_ver(priv, MCBA_VER_REQ_CAN);
689 /* Open USB device */
690 static int mcba_usb_open(struct net_device *netdev)
692 struct mcba_priv *priv = netdev_priv(netdev);
696 err = open_candev(netdev);
700 priv->can_speed_check = true;
701 priv->can.state = CAN_STATE_ERROR_ACTIVE;
703 can_led_event(netdev, CAN_LED_EVENT_OPEN);
704 netif_start_queue(netdev);
709 static void mcba_urb_unlink(struct mcba_priv *priv)
711 usb_kill_anchored_urbs(&priv->rx_submitted);
712 usb_kill_anchored_urbs(&priv->tx_submitted);
715 /* Close USB device */
716 static int mcba_usb_close(struct net_device *netdev)
718 struct mcba_priv *priv = netdev_priv(netdev);
720 priv->can.state = CAN_STATE_STOPPED;
722 netif_stop_queue(netdev);
725 mcba_urb_unlink(priv);
727 close_candev(netdev);
728 can_led_event(netdev, CAN_LED_EVENT_STOP);
733 /* Set network device mode
735 * Maybe we should leave this function empty, because the device
736 * set mode variable with open command.
738 static int mcba_net_set_mode(struct net_device *netdev, enum can_mode mode)
743 static int mcba_net_get_berr_counter(const struct net_device *netdev,
744 struct can_berr_counter *bec)
746 struct mcba_priv *priv = netdev_priv(netdev);
748 bec->txerr = priv->bec.txerr;
749 bec->rxerr = priv->bec.rxerr;
754 static const struct net_device_ops mcba_netdev_ops = {
755 .ndo_open = mcba_usb_open,
756 .ndo_stop = mcba_usb_close,
757 .ndo_start_xmit = mcba_usb_start_xmit,
760 /* Microchip CANBUS has hardcoded bittiming values by default.
761 * This function sends request via USB to change the speed and align bittiming
762 * values for presentation purposes only
764 static int mcba_net_set_bittiming(struct net_device *netdev)
766 struct mcba_priv *priv = netdev_priv(netdev);
767 const u16 bitrate_kbps = priv->can.bittiming.bitrate / 1000;
769 mcba_usb_xmit_change_bitrate(priv, bitrate_kbps);
774 static int mcba_set_termination(struct net_device *netdev, u16 term)
776 struct mcba_priv *priv = netdev_priv(netdev);
777 struct mcba_usb_msg_termination usb_msg = {
778 .cmd_id = MBCA_CMD_SETUP_TERMINATION_RESISTANCE
781 if (term == MCBA_TERMINATION_ENABLED)
782 usb_msg.termination = 1;
784 usb_msg.termination = 0;
786 mcba_usb_xmit_cmd(priv, (struct mcba_usb_msg *)&usb_msg);
791 static int mcba_usb_probe(struct usb_interface *intf,
792 const struct usb_device_id *id)
794 struct net_device *netdev;
795 struct mcba_priv *priv;
797 struct usb_device *usbdev = interface_to_usbdev(intf);
799 netdev = alloc_candev(sizeof(struct mcba_priv), MCBA_MAX_TX_URBS);
801 dev_err(&intf->dev, "Couldn't alloc candev\n");
805 priv = netdev_priv(netdev);
808 priv->netdev = netdev;
809 priv->usb_ka_first_pass = true;
810 priv->can_ka_first_pass = true;
811 priv->can_speed_check = false;
813 init_usb_anchor(&priv->rx_submitted);
814 init_usb_anchor(&priv->tx_submitted);
816 usb_set_intfdata(intf, priv);
818 /* Init CAN device */
819 priv->can.state = CAN_STATE_STOPPED;
820 priv->can.termination_const = mcba_termination;
821 priv->can.termination_const_cnt = ARRAY_SIZE(mcba_termination);
822 priv->can.bitrate_const = mcba_bitrate;
823 priv->can.bitrate_const_cnt = ARRAY_SIZE(mcba_bitrate);
825 priv->can.do_set_termination = mcba_set_termination;
826 priv->can.do_set_mode = mcba_net_set_mode;
827 priv->can.do_get_berr_counter = mcba_net_get_berr_counter;
828 priv->can.do_set_bittiming = mcba_net_set_bittiming;
830 netdev->netdev_ops = &mcba_netdev_ops;
832 netdev->flags |= IFF_ECHO; /* we support local echo */
834 SET_NETDEV_DEV(netdev, &intf->dev);
836 err = register_candev(netdev);
838 netdev_err(netdev, "couldn't register CAN device: %d\n", err);
840 goto cleanup_free_candev;
843 devm_can_led_init(netdev);
845 /* Start USB dev only if we have successfully registered CAN device */
846 err = mcba_usb_start(priv);
849 netif_device_detach(priv->netdev);
851 netdev_warn(netdev, "couldn't start device: %d\n", err);
853 goto cleanup_unregister_candev;
856 dev_info(&intf->dev, "Microchip CAN BUS Analyzer connected\n");
860 cleanup_unregister_candev:
861 unregister_candev(priv->netdev);
869 /* Called by the usb core when driver is unloaded or device is removed */
870 static void mcba_usb_disconnect(struct usb_interface *intf)
872 struct mcba_priv *priv = usb_get_intfdata(intf);
874 usb_set_intfdata(intf, NULL);
876 netdev_info(priv->netdev, "device disconnected\n");
878 unregister_candev(priv->netdev);
879 mcba_urb_unlink(priv);
880 free_candev(priv->netdev);
883 static struct usb_driver mcba_usb_driver = {
884 .name = MCBA_MODULE_NAME,
885 .probe = mcba_usb_probe,
886 .disconnect = mcba_usb_disconnect,
887 .id_table = mcba_usb_table,
890 module_usb_driver(mcba_usb_driver);
893 MODULE_DESCRIPTION("SocketCAN driver for Microchip CAN BUS Analyzer Tool");
894 MODULE_LICENSE("GPL v2");