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]
Message-ID: <20171120105609.GA4460@amd>
Date:   Mon, 20 Nov 2017 11:56:09 +0100
From:   Pavel Machek <pavel@....cz>
To:     Tristram.Ha@...rochip.com
Cc:     Andrew Lunn <andrew@...n.ch>,
        Florian Fainelli <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!

> From: Tristram Ha <Tristram.Ha@...rochip.com>
> 
> Add Microchip KSZ8895 DSA driver.
> 
> Signed-off-by: Tristram Ha <Tristram.Ha@...rochip.com>
> Reviewed-by: Woojung Huh <Woojung.Huh@...rochip.com>

Thanks for patches. I installed whole series on top of net-next.

Hardware is:

root@...o:~# cat /proc/cpuinfo
model name   : ARM926EJ-S rev 5 (v5l)
Hardware	  : Freescale MXS (Device Tree)

I added devicetree chunks, and enabled DSA in the config. It seems
switch is detected:

[    4.775934] Micrel KSZ8051 dsa-0.0:00: attached PHY driver [Micrel
KSZ8051] (mii_bus:phy_addr=dsa-0.0:00, irq=POLL)
[    4.885952] Micrel KSZ8051 dsa-0.0:01: attached PHY driver [Micrel
KSZ8051] (mii_bus:phy_addr=dsa-0.0:01, irq=POLL)
[    4.995934] Micrel KSZ8051 dsa-0.0:02: attached PHY driver [Micrel
KSZ8051] (mii_bus:phy_addr=dsa-0.0:02, irq=POLL)
[    5.011484] DSA: tree 0 setup

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

root@...o:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
^C
--- 192.168.1.1 ping statistics ---
7 packets transmitted, 0 packets received, 100% packet loss
root@...o:~# ifconfig [  149.904234] random: crng init done

But packets do not go through, and there is nothing helpful in
dmesg. Dts part is:

                spi@0 {
                       	compatible = "microchip,ksz8895";
                        spi-max-frequency = <25000000>;
                        reg = <0>;
			// reset-gpios = <&gpio2 8 0>;
                        status = "okay";

                        spi-cpha;
			spi-cpol;
                       ports {
                             #address-cells = <1>;
                             #size-cells = <0>;
                             port@0 {
                                    reg = <0>;
                                    label = "lan1";
                             };
                             port@1 {
                                    reg = <1>;
                                    label = "lan2";
                             };
                             port@2 {
                                    reg = <2>;
                                    label = "lan3";
                             };
                             port@4 {
                                    reg = <4>;
                                    label = "cpu";
                                    ethernet = <&mac0>;
                                    fixed-link {
                                               speed = <100>;
                                               full-duplex;
                                    };
                             };
                       };
		};

I went back to my version of dsa patches, and test above works as
expected.

									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