netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Mike McCormack <mikem@ring3k.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] sky2: Use 32bit read to read Y2_VAUX_AVAIL
Date: Tue, 1 Sep 2009 08:57:57 -0700	[thread overview]
Message-ID: <20090901085757.47b5c09c@nehalam> (raw)
In-Reply-To: <4A9D2793.1020502@ring3k.org>

On Tue, 01 Sep 2009 22:54:27 +0900
Mike McCormack <mikem@ring3k.org> wrote:

> B0_CTST is a 24bit register according to the vendor driver (sk98lin).
> A 16bit read on B0_CTST will always return 0 for Y2_VAUX_AVAIL (1<<16),
>  so use a 32bit read when testing Y2_VAUX_AVAIL
> 
> Signed-off-by: Mike McCormack <mikem@ring3k.org>
> ---
>  drivers/net/sky2.c |    2 +-
>  drivers/net/sky2.h |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
> index 7108b12..d1f3b46 100644
> --- a/drivers/net/sky2.c
> +++ b/drivers/net/sky2.c
> @@ -273,7 +273,7 @@ static void sky2_power_aux(struct sky2_hw *hw)
>  			    Y2_COR_CLK_LNK2_DIS | Y2_CLK_GAT_LNK2_DIS);
>  
>  	/* switch power to VAUX */
> -	if (sky2_read16(hw, B0_CTST) & Y2_VAUX_AVAIL)
> +	if (sky2_read32(hw, B0_CTST) & Y2_VAUX_AVAIL)
>  		sky2_write8(hw, B0_POWER_CTRL,
>  			    (PC_VAUX_ENA | PC_VCC_ENA |
>  			     PC_VAUX_ON | PC_VCC_OFF));
> diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
> index 34042ff..e0f23a1 100644
> --- a/drivers/net/sky2.h
> +++ b/drivers/net/sky2.h
> @@ -260,7 +260,7 @@ enum csr_regs {
>  	Y2_CFG_AER      = 0x1d00,	/* PCI Advanced Error Report region */
>  };
>  
> -/*	B0_CTST			16 bit	Control/Status register */
> +/*	B0_CTST			24 bit	Control/Status register */
>  enum {
>  	Y2_VMAIN_AVAIL	= 1<<17,/* VMAIN available (YUKON-2 only) */
>  	Y2_VAUX_AVAIL	= 1<<16,/* VAUX available (YUKON-2 only) */


Acked-by: Stephen Hemminger <shemminger@vyatta.com>



  reply	other threads:[~2009-09-01 15:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01 13:54 [PATCH] sky2: Use 32bit read to read Y2_VAUX_AVAIL Mike McCormack
2009-09-01 15:57 ` Stephen Hemminger [this message]
2009-09-02  0:45   ` David Miller

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=20090901085757.47b5c09c@nehalam \
    --to=shemminger@vyatta.com \
    --cc=mikem@ring3k.org \
    --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).