Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
Pull networking fixes from David Miller:

 1) Netfilter list handling fix, from Linus.

 2) RXRPC/AFS bug fixes from David Howells (oops on call to serviceless
    endpoints, build warnings, missing notifications, etc.) From David
    Howells.

 3) Kernel log message missing newlines, from Colin Ian King.

 4) Don't enter direct reclaim in netlink dumps, the idea is to use a
    high order allocation first and fallback quickly to a 0-order
    allocation if such a high-order one cannot be done cheaply and
    without reclaim. From Eric Dumazet.

 5) Fix firmware download errors in btusb bluetooth driver, from Ethan
    Hsieh.

 6) Missing Kconfig deps for QCOM_EMAC, from Geert Uytterhoeven.

 7) Fix MDIO_XGENE dup Kconfig entry. From Laura Abbott.

 8) Constrain ipv6 rtr_solicits sysctl values properly, from Maciej
    Żenczykowski.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits)
  netfilter: Fix slab corruption.
  be2net: Enable VF link state setting for BE3
  be2net: Fix TX stats for TSO packets
  be2net: Update Copyright string in be_hw.h
  be2net: NCSI FW section should be properly updated with ethtool for BE3
  be2net: Provide an alternate way to read pf_num for BEx chips
  wan/fsl_ucc_hdlc: Fix size used in dma_free_coherent()
  net: macb: NULL out phydev after removing mdio bus
  xen-netback: make sure that hashes are not send to unaware frontends
  Fixing a bug in team driver due to incorrect 'unsigned int' to 'int' conversion
  MAINTAINERS: add myself as a maintainer of xen-netback
  ipv6 addrconf: disallow rtr_solicits < -1
  Bluetooth: btusb: Fix atheros firmware download error
  drivers: net: phy: Correct duplicate MDIO_XGENE entry
  ethernet: qualcomm: QCOM_EMAC should depend on HAS_DMA and HAS_IOMEM
  net: ethernet: mediatek: remove hwlro property in the device tree
  net: ethernet: mediatek: get hw lro capability by the chip id instead of by the dtsi
  net: ethernet: mediatek: get the chip id by ETHDMASYS registers
  net: bgmac: Fix errant feature flag check
  netlink: do not enter direct reclaim from netlink_dump()
  ...
  • Loading branch information
Linus Torvalds committed Oct 11, 2016
2 parents 101105b + bd3769b commit 6b5e09a
Show file tree
Hide file tree
Showing 57 changed files with 1,421 additions and 1,206 deletions.
2 changes: 0 additions & 2 deletions Documentation/devicetree/bindings/net/mediatek-net.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Required properties:
Optional properties:
- interrupt-parent: Should be the phandle for the interrupt controller
that services interrupts for this device
- mediatek,hwlro: the capability if the hardware supports LRO functions

* Ethernet MAC node

Expand Down Expand Up @@ -54,7 +53,6 @@ eth: ethernet@1b100000 {
reset-names = "eth";
mediatek,ethsys = <&ethsys>;
mediatek,pctl = <&syscfg_pctl_a>;
mediatek,hwlro;
#address-cells = <1>;
#size-cells = <0>;

Expand Down
7 changes: 4 additions & 3 deletions Documentation/devicetree/bindings/net/micrel-ksz90x1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ KSZ9031:

All skew control options are specified in picoseconds. The minimum
value is 0, and the maximum is property-dependent. The increment
step is 60ps.
step is 60ps. The default value is the neutral setting, so setting
rxc-skew-ps=<0> actually results in -900 picoseconds adjustment.

Optional properties:

Maximum value of 1860:
Maximum value of 1860, default value 900:

- rxc-skew-ps : Skew control of RX clock pad
- txc-skew-ps : Skew control of TX clock pad

Maximum value of 900:
Maximum value of 900, default value 420:

- rxdv-skew-ps : Skew control of RX CTL pad
- txen-skew-ps : Skew control of TX CTL pad
Expand Down
3 changes: 2 additions & 1 deletion Documentation/devicetree/bindings/net/renesas,ravb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Required properties:
"renesas,etheravb-r8a7793" if the device is a part of R8A7793 SoC.
"renesas,etheravb-r8a7794" if the device is a part of R8A7794 SoC.
"renesas,etheravb-r8a7795" if the device is a part of R8A7795 SoC.
"renesas,etheravb-r8a7796" if the device is a part of R8A7796 SoC.
"renesas,etheravb-rcar-gen2" for generic R-Car Gen 2 compatible interface.
"renesas,etheravb-rcar-gen3" for generic R-Car Gen 3 compatible interface.

Expand All @@ -33,7 +34,7 @@ Optional properties:
- interrupt-parent: the phandle for the interrupt controller that services
interrupts for this device.
- interrupt-names: A list of interrupt names.
For the R8A7795 SoC this property is mandatory;
For the R8A779[56] SoCs this property is mandatory;
it should include one entry per channel, named "ch%u",
where %u is the channel number ranging from 0 to 24.
For other SoCs this property is optional; if present
Expand Down
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5033,6 +5033,13 @@ F: drivers/net/ethernet/freescale/fec_ptp.c
F: drivers/net/ethernet/freescale/fec.h
F: Documentation/devicetree/bindings/net/fsl-fec.txt

FREESCALE QORIQ DPAA FMAN DRIVER
M: Madalin Bucur <madalin.bucur@nxp.com>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/freescale/fman
F: Documentation/devicetree/bindings/powerpc/fsl/fman.txt

FREESCALE QUICC ENGINE LIBRARY
L: linuxppc-dev@lists.ozlabs.org
S: Orphan
Expand Down Expand Up @@ -13128,6 +13135,7 @@ F: arch/arm64/include/asm/xen/

XEN NETWORK BACKEND DRIVER
M: Wei Liu <wei.liu2@citrix.com>
M: Paul Durrant <paul.durrant@citrix.com>
L: xen-devel@lists.xenproject.org (moderated for non-subscribers)
L: netdev@vger.kernel.org
S: Supported
Expand Down
9 changes: 5 additions & 4 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ static const struct usb_device_id blacklist_table[] = {
/* Marvell Bluetooth devices */
{ USB_DEVICE(0x1286, 0x2044), .driver_info = BTUSB_MARVELL },
{ USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL },
{ USB_DEVICE(0x1286, 0x204e), .driver_info = BTUSB_MARVELL },

/* Intel Bluetooth devices */
{ USB_DEVICE(0x8087, 0x07da), .driver_info = BTUSB_CSR },
Expand Down Expand Up @@ -1042,6 +1043,10 @@ static int btusb_open(struct hci_dev *hdev)

BT_DBG("%s", hdev->name);

err = usb_autopm_get_interface(data->intf);
if (err < 0)
return err;

/* Patching USB firmware files prior to starting any URBs of HCI path
* It is more safe to use USB bulk channel for downloading USB patch
*/
Expand All @@ -1051,10 +1056,6 @@ static int btusb_open(struct hci_dev *hdev)
return err;
}

err = usb_autopm_get_interface(data->intf);
if (err < 0)
return err;

data->intf->needs_remote_wakeup = 1;

if (test_and_set_bit(BTUSB_INTR_RUNNING, &data->flags))
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/bgmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ static void bgmac_enable(struct bgmac *bgmac)

mode = (bgmac_read(bgmac, BGMAC_DEV_STATUS) & BGMAC_DS_MM_MASK) >>
BGMAC_DS_MM_SHIFT;
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST || mode != 0)
if (!(bgmac->feature_flags & BGMAC_FEAT_CLKCTLST) || mode != 0)
bgmac_set(bgmac, BCMA_CLKCTLST, BCMA_CLKCTLST_FORCEHT);
if (bgmac->feature_flags & BGMAC_FEAT_CLKCTLST && mode == 2)
bgmac_cco_ctl_maskset(bgmac, 1, ~0,
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -3117,6 +3117,7 @@ static int macb_remove(struct platform_device *pdev)
if (dev->phydev)
phy_disconnect(dev->phydev);
mdiobus_unregister(bp->mii_bus);
dev->phydev = NULL;
mdiobus_free(bp->mii_bus);

/* Shutdown the PHY if there is a GPIO reset */
Expand Down
31 changes: 29 additions & 2 deletions drivers/net/ethernet/emulex/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2728,6 +2728,26 @@ static int be_flash(struct be_adapter *adapter, const u8 *img,
return 0;
}

#define NCSI_UPDATE_LOG "NCSI section update is not supported in FW ver %s\n"
static bool be_fw_ncsi_supported(char *ver)
{
int v1[4] = {3, 102, 148, 0}; /* Min ver that supports NCSI FW */
int v2[4];
int i;

if (sscanf(ver, "%d.%d.%d.%d", &v2[0], &v2[1], &v2[2], &v2[3]) != 4)
return false;

for (i = 0; i < 4; i++) {
if (v1[i] < v2[i])
return true;
else if (v1[i] > v2[i])
return false;
}

return true;
}

/* For BE2, BE3 and BE3-R */
static int be_flash_BEx(struct be_adapter *adapter,
const struct firmware *fw,
Expand Down Expand Up @@ -2805,8 +2825,10 @@ static int be_flash_BEx(struct be_adapter *adapter,
continue;

if ((pflashcomp[i].optype == OPTYPE_NCSI_FW) &&
memcmp(adapter->fw_ver, "3.102.148.0", 11) < 0)
!be_fw_ncsi_supported(adapter->fw_ver)) {
dev_info(dev, NCSI_UPDATE_LOG, adapter->fw_ver);
continue;
}

if (pflashcomp[i].optype == OPTYPE_PHY_FW &&
!phy_flashing_required(adapter))
Expand Down Expand Up @@ -3527,6 +3549,11 @@ int be_cmd_get_cntl_attributes(struct be_adapter *adapter)
for (i = 0; i < CNTL_SERIAL_NUM_WORDS; i++)
adapter->serial_num[i] = le32_to_cpu(serial_num[i]) &
(BIT_MASK(16) - 1);
/* For BEx, since GET_FUNC_CONFIG command is not
* supported, we read funcnum here as a workaround.
*/
if (BEx_chip(adapter))
adapter->pf_num = attribs->hba_attribs.pci_funcnum;
}

err:
Expand Down Expand Up @@ -4950,7 +4977,7 @@ int be_cmd_set_logical_link_config(struct be_adapter *adapter,
{
int status;

if (BEx_chip(adapter))
if (BE2_chip(adapter))
return -EOPNOTSUPP;

status = __be_cmd_set_logical_link_config(adapter, link_state,
Expand Down
6 changes: 5 additions & 1 deletion drivers/net/ethernet/emulex/benet/be_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,11 @@ struct mgmt_hba_attribs {
u32 rsvd2[55];
u8 rsvd3[3];
u8 phy_port;
u32 rsvd4[13];
u32 rsvd4[15];
u8 rsvd5[2];
u8 pci_funcnum;
u8 rsvd6;
u32 rsvd7[6];
} __packed;

struct mgmt_controller_attrib {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/emulex/benet/be_hw.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005 - 2015 Emulex
* Copyright (C) 2005-2016 Broadcom.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or
Expand Down
14 changes: 12 additions & 2 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,14 +724,24 @@ void be_link_status_update(struct be_adapter *adapter, u8 link_status)
netdev_info(netdev, "Link is %s\n", link_status ? "Up" : "Down");
}

static int be_gso_hdr_len(struct sk_buff *skb)
{
if (skb->encapsulation)
return skb_inner_transport_offset(skb) +
inner_tcp_hdrlen(skb);
return skb_transport_offset(skb) + tcp_hdrlen(skb);
}

static void be_tx_stats_update(struct be_tx_obj *txo, struct sk_buff *skb)
{
struct be_tx_stats *stats = tx_stats(txo);
u64 tx_pkts = skb_shinfo(skb)->gso_segs ? : 1;
u32 tx_pkts = skb_shinfo(skb)->gso_segs ? : 1;
/* Account for headers which get duplicated in TSO pkt */
u32 dup_hdr_len = tx_pkts > 1 ? be_gso_hdr_len(skb) * (tx_pkts - 1) : 0;

u64_stats_update_begin(&stats->sync);
stats->tx_reqs++;
stats->tx_bytes += skb->len;
stats->tx_bytes += skb->len + dup_hdr_len;
stats->tx_pkts += tx_pkts;
if (skb->encapsulation && skb->ip_summed == CHECKSUM_PARTIAL)
stats->tx_vxlan_offload_pkts += tx_pkts;
Expand Down
10 changes: 6 additions & 4 deletions drivers/net/ethernet/freescale/fman/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
subdir-ccflags-y += -I$(srctree)/drivers/net/ethernet/freescale/fman

obj-y += fsl_fman.o fsl_fman_mac.o fsl_mac.o
obj-$(CONFIG_FSL_FMAN) += fsl_fman.o
obj-$(CONFIG_FSL_FMAN) += fsl_fman_port.o
obj-$(CONFIG_FSL_FMAN) += fsl_mac.o

fsl_fman-objs := fman_muram.o fman.o fman_sp.o fman_port.o
fsl_fman_mac-objs := fman_dtsec.o fman_memac.o fman_tgec.o
fsl_mac-objs += mac.o
fsl_fman-objs := fman_muram.o fman.o fman_sp.o
fsl_fman_port-objs := fman_port.o
fsl_mac-objs:= mac.o fman_dtsec.o fman_memac.o fman_tgec.o
Loading

0 comments on commit 6b5e09a

Please sign in to comment.