From: Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org
Subject: Re: DSA driver kernel extension for dsa mv88e6190 switch
Date: Sun, 29 Sep 2019 08:55:01 +0200 [thread overview]
Message-ID: <CAGAf8LzJ56wjWxywnGWB1aOFm9B8xQhMgHFQfkVgOFWePzDfsw@mail.gmail.com> (raw)
In-Reply-To: <20190928152022.GE25474@lunn.ch>
Hello Andrew,
I see dead people... Really i do! After your reply.
> This happens when the driver is missing a resource during probe. It
> returns the error -EPROBE_DEFER, and the linux driver core will try
> the probe again later. Probably the second time all the resources it
> needs will be present and the probe will be successful.
Thank you for the explanation. It helps to understand better the logs.
> I will probably have a some patches during the next kernel merge cycle
> to make this a bit more efficient.
I am very interested on these patches. Please, keep me in the loop! Please.
> No, it is not an obstacle, but it is still wrong.
It is. Agree. This (DTS for the custom board) I'll fix Monday. It is Sunday...
> ip link set eth0 up
> ip link set lan0 up
> ip link set lan1 up
> ip link name br0 type bridge
> ip link set br0 up
> ip link lan0 master br0
> ip link lan1 master br0
Crucifix! I totally forgot to configure interfaces!!! This is why I do
NOT see pings, since rgmii management port 0 does NOT have phy
attached!!!
The whole thing MUST be configured as link layer (bridge), to work
properly on MAC/PHY layers. About STP (routing), this is not mandatory
now.
I am dumb old dog... Sorry, even dumber! I admit... Happens! :-(
I wrote my (very first) public GIST about that. Please, could you
review it, and point to the any logical bugs in there?
https://gist.github.com/ZoranStojsavljevic/423b96e2ca3bd581f7ce417cb410c465
Thank you many many times,
Zoran
_______
On Sat, Sep 28, 2019 at 5:21 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Sat, Sep 28, 2019 at 01:00:43AM +0200, Zoran Stojsavljevic wrote:
> > Hello Andrew,
> >
> > > You should not need any kernel patches for switch side RGMII
> > > delays. rgmii-id in the DT for the switch CPU port should be enough.
> > > Some of the vf610-zii platforms use it.
> >
> > It should, but it does NOT work. IT is clearly stated in port.c, in f-n:
> > static int mv88e6xxx_port_set_rgmii_delay(struct mv88e6xxx_chip *chip, int port,
> > phy_interface_t mode)
> >
> > The logic analyser shows MDIO write to register 0x01, which is 0x6003.
> > Seems the correct value.
> >
> > But, at the very end, ethtool shows that this clock skew is NOT
> > inserted.
>
> How do you see this with ethtool?
>
> > I see on RX side CRC errors. Every ethernet frame while
> > pinging.
>
> But TX works? Maybe the FEC is doing some sort of delay, even if it
> has a hardware bug.
>
> > I see another interesting fact, the dmesg, which you could see here:
> > https://pastebin.com/igXS6eXe
> >
> > [ 1.182273] DEBUG INFO! <- addr: 0x00 reg: 0x03 val: 0x1901
> > [ 1.187888] mv88e6085 2188000.ethernet-1:00: switch 0x1900
> > detected: Marvell 88E6190, revision 1
> > [ 1.219804] random: fast init done
> > [ 1.225334] libphy: mv88e6xxx SMI: probed
> > [ 1.232709] fec 2188000.ethernet eth0: registered PHC device 0
> >
> > [ 1.547946] DEBUG INFO! <- addr: 0x00 reg: 0x03 val: 0x1901
> > [ 1.553542] mv88e6085 2188000.ethernet-1:00: switch 0x1900
> > detected: Marvell 88E6190, revision 1
> > [ 1.555432] mmcblk1: p1
> > [ 1.598106] libphy: mv88e6xxx SMI: probed
> > [ 1.740362] DSA: tree 0 setup
> >
> > There are two distinct accesses while driver configures the switch. Why???
>
> This happens when the driver is missing a resource during probe. It
> returns the error -EPROBE_DEFER, and the linux driver core will try
> the probe again later. Probably the second time all the resources it
> needs will be present and the probe will be successful.
>
> I will probably have a some patches during the next kernel merge cycle
> to make this a bit more efficient.
>
> > I was not able to explain this to me... Or find explanation using google?!
> >
> > > gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; is wrong. It probably
> > > should be reset-gpios. The rest looks O.K.
> >
> > I will follow the advise, but I do not think this is an obstacle.
>
> No, it is not an obstacle, but it is still wrong.
>
> >
> > > Please show me the configuration steps you are doing? How are you
> > > configuring the FEC and the switch interfaces?
> >
> > Forgive me for my ignorance, but I have no idea what you have asked me for?
>
> ip link set eth0 up
> ip link set lan0 up
> ip link set lan1 up
> ip link name br0 type bridge
> ip link set br0 up
> ip link lan0 master br0
> ip link lan1 master br0
>
> Andrew
next prev parent reply other threads:[~2019-09-29 6:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 18:38 DSA driver kernel extension for dsa mv88e6190 switch Zoran Stojsavljevic
2019-09-23 19:17 ` Andrew Lunn
2019-09-26 13:23 ` Zoran Stojsavljevic
2019-09-26 13:38 ` Andrew Lunn
2019-09-27 23:00 ` Zoran Stojsavljevic
2019-09-28 15:20 ` Andrew Lunn
2019-09-29 6:55 ` Zoran Stojsavljevic [this message]
2019-09-30 1:44 ` Andrew Lunn
2019-09-30 5:51 ` Zoran Stojsavljevic
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=CAGAf8LzJ56wjWxywnGWB1aOFm9B8xQhMgHFQfkVgOFWePzDfsw@mail.gmail.com \
--to=zoran.stojsavljevic@gmail.com \
--cc=andrew@lunn.ch \
--cc=netdev@vger.kernel.org \
/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).