1. 02 8月, 2017 21 次提交
    • V
      net: dsa: qca8k: enable EEE once · dca20989
      Vivien Didelot 提交于
      If EEE is queried enabled, qca8k_set_eee calls qca8k_eee_enable_set
      twice (because it is already called in qca8k_eee_init). Fix that.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      dca20989
    • V
      net: dsa: qca8k: fix EEE init · 06d7b5c3
      Vivien Didelot 提交于
      The qca8k obviously copied code from the sf2 driver as how to set EEE:
      
          if (e->eee_enabled) {
              p->eee_enabled = qca8k_eee_init(ds, port, phydev);
              if (!p->eee_enabled)
                  ret = -EOPNOTSUPP;
          }
      
      But it did not use the same logic for the EEE init routine, which is
      "Returns 0 if EEE was not enabled, or 1 otherwise". This results in
      returning -EOPNOTSUPP on success and caching EEE enabled on failure.
      
      This patch fixes the returned value of qca8k_eee_init.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      06d7b5c3
    • V
      net: dsa: PHY device is mandatory for EEE · 7b9cc738
      Vivien Didelot 提交于
      The port's PHY and MAC are both implied in EEE. The current code does
      not call the PHY operations if the related device is NULL. Change that
      by returning -ENODEV if there's no PHY device attached to the interface.
      Signed-off-by: NVivien Didelot <vivien.didelot@savoirfairelinux.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b9cc738
    • D
      Merge branch 'ravb-wol-magic-packet' · 13e6be2d
      David S. Miller 提交于
      Niklas Söderlund says:
      
      ====================
      ravb: add wake-on-lan support via magic packet
      
      WoL is enabled in the suspend callback by setting MagicPacket detection
      and disabling all interrupts expect MagicPacket. In the resume path the
      driver needs to reset the hardware to rearm the WoL logic, this prevents
      the driver from simply restoring the registers and to take advantage of
      that ravb was not suspended to reduce resume time. To reset the
      hardware the driver closes the device, sets it in reset mode and reopens
      the device just like it would do in a normal suspend/resume scenario
      without WoL enabled, but it both closes and opens the device in the
      resume callback since the device needs to be reset for WoL to work.
      
      One quirk needed for WoL is that the module clock needs to be prevented
      from being switched off by Runtime PM. To keep the clock alive the
      suspend callback need to call clk_enable() directly to increase the
      usage count of the clock. Then when Runtime PM decreases the clock usage
      count it won't reach 0 and be switched off.
      
      Changes since v2
      - Only do the clock dance to workaround PSCI sleep when resuming if WoL
        is enabled. This was a bug in v2 which resulted in a WARN if resuming
        from PSCI sleep with WoL disabled, thanks Sergei for pointing this
        out!
      - Break out clock dance workaround in separate patch to make it easier
        to revert once a fix is upstream for the clock driver as suggested by
        Sergei.
      
      Changes since v1
      - Fix issue where device would fail to resume from PSCI suspend if WoL
        was enabled, reported by Geert. The fault was that the clock driver
        thinks the clock is on, but PSCI have disabled it, added workaround
        for this in ravb driver which can be removed once the clock driver is
        aware of the PSCI behavior.
      - Only try to restore from wol wake up if netif is running, since this
        is a condition to enable wol in the first place this was a bug in v1.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      13e6be2d
    • N
      ravb: add workaround for clock when resuming with WoL enabled · fbf3d034
      Niklas Söderlund 提交于
      The renesas-cpg-mssr clock driver are not yet aware of PSCI sleep where
      power is cut to the SoC. When resuming from this state with WoL enabled
      the enable count of the ravb clock is 1 and the clock driver thinks the
      clock is already on when PM core enables the clock and increments the
      enable count to 2. This will result in the ravb driver failing to talk
      to the hardware since the module clock is off. Work around this by
      forcing the enable count to 0 and then back to 2 when resuming with WoL
      enabled.
      
      This workaround should be reverted once the renesas-cpg-mssr clock
      driver becomes aware of this PSCI sleep behavior.
      Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fbf3d034
    • N
      ravb: add wake-on-lan support via magic packet · 3e3d6477
      Niklas Söderlund 提交于
      WoL is enabled in the suspend callback by setting MagicPacket detection
      and disabling all interrupts expect MagicPacket. In the resume path the
      driver needs to reset the hardware to rearm the WoL logic, this prevents
      the driver from simply restoring the registers and to take advantage of
      that ravb was not suspended to reduce resume time. To reset the
      hardware the driver closes the device, sets it in reset mode and reopens
      the device just like it would do in a normal suspend/resume scenario
      without WoL enabled, but it both closes and opens the device in the
      resume callback since the device needs to be reset for WoL to work.
      
      One quirk needed for WoL is that the module clock needs to be prevented
      from being switched off by Runtime PM. To keep the clock alive the
      suspend callback need to call clk_enable() directly to increase the
      usage count of the clock. Then when Runtime PM decreases the clock usage
      count it won't reach 0 and be switched off.
      Signed-off-by: NNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
      Acked-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3e3d6477
    • D
      Merge branch 'for-upstream' of... · 906a039d
      David S. Miller 提交于
      Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
      
      Johan Hedberg says:
      
      ====================
      pull request: bluetooth-next 2017-08-01
      
      Here's our first batch of Bluetooth patches for the 4.14 kernel:
      
       - Several new USB IDs for the btusb driver
       - Memory leak fix in btusb driver
       - Cleanups & fixes to hci_nokia, hci_serdev and hci_bcm drivers
       - Fixed cleanup path in mrf24j40 (802.15.4) driver probe function
       - A few other smaller cleanups & fixes to drivers
      
      Please let me know if there are any issues pulling. Thanks.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      906a039d
    • W
      net: add skb_frag_foreach_page and use with kmap_atomic · c613c209
      Willem de Bruijn 提交于
      Skb frags may contain compound pages. Various operations map frags
      temporarily using kmap_atomic, but this function works on single
      pages, not whole compound pages. The distinction is only relevant
      for high mem pages that require temporary mappings.
      
      Introduce a looping mechanism that for compound highmem pages maps
      one page at a time, does not change behavior on other pages.
      Use the loop in the kmap_atomic callers in net/core/skbuff.c.
      
      Verified by triggering skb_copy_bits with
      
          tcpdump -n -c 100 -i ${DEV} -w /dev/null &
          netperf -t TCP_STREAM -H ${HOST}
      
        and by triggering __skb_checksum with
      
          ethtool -K ${DEV} tx off
      
        repeated the tests with looping on a non-highmem platform
        (x86_64) by making skb_frag_must_loop always return true.
      Signed-off-by: NWillem de Bruijn <willemb@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c613c209
    • D
      Merge branch 'mediatek-next' · 1ae39d65
      David S. Miller 提交于
      Sean Wang says:
      
      ====================
      net-next: mediatek: add support for ethernet on MT7622 SoC
      
      Changes since v2:
      - update John's mail
      
      Changes since v1:
      - add refinement for ethernet clock management
      - take out the code block for ESW, add it until ESW driver is actually introduced
      
      The series adds the driver for ethernet controller found on MT7622 SoC.
      There are additions against with previous MT7623 SoC such as shared SGMII
      given for the dual GMACs and built-in 5-ports 10/100 embedded switch support
      (ESW). Thus more clocks consumers and SGMII hardware setup for the extra
      features are all introduced here and as for the support for ESW that would be
      planned to add in the separate patch integrating with DSA infrastructure
      in the future.
      
      Currently testing successfully is done with those patches for the conditions
      such as GMAC2 with IP1001 PHY via RGMII and GMAC1/2 with RTL8211F PHY via SGMII.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ae39d65
    • S
      MAINTAINERS: add Sean/Nelson as MediaTek ethernet maintainers · 0857d6f8
      Sean Wang 提交于
      Sean and Nelson work for MediaTek on maintaining the MediaTek ethernet
      driver for the existing SoCs and adding support for the following SoCs.
      In the past, Sean has been active at making most of the qualifications
      , stress test and submitting a lot of patches for the driver while
      Nelson was looking into the aspects more on hardware additions and details
      such as introducing PDMA with Hardware LRO to the driver. Also update
      John's up-to-date mail address in the patch.
      
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NNelson Chang <nelson.chang@mediatek.com>
      Acked-by: NJohn Crispin <john@phrozen.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0857d6f8
    • S
      net-next: mediatek: add support for MediaTek MT7622 SoC · 42c03844
      Sean Wang 提交于
      This patch adds the driver for ethernet controller on MT7622 SoC. It has
      the similar handling logic as the previously MT7623 does, but there are
      additions against with MT7623 SoC, the shared SGMII given for the dual
      GMACs and including 5-ports 10/100 embedded switch support (ESW) as the
      GMAC1 option, thus more clocks consumers for the extra feature are
      introduced here. So for ease portability and maintenance, those
      differences all are being kept inside the platform data as other drivers
      usually do. Currently testing successfully is done with those patches for
      the conditions such as GMAC2 with IP1001 PHY via RGMII and GMAC1/2 with
      RTL8211F PHY via SGMII.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      42c03844
    • S
      net-next: mediatek: add platform data to adapt into various hardware · 2ec50f57
      Sean Wang 提交于
      This patch is the preparation patch in order to adapt into various
      hardware through adding platform data which holds specific characteristics
      among MediaTek SoCs and introducing the unified clock handler for those
      distinct clock requirements depending on different features such as
      TRGMII and SGMII getting support on the target SoC. And finally, add
      enhancement with given the generic description for Kconfig and remove the
      unnecessary machine type dependency in Makefile.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ec50f57
    • S
      dt-bindings: net: mediatek: add support for MediaTek MT7623 and MT7622 SoC · da779b40
      Sean Wang 提交于
      The patch adds the supplements in the dt-binding document for MediaTek
      MT7622 SoC with extra SGMII system controller and relevant clock consumers
      listed as the requirements for those SoCs equipped with the SGMII circuit.
      Also, add the missing binding information for MT7623 SoC here which relies
      on the fallback binding of MT2701.
      Signed-off-by: NSean Wang <sean.wang@mediatek.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      da779b40
    • D
      Merge branch 'kzproxy-next' · 2e674381
      David S. Miller 提交于
      Tom Herbert says:
      
      ====================
      net: Infrastructure changes for [kz]proxy
      
      This patch set contains some general infrastructure enhancements that
      will be used by kernel proxy and zero proxy.
      
      The changes are:
        - proto_ops: Add locked versions of sendmsg and sendpage
        - skb_send_sock: Allow sending and skb on a socket within the
          kernel
        - Generalize strparser. Allow it to be used in other contexts than
          just in the read_sock path. This will be used in the transmit
          path of zero proxy.
      
      Some nice future work (which I've been discussing with John Fastabend)
      will be to make some of the related functions to allow gifting of skbs
      We should be able to do that with skb_send_sock and strp_process. I'd
      also like this feature in the read_sock callbeck.
      
      Tested: Ran modified kernel without incident. Tested new functionality
      using zero proxy (in development).
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e674381
    • T
      strparser: Generalize strparser · bbb03029
      Tom Herbert 提交于
      Generalize strparser from more than just being used in conjunction
      with read_sock. strparser will also be used in the send path with
      zero proxy. The primary change is to create strp_process function
      that performs the critical processing on skbs. The documentation
      is also updated to reflect the new uses.
      Signed-off-by: NTom Herbert <tom@quantonium.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbb03029
    • T
      skbuff: Function to send an skbuf on a socket · 20bf50de
      Tom Herbert 提交于
      Add skb_send_sock to send an skbuff on a socket within the kernel.
      Arguments include an offset so that an skbuf might be sent in mulitple
      calls (e.g. send buffer limit is hit).
      Signed-off-by: NTom Herbert <tom@quantonium.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      20bf50de
    • T
      proto_ops: Add locked held versions of sendmsg and sendpage · 306b13eb
      Tom Herbert 提交于
      Add new proto_ops sendmsg_locked and sendpage_locked that can be
      called when the socket lock is already held. Correspondingly, add
      kernel_sendmsg_locked and kernel_sendpage_locked as front end
      functions.
      
      These functions will be used in zero proxy so that we can take
      the socket lock in a ULP sendmsg/sendpage and then directly call the
      backend transport proto_ops functions.
      Signed-off-by: NTom Herbert <tom@quantonium.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      306b13eb
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 29fda25a
      David S. Miller 提交于
      Two minor conflicts in virtio_net driver (bug fix overlapping addition
      of a helper) and MAINTAINERS (new driver edit overlapping revamp of
      PHY entry).
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29fda25a
    • D
      Merge branch 'revert-ipv6-const' · bb1182bc
      David S. Miller 提交于
      Julia Lawall says:
      
      ====================
      Revert "ipv6: constify inet6_protocol structures"
      
      inet6_add_protocol and inet6_del_protocol include casts that remove the
      effect of the const annotation on their parameter, leading to possible
      runtime crashes.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bb1182bc
    • J
      Revert "l2tp: constify inet6_protocol structures" · e6eeb287
      Julia Lawall 提交于
      This reverts commit d04916a4.
      
      inet6_add_protocol and inet6_del_protocol include casts that remove the
      effect of the const annotation on their parameter, leading to possible
      runtime crashes.
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6eeb287
    • J
      Revert "ipv6: constify inet6_protocol structures" · 39294c3d
      Julia Lawall 提交于
      This reverts commit 3a3a4e30.
      
      inet6_add_protocol and inet6_del_protocol include casts that remove the
      effect of the const annotation on their parameter, leading to possible
      runtime crashes.
      Reported-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39294c3d
  2. 01 8月, 2017 19 次提交