1. 02 7月, 2021 1 次提交
  2. 30 6月, 2021 3 次提交
  3. 25 6月, 2021 1 次提交
    • T
      stmmac: Remove rcu_read_lock() around XDP program invocation · 2f1e432d
      Toke Høiland-Jørgensen 提交于
      The stmmac driver has rcu_read_lock()/rcu_read_unlock() pairs around XDP
      program invocations. However, the actual lifetime of the objects referred
      by the XDP program invocation is longer, all the way through to the call to
      xdp_do_flush(), making the scope of the rcu_read_lock() too small. This
      turns out to be harmless because it all happens in a single NAPI poll
      cycle (and thus under local_bh_disable()), but it makes the rcu_read_lock()
      misleading.
      
      Rather than extend the scope of the rcu_read_lock(), just get rid of it
      entirely. With the addition of RCU annotations to the XDP_REDIRECT map
      types that take bh execution into account, lockdep even understands this to
      be safe, so there's really no reason to keep it around.
      Signed-off-by: NToke Høiland-Jørgensen <toke@redhat.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
      Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
      Cc: Jose Abreu <joabreu@synopsys.com>
      Link: https://lore.kernel.org/bpf/20210624160609.292325-19-toke@redhat.com
      2f1e432d
  4. 23 6月, 2021 1 次提交
  5. 19 6月, 2021 2 次提交
  6. 17 6月, 2021 2 次提交
  7. 16 6月, 2021 1 次提交
    • M
      stmmac: align RX buffers · a955318f
      Matteo Croce 提交于
      On RX an SKB is allocated and the received buffer is copied into it.
      But on some architectures, the memcpy() needs the source and destination
      buffers to have the same alignment to be efficient.
      
      This is not our case, because SKB data pointer is misaligned by two bytes
      to compensate the ethernet header.
      
      Align the RX buffer the same way as the SKB one, so the copy is faster.
      An iperf3 RX test gives a decent improvement on a RISC-V machine:
      
      before:
      [ ID] Interval           Transfer     Bitrate         Retr
      [  5]   0.00-10.00  sec   733 MBytes   615 Mbits/sec   88             sender
      [  5]   0.00-10.01  sec   730 MBytes   612 Mbits/sec                  receiver
      
      after:
      [ ID] Interval           Transfer     Bitrate         Retr
      [  5]   0.00-10.00  sec  1.10 GBytes   942 Mbits/sec    0             sender
      [  5]   0.00-10.00  sec  1.09 GBytes   940 Mbits/sec                  receiver
      
      And the memcpy() overhead during the RX drops dramatically.
      
      before:
      Overhead  Shared O  Symbol
        43.35%  [kernel]  [k] memcpy
        33.77%  [kernel]  [k] __asm_copy_to_user
         3.64%  [kernel]  [k] sifive_l2_flush64_range
      
      after:
      Overhead  Shared O  Symbol
        45.40%  [kernel]  [k] __asm_copy_to_user
        28.09%  [kernel]  [k] memcpy
         4.27%  [kernel]  [k] sifive_l2_flush64_range
      Signed-off-by: NMatteo Croce <mcroce@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a955318f
  8. 15 6月, 2021 1 次提交
  9. 13 6月, 2021 2 次提交
  10. 12 6月, 2021 6 次提交
  11. 11 6月, 2021 1 次提交
    • W
      net: stmmac: Fix mixed enum type warning · 1f7096f0
      Wong Vee Khee 提交于
      The commit 5a558611 ("net: stmmac: support FPE link partner
      hand-shaking procedure") introduced the following coverity warning:
      
        "Parse warning (PW.MIXED_ENUM_TYPE)"
        "1. mixed_enum_type: enumerated type mixed with another type"
      
      This is due to both "lo_state" and "lp_sate" which their datatype are
      enum stmmac_fpe_state type, and being assigned with "FPE_EVENT_UNKNOWN"
      which is a macro-defined of 0. Fixed this by assigned both these
      variables with the correct enum value.
      
      Fixes: 5a558611 ("net: stmmac: support FPE link partner hand-shaking procedure")
      Signed-off-by: NWong Vee Khee <vee.khee.wong@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1f7096f0
  12. 10 6月, 2021 3 次提交
  13. 09 6月, 2021 4 次提交
    • M
      net: stmmac: explicitly deassert GMAC_AHB_RESET · e67f325e
      Matthew Hagan 提交于
      We are currently assuming that GMAC_AHB_RESET will already be deasserted
      by the bootloader. However if this has not been done, probing of the GMAC
      will fail. To remedy this we must ensure GMAC_AHB_RESET has been deasserted
      prior to probing.
      
      v2 changes:
       - remove NULL condition check for stmmac_ahb_rst in stmmac_main.c
       - unwrap dev_err() message in stmmac_main.c
       - add PTR_ERR() around plat->stmmac_ahb_rst in stmmac_platform.c
      
      v3 changes:
       - add error pointer to dev_err() output
       - add reset_control_assert(stmmac_ahb_rst) in stmmac_dvr_remove
       - revert PTR_ERR() around plat->stmmac_ahb_rst since this is performed
         on the returned value of ret by the calling function
      Signed-off-by: NMatthew Hagan <mnhagan88@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e67f325e
    • V
      net: stmmac: fix NPD with phylink_set_pcs if there is no MDIO bus · b55b1d50
      Vladimir Oltean 提交于
      priv->plat->mdio_bus_data is optional, some platforms may not set it,
      however we proceed to look straight at priv->plat->mdio_bus_data->has_xpcs.
      
      Since the xpcs is instantiated based on the has_xpcs property, we can
      avoid looking at the priv->plat->mdio_bus_data structure altogether and
      just check for the presence of the xpcs pointer.
      
      Fixes: 11059740 ("net: pcs: xpcs: convert to phylink_pcs_ops")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b55b1d50
    • V
      net: stmmac: enable Intel mGbE 2.5Gbps link speed · 46682cb8
      Voon Weifeng 提交于
      The Intel mGbE supports 2.5Gbps link speed by increasing the clock rate by
      2.5 times of the original rate. In this mode, the serdes/PHY operates at a
      serial baud rate of 3.125 Gbps and the PCS data path and GMII interface of
      the MAC operate at 312.5 MHz instead of 125 MHz.
      
      For Intel mGbE, the overclocking of 2.5 times clock rate to support 2.5G is
      only able to be configured in the BIOS during boot time. Kernel driver has
      no access to modify the clock rate for 1Gbps/2.5G mode. The way to
      determined the current 1G/2.5G mode is by reading a dedicated adhoc
      register through mdio bus. In short, after the system boot up, it is either
      in 1G mode or 2.5G mode which not able to be changed on the fly.
      
      Compared to 1G mode, the 2.5G mode selects the 2500BASEX as PHY interface and
      disables the xpcs_an_inband. This is to cater for some PHYs that only
      supports 2500BASEX PHY interface with no autonegotiation.
      
      v2: remove MAC supported link speed masking
      v3: Restructure  to introduce intel_speed_mode_2500() to read serdes registers
          for max speed supported and select the appropritate configuration.
          Use max_speed to determine the supported link speed mask.
      Signed-off-by: NVoon Weifeng <weifeng.voon@intel.com>
      Signed-off-by: NMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>
      Reviewed-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46682cb8
    • V
      net: stmmac: split xPCS setup from mdio register · 597a68ce
      Voon Weifeng 提交于
      This patch is a preparation patch for the enabling of Intel mGbE 2.5Gbps
      link speed. The Intel mGbR link speed configuration (1G/2.5G) is depends on
      a mdio ADHOC register which can be configured in the bios menu.
      As PHY interface might be different for 1G and 2.5G, the mdio bus need be
      ready to check the link speed and select the PHY interface before probing
      the xPCS.
      Signed-off-by: NVoon Weifeng <weifeng.voon@intel.com>
      Signed-off-by: NMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      597a68ce
  14. 04 6月, 2021 6 次提交
    • V
      net: pcs: xpcs: convert to phylink_pcs_ops · 11059740
      Vladimir Oltean 提交于
      Since all the remaining members of struct mdio_xpcs_ops have direct
      equivalents in struct phylink_pcs_ops, it is about time we remove it
      altogether.
      
      Since the phylink ops return void, we need to remove the error
      propagation from the various xpcs methods and simply print an error
      message where appropriate.
      
      Since xpcs_get_state_c73() detects link faults and attempts to reset the
      link on its own by calling xpcs_config(), but xpcs_config() now has a
      lot of phylink arguments which are not needed and cannot be simply
      fabricated by anybody else except phylink, the actual implementation has
      been moved into a smaller xpcs_do_config().
      
      The const struct mdio_xpcs_ops *priv->hw->xpcs has been removed, so we
      need to look at the struct mdio_xpcs_args pointer now as an indication
      whether the port has an XPCS or not.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11059740
    • V
      net: pcs: xpcs: convert to mdio_device · 2cac15da
      Vladimir Oltean 提交于
      Unify the 2 existing PCS drivers (lynx and xpcs) by doing a similar
      thing on probe, which is to have a *_create function that takes a
      struct mdio_device * given by the caller, and builds a private PCS
      structure around that.
      
      This changes stmmac to hold only a pointer to the xpcs, as opposed to
      the full structure. This will be used in the next patch when struct
      mdio_xpcs_ops is removed. Currently a pointer to struct mdio_xpcs_ops
      is used as a shorthand to determine whether the port has an XPCS or not.
      We can do the same now with the mdio_xpcs_args pointer.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2cac15da
    • V
      net: pcs: xpcs: export xpcs_probe · 8e2bb956
      Vladimir Oltean 提交于
      Similar to the other recently functions, it is not necessary for
      xpcs_probe to be a function pointer, so export it so that it can be
      called directly.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8e2bb956
    • V
      net: pcs: xpcs: export xpcs_config_eee · 14b517cb
      Vladimir Oltean 提交于
      There is no good reason why we need to go through:
      
      stmmac_xpcs_config_eee
      -> stmmac_do_callback
         -> mdio_xpcs_ops->config_eee
            -> xpcs_config_eee
      
      when we can simply call xpcs_config_eee.
      
      priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
      as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
      done that way because the mdio_bus_data pointer might or might not be
      populated in all stmmac instantiations.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      14b517cb
    • V
      net: pcs: xpcs: export xpcs_validate · a1a753ed
      Vladimir Oltean 提交于
      Calling a function pointer with a single implementation through
      struct mdio_xpcs_ops is clunky, and the stmmac_do_callback system forces
      this to return int, even though it always returns zero.
      
      Simply remove the "validate" function pointer from struct mdio_xpcs_ops
      and replace it with an exported xpcs_validate symbol which is called
      directly by stmmac.
      
      priv->hw->xpcs is of the type "const struct mdio_xpcs_ops *" and is used
      as a placeholder/synonym for priv->plat->mdio_bus_data->has_xpcs. It is
      done that way because the mdio_bus_data pointer might or might not be
      populated in all stmmac instantiations.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a1a753ed
    • V
      net: pcs: xpcs: make the checks related to the PHY interface mode stateless · 9900074e
      Vladimir Oltean 提交于
      The operating mode of the driver is currently to populate its
      struct mdio_xpcs_args::supported and struct mdio_xpcs_args::an_mode
      statically in xpcs_probe(), based on the passed phy_interface_t,
      and work with those.
      
      However this is not the operation that phylink expects from a PCS
      driver, because the port might be attached to an SFP cage that triggers
      changes of the phy_interface_t dynamically as one SFP module is
      unpluggged and another is plugged.
      
      To migrate towards that model, the struct mdio_xpcs_args should not
      cache anything related to the phy_interface_t, but just look up the
      statically defined, const struct xpcs_compat structure corresponding to
      the detected PCS OUI/model number.
      
      So we delete the "supported" and "an_mode" members of struct
      mdio_xpcs_args, and add the "id" structure there (since the ID is not
      expected to change at runtime).
      
      Since xpcs->supported is used deep in the code in _xpcs_config_aneg_c73(),
      we need to modify some function headers to pass the xpcs_compat from all
      callers. In turn, the xpcs_compat is always supplied externally to the
      xpcs module:
      - Most of the time by phylink
      - In xpcs_probe() it is needed because xpcs_soft_reset() writes to
        MDIO_MMD_PCS or to MDIO_MMD_VEND2 depending on whether an_mode is clause
        37 or clause 73. In order to not introduce functional changes related
        to when the soft reset is issued, we continue to require the initial
        phy_interface_t argument to be passed to xpcs_probe() so we can pass
        this on to xpcs_soft_reset().
      - stmmac_open() wants to know whether to call stmmac_init_phy() or not,
        and for that it looks inside xpcs->an_mode, because the clause 73
        (backplane) AN modes supposedly do not have a PHY. Because we moved
        an_mode outside of struct mdio_xpcs_args, this is now no longer
        directly possible, so we introduce a helper function xpcs_get_an_mode()
        which protects the data encapsulation of the xpcs module and requires
        a phy_interface_t to be passed as argument. This function can look up
        the appropriate compat based on the phy_interface_t.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9900074e
  15. 03 6月, 2021 1 次提交
    • W
      net: stmmac: fix issue where clk is being unprepared twice · ab00f3e0
      Wong Vee Khee 提交于
      In the case of MDIO bus registration failure due to no external PHY
      devices is connected to the MAC, clk_disable_unprepare() is called in
      stmmac_bus_clk_config() and intel_eth_pci_probe() respectively.
      
      The second call in intel_eth_pci_probe() will caused the following:-
      
      [   16.578605] intel-eth-pci 0000:00:1e.5: No PHY found
      [   16.583778] intel-eth-pci 0000:00:1e.5: stmmac_dvr_probe: MDIO bus (id: 2) registration failed
      [   16.680181] ------------[ cut here ]------------
      [   16.684861] stmmac-0000:00:1e.5 already disabled
      [   16.689547] WARNING: CPU: 13 PID: 2053 at drivers/clk/clk.c:952 clk_core_disable+0x96/0x1b0
      [   16.697963] Modules linked in: dwc3 iTCO_wdt mei_hdcp iTCO_vendor_support udc_core x86_pkg_temp_thermal kvm_intel marvell10g kvm sch_fq_codel nfsd irqbypass dwmac_intel(+) stmmac uio ax88179_178a pcs_xpcs phylink uhid spi_pxa2xx_platform usbnet mei_me pcspkr tpm_crb mii i2c_i801 dw_dmac dwc3_pci thermal dw_dmac_core intel_rapl_msr libphy i2c_smbus mei tpm_tis intel_th_gth tpm_tis_core tpm intel_th_acpi intel_pmc_core intel_th i915 fuse configfs snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_pcm snd_timer snd soundcore
      [   16.746785] CPU: 13 PID: 2053 Comm: systemd-udevd Tainted: G     U            5.13.0-rc3-intel-lts #76
      [   16.756134] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DRR4 CRB, BIOS ADLIFSI1.R00.1494.B00.2012031421 12/03/2020
      [   16.769465] RIP: 0010:clk_core_disable+0x96/0x1b0
      [   16.774222] Code: 00 8b 05 45 96 17 01 85 c0 7f 24 48 8b 5b 30 48 85 db 74 a5 8b 43 7c 85 c0 75 93 48 8b 33 48 c7 c7 6e 32 cc b7 e8 b2 5d 52 00 <0f> 0b 5b 5d c3 65 8b 05 76 31 18 49 89 c0 48 0f a3 05 bc 92 1a 01
      [   16.793016] RSP: 0018:ffffa44580523aa0 EFLAGS: 00010086
      [   16.798287] RAX: 0000000000000000 RBX: ffff8d7d0eb70a00 RCX: 0000000000000000
      [   16.805435] RDX: 0000000000000002 RSI: ffffffffb7c62d5f RDI: 00000000ffffffff
      [   16.812610] RBP: 0000000000000287 R08: 0000000000000000 R09: ffffa445805238d0
      [   16.819759] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8d7d0eb70a00
      [   16.826904] R13: ffff8d7d027370c8 R14: 0000000000000006 R15: ffffa44580523ad0
      [   16.834047] FS:  00007f9882fa2600(0000) GS:ffff8d80a0940000(0000) knlGS:0000000000000000
      [   16.842177] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   16.847966] CR2: 00007f9882bea3d8 CR3: 000000010b126001 CR4: 0000000000370ee0
      [   16.855144] Call Trace:
      [   16.857614]  clk_core_disable_lock+0x1b/0x30
      [   16.861941]  intel_eth_pci_probe.cold+0x11d/0x136 [dwmac_intel]
      [   16.867913]  pci_device_probe+0xcf/0x150
      [   16.871890]  really_probe+0xf5/0x3e0
      [   16.875526]  driver_probe_device+0x64/0x150
      [   16.879763]  device_driver_attach+0x53/0x60
      [   16.883998]  __driver_attach+0x9f/0x150
      [   16.887883]  ? device_driver_attach+0x60/0x60
      [   16.892288]  ? device_driver_attach+0x60/0x60
      [   16.896698]  bus_for_each_dev+0x77/0xc0
      [   16.900583]  bus_add_driver+0x184/0x1f0
      [   16.904469]  driver_register+0x6c/0xc0
      [   16.908268]  ? 0xffffffffc07ae000
      [   16.911598]  do_one_initcall+0x4a/0x210
      [   16.915489]  ? kmem_cache_alloc_trace+0x305/0x4e0
      [   16.920247]  do_init_module+0x5c/0x230
      [   16.924057]  load_module+0x2894/0x2b70
      [   16.927857]  ? __do_sys_finit_module+0xb5/0x120
      [   16.932441]  __do_sys_finit_module+0xb5/0x120
      [   16.936845]  do_syscall_64+0x42/0x80
      [   16.940476]  entry_SYSCALL_64_after_hwframe+0x44/0xae
      [   16.945586] RIP: 0033:0x7f98830e5ccd
      [   16.949177] 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
      [   16.967970] RSP: 002b:00007ffc66b60168 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      [   16.975583] RAX: ffffffffffffffda RBX: 000055885de35ef0 RCX: 00007f98830e5ccd
      [   16.982725] RDX: 0000000000000000 RSI: 00007f98832541e3 RDI: 0000000000000012
      [   16.989868] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000
      [   16.997042] R10: 0000000000000012 R11: 0000000000000246 R12: 00007f98832541e3
      [   17.004222] R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffc66b60328
      [   17.011369] ---[ end trace df06a3dab26b988c ]---
      [   17.016062] ------------[ cut here ]------------
      [   17.020701] stmmac-0000:00:1e.5 already unprepared
      
      Removing the stmmac_bus_clks_config() call in stmmac_dvr_probe and let
      dwmac-intel to handle the unprepare and disable of the clk device.
      
      Fixes: 5ec55823 ("net: stmmac: add clocks management for gmac driver")
      Cc: Joakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: NWong Vee Khee <vee.khee.wong@linux.intel.com>
      Reviewed-by: NJoakim Zhang <qiangqing.zhang@nxp.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ab00f3e0
  16. 02 6月, 2021 1 次提交
  17. 31 5月, 2021 1 次提交
    • S
      net: stmmac: fix kernel panic due to NULL pointer dereference of mdio_bus_data · 593f555f
      Sriranjani P 提交于
      Fixed link does not need mdio bus and in that case mdio_bus_data will
      not be allocated. Before using mdio_bus_data we should check for NULL.
      
      This patch fix the kernel panic due to NULL pointer dereference of
      mdio_bus_data when it is not allocated.
      
      Without this patch we do see following kernel crash caused due to kernel
      NULL pointer dereference.
      
      Call trace:
      stmmac_dvr_probe+0x3c/0x10b0
      dwc_eth_dwmac_probe+0x224/0x378
      platform_probe+0x68/0xe0
      really_probe+0x130/0x3d8
      driver_probe_device+0x68/0xd0
      device_driver_attach+0x74/0x80
      __driver_attach+0x58/0xf8
      bus_for_each_dev+0x7c/0xd8
      driver_attach+0x24/0x30
      bus_add_driver+0x148/0x1f0
      driver_register+0x64/0x120
      __platform_driver_register+0x28/0x38
      dwc_eth_dwmac_driver_init+0x1c/0x28
      do_one_initcall+0x78/0x158
      kernel_init_freeable+0x1f0/0x244
      kernel_init+0x14/0x118
      ret_from_fork+0x10/0x30
      Code: f9002bfb 9113e2d9 910e6273 aa0003f7 (f9405c78)
      ---[ end trace 32d9d41562ddc081 ]---
      
      Fixes: e5e5b771 ("net: stmmac: make in-band AN mode parsing is supported for non-DT")
      Signed-off-by: NSriranjani P <sriranjani.p@samsung.com>
      Signed-off-by: NPankaj Dubey <pankaj.dubey@samsung.com>
      Link: https://lore.kernel.org/r/20210528071056.35252-1-sriranjani.p@samsung.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      593f555f
  18. 29 5月, 2021 1 次提交
    • V
      net: stmmac: the XPCS obscures a potential "PHY not found" error · 4751d2aa
      Vladimir Oltean 提交于
      stmmac_mdio_register() has logic to search for PHYs on the MDIO bus and
      assign them IRQ lines, as well as to set priv->plat->phy_addr.
      
      If no PHY is found, the "found" variable remains set to 0 and the
      function errors out.
      
      After the introduction of commit f213bbe8 ("net: stmmac: Integrate
      it with DesignWare XPCS"), the "found" variable was immediately reused
      for searching for a PCS on the same MDIO bus.
      
      This can result in 2 types of potential problems (none of them seems to
      be seen on the only Intel system that sets has_xpcs = true, otherwise it
      would have been reported):
      
      1. If a PCS is found but a PHY is not, then the code happily exits with
         no error. One might say "yes, but this is not possible, because
         of_mdiobus_register will probe a PHY for all MDIO addresses,
         including for the XPCS, so if an XPCS exists, then a PHY certainly
         exists too". Well, that is not true, see intel_mgbe_common_data():
      
      	/* Ensure mdio bus scan skips intel serdes and pcs-xpcs */
      	plat->mdio_bus_data->phy_mask = 1 << INTEL_MGBE_ADHOC_ADDR;
      	plat->mdio_bus_data->phy_mask |= 1 << INTEL_MGBE_XPCS_ADDR;
      
      2. A PHY is found but an MDIO device with the XPCS PHY ID isn't, and in
         that case, the error message will be "No PHY found". Confusing.
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Link: https://lore.kernel.org/r/20210527155959.3270478-1-olteanv@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      4751d2aa
  19. 21 5月, 2021 2 次提交