All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] phylib + mii + <phy>_parse_status
@ 2011-08-25  7:56 Michal Simek
  2011-08-25 14:18 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Simek @ 2011-08-25  7:56 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] phylib + mii + <phy>_parse_status
  2011-08-25  7:56 [U-Boot] phylib + mii + <phy>_parse_status Michal Simek
@ 2011-08-25 14:18 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2011-08-25 14:18 UTC (permalink / raw)
  To: u-boot

On Thursday, August 25, 2011 03:56:50 Michal Simek wrote:
> 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?

ive glanced at unification of these defines in the past and couldnt see any 
reason as to why it couldnt be done ... it just touched a bunch of drivers i 
had no way of testing, and didnt feel like embarking on another tree wide 
cleanup at that time.  i can only do so many before i get bored ;).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110825/9db0b3bf/attachment.pgp 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-25 14:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25  7:56 [U-Boot] phylib + mii + <phy>_parse_status Michal Simek
2011-08-25 14:18 ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.