summaryrefslogtreecommitdiffstats
path: root/drivers/net/mdio.c
Commit message (Collapse)AuthorAgeFilesLines
* mdio: unused ethtool functionsstephen hemminger2013-12-261-28/+0
| | | | | | | Use it or lose it. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmdBen Hutchings2012-03-011-0/+3
| | | | | | | | | | | | | | | Add comments for ethtool_cmd::phy_address and ethtool_cmd::mdio_support, and definitions of the flags currently used in mdio_support. In the mdio library, assert that its own flags continue to match those in the ethtool interface. In the mii library, use the ethtool flag definition and stop including <linux/mdio.h>. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethtool: cosmetic: Use ethtool ethtool_cmd_speed APIDavid Decotigny2011-04-291-8/+12
| | | | | | | | | | | | | | | | | | | | 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 <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethtool: Call ethtool's get/set_settings callbacks with cleaned dataDavid Decotigny2011-04-291-0/+3
| | | | | | | | | | | | | | | | | | | | | 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 <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio: Expose pause frame advertising flags to ethtoolBen Hutchings2009-10-121-0/+4
| | | | | | | | In mdio45_ethtool_gset_npage() and mdio45_ethtool_gset(), check MDIO pause frame advertising flags and set the corresponding ethtool flags. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio: Advertise pause (flow control) settings even if autoneg is offBen Hutchings2009-10-121-5/+3
| | | | | | | | | | | | | | Currently, if pause autoneg is off we do not set either pause advertising flag. If autonegotiation of speed and duplex settings is enabled, there is no way for the link partner to distinguish this from our refusing to use pause frames. We should instead set the advertising flags according to the forced mode so that the link partner can follow our lead. This is consistent with the behaviour of other drivers. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Remove redundant checks for CAP_NET_ADMIN in MDIO implementationsBen Hutchings2009-09-031-3/+0
| | | | | | | | dev_ioctl() already checks capable(CAP_NET_ADMIN) before calling the driver's implementation of MDIO ioctls. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio: Check MDIO_STAT1_FAULT in mdio45_links_ok()Ben Hutchings2009-08-261-3/+10
| | | | | | | | | Some PHYs will report that the link is up even though there is a fault condition. Therefore, check the fault flag too. We must also read STAT2 to reset this flag. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio add missing GPL flagNicolas Reinecke2009-06-251-0/+4
| | | | | | | | | | | Add missing GPL flag and description. mdio: module license 'unspecified' taints kernel. Disabling lock debugging due to kernel taint Signed-off-by: Nicolas Reinecke <nr <at> das-labor.org> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio: Expose 10GBASE-T MDI-X status via ethtoolBen Hutchings2009-06-111-0/+17
| | | | | | | This is available in a standard MDIO register in 10GBASE-T PHYs. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethtool/mdio: Support backplane mode negotiationBen Hutchings2009-04-291-5/+25
| | | | | | | Compile-tested only. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ethtool/mdio: Report MDIO mode support and link partner advertisingBen Hutchings2009-04-291-7/+12
| | | | | | | | Add mdio_support and lp_advertising fields to ethtool_cmd. Set these in mdio45_ethtool_gset{,_npage}(). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio: Add mdio45_ethtool_spauseparam_an()Ben Hutchings2009-04-291-0/+30
| | | | | | | | This implements the ETHTOOL_SPAUSEPARAM operation for MDIO (clause 45) PHYs with auto-negotiation MMDs. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mdio: Add generic MDIO (clause 45) support functionsBen Hutchings2009-04-291-0/+359
These roughly mirror many of the MII library functions and are based on code from the sfc driver. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud