Skip to content

Commit 9da060d

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: "A moderately sized pile of fixes, some specifically for merge window introduced regressions although others are for longer standing items and have been queued up for -stable. I'm kind of tired of all the RDS protocol bugs over the years, to be honest, it's way out of proportion to the number of people who actually use it. 1) Fix missing range initialization in netfilter IPSET, from Jozsef Kadlecsik. 2) ieee80211_local->tim_lock needs to use BH disabling, from Johannes Berg. 3) Fix DMA syncing in SFC driver, from Ben Hutchings. 4) Fix regression in BOND device MAC address setting, from Jiri Pirko. 5) Missing usb_free_urb in ISDN Hisax driver, from Marina Makienko. 6) Fix UDP checksumming in bnx2x driver for 57710 and 57711 chips, fix from Dmitry Kravkov. 7) Missing cfgspace_lock initialization in BCMA driver. 8) Validate parameter size for SCTP assoc stats getsockopt(), from Guenter Roeck. 9) Fix SCTP association hangs, from Lee A Roberts. 10) Fix jumbo frame handling in r8169, from Francois Romieu. 11) Fix phy_device memory leak, from Petr Malat. 12) Omit trailing FCS from frames received in BGMAC driver, from Hauke Mehrtens. 13) Missing socket refcount release in L2TP, from Guillaume Nault. 14) sctp_endpoint_init should respect passed in gfp_t, rather than use GFP_KERNEL unconditionally. From Dan Carpenter. 15) Add AISX AX88179 USB driver, from Freddy Xin. 16) Remove MAINTAINERS entries for drivers deleted during the merge window, from Cesar Eduardo Barros. 17) RDS protocol can try to allocate huge amounts of memory, check that the user's request length makes sense, from Cong Wang. 18) SCTP should use the provided KMALLOC_MAX_SIZE instead of it's own, bogus, definition. From Cong Wang. 19) Fix deadlocks in FEC driver by moving TX reclaim into NAPI poll, from Frank Li. Also, fix a build error introduced in the merge window. 20) Fix bogus purging of default routes in ipv6, from Lorenzo Colitti. 21) Don't double count RTT measurements when we leave the TCP receive fast path, from Neal Cardwell." * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits) tcp: fix double-counted receiver RTT when leaving receiver fast path CAIF: fix sparse warning for caif_usb rds: simplify a warning message net: fec: fix build error in no MXC platform net: ipv6: Don't purge default router if accept_ra=2 net: fec: put tx to napi poll function to fix dead lock sctp: use KMALLOC_MAX_SIZE instead of its own MAX_KMALLOC_SIZE rds: limit the size allocated by rds_message_alloc() MAINTAINERS: remove eexpress MAINTAINERS: remove drivers/net/wan/cycx* MAINTAINERS: remove 3c505 caif_dev: fix sparse warnings for caif_flow_cb ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver sctp: use the passed in gfp flags instead GFP_KERNEL ipv[4|6]: correct dropwatch false positive in local_deliver_finish l2tp: Restore socket refcount when sendmsg succeeds net/phy: micrel: Disable asymmetric pause for KSZ9021 bgmac: omit the fcs phy: Fix phy_device_free memory leak bnx2x: Fix KR2 work-around condition ...
2 parents e3b5951 + aab2b4b commit 9da060d

59 files changed

Lines changed: 2083 additions & 334 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎MAINTAINERS‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,6 @@ Maintainers List (try to look for most precise areas first)
114114

115115
-----------------------------------
116116

117-
3C505 NETWORK DRIVER
118-
M: Philip Blundell <philb@gnu.org>
119-
L: netdev@vger.kernel.org
120-
S: Maintained
121-
F: drivers/net/ethernet/i825xx/3c505*
122-
123117
3C59X NETWORK DRIVER
124118
M: Steffen Klassert <klassert@mathematik.tu-chemnitz.de>
125119
L: netdev@vger.kernel.org
@@ -2361,12 +2355,6 @@ W: http://www.arm.linux.org.uk/
23612355
S: Maintained
23622356
F: drivers/video/cyber2000fb.*
23632357

2364-
CYCLADES 2X SYNC CARD DRIVER
2365-
M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
2366-
W: http://oops.ghostprotocols.net:81/blog
2367-
S: Maintained
2368-
F: drivers/net/wan/cycx*
2369-
23702358
CYCLADES ASYNC MUX DRIVER
23712359
W: http://www.cyclades.com/
23722360
S: Orphan
@@ -3067,12 +3055,6 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kristoffer/linux-hpc.git
30673055
F: drivers/video/s1d13xxxfb.c
30683056
F: include/video/s1d13xxxfb.h
30693057

3070-
ETHEREXPRESS-16 NETWORK DRIVER
3071-
M: Philip Blundell <philb@gnu.org>
3072-
L: netdev@vger.kernel.org
3073-
S: Maintained
3074-
F: drivers/net/ethernet/i825xx/eexpress.*
3075-
30763058
ETHERNET BRIDGE
30773059
M: Stephen Hemminger <stephen@networkplumber.org>
30783060
L: bridge@lists.linux-foundation.org

‎drivers/bcma/driver_pci_host.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,8 @@ void bcma_core_pci_hostmode_init(struct bcma_drv_pci *pc)
404404
return;
405405
}
406406

407+
spin_lock_init(&pc_host->cfgspace_lock);
408+
407409
pc->host_controller = pc_host;
408410
pc_host->pci_controller.io_resource = &pc_host->io_resource;
409411
pc_host->pci_controller.mem_resource = &pc_host->mem_resource;

‎drivers/connector/cn_proc.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,12 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
313313
(task_active_pid_ns(current) != &init_pid_ns))
314314
return;
315315

316+
/* Can only change if privileged. */
317+
if (!capable(CAP_NET_ADMIN)) {
318+
err = EPERM;
319+
goto out;
320+
}
321+
316322
mc_op = (enum proc_cn_mcast_op *)msg->data;
317323
switch (*mc_op) {
318324
case PROC_CN_MCAST_LISTEN:
@@ -325,6 +331,8 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,
325331
err = EINVAL;
326332
break;
327333
}
334+
335+
out:
328336
cn_proc_ack(err, msg->seq, msg->ack);
329337
}
330338

‎drivers/isdn/hisax/st5481_usb.c‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,13 @@ int st5481_setup_usb(struct st5481_adapter *adapter)
294294
// Allocate URBs and buffers for interrupt endpoint
295295
urb = usb_alloc_urb(0, GFP_KERNEL);
296296
if (!urb) {
297-
return -ENOMEM;
297+
goto err1;
298298
}
299299
intr->urb = urb;
300300

301301
buf = kmalloc(INT_PKT_SIZE, GFP_KERNEL);
302302
if (!buf) {
303-
return -ENOMEM;
303+
goto err2;
304304
}
305305

306306
endpoint = &altsetting->endpoint[EP_INT-1];
@@ -313,6 +313,14 @@ int st5481_setup_usb(struct st5481_adapter *adapter)
313313
endpoint->desc.bInterval);
314314

315315
return 0;
316+
err2:
317+
usb_free_urb(intr->urb);
318+
intr->urb = NULL;
319+
err1:
320+
usb_free_urb(ctrl->urb);
321+
ctrl->urb = NULL;
322+
323+
return -ENOMEM;
316324
}
317325

318326
/*

‎drivers/net/bonding/bond_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
16291629

16301630
/* If this is the first slave, then we need to set the master's hardware
16311631
* address to be the same as the slave's. */
1632-
if (bond->dev_addr_from_first)
1632+
if (bond->slave_cnt == 0 && bond->dev_addr_from_first)
16331633
bond_set_dev_addr(bond->dev, slave_dev);
16341634

16351635
new_slave = kzalloc(sizeof(struct slave), GFP_KERNEL);

