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]
Message-id: <1156170842.2878.6.camel@dhollis-lnx.sunera.com>
Date:	Mon, 21 Aug 2006 10:34:02 -0400
From:	David Hollis <dhollis@...ehollis.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	dbrownell@...rs.sourceforge.net, linux-kernel@...r.kernel.org,
	linux-usb-devel@...ts.sourceforge.net, support@...chip.com,
	Michael Helmling <supermihi@....de>
Subject: Re: [PATCH] driver for mcs7830 (aka DeLOCK) USB ethernet adapter

On Sun, 2006-08-20 at 22:07 +0200, Arnd Bergmann wrote:

> +static int mcs7830_set_autoneg(struct usbnet *dev, int ptrUserPhyMode)
> +{
> +	int ret;
> +	/* Enable all media types */
> +	ret = mcs7830_write_phy(dev, MII_ADVERTISE, 0x05e1);
> +	/* First Disable All */
> +	if (!ret)
> +		ret = mcs7830_write_phy(dev, MII_BMCR, 0x0000);
> +	/* Enable Auto Neg */
> +	if (!ret)
> +		ret = mcs7830_write_phy(dev, MII_BMCR, 0x1000);
> +	/* Restart Auto Neg (Keep the Enable Auto Neg Bit Set) */
> +	if (!ret)
> +		ret = mcs7830_write_phy(dev, MII_BMCR, 0x1200);
> +	return ret < 0 ? : 0;
> +}

include/linux/mii.h also has defines for the flags for MII_ADVERTISE and
MII_BMCR:

So your 0x1200 can be 'BMCR_ANENABLE | BMCR_ANRESTART' for example.
Makes it easier to tell whats going on.

Other than that, it's looking pretty good.


-- 
David Hollis <dhollis@...ehollis.com>

Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