Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
1) Fix packet header offset calculation in _decode_session6(), from
Hajime Tazaki.
2) Fix route leak in error paths of xfrm_lookup(), from Huaibin Wang.
3) Be sure to clear state properly when scans fail in iwlwifi mvm code,
from Luciano Coelho.
4) iwlwifi tries to stop scans that aren't actually running, also from
Luciano Coelho.
5) mac80211 should drop mesh frames that are not encrypted, fix from
Bob Copeland.
6) Add new device ID to b43 wireless driver for BCM432228 chips, from
Rafał Miłecki.
7) Fix accidental addition of members after variable sized array in
struct tc_u_hnode, from WANG Cong.
8) Don't re-enable interrupts until after we call napi_complete() in
ibmveth and WIZnet drivers, frm Yongbae Park.
9) Fix regression in vlan tag handling of fec driver, from Fugang Duan.
10) If a network namespace change fails during rtnl_newlink(), we don't
unwind the device registry properly.
11) Fix two TCP regressions, from Neal Cardwell:
- Don't allow snd_cwnd_cnt to accumulate huge values due to missing
test in tcp_cong_avoid_ai().
- Restore CUBIC back to advancing cwnd by 1.5x packets per RTT.
12) Fix performance regression in xne-netback involving push TX
notifications, from David Vrabel.
13) __skb_tstamp_tx() can be called with a NULL sk pointer, do not
dereference blindly. From Willem de Bruijn.
14) Fix potential stack overflow in RDS protocol stack, from Arnd
Bergmann.
15) VXLAN_VID_MASK used incorrectly in new remote checksum offload
support of VXLAN driver. Fix from Alexey Kodanev.
16) Fix too small netlink SKB allocation in inet_diag layer, from Eric
Dumazet.
17) ieee80211_check_combinations() does not count interfaces correctly,
from Andrei Otcheretianski.
18) Hardware feature determination in bxn2x driver references a piece of
software state that actually isn't initialized yet, fix from Michal
Schmidt.
19) inet_csk_wait_for_connect() needs a sched_annotate_sleep()
annoation, from Eric Dumazet.
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (56 commits)
Revert "net: cx82310_eth: use common match macro"
net/mlx4_en: Set statistics bitmap at port init
IB/mlx4: Saturate RoCE port PMA counters in case of overflow
net/mlx4_en: Fix off-by-one in ethtool statistics display
IB/mlx4: Verify net device validity on port change event
act_bpf: allow non-default TC_ACT opcodes as BPF exec outcome
Revert "smc91x: retrieve IRQ and trigger flags in a modern way"
inet: Clean up inet_csk_wait_for_connect() vs. might_sleep()
ip6_tunnel: fix error code when tunnel exists
netdevice.h: fix ndo_bridge_* comments
bnx2x: fix encapsulation features on 57710/57711
mac80211: ignore CSA to same channel
nl80211: ignore HT/VHT capabilities without QoS/WMM
mac80211: ask for ECSA IE to be considered for beacon parse CRC
mac80211: count interfaces correctly for combination checks
isdn: icn: use strlcpy() when parsing setup options
rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg()
caif: fix MSG_OOB test in caif_seqpkt_recvmsg()
bridge: reset bridge mtu after deleting an interface
can: kvaser_usb: Fix tx queue start/stop race conditions
...
This commit is contained in:
commit
47226fe1b5
63 changed files with 444 additions and 237 deletions
|
|
@ -1741,7 +1741,7 @@ S: Maintained
|
|||
F: drivers/net/ethernet/atheros/
|
||||
|
||||
ATM
|
||||
M: Chas Williams <chas@cmf.nrl.navy.mil>
|
||||
M: Chas Williams <3chas3@gmail.com>
|
||||
L: linux-atm-general@lists.sourceforge.net (moderated for non-subscribers)
|
||||
L: netdev@vger.kernel.org
|
||||
W: http://linux-atm.sourceforge.net
|
||||
|
|
|
|||
|
|
@ -64,6 +64,14 @@ enum {
|
|||
#define GUID_TBL_BLK_NUM_ENTRIES 8
|
||||
#define GUID_TBL_BLK_SIZE (GUID_TBL_ENTRY_SIZE * GUID_TBL_BLK_NUM_ENTRIES)
|
||||
|
||||
/* Counters should be saturate once they reach their maximum value */
|
||||
#define ASSIGN_32BIT_COUNTER(counter, value) do {\
|
||||
if ((value) > U32_MAX) \
|
||||
counter = cpu_to_be32(U32_MAX); \
|
||||
else \
|
||||
counter = cpu_to_be32(value); \
|
||||
} while (0)
|
||||
|
||||
struct mlx4_mad_rcv_buf {
|
||||
struct ib_grh grh;
|
||||
u8 payload[256];
|
||||
|
|
@ -806,10 +814,14 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
|||
static void edit_counter(struct mlx4_counter *cnt,
|
||||
struct ib_pma_portcounters *pma_cnt)
|
||||
{
|
||||
pma_cnt->port_xmit_data = cpu_to_be32((be64_to_cpu(cnt->tx_bytes)>>2));
|
||||
pma_cnt->port_rcv_data = cpu_to_be32((be64_to_cpu(cnt->rx_bytes)>>2));
|
||||
pma_cnt->port_xmit_packets = cpu_to_be32(be64_to_cpu(cnt->tx_frames));
|
||||
pma_cnt->port_rcv_packets = cpu_to_be32(be64_to_cpu(cnt->rx_frames));
|
||||
ASSIGN_32BIT_COUNTER(pma_cnt->port_xmit_data,
|
||||
(be64_to_cpu(cnt->tx_bytes) >> 2));
|
||||
ASSIGN_32BIT_COUNTER(pma_cnt->port_rcv_data,
|
||||
(be64_to_cpu(cnt->rx_bytes) >> 2));
|
||||
ASSIGN_32BIT_COUNTER(pma_cnt->port_xmit_packets,
|
||||
be64_to_cpu(cnt->tx_frames));
|
||||
ASSIGN_32BIT_COUNTER(pma_cnt->port_rcv_packets,
|
||||
be64_to_cpu(cnt->rx_frames));
|
||||
}
|
||||
|
||||
static int iboe_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
|
||||
|
|
|
|||
|
|
@ -2697,8 +2697,12 @@ static void handle_bonded_port_state_event(struct work_struct *work)
|
|||
spin_lock_bh(&ibdev->iboe.lock);
|
||||
for (i = 0; i < MLX4_MAX_PORTS; ++i) {
|
||||
struct net_device *curr_netdev = ibdev->iboe.netdevs[i];
|
||||
enum ib_port_state curr_port_state;
|
||||
|
||||
enum ib_port_state curr_port_state =
|
||||
if (!curr_netdev)
|
||||
continue;
|
||||
|
||||
curr_port_state =
|
||||
(netif_running(curr_netdev) &&
|
||||
netif_carrier_ok(curr_netdev)) ?
|
||||
IB_PORT_ACTIVE : IB_PORT_DOWN;
|
||||
|
|
|
|||
|
|
@ -1609,7 +1609,7 @@ icn_setup(char *line)
|
|||
if (ints[0] > 1)
|
||||
membase = (unsigned long)ints[2];
|
||||
if (str && *str) {
|
||||
strcpy(sid, str);
|
||||
strlcpy(sid, str, sizeof(sid));
|
||||
icn_id = sid;
|
||||
if ((p = strchr(sid, ','))) {
|
||||
*p++ = 0;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ config CAN_RCAR
|
|||
|
||||
config CAN_XILINXCAN
|
||||
tristate "Xilinx CAN"
|
||||
depends on ARCH_ZYNQ || MICROBLAZE || COMPILE_TEST
|
||||
depends on ARCH_ZYNQ || ARM64 || MICROBLAZE || COMPILE_TEST
|
||||
depends on COMMON_CLK && HAS_IOMEM
|
||||
---help---
|
||||
Xilinx CAN driver. This driver supports both soft AXI CAN IP and
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
* Copyright (C) 2015 Valeo S.A.
|
||||
*/
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/module.h>
|
||||
|
|
@ -467,10 +468,11 @@ struct kvaser_usb {
|
|||
struct kvaser_usb_net_priv {
|
||||
struct can_priv can;
|
||||
|
||||
atomic_t active_tx_urbs;
|
||||
struct usb_anchor tx_submitted;
|
||||
spinlock_t tx_contexts_lock;
|
||||
int active_tx_contexts;
|
||||
struct kvaser_usb_tx_urb_context tx_contexts[MAX_TX_URBS];
|
||||
|
||||
struct usb_anchor tx_submitted;
|
||||
struct completion start_comp, stop_comp;
|
||||
|
||||
struct kvaser_usb *dev;
|
||||
|
|
@ -694,6 +696,7 @@ static void kvaser_usb_tx_acknowledge(const struct kvaser_usb *dev,
|
|||
struct kvaser_usb_net_priv *priv;
|
||||
struct sk_buff *skb;
|
||||
struct can_frame *cf;
|
||||
unsigned long flags;
|
||||
u8 channel, tid;
|
||||
|
||||
channel = msg->u.tx_acknowledge_header.channel;
|
||||
|
|
@ -737,12 +740,15 @@ static void kvaser_usb_tx_acknowledge(const struct kvaser_usb *dev,
|
|||
|
||||
stats->tx_packets++;
|
||||
stats->tx_bytes += context->dlc;
|
||||
|
||||
spin_lock_irqsave(&priv->tx_contexts_lock, flags);
|
||||
|
||||
can_get_echo_skb(priv->netdev, context->echo_index);
|
||||
|
||||
context->echo_index = MAX_TX_URBS;
|
||||
atomic_dec(&priv->active_tx_urbs);
|
||||
|
||||
--priv->active_tx_contexts;
|
||||
netif_wake_queue(priv->netdev);
|
||||
|
||||
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
||||
}
|
||||
|
||||
static void kvaser_usb_simple_msg_callback(struct urb *urb)
|
||||
|
|
@ -803,17 +809,6 @@ static int kvaser_usb_simple_msg_async(struct kvaser_usb_net_priv *priv,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv)
|
||||
{
|
||||
int i;
|
||||
|
||||
usb_kill_anchored_urbs(&priv->tx_submitted);
|
||||
atomic_set(&priv->active_tx_urbs, 0);
|
||||
|
||||
for (i = 0; i < MAX_TX_URBS; i++)
|
||||
priv->tx_contexts[i].echo_index = MAX_TX_URBS;
|
||||
}
|
||||
|
||||
static void kvaser_usb_rx_error_update_can_state(struct kvaser_usb_net_priv *priv,
|
||||
const struct kvaser_usb_error_summary *es,
|
||||
struct can_frame *cf)
|
||||
|
|
@ -1515,6 +1510,24 @@ error:
|
|||
return err;
|
||||
}
|
||||
|
||||
static void kvaser_usb_reset_tx_urb_contexts(struct kvaser_usb_net_priv *priv)
|
||||
{
|
||||
int i;
|
||||
|
||||
priv->active_tx_contexts = 0;
|
||||
for (i = 0; i < MAX_TX_URBS; i++)
|
||||
priv->tx_contexts[i].echo_index = MAX_TX_URBS;
|
||||
}
|
||||
|
||||
/* This method might sleep. Do not call it in the atomic context
|
||||
* of URB completions.
|
||||
*/
|
||||
static void kvaser_usb_unlink_tx_urbs(struct kvaser_usb_net_priv *priv)
|
||||
{
|
||||
usb_kill_anchored_urbs(&priv->tx_submitted);
|
||||
kvaser_usb_reset_tx_urb_contexts(priv);
|
||||
}
|
||||
|
||||
static void kvaser_usb_unlink_all_urbs(struct kvaser_usb *dev)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -1634,6 +1647,7 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
|
|||
struct kvaser_msg *msg;
|
||||
int i, err, ret = NETDEV_TX_OK;
|
||||
u8 *msg_tx_can_flags = NULL; /* GCC */
|
||||
unsigned long flags;
|
||||
|
||||
if (can_dropped_invalid_skb(netdev, skb))
|
||||
return NETDEV_TX_OK;
|
||||
|
|
@ -1687,12 +1701,21 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
|
|||
if (cf->can_id & CAN_RTR_FLAG)
|
||||
*msg_tx_can_flags |= MSG_FLAG_REMOTE_FRAME;
|
||||
|
||||
spin_lock_irqsave(&priv->tx_contexts_lock, flags);
|
||||
for (i = 0; i < ARRAY_SIZE(priv->tx_contexts); i++) {
|
||||
if (priv->tx_contexts[i].echo_index == MAX_TX_URBS) {
|
||||
context = &priv->tx_contexts[i];
|
||||
|
||||
context->echo_index = i;
|
||||
can_put_echo_skb(skb, netdev, context->echo_index);
|
||||
++priv->active_tx_contexts;
|
||||
if (priv->active_tx_contexts >= MAX_TX_URBS)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
||||
|
||||
/* This should never happen; it implies a flow control bug */
|
||||
if (!context) {
|
||||
|
|
@ -1704,7 +1727,6 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
|
|||
}
|
||||
|
||||
context->priv = priv;
|
||||
context->echo_index = i;
|
||||
context->dlc = cf->can_dlc;
|
||||
|
||||
msg->u.tx_can.tid = context->echo_index;
|
||||
|
|
@ -1716,18 +1738,17 @@ static netdev_tx_t kvaser_usb_start_xmit(struct sk_buff *skb,
|
|||
kvaser_usb_write_bulk_callback, context);
|
||||
usb_anchor_urb(urb, &priv->tx_submitted);
|
||||
|
||||
can_put_echo_skb(skb, netdev, context->echo_index);
|
||||
|
||||
atomic_inc(&priv->active_tx_urbs);
|
||||
|
||||
if (atomic_read(&priv->active_tx_urbs) >= MAX_TX_URBS)
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
err = usb_submit_urb(urb, GFP_ATOMIC);
|
||||
if (unlikely(err)) {
|
||||
spin_lock_irqsave(&priv->tx_contexts_lock, flags);
|
||||
|
||||
can_free_echo_skb(netdev, context->echo_index);
|
||||
context->echo_index = MAX_TX_URBS;
|
||||
--priv->active_tx_contexts;
|
||||
netif_wake_queue(netdev);
|
||||
|
||||
spin_unlock_irqrestore(&priv->tx_contexts_lock, flags);
|
||||
|
||||
atomic_dec(&priv->active_tx_urbs);
|
||||
usb_unanchor_urb(urb);
|
||||
|
||||
stats->tx_dropped++;
|
||||
|
|
@ -1854,7 +1875,7 @@ static int kvaser_usb_init_one(struct usb_interface *intf,
|
|||
struct kvaser_usb *dev = usb_get_intfdata(intf);
|
||||
struct net_device *netdev;
|
||||
struct kvaser_usb_net_priv *priv;
|
||||
int i, err;
|
||||
int err;
|
||||
|
||||
err = kvaser_usb_send_simple_msg(dev, CMD_RESET_CHIP, channel);
|
||||
if (err)
|
||||
|
|
@ -1868,19 +1889,17 @@ static int kvaser_usb_init_one(struct usb_interface *intf,
|
|||
|
||||
priv = netdev_priv(netdev);
|
||||
|
||||
init_usb_anchor(&priv->tx_submitted);
|
||||
init_completion(&priv->start_comp);
|
||||
init_completion(&priv->stop_comp);
|
||||
|
||||
init_usb_anchor(&priv->tx_submitted);
|
||||
atomic_set(&priv->active_tx_urbs, 0);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(priv->tx_contexts); i++)
|
||||
priv->tx_contexts[i].echo_index = MAX_TX_URBS;
|
||||
|
||||
priv->dev = dev;
|
||||
priv->netdev = netdev;
|
||||
priv->channel = channel;
|
||||
|
||||
spin_lock_init(&priv->tx_contexts_lock);
|
||||
kvaser_usb_reset_tx_urb_contexts(priv);
|
||||
|
||||
priv->can.state = CAN_STATE_STOPPED;
|
||||
priv->can.clock.freq = CAN_USB_CLOCK;
|
||||
priv->can.bittiming_const = &kvaser_usb_bittiming_const;
|
||||
|
|
|
|||
|
|
@ -12769,7 +12769,7 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_dev *pdev,
|
|||
NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6 |
|
||||
NETIF_F_RXCSUM | NETIF_F_LRO | NETIF_F_GRO |
|
||||
NETIF_F_RXHASH | NETIF_F_HW_VLAN_CTAG_TX;
|
||||
if (!CHIP_IS_E1x(bp)) {
|
||||
if (!chip_is_e1x) {
|
||||
dev->hw_features |= NETIF_F_GSO_GRE | NETIF_F_GSO_UDP_TUNNEL |
|
||||
NETIF_F_GSO_IPIP | NETIF_F_GSO_SIT;
|
||||
dev->hw_enc_features =
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,
|
|||
}
|
||||
|
||||
/* Installed successfully, update the cached header too. */
|
||||
memcpy(card_fw, fs_fw, sizeof(*card_fw));
|
||||
*card_fw = *fs_fw;
|
||||
card_fw_usable = 1;
|
||||
*reset = 0; /* already reset as part of load_fw */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -589,7 +589,7 @@ static void tulip_tx_timeout(struct net_device *dev)
|
|||
(unsigned int)tp->rx_ring[i].buffer1,
|
||||
(unsigned int)tp->rx_ring[i].buffer2,
|
||||
buf[0], buf[1], buf[2]);
|
||||
for (j = 0; buf[j] != 0xee && j < 1600; j++)
|
||||
for (j = 0; ((j < 1600) && buf[j] != 0xee); j++)
|
||||
if (j < 100)
|
||||
pr_cont(" %02x", buf[j]);
|
||||
pr_cont(" j=%d\n", j);
|
||||
|
|
|
|||
|
|
@ -1189,13 +1189,12 @@ static void
|
|||
fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
|
||||
{
|
||||
struct fec_enet_private *fep;
|
||||
struct bufdesc *bdp, *bdp_t;
|
||||
struct bufdesc *bdp;
|
||||
unsigned short status;
|
||||
struct sk_buff *skb;
|
||||
struct fec_enet_priv_tx_q *txq;
|
||||
struct netdev_queue *nq;
|
||||
int index = 0;
|
||||
int i, bdnum;
|
||||
int entries_free;
|
||||
|
||||
fep = netdev_priv(ndev);
|
||||
|
|
@ -1216,29 +1215,18 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)
|
|||
if (bdp == txq->cur_tx)
|
||||
break;
|
||||
|
||||
bdp_t = bdp;
|
||||
bdnum = 1;
|
||||
index = fec_enet_get_bd_index(txq->tx_bd_base, bdp_t, fep);
|
||||
skb = txq->tx_skbuff[index];
|
||||
while (!skb) {
|
||||
bdp_t = fec_enet_get_nextdesc(bdp_t, fep, queue_id);
|
||||
index = fec_enet_get_bd_index(txq->tx_bd_base, bdp_t, fep);
|
||||
skb = txq->tx_skbuff[index];
|
||||
bdnum++;
|
||||
}
|
||||
if (skb_shinfo(skb)->nr_frags &&
|
||||
(status = bdp_t->cbd_sc) & BD_ENET_TX_READY)
|
||||
break;
|
||||
index = fec_enet_get_bd_index(txq->tx_bd_base, bdp, fep);
|
||||
|
||||
for (i = 0; i < bdnum; i++) {
|
||||
if (!IS_TSO_HEADER(txq, bdp->cbd_bufaddr))
|
||||
dma_unmap_single(&fep->pdev->dev, bdp->cbd_bufaddr,
|
||||
bdp->cbd_datlen, DMA_TO_DEVICE);
|
||||
bdp->cbd_bufaddr = 0;
|
||||
if (i < bdnum - 1)
|
||||
bdp = fec_enet_get_nextdesc(bdp, fep, queue_id);
|
||||
}
|
||||
skb = txq->tx_skbuff[index];
|
||||
txq->tx_skbuff[index] = NULL;
|
||||
if (!IS_TSO_HEADER(txq, bdp->cbd_bufaddr))
|
||||
dma_unmap_single(&fep->pdev->dev, bdp->cbd_bufaddr,
|
||||
bdp->cbd_datlen, DMA_TO_DEVICE);
|
||||
bdp->cbd_bufaddr = 0;
|
||||
if (!skb) {
|
||||
bdp = fec_enet_get_nextdesc(bdp, fep, queue_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check for errors. */
|
||||
if (status & (BD_ENET_TX_HB | BD_ENET_TX_LC |
|
||||
|
|
@ -1479,8 +1467,7 @@ fec_enet_rx_queue(struct net_device *ndev, int budget, u16 queue_id)
|
|||
|
||||
vlan_packet_rcvd = true;
|
||||
|
||||
skb_copy_to_linear_data_offset(skb, VLAN_HLEN,
|
||||
data, (2 * ETH_ALEN));
|
||||
memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2);
|
||||
skb_pull(skb, VLAN_HLEN);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1136,6 +1136,8 @@ restart_poll:
|
|||
ibmveth_replenish_task(adapter);
|
||||
|
||||
if (frames_processed < budget) {
|
||||
napi_complete(napi);
|
||||
|
||||
/* We think we are done - reenable interrupts,
|
||||
* then check once more to make sure we are done.
|
||||
*/
|
||||
|
|
@ -1144,8 +1146,6 @@ restart_poll:
|
|||
|
||||
BUG_ON(lpar_rc != H_SUCCESS);
|
||||
|
||||
napi_complete(napi);
|
||||
|
||||
if (ibmveth_rxq_pending_buffer(adapter) &&
|
||||
napi_reschedule(napi)) {
|
||||
lpar_rc = h_vio_signal(adapter->vdev->unit_address,
|
||||
|
|
|
|||
|
|
@ -1698,8 +1698,6 @@ int mlx4_en_start_port(struct net_device *dev)
|
|||
/* Schedule multicast task to populate multicast list */
|
||||
queue_work(mdev->workqueue, &priv->rx_mode_task);
|
||||
|
||||
mlx4_set_stats_bitmap(mdev->dev, &priv->stats_bitmap);
|
||||
|
||||
#ifdef CONFIG_MLX4_EN_VXLAN
|
||||
if (priv->mdev->dev->caps.tunnel_offload_mode == MLX4_TUNNEL_OFFLOAD_MODE_VXLAN)
|
||||
vxlan_get_rx_port(dev);
|
||||
|
|
@ -2853,6 +2851,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
|
|||
queue_delayed_work(mdev->workqueue, &priv->service_task,
|
||||
SERVICE_TASK_DELAY);
|
||||
|
||||
mlx4_set_stats_bitmap(mdev->dev, &priv->stats_bitmap);
|
||||
|
||||
return 0;
|
||||
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ struct mlx4_en_port_stats {
|
|||
unsigned long rx_chksum_none;
|
||||
unsigned long rx_chksum_complete;
|
||||
unsigned long tx_chksum_offload;
|
||||
#define NUM_PORT_STATS 9
|
||||
#define NUM_PORT_STATS 10
|
||||
};
|
||||
|
||||
struct mlx4_en_perf_stats {
|
||||
|
|
|
|||
|
|
@ -2248,10 +2248,9 @@ static int smc_drv_probe(struct platform_device *pdev)
|
|||
const struct of_device_id *match = NULL;
|
||||
struct smc_local *lp;
|
||||
struct net_device *ndev;
|
||||
struct resource *res;
|
||||
struct resource *res, *ires;
|
||||
unsigned int __iomem *addr;
|
||||
unsigned long irq_flags = SMC_IRQ_FLAGS;
|
||||
unsigned long irq_resflags;
|
||||
int ret;
|
||||
|
||||
ndev = alloc_etherdev(sizeof(struct smc_local));
|
||||
|
|
@ -2343,19 +2342,16 @@ static int smc_drv_probe(struct platform_device *pdev)
|
|||
goto out_free_netdev;
|
||||
}
|
||||
|
||||
ndev->irq = platform_get_irq(pdev, 0);
|
||||
if (ndev->irq <= 0) {
|
||||
ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (!ires) {
|
||||
ret = -ENODEV;
|
||||
goto out_release_io;
|
||||
}
|
||||
/*
|
||||
* If this platform does not specify any special irqflags, or if
|
||||
* the resource supplies a trigger, override the irqflags with
|
||||
* the trigger flags from the resource.
|
||||
*/
|
||||
irq_resflags = irqd_get_trigger_type(irq_get_irq_data(ndev->irq));
|
||||
if (irq_flags == -1 || irq_resflags & IRQF_TRIGGER_MASK)
|
||||
irq_flags = irq_resflags & IRQF_TRIGGER_MASK;
|
||||
|
||||
ndev->irq = ires->start;
|
||||
|
||||
if (irq_flags == -1 || ires->flags & IRQF_TRIGGER_MASK)
|
||||
irq_flags = ires->flags & IRQF_TRIGGER_MASK;
|
||||
|
||||
ret = smc_request_attrib(pdev, ndev);
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -498,9 +498,9 @@ static int w5100_napi_poll(struct napi_struct *napi, int budget)
|
|||
}
|
||||
|
||||
if (rx_count < budget) {
|
||||
napi_complete(napi);
|
||||
w5100_write(priv, W5100_IMR, IR_S0);
|
||||
mmiowb();
|
||||
napi_complete(napi);
|
||||
}
|
||||
|
||||
return rx_count;
|
||||
|
|
|
|||
|
|
@ -418,9 +418,9 @@ static int w5300_napi_poll(struct napi_struct *napi, int budget)
|
|||
}
|
||||
|
||||
if (rx_count < budget) {
|
||||
napi_complete(napi);
|
||||
w5300_write(priv, W5300_IMR, IR_S0);
|
||||
mmiowb();
|
||||
napi_complete(napi);
|
||||
}
|
||||
|
||||
return rx_count;
|
||||
|
|
|
|||
|
|
@ -300,9 +300,18 @@ static const struct driver_info cx82310_info = {
|
|||
.tx_fixup = cx82310_tx_fixup,
|
||||
};
|
||||
|
||||
#define USB_DEVICE_CLASS(vend, prod, cl, sc, pr) \
|
||||
.match_flags = USB_DEVICE_ID_MATCH_DEVICE | \
|
||||
USB_DEVICE_ID_MATCH_DEV_INFO, \
|
||||
.idVendor = (vend), \
|
||||
.idProduct = (prod), \
|
||||
.bDeviceClass = (cl), \
|
||||
.bDeviceSubClass = (sc), \
|
||||
.bDeviceProtocol = (pr)
|
||||
|
||||
static const struct usb_device_id products[] = {
|
||||
{
|
||||
USB_DEVICE_AND_INTERFACE_INFO(0x0572, 0xcb01, 0xff, 0, 0),
|
||||
USB_DEVICE_CLASS(0x0572, 0xcb01, 0xff, 0, 0),
|
||||
.driver_info = (unsigned long) &cx82310_info
|
||||
},
|
||||
{ },
|
||||
|
|
|
|||
|
|
@ -1448,8 +1448,10 @@ static void virtnet_free_queues(struct virtnet_info *vi)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < vi->max_queue_pairs; i++)
|
||||
for (i = 0; i < vi->max_queue_pairs; i++) {
|
||||
napi_hash_del(&vi->rq[i].napi);
|
||||
netif_napi_del(&vi->rq[i].napi);
|
||||
}
|
||||
|
||||
kfree(vi->rq);
|
||||
kfree(vi->sq);
|
||||
|
|
@ -1948,11 +1950,8 @@ static int virtnet_freeze(struct virtio_device *vdev)
|
|||
cancel_delayed_work_sync(&vi->refill);
|
||||
|
||||
if (netif_running(vi->dev)) {
|
||||
for (i = 0; i < vi->max_queue_pairs; i++) {
|
||||
for (i = 0; i < vi->max_queue_pairs; i++)
|
||||
napi_disable(&vi->rq[i].napi);
|
||||
napi_hash_del(&vi->rq[i].napi);
|
||||
netif_napi_del(&vi->rq[i].napi);
|
||||
}
|
||||
}
|
||||
|
||||
remove_vq_common(vi);
|
||||
|
|
|
|||
|
|
@ -1218,7 +1218,7 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
goto drop;
|
||||
|
||||
flags &= ~VXLAN_HF_RCO;
|
||||
vni &= VXLAN_VID_MASK;
|
||||
vni &= VXLAN_VNI_MASK;
|
||||
}
|
||||
|
||||
/* For backwards compatibility, only allow reserved fields to be
|
||||
|
|
@ -1239,7 +1239,7 @@ static int vxlan_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
|
|||
flags &= ~VXLAN_GBP_USED_BITS;
|
||||
}
|
||||
|
||||
if (flags || (vni & ~VXLAN_VID_MASK)) {
|
||||
if (flags || vni & ~VXLAN_VNI_MASK) {
|
||||
/* If there are any unprocessed flags remaining treat
|
||||
* this as a malformed packet. This behavior diverges from
|
||||
* VXLAN RFC (RFC7348) which stipulates that bits in reserved
|
||||
|
|
|
|||
|
|
@ -5370,6 +5370,7 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy,
|
|||
case 0x432a: /* BCM4321 */
|
||||
case 0x432d: /* BCM4322 */
|
||||
case 0x4352: /* BCM43222 */
|
||||
case 0x435a: /* BCM43228 */
|
||||
case 0x4333: /* BCM4331 */
|
||||
case 0x43a2: /* BCM4360 */
|
||||
case 0x43b3: /* BCM4352 */
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue