From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Thu, 25 Aug 2011 09:56:50 +0200 Subject: [U-Boot] phylib + mii + _parse_status Message-ID: <4E560042.7000206@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, I have done some experiments with phylib and Xilinx ethernet drivers and I found that mii code show different values for speed and duplex. I think that the main problem is that there are called miiphy_speed and miiphy_duplex functions instead of phy parsing functions. I think that it will be the best to extend struct phy_driver for int (*parse_status)(struct phy_device *phydev); and then reread phydev->speed or phydev->duplex instead of using generic code which does wrong things. Then will be good to synchronize FULL/HALF and DUPLEX_FULL/DUPLEX_HALF. miiphy.h #define HALF 22 #define FULL 44 include/linux/ethtool.h #define DUPLEX_HALF 0x00 #define DUPLEX_FULL 0x01 And of course speeds: miiphy.h #define _1000BASET 1000 #define _100BASET 100 #define _10BASET 10 include/linux/ethtool.h #define SPEED_10 10 #define SPEED_100 100 #define SPEED_1000 1000 #define SPEED_2500 2500 #define SPEED_10000 10000 Have someone looked at it? Any comments? Thanks, Michal -- Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian