> From: Zheng Yongjun
>
> Remove including that don't need it.
>
> Reported-by: Hulk Robot
> Signed-off-by: Zheng Yongjun
> ---
> drivers/net/usb/lan78xx.c | 1 -
> 1 file changed, 1 deletion(-)
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index
> e81c5699c952..6acc5e
> Reported-by: Hulk Robot
> Signed-off-by: Zheng Yongjun
> ---
> drivers/net/usb/lan78xx.c | 1 -
> 1 file changed, 1 deletion(-)
> diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c index
> e81c5699c952..6acc5e904518 100644
> --- a/drivers/net/usb/lan78xx.c
> +++ b/drivers/net/u
Hi Florian,
Wish you a happy and safe new year.
Thanks for your time to review new patches.
> It is great to see a new switch from Microchip being submitted for
> review. One thing that has bothered me as a DSA maintainer before though
> is that we have seen Microchip contribute new DSA drivers
Hi Allan & Florian,
> > > So we're in need of someone who can get their hands on some more
> > > detailed documentation than publicly available to allow to make the
> > > driver handle the KSZ8051MLL correctly without breaking other stuff.
> > >
> > > I assume you are in a different department of
Hi Stefan,
Thanks for information and creating a ticket.
Did quick check on a PC machine with 4.20 rc. However, not seeing same warning.
Look need time to repro and get details on same build & target you are using.
Regards,
Woojung
> -Original Message-
> From: Stefan Wahren
> Sent: Tue
HI Marc & Stephen,
Most of engineers are out until New Year's Day.
LAN78xx driver uses irq_domain for phy interrupt, but smsc95xx uses polling.
Need to check flow again, you can try that comment out
"lan78xx_setup_irq_domain" to
make dev->domain_data.phyirq = 0 which forces PHY polling.
Can y
> > Is there any specific reason that ksz_i2c_read24 & ksz_i2c_write24 in
> > ksz9477_i2c.c
> > but, other functions are in ksz_i2c.h?
> >
>
> There are specific registers in KSZ9477 such that using 24-bit is more
> efficient than
> reading 32-bit first and writing 32-bit. The other older switch
Hi Tristram,
> diff --git a/drivers/net/dsa/microchip/ksz9477_i2c.c
> b/drivers/net/dsa/microchip/ksz9477_i2c.c
> new file mode 100644
> index 000..29511e9
> --- /dev/null
> +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
..
> +static int ksz_i2c_read24(struct ksz_device *dev, u32 reg, u32 *val)
> -Original Message-
> From: Alexandre Belloni
> Sent: Tuesday, December 18, 2018 9:26 AM
> To: David S . Miller
> Cc: UNGLinuxDriver ; netdev@vger.kernel.org;
> linux-
> ker...@vger.kernel.org; Alexandre Belloni
> Subject: [PATCH net-next] MAINTAINERS: Add a maintainer for Microsemi sw
Tristram,
> +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c
..
> +MODULE_AUTHOR("Woojung Huh ");
Believe this should be your name.
Thanks.
Woojung
Hi Michal,
> Based on the subject you quoted, you tried to apply the patch series for
> ethtool (userspace utility). Kernel patch series was sent shortly before
> this one with subject "[RFC PATCH net-next v2 00/17] ethtool netlink
> interface (WiP)":
Oh.. You are right. I picked up wrong email he
Hi Florian & Michael,
> > ethtool is being converted to netlink, and that will be a much more
> > flexible interface to work with since it is basically easily extensible
> > (unlike the current ethtool + ioctl approach).
>
> Yes, netlink sounds absolutely more useful here.
Is ethtool + netlink ex
Hi Florian,
> Well, the way the code is structure is that if you call that function
> with a test mode value that is not part of the standard set, it returns
> -EOPNOTSUPP, so if your particular PHY driver wants to "overlay"
> standard and non-standard modes, it can by using that hint.
>
> This s
Hi Florian,
> Not sure I completely understand your suggestion, do you mean that I
> should break down the body of that function above such that there are
> per-speed lower level functions? Something like the pseudo-code below:
>
> genphy_set_test() {
> switch (mode) {
> case PHY_STD_
Hi Florian,
> diff --git a/drivers/net/phy/phy-tests.c b/drivers/net/phy/phy-tests.c
...
> +/* genphy_set_test - Make a PHY enter one of the standard IEEE defined
> + * test modes
> + * @phydev: the PHY device instance
> + * @test: the desired test mode
> + * @data: test specific data (none)
> + *
Hi Stefan,
Thanks for report. We will try to repro issue and contact you if need more
details.
Regards,
Woojung
> -Original Message-
> From: Stefan Wahren [mailto:stefan.wah...@i2se.com]
> Sent: Saturday, April 28, 2018 3:59 AM
> To: Nisar Sayed - I17970 ; Woojung Huh - C21699
>
> Cc:
> > @@ -2097,6 +2098,25 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
> > (void)lan78xx_set_eee(dev->net, &edata);
> > }
> >
> > + if (!of_property_read_u32_array(dev->udev->dev.of_node,
> > + "microchip,led-modes",
> > +
Hi Alexander,
Thanks for patch. We will look into it if there is any corner case
Such as plug in/out while operations.
Woojung
> -Original Message-
> From: Alexander Graf [mailto:ag...@suse.de]
> Sent: Wednesday, March 14, 2018 10:55 AM
> To: Woojung Huh - C21699
> Cc: UNGLinuxDriver ;
> From: SF Markus Elfring [mailto:elfr...@users.sourceforge.net]
> Sent: Saturday, October 28, 2017 4:57 PM
> To: netdev@vger.kernel.org; linux-...@vger.kernel.org; UNGLinuxDriver;
> Woojung Huh - C21699
> Cc: LKML; kernel-janit...@vger.kernel.org
> Subject: [PATCH] lan78xx: Use common error handli
Hi Egil,
> >> @@ -62,7 +80,10 @@ static struct sk_buff *lan9303_xmit(struct sk_buff
> *skb,
> >> struct net_device *dev)
> >>
> >>lan9303_tag = (u16 *)(skb->data + 2 * ETH_ALEN);
> >>lan9303_tag[0] = htons(ETH_P_8021Q);
> >> - lan9303_tag[1] = htons(dp->index | BIT(4));
> >> + lan9303_ta
Hi Egil,
> +static inline int lan9303_tx_use_arl(struct dsa_port *dp, u8 *dest_addr)
> +{
> + struct lan9303 *chip = dp->ds->priv;
> +
> + return chip->is_bridged && !ether_addr_equal(dest_addr,
> eth_stp_addr);
> +}
>
> static struct sk_buff *lan9303_xmit(struct sk_buff *skb, struct net
> -Original Message-
> From: netdev-ow...@vger.kernel.org [mailto:netdev-
> ow...@vger.kernel.org] On Behalf Of Vivien Didelot
> Sent: Friday, October 13, 2017 1:39 PM
> To: netdev@vger.kernel.org
> Cc: linux-ker...@vger.kernel.org; ker...@savoirfairelinux.com; David S.
> Miller; Florian Fa
Hi Vivien,
> >> > +REG_WRITE(REG_GLOBAL, GLOBAL_MAC_01, (addr[0] << 9) |
> >> addr[1]);
> >>
> >> Is that supposed to be 9 ?
> >
> > Looks like it.
> > Check
> http://www.marvell.com/switching/assets/marvell_linkstreet_88E6060_data
> sheet.pdf
>
> Hum, David is correct, there is a bug in
> From: Vivien Didelot
> > Sent: 13 October 2017 02:41
> > As for mv88e6xxx, setup the switch from within the mv88e6060 driver with
> > a random MAC address, and remove the .set_addr implementation.
> >
> > Signed-off-by: Vivien Didelot
> > ---
> > drivers/net/dsa/mv88e6060.c | 30 +++
> @@ -644,6 +648,10 @@ static int lan9303_setup(struct dsa_switch *ds)
> return -EINVAL;
> }
>
> +ret = lan9303_setup_tagging(chip);
> +if (ret)
> +dev_err(chip->dev, "failed to setup port tagging %d\n",
>
> +static int dp83822_config_intr(struct phy_device *phydev)
> +{
> + int misr_status;
> + int physcr_status;
> + int err;
> +
> + if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
> + misr_status = phy_read(phydev, MII_DP83822_MISR1);
> + if (misr_status <
> > Specific reason to use val then using
> LAN9303_BM_EGRSS_PORT_TYPE_SPECIAL_TAG_PORT0
> > like previous line?
> >
> Specific reason was to please a reviewer that did not like my
> indenting in first version. I did not agree with him, but since
> nobody else spoke up, I changed the code.
Got it.
> +/* forward special tagged packets from port 0 to port 1 *or* port 2 */
> +static int lan9303_setup_tagging(struct lan9303 *chip)
> +{
> + int ret;
> + u32 val;
> + /* enable defining the destination port via special VLAN tagging
> + * for port 0
> + */
> + ret = lan9303
> Subject: [PATCH v1 RFC 1/7] Replace license with GPL
>
> From: Tristram Ha
>
> Replace license with GPL.
>
> Signed-off-by: Tristram Ha
Reviewed-by: Woojung Huh
> Subject: [PATCH v3 2/3] net: phy: DP83822 initial driver submission
>
> Add support for the TI DP83822 10/100Mbit ethernet phy.
>
> The DP83822 provides flexibility to connect to a MAC through a
> standard MII, RMII or RGMII interface.
>
> Datasheet:
> http://www.ti.com/product/DP83822I/datas
> > > +static int dp83822_suspend(struct phy_device *phydev)
> > > +{
> > > + int value;
> > > +
> > > + mutex_lock(&phydev->lock);
> > > + value = phy_read_mmd(phydev, DP83822_DEVADDR,
> > > MII_DP83822_WOL_CFG);
> > > + mutex_unlock(&phydev->lock);
>
> > Would we need mutex to access phy_read_mm
> +static int dp83822_suspend(struct phy_device *phydev)
> +{
> + int value;
> +
> + mutex_lock(&phydev->lock);
> + value = phy_read_mmd(phydev, DP83822_DEVADDR,
> MII_DP83822_WOL_CFG);
> + mutex_unlock(&phydev->lock);
Would we need mutex to access phy_read_mmd()?
phy_read_mmd() has
> +static int dp83822_suspend(struct phy_device *phydev)
> +{
> + int value;
> +
> + mutex_lock(&phydev->lock);
> +
> + value = phy_read_mmd(phydev, DP83822_DEVADDR,
> MII_DP83822_WOL_CFG);
> + if (~value & DP83822_WOL_EN) {
Same result, but how about " if (!(value & DP83822_WOL_EN)
Nisar,
>@@ -1290,8 +1290,8 @@ static int lan78xx_ethtool_set_eeprom(struct net_device
>*netdev,
>
>/* Allow entire eeprom update only */
>if ((ee->magic == LAN78XX_EEPROM_MAGIC) &&
>- (ee->offset == 0) &&
>- (ee->len == 512) &&
>+ (ee->offset >= 0 &&
> >> I think it means CONFIG_GPIOLIB=n in the kernel because it's not needed,
> >> yet you run code (like drivers/net/phy/mdio_bus.c) that unconditionally
> >> calls into GPIOLIB and attempts to configure a given GPIO if available.
> > Yes. I'm facing issue on PC which won't need GPIOLIB as default
> > > > @@ -0,0 +1,2066 @@
> > > > +/*
> > > > + * Microchip KSZ8795 switch driver
> > > > + *
> > > > + * Copyright (C) 2017 Microchip Technology Inc.
> > > > + * Tristram Ha
> > > > + *
> > > > + * Permission to use, copy, modify, and/or distribute this software for
> any
> > > > + * purpose
> >>> If someone is using GPIO descriptors with GPIO disabled, i.e. calling
> >>> gpiod_get() and friends, this is very likely to be a bug, and what
> >>> the driver wants to do is:
> >>>
> >>> depends on GPIOLIB
> >>>
> >>> or
> >>>
> >>> select GPIOLIB
> >>>
> >>> in Kconfig. The whole optional
> If someone is using GPIO descriptors with GPIO disabled, i.e. calling
> gpiod_get() and friends, this is very likely to be a bug, and what
> the driver wants to do is:
>
> depends on GPIOLIB
>
> or
>
> select GPIOLIB
>
> in Kconfig. The whole optional thing is mainly a leftover from when it
> > > > This series of patches are for lan78xx driver.
> > > >
> > > > These patches fixes potential issues associated with lan78xx driver
> > >
> > > Hi Nisar
> > >
> > > So this is version 2? Please include v2 in the subject line.
> > >
> > > Also, briefly list what is different from the previous
> On Thu, Sep 07, 2017 at 07:10:51AM +, nisar.sa...@microchip.com
> wrote:
> > From: Nisar Sayed
> >
> > This series of patches are for lan78xx driver.
> >
> > These patches fixes potential issues associated with lan78xx driver
>
> Hi Nisar
>
> So this is version 2? Please include v2 in the
> That being said, I have a feeling that the Marvell switches behave a
> tiny bit differently than others in that they do not flood broadcast by
> default in a given L2 domain.
Florian,
Because some DSA switches from Marvell & Microchip can do IGMP snooping,
can we propose switch layer another fl
Andrew,
> What i found is that the Marvell chips don't flood broadcast frames
> between bridged ports. What appears to happen is there is a fdb miss,
> so it gets forwarded to the CPU port for the host to deal with. The
> software bridge when floods it out all ports of the bridge.
Is this IGMP sno
Pavel,
Thanks for update and sorry about email format (due to web-access version)
I'll do review when getting back to office later this week.
- Woojung
From: Pavel Machek [pa...@denx.de]
Sent: Sunday, August 27, 2017 8:36 AM
To: Woojung Huh - C21699; natha
Pavel,
> > I'll forward your email to our support.
> > AFAIK, KSZ8895 has different register mapping from KSZ9477,
> > it will be more than ID changes in current driver.
>
> More than ID changes, indeed. As layout is completely different, it
> looks like different source file will be needed for s
> Cc: da...@davemloft.net; vivien.dide...@savoirfairelinux.com; Woojung
> Huh - C21699; UNGLinuxDriver; Florian Fainelli
> Subject: [PATCH net v2 1/2] net: core: Specify skb_pad()/skb_put_padto()
> SKB freeing
>
> Rename skb_pad() into __skb_pad() and make it take a third argument:
> free_on_error
> The first call of skb_put_padto() will free up the SKB on error, but we
> return NULL which tells dsa_slave_xmit() that the original SKB should be
> freed so this would lead to a double free here.
>
> The second skb_put_padto() already frees the passed sk_buff reference
> upon error, so calling
> > Because skb_put_padto() frees skb when it fails, below lines in
> e71cb9e00922
> > ("net: dsa: ksz: fix skb freeing") will be an issue to.
> >
> > if (skb_tailroom(skb) >= padlen + KSZ_INGRESS_TAG_LEN) {
> > + if (skb_put_padto(skb, skb->len + padlen))
> > + ret
Florian,
> -Original Message-
> From: Florian Fainelli [mailto:f.faine...@gmail.com]
> Sent: Monday, August 21, 2017 3:42 PM
> To: netdev@vger.kernel.org
> Cc: da...@davemloft.net; and...@lunn.ch;
> vivien.dide...@savoirfairelinux.com; Woojung Huh - C21699; Florian Fainelli
> Subject: [PAT
> > Hi!
> >
> > I've got hardware with KSZ8895, and I'd like to use switch ports as
> > separate ethernet cards. I believe that means DSA support.
> >
> > And there are even patches available from microchip... unfortunately
> > they are in strange form and for v3.18.
> >
> >
> http://www.microchip.
Vivien,
> Subject: [PATCH net-next 06/11] net: dsa: debugfs: add port registers
>
> Add a debug filesystem "regs" entry to query a port's hardware registers
> through the .get_regs_len and .get_regs_len switch operations.
>
> This is very convenient because it allows one to dump the registers of
> The DSA layer frees the original skb when an xmit function returns NULL,
> meaning an error occurred. But if the tagging code copied the original
> skb, it is responsible of freeing the copy if an error occurs.
>
> The ksz tagging code currently has two issues: if skb_put_padto fails,
> the skb
> -Original Message-
> From: Petr Kulhavy [mailto:br...@jikos.cz]
> Sent: Thursday, July 13, 2017 1:41 PM
> To: steve.glendinn...@shawell.net; UNGLinuxDriver
> Cc: netdev@vger.kernel.org; linux-...@vger.kernel.org; Petr Kulhavy
> Subject: [PATCH] smsc95xx: use ethtool_op_get_ts_info()
>
>
>> Just cosmetic thing.
>> How about aligning with other members in structure like
>
>Yes, i can do that. v2 tomorrow sometime.
Thanks.
>
>Can you confirm the LAN911x Internal PHY don't have this. The register
>is not listed in the switch datasheet.
>
This register is NOT in LAN911x internal phy.
Andrew,
> static int smsc_phy_probe(struct phy_device *phydev)
> {
> struct device *dev = &phydev->mdio.dev;
> @@ -206,6 +258,11 @@ static struct phy_driver smsc_phy_driver[] = {
> .ack_interrupt = smsc_phy_ack_interrupt,
> .config_intr= smsc_phy_config_intr,
>
> + /*
> function ksz_rcv can be made static as it does not need to be
> in global scope. Reformat arguments to make it checkpatch warning
> free too.
>
> Cleans up sparse warning: "symbol 'ksz_rcv' was not declared. Should
> it be static?"
>
> Signed-off-by: Colin Ian King
Reviewed-by: Woojung Huh
From: Woojung Huh
The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch
with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs.
The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII
or RMII. Either of these may connect directly to a ho
From: Woojung Huh
Adding maintainer of Microchip KSZ switches.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 42378cf..0fcb5e75 100644
--- a/MAIN
From: Woojung Huh
Adding Microchip 9477 Phy included in KSZ9477 Switch.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
drivers/net/phy/micrel.c | 11 +++
include/linux/micrel_phy.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drive
From: Woojung Huh
Adding support for the Microchip KSZ switch family tail tagging.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
include/net/dsa.h | 1 +
net/dsa/Kconfig| 3 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/d
From: Woojung Huh
This series of patches is for Microchip KSZ9477 DSA driver.
KSZ9477 is 7 ports GigE switch with numerous advanced features.
5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have
Interfaces to SGMII, RGMII, MII or RMII.
This patch supports VLAN, MDB, FDB and port mirroring
> Unfortunately, I had to revert, you didn't add MODULE_LICENSE() tags
> to the new drivers.
>
> WARNING: modpost: missing MODULE_LICENSE() in
> drivers/net/dsa/microchip/ksz_common.o
> see include/linux/module.h for more information
> WARNING: modpost: missing MODULE_LICENSE() in
> drivers/net/ds
From: Woojung Huh
Adding maintainer of Microchip KSZ switches.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 42378cf..0fcb5e75 100644
--- a/MAIN
From: Woojung Huh
Adding Microchip 9477 Phy included in KSZ9477 Switch.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
drivers/net/phy/micrel.c | 11 +++
include/linux/micrel_phy.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drive
From: Woojung Huh
Adding support for the Microchip KSZ switch family tail tagging.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
include/net/dsa.h | 1 +
net/dsa/Kconfig| 3 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/d
From: Woojung Huh
A sample SPI configuration for Microchip KSZ switches.
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Signed-off-by: Woojung Huh
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 72 +++
1 file changed, 72 insertions(+)
create mode 100644
From: Woojung Huh
The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch
with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs.
The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII
or RMII. Either of these may connect directly to a ho
From: Woojung Huh
This series of patches is for Microchip KSZ9477 DSA driver.
KSZ9477 is 7 ports GigE switch with numerous advanced features.
5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have
Interfaces to SGMII, RGMII, MII or RMII.
This patch supports VLAN, MDB, FDB and port mirroring
Hi Andrew,
> > +static int ksz_port_mdb_del(struct dsa_switch *ds, int port,
> > + const struct switchdev_obj_port_mdb *mdb)
> > +{
> > + struct ksz_device *dev = ds->priv;
> > + u32 static_table[4];
> > + u32 data;
> > + int index;
> > + int ret = 0;
> > + u32 mac
From: Woojung Huh
The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch
with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs.
The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII
or RMII. Either of these may connect directly to a ho
From: Woojung Huh
Adding maintainer of Microchip KSZ switches.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 42378cf..0fcb5e75 100644
--- a/MAIN
From: Woojung Huh
A sample SPI configuration for Microchip KSZ switches.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 72 +++
1 file changed, 72 insertions(+)
create mode 100644
From: Woojung Huh
Adding Microchip 9477 Phy included in KSZ9477 Switch.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/phy/micrel.c | 11 +++
include/linux/micrel_phy.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drive
From: Woojung Huh
Adding support for the Microchip KSZ switch family tail tagging.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
include/net/dsa.h | 1 +
net/dsa/Kconfig| 3 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/d
From: Woojung Huh
This series of patches is for Microchip KSZ9477 DSA driver.
KSZ9477 is 7 ports GigE switch with numerous advanced features.
5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have
Interfaces to SGMII, RGMII, MII or RMII.
This patch supports VLAN, MDB, FDB and port mirroring
> @@ -960,6 +960,15 @@ int phy_attach_direct(struct net_device *dev, struct
> phy_device *phydev,
>
> phydev->attached_dev = dev;
> dev->phydev = phydev;
> + err = sysfs_create_link(&phydev->mdio.dev.kobj, &dev->dev.kobj,
> + "attached_dev");
> + if
Hi Florian,
> > I knew that it is applied to net-next.
> > However, sysfs_create_link() fails when fixed phy
> (drivers/net/phy/fixed_phy.c)
> > Do you have a chance to test with it?
>
> I did, my main test system (BCM7445 w/ bcm_sf2) has one normal PHY
> driver and 3 fixed PHYs (including one fo
> OK, I am confused now. You are describing what is going on with your
> platform right? Can you describe a bit further here what is happening
> and with which type of interface? Is this with the CPU interface or
> something?
Yes. It's on our platform.
Like your platform, fixed phy is used to conn
Hi Florian,
> OK, so here is what is happening: macb_mii_init() calls macb_mii_probe()
> and so by the time we call phy_connect_direct(), we have not called
> register_netdevice() yet, netdev_register_kobject() has not been called
> either, and so sysfs_create_link() fails
I just found same t
Hi Florian,
> >> OK, so here is what is happening: macb_mii_init() calls macb_mii_probe()
> >> and so by the time we call phy_connect_direct(), we have not called
> >> register_netdevice() yet, netdev_register_kobject() has not been called
> >> either, and so sysfs_create_link() fails
> > I jus
>
> Yes, that's a very valid point, how about we even do this:
>
> diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
> index f84414b8f2ee..dc666ec13651 100644
> --- a/drivers/net/phy/phy_device.c
> +++ b/drivers/net/phy/phy_device.c
> @@ -960,15 +960,21 @@ int phy_attach_di
> > > > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32
> *vlan_table)
> > > > +{
> > > > + struct ksz_device *dev = ds->priv;
> > > > + u8 data;
> > > > + int timeout = 1000;
> > > > +
> > > > + ksz_write16(dev, REG_SW_VLAN_ENTRY_INDEX__2, vid &
> > > VLAN_IN
Hi Andres,
> > +static struct {
> > + int index;
> > + char string[ETH_GSTRING_LEN];
>
> Hi Woojung
>
> Since you need to respin for the skb_put_padto(), please make this
> const.
OK.
> > +static int get_vlan_table(struct dsa_switch *ds, u16 vid, u32 *vlan_table)
> > +{
> > + struct ksz_d
> > Signed-off-by: Woojung Huh
> > Signed-off-by: Andrew Lunn
>
> Signed-off-by? I didn't contribute any code. It probably should be
>
> Reviewed-by: Andrew Lunn
Andrew,
Your reply on 5/13 was with "Signed-off" :)
Will change to "Reviewed-by" in next patch.
Woojung
>> + if (padlen) {
>> + u8 *pad = skb_put(nskb, padlen);
>> +
>> + memset(pad, 0, padlen);
>> + }
>
>Can you use skb_put_padto() here instead of open coding this?
>
>> +
>> + tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
>> + tag[0] = 0;
>> + tag[1] = 1 << p-
From: Woojung Huh
Adding maintainer of Microchip KSZ switches.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
---
MAINTAINERS | 10 ++
1 file changed, 10 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index f7d568b..a72b40c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -84
From: Woojung Huh
A sample SPI configuration for Microchip KSZ switches.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 73 +++
1 file changed, 73 insertions(+)
create mode 100644 Documentation/devicetree/bindin
From: Woojung Huh
Adding Microchip 9477 Phy included in KSZ9477 Switch.
Signed-off-by: Woojung Huh
Signed-off-by: Andrew Lunn
---
drivers/net/phy/micrel.c | 11 +++
include/linux/micrel_phy.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers
From: Woojung Huh
This series of patches is for Microchip KSZ9477 DSA driver.
KSZ9477 is 7 ports GigE switch with numerous advanced features.
5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have
Interfaces to SGMII, RGMII, MII or RMII.
This patch supports VLAN, MDB, FDB and port mirroring
From: Woojung Huh
Adding support for the Microchip KSZ switch family tail tagging.
Signed-off-by: Woojung Huh
Reviewed-by: Andrew Lunn
---
include/net/dsa.h | 1 +
net/dsa/Kconfig| 3 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/dsa_priv.h | 3 ++
net/dsa/tag
From: Woojung Huh
The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch
with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs.
The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII
or RMII. Either of these may connect directly to a ho
> > +static const struct ksz_chip_data ksz_switch_chips[] = {
> > + {
> > + .chip_id = 0x00947700,
> > + .dev_name = "KSZ9477",
> > + .num_vlans = 4096,
> > + .num_alus = 4096,
> > + .num_statics = 16,
> > + .enabled_ports = 0x1F, /* po
> >> + dev->vlan_cache = devm_kmalloc_array(dev->dev,
> >> + sizeof(struct vlan_table),
> >> + dev->num_vlans, GFP_KERNEL);
> >
> > You should check, but i think devm_kmalloc_array sets the allocated
> > memory to 0.
>
>
From: Woojung Huh
Adding maintainer of Microchip KSZ switches.
Signed-off-by: Woojung Huh
---
MAINTAINERS | 9 +
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 45b173a..e65e501 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8370,6 +8370,15 @@ F: dri
From: Woojung Huh
A sample SPI configuration for Microchip KSZ switches.
Signed-off-by: Woojung Huh
---
Documentation/devicetree/bindings/net/dsa/ksz.txt | 73 +++
1 file changed, 73 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/dsa/ksz.txt
diff -
From: Woojung Huh
Adding support for the Microchip KSZ switch family tail tagging.
Signed-off-by: Woojung Huh
---
include/net/dsa.h | 1 +
net/dsa/Kconfig| 3 ++
net/dsa/Makefile | 1 +
net/dsa/dsa.c | 3 ++
net/dsa/dsa_priv.h | 3 ++
net/dsa/tag_ksz.c | 103
From: Woojung Huh
Adding Microchip 9477 Phy included in KSZ9477 Switch.
Signed-off-by: Woojung Huh
---
drivers/net/phy/micrel.c | 11 +++
include/linux/micrel_phy.h | 2 ++
2 files changed, 13 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 6a5f
From: Woojung Huh
This series of patches is for Microchip KSZ9477 DSA driver.
KSZ9477 is 7 ports GigE switch with numerous advanced features.
5 ports are 10/100/1000 Mbps internal PHYs and 2 ports have
Interfaces to SGMII, RGMII, MII or RMII.
This patch supports VLAN, MDB, FDB and port mirroring
From: Woojung Huh
The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch
with numerous advanced features. 5 ports incorporate 10/100/1000 Mbps PHYs.
The other 2 ports have interfaces that can be configured as SGMII, RGMII, MII
or RMII. Either of these may connect directly to a ho
Hi Florian,
> > The KSZ9477 is a fully integrated layer 2, managed, 7 ports GigE switch
> > with numerous advanced features. 5 ports incorporate
> > 10/100/1000 Mbps PHYs. The other 2 ports have interfaces that can be
> > configured as SGMII, RGMII, MII or RMII.
> > Either of these may connect dir
> > >> +}, {
> > >> + .phy_id = PHY_ID_KSZ9477,
> > >> + .phy_id_mask= MICREL_PHY_ID_MASK,
> > >> + .name = "Microchip KSZ9477",
> > >> + .features = PHY_GBIT_FEATURES,
> > >> + .flags = PHY_HAS_MAGICANEG,
> > >
> > >Is this magic still used
1 - 100 of 243 matches
Mail list logo