1. 13 10月, 2020 1 次提交
    • M
      net: fec: Fix phy_device lookup for phy_reset_after_clk_enable() · 64a632da
      Marek Vasut 提交于
      The phy_reset_after_clk_enable() is always called with ndev->phydev,
      however that pointer may be NULL even though the PHY device instance
      already exists and is sufficient to perform the PHY reset.
      
      This condition happens in fec_open(), where the clock must be enabled
      first, then the PHY must be reset, and then the PHY IDs can be read
      out of the PHY.
      
      If the PHY still is not bound to the MAC, but there is OF PHY node
      and a matching PHY device instance already, use the OF PHY node to
      obtain the PHY device instance, and then use that PHY device instance
      when triggering the PHY reset.
      
      Fixes: 1b0a83ac ("net: fec: add phy_reset_after_clk_enable() support")
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: NXP Linux Team <linux-imx@nxp.com>
      Cc: Richard Leitner <richard.leitner@skidata.com>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      64a632da
  2. 09 10月, 2020 1 次提交
  3. 26 9月, 2020 1 次提交
  4. 25 9月, 2020 1 次提交
    • J
      net/fsl: quieten expected MDIO access failures · 1ec8e748
      Jamie Iles 提交于
      MDIO reads can happen during PHY probing, and printing an error with
      dev_err can result in a large number of error messages during device
      probe.  On a platform with a serial console this can result in
      excessively long boot times in a way that looks like an infinite loop
      when multiple busses are present.  Since 0f183fd1 (net/fsl: enable
      extended scanning in xgmac_mdio) we perform more scanning so there are
      potentially more failures.
      
      Reduce the logging level to dev_dbg which is consistent with the
      Freescale enetc driver.
      
      Cc: Jeremy Linton <jeremy.linton@arm.com>
      Signed-off-by: NJamie Iles <jamie@nuviainc.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ec8e748
  5. 19 9月, 2020 1 次提交
  6. 12 9月, 2020 1 次提交
  7. 24 8月, 2020 1 次提交
  8. 19 8月, 2020 1 次提交
  9. 15 8月, 2020 1 次提交
  10. 05 8月, 2020 1 次提交
  11. 04 8月, 2020 8 次提交
  12. 26 7月, 2020 1 次提交
  13. 23 7月, 2020 2 次提交
    • C
      enetc: Remove the mdio bus on PF probe bailout · 26cb7085
      Claudiu Manoil 提交于
      For ENETC ports that register an external MDIO bus,
      the bus doesn't get removed on the error bailout path
      of enetc_pf_probe().
      
      This issue became much more visible after recent:
      commit 07095c02 ("net: enetc: Use DT protocol information to set up the ports")
      Before this commit, one could make probing fail on the error
      path only by having register_netdev() fail, which is unlikely.
      But after this commit, because it moved the enetc_of_phy_get()
      call up in the probing sequence, now we can trigger an mdiobus_free()
      bug just by forcing enetc_alloc_msix() to return error, i.e. with the
      'pci=nomsi' kernel bootarg (since ENETC relies on MSI support to work),
      as the calltrace below shows:
      
      kernel BUG at /home/eiz/work/enetc/net/drivers/net/phy/mdio_bus.c:648!
      Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
      [...]
      Hardware name: LS1028A RDB Board (DT)
      pstate: 80000005 (Nzcv daif -PAN -UAO BTYPE=--)
      pc : mdiobus_free+0x50/0x58
      lr : devm_mdiobus_free+0x14/0x20
      [...]
      Call trace:
       mdiobus_free+0x50/0x58
       devm_mdiobus_free+0x14/0x20
       release_nodes+0x138/0x228
       devres_release_all+0x38/0x60
       really_probe+0x1c8/0x368
       driver_probe_device+0x5c/0xc0
       device_driver_attach+0x74/0x80
       __driver_attach+0x8c/0xd8
       bus_for_each_dev+0x7c/0xd8
       driver_attach+0x24/0x30
       bus_add_driver+0x154/0x200
       driver_register+0x64/0x120
       __pci_register_driver+0x44/0x50
       enetc_pf_driver_init+0x24/0x30
       do_one_initcall+0x60/0x1c0
       kernel_init_freeable+0x1fc/0x274
       kernel_init+0x14/0x110
       ret_from_fork+0x10/0x34
      
      Fixes: ebfcb23d ("enetc: Add ENETC PF level external MDIO support")
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      26cb7085
    • C
      enetc: Remove the imdio bus on PF probe bailout · c6dd6488
      Claudiu Manoil 提交于
      enetc_imdio_remove() is missing from the enetc_pf_probe()
      bailout path. Not surprisingly because enetc_setup_serdes()
      is registering the imdio bus for internal purposes, and it's
      not obvious that enetc_imdio_remove() currently performs the
      teardown of enetc_setup_serdes().
      To fix this, define enetc_teardown_serdes() to wrap
      enetc_imdio_remove() (improve code maintenance) and call it
      on bailout and remove paths.
      
      Fixes: 975d183e ("net: enetc: Initialize SerDes for SGMII and USXGMII protocols")
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c6dd6488
  14. 22 7月, 2020 9 次提交
    • I
      dpaa2-eth: add support for TBF offload · 3657cdaf
      Ioana Ciornei 提交于
      React to TC_SETUP_QDISC_TBF and configure the egress shaper as
      appropriate with the maximum rate and burst size requested by the user.
      TBF can only be offloaded on DPAA2 when it's the root qdisc, ie it's a
      per port shaper.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3657cdaf
    • I
      dpaa2-eth: add API for Tx shaping · 39344a89
      Ioana Ciornei 提交于
      Add the necessary API (dpni_set_tx_shaping) for configuring the rate and
      burst size of a per port shaper in DPAA2.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      39344a89
    • I
      dpaa2-eth: move the mqprio setup into a separate function · e3ec13be
      Ioana Ciornei 提交于
      Move the setup done for MQPRIO into a separate function so that
      with the addition of another offload we do not crowd
      dpaa2_eth_setup_tc(). After this restructuring it's easier to see what
      is supported in terms of Qdisc offloading.
      Signed-off-by: NIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3ec13be
    • C
      enetc: Add adaptive interrupt coalescing · ae0e6a5d
      Claudiu Manoil 提交于
      Use the generic dynamic interrupt moderation (dim)
      framework to implement adaptive interrupt coalescing
      on Rx.  With the per-packet interrupt scheme, a high
      interrupt rate has been noted for moderate traffic flows
      leading to high CPU utilization.  The 'dim' scheme
      implemented by the current patch addresses this issue
      improving CPU utilization while using minimal coalescing
      time thresholds in order to preserve a good latency.
      On the Tx side use an optimal time threshold value by
      default.  This value has been optimized for Tx TCP
      streams at a rate of around 85kpps on a 1G link,
      at which rate half of the Tx ring size (128) gets filled
      in 1500 usecs.  Scaling this down to 2.5G links yields
      the current value of 600 usecs, which is conservative
      and gives good enough results for 1G links too (see
      next).
      
      Below are some measurement results for before and after
      this patch (and related dependencies) basically, for a
      2 ARM Cortex-A72 @1.3Ghz CPUs system (32 KB L1 data cache),
      using 60secs log netperf TCP stream tests @ 1Gbit link
      (maximum throughput):
      
      1) 1 Rx TCP flow, both Rx and Tx processed by the same NAPI
      thread on the same CPU:
      	CPU utilization		int rate (ints/sec)
      Before:	50%-60% (over 50%)		92k
      After:  13%-22%				3.5k-12k
      Comment:  Major CPU utilization improvement for a single flow
      	  Rx TCP flow (i.e. netperf -t TCP_MAERTS) on a single
      	  CPU. Usually settles under 16% for longer tests.
      
      2) 4 Rx TCP flows + 4 Tx TCP flows (+ pings to check the latency):
      	Total CPU utilization	Total int rate (ints/sec)
      Before:	~80% (spikes to 90%)		~100k
      After:   60% (more steady)		  ~4k
      Comment:  Important improvement for this load test, while the
      	  ping test outcome does not show any notable
      	  difference compared to before.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae0e6a5d
    • C
      enetc: Add interrupt coalescing support · 91571081
      Claudiu Manoil 提交于
      Enable programming of the interrupt coalescing registers
      and allow manual configuration of the coalescing time
      thresholds via ethtool.  Packet thresholds have been fixed
      to predetermined values as there's no point in making them
      run-time configurable, also anticipating the dynamic interrupt
      moderation (DIM) algorithm which uses fixed packet thresholds
      as well.  If the interface is up when the operation mode of
      traffic interrupt events is changed by the user (i.e. switching
      from default per-packet interrupts to coalesced interrupts),
      the traffic needs to be paused in the process.
      This patch also prepares the ground for introducing DIM on Rx.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      91571081
    • C
      enetc: Drop redundant ____cacheline_aligned_in_smp · 058d9cfa
      Claudiu Manoil 提交于
      'struct enetc_bdr' is already '____cacheline_aligned_in_smp'.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      058d9cfa
    • C
      enetc: Fix interrupt coalescing register naming · 12460a0a
      Claudiu Manoil 提交于
      Interrupt coalescing registers naming in the current revision
      of the Ref Man (RM) is ICR, deprecating the ICIR name used
      in earlier (draft) versions of the RM.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12460a0a
    • C
      enetc: Factor out the traffic start/stop procedures · bbb96dc7
      Claudiu Manoil 提交于
      A reliable traffic pause (and reconfiguration) procedure
      is needed to be able to safely make h/w configuration
      changes during run-time, like changing the mode in which the
      interrupts are operating (i.e. with or without coalescing),
      as opposed to making on-the-fly register updates that
      may be subject to h/w or s/w concurrency issues.
      To this end, the code responsible of the run-time device
      configurations that basically starts resp. stops the traffic
      flow through the device has been extracted from the
      the enetc_open/_close procedures, to the separate standalone
      enetc_start/_stop procedures. Traffic stop should be as
      graceful as possible, it lets the executing napi threads to
      to finish while the interrupts stay disabled.  But since
      the napi thread will try to re-enable interrupts by clearing
      the device's unmask register, the enable_irq/ disable_irq
      API has been used to avoid this potential concurrency issue
      and make the traffic pause procedure more reliable.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bbb96dc7
    • C
      enetc: Refine buffer descriptor ring sizes · 02293dd4
      Claudiu Manoil 提交于
      It's time to differentiate between Rx and Tx ring sizes.
      Not only Tx rings are processed differently than Rx rings,
      but their default number also differs - i.e. up to 8 Tx rings
      per device (8 traffic classes) vs. 2 Rx rings (one per CPU).
      So let's set Tx rings sizes to half the size of the Rx rings
      for now, to be conservative.
      The default ring sizes were decreased as well (to the next
      lower power of 2), to reduce the memory footprint, buffering
      etc., since the measurements I've made so far show that the
      rings are very unlikely to get full.
      This change also anticipates the introduction of the
      dynamic interrupt moderation (dim) algorithm which operates
      on maximum packet thresholds of 256 packets for Rx and 128
      packets for Tx.
      Signed-off-by: NClaudiu Manoil <claudiu.manoil@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02293dd4
  15. 21 7月, 2020 2 次提交
  16. 20 7月, 2020 2 次提交
  17. 17 7月, 2020 5 次提交
  18. 16 7月, 2020 1 次提交