‎drivers/net/ethernet/broadcom/bgmac.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,16 @@ static int bgmac_dma_rx_read(struct bgmac *bgmac, struct bgmac_dma_ring *ring,
301301
bgmac_err(bgmac, "Found poisoned packet at slot %d, DMA issue!\n",
302302
ring->start);
303303
} else {
304+
/* Omit CRC. */
305+
len -= ETH_FCS_LEN;
306+
304307
new_skb = netdev_alloc_skb_ip_align(bgmac->net_dev, len);
305308
if (new_skb) {
306309
skb_put(new_skb, len);
307310
skb_copy_from_linear_data_offset(skb, BGMAC_RX_FRAME_OFFSET,
308311
new_skb->data,
309312
len);
313+
skb_checksum_none_assert(skb);
310314
new_skb->protocol =
311315
eth_type_trans(new_skb, bgmac->net_dev);
312316
netif_receive_skb(new_skb);

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3142,7 +3142,7 @@ static inline __le16 bnx2x_csum_fix(unsigned char *t_header, u16 csum, s8 fix)
31423142
tsum = ~csum_fold(csum_add((__force __wsum) csum,
31433143
csum_partial(t_header, -fix, 0)));
31443144

3145-
return bswab16(csum);
3145+
return bswab16(tsum);
31463146
}
31473147

31483148
static inline u32 bnx2x_xmit_type(struct bnx2x *bp, struct sk_buff *skb)

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ static int bnx2x_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
281281
cmd->lp_advertising |= ADVERTISED_2500baseX_Full;
282282
if (status & LINK_STATUS_LINK_PARTNER_10GXFD_CAPABLE)
283283
cmd->lp_advertising |= ADVERTISED_10000baseT_Full;
284+
if (status & LINK_STATUS_LINK_PARTNER_20GXFD_CAPABLE)
285+
cmd->lp_advertising |= ADVERTISED_20000baseKR2_Full;
284286
}
285287

286288
cmd->maxtxpkt = 0;
@@ -463,6 +465,10 @@ static int bnx2x_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
463465
ADVERTISED_10000baseKR_Full))
464466
bp->link_params.speed_cap_mask[cfg_idx] |=
465467
PORT_HW_CFG_SPEED_CAPABILITY_D0_10G;
468+
469+
if (cmd->advertising & ADVERTISED_20000baseKR2_Full)
470+
bp->link_params.speed_cap_mask[cfg_idx] |=
471+
PORT_HW_CFG_SPEED_CAPABILITY_D0_20G;
466472
}
467473
} else { /* forced speed */
468474
/* advertise the requested speed and duplex if supported */

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c‎

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10422,6 +10422,28 @@ static void bnx2x_848xx_set_link_led(struct bnx2x_phy *phy,
1042210422
MDIO_PMA_DEVAD,
1042310423
MDIO_PMA_REG_8481_LED1_MASK,
1042410424
0x0);
10425+
if (phy->type ==
10426+
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84834) {
10427+
/* Disable MI_INT interrupt before setting LED4
10428+
* source to constant off.
10429+
*/
10430+
if (REG_RD(bp, NIG_REG_MASK_INTERRUPT_PORT0 +
10431+
params->port*4) &
10432+
NIG_MASK_MI_INT) {
10433+
params->link_flags |=
10434+
LINK_FLAGS_INT_DISABLED;
10435+
10436+
bnx2x_bits_dis(
10437+
bp,
10438+
NIG_REG_MASK_INTERRUPT_PORT0 +
10439+
params->port*4,
10440+
NIG_MASK_MI_INT);
10441+
}
10442+
bnx2x_cl45_write(bp, phy,
10443+
MDIO_PMA_DEVAD,
10444+
MDIO_PMA_REG_8481_SIGNAL_MASK,
10445+
0x0);
10446+
}
1042510447
}
1042610448
break;
1042710449
case LED_MODE_ON:
@@ -10468,6 +10490,28 @@ static void bnx2x_848xx_set_link_led(struct bnx2x_phy *phy,
1046810490
MDIO_PMA_DEVAD,
1046910491
MDIO_PMA_REG_8481_LED1_MASK,
1047010492
0x20);
10493+
if (phy->type ==
10494+
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84834) {
10495+
/* Disable MI_INT interrupt before setting LED4
10496+
* source to constant on.
10497+
*/
10498+
if (REG_RD(bp, NIG_REG_MASK_INTERRUPT_PORT0 +
10499+
params->port*4) &
10500+
NIG_MASK_MI_INT) {
10501+
params->link_flags |=
10502+
LINK_FLAGS_INT_DISABLED;
10503+
10504+
bnx2x_bits_dis(
10505+
bp,
10506+
NIG_REG_MASK_INTERRUPT_PORT0 +
10507+
params->port*4,
10508+
NIG_MASK_MI_INT);
10509+
}
10510+
bnx2x_cl45_write(bp, phy,
10511+
MDIO_PMA_DEVAD,
10512+
MDIO_PMA_REG_8481_SIGNAL_MASK,
10513+
0x20);
10514+
}
1047110515
}
1047210516
break;
1047310517

