1. 15 1月, 2015 22 次提交
  2. 14 1月, 2015 18 次提交
    • D
      Merge branch 'hip04' · 237de6ef
      David S. Miller 提交于
      Ding Tianhong says:
      
      ====================
      add hisilicon hip04 ethernet driver
      
      v13:
      - Fix the problem of alignment parameters for function and checkpatch warming.
      
      v12:
      - According Alex's suggestion, modify the changelog and add MODULE_DEVICE_TABLE
        for hip04 ethernet.
      
      v11:
      - Add ethtool support for tx coalecse getting and setting, the xmit_more
        is not supported for this patch, but I think it could work for hip04,
        will support it later after some tests for performance better.
      
        Here are some performance test results by ping and iperf(add tx_coalesce_frames/users),
        it looks that the performance and latency is more better by tx_coalesce_frames/usecs.
      
        - Before:
          $ ping 192.168.1.1 ...
          === 192.168.1.1 ping statistics ===
          24 packets transmitted, 24 received, 0% packet loss, time 22999ms
          rtt min/avg/max/mdev = 0.180/0.202/0.403/0.043 ms
      
          $ iperf -c 192.168.1.1 ...
          [ ID] Interval       Transfer     Bandwidth
          [  3]  0.0- 1.0 sec   115 MBytes   945 Mbits/sec
      
        - After:
          $ ping 192.168.1.1 ...
          === 192.168.1.1 ping statistics ===
          24 packets transmitted, 24 received, 0% packet loss, time 22999ms
          rtt min/avg/max/mdev = 0.178/0.190/0.380/0.041 ms
      
          $ iperf -c 192.168.1.1 ...
          [ ID] Interval       Transfer     Bandwidth
          [  3]  0.0- 1.0 sec   115 MBytes   965 Mbits/sec
      
      v10:
      - According Arnd's suggestion, remove the skb_orphan and use the hrtimer
        for the cleanup of the TX queue and add some modification for the hip04
        drivers.
        1) drop the broken skb_orphan call
        2) drop the workqueue
        3) batch cleanup based on tx_coalesce_frames/usecs for better throughput
        4) use a reasonable default tx timeout (200us, could be shorted
           based on measurements) with a range timer
        5) fix napi poll function return value
        6) use a lockless queue for cleanup
      
      v9:
      - There is no tx completion interrupts to free DMAd Tx packets, it means taht
        we rely on new tx packets arriving to run the destructors of completed packets,
        which open up space in their sockets's send queues. Sometimes we don't get such
        new packets causing Tx to stall, a single UDP transmitter is a good example of
        this situation, so we need a clean up workqueue to reclaims completed packets,
        the workqueue will only free the last packets which is already stay for several jiffies.
        Also fix some format cleanups.
      
      v8:
      - Use poll to reclaim xmitted buffer as workaround since no tx done interrupt
      
      v7:
      - Remove select NET_CORE in 0002
      
      v6:
      - Suggest by Russell: Use netdev_sent_queue & netdev_completed_queue to solve latency issue
        Also shorten the period of timer, which is used to wakeup the queue since no
        tx completed interrupt.
      
      v5:
      - no big change, fix typo
      
      v4:
      - Modify accoringly to the suggetion from Arnd, Florian, Eric, David
        Use of_parse_phandle_with_fixed_args & syscon_node_to_regmap get ppe info
        Add skb_orphan() and tx_timer for reclaim since no tx_finished interrupt
        Update timeout, and move of_phy_connect to probe to reuse open/stop
      
      v3:
      - Suggest from Arnd, use syscon & regmap_write/read to replace static void __iomem *ppebase.
        Modify hisilicon-hip04-net.txt accrordingly to suggestion from Florian and Sergei.
      
      v2:
      - Got many suggestions from Russell, Arnd, Florian, Mark and Sergei
        Remove memcpy, use dma_map/unmap_single, use dma_alloc_coherent rather than dma_pool, etc.
        Refer property in ethernet.txt, change ppe description, etc.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      237de6ef
    • D
      net: hisilicon: new hip04 ethernet driver · a41ea46a
      dingtianhong 提交于
      Support Hisilicon hip04 ethernet driver, including 100M / 1000M controller.
      The controller has no tx done interrupt, reclaim xmitted buffer in the poll.
      
      v13: Fix the problem of alignment parameters for function and checkpatch warming.
      
      v12: According Alex's suggestion, modify the changelog and add MODULE_DEVICE_TABLE
           for hip04 ethernet.
      
      v11: Add ethtool support for tx coalecse getting and setting, the xmit_more
           is not supported for this patch, but I think it could work for hip04,
           will support it later after some tests for performance better.
      
           Here are some performance test results by ping and iperf(add tx_coalesce_frames/users),
           it looks that the performance and latency is more better by tx_coalesce_frames/usecs.
      
           - Before:
           $ ping 192.168.1.1 ...
           === 192.168.1.1 ping statistics ===
           24 packets transmitted, 24 received, 0% packet loss, time 22999ms
           rtt min/avg/max/mdev = 0.180/0.202/0.403/0.043 ms
      
           $ iperf -c 192.168.1.1 ...
           [ ID] Interval       Transfer     Bandwidth
           [  3]  0.0- 1.0 sec   115 MBytes   945 Mbits/sec
      
           - After:
           $ ping 192.168.1.1 ...
           === 192.168.1.1 ping statistics ===
           24 packets transmitted, 24 received, 0% packet loss, time 22999ms
           rtt min/avg/max/mdev = 0.178/0.190/0.380/0.041 ms
      
           $ iperf -c 192.168.1.1 ...
           [ ID] Interval       Transfer     Bandwidth
           [  3]  0.0- 1.0 sec   115 MBytes   965 Mbits/sec
      
      v10: According David Miller and Arnd Bergmann's suggestion, add some modification
           for v9 version
           - drop the workqueue
           - batch cleanup based on tx_coalesce_frames/usecs for better throughput
           - use a reasonable default tx timeout (200us, could be shorted
             based on measurements) with a range timer
           - fix napi poll function return value
           - use a lockless queue for cleanup
      Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a41ea46a
    • Z
      net: hisilicon: new hip04 MDIO driver · 4a841ee9
      Zhangfei Gao 提交于
      Hisilicon hip04 platform mdio driver
      Reuse Marvell phy drivers/net/phy/marvell.c
      Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4a841ee9
    • Z
      Documentation: add Device tree bindings for Hisilicon hip04 ethernet · ef80c32d
      Zhangfei Gao 提交于
      This patch adds the Device Tree bindings for the Hisilicon hip04
      Ethernet controller, including 100M / 1000M controller.
      Signed-off-by: NZhangfei Gao <zhangfei.gao@linaro.org>
      Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ef80c32d
    • J
      neighbour: fix base_reachable_time(_ms) not effective immediatly when changed · 4bf6980d
      Jean-Francois Remy 提交于
      When setting base_reachable_time or base_reachable_time_ms on a
      specific interface through sysctl or netlink, the reachable_time
      value is not updated.
      
      This means that neighbour entries will continue to be updated using the
      old value until it is recomputed in neigh_period_work (which
          recomputes the value every 300*HZ).
      On systems with HZ equal to 1000 for instance, it means 5mins before
      the change is effective.
      
      This patch changes this behavior by recomputing reachable_time after
      each set on base_reachable_time or base_reachable_time_ms.
      The new value will become effective the next time the neighbour's timer
      is triggered.
      
      Changes are made in two places: the netlink code for set and the sysctl
      handling code. For sysctl, I use a proc_handler. The ipv6 network
      code does provide its own handler but it already refreshes
      reachable_time correctly so it's not an issue.
      Any other user of neighbour which provide its own handlers must
      refresh reachable_time.
      Signed-off-by: NJean-Francois Remy <jeff@melix.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bf6980d
    • S
      net: fec: fix MDIO bus assignement for dual fec SoC's · 3d125f9c
      Stefan Agner 提交于
      On i.MX28, the MDIO bus is shared between the two FEC instances.
      The driver makes sure that the second FEC uses the MDIO bus of the
      first FEC. This is done conditionally if FEC_QUIRK_ENET_MAC is set.
      However, in newer designs, such as Vybrid or i.MX6SX, each FEC MAC
      has its own MDIO bus. Simply removing the quirk FEC_QUIRK_ENET_MAC
      is not an option since other logic, triggered by this quirk, is
      still needed.
      
      Furthermore, there are board designs which use the same MDIO bus
      for both PHY's even though the second bus would be available on the
      SoC side. Such layout are popular since it saves pins on SoC side.
      Due to the above quirk, those boards currently do work fine. The
      boards in the mainline tree with such a layout are:
      - Freescale Vybrid Tower with TWR-SER2 (vf610-twr.dts)
      - Freescale i.MX6 SoloX SDB Board (imx6sx-sdb.dts)
      
      This patch adds a new quirk FEC_QUIRK_SINGLE_MDIO for i.MX28, which
      makes sure that the MDIO bus of the first FEC is used in any case.
      
      However, the boards above do have a SoC with a MDIO bus for each FEC
      instance. But the PHY's are not connected in a 1:1 configuration. A
      proper device tree description is needed to allow the driver to
      figure out where to find its PHY. This patch fixes that shortcoming
      by adding a MDIO bus child node to the first FEC instance, along
      with the two PHY's on that bus, and making use of the phy-handle
      property to add a reference to the PHY's.
      Acked-by: NSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: NStefan Agner <stefan@agner.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3d125f9c
    • X
      net/macb: improved ethtool statistics support · 3ff13f1c
      Xander Huff 提交于
      Currently `ethtool -S` simply returns "no stats available". It
      would be more useful to see what the various ethtool statistics
      registers' values are. This change implements get_ethtool_stats,
      get_strings, and get_sset_count functions to accomplish this.
      
      Read all GEM statistics registers and sum them into
      macb.ethtool_stats. Add the necessary infrastructure to make this
      accessible via `ethtool -S`.
      
      Update gem_update_stats to utilize ethtool_stats.
      Signed-off-by: NXander Huff <xander.huff@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ff13f1c
    • X
      net/macb: Adding comments to various #defs to make interpretation easier · 5c2fa0f6
      Xander Huff 提交于
      This change is to help improve at-a-glace knowledge of the purpose of the
      various Cadence MACB/GEM registers. Comments are more helpful for human
      readability than short acronyms.
      
      Describe various #define varibles Cadence MACB/GEM registers as documented
      in Xilinix's "Zynq-7000 All Programmable SoC TechnicalReference Manual, v1.9.1
      (UG-585)"
      Signed-off-by: NXander Huff <xander.huff@ni.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5c2fa0f6
    • D
      Merge branch 'xen-netfront-next' · 6a38cc2b
      David S. Miller 提交于
      David Vrabel says:
      
      ====================
      xen-netfront: refactor making Tx requests
      
      As netfront as evolved to handle different sorts of skbs the code to
      fill a Tx requests has been copy and pasted several times.  The series
      refactors this and a few other areas.
      
      The first patch is to a Xen header but this can be merged via
      net-next.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6a38cc2b
    • D
      xen-netfront: refactor making Tx requests · a55e8bb8
      David Vrabel 提交于
      Eliminate all the duplicate code for making Tx requests by
      consolidating them into a single xennet_make_one_txreq() function.
      
      xennet_make_one_txreq() and xennet_make_txreqs() work with pages and
      offsets so it will be easier to make netfront handle highmem frags in
      the future.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a55e8bb8
    • D
      xen-netfront: refactor skb slot counting · e84448d5
      David Vrabel 提交于
      A function to count the number of slots an skb needs is more useful
      than one that counts the slots needed for only the frags.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e84448d5
    • D
      xen: add page_to_mfn() · 28e98c2c
      David Vrabel 提交于
      pfn_to_mfn(page_to_pfn(p)) is a common use case so add a generic
      helper for it.
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28e98c2c
    • T
      rhashtable: Add MAINTAINERS entry · 933685ca
      Thomas Graf 提交于
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      933685ca
    • T
      rhashtable: Lower/upper bucket may map to same lock while shrinking · 80ca8c3a
      Thomas Graf 提交于
      Each per bucket lock covers a configurable number of buckets. While
      shrinking, two buckets in the old table contain entries for a single
      bucket in the new table. We need to lock down both while linking.
      Check if they are protected by different locks to avoid a recursive
      lock.
      
      Fixes: 97defe1e ("rhashtable: Per bucket locks & deferred expansion/shrinking")
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NThomas Graf <tgraf@suug.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      80ca8c3a
    • L
      Merge branch 'leds-fixes-for-3.19' of... · 188c9019
      Linus Torvalds 提交于
      Merge branch 'leds-fixes-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
      
      Pull LED fix from Bryan Wu.
      
      * 'leds-fixes-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
        leds: netxbig: fix oops at probe time
      188c9019
    • L
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux · 0c133dd0
      Linus Torvalds 提交于
      Pull WRITE_ONCE argument order change from Christian Borntraeger:
       "As discussed on LKML[1] it was agreed that WRITE_ONCE(x, val) is
        better than ASSIGN_ONCE(val, x)
      
        Lets change that for 3.19 as 3.19 has no user yet, but the first users
        will hit linux-next soon"
      
      [1] http://marc.info/?l=linux-kernel&m=142081181707596
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/borntraeger/linux:
        kernel: Change ASSIGN_ONCE(val, x) to WRITE_ONCE(x, val)
      0c133dd0
    • J
      net: rename vlan_tx_* helpers since "tx" is misleading there · df8a39de
      Jiri Pirko 提交于
      The same macros are used for rx as well. So rename it.
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df8a39de
    • J
      net: sched: fix skb->protocol use in case of accelerated vlan path · d8b9605d
      Jiri Pirko 提交于
      tc code implicitly considers skb->protocol even in case of accelerated
      vlan paths and expects vlan protocol type here. However, on rx path,
      if the vlan header was already stripped, skb->protocol contains value
      of next header. Similar situation is on tx path.
      
      So for skbs that use skb->vlan_tci for tagging, use skb->vlan_proto instead.
      Reported-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NJiri Pirko <jiri@resnulli.us>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d8b9605d