Skip to content

Commit da1b466

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) When dcbnl_cee_fill() fails to be able to push a new netlink attribute, it return 0 instead of an error code. From Pan Bian. 2) Two suffix handling fixes to FIB trie code, from Alexander Duyck. 3) bnxt_hwrm_stat_ctx_alloc() goes through all the trouble of setting and maintaining a return code 'rc' but fails to actually return it. Also from Pan Bian. 4) ping socket ICMP handler needs to validate ICMP header length, from Kees Cook. 5) caif_sktinit_module() has this interesting logic: int err = sock_register(...); if (!err) return err; return 0; Just return sock_register()'s return value directly which is the only possible correct thing to do. 6) Two bnx2x driver fixes from Yuval Mintz, return a reasonable estimate from get_ringparam() ethtool op when interface is down and avoid trying to use UDP port based tunneling on 577xx chips. 7) Fix ep93xx_eth crash on module unload from Florian Fainelli. 8) Missing uapi exports, from Stephen Hemminger. 9) Don't schedule work from sk_destruct(), because the socket will be freed upon return from that function. From Herbert Xu. 10) Buggy drivers, of which we know there is at least one, can send a huge packet into the TCP stack but forget to set the gso_size in the SKB, which causes all kinds of problems. Correct this when it happens, and emit a one-time warning with the device name included so that it can be diagnosed more easily. From Marcelo Ricardo Leitner. 11) virtio-net does DMA off the stack causes hiccups with VMAP_STACK, fix from Andy Lutomirski. 12) Fix fec driver compilation with CONFIG_M5272, from Nikita Yushchenko. 13) mlx5 fixes from Kamal Heib, Saeed Mahameed, and Mohamad Haj Yahia. (erroneously flushing queues on error, module parameter validation, etc) * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits) net/mlx5e: Change the SQ/RQ operational state to positive logic net/mlx5e: Don't flush SQ on error net/mlx5e: Don't notify HW when filling the edge of ICO SQ net/mlx5: Fix query ISSI flow net/mlx5: Remove duplicate pci dev name print net/mlx5: Verify module parameters net: fec: fix compile with CONFIG_M5272 be2net: Add DEVSEC privilege to SET_HSW_CONFIG command. virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address() tcp: warn on bogus MSS and try to amend it uapi glibc compat: fix outer guard of net device flags enum net: stmmac: clear reset value of snps, wr_osr_lmt/snps, rd_osr_lmt before writing netlink: Do not schedule work from sk_destruct uapi: export nf_log.h uapi: export tc_skbmod.h net: ep93xx_eth: Do not crash unloading module bnx2x: Prevent tunnel config for 577xx bnx2x: Correct ringparam estimate when DOWN isdn: hisax: set error code on failure net: bnx2x: fix improper return value ...
2 parents 10d20bd + 32f16e1 commit da1b466

36 files changed

Lines changed: 194 additions & 117 deletions

File tree

drivers/atm/eni.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ static int eni_do_init(struct atm_dev *dev)
17271727
printk("\n");
17281728
printk(KERN_ERR DEV_LABEL "(itf %d): can't set up page "
17291729
"mapping\n",dev->number);
1730-
return error;
1730+
return -ENOMEM;
17311731
}
17321732
eni_dev->ioaddr = base;
17331733
eni_dev->base_diff = real_base - (unsigned long) base;

drivers/atm/lanai.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,6 +2143,7 @@ static int lanai_dev_open(struct atm_dev *atmdev)
21432143
lanai->base = (bus_addr_t) ioremap(raw_base, LANAI_MAPPING_SIZE);
21442144
if (lanai->base == NULL) {
21452145
printk(KERN_ERR DEV_LABEL ": couldn't remap I/O space\n");
2146+
result = -ENOMEM;
21462147
goto error_pci;
21472148
}
21482149
/* 3.3: Reset lanai and PHY */

drivers/isdn/hisax/hfc4s8s_l1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1499,6 +1499,7 @@ hfc4s8s_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
14991499
printk(KERN_INFO
15001500
"HFC-4S/8S: failed to request address space at 0x%04x\n",
15011501
hw->iobase);
1502+
err = -EBUSY;
15021503
goto out;
15031504
}
15041505

drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,8 +1872,16 @@ static void bnx2x_get_ringparam(struct net_device *dev,
18721872

18731873
ering->rx_max_pending = MAX_RX_AVAIL;
18741874

1875+
/* If size isn't already set, we give an estimation of the number
1876+
* of buffers we'll have. We're neglecting some possible conditions
1877+
* [we couldn't know for certain at this point if number of queues
1878+
* might shrink] but the number would be correct for the likely
1879+
* scenario.
1880+
*/
18751881
if (bp->rx_ring_size)
18761882
ering->rx_pending = bp->rx_ring_size;
1883+
else if (BNX2X_NUM_RX_QUEUES(bp))
1884+
ering->rx_pending = MAX_RX_AVAIL / BNX2X_NUM_RX_QUEUES(bp);
18771885
else
18781886
ering->rx_pending = MAX_RX_AVAIL;
18791887

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10138,7 +10138,7 @@ static void __bnx2x_add_udp_port(struct bnx2x *bp, u16 port,
1013810138
{
1013910139
struct bnx2x_udp_tunnel *udp_port = &bp->udp_tunnel_ports[type];
1014010140

10141-
if (!netif_running(bp->dev) || !IS_PF(bp))
10141+
if (!netif_running(bp->dev) || !IS_PF(bp) || CHIP_IS_E1x(bp))
1014210142
return;
1014310143

1014410144
if (udp_port->count && udp_port->dst_port == port) {
@@ -10163,7 +10163,7 @@ static void __bnx2x_del_udp_port(struct bnx2x *bp, u16 port,
1016310163
{
1016410164
struct bnx2x_udp_tunnel *udp_port = &bp->udp_tunnel_ports[type];
1016510165

10166-
if (!IS_PF(bp))
10166+
if (!IS_PF(bp) || CHIP_IS_E1x(bp))
1016710167
return;
1016810168

1016910169
if (!udp_port->count || udp_port->dst_port != port) {
@@ -13505,6 +13505,7 @@ static int bnx2x_init_firmware(struct bnx2x *bp)
1350513505

1350613506
/* Initialize the pointers to the init arrays */
1350713507
/* Blob */
13508+
rc = -ENOMEM;
1350813509
BNX2X_ALLOC_AND_SET(init_data, request_firmware_exit, be32_to_cpu_n);
1350913510

1351013511
/* Opcodes */

drivers/net/ethernet/broadcom/bnxt/bnxt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4120,7 +4120,7 @@ static int bnxt_hwrm_stat_ctx_alloc(struct bnxt *bp)
41204120
bp->grp_info[i].fw_stats_ctx = cpr->hw_stats_ctx_id;
41214121
}
41224122
mutex_unlock(&bp->hwrm_cmd_lock);
4123-
return 0;
4123+
return rc;
41244124
}
41254125

41264126
static int bnxt_hwrm_func_qcfg(struct bnxt *bp)

drivers/net/ethernet/cirrus/ep93xx_eth.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ static void ep93xx_free_buffers(struct ep93xx_priv *ep)
468468
struct device *dev = ep->dev->dev.parent;
469469
int i;
470470

471+
if (!ep->descs)
472+
return;
473+
471474
for (i = 0; i < RX_QUEUE_ENTRIES; i++) {
472475
dma_addr_t d;
473476

@@ -490,6 +493,7 @@ static void ep93xx_free_buffers(struct ep93xx_priv *ep)
490493

491494
dma_free_coherent(dev, sizeof(struct ep93xx_descs), ep->descs,
492495
ep->descs_dma_addr);
496+
ep->descs = NULL;
493497
}
494498

495499
static int ep93xx_alloc_buffers(struct ep93xx_priv *ep)

drivers/net/ethernet/emulex/benet/be_cmds.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ static struct be_cmd_priv_map cmd_priv_map[] = {
9090
{
9191
OPCODE_COMMON_SET_HSW_CONFIG,
9292
CMD_SUBSYSTEM_COMMON,
93-
BE_PRIV_DEVCFG | BE_PRIV_VHADM
93+
BE_PRIV_DEVCFG | BE_PRIV_VHADM |
94+
BE_PRIV_DEVSEC
9495
},
9596
{
9697
OPCODE_COMMON_GET_EXT_FAT_CAPABILITIES,

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2313,6 +2313,8 @@ static const struct fec_stat {
23132313
{ "IEEE_rx_octets_ok", IEEE_R_OCTETS_OK },
23142314
};
23152315

2316+
#define FEC_STATS_SIZE (ARRAY_SIZE(fec_stats) * sizeof(u64))
2317+
23162318
static void fec_enet_update_ethtool_stats(struct net_device *dev)
23172319
{
23182320
struct fec_enet_private *fep = netdev_priv(dev);
@@ -2330,7 +2332,7 @@ static void fec_enet_get_ethtool_stats(struct net_device *dev,
23302332
if (netif_running(dev))
23312333
fec_enet_update_ethtool_stats(dev);
23322334

2333-
memcpy(data, fep->ethtool_stats, ARRAY_SIZE(fec_stats) * sizeof(u64));
2335+
memcpy(data, fep->ethtool_stats, FEC_STATS_SIZE);
23342336
}
23352337

23362338
static void fec_enet_get_strings(struct net_device *netdev,
@@ -2355,6 +2357,12 @@ static int fec_enet_get_sset_count(struct net_device *dev, int sset)
23552357
return -EOPNOTSUPP;
23562358
}
23572359
}
2360+
2361+
#else /* !defined(CONFIG_M5272) */
2362+
#define FEC_STATS_SIZE 0
2363+
static inline void fec_enet_update_ethtool_stats(struct net_device *dev)
2364+
{
2365+
}
23582366
#endif /* !defined(CONFIG_M5272) */
23592367

23602368
static int fec_enet_nway_reset(struct net_device *dev)
@@ -3293,8 +3301,7 @@ fec_probe(struct platform_device *pdev)
32933301

32943302
/* Init network device */
32953303
ndev = alloc_etherdev_mqs(sizeof(struct fec_enet_private) +
3296-
ARRAY_SIZE(fec_stats) * sizeof(u64),
3297-
num_tx_qs, num_rx_qs);
3304+
FEC_STATS_SIZE, num_tx_qs, num_rx_qs);
32983305
if (!ndev)
32993306
return -ENOMEM;
33003307

drivers/net/ethernet/mellanox/mlx5/core/cmd.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,6 @@ static void dump_buf(void *buf, int size, int data_only, int offset)
268268
pr_debug("\n");
269269
}
270270

271-
enum {
272-
MLX5_DRIVER_STATUS_ABORTED = 0xfe,
273-
MLX5_DRIVER_SYND = 0xbadd00de,
274-
};
275-
276271
static int mlx5_internal_err_ret_value(struct mlx5_core_dev *dev, u16 op,
277272
u32 *synd, u8 *status)
278273
{

0 commit comments

Comments
 (0)