[SRU] [OEM-B] [PULL] Fix Runtime PM for r8169
Kai-Heng Feng
kai.heng.feng at canonical.com
Sat May 25 19:18:58 UTC 2019
BugLink: https://bugs.launchpad.net/bugs/1757422
[Impact]
- r8169 stays at D0 when there's no link partner.
- r8169 doesn't enable PCIe APSM.
Both cases prevent the Intel SoC from entering deeper Package C-State,
hence the power consumption is significantly higher.
This wans't pulled to OEM-B because the original plan is to transit
OEM-B to Bionic, now we are going to maintain OEM-B because of various
complex backports, let's also pull r8169 to retire the DKMS used by many
OEM platforms.
[Fix]
Backport most commits from upstream LTS kernel, v4.19.45.
- Improve rumtime PM logic to let the device gets runtime suspended to
D3 when the port is not in used and the link is down.
- Enable PCIe ASPM.
[Test Case]
With the patch applied, the SoC can reach PC10 which saves a lot of
power.
[Regression Potential]
Low. The code has been in LTS kernel for a while, and this pull request
is almost identical to the DKMS which was tested by our QA team for many
times.
The following changes since commit a09891a3075879434b70517fd178f66dee2ddf5b:
UBUNTU: Ubuntu-oem-4.15.0-1039.44 (2019-05-19 15:05:06 +0800)
are available in the Git repository at:
https://git.launchpad.net/~kaihengfeng/linux r8169-oem-b
for you to fetch changes up to 794eef7258c419bb449e57119ff477e18745200a:
r8169: disable default rx interrupt coalescing on RTL8168 (2019-05-25 21:32:14 +0800)
----------------------------------------------------------------
Andy Shevchenko (2):
r8169: Dereference MMIO address immediately before use
r8169: switch to device-managed functions in probe (part 2)
Anthony Wong (1):
r8169: add support for NCube 8168 network card
Azat Khuzhin (1):
r8169: set RxConfig after tx/rx is enabled for RTL8169sb/8110sb devices
Chunhao Lin (1):
r8169: fix RTL8168EP take too long to complete driver initialization.
Heiner Kallweit (80):
r8169: switch to device-managed functions in probe
r8169: remove netif_napi_del in probe error path
r8169: remove unneeded rpm ops in rtl_shutdown
r8169: improve runtime pm in rtl8169_check_link_status
r8169: improve runtime pm in general and suspend unused ports
r8169: remove some WOL-related dead code
r8169: remove not needed PHY soft reset in rtl8168e_2_hw_phy_config
r8169: disable WOL per default
r8169: simplify and improve check for dash
r8169: improve interrupt handling
r8169: convert remaining feature flag and remove enum features
r8169: fix interrupt number after adding support for MSI-X interrupts
r8169: simplify rtl_set_mac_address
r8169: change type of first argument in rtl_tx_performance_tweak
r8169: change type of argument in rtl_disable/enable_clock_request
r8169: add helper tp_to_dev
r8169: fix setting driver_data after register_netdev
PCI: Add two more values for PCIe Max_Read_Request_Size
r8169: replace magic numbers with PCI MRRS constant
r8169: remove unused member features from struct
r8169: remove member align from struct rtl_cfg_info
r8169: use skb_copy_to_linear_data in rtl8169_try_rx_copy
r8169: use constant NAPI_POLL_WAIT
r8169: switch to napi_schedule_irqoff
r8169: simplify rtl8169_alloc_rx_data
r8169: improve rtl8169_init_ring
r8169: remove unneeded check in rtl8169_rx_fill
r8169: replace rx_buf_sz with a constant
r8169: remove rtl8169_map_to_asic
r8169: change hw_start argument type
r8169: change argument type of counters handling functions
r8169: change interrupt handler argument type
r8169: drop member opts1_mask from struct rtl8169_private
r8169: don't display tp->mmio_addr address
r8169: improve rtl8169_get_mac_version
r8169: drop member txd_version from struct rtl8169_private
r8169: improve pci region handling
r8169: remove jumbo_tx_csum from chip config struct
r8169: don't use netif_info et al before net_device has been registered
r8169: remove unneeded call to __rtl8169_set_features in rtl_open
r8169: improve rtl8169_set_features
r8169: replace magic number for INTT mask with a constant
r8169: improve CPlusCmd handling
r8169: improve handling of CPCMD quirk mask
r8169: simplify rtl_hw_start_8169
r8169: remove calls to rtl_set_rx_mode
r8169: move common initializations to tp->hw_start
r8169: remove unneeded check in r8168_pll_power_down
r8169: remove 810x_phy_power_up/down
r8169: merge r810x_pll_power_down/up into r8168_pll_power_down/up
r8169: drop member pll_power_ops from struct rtl8169_private
r8169: simplify code by using ranges in switch clauses
r8169: replace longer if statements with switch statements
r8169: drop rtl_generic_op
r8169: improve PCI config space access
r8169: avoid potentially misaligned access when getting mac address
r8169: replace get_protocol with vlan_get_protocol
r8169: fix powering up RTL8168h
r8169: fix network error on resume from suspend
r8169: align ASPM entry latency setting with vendor driver
r8169: enable ASPM on RTL8168E-VL
r8169: improve phy initialization when resuming
r8169: improve saved_wolopts handling
r8169: don't check WoL when powering down PHY and interface is down
r8169: reject unsupported WoL options
r8169: use standard debug output functions
r8169: remove TBI 1000BaseX support
r8169: remove old PHY reset hack
r8169: fix mac address change
r8169: fix runtime suspend
r8169: power down chip in probe
r8169: restore previous behavior to accept BIOS WoL settings
r8169: don't use MSI-X on RTL8168g
r8169: simplify RTL8169 PHY initialization
r8169: fix network stalls due to missing bit TXCFG_AUTO_FIFO
r8169: re-enable MSI-X on RTL8168g
r8169: fix NAPI handling under high load
r8169: fix WoL device wakeup enable
r8169: don't try to read counters if chip is in a PCI power-save state
r8169: disable default rx interrupt coalescing on RTL8168
Jian-Hong Pan (2):
r8169: don't use MSI-X on RTL8106e
r8169: Enable MSI-X on RTL8106e
Kai-Heng Feng (21):
Revert "r8169: re-enable MSI-X on RTL8168g"
Revert "UBUNTU: SAUCE: Revert "r8169: don't use MSI-X on RTL8106e""
Revert "r8169: Add support for new Realtek Ethernet"
Revert "r8169: don't use MSI-X on RTL8106e"
Revert "r8169: don't use MSI-X on RTL8168g"
Revert "r8169: restore previous behavior to accept BIOS WoL settings"
Revert "r8169: fix powering up RTL8168h"
Revert "r8169: fix interrupt number after adding support for MSI-X interrupts"
Revert "r8169: improve interrupt handling"
Revert "r8169: disable WOL per default"
Revert "r8169: remove some WOL-related dead code"
Revert "r8169: remove netif_napi_del in probe error path"
Revert "r8169: switch to device-managed functions in probe"
Revert "r8169: fix setting driver_data after register_netdev"
Revert "r8169: fix RTL8168EP take too long to complete driver initialization."
r8169: Don't disable ASPM in the driver
r8169: Reinstate ASPM Support
r8169: Clear RTL_FLAG_TASK_*_PENDING when clearing RTL_FLAG_TASK_ENABLED
r8169: Align ASPM/CLKREQ setting function with vendor driver
r8169: enable ASPM on RTL8106E
r8169: Add support for new Realtek Ethernet
Maciej S. Szmigiero (2):
r8169: set TxConfig register after TX / RX is enabled, just like RxConfig
r8169: set RX_MULTI_EN bit in RxConfig for 8168F-family chips
Ville Syrjälä (1):
r8169: Fix netpoll oops
drivers/net/ethernet/realtek/r8169.c | 2466 ++++++++++------------------------
include/linux/pci_ids.h | 2 +
include/uapi/linux/pci_regs.h | 2 +
3 files changed, 741 insertions(+), 1729 deletions(-)
More information about the kernel-team
mailing list