Skip to content

Commit 5211da9

Browse files
committed
Merge gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net
Dave writes: "Various fixes, all over the place: 1) OOB data generation fix in bluetooth, from Matias Karhumaa. 2) BPF BTF boundary calculation fix, from Martin KaFai Lau. 3) Don't bug on excessive frags, to be compatible in situations mixing older and newer kernels on each end. From Juergen Gross. 4) Scheduling in RCU fix in hv_netvsc, from Stephen Hemminger. 5) Zero keying information in TLS layer before freeing copies of them, from Sabrina Dubroca. 6) Fix NULL deref in act_sample, from Davide Caratti. 7) Orphan SKB before GRO in veth to prevent crashes with XDP, from Toshiaki Makita. 8) Fix use after free in ip6_xmit, from Eric Dumazet. 9) Fix VF mac address regression in bnxt_en, from Micahel Chan. 10) Fix MSG_PEEK behavior in TLS layer, from Daniel Borkmann. 11) Programming adjustments to r8169 which fix not being to enter deep sleep states on some machines, from Kai-Heng Feng and Hans de Goede. 12) Fix DST_NOCOUNT flag handling for ipv6 routes, from Peter Oskolkov." * gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net: (45 commits) net/ipv6: do not copy dst flags on rt init qmi_wwan: set DTR for modems in forced USB2 mode clk: x86: Stop marking clocks as CLK_IS_CRITICAL r8169: Get and enable optional ether_clk clock clk: x86: add "ether_clk" alias for Bay Trail / Cherry Trail r8169: enable ASPM on RTL8106E r8169: Align ASPM/CLKREQ setting function with vendor driver Revert "kcm: remove any offset before parsing messages" kcm: remove any offset before parsing messages net: ethernet: Fix a unused function warning. net: dsa: mv88e6xxx: Fix ATU Miss Violation tls: fix currently broken MSG_PEEK behavior hv_netvsc: pair VF based on serial number PCI: hv: support reporting serial number as slot information bnxt_en: Fix VF mac address regression. ipv6: fix possible use-after-free in ip6_xmit() net: hp100: fix always-true check for link up state ARM: dts: at91: add new compatibility string for macb on sama5d3 net: macb: disable scatter-gather for macb on sama5d3 net: mvpp2: let phylink manage the carrier state ...
2 parents 3918c21 + 30bfd93 commit 5211da9

File tree

45 files changed

+422
-201
lines changed

Some content is hidden

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

45 files changed

+422
-201
lines changed

Documentation/devicetree/bindings/net/macb.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Required properties:
1010
Use "cdns,pc302-gem" for Picochip picoXcell pc302 and later devices based on
1111
the Cadence GEM, or the generic form: "cdns,gem".
1212
Use "atmel,sama5d2-gem" for the GEM IP (10/100) available on Atmel sama5d2 SoCs.
13+
Use "atmel,sama5d3-macb" for the 10/100Mbit IP available on Atmel sama5d3 SoCs.
1314
Use "atmel,sama5d3-gem" for the Gigabit IP available on Atmel sama5d3 SoCs.
1415
Use "atmel,sama5d4-gem" for the GEM IP (10/100) available on Atmel sama5d4 SoCs.
1516
Use "cdns,zynq-gem" Xilinx Zynq-7xxx SoC.

arch/arm/boot/dts/sama5d3_emac.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
};
4242

4343
macb1: ethernet@f802c000 {
44-
compatible = "cdns,at91sam9260-macb", "cdns,macb";
44+
compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb";
4545
reg = <0xf802c000 0x100>;
4646
interrupts = <35 IRQ_TYPE_LEVEL_HIGH 3>;
4747
pinctrl-names = "default";

drivers/bluetooth/hci_ldisc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,8 @@ static void hci_uart_tty_close(struct tty_struct *tty)
543543
}
544544
clear_bit(HCI_UART_PROTO_SET, &hu->flags);
545545

