All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Support needed for integrating Marvel 88e6390 with microchip SAMA7 processor (DSA)
       [not found] <CAEFUPH0SoiOef1t8GS+Ch2a2sk+95PfF9Fnz_tPoveRJy2eAuw@mail.gmail.com>
@ 2024-04-17 19:07 ` Andrew Lunn
       [not found]   ` <CAEFUPH0BFxnjxT-sX=pwgJnaLhEZajELJzsc227am3AOWye51g@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2024-04-17 19:07 UTC (permalink / raw)
  To: SIMON BABY; +Cc: netdev

On Wed, Apr 17, 2024 at 10:24:00AM -0700, SIMON BABY wrote:
> Hello Team,
> 
> I am trying to integrate the Marvel 88e6390 switch with the SAMA7 processor for
> the DSA driver to work correctly.  I can get a raw mdio reply from marvel phy
> using the devmem tool in Linux. 
> But I could not get any reply with the macb driver code (drivers/net/ethernet/
> cadence/macb_main.c). 
> 
> 
> Below are some of my logs using devmem:
> 
> root@sama7g5ek-sd:~# devmem2 0xe2800034 w 0x58029800                 (C22 code)
> /dev/mem opened.
> Memory mapped at address 0xb6f86000.
> Read at address  0xE2800034 (0xb6f86034): 0x6396C1E1
> Write at address 0xE2800034 (0xb6f86034): 0x58029800, readback 0x58029800
> root@sama7g5ek-sd:~# devmem2 0xe2800034 w 0x68060000                (C22 data)
> /dev/mem opened.
> Memory mapped at address 0xb6f2a000.
> Read at address  0xE2800034 (0xb6f2a034): 0x58029800
> Write at address 0xE2800034 (0xb6f2a034): 0x68060000, readback 0x68060000
> root@sama7g5ek-sd:~# devmem2 0xe2800034         (read)
> /dev/mem opened.
> Memory mapped at address 0xb6f04000.
> Read at address  0xE2800034 (0xb6f04034): 0x68071E07     (got the correct
> marvel ID)

I don't know what you are seeing here, but the 88E6390 has a product
ID of 0x3900 in register 3.

> Below are the extra debugs executed during my testing(I added these debugs in
> my macb driver code):
> 
> macb: ============================>debug_build: inside macb_mdio_read mii_id=0
> regnum=0x3 bus_id=e2800000.ethernet-ffffffff pdev_id=ffffffff
> macb: ============================>debug_build: inside macb_mdio_read
> macb_write C22 mii_id=0 regnum=0x3
> macb: ============================>debug_build: inside macb_mdio_read status
> after macb_mdio_wait_for_idle = 0
> macb: ============================>debug_build: inside macb_mdio_read status
> after macb_readl = 65535

I would check your reset line. The switch does not respond when held
in reset. Because the MDIO data line has a pull up, if the device does
not respond you read all 1s.

> Attached is the sama7 technical document, marvel document

Marvell documents are under NDA. You should not be publishing them.

	Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Support needed for integrating Marvel 88e6390 with microchip SAMA7 processor (DSA)
       [not found]       ` <CAEFUPH2POB-3jn_vjVS5CraJvOyhNSGLtA0hFvnNZsA+OL6eWg@mail.gmail.com>
@ 2024-04-22 17:15         ` Andrew Lunn
       [not found]           ` <CAEFUPH3-E+rc8TB2FjNu1RDxVV8GSxqrOtHiK19a53kBBhovNw@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2024-04-22 17:15 UTC (permalink / raw)
  To: SIMON BABY; +Cc: netdev

On Mon, Apr 22, 2024 at 09:43:11AM -0700, SIMON BABY wrote:
> Hello Andrew,
> 
> I was doing some traffic related tests with dsa slave ports. I have connected
> the lan2 port to my laptop and configured an IP address (same network). However
> I could not ping the addresses. Do I have to change the MAC address of the lan2
> interface as well? I can see lan2 is transmitting packets but nothing Rx. The
> MAC addresses of both the CPU port and lan2 are the same. 

The MAC address should be fine.

What does tcpdump/wireshark on your laptop show? Does it receive the packets?
Does it reply?
 
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1504
>         inet 192.162.0.111  netmask 255.255.255.0  broadcast 192.162.0.255
>         inet6 fe80::691:62ff:fef2:fd1c  prefixlen 64  scopeid 0x20<link>
>         ether 04:91:62:f2:fd:1c  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 24  dropped 0  overruns 0  frame 24

RX errors and frame errors does not look good. You should investigate
that. Maybe wireshark will give you a clue.

>         TX packets 74  bytes 8301 (8.1 KiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>         device interrupt 172
> 
> lan2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.0.120  netmask 255.255.255.0  broadcast 192.168.0.255
>         inet6 fe80::691:62ff:fef2:fd1c  prefixlen 64  scopeid 0x20<link>
>         ether 04:91:62:f2:fd:1c  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 25  bytes 2092 (2.0 KiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Developers stopped using ifconfig many years ago.

	Andrew


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Support needed for integrating Marvel 88e6390 with microchip SAMA7 processor (DSA)
       [not found]           ` <CAEFUPH3-E+rc8TB2FjNu1RDxVV8GSxqrOtHiK19a53kBBhovNw@mail.gmail.com>
