From: David Miller <davem@davemloft.net>
To: eswierk@aristanetworks.com
Cc: netdev@vger.kernel.org, aabdulla@nvidia.com
Subject: Re: [PATCH] forcedeth: add phy_power_down parameter, leave phy powered up by default
Date: Mon, 01 Jun 2009 02:48:34 -0700 (PDT) [thread overview]
Message-ID: <20090601.024834.119882380.davem@davemloft.net> (raw)
In-Reply-To: <1243724386.13996.17.camel@localhost.localdomain>
From: Ed Swierk <eswierk@aristanetworks.com>
Date: Sat, 30 May 2009 15:59:46 -0700
> Add a phy_power_down parameter to forcedeth: set to 1 to power down the
> phy and disable the link when an interface goes down; set to 0 to always
> leave the phy powered up.
>
> The phy power state persists across reboots; Windows, some BIOSes, and
> older versions of Linux don't bother to power up the phy again, forcing
> users to remove all power to get the interface working (see
> http://bugzilla.kernel.org/show_bug.cgi?id=13072). Leaving the phy
> powered on is the safest default behavior. Users accustomed to seeing
> the link state reflect the interface state and/or wanting to minimize
> power consumption can set phy_power_down=1 if compatibility with other
> OSes is not an issue.
>
> Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Yes, this is probably the thing to do, but...
+enum {
+ NV_PHY_POWER_DOWN_NEVER,
+ NV_PHY_POWER_DOWN_ON_INTF_DOWN
+};
+static int phy_power_down = NV_PHY_POWER_DOWN_NEVER;
...
+module_param(phy_power_down, int, 0);
+MODULE_PARM_DESC(phy_power_down, "Power down phy and disable link when interface is down (1), or always leave phy powered up (0).");
Using an enum is gratuitous, and if you want to guarentee the
enum values start at zero you have to explicitly assign the
first enum value at zero.
But again it's gratuitous, and it's better to just explicitly
use '0' and '1 in this kind of situation.
Please fix this up and resubmit, thanks.
prev parent reply other threads:[~2009-06-01 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-30 22:59 [PATCH] forcedeth: add phy_power_down parameter, leave phy powered up by default Ed Swierk
2009-06-01 9:48 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090601.024834.119882380.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aabdulla@nvidia.com \
--cc=eswierk@aristanetworks.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).