diff options
-rw-r--r-- | drivers/net/can/flexcan.c | 9 | ||||
-rw-r--r-- | drivers/net/can/peak_canfd/peak_pciefd_main.c | 5 | ||||
-rw-r--r-- | drivers/net/can/sja1000/peak_pci.c | 5 | ||||
-rw-r--r-- | drivers/net/can/ti_hecc.c | 3 | ||||
-rw-r--r-- | drivers/net/can/usb/kvaser_usb.c | 11 | ||||
-rw-r--r-- | drivers/net/can/usb/mcba_usb.c | 3 |
6 files changed, 25 insertions, 11 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index a13a4896a8bd..0626dcfd1f3d 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c | |||
@@ -184,12 +184,12 @@ | |||
184 | * Below is some version info we got: | 184 | * Below is some version info we got: |
185 | * SOC Version IP-Version Glitch- [TR]WRN_INT IRQ Err Memory err RTR re- | 185 | * SOC Version IP-Version Glitch- [TR]WRN_INT IRQ Err Memory err RTR re- |
186 | * Filter? connected? Passive detection ception in MB | 186 | * Filter? connected? Passive detection ception in MB |
187 | * MX25 FlexCAN2 03.00.00.00 no no ? no no | 187 | * MX25 FlexCAN2 03.00.00.00 no no no no no |
188 | * MX28 FlexCAN2 03.00.04.00 yes yes no no no | 188 | * MX28 FlexCAN2 03.00.04.00 yes yes no no no |
189 | * MX35 FlexCAN2 03.00.00.00 no no ? no no | 189 | * MX35 FlexCAN2 03.00.00.00 no no no no no |
190 | * MX53 FlexCAN2 03.00.00.00 yes no no no no | 190 | * MX53 FlexCAN2 03.00.00.00 yes no no no no |
191 | * MX6s FlexCAN3 10.00.12.00 yes yes no no yes | 191 | * MX6s FlexCAN3 10.00.12.00 yes yes no no yes |
192 | * VF610 FlexCAN3 ? no yes ? yes yes? | 192 | * VF610 FlexCAN3 ? no yes no yes yes? |
193 | * | 193 | * |
194 | * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. | 194 | * Some SOCs do not have the RX_WARN & TX_WARN interrupt line connected. |
195 | */ | 195 | */ |
@@ -297,7 +297,8 @@ static const struct flexcan_devtype_data fsl_imx6q_devtype_data = { | |||
297 | 297 | ||
298 | static const struct flexcan_devtype_data fsl_vf610_devtype_data = { | 298 | static const struct flexcan_devtype_data fsl_vf610_devtype_data = { |
299 | .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | | 299 | .quirks = FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | |
300 | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP, | 300 | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_USE_OFF_TIMESTAMP | |
301 | FLEXCAN_QUIRK_BROKEN_PERR_STATE, | ||
301 | }; | 302 | }; |
302 | 303 | ||
303 | static const struct can_bittiming_const flexcan_bittiming_const = { | 304 | static const struct can_bittiming_const flexcan_bittiming_const = { |
diff --git a/drivers/net/can/peak_canfd/peak_pciefd_main.c b/drivers/net/can/peak_canfd/peak_pciefd_main.c index b4efd711f824..788c3464a3b0 100644 --- a/drivers/net/can/peak_canfd/peak_pciefd_main.c +++ b/drivers/net/can/peak_canfd/peak_pciefd_main.c | |||
@@ -825,7 +825,10 @@ err_release_regions: | |||
825 | err_disable_pci: | 825 | err_disable_pci: |
826 | pci_disable_device(pdev); | 826 | pci_disable_device(pdev); |
827 | 827 | ||
828 | return err; | 828 | /* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while |
829 | * the probe() function must return a negative errno in case of failure | ||
830 | * (err is unchanged if negative) */ | ||
831 | return pcibios_err_to_errno(err); | ||
829 | } | 832 | } |
830 | 833 | ||
831 | /* free the board structure object, as well as its resources: */ | 834 | /* free the board structure object, as well as its resources: */ |
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c index 131026fbc2d7..5adc95c922ee 100644 --- a/drivers/net/can/sja1000/peak_pci.c +++ b/drivers/net/can/sja1000/peak_pci.c | |||
@@ -717,7 +717,10 @@ failure_release_regions: | |||
717 | failure_disable_pci: | 717 | failure_disable_pci: |
718 | pci_disable_device(pdev); | 718 | pci_disable_device(pdev); |
719 | 719 | ||
720 | return err; | 720 | /* pci_xxx_config_word() return positive PCIBIOS_xxx error codes while |
721 | * the probe() function must return a negative errno in case of failure | ||
722 | * (err is unchanged if negative) */ | ||
723 | return pcibios_err_to_errno(err); | ||
721 | } | 724 | } |
722 | 725 | ||
723 | static void peak_pci_remove(struct pci_dev *pdev) | 726 | static void peak_pci_remove(struct pci_dev *pdev) |
diff --git a/drivers/net/can/ti_hecc.c b/drivers/net/can/ti_hecc.c index 4d4941469cfc..db6ea936dc3f 100644 --- a/drivers/net/can/ti_hecc.c +++ b/drivers/net/can/ti_hecc.c | |||
@@ -637,6 +637,9 @@ static int ti_hecc_rx_poll(struct napi_struct *napi, int quota) | |||
637 | mbx_mask = hecc_read(priv, HECC_CANMIM); | 637 | mbx_mask = hecc_read(priv, HECC_CANMIM); |
638 | mbx_mask |= HECC_TX_MBOX_MASK; | 638 | mbx_mask |= HECC_TX_MBOX_MASK; |
639 | hecc_write(priv, HECC_CANMIM, mbx_mask); | 639 | hecc_write(priv, HECC_CANMIM, mbx_mask); |
640 | } else { | ||
641 | /* repoll is done only if whole budget is used */ | ||
642 | num_pkts = quota; | ||
640 | } | 643 | } |
641 | 644 | ||
642 | return num_pkts; | 645 | return num_pkts; |
diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index 9b18d96ef526..f95945915d20 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c | |||
@@ -609,8 +609,8 @@ static int kvaser_usb_wait_msg(const struct kvaser_usb *dev, u8 id, | |||
609 | } | 609 | } |
610 | 610 | ||
611 | if (pos + tmp->len > actual_len) { | 611 | if (pos + tmp->len > actual_len) { |
612 | dev_err(dev->udev->dev.parent, | 612 | dev_err_ratelimited(dev->udev->dev.parent, |
613 | "Format error\n"); | 613 | "Format error\n"); |
614 | break; | 614 | break; |
615 | } | 615 | } |
616 | 616 | ||
@@ -813,6 +813,7 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv, | |||
813 | if (err) { | 813 | if (err) { |
814 | netdev_err(netdev, "Error transmitting URB\n"); | 814 | netdev_err(netdev, "Error transmitting URB\n"); |
815 | usb_unanchor_urb(urb); | 815 | usb_unanchor_urb(urb); |
816 | kfree(buf); | ||
816 | usb_free_urb(urb); | 817 | usb_free_urb(urb); |
817 | return err; | 818 | return err; |
818 | } | 819 | } |
@@ -1333,7 +1334,7 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb) | |||
1333 | goto resubmit_urb; | 1334 | goto resubmit_urb; |
1334 | } | 1335 | } |
1335 | 1336 | ||
1336 | while (pos <= urb->actual_length - MSG_HEADER_LEN) { | 1337 | while (pos <= (int)(urb->actual_length - MSG_HEADER_LEN)) { |
1337 | msg = urb->transfer_buffer + pos; | 1338 | msg = urb->transfer_buffer + pos; |
1338 | 1339 | ||
1339 | /* The Kvaser firmware can only read and write messages that | 1340 | /* The Kvaser firmware can only read and write messages that |
@@ -1352,7 +1353,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb) | |||
1352 | } | 1353 | } |
1353 | 1354 | ||
1354 | if (pos + msg->len > urb->actual_length) { | 1355 | if (pos + msg->len > urb->actual_length) { |
1355 | dev_err(dev->udev->dev.parent, "Format error\n"); | 1356 | dev_err_ratelimited(dev->udev->dev.parent, |
1357 | "Format error\n"); | ||
1356 | break; | 1358 | break; |
1357 | } | 1359 | } |
1358 | 1360 | ||
@@ -1768,6 +1770,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb, | |||
1768 | spin_unlock_irqrestore(&priv->tx_contexts_lock, flags); | 1770 | spin_unlock_irqrestore(&priv->tx_contexts_lock, flags); |
1769 | 1771 | ||
1770 | usb_unanchor_urb(urb); | 1772 | usb_unanchor_urb(urb); |
1773 | kfree(buf); | ||
1771 | 1774 | ||
1772 | stats->tx_dropped++; | 1775 | stats->tx_dropped++; |
1773 | 1776 | ||
diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c index 7f0272558bef..ef417dcddbf7 100644 --- a/drivers/net/can/usb/mcba_usb.c +++ b/drivers/net/can/usb/mcba_usb.c | |||
@@ -592,6 +592,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb) | |||
592 | break; | 592 | break; |
593 | 593 | ||
594 | case -ENOENT: | 594 | case -ENOENT: |
595 | case -EPIPE: | ||
595 | case -ESHUTDOWN: | 596 | case -ESHUTDOWN: |
596 | return; | 597 | return; |
597 | 598 | ||
@@ -862,7 +863,7 @@ static int mcba_usb_probe(struct usb_interface *intf, | |||
862 | goto cleanup_unregister_candev; | 863 | goto cleanup_unregister_candev; |
863 | } | 864 | } |
864 | 865 | ||
865 | dev_info(&intf->dev, "Microchip CAN BUS analizer connected\n"); | 866 | dev_info(&intf->dev, "Microchip CAN BUS Analyzer connected\n"); |
866 | 867 | ||
867 | return 0; | 868 | return 0; |
868 | 869 | ||