@@ -10532,6 +10576,22 @@ static void bnx2x_848xx_set_link_led(struct bnx2x_phy *phy,
1053210576
MDIO_PMA_DEVAD,
1053310577
MDIO_PMA_REG_8481_LINK_SIGNAL,
1053410578
val);
10579+
if (phy->type ==
10580+
PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM84834) {
10581+
/* Restore LED4 source to external link,
10582+
* and re-enable interrupts.
10583+
*/
10584+
bnx2x_cl45_write(bp, phy,
10585+
MDIO_PMA_DEVAD,
10586+
MDIO_PMA_REG_8481_SIGNAL_MASK,
10587+
0x40);
10588+
if (params->link_flags &
10589+
LINK_FLAGS_INT_DISABLED) {
10590+
bnx2x_link_int_enable(params);
10591+
params->link_flags &=
10592+
~LINK_FLAGS_INT_DISABLED;
10593+
}
10594+
}
1053510595
}
1053610596
break;
1053710597
}
@@ -11791,6 +11851,8 @@ static int bnx2x_populate_int_phy(struct bnx2x *bp, u32 shmem_base, u8 port,
1179111851
phy->media_type = ETH_PHY_KR;
1179211852
phy->flags |= FLAGS_WC_DUAL_MODE;
1179311853
phy->supported &= (SUPPORTED_20000baseKR2_Full |
11854+
SUPPORTED_10000baseT_Full |
11855+
SUPPORTED_1000baseT_Full |
1179411856
SUPPORTED_Autoneg |
1179511857
SUPPORTED_FIBRE |
1179611858
SUPPORTED_Pause |
@@ -13437,7 +13499,7 @@ void bnx2x_period_func(struct link_params *params, struct link_vars *vars)
1343713499
struct bnx2x_phy *phy = &params->phy[INT_PHY];
1343813500
bnx2x_set_aer_mmd(params, phy);
1343913501
if ((phy->supported & SUPPORTED_20000baseKR2_Full) &&
13440-
(phy->speed_cap_mask & SPEED_20000))
13502+
(phy->speed_cap_mask & PORT_HW_CFG_SPEED_CAPABILITY_D0_20G))
1344113503
bnx2x_check_kr2_wa(params, vars, phy);
1344213504
bnx2x_check_over_curr(params, vars);
1344313505
if (vars->rx_tx_asic_rst)

‎drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ struct link_params {
307307
struct bnx2x *bp;
308308
u16 req_fc_auto_adv; /* Should be set to TX / BOTH when
309309
req_flow_ctrl is set to AUTO */
310-
u16 rsrv1;
310+
u16 link_flags;
311+
#define LINK_FLAGS_INT_DISABLED (1<<0)
311312
u32 lfa_base;
312313
};
313314

0 commit comments

Comments
 (0)