2020-07-02 23:30:56 +08:00
|
|
|
From 6b4370dc812a5a982b687730e7d6f4f11626408f Mon Sep 17 00:00:00 2001
|
2019-07-16 02:39:17 -07:00
|
|
|
From: Phil Elwell <phil@raspberrypi.org>
|
|
|
|
Date: Fri, 9 Mar 2018 12:01:00 +0000
|
2020-01-11 23:39:11 +08:00
|
|
|
Subject: [PATCH] lan78xx: Read initial EEE status from DT
|
2019-07-16 02:39:17 -07:00
|
|
|
|
|
|
|
Add two new DT properties:
|
|
|
|
* microchip,eee-enabled - a boolean to enable EEE
|
|
|
|
* microchip,tx-lpi-timer - time in microseconds to wait before entering
|
|
|
|
low power state
|
|
|
|
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
|
|
|
|
---
|
|
|
|
drivers/net/usb/lan78xx.c | 16 ++++++++++++++++
|
|
|
|
1 file changed, 16 insertions(+)
|
|
|
|
|
|
|
|
--- a/drivers/net/usb/lan78xx.c
|
|
|
|
+++ b/drivers/net/usb/lan78xx.c
|
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
431fb8c mac80211: add AQL improvements
6bdd4c9 mac80211: add missing backports for building with 4.14 kernels
0106820 mac80211: add missing return code checks in AQL improvements
e7f7101 mac80211: rework encapsulation offload support
[package]
base-files: add function for generating random MAC
dnsmasq: abort dhcp_check on interface state
boot: sync upstream source code
ath10k-ct-firmware/mt76/sch_cake: update to latest git HEAD
[script]
download: add China Mirror Station
[target]
Sync: arc770, ath79, bcm63xx, kirkwood, lantiq, layerscape,
mediatek, mvebu, octeon, oxnas, pistachio, uml
Sync most of the target patches.
Run-compiled-on: ipq40xx (4.19 & 5.4), ramips
2020-08-26 11:31:50 +08:00
|
|
|
@@ -2643,6 +2643,22 @@ static int lan78xx_open(struct net_devic
|
2019-07-16 02:39:17 -07:00
|
|
|
|
|
|
|
netif_dbg(dev, ifup, dev->net, "phy initialised successfully");
|
|
|
|
|
|
|
|
+ if (of_property_read_bool(dev->udev->dev.of_node,
|
|
|
|
+ "microchip,eee-enabled")) {
|
|
|
|
+ struct ethtool_eee edata;
|
|
|
|
+ memset(&edata, 0, sizeof(edata));
|
|
|
|
+ edata.cmd = ETHTOOL_SEEE;
|
|
|
|
+ edata.advertised = ADVERTISED_1000baseT_Full |
|
|
|
|
+ ADVERTISED_100baseT_Full;
|
|
|
|
+ edata.eee_enabled = true;
|
|
|
|
+ edata.tx_lpi_enabled = true;
|
|
|
|
+ if (of_property_read_u32(dev->udev->dev.of_node,
|
|
|
|
+ "microchip,tx-lpi-timer",
|
|
|
|
+ &edata.tx_lpi_timer))
|
|
|
|
+ edata.tx_lpi_timer = 600; /* non-aggressive */
|
|
|
|
+ (void)lan78xx_set_eee(net, &edata);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
/* for Link Check */
|
|
|
|
if (dev->urb_intr) {
|
|
|
|
ret = usb_submit_urb(dev->urb_intr, GFP_KERNEL);
|