From: Jeff Garzik <[EMAIL PROTECTED]>
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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to