16 Mar, 2020

2 commits


06 Jan, 2020

1 commit

  • Typically a MAC PCS auto-configures itself after it receives the
    negotiated copper-side link settings from the PHY, but some MAC devices
    are more special and need manual interpretation of the SGMII AN result.

    In other cases, the PCS exposes the entire tx_config_reg base page as it
    is transmitted on the wire during auto-negotiation, so it makes sense to
    be able to decode the equivalent lp_advertised bit mask from the raw u16
    (of course, "lp" considering the PCS to be the local PHY).

    Therefore, add the bit definitions for the SGMII registers 4 and 5
    (local device ability, link partner ability), as well as a link_mode
    conversion helper that can be used to feed the AN results into
    phy_resolve_aneg_linkmode.

    Signed-off-by: Vladimir Oltean
    Signed-off-by: David S. Miller

    Vladimir Oltean
     

05 Oct, 2019

1 commit

  • When userspace writes to the MII_ADVERTISE register, we update phylib's
    advertising mask and trigger a renegotiation. However, writing to the
    MII_CTRL1000 register, which contains the gigabit advertisement, does
    neither. This can lead to phylib's copy of the advertisement becoming
    de-synced with the values in the PHY register set, which can result in
    incorrect negotiation resolution.

    Fixes: 5502b218e001 ("net: phy: use phy_resolve_aneg_linkmode in genphy_read_status")
    Reviewed-by: Andrew Lunn
    Signed-off-by: Russell King
    Signed-off-by: David S. Miller

    Russell King
     

28 Mar, 2019

1 commit

  • With a recent link mode advertisement code update this helper
    providing local pause capability translation used for flow
    control link mode negotiation got broken.
    For eth drivers using this helper, the issue is apparent only
    if either PAUSE or ASYM_PAUSE is being advertised.

    Fixes: 3c1bcc8614db ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
    Signed-off-by: Claudiu Manoil
    Signed-off-by: David S. Miller

    Claudiu Manoil
     

06 Dec, 2018

4 commits

  • Replace the if else code structure with a call to the helper
    linkmode_mod_bit.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Add a _mod_ variant of mii_lpa_to_linkmode_lpa_t. Use this to fix the
    genphy_read_status() where the 1G link partner features are getting
    lost.

    Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode")
    Reported-by: Heiner Kallweit
    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Rename mii_stat1000_to_linkmode_lpa_t to
    mii_stat1000_mod_linkmode_lpa_t to indicate it modifies the passed
    linkmode bitmap, without clearing any other bits.

    Add a helper to set/clear bits in a linkmode.

    Use this helper to ensure bit are clear which the stat1000 indicates
    should not be set.

    Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode")
    Suggested-by: Heiner Kallweit
    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • mii_adv_to_linkmode_adv_t() clears all bits before setting it needs to
    set. This means the freshly set Autoneg gets cleared.

    Change the order, and add comments about it clearing the old content
    of the bitmap.

    Fixes: c0ec3c273677 ("net: phy: Convert u32 phydev->lp_advertising to linkmode")
    Reported-by: Heiner Kallweit
    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     

12 Nov, 2018

3 commits


02 Oct, 2018

4 commits


02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Jun, 2017

1 commit


03 Nov, 2016

1 commit


13 Oct, 2012

1 commit


01 Jul, 2012

1 commit

  • This patch adds the support for the Energy-Efficient Ethernet (EEE)
    to the Physical Abstraction Layer.
    To support the EEE we have to access to the MMD registers 3.20 and
    7.60/61. So two new functions have been added to read/write the MMD
    registers (clause 45).

    An Ethernet driver (I tested the stmmac) can invoke the phy_init_eee to properly
    check if the EEE is supported by the PHYs and it can also set the clock
    stop enable bit in the 3.0 register.
    The phy_get_eee_err can be used for reporting the number of time where
    the PHY failed to complete its normal wake sequence.

    In the end, this patch also adds the EEE ethtool support implementing:
    o phy_ethtool_set_eee
    o phy_ethtool_get_eee

    v1: initial patch
    v2: fixed some errors especially on naming convention
    v3: renamed again the mmd read/write functions thank to Ben's feedback
    v4: moved file to phy.c and added the ethtool support.
    v5: fixed phy_adv_to_eee, phy_eee_to_supported, phy_eee_to_adv return
    values according to ethtool API (thanks to Ben's feedback).
    Renamed some macros to avoid too long names.
    v6: fixed kernel-doc comments to be properly parsed.
    Fixed the phy_init_eee function: we need to check which link mode
    was autonegotiated and then the corresponding bits in 7.60 and 7.61
    registers.
    v7: reviewed the way to get the negotiated settings.
    v8: fixed a problem in the phy_init_eee return value erroneously added
    when included the phy_read_status call.
    v9: do not remove the MDIO_AN_EEE_ADV_100TX and MDIO_AN_EEE_ADV_1000T
    and fixed the eee_{cap,lp,adv} declaration as "int" instead of u16.

    Signed-off-by: Giuseppe Cavallaro
    Reviewed-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Giuseppe CAVALLARO
     

22 Nov, 2011

1 commit


17 Nov, 2011

1 commit

  • Translating between ethtool advertisement settings and MII
    advertisements are common operations for ethernet drivers. This patch
    adds a set of helper functions that implements the conversion. The
    patch then modifies a couple of the drivers to use the new functions.

    Signed-off-by: Matt Carlson
    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Matt Carlson
     

16 Sep, 2011

2 commits


15 Jun, 2011

1 commit


30 Apr, 2009

2 commits


16 Dec, 2008

2 commits

  • These 4 drivers have identical full duplex flow control resolution
    functions. This patch changes them all to use one common function.

    The function in question decides whether a device should enable TX and
    RX flow control in a standard way (IEEE 802.3-2005 table 28B-3), so this
    should also be useful for other drivers.

    Signed-off-by: Steve Glendinning
    Signed-off-by: David S. Miller

    Steve Glendinning
     
  • flags used within drivers for indicating tx and rx flow control are
    defined in 4 drivers (and probably more), move these constants to mii.h.

    The 3 SMSC drivers use the same constants (FLOW_CTRL_TX), but TG3 uses
    TG3_FLOW_CTRL_TX, so this patch also renames the constants within TG3.

    Signed-off-by: Steve Glendinning
    Signed-off-by: David S. Miller

    Steve Glendinning
     

18 May, 2007

1 commit


29 Apr, 2006

1 commit


14 Sep, 2005

1 commit


31 Jul, 2005

1 commit


27 May, 2005

1 commit

  • A new driver bnx2 for Broadcom bcm5706 is available.

    The patch also includes new 1000BASE-X advertisement bit definitions in
    mii.h

    Thanks to David Miller and Jeff Garzik for reviewing and their valuable
    feedback.

    Signed-off-by: Michael Chan
    Signed-off-by: David S. Miller

    Michael Chan
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds