]> git.baikalelectronics.ru Git - kernel.git/commit
net: libphy: Add phy specific function to access mmd phy registers
authorVince Bridgers <vbridgers2013@gmail.com>
Tue, 29 Jul 2014 20:19:57 +0000 (15:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2014 03:00:21 +0000 (20:00 -0700)
commitb1b28a18208141874581e2f79fe5b93edccee0ed
treec98fd7a59ecefb01d3dc9ce978209bf14eed1c21
parenta5ed74e7aac7f1d555ddfe8ab6401664c8997716
net: libphy: Add phy specific function to access mmd phy registers

libphy was originally written assuming all phy devices support clause 45
access extensions to the mmd registers through the indirection registers
located within the first 16 phy registers. This assumption is not true
in all cases, and one specific example is the Micrel ksz9021 10/100/1000
Mbps phy. Using the stmmac driver, accessing the mmd registers to query
and configure energy efficient Ethernet (EEE) features yielded unexpected
behavior.

This patch adds mmd access functions to the phy driver that can be
overriden by the phy specific driver if the phy does not support this
mechanism or uses it's own non-standard access mechanism. By default,
the IEEE Compatible clause 45 access mechanism described in clause 22
is used. With this patch, EEE query/configure functions as expected
using the stmmac and the Micrel ksz9021 phy.

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
include/linux/phy.h