1. 23 9月, 2016 20 次提交
  2. 22 9月, 2016 20 次提交
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f887c21e
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "Mostly small bits scattered all over the place, which is usually how
        things go this late in the -rc series.
      
         1) Proper driver init device resets in bnx2, from Baoquan He.
      
         2) Fix accounting overflow in __tcp_retransmit_skb(),
            sk_forward_alloc, and ip_idents_reserve, from Eric Dumazet.
      
         3) Fix crash in bna driver ethtool stats handling, from Ivan Vecera.
      
         4) Missing check of skb_linearize() return value in mac80211, from
            Johannes Berg.
      
         5) Endianness fix in nf_table_trace dumps, from Liping Zhang.
      
         6) SSN comparison fix in SCTP, from Marcelo Ricardo Leitner.
      
         7) Update DSA and b44 MAINTAINERS entries.
      
         8) Make input path of vti6 driver work again, from Nicolas Dichtel.
      
         9) Off-by-one in mlx4, from Sebastian Ott.
      
        10) Fix fallback route lookup handling in ipv6, from Vincent Bernat.
      
        11) Fix stack corruption on probe in qed driver, from Yuval Mintz.
      
        12) PHY init fixes in r8152 from Hayes Wang.
      
        13) Missing SKB free in irda_accept error path, from Phil Turnbull"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (61 commits)
        tcp: properly account Fast Open SYN-ACK retrans
        tcp: fix under-accounting retransmit SNMP counters
        MAINTAINERS: Update b44 maintainer.
        net: get rid of an signed integer overflow in ip_idents_reserve()
        net/mlx4_core: Fix to clean devlink resources
        net: can: ifi: Configure transmitter delay
        vti6: fix input path
        ipmr, ip6mr: return lastuse relative to now
        r8152: disable ALDPS and EEE before setting PHY
        r8152: remove r8153_enable_eee
        r8152: move PHY settings to hw_phy_cfg
        r8152: move enabling PHY
        r8152: move some functions
        cxgb4/cxgb4vf: Allocate more queues for 25G and 100G adapter
        qed: Fix stack corruption on probe
        MAINTAINERS: Add an entry for the core network DSA code
        net: ipv6: fallback to full lookup if table lookup is unsuitable
        net/mlx5: E-Switch, Handle mode change failures
        net/mlx5: E-Switch, Fix error flow in the SRIOV e-switch init code
        net/mlx5: Fix flow counter bulk command out mailbox allocation
        ...
      f887c21e
    • J
      xen-netback: switch to threaded irq for control ring · 0364a882
      Juergen Gross 提交于
      Instead of open coding it use the threaded irq mechanism in
      xen-netback.
      Signed-off-by: NJuergen Gross <jgross@suse.com>
      Acked-by: NWei Liu <wei.liu2@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0364a882
    • S
      net: ethernet: mediatek: get out of potential invalid pointer access · f6f7d9c0
      Sean Wang 提交于
      Potential dangerous invalid pointer might be accessed if
      the error happens when couple phy_device to net_device so
      cleanup the error path.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6f7d9c0
    • S
      net: ethernet: mediatek: use [get|set]_link_ksettings · 3e60b748
      Sean Wang 提交于
      1) use new api [get|set]_link_ksettings instead
      of [get|set]_settings old ones.
      
      2) dev->phydev is sure being ready before calling
      these callbacks, so removing all the sanity check
      if it is existing.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e60b748
    • S
      net: ethernet: mediatek: remove superfluous local variable for phy address · a2b2a19f
      Sean Wang 提交于
      remove the unused variable for parsing PHY address
      and the related logic for sanity test which would
      be all already handled done when of_mdiobus_register
      was called
      Reported-by: NNelson Chang <nelson.chang@mediatek.com>
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a2b2a19f
    • S
      net: ethernet: mediatek: use phydev from struct net_device · 2364c5c5
      Sean Wang 提交于
      reuse phydev already in struct net_device instead of creating
      another new one in private structure.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2364c5c5
    • D
      Merge branch 'mediatek-trgmii' · 4fa01af4
      David S. Miller 提交于
      Sean Wang says:
      
      ====================
      mediatek: add support for RGMII on GMAC0 through TRGMII hardware module
      
      By default, GMAC0 is connected to built-in switch called
      MT7530 through the proprietary interface called Turbo RGMII
      (TRGMII). TRGMII also supports well for RGMII as generic external
      PHY uses but requires some slight changes to the setup of TRGMII
      and doesn't have well support on current driver.
      
      So this patchset
      1) provides the slight changes of the setup for RGMII can work
         through TRGMII
      2) adds additional setting "trgmii" as PHY_INTERFACE_MODE_TRGMII
         about phy-mode on device tree to make GMAC0 distinguish which
         mode it runs
      3) changes dynamically source clock, TX/RX delay and interface
         mode on TRGMII for adapting various link
      
      Changes since v1:
      - fixed the style of comment which doesn't have a space at
         the beginning and end of comment lines
      - add support for phy-mode "trgmii" as PHY_INTERFACE_MODE_TRGMII
         into linux/phy.h
      - enhance the Documentation about device tree binding for trgmii
        which is applicable only for GMAC0 which uses fixed-link
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4fa01af4
    • S
      net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 · b8853965
      Sean Wang 提交于
      Add the dts property for the capability if TRGMII supported on GAMC0
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b8853965
    • S
      net: ethernet: mediatek: add support for GMAC0 connecting with external PHY through TRGMII · f430dea7
      Sean Wang 提交于
      Changing dynamically source clock, TX/RX delay and interface mode
      used by TRGMII hardware module inside PHY capability polling routine
      for adapting to the various speed of RGMII used by external PHY for
      GMAC0.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f430dea7
    • S
      net: ethernet: mediatek: add extension of phy-mode for TRGMII · 572de608
      Sean Wang 提交于
      adds PHY-mode "trgmii" as an extension for the operation
      mode of the PHY interface for PHY_INTERFACE_MODE_TRGMII.
      and adds a variable trgmii inside mtk_mac as the indication
      to make the difference between the MAC connected to internal
      switch or connected to external PHY by the given configuration
      on the board and then to perform the corresponding setup on
      TRGMII hardware module.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      572de608
    • D
      Merge tag 'rxrpc-rewrite-20160922-v2' of... · 60cd6e63
      David S. Miller 提交于
      Merge tag 'rxrpc-rewrite-20160922-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
      
      David Howells says:
      
      ====================
      rxrpc: Preparation for slow-start algorithm [ver #2]
      
      Here are some patches that prepare for improvements in ACK generation and
      for the implementation of the slow-start part of the protocol:
      
       (1) Stop storing the protocol header in the Tx socket buffers, but rather
           generate it on the fly.  This potentially saves a little space and
           makes it easier to alter the header just before transmission (the
           flags may get altered and the serial number has to be changed).
      
       (2) Mask off the Tx buffer annotations and add a flag to record which ones
           have already been resent.
      
       (3) Track RTT on a per-peer basis for use in future changes.  Tracepoints
           are added to log this.
      
       (4) Send PING ACKs in response to incoming calls to elicit a PING-RESPONSE
           ACK from which RTT data can be calculated.  The response also carries
           other useful information.
      
       (5) Expedite PING-RESPONSE ACK generation from sendmsg.  If we're actively
           using sendmsg, this allows us, under some circumstances, to avoid
           having to rely on the background work item to run to generate this
           ACK.
      
           This requires ktime_sub_ms() to be added.
      
       (6) Set the REQUEST-ACK flag on some DATA packets to elicit ACK-REQUESTED
           ACKs from which RTT data can be calculated.
      
       (7) Limit the use of pings and ACK requests for RTT determination.
      
      Changes:
      
       (V2) Don't use the C division operator for 64-bit division.  One instance
            should use do_div() and the other should be using nsecs_to_jiffies().
      
            The last two patches got transposed, leading to an undefined symbol
            in one of them.
      Reported-by: Nkbuild test robot <lkp@intel.com>
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      60cd6e63
    • D
      rxrpc: Reduce the number of PING ACKs sent · fc943f67
      David Howells 提交于
      We don't want to send a PING ACK for every new incoming call as that just
      adds to the network traffic.  Instead, we send a PING ACK to the first
      three that we receive and then once per second thereafter.
      
      This could probably be made adjustable in future.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      fc943f67
    • D
      rxrpc: Reduce the number of ACK-Requests sent · 0d4b103c
      David Howells 提交于
      Reduce the number of ACK-Requests we set on DATA packets that we're sending
      to reduce network traffic.  We set the flag on odd-numbered DATA packets to
      start off the RTT cache until we have at least three entries in it and then
      probe once per second thereafter to keep it topped up.
      
      This could be made tunable in future.
      
      Note that from this point, the RXRPC_REQUEST_ACK flag is set on DATA
      packets as we transmit them and not stored statically in the sk_buff.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      0d4b103c
    • Y
      tcp: properly account Fast Open SYN-ACK retrans · 7e32b443
      Yuchung Cheng 提交于
      Since the TFO socket is accepted right off SYN-data, the socket
      owner can call getsockopt(TCP_INFO) to collect ongoing SYN-ACK
      retransmission or timeout stats (i.e., tcpi_total_retrans,
      tcpi_retransmits). Currently those stats are only updated
      upon handshake completes. This patch fixes it.
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NNeal Cardwell <ncardwell@google.com>
      Signed-off-by: NSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e32b443
    • Y
      tcp: fix under-accounting retransmit SNMP counters · de1d6578
      Yuchung Cheng 提交于
      This patch fixes these under-accounting SNMP rtx stats
      LINUX_MIB_TCPFORWARDRETRANS
      LINUX_MIB_TCPFASTRETRANS
      LINUX_MIB_TCPSLOWSTARTRETRANS
      when retransmitting TSO packets
      
      Fixes: 10d3be56 ("tcp-tso: do not split TSO packets at retransmit time")
      Signed-off-by: NYuchung Cheng <ycheng@google.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      de1d6578
    • D
      Merge branch 'ftgmac100-ast2500-support' · cdd0766d
      David S. Miller 提交于
      Joel Stanley says:
      
      ====================
      ftgmac100 support for ast2500
      
      This series adds support to the ftgmac100 driver for the Aspeed ast2400 and
      ast2500 SoCs. In particular, they ensure the driver works correctly on the
      ast2500 where the MAC block has seen some changes in register layout.
      
      They have been tested on ast2400 and ast2500 systems with the NCSI stack and
      with a directly attached PHY.
      
      V2 reworks the two patches relating to PHYSTS_CHG into the one patch that
      disables the interrupt instead of playing with interrupt sensitivity. I kept
      patch 4 'net/faraday: Clear stale interrupts' which was first introduced to
      clear the stale PHYSTS_CHG interrupt, as it helps keep us safe from unhygienic
      (vendor) bootloaders.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cdd0766d
    • J
      net/faraday: Mask out PHYSTS_CHG interrupt · edcd692f
      Joel Stanley 提交于
      The PHYSTS_CHG (the ftgmac100's PHY IRQ) is telling the system to go
      look at the PHY registers for a link status change.
      
      The interrupt was causing issues on Aspeed SoC where some board designs
      had an active high configuration, some active low, and in some cases
      repurposed for other functions. When misconfigured Linux would chew 100%
      of CPU cycles servicing interrupts:
      
       [   20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
       [   20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
       [   20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
       [   20.300000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
      
      While in the ftgmac100 IP can be configured for high, low and edge
      sensitivity the current driver always polls the PHY, so we chose to mask
      out the interrupt.
      
      See https://patchwork.ozlabs.org/patch/672099/ for more discussion.
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edcd692f
    • J
      net/faraday: Configure old MDIO interface on Aspeed SoCs · e07dc63b
      Joel Stanley 提交于
      The Aspeed SoCs have a new MDIO interface as an option in the G4 and G5
      SoCs. The old one is still available, so select it in order to remain
      compatible with the ftgmac100 driver.
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e07dc63b
    • G
      net/faraday: Clear stale interrupts · 08c9c126
      Gavin Shan 提交于
      There is stale interrupt (PHYSTS_CHG in ISR, bit#6 in 0x0) from
      the bootloader (uboot) when enabling the MAC. The stale interrupts
      aren't part of kernel and should be cleared.
      
      This clears the stale interrupts in ISR (0x0) when enabling the MAC.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      08c9c126
    • J
      net/faraday: Adapt for Aspeed SoCs · 2a0ab8eb
      Joel Stanley 提交于
      The RXDES and TXDES registers bits in the ftgmac100 indicates EDO{R,T}R
      at bit position 15 for the Faraday Tech IP. However, the version of this
      IP present in the Aspeed SoCs has these bits at position 30 in the
      registers.
      
      It appers that ast2400 SoCs support both positions, with the 15th bit
      marked as reserved but still functional. In the ast2500 this bit is
      reused for another function, so we need a work around.
      
      This was confirmed with engineers from Aspeed that using bit 30 is
      correct for both the ast2400 and ast2500 SoCs.
      Signed-off-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2a0ab8eb