Skip to content
Snippets Groups Projects
  1. Oct 24, 2021
    • Sean Anderson's avatar
      net: convert users of bitmap_foo() to linkmode_foo() · 4973056c
      Sean Anderson authored
      
      This converts instances of
      	bitmap_foo(args..., __ETHTOOL_LINK_MODE_MASK_NBITS)
      to
      	linkmode_foo(args...)
      
      I manually fixed up some lines to prevent them from being excessively
      long. Otherwise, this change was generated with the following semantic
      patch:
      
      // Generated with
      // echo linux/linkmode.h > includes
      // git grep -Flf includes include/ | cut -f 2- -d / | cat includes - \
      // | sort | uniq | tee new_includes | wc -l && mv new_includes includes
      // and repeating until the number stopped going up
      @i@
      @@
      
      (
       #include <linux/acpi_mdio.h>
      |
       #include <linux/brcmphy.h>
      |
       #include <linux/dsa/loop.h>
      |
       #include <linux/dsa/sja1105.h>
      |
       #include <linux/ethtool.h>
      |
       #include <linux/ethtool_netlink.h>
      |
       #include <linux/fec.h>
      |
       #include <linux/fs_enet_pd.h>
      |
       #include <linux/fsl/enetc_mdio.h>
      |
       #include <linux/fwnode_mdio.h>
      |
       #include <linux/linkmode.h>
      |
       #include <linux/lsm_audit.h>
      |
       #include <linux/mdio-bitbang.h>
      |
       #include <linux/mdio.h>
      |
       #include <linux/mdio-mux.h>
      |
       #include <linux/mii.h>
      |
       #include <linux/mii_timestamper.h>
      |
       #include <linux/mlx5/accel.h>
      |
       #include <linux/mlx5/cq.h>
      |
       #include <linux/mlx5/device.h>
      |
       #include <linux/mlx5/driver.h>
      |
       #include <linux/mlx5/eswitch.h>
      |
       #include <linux/mlx5/fs.h>
      |
       #include <linux/mlx5/port.h>
      |
       #include <linux/mlx5/qp.h>
      |
       #include <linux/mlx5/rsc_dump.h>
      |
       #include <linux/mlx5/transobj.h>
      |
       #include <linux/mlx5/vport.h>
      |
       #include <linux/of_mdio.h>
      |
       #include <linux/of_net.h>
      |
       #include <linux/pcs-lynx.h>
      |
       #include <linux/pcs/pcs-xpcs.h>
      |
       #include <linux/phy.h>
      |
       #include <linux/phy_led_triggers.h>
      |
       #include <linux/phylink.h>
      |
       #include <linux/platform_data/bcmgenet.h>
      |
       #include <linux/platform_data/xilinx-ll-temac.h>
      |
       #include <linux/pxa168_eth.h>
      |
       #include <linux/qed/qed_eth_if.h>
      |
       #include <linux/qed/qed_fcoe_if.h>
      |
       #include <linux/qed/qed_if.h>
      |
       #include <linux/qed/qed_iov_if.h>
      |
       #include <linux/qed/qed_iscsi_if.h>
      |
       #include <linux/qed/qed_ll2_if.h>
      |
       #include <linux/qed/qed_nvmetcp_if.h>
      |
       #include <linux/qed/qed_rdma_if.h>
      |
       #include <linux/sfp.h>
      |
       #include <linux/sh_eth.h>
      |
       #include <linux/smsc911x.h>
      |
       #include <linux/soc/nxp/lpc32xx-misc.h>
      |
       #include <linux/stmmac.h>
      |
       #include <linux/sunrpc/svc_rdma.h>
      |
       #include <linux/sxgbe_platform.h>
      |
       #include <net/cfg80211.h>
      |
       #include <net/dsa.h>
      |
       #include <net/mac80211.h>
      |
       #include <net/selftests.h>
      |
       #include <rdma/ib_addr.h>
      |
       #include <rdma/ib_cache.h>
      |
       #include <rdma/ib_cm.h>
      |
       #include <rdma/ib_hdrs.h>
      |
       #include <rdma/ib_mad.h>
      |
       #include <rdma/ib_marshall.h>
      |
       #include <rdma/ib_pack.h>
      |
       #include <rdma/ib_pma.h>
      |
       #include <rdma/ib_sa.h>
      |
       #include <rdma/ib_smi.h>
      |
       #include <rdma/ib_umem.h>
      |
       #include <rdma/ib_umem_odp.h>
      |
       #include <rdma/ib_verbs.h>
      |
       #include <rdma/iw_cm.h>
      |
       #include <rdma/mr_pool.h>
      |
       #include <rdma/opa_addr.h>
      |
       #include <rdma/opa_port_info.h>
      |
       #include <rdma/opa_smi.h>
      |
       #include <rdma/opa_vnic.h>
      |
       #include <rdma/rdma_cm.h>
      |
       #include <rdma/rdma_cm_ib.h>
      |
       #include <rdma/rdmavt_cq.h>
      |
       #include <rdma/rdma_vt.h>
      |
       #include <rdma/rdmavt_qp.h>
      |
       #include <rdma/rw.h>
      |
       #include <rdma/tid_rdma_defs.h>
      |
       #include <rdma/uverbs_ioctl.h>
      |
       #include <rdma/uverbs_named_ioctl.h>
      |
       #include <rdma/uverbs_std_types.h>
      |
       #include <rdma/uverbs_types.h>
      |
       #include <soc/mscc/ocelot.h>
      |
       #include <soc/mscc/ocelot_ptp.h>
      |
       #include <soc/mscc/ocelot_vcap.h>
      |
       #include <trace/events/ib_mad.h>
      |
       #include <trace/events/rdma_core.h>
      |
       #include <trace/events/rdma.h>
      |
       #include <trace/events/rpcrdma.h>
      |
       #include <uapi/linux/ethtool.h>
      |
       #include <uapi/linux/ethtool_netlink.h>
      |
       #include <uapi/linux/mdio.h>
      |
       #include <uapi/linux/mii.h>
      )
      
      @depends on i@
      expression list args;
      @@
      
      (
      - bitmap_zero(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_zero(args)
      |
      - bitmap_copy(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_copy(args)
      |
      - bitmap_and(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_and(args)
      |
      - bitmap_or(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_or(args)
      |
      - bitmap_empty(args, ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_empty(args)
      |
      - bitmap_andnot(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_andnot(args)
      |
      - bitmap_equal(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_equal(args)
      |
      - bitmap_intersects(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_intersects(args)
      |
      - bitmap_subset(args, __ETHTOOL_LINK_MODE_MASK_NBITS)
      + linkmode_subset(args)
      )
      
      Add missing linux/mii.h include to mellanox. -DaveM
      
      Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4973056c
  2. Oct 06, 2021
  3. Oct 05, 2021
  4. Sep 17, 2021
    • Vladimir Oltean's avatar
      net: update NXP copyright text · 3c9cfb52
      Vladimir Oltean authored
      
      NXP Legal insists that the following are not fine:
      
      - Saying "NXP Semiconductors" instead of "NXP", since the company's
        registered name is "NXP"
      
      - Putting a "(c)" sign in the copyright string
      
      - Putting a comma in the copyright string
      
      The only accepted copyright string format is "Copyright <year-range> NXP".
      
      This patch changes the copyright headers in the networking files that
      were sent by me, or derived from code sent by me.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3c9cfb52
  5. Aug 16, 2021
  6. Aug 11, 2021
  7. Jun 17, 2021
  8. Jun 11, 2021
    • Vladimir Oltean's avatar
      net: pcs: xpcs: export xpcs_do_config and xpcs_link_up · a853c68e
      Vladimir Oltean authored
      
      The sja1105 hardware has a quirk in that some changes require a switch
      reset, which loses all configuration. When the reset is initiated,
      everything needs to be reprogrammed, including the MACs and the PCS.
      This is currently done in sja1105_static_config_reload() - we manually
      call sja1105_adjust_port_config(), sja1105_sgmii_pcs_config() and
      sja1105_sgmii_pcs_force_speed() which are all internal functions.
      
      There is a desire for sja1105 to use the common xpcs driver, and that
      means that the equivalents of those functions, xpcs_do_config() and
      xpcs_link_up() respectively, will no longer be local functions.
      
      Forcing phylink to retrigger a resolve somehow, say by doing dev_close()
      followed by dev_open() is not really an option, because the CPU port
      might have a PCS as well, and there is no net device which we can close
      and reopen for that. Additionally, the dev_close/dev_open sequence might
      force a renegotiation of the copper-side link for SGMII ports connected
      to a PHY, and this is undesirable as well, because the switch reset is
      much quicker than a PHY autoneg, so we would have a lot more downtime.
      
      The only solution I see is for the sja1105 driver to keep doing what
      it's doing, and that means we need to export the equivalents from xpcs
      for sja1105_sgmii_pcs_config and sja1105_sgmii_pcs_force_speed, and call
      them directly in sja1105_static_config_reload(). This will be done
      during the conversion patch.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a853c68e
    • Vladimir Oltean's avatar
      net: pcs: xpcs: add support for NXP SJA1110 · f7380bba
      Vladimir Oltean authored
      
      The NXP SJA1110 switch integrates its own, non-Synopsys PMA, but it
      manages it through the register space of the XPCS itself, in a small
      register window inside MDIO_MMD_VEND2 from address 0x8030 to 0x806e.
      
      This coincides with where the registers for the default Synopsys PMA
      are, but the register definitions are of course not the same.
      
      This situation is an odd hardware quirk, but the simplest way to manage
      it is to drive the SJA1110's PMA from within the XPCS driver.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7380bba
    • Vladimir Oltean's avatar
      net: pcs: xpcs: add support for NXP SJA1105 · dd0721ea
      Vladimir Oltean authored
      
      The NXP SJA1105 DSA switch integrates a Synopsys SGMII XPCS on port 4.
      The generic code works fine, except there is an integration issue which
      needs to be dealt with: in this switch, the XPCS is integrated with a
      PMA that has the TX lane polarity inverted by default (PLUS is MINUS,
      MINUS is PLUS).
      
      To obtain normal non-inverted behavior, the TX lane polarity must be
      inverted in the PCS, via the DIGITAL_CONTROL_2 register.
      
      We introduce a pma_config() method in xpcs_compat which is called by the
      phylink_pcs_config() implementation.
      
      Also, the NXP SJA1105 returns all zeroes in the PHY ID registers 2 and 3.
      We need to hack up an ad-hoc PHY ID (OUI is zero, device ID is 1) in
      order for the XPCS driver to recognize it. This PHY ID is added to the
      public include/linux/pcs/pcs-xpcs.h for that reason (for the sja1105
      driver to be able to use it in a later patch).
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dd0721ea
    • Vladimir Oltean's avatar
      net: pcs: xpcs: also ignore phy id if it's all ones · 36641b04
      Vladimir Oltean authored
      
      xpcs_get_id() searches multiple MMDs for a known PHY ID, starting with
      MDIO_MMD_PCS (3). However not all integrators might have implemented
      that MMD on their MDIO bus. For example, the NXP SJA1105 and SJA1110
      switches only implement vendor-specific MMD 1 and 2.
      
      When there is nothing on an MDIO bus at a certain address, traditionally
      the bus returns 0xffff, which means that the bus remained in its default
      pull-up state for the duration of the MDIO transaction. The 0xffff value
      is widely used in drivers/net/phy/phy_device.c (see get_phy_c22_id for
      example) to denote a missing device.
      
      So it makes sense for the xpcs to ignore this value as well, and
      continue its search, eventually finding the proper PHY ID in the
      vendor-specific MMDs.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      36641b04
    • Vladimir Oltean's avatar
      net: pcs: xpcs: add support for sgmii with no inband AN · 2031c09e
      Vladimir Oltean authored
      
      In fixed-link use cases, the XPCS can disable the clause 37 in-band
      autoneg process, disable the "Automatic Speed Mode Change after CL37 AN"
      setting, and force operation in a speed dictated by management.
      
      Add support for this operating mode.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2031c09e
    • Vladimir Oltean's avatar
      net: pcs: xpcs: move register bit descriptions to a header file · d4433d5b
      Vladimir Oltean authored
      
      Vendors which integrate the Designware XPCS might modify a few things
      here and there, and to support those, it's best to create separate C
      files in order to not clutter up the main pcs-xpcs.c.
      
      Because the vendor files might want to access the common xpcs registers
      too, let's move them in a header file which is local to this driver and
      can be included by vendor files as appropriate.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4433d5b
    • Vladimir Oltean's avatar
      net: pcs: xpcs: rename mdio_xpcs_args to dw_xpcs · 5673ef86
      Vladimir Oltean authored
      
      The struct mdio_xpcs_args is reminiscent of when a similarly named
      struct mdio_xpcs_ops existed. Now that that is removed, we can shorten
      the name to dw_xpcs (dw for DesignWare).
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5673ef86
  9. Jun 08, 2021
  10. Jun 03, 2021
    • Vladimir Oltean's avatar
      net: pcs: xpcs: convert to phylink_pcs_ops · 11059740
      Vladimir Oltean authored
      
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      11059740
    • Vladimir Oltean's avatar
      net: pcs: xpcs: convert to mdio_device · 2cac15da
      Vladimir Oltean authored
      
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2cac15da
    • Vladimir Oltean's avatar
      net: pcs: xpcs: use mdiobus_c45_addr in xpcs_{read,write} · 679e283e
      Vladimir Oltean authored
      
      Use the dedicated helper for abstracting away how the clause 45 address
      is packed in reg_addr.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      679e283e
    • Vladimir Oltean's avatar
      net: pcs: xpcs: export xpcs_probe · 8e2bb956
      Vladimir Oltean authored
      
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e2bb956
    • Vladimir Oltean's avatar
      net: pcs: xpcs: export xpcs_config_eee · 14b517cb
      Vladimir Oltean authored
      
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      14b517cb
    • Vladimir Oltean's avatar
      net: pcs: xpcs: export xpcs_validate · a1a753ed
      Vladimir Oltean authored
      
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a1a753ed
    • Vladimir Oltean's avatar
      net: pcs: xpcs: make the checks related to the PHY interface mode stateless · 9900074e
      Vladimir Oltean authored
      
      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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9900074e
    • Vladimir Oltean's avatar
      net: pcs: xpcs: there is only one PHY ID · a54a8b71
      Vladimir Oltean authored
      
      The xpcs driver has an apparently inadequate structure for the actual
      hardware it drives.
      
      These defines and the xpcs_probe() function would suggest that there is
      one PHY ID per supported PHY interface type, and the driver simply
      validates whether the mode it should operate in (the argument of
      xpcs_probe) matches what the hardware is capable of:
      
      	#define SYNOPSYS_XPCS_USXGMII_ID	0x7996ced0
      	#define SYNOPSYS_XPCS_10GKR_ID		0x7996ced0
      	#define SYNOPSYS_XPCS_XLGMII_ID		0x7996ced0
      	#define SYNOPSYS_XPCS_SGMII_ID		0x7996ced0
      	#define SYNOPSYS_XPCS_MASK		0xffffffff
      
      but that is not the case, because upon closer inspection, all the above
      4 PHY ID definitions are in fact equal.
      
      So it is the same XPCS that is compatible with all 4 sets of PHY
      interface types.
      
      This change introduces an array of struct xpcs_compat which is populated
      by the single struct xpcs_id instance. It also eliminates the bogus
      defines for multiple Synopsys XPCS PHY IDs and replaces them with a
      single XPCS_ID, which better reflects the way in which the hardware
      operates.
      
      Because we are touching this area of the code anyway, the new array of
      struct xpcs_compat, as well as the array of xpcs_id, have been moved
      towards the end of the file, since they are variable declarations not
      definitions. If whichever of struct xpcs_compat or struct xpcs_id need
      to gain a function pointer member in the future, it is easier to
      reference functions (no forward declarations needed) if we have the
      const variable declarations at the end of the file.
      
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a54a8b71
  11. May 17, 2021
  12. Mar 15, 2021
  13. Feb 06, 2021
  14. Oct 16, 2020
    • Ioana Ciornei's avatar
      net: pcs-xpcs: depend on MDIO_BUS instead of selecting it · f355a55f
      Ioana Ciornei authored
      
      The below compile time error can be seen when PHYLIB is configured as a
      module.
      
       ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_read':
       pcs-xpcs.c:(.text+0x29): undefined reference to `mdiobus_read'
       ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_soft_reset.constprop.7':
       pcs-xpcs.c:(.text+0x80): undefined reference to `mdiobus_write'
       ld: drivers/net/pcs/pcs-xpcs.o: in function `xpcs_config_aneg':
       pcs-xpcs.c:(.text+0x318): undefined reference to `mdiobus_write'
       ld: pcs-xpcs.c:(.text+0x38e): undefined reference to `mdiobus_write'
       ld: pcs-xpcs.c:(.text+0x3eb): undefined reference to `mdiobus_write'
       ld: pcs-xpcs.c:(.text+0x437): undefined reference to `mdiobus_write'
       ld: drivers/net/pcs/pcs-xpcs.o:pcs-xpcs.c:(.text+0xb1e): more undefined references to `mdiobus_write' follow
      
      PHYLIB being a module leads to MDIO_BUS being a module as well while the
      XPCS is still built-in. What should happen in this configuration is that
      PCS_XPCS should be forced to build as module. However, that select only
      acts in the opposite way so we should turn it into a depends.
      
      Fix this up by explicitly depending on MDIO_BUS.
      
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Fixes: 2fa4e4b7 ("net: pcs: Move XPCS into new PCS subdirectory")
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      f355a55f
  15. Sep 25, 2020
  16. Aug 31, 2020
    • Ioana Ciornei's avatar
      net: phy: add Lynx PCS module · 0da4c3d3
      Ioana Ciornei authored
      
      Add a Lynx PCS module which exposes the necessary operations to drive
      the PCS using phylink.
      
      The majority of the code is extracted from the Felix DSA driver, which
      will be also modified in a later patch, and exposed as a separate module
      for code reusability purposes.
      As such, this aims at feature and bug parity with the existing Felix DSA
      driver, and thus USXGMII, SGMII, QSGMII and 2500Base-X (only w/o in-band
      AN) are supported by the Lynx PCS module since these were also supported
      by Felix.
      
      The module can only be enabled by the drivers in need and not user
      selectable.
      
      Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0da4c3d3
  17. Aug 27, 2020
Loading