netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Hutchings <bhutchings@solarflare.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6 02/12] skge: implement set_phys_id
Date: Mon, 04 Apr 2011 23:57:32 +0100	[thread overview]
Message-ID: <1301957852.2935.54.camel@localhost> (raw)
In-Reply-To: <20110404184501.450494215@linuxplumber.net>

On Mon, 2011-04-04 at 11:43 -0700, Stephen Hemminger wrote:
> Implement set_phys_id led control on SysKonnect board.
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> 
> 
> --- a/drivers/net/skge.c	2011-04-04 10:48:15.713539204 -0700
> +++ b/drivers/net/skge.c	2011-04-04 10:50:07.387094723 -0700
> @@ -786,29 +786,28 @@ static void skge_led(struct skge_port *s
>  }
>  
>  /* blink LED's for finding board */
> -static int skge_phys_id(struct net_device *dev, u32 data)
> +static int skge_set_phys_id(struct net_device *dev,
> +			    enum ethtool_phys_id_state state)
>  {
>  	struct skge_port *skge = netdev_priv(dev);
> -	unsigned long ms;
> -	enum led_mode mode = LED_MODE_TST;
>  
> -	if (!data || data > (u32)(MAX_SCHEDULE_TIMEOUT / HZ))
> -		ms = jiffies_to_msecs(MAX_SCHEDULE_TIMEOUT / HZ) * 1000;
> -	else
> -		ms = data * 1000;
> -
> -	while (ms > 0) {
> -		skge_led(skge, mode);
> -		mode ^= LED_MODE_TST;
> -
> -		if (msleep_interruptible(BLINK_MS))
> -			break;
> -		ms -= BLINK_MS;
> +	switch (state) {
> +	case ETHTOOL_ID_ACTIVE:
> +		return -1;
[...]

Must be -EINVAL.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


  reply	other threads:[~2011-04-04 22:57 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-04 18:43 [PATCH net-next-2.6 00/12] Convert more drivers to ethtool set_phys_id Stephen Hemminger
2011-04-04 18:43 ` [PATCH net-next-2.6 01/12] sky2: support " Stephen Hemminger
2011-04-06 21:30   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 02/12] skge: implement set_phys_id Stephen Hemminger
2011-04-04 22:57   ` Ben Hutchings [this message]
2011-04-06 21:37     ` David Miller
2011-04-06 21:30   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 03/12] e100: implemenet set_phys_id Stephen Hemminger
2011-04-06 21:31   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 04/12] e1000: convert to set_phys_id Stephen Hemminger
2011-04-06 21:31   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 05/12] e1000e: implement ethtool set_phys_id Stephen Hemminger
2011-04-06 21:31   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 06/12] igb: convert to " Stephen Hemminger
2011-04-06 21:31   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 07/12] igbvf: remove bogus phys_id Stephen Hemminger
2011-04-04 21:27   ` Rose, Gregory V
2011-04-06 21:31   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 08/12] ixgbe: convert to ethtool set_phys_id Stephen Hemminger
2011-04-06 21:32   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 09/12] ixgb: convert to set_phys_id Stephen Hemminger
2011-04-06 21:32   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 10/12] tg3: implement ethtool set_phys_id Stephen Hemminger
2011-04-06 21:32   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 11/12] cxgb3: implement set_phys_id Stephen Hemminger
2011-04-06 21:32   ` David Miller
2011-04-04 18:43 ` [PATCH net-next-2.6 12/12] qlcnic: convert to set_phys_id Stephen Hemminger
2011-04-06 10:47   ` Amit Salecha
2011-04-06 21:32   ` David Miller
2011-04-06 21:47     ` Stephen Hemminger
2011-04-06 22:06       ` David Miller
2011-04-04 19:53 ` [PATCH net-next-2.6 00/12] Convert more drivers to ethtool set_phys_id Jeff Kirsher
2011-04-04 20:06   ` David Miller
2011-04-04 20:35     ` Jeff Kirsher
2011-04-04 20:14   ` Stephen Hemminger
2011-04-04 20:28     ` Ben Hutchings
2011-04-04 20:32     ` Jeff Kirsher
2011-04-04 20:52       ` Stephen Hemminger
2011-04-04 23:07 ` Ben Hutchings

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=1301957852.2935.54.camel@localhost \
    --to=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.com \
    /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).