lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 14 Dec 2017 22:12:20 +0100
From:   Pavel Machek <pavel@....cz>
To:     Tristram.Ha@...rochip.com
Cc:     andrew@...n.ch, f.fainelli@...il.com, muvarov@...il.com,
        nathan.leigh.conrad@...il.com, vivien.didelot@...oirfairelinux.com,
        UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/1] net: dsa: microchip: Add Microchip KSZ8895
 DSA driver

Hi!

Thanks for the support.

> > root@...o:~# 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@...o:/sys/bus/spi/devices/spi2.0# mii-tool lan1
> > lan1: negotiated 1000baseT-HD flow-control, link ok
> > root@...o:/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@...o:~# ethtool lan2
root@...o:~# 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@...f0000 {
	                       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@...f0000 {
       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

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