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] [day] [month] [year] [list]
Message-ID: <9235D6609DB808459E95D78E17F2E43D40965E6E@CHN-SV-EXMX02.mchp-main.com>
Date:   Wed, 16 Nov 2016 15:31:43 +0000
From:   <Woojung.Huh@...rochip.com>
To:     <f.fainelli@...il.com>, <davem@...emloft.net>
CC:     <andrew@...n.ch>, <netdev@...r.kernel.org>,
        <UNGLinuxDriver@...rochip.com>
Subject: RE: [PATCH] lan78xx: relocate mdix setting to phy driver

> static void lan88xx_set_mdix(struct phy_device *phydev)
> {
> 	int buf;
> 	int mask_val;
> 
> 	switch (phydev->mdix) {
> 	case ETH_TP_MDI:
> 		mask_val = LAN88XX_EXT_MODE_CTRL_MDI_;
> 		break;
> 	case ETH_TP_MDI_X:
> 		mask_val = LAN88XX_EXT_MODE_CTRL_MDI_X_;
> 		break;
> 	case ETH_TP_MDI_AUTO:
> 		mask_val = LAN88XX_EXT_MODE_CTRL_AUTO_MDIX_:
> 		break:
> 	default:
> 		return;
> 	}
> 
> 	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
> 		  LAN88XX_EXT_PAGE_SPACE_1);
> 	buf = phy_read(phydev, LAN88XX_EXT_MODE_CTRL);
> 	buf &= ~LAN88XX_EXT_MODE_CTRL_MDIX_MASK_;
> 	buf |= mask_val;
> 	phy_write(phydev, LAN88XX_EXT_MODE_CTRL, buf);
> 	phy_write(phydev, LAN88XX_EXT_PAGE_ACCESS,
> 		  LAN88XX_EXT_PAGE_SPACE_0);
> }
Florian,
Looks simpler to me too. Will submit new patch.

Thanks.
- Woojung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