1. 23 Sep, 2016 10 commits
  2. 22 Sep, 2016 30 commits
    • Linus Torvalds's avatar
      Merge tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · b1f2beb8
      Linus Torvalds authored
      Pull media fixes from Mauro Carvalho Chehab:
      
       - several fixes for new drivers added for Kernel 4.8 addition (cec
         core, pulse8 cec driver and Mediatek vcodec)
      
       - a regression fix for cx23885 and saa7134 drivers
      
       - an important fix for rcar-fcp, making rcar_fcp_enable() return 0 on
         success
      
      * tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (25 commits)
        [media] cx23885/saa7134: assign q->dev to the PCI device
        [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success
        [media] cec: fix ioctl return code when not registered
        [media] cec: don't Feature Abort broadcast msgs when unregistered
        [media] vcodec:mediatek: Refine VP8 encoder driver
        [media] vcodec:mediatek: Refine H264 encoder driver
        [media] vcodec:mediatek: change H264 profile default to profile high
        [media] vcodec:mediatek: Add timestamp and timecode copy for V4L2 Encoder
        [media] vcodec:mediatek: Fix visible_height larger than coded_height issue in s_fmt_out
        [media] vcodec:mediatek: Fix fops_vcodec_release flow for V4L2 Encoder
        [media] vcodec:mediatek:code refine for v4l2 Encoder driver
        [media] cec-funcs.h: add missing vendor-specific messages
        [media] cec-edid: check for IEEE identifier
        [media] pulse8-cec: fix error handling
        [media] pulse8-cec: set correct Signal Free Time
        [media] mtk-vcodec: add HAS_DMA dependency
        [media] cec: ignore messages when log_addr_mask == 0
        [media] cec: add item to TODO
        [media] cec: set unclaimed addresses to CEC_LOG_ADDR_INVALID
        [media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag
        ...
      b1f2beb8
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f887c21e
      Linus Torvalds authored
      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
    • Juergen Gross's avatar
      xen-netback: switch to threaded irq for control ring · 0364a882
      Juergen Gross authored
      Instead of open coding it use the threaded irq mechanism in
      xen-netback.
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Acked-by: default avatarWei Liu <wei.liu2@citrix.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0364a882
    • Sean Wang's avatar
      net: ethernet: mediatek: get out of potential invalid pointer access · f6f7d9c0
      Sean Wang authored
      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: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f6f7d9c0
    • Sean Wang's avatar
      net: ethernet: mediatek: use [get|set]_link_ksettings · 3e60b748
      Sean Wang authored
      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: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3e60b748
    • Sean Wang's avatar
      net: ethernet: mediatek: remove superfluous local variable for phy address · a2b2a19f
      Sean Wang authored
      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: default avatarNelson Chang <nelson.chang@mediatek.com>
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a2b2a19f
    • Sean Wang's avatar
      net: ethernet: mediatek: use phydev from struct net_device · 2364c5c5
      Sean Wang authored
      reuse phydev already in struct net_device instead of creating
      another new one in private structure.
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2364c5c5
    • David S. Miller's avatar
      Merge branch 'mediatek-trgmii' · 4fa01af4
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      4fa01af4
    • Sean Wang's avatar
      net: ethernet: mediatek: add the dts property to set if TRGMII supported on GMAC0 · b8853965
      Sean Wang authored
      Add the dts property for the capability if TRGMII supported on GAMC0
      Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b8853965
    • Sean Wang's avatar
      net: ethernet: mediatek: add support for GMAC0 connecting with external PHY through TRGMII · f430dea7
      Sean Wang authored
      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: default avatarSean Wang <sean.wang@mediatek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f430dea7
    • Sean Wang's avatar
      net: ethernet: mediatek: add extension of phy-mode for TRGMII · 572de608
      Sean Wang authored
      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: default avatarSean Wang <sean.wang@mediatek.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      572de608
    • David S. Miller's avatar
      Merge tag 'rxrpc-rewrite-20160922-v2' of... · 60cd6e63
      David S. Miller authored
      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: default avatarkbuild test robot <lkp@intel.com>
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      60cd6e63
    • David Howells's avatar
      rxrpc: Reduce the number of PING ACKs sent · fc943f67
      David Howells authored
      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: default avatarDavid Howells <dhowells@redhat.com>
      fc943f67
    • David Howells's avatar
      rxrpc: Reduce the number of ACK-Requests sent · 0d4b103c
      David Howells authored
      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: default avatarDavid Howells <dhowells@redhat.com>
      0d4b103c
    • Yuchung Cheng's avatar
      tcp: properly account Fast Open SYN-ACK retrans · 7e32b443
      Yuchung Cheng authored
      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: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
      Signed-off-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e32b443
    • Yuchung Cheng's avatar
      tcp: fix under-accounting retransmit SNMP counters · de1d6578
      Yuchung Cheng authored
      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: default avatarYuchung Cheng <ycheng@google.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de1d6578
    • David S. Miller's avatar
      Merge branch 'ftgmac100-ast2500-support' · cdd0766d
      David S. Miller authored
      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: default avatarDavid S. Miller <davem@davemloft.net>
      cdd0766d
    • Joel Stanley's avatar
      net/faraday: Mask out PHYSTS_CHG interrupt · edcd692f
      Joel Stanley authored
      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: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      edcd692f
    • Joel Stanley's avatar
      net/faraday: Configure old MDIO interface on Aspeed SoCs · e07dc63b
      Joel Stanley authored
      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: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e07dc63b
    • Gavin Shan's avatar
      net/faraday: Clear stale interrupts · 08c9c126
      Gavin Shan authored
      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: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      08c9c126
    • Joel Stanley's avatar
      net/faraday: Adapt for Aspeed SoCs · 2a0ab8eb
      Joel Stanley authored
      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: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2a0ab8eb
    • Andrew Jeffery's avatar
      net/faraday: Make EDO{R,T}R bits configurable · 7906a4da
      Andrew Jeffery authored
      These bits are #defined at a fixed location. In order to support future
      hardware that has chosen to move these bits around move the bits into a
      member of the struct ftgmac100.
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7906a4da
    • Andrew Jeffery's avatar
      net/faraday: Separate rx page storage from rxdesc · ada66b54
      Andrew Jeffery authored
      The ftgmac100 hardware revision in e.g. the Aspeed AST2500 no longer
      reserves all bits in RXDES#2 but instead uses the bottom 16 bits to
      store MAC frame metadata. Avoid corruption by shifting struct page
      pointers out to their own member in struct ftgmac100.
      Signed-off-by: default avatarAndrew Jeffery <andrew@aj.id.au>
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ada66b54
    • David Howells's avatar
      rxrpc: Obtain RTT data by requesting ACKs on DATA packets · 50235c4b
      David Howells authored
      In addition to sending a PING ACK to gain RTT data, we can set the
      RXRPC_REQUEST_ACK flag on a DATA packet and get a REQUESTED-ACK ACK.  The
      ACK packet contains the serial number of the packet it is in response to,
      so we can look through the Tx buffer for a matching DATA packet.
      
      This requires that the data packets be stamped with the time of
      transmission as a ktime rather than having the resend_at time in jiffies.
      
      This further requires the resend code to do the resend determination in
      ktimes and convert to jiffies to set the timer.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      50235c4b
    • David Howells's avatar
      rxrpc: Add ktime_sub_ms() · 77f2efcb
      David Howells authored
      Add a ktime_sub_ms() to go with ktime_add_ms() and co. for use in AF_RXRPC
      RTT determination.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      77f2efcb
    • David Howells's avatar
      rxrpc: Expedite ping response transmission · 7aa51da7
      David Howells authored
      Expedite the transmission of a response to a PING ACK by sending it from
      sendmsg if one is pending.  We're most likely to see a PING ACK during the
      client call Tx phase as the other side may use it to determine a number of
      parameters, such as the client's receive window size, the RTT and whether
      the client is doing slow start (similar to RFC5681).
      
      If we don't expedite it, it's left to the background processing thread to
      transmit.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      7aa51da7
    • David Howells's avatar
      rxrpc: Send pings to get RTT data · 8e83134d
      David Howells authored
      Send a PING ACK packet to the peer when we get a new incoming call from a
      peer we don't have a record for.  The PING RESPONSE ACK packet will tell us
      the following about the peer:
      
       (1) its receive window size
      
       (2) its MTU sizes
      
       (3) its support for jumbo DATA packets
      
       (4) if it supports slow start (similar to RFC 5681)
      
       (5) an estimate of the RTT
      
      This is necessary because the peer won't normally send us an ACK until it
      gets to the Rx phase and we send it a packet, but we would like to know
      some of this information before we start sending packets.
      
      A pair of tracepoints are added so that RTT determination can be observed.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      8e83134d
    • Wei Yongjun's avatar
      cxgb4: Convert to use simple_open() · 524605e5
      Wei Yongjun authored
      Remove an open coded simple_open() function and replace file
      operations references to the function with simple_open()
      instead.
      
      Generated by: scripts/coccinelle/api/simple_open.cocci
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      524605e5
    • Wei Yongjun's avatar
      net: dsa: qca8k: use mdio_module_driver to simplify the code · a084ab33
      Wei Yongjun authored
      mdio_module_driver() makes the code simpler by eliminating
      boilerplate code.
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a084ab33
    • Wei Yongjun's avatar
      net: dsa: qca8k: fix non static symbol warning · fcfbfd68
      Wei Yongjun authored
      Fixes the following sparse warning:
      
      drivers/net/dsa/qca8k.c:259:22: warning:
       symbol 'qca8k_regmap_config' was not declared. Should it be static?
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fcfbfd68