lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 04 May 2007 20:40:09 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Michael Chan <mchan@...adcom.com>
CC:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 9/11][TG3]: Add ASPM workaround.

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


-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