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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Dec 2006 09:32:30 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	Arjan van de Ven <arjan@...ux.intel.com>
CC:	netdev@...r.kernel.org
Subject: Re: [patch 04/14] e1000: consolidate managability enabling/disabling

Arjan van de Ven wrote:
> +static void
> +e1000_init_manageability(struct e1000_adapter *adapter)
> +{
> +	if (adapter->en_mng_pt) {
> +		uint32_t manc2h = E1000_READ_REG(&adapter->hw, MANC2H);
> +		uint32_t manc = E1000_READ_REG(&adapter->hw, MANC);
> +
> +		/* disable hardware interception of ARP */
> +		manc &= ~(E1000_MANC_ARP_EN);
> +
> +		/* enable receiving management packets to the host */
> +		/* this will probably generate destination unreachable messages
> +		 * from the host OS, but the packets will be handled on SMBUS */
> +		if (adapter->hw.mac_type >= e1000_82571) {
> +			manc |= E1000_MANC_EN_MNG2HOST;
> +#define E1000_MNG2HOST_PORT_623 (1 << 5)
> +#define E1000_MNG2HOST_PORT_664 (1 << 6)
> +			manc2h |= E1000_MNG2HOST_PORT_623;
> +			manc2h |= E1000_MNG2HOST_PORT_664;
> +			E1000_WRITE_REG(&adapter->hw, MANC2H, manc2h);
> +		}
> +
> +		E1000_WRITE_REG(&adapter->hw, MANC, manc);
> +	}
> +}
> +
> +static void
> +e1000_release_manageability(struct e1000_adapter *adapter)
> +{
> +	if (adapter->en_mng_pt) {
> +		uint32_t manc = E1000_READ_REG(&adapter->hw, MANC);
> +
> +		/* re-enable hardware interception of ARP */
> +		manc |= E1000_MANC_ARP_EN;
> +
> +		if (adapter->hw.mac_type >= e1000_82571)
> +			manc &= ~E1000_MANC_EN_MNG2HOST;
> +
> +		/* don't explicitly have to mess with MANC2H since
> +		 * MANC has an enable disable that gates MANC2H */
> +
> +		E1000_WRITE_REG(&adapter->hw, MANC, manc);
> +	}
> +}

This patch adds more error-probe mac_type tests, rather than a simple 
and tough-to-screw-up E1000_HAS_MGMT feature bit.


> +	/* If the controller is 82573 and f/w is AMT, do not set
> +	 * DRV_LOAD until the interface is up.  For all other cases,
> +	 * let the f/w know that the h/w is now under the control
> +	 * of the driver. */
> +	if (adapter->hw.mac_type != e1000_82573 ||
> +	    !e1000_check_mng_mode(&adapter->hw))
> +		e1000_get_hw_control(adapter);
>  
> -	if (netif_running(netdev))
> -		mod_timer(&adapter->watchdog_timer, jiffies);

ditto

-
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