Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd29117a authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'linux-can-fixes-for-4.15-20171208' of...

Merge tag 'linux-can-fixes-for-4.15-20171208' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can



Marc Kleine-Budde says:

====================
pull-request: can 2017-12-08

this is a pull request of 6 patches for net/master.

Martin Kelly provides 5 patches for various USB based CAN drivers, that
properly cancel the URBs on adapter unplug, so that the driver doesn't
end up in an endless loop. Stephane Grosjean provides a patch to restart
the tx queue if zero length packages are transmitted.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 03afb6e4 91785de6
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -258,21 +258,18 @@ static int pucan_handle_can_rx(struct peak_canfd_priv *priv,
	/* if this frame is an echo, */
	if ((rx_msg_flags & PUCAN_MSG_LOOPED_BACK) &&
	    !(rx_msg_flags & PUCAN_MSG_SELF_RECEIVE)) {
		int n;
		unsigned long flags;

		spin_lock_irqsave(&priv->echo_lock, flags);
		n = can_get_echo_skb(priv->ndev, msg->client);
		can_get_echo_skb(priv->ndev, msg->client);
		spin_unlock_irqrestore(&priv->echo_lock, flags);

		/* count bytes of the echo instead of skb */
		stats->tx_bytes += cf_len;
		stats->tx_packets++;

		if (n) {
			/* restart tx queue only if a slot is free */
		/* restart tx queue (a slot is free) */
		netif_wake_queue(priv->ndev);
		}

		return 0;
	}
+2 −0
Original line number Diff line number Diff line
@@ -288,6 +288,8 @@ static void ems_usb_read_interrupt_callback(struct urb *urb)

	case -ECONNRESET: /* unlink */
	case -ENOENT:
	case -EPIPE:
	case -EPROTO:
	case -ESHUTDOWN:
		return;

+2 −0
Original line number Diff line number Diff line
@@ -393,6 +393,8 @@ static void esd_usb2_read_bulk_callback(struct urb *urb)
		break;

	case -ENOENT:
	case -EPIPE:
	case -EPROTO:
	case -ESHUTDOWN:
		return;

+2 −0
Original line number Diff line number Diff line
@@ -1326,6 +1326,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb)
	case 0:
		break;
	case -ENOENT:
	case -EPIPE:
	case -EPROTO:
	case -ESHUTDOWN:
		return;
	default:
+1 −0
Original line number Diff line number Diff line
@@ -593,6 +593,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb)

	case -ENOENT:
	case -EPIPE:
	case -EPROTO:
	case -ESHUTDOWN:
		return;

Loading