24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

05 Jun, 2017

1 commit


10 Nov, 2016

1 commit

  • The newly introduced mii_ethtool_get_link_ksettings function sets
    lp_advertising to an uninitialized value when BMCR_ANENABLE is not
    set:

    drivers/net/mii.c: In function 'mii_ethtool_get_link_ksettings':
    drivers/net/mii.c:224:2: error: 'lp_advertising' may be used uninitialized in this function [-Werror=maybe-uninitialized]

    As documented in include/uapi/linux/ethtool.h, the value is
    expected to be zero when we don't know it, so let's initialize
    it to that.

    Fixes: bc8ee596afe8 ("net: mii: add generic function to support ksetting support")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

03 Nov, 2016

1 commit


20 Jan, 2015

1 commit

  • mii_check_media() does not update the link (carrier) state or log link
    changes when the link mode is forced. Drivers using the mii library
    must do this themselves, but most of them do not.

    Instead of changing them all, provide a sensible default behaviour
    similar to mii_check_link() when the mode is forced.

    via-rhine depends on it being a no-op in this case, so make its call
    to mii_check_media() conditional.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

02 Mar, 2012

1 commit


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
     

06 May, 2011

1 commit


30 Apr, 2011

4 commits

  • This updates the network drivers so that they don't access the
    ethtool_cmd::speed field directly, but use ethtool_cmd_speed()
    instead.

    For most of the drivers, these changes are purely cosmetic and don't
    fix any problem, such as for those 1GbE/10GbE drivers that indirectly
    call their own ethtool get_settings()/mii_ethtool_gset(). The changes
    are meant to enforce code consistency and provide robustness with
    future larger throughputs, at the expense of a few CPU cycles for each
    ethtool operation.

    All drivers compiled with make allyesconfig ion x86_64 have been
    updated.

    Tested: make allyesconfig on x86_64 + e1000e/bnx2x work
    Signed-off-by: David Decotigny
    Signed-off-by: David S. Miller

    David Decotigny
     
  • This makes sure the ethtool's set_settings() callback of network
    drivers don't ignore the 16 most significant bits when ethtool calls
    their set_settings().

    All drivers compiled with make allyesconfig on x86_64 have been
    updated.

    Signed-off-by: David Decotigny
    Signed-off-by: David S. Miller

    David Decotigny
     
  • This makes sure that when a driver calls the ethtool's
    get/set_settings() callback of another driver, the data passed to it
    is clean. This guarantees that speed_hi will be zeroed correctly if
    the called callback doesn't explicitely set it: we are sure we don't
    get a corrupted speed from the underlying driver. We also take care of
    setting the cmd field appropriately (ETHTOOL_GSET/SSET).

    This applies to dev_ethtool_get_settings(), which now makes sure it
    sets up that ethtool command parameter correctly before passing it to
    drivers. This also means that whoever calls dev_ethtool_get_settings()
    does not have to clean the ethtool command parameter. This function
    also becomes an exported symbol instead of an inline.

    All drivers visible to make allyesconfig under x86_64 have been
    updated.

    Signed-off-by: David Decotigny
    Signed-off-by: David S. Miller

    David Decotigny
     
  • Add support of pause frames advertise in mii_get_an. This provides all drivers
    that use mii_ethtool_gset to represent their own and Link partner flow control
    abilities in ethtool.

    Signed-off-by: Artem Polyakov
    Signed-off-by: David S. Miller

    artpol
     

04 Mar, 2011

1 commit

  • Add a bit more data to the output.
    Convert string speeds to integer.
    Object size reduced a tiny bit.
    $ size drivers/net/mii.o*
    text data bss dec hex filename
    4155 56 1000 5211 145b drivers/net/mii.o.new
    4184 56 1000 5240 1478 drivers/net/mii.o.old

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

04 Sep, 2009

1 commit


30 Apr, 2009

1 commit


28 Apr, 2007

1 commit


14 Sep, 2006

1 commit


14 Sep, 2005

1 commit


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