Re: [PATCH] r8169: Reinstate ALDPS and ASPM support

Simon Horman
2018-06-06T06:12:06Z

On Tue, Jun 05, 2018 at 09:13:08PM +0200, Heiner Kallweit wrote:
> On 05.06.2018 06:58, Kai-Heng Feng wrote:
> > This patch reinstate ALDPS and ASPM support on r8169.
> >
> > On some Intel platforms, ASPM support on r8169 is the key factor to let
> > Package C-State achieve PC8. Without ASPM support, the deepest Package
> > C-State can hit is PC3. PC8 can save additional ~3W in comparison with
> > PC3.
> >
> > This patch is from Realtek.
> >
> > Fixes: e0c075577965 ("r8169: enable ALDPS for power saving")
> > Fixes: d64ec841517a ("r8169: enable internal ASPM and clock request settings")
> >
> > Cc: Ryankao <ryankao@realtek.com>
> > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> > ---
> > drivers/net/ethernet/realtek/r8169.c | 190 +++++++++++++++++++++------
> > 1 file changed, 151 insertions(+), 39 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> > index 75dfac0248f4..a28ef20be221 100644
> > --- a/drivers/net/ethernet/realtek/r8169.c
> > +++ b/drivers/net/ethernet/realtek/r8169.c
> > @@ -319,6 +319,8 @@ static const struct pci_device_id rtl8169_pci_tbl[] = {
> >
> > MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
> >
> > +static int enable_aspm = 1;
> > +static int enable_aldps = 1;
> > static int use_dac = -1;
> > static struct {
> > u32 msg_enable;
> > @@ -817,6 +819,10 @@ struct rtl8169_private {
> >
> > MODULE_AUTHOR("Realtek and the Linux r8169 crew <netdev@vger.kernel.org>");
> > MODULE_DESCRIPTION("RealTek RTL-8169 Gigabit Ethernet driver");
> > +module_param(enable_aspm, int, 0);
> > +MODULE_PARM_DESC(enable_aspm, "Enable ASPM");
> > +module_param(enable_aldps, int, 0);
> > +MODULE_PARM_DESC(enable_aldps, "Enable ALDPS");
> > module_param(use_dac, int, 0);
> > MODULE_PARM_DESC(use_dac, "Enable PCI DAC. Unsafe on 32 bit PCI slot.");
> > module_param_named(debug, debug.msg_enable, int, 0);

I'm a little surprised to see new module parameters being added.