@ 2024-04-22 18:38             ` Andrew Lunn
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2024-04-22 18:38 UTC (permalink / raw)
  To: SIMON BABY; +Cc: netdev

On Mon, Apr 22, 2024 at 10:29:32AM -0700, SIMON BABY wrote:
> Within my Linux itself, I could not ping the own address I configured for lan2.
> I configured same network address for my master port (eth0) and slave port
> (lane2). Please see below. 
> 
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1504
>         inet 192.162.0.111  netmask 255.255.255.0  broadcast 192.162.0.255
>         inet6 fe80::691:62ff:fef2:fd1c  prefixlen 64  scopeid 0x20<link>
>         ether 04:91:62:f2:fd:1c  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 54  dropped 0  overruns 0  frame 54
>         TX packets 179  bytes 27309 (26.6 KiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
>         device interrupt 172

There is no need to have an IP address on the conduit interface.

> lan2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 192.168.0.120  netmask 255.255.255.0  broadcast 192.168.0.255
>         inet6 fe80::691:62ff:fef2:fd1c  prefixlen 64  scopeid 0x20<link>
>         ether   04:91:62:f2:fd:1c  txqueuelen 1000  (Ethernet)
>         RX packets 0  bytes 0 (0.0 B)
>         RX errors 0  dropped 0  overruns 0  frame 0
>         TX packets 50  bytes 4082 (3.9 KiB)
>         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

> root@sama7g5ek-sd:~# ping 192.162.0.120             (ping slave port did not
> worked)                  
> PING 192.162.0.120 (192.162.0.120) 56(84) bytes of data.
> From 192.162.0.111 icmp_seq=1 Destination Host Unreachable
> From 192.162.0.111 icmp_seq=2 Destination Host Unreachable
> From 192.162.0.111 icmp_seq=3 Destination Host Unreachable

$ whois 192.162.0.0
% This is the RIPE Database query service.
% The objects are in RPSL format.
%
% The RIPE Database is subject to Terms and Conditions.
% See https://apps.db.ripe.net/docs/HTML-Terms-And-Conditions

% Note: this output has been filtered.
%       To receive output for a database update, use the "-B" flag.

% Information related to '192.162.0.0 - 192.162.3.255'

% Abuse contact for '192.162.0.0 - 192.162.3.255' is 'abuse@mtu.ru'

inetnum:        192.162.0.0 - 192.162.3.255
netname:        NEW-RUSSIA-CTV-NETWORK
country:        RU
org:            ORG-ZM1-RIPE
admin-c:        OIC2-RIPE
tech-c:         OIC2-RIPE
status:         ASSIGNED PI
mnt-by:         RIPE-NCC-END-MNT
mnt-by:         MTU-NOC
mnt-by:         KUBANGSM-MNT
mnt-routes:     KUBANGSM-MNT
mnt-domains:    KUBANGSM-MNT
created:        2011-03-14T12:58:19Z
last-modified:  2017-08-18T06:58:00Z
source:         RIPE # Filtered

Could be your firewall does not like talking to Russia?

      Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-22 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAEFUPH0SoiOef1t8GS+Ch2a2sk+95PfF9Fnz_tPoveRJy2eAuw@mail.gmail.com>
2024-04-17 19:07 ` Support needed for integrating Marvel 88e6390 with microchip SAMA7 processor (DSA) Andrew Lunn
     [not found]   ` <CAEFUPH0BFxnjxT-sX=pwgJnaLhEZajELJzsc227am3AOWye51g@mail.gmail.com>
     [not found]     ` <CAEFUPH20drisR7W8-Hb4XpFs1O0zaGN72yiNgRWXmQFSS2vSyw@mail.gmail.com>
     [not found]       ` <CAEFUPH2POB-3jn_vjVS5CraJvOyhNSGLtA0hFvnNZsA+OL6eWg@mail.gmail.com>
2024-04-22 17:15         ` Andrew Lunn
     [not found]           ` <CAEFUPH3-E+rc8TB2FjNu1RDxVV8GSxqrOtHiK19a53kBBhovNw@mail.gmail.com>
2024-04-22 18:38             ` Andrew Lunn

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.