1. 26 3月, 2021 2 次提交
  2. 25 3月, 2021 2 次提交
  3. 23 3月, 2021 1 次提交
    • W
      net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP · 7ec05a60
      Wei Yongjun 提交于
      Get rid of the CONFIG_PM_SLEEP ifdefery to fix the build error
      and use __maybe_unused for the suspend()/resume() hooks to avoid
      build warning:
      
      drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:21:
       error: 'stmmac_runtime_suspend' undeclared here (not in a function); did you mean 'stmmac_suspend'?
        769 |  SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
            |                     ^~~~~~~~~~~~~~~~~~~~~~
      ./include/linux/pm.h:342:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
        342 |  .runtime_suspend = suspend_fn, \
            |                     ^~~~~~~~~~
      drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:45:
       error: 'stmmac_runtime_resume' undeclared here (not in a function)
        769 |  SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
            |                                             ^~~~~~~~~~~~~~~~~~~~~
      ./include/linux/pm.h:343:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
        343 |  .runtime_resume = resume_fn, \
            |                    ^~~~~~~~~
      
      Fixes: 5ec55823 ("net: stmmac: add clocks management for gmac driver")
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7ec05a60
  4. 20 3月, 2021 1 次提交
    • C
      net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes · 014dfa26
      Corentin Labbe 提交于
      MTU cannot be changed on dwmac-sun8i. (ip link set eth0 mtu xxx returning EINVAL)
      This is due to tx_fifo_size being 0, since this value is used to compute valid
      MTU range.
      Like dwmac-sunxi (with commit 806fd188 ("net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes"))
      dwmac-sun8i need to have tx and rx fifo sizes set.
      I have used values from datasheets.
      After this patch, setting a non-default MTU (like 1000) value works and network is still useable.
      
      Tested-on: sun8i-h3-orangepi-pc
      Tested-on: sun8i-r40-bananapi-m2-ultra
      Tested-on: sun50i-a64-bananapi-m64
      Tested-on: sun50i-h5-nanopi-neo-plus2
      Tested-on: sun50i-h6-pine-h64
      Fixes: 9f93ac8d ("net-next: stmmac: Add dwmac-sun8i")
      Reported-by: NBelisko Marek <marek.belisko@gmail.com>
      Signed-off-by: NCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      014dfa26
  5. 19 3月, 2021 5 次提交
  6. 18 3月, 2021 2 次提交
    • O
      net: stmmac: add per-queue TX & RX coalesce ethtool support · db2f2842
      Ong Boon Leong 提交于
      Extending the driver to support per-queue RX and TX coalesce settings in
      order to support below commands:
      
      To show per-queue coalesce setting:-
       $ ethtool --per-queue <DEVNAME> queue_mask <MASK> --show-coalesce
      
      To set per-queue coalesce setting:-
       $ ethtool --per-queue <DEVNAME> queue_mask <MASK> --coalesce \
           [rx-usecs N] [rx-frames M] [tx-usecs P] [tx-frames Q]
      Signed-off-by: NOng Boon Leong <boon.leong.ong@intel.com>
      Acked-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      db2f2842
    • V
      net: stmmac: add timestamp correction to rid CDC sync error · 3600be5f
      Voon Weifeng 提交于
      According to Synopsis DesignWare EQoS Databook, the Clock Domain Cross
      synchronization error is introduced tue to the clock(GMII Tx/Rx clock)
      being different at the capture as compared to the PTP
      clock(clk_ptp_ref_i) that is used to generate the time.
      
      The CDC synchronization error is almost equal to 2 times the clock
      period of the PTP clock(clk_ptp_ref_i).
      
      On a Intel Tigerlake platform (with Marvell 88E2110 external PHY):
      
      Before applying this patch (with CDC synchronization error):
      ptp4l[64.044]: rms    8 max   13 freq +30877 +/-  11 delay   216 +/-   0
      ptp4l[65.047]: rms   13 max   20 freq +30869 +/-  17 delay   213 +/-   0
      ptp4l[66.050]: rms   12 max   20 freq +30857 +/-  11 delay   213 +/-   0
      ptp4l[67.052]: rms   11 max   22 freq +30849 +/-  10 delay   215 +/-   0
      ptp4l[68.055]: rms   10 max   16 freq +30853 +/-  13 delay   215 +/-   0
      ptp4l[69.057]: rms    7 max   13 freq +30848 +/-   9 delay   216 +/-   0
      ptp4l[70.060]: rms    8 max   13 freq +30846 +/-  10 delay   216 +/-   0
      ptp4l[71.063]: rms    9 max   15 freq +30836 +/-   8 delay   218 +/-   0
      
      After applying this patch (CDC syncrhonization error is taken care of):
      ptp4l[61.516]: rms  773 max  824 freq +31526 +/- 158 delay   200 +/-   0
      ptp4l[62.519]: rms  427 max  596 freq +31668 +/-  39 delay   198 +/-   0
      ptp4l[63.522]: rms  113 max  206 freq +31482 +/-  57 delay   198 +/-   0
      ptp4l[64.525]: rms   40 max   56 freq +31316 +/-  29 delay   200 +/-   0
      ptp4l[65.528]: rms   47 max   56 freq +31255 +/-  17 delay   200 +/-   0
      ptp4l[66.531]: rms   26 max   36 freq +31246 +/-   9 delay   200 +/-   0
      ptp4l[67.534]: rms   12 max   18 freq +31254 +/-  12 delay   202 +/-   0
      ptp4l[68.537]: rms    7 max   12 freq +31263 +/-  10 delay   202 +/-   0
      Signed-off-by: NVoon Weifeng <weifeng.voon@intel.com>
      Signed-off-by: NWong Vee Khee <vee.khee.wong@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3600be5f
  7. 16 3月, 2021 6 次提交
  8. 14 3月, 2021 1 次提交
    • J
      net: stmmac: Set FIFO sizes for ipq806x · e127906b
      Jonathan McDowell 提交于
      Commit eaf4fac4 ("net: stmmac: Do not accept invalid MTU values")
      started using the TX FIFO size to verify what counts as a valid MTU
      request for the stmmac driver.  This is unset for the ipq806x variant.
      Looking at older patches for this it seems the RX + TXs buffers can be
      up to 8k, so set appropriately.
      
      (I sent this as an RFC patch in June last year, but received no replies.
      I've been running with this on my hardware (a MikroTik RB3011) since
      then with larger MTUs to support both the internal qca8k switch and
      VLANs with no problems. Without the patch it's impossible to set the
      larger MTU required to support this.)
      Signed-off-by: NJonathan McDowell <noodles@earth.li>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e127906b
  9. 06 3月, 2021 2 次提交
  10. 04 3月, 2021 1 次提交
  11. 03 3月, 2021 1 次提交
    • W
      stmmac: intel: Fix mdio bus registration issue for TGL-H/ADL-S · fa706dce
      Wong Vee Khee 提交于
      On Intel platforms which consist of two Ethernet Controllers such as
      TGL-H and ADL-S, a unique MDIO bus id is required for MDIO bus to be
      successful registered:
      
      [   13.076133] sysfs: cannot create duplicate filename '/class/mdio_bus/stmmac-1'
      [   13.083404] CPU: 8 PID: 1898 Comm: systemd-udevd Tainted: G     U            5.11.0-net-next #106
      [   13.092410] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DRR4 CRB, BIOS ADLIFSI1.R00.1494.B00.2012031421 12/03/2020
      [   13.105709] Call Trace:
      [   13.108176]  dump_stack+0x64/0x7c
      [   13.111553]  sysfs_warn_dup+0x56/0x70
      [   13.115273]  sysfs_do_create_link_sd.isra.2+0xbd/0xd0
      [   13.120371]  device_add+0x4df/0x840
      [   13.123917]  ? complete_all+0x2a/0x40
      [   13.127636]  __mdiobus_register+0x98/0x310 [libphy]
      [   13.132572]  stmmac_mdio_register+0x1c5/0x3f0 [stmmac]
      [   13.137771]  ? stmmac_napi_add+0xa5/0xf0 [stmmac]
      [   13.142493]  stmmac_dvr_probe+0x806/0xee0 [stmmac]
      [   13.147341]  intel_eth_pci_probe+0x1cb/0x250 [dwmac_intel]
      [   13.152884]  pci_device_probe+0xd2/0x150
      [   13.156897]  really_probe+0xf7/0x4d0
      [   13.160527]  driver_probe_device+0x5d/0x140
      [   13.164761]  device_driver_attach+0x4f/0x60
      [   13.168996]  __driver_attach+0xa2/0x140
      [   13.172891]  ? device_driver_attach+0x60/0x60
      [   13.177300]  bus_for_each_dev+0x76/0xc0
      [   13.181188]  bus_add_driver+0x189/0x230
      [   13.185083]  ? 0xffffffffc0795000
      [   13.188446]  driver_register+0x5b/0xf0
      [   13.192249]  ? 0xffffffffc0795000
      [   13.195577]  do_one_initcall+0x4d/0x210
      [   13.199467]  ? kmem_cache_alloc_trace+0x2ff/0x490
      [   13.204228]  do_init_module+0x5b/0x21c
      [   13.208031]  load_module+0x2a0c/0x2de0
      [   13.211838]  ? __do_sys_finit_module+0xb1/0x110
      [   13.216420]  __do_sys_finit_module+0xb1/0x110
      [   13.220825]  do_syscall_64+0x33/0x40
      [   13.224451]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [   13.229515] RIP: 0033:0x7fc2b1919ccd
      [   13.233113] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 93 31 0c 00 f7 d8 64 89 01 48
      [   13.251912] RSP: 002b:00007ffcea2e5b98 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [   13.259527] RAX: ffffffffffffffda RBX: 0000560558920f10 RCX: 00007fc2b1919ccd
      [   13.266706] RDX: 0000000000000000 RSI: 00007fc2b1a881e3 RDI: 0000000000000012
      [   13.273887] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
      [   13.281036] R10: 0000000000000012 R11: 0000000000000246 R12: 00007fc2b1a881e3
      [   13.288183] R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffcea2e5d58
      [   13.295389] libphy: mii_bus stmmac-1 failed to register
      
      Fixes: 88af9bd4 ("stmmac: intel: Add ADL-S 1Gbps PCI IDs")
      Fixes: 8450e23f ("stmmac: intel: Add PCI IDs for TGL-H platform")
      Signed-off-by: NWong Vee Khee <vee.khee.wong@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fa706dce
  12. 27 2月, 2021 5 次提交
  13. 25 2月, 2021 1 次提交
  14. 23 2月, 2021 1 次提交
  15. 18 2月, 2021 6 次提交
  16. 16 2月, 2021 1 次提交
  17. 12 2月, 2021 1 次提交
  18. 06 2月, 2021 1 次提交