dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers
Giuseppe CAVALLARO a59a4d1921 phy: add the EEE support and the way to access to the MMD registers.
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 <peppe.cavallaro@st.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-07-01 03:34:50 -07:00
..
accessibility
acpi Merge branches 'bugfix-battery', 'bugfix-misc', 'bugfix-rafael', 'bugfix-turbostat', 'bugfix-video' and 'workaround-pss' into release 2012-06-04 00:48:41 -04:00
amba arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00
ata Viresh has moved 2012-06-20 14:39:36 -07:00
atm solos-pci: Fix DMA support 2012-05-24 16:22:53 -04:00
auxdisplay
base Driver core and printk fixes for 3.5-rc4 2012-06-20 15:14:28 -07:00
bcma bcma: define some additional cores IDs 2012-06-27 15:23:16 -04:00
block mtip32xx: Changes to sysfs entries 2012-05-31 08:46:50 +02:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-06-29 12:07:37 -04:00
cdrom
char Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2012-06-18 12:20:36 -07:00
clk clk: mxs: fix clock lookup after freeing init memory 2012-06-25 16:51:48 -07:00
clocksource clocksource: sh_tmu: Use clockevents_config_and_register(). 2012-06-11 17:10:16 +09:00
connector netlink: add netlink_kernel_cfg parameter to netlink_kernel_create 2012-06-29 16:46:02 -07:00
cpufreq
cpuidle
crypto arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
dca
devfreq Power management updates for 3.5 2012-05-23 14:07:06 -07:00
dio
dma Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma 2012-06-20 22:12:52 -07:00
edac edac: Do alignment logic properly in edac_align_ptr() 2012-06-11 12:43:16 -03:00
eisa
extcon extcon: max8997: Add missing kfree for info->edev in max8997_muic_remove() 2012-06-18 16:30:42 -07:00
firewire IEEE 1394 (FireWire) subsystem updates post v3.4: 2012-05-24 12:57:47 -07:00
firmware
gpio gpio/samsung: fix the typo 'exynos5_xxx' instead of 'exonys5_xxx' 2012-06-03 21:21:01 -07:00
gpu Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel into drm-fixes 2012-06-27 19:56:20 +01:00
hid Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2012-06-26 11:23:41 -07:00
hsi
hv Driver core pull for 3.5-rc1 2012-05-22 16:02:13 -07:00
hwmon hwmon: Update my e-mail address 2012-06-25 06:46:24 -07:00
hwspinlock
i2c i2c: Add generic I2C multiplexer using pinctrl API 2012-06-04 16:49:43 +02:00
ide drivers/ide/ide-cs.c: adjust suspicious bit operation 2012-06-12 15:51:41 -07:00
idle
ieee802154 drivers/ieee802154: add support for the at86rf230/231 transceivers 2012-06-26 21:06:11 -07:00
iio iio: drop wrong reference from Kconfig 2012-06-14 17:28:46 -07:00
infiniband netlink: add netlink_kernel_cfg parameter to netlink_kernel_create 2012-06-29 16:46:02 -07:00
input i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
iommu iommu/amd: Fix deadlock in ppr-handling error path 2012-06-04 12:47:44 +02:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-24 11:54:29 -07:00
leds leds: Make LEDS_ASIC3 and LEDS_RENESAS_TPU depend on LEDS_CLASS=y 2012-06-12 10:56:25 +08:00
lguest
macintosh
md md: 2 fixes for 3.5-rc 2012-06-06 09:49:28 -07:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-06-25 14:53:09 -07:00
memory
memstick
message Merge branch 'akpm' (Andrew's patch-bomb) 2012-05-31 18:10:18 -07:00
mfd Viresh has moved 2012-06-20 14:39:36 -07:00
misc misc: mei: set WDIOF_ALARMONLY on mei watchdog 2012-06-13 15:34:31 -07:00
mmc Revert "mmc: omap_hsmmc: Enable Auto CMD12" 2012-06-26 16:10:30 -04:00
mtd Fix the debugfs regression - we never enable it because incorrect 2012-06-28 11:41:43 -07:00
net phy: add the EEE support and the way to access to the MMD registers. 2012-07-01 03:34:50 -07:00
nfc NFC: Monitor pn533 target mode 2012-06-04 21:34:34 +02:00
nubus
of netdev/phy/of: Handle IEEE802.3 clause 45 Ethernet PHYs in of_mdiobus_register() 2012-06-27 21:23:24 -07:00
oprofile
parisc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
parport Driver core pull for 3.5-rc1 2012-05-22 16:02:13 -07:00
pci USB: add NO_D3_DURING_SLEEP flag and revert 151b612847 2012-06-13 13:11:39 -07:00
pcmcia
pinctrl Merge branch 'akpm' (Andrew's patch-bomb) 2012-06-20 14:41:57 -07:00
platform drivers/platform/x86/acerhdf.c: correct Boris' mail address 2012-06-07 14:43:55 -07:00
pnp
power A bunch of fixes for v3.5, nothing extraordinary. 2012-05-31 12:10:15 -07:00
pps
ps3
ptp Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00
rapidio rapidio/tsi721: add DMA engine support 2012-05-31 17:49:31 -07:00
regulator regulator: palmas: fix regmap offsets for enable/disable 2012-06-23 11:37:28 +01:00
remoteproc remoteproc/omap: fix dev_err typo 2012-06-17 10:31:03 +03:00
rpmsg
rtc Merge branches 'bugfix-battery', 'bugfix-misc', 'bugfix-rafael', 'bugfix-turbostat', 'bugfix-video' and 'workaround-pss' into release 2012-06-04 00:48:41 -04:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2012-05-31 10:51:10 -07:00
sbus
scsi netlink: add netlink_kernel_cfg parameter to netlink_kernel_create 2012-06-29 16:46:02 -07:00
sfi
sh sh: intc: Kill off special reservation interface. 2012-05-22 19:07:55 +09:00
sn
spi SPI: fix over-eager devm_xxx() conversion 2012-06-18 11:27:04 +01:00
ssb ssb: add missing PCI ID for b/g/n single band BCM4322 2012-06-11 14:59:44 -04:00
staging netlink: add netlink_kernel_cfg parameter to netlink_kernel_create 2012-06-29 16:46:02 -07:00
target target: Return error to initiator if SET TARGET PORT GROUPS emulation fails 2012-06-12 20:12:25 -07:00
tc
thermal
tty Serial driver fixes for 3.5-rc4 2012-06-20 15:13:13 -07:00
uio
usb USB: CP210x Add 10 Device IDs 2012-06-26 16:14:34 -07:00
uwb
vhost vhost: use USER_DS in vhost_worker thread 2012-06-26 21:10:56 -07:00
video fbdev fixes for 3.5 2012-06-16 16:59:05 -07:00
virt
virtio
vlynq
vme
w1 arm-soc: clock driver changes 2012-05-26 12:42:29 -07:00
watchdog watchdog: core: fix WDIOC_GETSTATUS return value 2012-06-28 20:40:56 +02:00
xen Five bug-fixes: 2012-06-15 17:17:15 -07:00
zorro
Kconfig Staging tree pull request for 3.5-rc1 2012-05-22 16:34:21 -07:00
Makefile arm-soc: driver specific updates 2012-05-26 12:22:27 -07:00