Received: by 10.223.185.116 with SMTP id b49csp696082wrg; Wed, 14 Feb 2018 05:42:07 -0800 (PST) X-Google-Smtp-Source: AH8x225gKeDN5HdeY+aWGdXb1dFNnn8rie9FHqxkZKcF6opmOIz9Gv7e5fXsgF1/fH6KeaAU2HR/ X-Received: by 2002:a17:902:2943:: with SMTP id g61-v6mr4563941plb.435.1518615727044; Wed, 14 Feb 2018 05:42:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518615727; cv=none; d=google.com; s=arc-20160816; b=X2oO109OF4SxqxzgKhsqWMEZZbGoLvNRNoiCeQ5N0sFoUiieGymKIcD/oZMHFvQAzy OW0pw+gore+d2iGwkR9Jy99Ty3XhoM0c5a6OqfkiRAs3JoNXDTJNHmLhewwqWrqPpx8Y a1YKNyfpSi4Tv1O2N45y8t1ZC7pQurQKkGKumG8uEyGqB7ZRml86y7hVosNirXhylmps 9ybwKZrkK4mz3qUk2fGTKWa6HoocZx1GuXiP2N4pwAdLL+3z0ONFZ/BrUiu+fa+pXUD0 1g+jYl4OKKz22BwGd0S8Tf409KjcxXft4WcqOsf4jY9A8Mglk0QZEt5babHTCKh/PHes NC0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ob3mjRW5FdXyLgPF+by5vSAOs+s86VTcBh0FG2j5TDw=; b=sxiTmnwuWl/LdSuHMxp2OleZFhR0Yx7VhlGkbS3Lv1ef/hvbFnv8e/kAUt7GdSP8/r zHLUuPofJguqtNyF8CMY5NxwJ1oIFBEnBIGoC1BOwAPlcP1pW3OhWH7CPJsOfmLn61H2 BzUMu6I/8oJKSSoS+8ziGFBo9aN87VFKyuTEh2M+wXyUJOmHH7ip1YLavroqrmt4XguW HPXpvKQC8cavXHIZ3FPPxd9nUu3C3VkWEi2D4LKSfG6i5YOAfz3gaFZfSba2+wBpvtus Frc5ByVODk2fMHjKsnVzlVk8e/8V4+byhsfTQqrXRNMBAHfqy+Y5zzTcR1+GF1bpNaoa VEpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vw1wCbbO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24si3230567pfj.265.2018.02.14.05.41.52; Wed, 14 Feb 2018 05:42:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=vw1wCbbO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030362AbeBNNko (ORCPT + 99 others); Wed, 14 Feb 2018 08:40:44 -0500 Received: from vps0.lunn.ch ([185.16.172.187]:55447 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030208AbeBNNkm (ORCPT ); Wed, 14 Feb 2018 08:40:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=ob3mjRW5FdXyLgPF+by5vSAOs+s86VTcBh0FG2j5TDw=; b=vw1wCbbOXP0U9P/H8m7WsD1Ot8FsDpyzMQgcHoAfY4KH7Mos5ekyefFpPyFTnaD5KlZTYRGheIqxC1zSjbM9TxxI7nkD6J588Tb+l+BBgssMgVyfnYJ6pr4a4VKJNs2x73SRBZy4ePWSa31+TMMGcpC71DiI4EOU5xgs0c8b3QY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1elxIe-0006EI-C2; Wed, 14 Feb 2018 14:40:40 +0100 Date: Wed, 14 Feb 2018 14:40:40 +0100 From: Andrew Lunn To: Chunhao Lin Cc: netdev@vger.kernel.org, nic_swsd@realtek.com, linux-kernel@vger.kernel.org Subject: Re: [RESEND PATCH net-next] r8169: add module param for control of ASPM disable. Message-ID: <20180214134040.GB22014@lunn.ch> References: <1518598965-3593-1-git-send-email-hau@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1518598965-3593-1-git-send-email-hau@realtek.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 14, 2018 at 05:02:45PM +0800, Chunhao Lin wrote: > The patch is from Todd Broch . > 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 > --- > 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 "); > 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