[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210105131343.4d0fff05@nic.cz>
Date: Tue, 5 Jan 2021 13:15:00 +0100
From: Marek BehĂșn <kabel@...nel.org>
To: Pavana Sharma <pavana.sharma@...i.com>
Cc: kuba@...nel.org, andrew@...n.ch, ashkan.boldaji@...i.com,
clang-built-linux@...glegroups.com, davem@...emloft.net,
devicetree@...r.kernel.org, f.fainelli@...il.com,
gregkh@...uxfoundation.org, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org, lkp@...el.com,
netdev@...r.kernel.org, robh+dt@...nel.org,
vivien.didelot@...il.com
Subject: Re: [net-next PATCH v12 4/4] net: dsa: mv88e6xxx: Add support for
mv88e6393x family of Marvell
On Fri, 11 Dec 2020 22:51:01 +1000
Pavana Sharma <pavana.sharma@...i.com> wrote:
> +int mv88e6393x_serdes_irq_enable(struct mv88e6xxx_chip *chip, int port,
> + int lane, bool enable)
> +{
> + u8 cmode = chip->ports[port].cmode;
> + int err = 0;
> +
> + switch (cmode) {
> + case MV88E6XXX_PORT_STS_CMODE_SGMII:
> + case MV88E6XXX_PORT_STS_CMODE_1000BASEX:
> + case MV88E6XXX_PORT_STS_CMODE_2500BASEX:
> + case MV88E6XXX_PORT_STS_CMODE_5GBASER:
> + case MV88E6XXX_PORT_STS_CMODE_10GBASER:
> + err = mv88e6390_serdes_irq_enable_sgmii(chip, lane, enable);
> + }
This is wrong. IRQ for 5gbase-r and 10gbase-r is enabled differently.
Please look at how I did it in my proposal
https://www.mail-archive.com/netdev@vger.kernel.org/msg347854.html
Please look at the following functions in that patch:
mv88e6393x_serdes_irq_enable_10g()
mv88e6393x_serdes_irq_enable()
mv88e6393x_serdes_irq_status_10g()
irqreturn_t mv88e6393x_serdes_irq_status()
and also at the constants added to serdes.h in that patch
#define MV88E6393X_10G_INT_ENABLE 0x9000
#define MV88E6393X_10G_INT_LINK_CHANGE BIT(2)
#define MV88E6393X_10G_INT_STATUS 0x9001
Powered by blists - more mailing lists