linux-can-fixes-for-4.17-20180510
-----BEGIN PGP SIGNATURE----- iQFHBAABCgAxFiEENrCndlB/VnAEWuH5k9IU1zQoZfEFAlr0dbcTHG1rbEBwZW5n dXRyb25peC5kZQAKCRCT0hTXNChl8Vj0CAC3JNk7QXU+WIEwtdKZU8GW1z+gBtXb xpaidY91djsj/2L3xzgIF+gRL6BHFQnK+0ylqmHsk38QVijl6SsWp8LPOy35u1wN yGdlEZNvnajguWENUr8cnNAtkICa7b1JR6Eyqt8ZY5Ugns2G+js6tqX3FCxkpu2I ZRMheSJ6tQcw1SjTQgC6rhsYFipSxOEdqNzdLDo3K4Ttmb2osoHnBcVZllUwZeTu iSUktcCjrbv24JNkyf1HE5wt8X3zT5nnSiAPs6JW3xwcS/kw4QOsZsFx7JwoVssB oulQ1YGz/uT13rPh40MsPNyiG65BpQCCu3JKmgJGF4Kbmd8CO3NyzA17 =G0cT -----END PGP SIGNATURE----- Merge tag 'linux-can-fixes-for-4.17-20180510' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== this is a pull request for net/master consisting of 2 patches. Both patches are from Lukas Wunner and fix two problems found in the hi311x CAN driver under high load situations. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
ca3943c4aa
|
@ -91,6 +91,7 @@
|
|||
#define HI3110_STAT_BUSOFF BIT(2)
|
||||
#define HI3110_STAT_ERRP BIT(3)
|
||||
#define HI3110_STAT_ERRW BIT(4)
|
||||
#define HI3110_STAT_TXMTY BIT(7)
|
||||
|
||||
#define HI3110_BTR0_SJW_SHIFT 6
|
||||
#define HI3110_BTR0_BRP_SHIFT 0
|
||||
|
@ -427,8 +428,10 @@ static int hi3110_get_berr_counter(const struct net_device *net,
|
|||
struct hi3110_priv *priv = netdev_priv(net);
|
||||
struct spi_device *spi = priv->spi;
|
||||
|
||||
mutex_lock(&priv->hi3110_lock);
|
||||
bec->txerr = hi3110_read(spi, HI3110_READ_TEC);
|
||||
bec->rxerr = hi3110_read(spi, HI3110_READ_REC);
|
||||
mutex_unlock(&priv->hi3110_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -735,10 +738,7 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id)
|
|||
}
|
||||
}
|
||||
|
||||
if (intf == 0)
|
||||
break;
|
||||
|
||||
if (intf & HI3110_INT_TXCPLT) {
|
||||
if (priv->tx_len && statf & HI3110_STAT_TXMTY) {
|
||||
net->stats.tx_packets++;
|
||||
net->stats.tx_bytes += priv->tx_len - 1;
|
||||
can_led_event(net, CAN_LED_EVENT_TX);
|
||||
|
@ -748,6 +748,9 @@ static irqreturn_t hi3110_can_ist(int irq, void *dev_id)
|
|||
}
|
||||
netif_wake_queue(net);
|
||||
}
|
||||
|
||||
if (intf == 0)
|
||||
break;
|
||||
}
|
||||
mutex_unlock(&priv->hi3110_lock);
|
||||
return IRQ_HANDLED;
|
||||
|
|
Loading…
Reference in New Issue