[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 05 May 2007 13:10:05 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jeff@...zik.org
Cc: mchan@...adcom.com, netdev@...r.kernel.org
Subject: Re: [PATCH 9/11][TG3]: Add ASPM workaround.
From: Jeff Garzik <jeff@...zik.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.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists