All of lore.kernel.org
 help / color / mirror / Atom feed
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, 7 Dec 2017 22:04:48 +0100	[thread overview]
Message-ID: <20171207210448.GA16614@amd> (raw)
In-Reply-To: <93AF473E2DA327428DE3D46B72B1E9FD4113DCE0@CHN-SV-EXMX02.mchp-main.com>

[-- Attachment #1: Type: text/plain, Size: 5138 bytes --]

Hi!

> > I went back to my version of dsa patches, and test above works as
> > expected.
> 
> Sorry to be this late for the reply.  I finally got hold of a KSZ8895 board that
> works with my SoC board to confirm the network communication.
> 
> As expected the KSZ8895 board works correctly as the chip uses the same
> tail tagging feature in KSZ8795, and I did verify that board is
 > working.

Ok, let me retry:

> One thing to debug this problem is to dump the MIB counters.  Use the ethtool
> utility to show MIB counters of both ports:
> 
> ethtool -S lan3
> ethtool -S eth0
> 
> Assuming eth0 is the MAC controller that drives the switch, the receive counters of
> the host port of the switch should match the transmit counters of
> lan3, and vice versa.

Hmm. I'm getting some "interesting" results from mii-tool:

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).

Is there register dump available somewhere? I was using
/sys/bus/spi/devices/spi32766.0/registers but this does not seem to be
available.

I tried that ethtool -S, and counters do not seem to match:

Help welcome.

Best regards,
							Pavel

root@miro:~# ifconfig eth0 up
root@miro:~# ifconfig lan3 192.168.20.103 netmask 255.255.0.0 up
[  180.903675] IPv6: ADDRCONF(NETDEV_UP): lan3: link is not ready
root@miro:~# [  181.913284] ksz8895-switch spi2.0 lan3: Link is Up - 100Mbps/Full - flow control rx/tx
[  181.921358] IPv6: ADDRCONF(NETDEV_CHANGE): lan3: link becomes ready

root@miro:~# route add default gw 192.168.1.1
root@miro:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
^C
--- 192.168.1.1 ping statistics ---
17 packets transmitted, 0 packets received, 100% packet loss
root@miro:~# ethtool -S eth0
NIC statistics:
     tx_dropped: 0
     tx_packets: 55
     tx_broadcast: 35
     tx_multicast: 20
     tx_crc_errors: 0
     tx_undersize: 0
     tx_oversize: 0
     tx_fragment: 0
     tx_jabber: 0
     tx_collision: 0
     tx_64byte: 0
     tx_65to127byte: 35
     tx_128to255byte: 0
     tx_256to511byte: 20
     tx_512to1023byte: 0
     tx_1024to2047byte: 0
     tx_GTE2048byte: 0
     tx_octets: 9576
     IEEE_tx_drop: 0
     IEEE_tx_frame_ok: 55
     IEEE_tx_1col: 0
     IEEE_tx_mcol: 0
     IEEE_tx_def: 0
     IEEE_tx_lcol: 0
     IEEE_tx_excol: 0
     IEEE_tx_macerr: 0
     IEEE_tx_cserr: 0
     IEEE_tx_sqe: 0
     IEEE_tx_fdxfc: 0
     IEEE_tx_octets_ok: 9576
     rx_packets: 0
     rx_broadcast: 0
     rx_multicast: 0
     rx_crc_errors: 0
     rx_undersize: 0
     rx_oversize: 0
     rx_fragment: 0
     rx_jabber: 0
     rx_64byte: 0
     rx_65to127byte: 0
     rx_128to255byte: 0
     rx_256to511byte: 0
     rx_512to1023byte: 0
     rx_1024to2047byte: 0
     rx_GTE2048byte: 0
     rx_octets: 0
     IEEE_rx_drop: 0
     IEEE_rx_frame_ok: 0
     IEEE_rx_crc: 0
     IEEE_rx_align: 0
     IEEE_rx_macerr: 0
     IEEE_rx_fdxfc: 0
     IEEE_rx_octets_ok: 0
     p04_rx: 660
     p04_rx_hi: 0
     p04_rx_undersize: 0
     p04_rx_fragments: 20
     p04_rx_oversize: 0
     p04_rx_jabbers: 0
     p04_rx_symbol_err: 0
     p04_rx_crc_err: 0
     p04_rx_align_err: 0
     p04_rx_mac_ctrl: 0
     p04_rx_pause: 0
     p04_rx_bcast: 0
     p04_rx_mcast: 0
     p04_rx_ucast: 0
     p04_rx_64_or_less: 0
     p04_rx_65_127: 0
     p04_rx_128_255: 0
     p04_rx_256_511: 0
     p04_rx_512_1023: 0
     p04_rx_1024_1522: 0
     p04_tx: 388
     p04_tx_hi: 0
     p04_tx_late_col: 0
     p04_tx_pause: 0
     p04_tx_bcast: 0
     p04_tx_mcast: 3
     p04_tx_ucast: 0
     p04_tx_deferred: 0
     p04_tx_total_col: 0
     p04_tx_exc_col: 0
     p04_tx_single_col: 0
     p04_tx_mult_col: 0
     p04_rx_discards: 0
     p04_tx_discards: 0
root@miro:~# ethtool -S lan3
NIC statistics:
     tx_packets: 24
     tx_bytes: 1356
     rx_packets: 0
     rx_bytes: 0
     rx: 566
     rx_hi: 0
     rx_undersize: 0
     rx_fragments: 0
     rx_oversize: 0
     rx_jabbers: 0
     rx_symbol_err: 0
     rx_crc_err: 0
     rx_align_err: 0
     rx_mac_ctrl: 0
     rx_pause: 0
     rx_bcast: 0
     rx_mcast: 4
     rx_ucast: 0
     rx_64_or_less: 0
     rx_65_127: 1
     rx_128_255: 3
     rx_256_511: 0
     rx_512_1023: 0
     rx_1024_1522: 0
     tx: 0
     tx_hi: 0
     tx_late_col: 0
     tx_pause: 0
     tx_bcast: 0
     tx_mcast: 0
     tx_ucast: 0
     tx_deferred: 0
     tx_total_col: 0
     tx_exc_col: 0
     tx_single_col: 0
     tx_mult_col: 0
     rx_discards: 0
     tx_discards: 0
root@miro:~# 


-- 
(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 --]

  parent reply	other threads:[~2017-12-07 21:04 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 [this message]
2017-12-09  3:55         ` Tristram.Ha
2017-12-14 21:12           ` Pavel Machek
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=20171207210448.GA16614@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 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.