From: Pavel Machek <pavel@ucw.cz>
To: Tristram.Ha@microchip.com
Cc: andrew@lunn.ch, f.fainelli@gmail.com, muvarov@gmail.com,
nathan.leigh.conrad@gmail.com,
vivien.didelot@savoirfairelinux.com,
UNGLinuxDriver@microchip.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver
Date: Thu, 14 Dec 2017 22:12:20 +0100 [thread overview]
Message-ID: <20171214211220.GB31098@amd> (raw)
In-Reply-To: <93AF473E2DA327428DE3D46B72B1E9FD4113EACE@CHN-SV-EXMX02.mchp-main.com>
[-- Attachment #1: Type: text/plain, Size: 3179 bytes --]
Hi!
Thanks for the support.
> > root@miro:~# mii-tool lan3
> > lan3: negotiated 1000baseT-HD flow-control, link ok
> >
> > But IIRC the switch is 100mbit? And dmesg does get it right. Its just
> > mii-tool that is confused.
> >
> > Link detection seems to work
> >
> > root@miro:/sys/bus/spi/devices/spi2.0# mii-tool lan1
> > lan1: negotiated 1000baseT-HD flow-control, link ok
> > root@miro:/sys/bus/spi/devices/spi2.0# mii-tool lan1
> > lan1: no link
> >
> > (But that really should be 100baseT, not 1000baseT).
>
> ethtool lan3 should also report the correct setting.
Yes, after port is configured, ethtool produces right results:
Speed: 100Mb/s
Duplex: Full
Before that, it looks rather confusing:
root@miro:~# ethtool lan2
root@miro:~# ethtool lan2
Settings for lan2:
...
Speed: Unknown!
Duplex: Unknown! (255)
> > Is there register dump available somewhere? I was using
> > /sys/bus/spi/devices/spi32766.0/registers but this does not seem to be
> > available.
>
> There is a patch to add that functionality. It is very simple and I will send it
> to you later. Without that it is hard to debug the DSA driver if there is
> something wrong.
That would be nice :-).
> I also have a simple utility to communicate with that registers file to read/write
> register individually. Is there a standard Linux utility for that
> function?
I don't think standard utility exists. Binary file which can be
written by userspace shoudl be enough.
> > p04_rx: 660
> > p04_rx_hi: 0
> > p04_rx_undersize: 0
> > p04_rx_fragments: 20
>
> This indicates a problem with the MAC. Are you using a MII or RMII version?
I do have:
mac0: ethernet@800f0000 {
phy-mode = "rmii";
pinctrl-names = "default";
...
}
> > p04_tx_hi: 0
> > p04_tx_late_col: 0
> > p04_tx_pause: 0
> > p04_tx_bcast: 0
> > p04_tx_mcast: 3
>
> This indicates the host port tried to send frames to the MAC.
> > tx_total_col: 0
> > tx_exc_col: 0
> > tx_single_col: 0
> > tx_mult_col: 0
> > rx_discards: 0
> > tx_discards: 0
>
> They just reported frames are received from the port. Because of problem with
> the host port there is no transmission coming from the host port.
I disabled second ethernet port in the dts so it could not interfere
with testing, butno change.
Is there any way to debug the host port problems? I do have
spi@0 {
compatible = "microchip,ksz8895";
...
ports {
port@4 {
reg = <4>;
label = "cpu";
ethernet = <&mac0>;
fixed-link {
speed = <100>;
full-duplex;
};
};
};
};
On one side, and
mac0: ethernet@800f0000 {
phy-mode = "rmii";
status = "okay";
fixed-link {
speed = <100>;
full-duplex;
};
};
on the other...
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2017-12-14 21:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 2:43 [PATCH net-next 0/1] net: dsa: microchip: Add Microchip KSZ8895 DSA driver Tristram.Ha
2017-11-17 2:43 ` [PATCH net-next 1/1] " Tristram.Ha
2017-11-20 10:56 ` Pavel Machek
2017-12-05 22:16 ` Tristram.Ha
2017-12-05 22:23 ` Pavel Machek
2017-12-05 23:29 ` Tristram.Ha
2017-12-07 21:04 ` Pavel Machek
2017-12-09 3:55 ` Tristram.Ha
2017-12-14 21:12 ` Pavel Machek [this message]
2017-12-15 8:54 ` Andrew Lunn
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=20171214211220.GB31098@amd \
--to=pavel@ucw.cz \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=f.fainelli@gmail.com \
--cc=muvarov@gmail.com \
--cc=nathan.leigh.conrad@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/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;
as well as URLs for NNTP newsgroup(s).