From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] phylib + mii + <phy>_parse_status
Date: Thu, 25 Aug 2011 09:56:50 +0200 [thread overview]
Message-ID: <4E560042.7000206@monstr.eu> (raw)
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
next reply other threads:[~2011-08-25 7:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 7:56 Michal Simek [this message]
2011-08-25 14:18 ` [U-Boot] phylib + mii + <phy>_parse_status Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E560042.7000206@monstr.eu \
--to=monstr@monstr.eu \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox