All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Michael Chan <mchan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH 9/11][TG3]: Add ASPM workaround.
Date: Fri, 04 May 2007 20:40:09 -0400	[thread overview]
Message-ID: <463BD269.7010501@garzik.org> (raw)
In-Reply-To: <1178326514.4859.25.camel@dell>

Michael Chan wrote:
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -3019,6 +3019,15 @@ static int tg3_setup_phy(struct tg3 *tp, int force_reset)
>  		}
>  	}
>  
> +	if (tp->tg3_flags & TG3_FLAG_ASPM_WORKAROUND) {
> +		u32 val = tr32(0x7d28);
> +		if (!netif_carrier_ok(tp->dev))
> +			val = (val & ~0x0000ff00) | tp->pwrmgmt_thresh;
> +		else
> +			val |= 0x0000ff00;
> +		tw32(0x7d28, val);
> +	}
> +
>  	return err;
>  }
>  
> @@ -10997,6 +11016,9 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
>  	 */
>  	tp->tg3_flags &= ~TG3_FLAG_WOL_ENABLE;
>  
> +	if (tp->tg3_flags & TG3_FLAG_ASPM_WORKAROUND)
> +		tp->pwrmgmt_thresh = tr32(0x7d28) & 0x0000ff00;


NAK -- magic numbers.

Please create a named constant for the register at 0x7d28.

	Jeff



  reply	other threads:[~2007-05-05  0:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-05  0:55 [PATCH 9/11][TG3]: Add ASPM workaround Michael Chan
2007-05-05  0:40 ` Jeff Garzik [this message]
2007-05-05 20:10   ` David Miller
2007-05-06  0:18     ` [PATCH revised " Michael Chan
2007-05-07  7:26       ` 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=463BD269.7010501@garzik.org \
    --to=jeff@garzik.org \
    --cc=davem@davemloft.net \
    --cc=mchan@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.