Skip to content

Commit 96080f6

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) BPF verifier signed/unsigned value tracking fix, from Daniel Borkmann, Edward Cree, and Josef Bacik. 2) Fix memory allocation length when setting up calls to ->ndo_set_mac_address, from Cong Wang. 3) Add a new cxgb4 device ID, from Ganesh Goudar. 4) Fix FIB refcount handling, we have to set it's initial value before the configure callback (which can bump it). From David Ahern. 5) Fix double-free in qcom/emac driver, from Timur Tabi. 6) A bunch of gcc-7 string format overflow warning fixes from Arnd Bergmann. 7) Fix link level headroom tests in ip_do_fragment(), from Vasily Averin. 8) Fix chunk walking in SCTP when iterating over error and parameter headers. From Alexander Potapenko. 9) TCP BBR congestion control fixes from Neal Cardwell. 10) Fix SKB fragment handling in bcmgenet driver, from Doug Berger. 11) BPF_CGROUP_RUN_PROG_SOCK_OPS needs to check for null __sk, from Cong Wang. 12) xmit_recursion in ppp driver needs to be per-device not per-cpu, from Gao Feng. 13) Cannot release skb->dst in UDP if IP options processing needs it. From Paolo Abeni. 14) Some netdev ioctl ifr_name[] NULL termination fixes. From Alexander Levin and myself. 15) Revert some rtnetlink notification changes that are causing regressions, from David Ahern. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits) net: bonding: Fix transmit load balancing in balance-alb mode rds: Make sure updates to cp_send_gen can be observed net: ethernet: ti: cpsw: Push the request_irq function to the end of probe ipv4: initialize fib_trie prior to register_netdev_notifier call. rtnetlink: allocate more memory for dev_set_mac_address() net: dsa: b53: Add missing ARL entries for BCM53125 bpf: more tests for mixed signed and unsigned bounds checks bpf: add test for mixed signed and unsigned bounds checks bpf: fix up test cases with mixed signed/unsigned bounds bpf: allow to specify log level and reduce it for test_verifier bpf: fix mixed signed/unsigned derived min/max value bounds ipv6: avoid overflow of offset in ip6_find_1stfragopt net: tehuti: don't process data if it has not been copied from userspace Revert "rtnetlink: Do not generate notifications for CHANGEADDR event" net: dsa: mv88e6xxx: Enable CMODE config support for 6390X dt-binding: ptp: Add SoC compatibility strings for dte ptp clock NET: dwmac: Make dwmac reset unconditional net: Zero terminate ifr_name in dev_ifname(). wireless: wext: terminate ifr name coming from userspace netfilter: fix netfilter_net_init() return ...
2 parents 63a8636 + cbf5ecb commit 96080f6

Some content is hidden

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

83 files changed

+1176
-581
lines changed

Documentation/devicetree/bindings/net/brcm,amac.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Required properties:
1111
- reg-names: Names of the registers.
1212
"amac_base": Address and length of the GMAC registers
1313
"idm_base": Address and length of the GMAC IDM registers
14+
(required for NSP and Northstar2)
1415
"nicpm_base": Address and length of the NIC Port Manager
1516
registers (required for Northstar2)
1617
- interrupts: Interrupt number

Documentation/devicetree/bindings/net/brcm,bgmac-nsp.txt

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
* Broadcom Digital Timing Engine(DTE) based PTP clock driver
1+
* Broadcom Digital Timing Engine(DTE) based PTP clock
22

33
Required properties:
4-
- compatible: should be "brcm,ptp-dte"
4+
- compatible: should contain the core compatibility string
5+
and the SoC compatibility string. The SoC
6+
compatibility string is to handle SoC specific
7+
hardware differences.
8+
Core compatibility string:
9+
"brcm,ptp-dte"
10+
SoC compatibility strings:
11+
"brcm,iproc-ptp-dte" - for iproc based SoC's
512
- reg: address and length of the DTE block's NCO registers
613

714
Example:
815

