From: David Miller <davem@davemloft.net>
To: jeff@garzik.org
Cc: mchan@broadcom.com, netdev@vger.kernel.org
Subject: Re: [PATCH 9/11][TG3]: Add ASPM workaround.
Date: Sat, 05 May 2007 13:10:05 -0700 (PDT) [thread overview]
Message-ID: <20070505.131005.85669827.davem@davemloft.net> (raw)
In-Reply-To: <463BD269.7010501@garzik.org>
From: Jeff Garzik <jeff@garzik.org>
Date: Fri, 04 May 2007 20:40:09 -0400
> 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.
Agree, please fix this patch up Michael.
Thanks.
next prev parent reply other threads:[~2007-05-05 20:10 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
2007-05-05 20:10 ` David Miller [this message]
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=20070505.131005.85669827.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=jeff@garzik.org \
--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 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).