[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180214134040.GB22014@lunn.ch>
Date: Wed, 14 Feb 2018 14:40:40 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Chunhao Lin <hau@...ltek.com>
Cc: netdev@...r.kernel.org, nic_swsd@...ltek.com,
linux-kernel@...r.kernel.org
Subject: Re: [RESEND PATCH net-next] r8169: add module param for control of
ASPM disable.
On Wed, Feb 14, 2018 at 05:02:45PM +0800, Chunhao Lin wrote:
> The patch is from Todd Broch <tbroch@...omium.org>.
> ASPM has been disabled in this driver by default as its been
> implicated in stability issues on at least one platform. This CL adds
> a module parameter to allow control of ASPM disable. The default
> value is to enable ASPM again as its provides signficant (200mW) power
> savings on the platform I tested.
>
> I make some modification that let this patch only for RTL8168G and later.
>
> Signed-off-by: Chunhao Lin <hau@...ltek.com>
> ---
> drivers/net/ethernet/realtek/r8169.c | 73 ++++++++++++++++++++++++------------
> 1 file changed, 50 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 0bf7d17..87d3136 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -346,6 +346,7 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
> MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
>
> static int rx_buf_sz = 16383;
> +static int aspm_disable = 0;
> static int use_dac = -1;
> static struct {
> u32 msg_enable;
> @@ -867,6 +868,8 @@ struct rtl8169_private {
>
> MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@...r.kernel.org>");
> MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
> +module_param(aspm_disable, int, 0444);
> +MODULE_PARM_DESC(aspm_disable, "Disable ASPM completely.");
Hi Chunhao
linux/drivers$ grep -ir aspm * | grep MODULE_
gpu/drm/amd/amdgpu/amdgpu_drv.c:MODULE_PARM_DESC(aspm, "ASPM support (1 = enable, 0 = disable, -1 = auto)");
gpu/drm/radeon/radeon_drv.c:MODULE_PARM_DESC(aspm, "ASPM support (1 = enable, 0 = disable, -1 = auto)");
infiniband/hw/hfi1/pcie.c:MODULE_PARM_DESC(aspm, "PCIe ASPM: 0: disable, 1: enable, 2: dynamic");
net/wireless/realtek/rtlwifi/rtl8192ee/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8188ee/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8821ae/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8192se/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8192ce/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8723be/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8192de/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
net/wireless/realtek/rtlwifi/rtl8723ae/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
staging/rts5208/rtsx.c:MODULE_PARM_DESC(aspm_l0s_l1_en, "enable device aspm");
staging/rtlwifi/rtl8822be/sw.c:MODULE_PARM_DESC(aspm, "Set to 1 to enable ASPM (default 1)\n");
This patch seems to have the exact opposite of everybody else already
does.
Maybe you can follow the AMD example, and default to -1, since you are
proposing to mostly have it enabled, but disabled in one case?
Andrew
Powered by blists - more mailing lists