546+
percpu_free_rwsem(&hu->proto_lock);
547+
546548
kfree(hu);
547549
}
548550

drivers/clk/x86/clk-pmc-atom.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ struct clk_plt_data {
5555
u8 nparents;
5656
struct clk_plt *clks[PMC_CLK_NUM];
5757
struct clk_lookup *mclk_lookup;
58+
struct clk_lookup *ether_clk_lookup;
5859
};
5960

6061
/* Return an index in parent table */
@@ -186,13 +187,6 @@ static struct clk_plt *plt_clk_register(struct platform_device *pdev, int id,
186187
pclk->reg = base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE;
187188
spin_lock_init(&pclk->lock);
188189

189-
/*
190-
* If the clock was already enabled by the firmware mark it as critical
191-
* to avoid it being gated by the clock framework if no driver owns it.
192-
*/
193-
if (plt_clk_is_enabled(&pclk->hw))
194-
init.flags |= CLK_IS_CRITICAL;
195-
196190
ret = devm_clk_hw_register(&pdev->dev, &pclk->hw);
197191
if (ret) {
198192
pclk = ERR_PTR(ret);
@@ -351,11 +345,20 @@ static int plt_clk_probe(struct platform_device *pdev)
351345
goto err_unreg_clk_plt;
352346
}
353347

348+
data->ether_clk_lookup = clkdev_hw_create(&data->clks[4]->hw,
349+
"ether_clk", NULL);
350+
if (!data->ether_clk_lookup) {
351+
err = -ENOMEM;
352+
goto err_drop_mclk;
353+
}
354+
354355
plt_clk_free_parent_names_loop(parent_names, data->nparents);
355356

356357
platform_set_drvdata(pdev, data);
357358
return 0;
358359

360+
err_drop_mclk:
361+
clkdev_drop(data->mclk_lookup);
359362
err_unreg_clk_plt:
360363
plt_clk_unregister_loop(data, i);
361364
plt_clk_unregister_parents(data);
@@ -369,6 +372,7 @@ static int plt_clk_remove(struct platform_device *pdev)
369372

370373
data = platform_get_drvdata(pdev);
371374

375+
clkdev_drop(data->ether_clk_lookup);
372376
clkdev_drop(data->mclk_lookup);
373377
plt_clk_unregister_loop(data, PMC_CLK_NUM);
374378
plt_clk_unregister_parents(data);

drivers/net/appletalk/ipddp.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
283283
case SIOCFINDIPDDPRT:
284284
spin_lock_bh(&ipddp_route_lock);
285285
rp = __ipddp_find_route(&rcp);
286-
if (rp)
287-
memcpy(&rcp2, rp, sizeof(rcp2));
286+
if (rp) {
287+
memset(&rcp2, 0, sizeof(rcp2));
288+
rcp2.ip = rp->ip;
289+
rcp2.at = rp->at;
290+
rcp2.flags = rp->flags;
291+
}
288292
spin_unlock_bh(&ipddp_route_lock);
289293

290294
if (rp) {

drivers/net/dsa/mv88e6xxx/global1.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
#define MV88E6XXX_G1_ATU_OP_GET_CLR_VIOLATION 0x7000
129129
#define MV88E6XXX_G1_ATU_OP_AGE_OUT_VIOLATION BIT(7)
130130
#define MV88E6XXX_G1_ATU_OP_MEMBER_VIOLATION BIT(6)
131-
#define MV88E6XXX_G1_ATU_OP_MISS_VIOLTATION BIT(5)
131+
#define MV88E6XXX_G1_ATU_OP_MISS_VIOLATION BIT(5)
132132
#define MV88E6XXX_G1_ATU_OP_FULL_VIOLATION BIT(4)
133133

134134
/* Offset 0x0C: ATU Data Register */

drivers/net/dsa/mv88e6xxx/global1_atu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static irqreturn_t mv88e6xxx_g1_atu_prob_irq_thread_fn(int irq, void *dev_id)
349349
chip->ports[entry.portvec].atu_member_violation++;
350350
}
351351

352-
if (val & MV88E6XXX_G1_ATU_OP_MEMBER_VIOLATION) {
352+
if (val & MV88E6XXX_G1_ATU_OP_MISS_VIOLATION) {
353353
dev_err_ratelimited(chip->dev,
354354
"ATU miss violation for %pM portvec %x\n",
355355
entry.mac, entry.portvec);

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8027,7 +8027,7 @@ static int bnxt_change_mac_addr(struct net_device *dev, void *p)
80278027
if (ether_addr_equal(addr->sa_data, dev->dev_addr))
80288028
return 0;
80298029

8030-
rc = bnxt_approve_mac(bp, addr->sa_data);
8030+
rc = bnxt_approve_mac(bp, addr->sa_data, true);
80318031
if (rc)
80328032
return rc;
80338033

@@ -8827,14 +8827,19 @@ static int bnxt_init_mac_addr(struct bnxt *bp)
88278827
} else {
88288828
#ifdef CONFIG_BNXT_SRIOV
88298829
struct bnxt_vf_info *vf = &bp->vf;
8830+
bool strict_approval = true;
88308831

88318832
if (is_valid_ether_addr(vf->mac_addr)) {
88328833
/* overwrite netdev dev_addr with admin VF MAC */
88338834
memcpy(bp->dev->dev_addr, vf->mac_addr, ETH_ALEN);
8835+
/* Older PF driver or firmware may not approve this
8836+
* correctly.
8837+
*/
8838+
strict_approval = false;
88348839
} else {
88358840
eth_hw_addr_random(bp->dev);
88368841
}
8837-
rc = bnxt_approve_mac(bp, bp->dev->dev_addr);
8842+
rc = bnxt_approve_mac(bp, bp->dev->dev_addr, strict_approval);
88388843
#endif
88398844
}
88408845
return rc;

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ void bnxt_update_vf_mac(struct bnxt *bp)
11041104
mutex_unlock(&bp->hwrm_cmd_lock);
11051105
}
11061106

1107-
int bnxt_approve_mac(struct bnxt *bp, u8 *mac)
1107+
int bnxt_approve_mac(struct bnxt *bp, u8 *mac, bool strict)
11081108
{
11091109
struct hwrm_func_vf_cfg_input req = {0};
11101110
int rc = 0;
@@ -1122,12 +1122,13 @@ int bnxt_approve_mac(struct bnxt *bp, u8 *mac)
11221122
memcpy(req.dflt_mac_addr, mac, ETH_ALEN);
11231123
rc = hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
11241124
mac_done:
1125-
if (rc) {
1125+
if (rc && strict) {
11261126
rc = -EADDRNOTAVAIL;
11271127
netdev_warn(bp->dev, "VF MAC address %pM not approved by the PF\n",
11281128
mac);
1129+
return rc;
11291130
}
1130-
return rc;
1131+
return 0;
11311132
}
11321133
#else
11331134

@@ -1144,7 +1145,7 @@ void bnxt_update_vf_mac(struct bnxt *bp)
11441145
{
11451146
}
11461147

1147-
int bnxt_approve_mac(struct bnxt *bp, u8 *mac)
1148+
int bnxt_approve_mac(struct bnxt *bp, u8 *mac, bool strict)
11481149
{
11491150
return 0;
11501151
}

drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs);
3939
void bnxt_sriov_disable(struct bnxt *);
4040
void bnxt_hwrm_exec_fwd_req(struct bnxt *);
4141
void bnxt_update_vf_mac(struct bnxt *);
42-
int bnxt_approve_mac(struct bnxt *, u8 *);
42+
int bnxt_approve_mac(struct bnxt *, u8 *, bool);
4343
#endif

0 commit comments

Comments
 (0)