9-
ptp_dte: ptp_dte@180af650 {
10-
compatible = "brcm,ptp-dte";
16+
ptp: ptp-dte@180af650 {
17+
compatible = "brcm,iproc-ptp-dte", "brcm,ptp-dte";
1118
reg = <0x180af650 0x10>;
1219
status = "okay";
1320
};

drivers/atm/zatm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1613,7 +1613,7 @@ static int zatm_init_one(struct pci_dev *pci_dev,
16131613

16141614
ret = dma_set_mask_and_coherent(&pci_dev->dev, DMA_BIT_MASK(32));
16151615
if (ret < 0)
1616-
goto out_disable;
1616+
goto out_release;
16171617

16181618
zatm_dev->pci_dev = pci_dev;
16191619
dev->dev_data = zatm_dev;

drivers/isdn/divert/isdn_divert.c

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,19 @@ static int isdn_divert_icall(isdn_ctrl *ic)
485485
cs->deflect_dest[0] = '\0';
486486
retval = 4; /* only proceed */
487487
}
488-
sprintf(cs->info, "%d 0x%lx %s %s %s %s 0x%x 0x%x %d %d %s\n",
489-
cs->akt_state,
490-
cs->divert_id,
491-
divert_if.drv_to_name(cs->ics.driver),
492-
(ic->command == ISDN_STAT_ICALLW) ? "1" : "0",
493-
cs->ics.parm.setup.phone,
494-
cs->ics.parm.setup.eazmsn,
495-
cs->ics.parm.setup.si1,
496-
cs->ics.parm.setup.si2,
497-
cs->ics.parm.setup.screen,
498-
dv->rule.waittime,
499-
cs->deflect_dest);
488+
snprintf(cs->info, sizeof(cs->info),
489+
"%d 0x%lx %s %s %s %s 0x%x 0x%x %d %d %s\n",
490+
cs->akt_state,
491+
cs->divert_id,
492+
divert_if.drv_to_name(cs->ics.driver),
493+
(ic->command == ISDN_STAT_ICALLW) ? "1" : "0",
494+
cs->ics.parm.setup.phone,
495+
cs->ics.parm.setup.eazmsn,
496+
cs->ics.parm.setup.si1,
497+
cs->ics.parm.setup.si2,
498+
cs->ics.parm.setup.screen,
499+
dv->rule.waittime,
500+
cs->deflect_dest);
500501
if ((dv->rule.action == DEFLECT_REPORT) ||
501502
(dv->rule.action == DEFLECT_REJECT)) {
502503
put_info_buffer(cs->info);

drivers/isdn/hardware/avm/c4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static char *revision = "$Revision: 1.1.2.2 $";
4242

4343
static bool suppress_pollack;
4444

45-
static struct pci_device_id c4_pci_tbl[] = {
45+
static const struct pci_device_id c4_pci_tbl[] = {
4646
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, 0, 0, (unsigned long)4 },
4747
{ PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C2, 0, 0, (unsigned long)2 },
4848
{ } /* Terminating entry */

drivers/isdn/hardware/eicon/divasmain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ typedef struct _diva_os_thread_dpc {
110110
/*
111111
This table should be sorted by PCI device ID
112112
*/
113-
static struct pci_device_id divas_pci_tbl[] = {
113+
static const struct pci_device_id divas_pci_tbl[] = {
114114
/* Diva Server BRI-2M PCI 0xE010 */
115115
{ PCI_VDEVICE(EICON, PCI_DEVICE_ID_EICON_MAESTRA),
116116
CARDTYPE_MAESTRA_PCI },

drivers/isdn/hardware/mISDN/avmfritz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ fritz_remove_pci(struct pci_dev *pdev)
11421142
pr_info("%s: drvdata already removed\n", __func__);
11431143
}
11441144

1145-
static struct pci_device_id fcpci_ids[] = {
1145+
static const struct pci_device_id fcpci_ids[] = {
11461146
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1, PCI_ANY_ID, PCI_ANY_ID,
11471147
0, 0, (unsigned long) "Fritz!Card PCI"},
11481148
{ PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_A1_V2, PCI_ANY_ID, PCI_ANY_ID,

drivers/isdn/hardware/mISDN/hfcmulti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5348,7 +5348,7 @@ static const struct hm_map hfcm_map[] = {
53485348

53495349
#undef H
53505350
#define H(x) ((unsigned long)&hfcm_map[x])
5351-
static struct pci_device_id hfmultipci_ids[] = {
5351+
static const struct pci_device_id hfmultipci_ids[] = {
53525352

53535353
/* Cards with HFC-4S Chip */
53545354
{ PCI_VENDOR_ID_CCD, PCI_DEVICE_ID_CCD_HFC4S, PCI_VENDOR_ID_CCD,

drivers/isdn/hardware/mISDN/hfcpci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2161,7 +2161,7 @@ static const struct _hfc_map hfc_map[] =
21612161
{},
21622162
};
21632163

2164-
static struct pci_device_id hfc_ids[] =
2164+
static const struct pci_device_id hfc_ids[] =
21652165
{
21662166
{ PCI_VDEVICE(CCD, PCI_DEVICE_ID_CCD_2BD0),
21672167
(unsigned long) &hfc_map[0] },

drivers/isdn/hardware/mISDN/netjet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static void nj_remove(struct pci_dev *pdev)
11371137
/* We cannot select cards with PCI_SUB... IDs, since here are cards with
11381138
* SUB IDs set to PCI_ANY_ID, so we need to match all and reject
11391139
* known other cards which not work with this driver - see probe function */
1140-
static struct pci_device_id nj_pci_ids[] = {
1140+
static const struct pci_device_id nj_pci_ids[] = {
11411141
{ PCI_VENDOR_ID_TIGERJET, PCI_DEVICE_ID_TIGERJET_300,
11421142
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
11431143
{ }

drivers/isdn/hardware/mISDN/w6692.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ w6692_remove_pci(struct pci_dev *pdev)
13981398
pr_notice("%s: drvdata already removed\n", __func__);
13991399
}
14001400

1401-
static struct pci_device_id w6692_ids[] = {
1401+
static const struct pci_device_id w6692_ids[] = {
14021402
{ PCI_VENDOR_ID_DYNALINK, PCI_DEVICE_ID_DYNALINK_IS64PH,
14031403
PCI_ANY_ID, PCI_ANY_ID, 0, 0, (ulong)&w6692_map[0]},
14041404
{ PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_6692,

drivers/isdn/hisax/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ static void EChannel_proc_rcv(struct hisax_d_if *d_if)
19091909
#ifdef CONFIG_PCI
19101910
#include <linux/pci.h>
19111911

1912-
static struct pci_device_id hisax_pci_tbl[] __used = {
1912+
static const struct pci_device_id hisax_pci_tbl[] __used = {
19131913
#ifdef CONFIG_HISAX_FRITZPCI
19141914
{PCI_VDEVICE(AVM, PCI_DEVICE_ID_AVM_A1) },
19151915
#endif

drivers/isdn/hisax/hfc4s8s_l1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ typedef struct {
8686
char *device_name;
8787
} hfc4s8s_param;
8888

89-
static struct pci_device_id hfc4s8s_ids[] = {
89+
static const struct pci_device_id hfc4s8s_ids[] = {
9090
{.vendor = PCI_VENDOR_ID_CCD,
9191
.device = PCI_DEVICE_ID_4S,
9292
.subvendor = 0x1397,

drivers/isdn/hisax/hisax_fcpcipnp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module_param(debug, int, 0);
5252
MODULE_AUTHOR("Kai Germaschewski <kai.germaschewski@gmx.de>/Karsten Keil <kkeil@suse.de>");
5353
MODULE_DESCRIPTION("AVM Fritz!PCI/PnP ISDN driver");
5454

55-
static struct pci_device_id fcpci_ids[] = {
55+
static const struct pci_device_id fcpci_ids[] = {
5656
{ .vendor = PCI_VENDOR_ID_AVM,
5757
.device = PCI_DEVICE_ID_AVM_A1,
5858
.subvendor = PCI_ANY_ID,

drivers/net/bonding/bond_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4596,7 +4596,7 @@ static int bond_check_params(struct bond_params *params)
45964596
}
45974597
ad_user_port_key = valptr->value;
45984598

4599-
if (bond_mode == BOND_MODE_TLB) {
4599+
if ((bond_mode == BOND_MODE_TLB) || (bond_mode == BOND_MODE_ALB)) {
46004600
bond_opt_initstr(&newval, "default");
46014601
valptr = bond_opt_parse(bond_opt_get(BOND_OPT_TLB_DYNAMIC_LB),
46024602
&newval);

drivers/net/dsa/b53/b53_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,6 +1665,7 @@ static const struct b53_chip_data b53_switch_chips[] = {
16651665
.dev_name = "BCM53125",
16661666
.vlans = 4096,
16671667
.enabled_ports = 0xff,
1668+
.arl_entries = 4,
16681669
.cpu_port = B53_CPU_PORT,
16691670
.vta_regs = B53_VTA_REGS,
16701671
.duplex_reg = B53_DUPLEX_STAT_GE,

drivers/net/dsa/mv88e6xxx/chip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3178,6 +3178,7 @@ static const struct mv88e6xxx_ops mv88e6390x_ops = {
31783178
.port_set_jumbo_size = mv88e6165_port_set_jumbo_size,
31793179
.port_egress_rate_limiting = mv88e6097_port_egress_rate_limiting,
31803180
.port_pause_limit = mv88e6390_port_pause_limit,
3181+
.port_set_cmode = mv88e6390x_port_set_cmode,
31813182
.port_disable_learn_limit = mv88e6xxx_port_disable_learn_limit,
31823183
.port_disable_pri_override = mv88e6xxx_port_disable_pri_override,
31833184
.stats_snapshot = mv88e6390_g1_stats_snapshot,

drivers/net/ethernet/apm/xgene/xgene_enet_main.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1785,16 +1785,18 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
17851785

17861786
xgene_enet_gpiod_get(pdata);
17871787

1788-
pdata->clk = devm_clk_get(&pdev->dev, NULL);
1789-
if (IS_ERR(pdata->clk)) {
1790-
/* Abort if the clock is defined but couldn't be retrived.
1791-
* Always abort if the clock is missing on DT system as
1792-
* the driver can't cope with this case.
1793-
*/
1794-
if (PTR_ERR(pdata->clk) != -ENOENT || dev->of_node)
1795-
return PTR_ERR(pdata->clk);
1796-
/* Firmware may have set up the clock already. */
1797-
dev_info(dev, "clocks have been setup already\n");
1788+
if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
1789+
pdata->clk = devm_clk_get(&pdev->dev, NULL);
1790+
if (IS_ERR(pdata->clk)) {
1791+
/* Abort if the clock is defined but couldn't be
1792+
* retrived. Always abort if the clock is missing on
1793+
* DT system as the driver can't cope with this case.
1794+
*/
1795+
if (PTR_ERR(pdata->clk) != -ENOENT || dev->of_node)
1796+
return PTR_ERR(pdata->clk);
1797+
/* Firmware may have set up the clock already. */
1798+
dev_info(dev, "clocks have been setup already\n");
1799+
}
17981800
}
17991801

18001802
if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII)

drivers/net/ethernet/broadcom/bgmac-platform.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,14 @@ static u32 platform_bgmac_idm_read(struct bgmac *bgmac, u16 offset)
5050

5151
static void platform_bgmac_idm_write(struct bgmac *bgmac, u16 offset, u32 value)
5252
{
53-
return writel(value, bgmac->plat.idm_base + offset);
53+
writel(value, bgmac->plat.idm_base + offset);
5454
}
5555

5656
static bool platform_bgmac_clk_enabled(struct bgmac *bgmac)
5757
{
58+
if (!bgmac->plat.idm_base)
59+
return true;
60+
5861
if ((bgmac_idm_read(bgmac, BCMA_IOCTL) & BGMAC_CLK_EN) != BGMAC_CLK_EN)
5962
return false;
6063
if (bgmac_idm_read(bgmac, BCMA_RESET_CTL) & BCMA_RESET_CTL_RESET)
@@ -66,6 +69,9 @@ static void platform_bgmac_clk_enable(struct bgmac *bgmac, u32 flags)
6669
{
6770
u32 val;
6871

72+
if (!bgmac->plat.idm_base)
73+
return;
74+
6975
/* The Reset Control register only contains a single bit to show if the
7076
* controller is currently in reset. Do a sanity check here, just in
7177
* case the bootloader happened to leave the device in reset.
@@ -180,6 +186,7 @@ static int bgmac_probe(struct platform_device *pdev)
180186
bgmac->feature_flags |= BGMAC_FEAT_CMDCFG_SR_REV4;
181187
bgmac->feature_flags |= BGMAC_FEAT_TX_MASK_SETUP;
182188
bgmac->feature_flags |= BGMAC_FEAT_RX_MASK_SETUP;
189+
bgmac->feature_flags |= BGMAC_FEAT_IDM_MASK;
183190

184191
bgmac->dev = &pdev->dev;
185192
bgmac->dma_dev = &pdev->dev;
@@ -207,15 +214,13 @@ static int bgmac_probe(struct platform_device *pdev)
207214
return PTR_ERR(bgmac->plat.base);
208215

209216
regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "idm_base");
210-
if (!regs) {
211-
dev_err(&pdev->dev, "Unable to obtain idm resource\n");
212-
return -EINVAL;
217+
if (regs) {
218+
bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs);
219+
if (IS_ERR(bgmac->plat.idm_base))
220+
return PTR_ERR(bgmac->plat.idm_base);
221+
bgmac->feature_flags &= ~BGMAC_FEAT_IDM_MASK;
213222
}
214223

215-
bgmac->plat.idm_base = devm_ioremap_resource(&pdev->dev, regs);
216-
if (IS_ERR(bgmac->plat.idm_base))
217-
return PTR_ERR(bgmac->plat.idm_base);
218-
219224
regs = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nicpm_base");
220225
if (regs) {
221226
bgmac->plat.nicpm_base = devm_ioremap_resource(&pdev->dev,

0 commit comments

Comments
 (0)