RE: [PATCH net-next] net: usb: lan78xx: remove unused including

2021-03-25 Thread Woojung.Huh
> 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

RE: [PATCH net-next] net: usb: lan78xx: remove unused including

2021-03-25 Thread Woojung.Huh
> 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

RE: [PATCH net-next 0/8] net: dsa: microchip: DSA driver support for LAN937x switch

2021-02-01 Thread Woojung.Huh
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

RE: net: micrel: confusion about phyids used in driver

2019-08-21 Thread Woojung.Huh
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

RE: lan78xx: WARNING: irq 79 handler enabled interrupts

2019-01-02 Thread Woojung.Huh
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

RE: lan78xx: WARNING: irq 79 handler enabled interrupts

2018-12-29 Thread Woojung.Huh
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

RE: [PATCH v1 net-next] net: dsa: microchip: add KSZ9477 I2C driver

2018-12-19 Thread Woojung.Huh
> > 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

RE: [PATCH v1 net-next] net: dsa: microchip: add KSZ9477 I2C driver

2018-12-18 Thread Woojung.Huh
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)

RE: [PATCH net-next] MAINTAINERS: Add a maintainer for Microsemi switches

2018-12-18 Thread Woojung.Huh
> -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

RE: [PATCH RFC net-next] net: dsa: microchip: add KSZ9477 I2C driver

2018-12-17 Thread Woojung.Huh
Tristram, > +++ b/drivers/net/dsa/microchip/ksz9477_i2c.c .. > +MODULE_AUTHOR("Woojung Huh "); Believe this should be your name. Thanks. Woojung

RE: [RFC PATCH ethtool v2 00/23] ethtool netlink interface (userspace side) (WiP)

2018-11-08 Thread Woojung.Huh
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

RE: TJA1100 100Base-T1 PHY features via ethtool?

2018-08-16 Thread Woojung.Huh
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

RE: [RFC net-next 4/5] net: phy: Add support for IEEE standard test modes

2018-05-06 Thread Woojung.Huh
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

RE: [RFC net-next 4/5] net: phy: Add support for IEEE standard test modes

2018-05-01 Thread Woojung.Huh
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_

RE: [RFC net-next 4/5] net: phy: Add support for IEEE standard test modes

2018-05-01 Thread Woojung.Huh
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) > + *

RE: smsc95xx: aligment issues

2018-04-30 Thread Woojung.Huh
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:

RE: [PATCH 3/4] lan78xx: Read LED modes from Device Tree

2018-04-12 Thread Woojung.Huh
> > @@ -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", > > +

RE: [PATCH] lan78xx: Connect phy early

2018-03-14 Thread Woojung.Huh
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 ;

RE: [PATCH] lan78xx: Use common error handling code in lan78xx_phy_init()

2017-10-30 Thread Woojung.Huh
> 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

RE: [PATCH net-next 2/2] net: dsa: lan9303: Learn addresses on CPU port when bridged

2017-10-25 Thread Woojung.Huh
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

RE: [PATCH net-next 2/2] net: dsa: lan9303: Learn addresses on CPU port when bridged

2017-10-24 Thread Woojung.Huh
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

RE: [PATCH net] net: dsa: mv88e6060: fix switch MAC address

2017-10-13 Thread Woojung.Huh
> -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

RE: [PATCH net-next v2 2/4] net: dsa: mv88e6060: setup random mac address

2017-10-13 Thread Woojung.Huh
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

RE: [PATCH net-next v2 2/4] net: dsa: mv88e6060: setup random mac address

2017-10-13 Thread Woojung.Huh
> 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 +++

RE: [PATCH v2 net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging

2017-10-11 Thread Woojung.Huh
> @@ -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", >

RE: [PATCH v5 1/2] net: phy: DP83822 initial driver submission

2017-10-10 Thread Woojung.Huh
> +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 <

RE: [PATCH v2 net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging

2017-10-10 Thread Woojung.Huh
> > 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.

RE: [PATCH v2 net-next 1/2] net: dsa: lan9303: Move tag setup to new lan9303_setup_tagging

2017-10-10 Thread Woojung.Huh
> +/* 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

RE: [PATCH v1 RFC 1/7] Replace license with GPL

2017-10-09 Thread Woojung.Huh
> 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

RE: [PATCH v3 2/3] net: phy: DP83822 initial driver submission

2017-10-09 Thread 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

RE: [PATCH 2/3 v2] net: phy: DP83822 initial driver submission

2017-10-05 Thread Woojung.Huh
> > > +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

RE: [PATCH 2/3 v2] net: phy: DP83822 initial driver submission

2017-10-04 Thread Woojung.Huh
> +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

RE: [PATCH] net: phy: DP83822 initial driver submission

2017-10-03 Thread Woojung.Huh
> +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)

RE: [PATCH v2 net 2/3] lan78xx: Allow EEPROM write for less than MAX_EEPROM_SIZE

2017-09-11 Thread Woojung.Huh
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 &&

RE: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check

2017-09-08 Thread Woojung.Huh
> >> 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

RE: [PATCH RFC 3/5] Add KSZ8795 switch driver

2017-09-08 Thread Woojung.Huh
> > > > @@ -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

RE: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check

2017-09-07 Thread Woojung.Huh
> >>> 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

RE: [PATCH net-next] mdio_bus: Remove unneeded gpiod NULL check

2017-09-07 Thread Woojung.Huh
> 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

RE: [PATCH net 0/3] lan78xx: Fixes to lan78xx driver

2017-09-07 Thread Woojung.Huh
> > > > 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

RE: [PATCH net 0/3] lan78xx: Fixes to lan78xx driver

2017-09-07 Thread Woojung.Huh
> 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

RE: [PATCH v2 rfc 0/8] IGMP snooping for local traffic

2017-09-06 Thread Woojung.Huh
> 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

RE: [PATCH v2 rfc 0/8] IGMP snooping for local traffic

2017-09-06 Thread Woojung.Huh
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

RE: [PATCH] DSA support for Micrel KSZ8895

2017-08-27 Thread Woojung.Huh
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

RE: DSA support for Micrel KSZ8895

2017-08-23 Thread Woojung.Huh
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

RE: [PATCH net v2 1/2] net: core: Specify skb_pad()/skb_put_padto() SKB freeing

2017-08-23 Thread Woojung.Huh
> 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

RE: [PATCH net v2 2/2] net: dsa: skb_put_padto() already frees nskb

2017-08-23 Thread Woojung.Huh
> 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

RE: [PATCH net] net: dsa: skb_put_padto() already frees nskb

2017-08-22 Thread Woojung.Huh
> > 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

RE: [PATCH net] net: dsa: skb_put_padto() already frees nskb

2017-08-21 Thread Woojung.Huh
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

RE: DSA support for Micrel KSZ8895

2017-08-16 Thread Woojung.Huh
> > 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.

RE: [PATCH net-next 06/11] net: dsa: debugfs: add port registers

2017-08-15 Thread Woojung.Huh
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

RE: [PATCH net] net: dsa: ksz: fix skb freeing

2017-08-09 Thread Woojung.Huh
> 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

RE: [PATCH] smsc95xx: use ethtool_op_get_ts_info()

2017-07-13 Thread Woojung.Huh
> -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() > >

RE: [PATCH net-next] net: phy: smsc: Implement PHY statistics

2017-06-02 Thread Woojung.Huh
>> 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.

RE: [PATCH net-next] net: phy: smsc: Implement PHY statistics

2017-06-02 Thread Woojung.Huh
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, > > + /*

RE: [PATCH][net-next] net: dsa: make function ksz_rcv static

2017-06-01 Thread Woojung.Huh
> 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

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-31 Thread 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

[PATCH v5 net-next 5/5] dsa: add maintainer of Microchip KSZ switches

2017-05-31 Thread Woojung.Huh
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

[PATCH v5 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-31 Thread Woojung.Huh
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

[PATCH v5 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-31 Thread Woojung.Huh
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

[PATCH v5 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-31 Thread Woojung.Huh
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

RE: [PATCH v5 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-31 Thread Woojung.Huh
> 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

[PATCH v5 net-next 5/5] dsa: add maintainer of Microchip KSZ switches

2017-05-30 Thread Woojung.Huh
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

[PATCH v5 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-30 Thread Woojung.Huh
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

[PATCH v5 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-30 Thread Woojung.Huh
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

[PATCH v5 net-next 4/5] net: dsa: Add Microchip KSZ switches binding

2017-05-30 Thread Woojung.Huh
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

[PATCH v5 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread 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

[PATCH v5 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-30 Thread Woojung.Huh
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

RE: [PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread Woojung.Huh
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

[PATCH v4 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-30 Thread 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

[PATCH v4 net-next 5/5] dsa: add maintainer of Microchip KSZ switches

2017-05-30 Thread Woojung.Huh
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

[PATCH v4 net-next 4/5] net: dsa: Add Microchip KSZ switches binding

2017-05-30 Thread Woojung.Huh
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

[PATCH v4 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-30 Thread Woojung.Huh
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

[PATCH v4 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-30 Thread Woojung.Huh
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

[PATCH v4 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-30 Thread Woojung.Huh
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

RE: [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-26 Thread Woojung.Huh
> @@ -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

RE: [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-26 Thread Woojung.Huh
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

RE: [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-26 Thread Woojung.Huh
> 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

RE: [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-26 Thread Woojung.Huh
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

RE: [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-26 Thread Woojung.Huh
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

RE: [PATCH net-next 1/3] net: phy: Create sysfs reciprocal links for attached_dev/phydev

2017-05-26 Thread Woojung.Huh
> > 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

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
> > > > +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

RE: [PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-22 Thread Woojung.Huh
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

RE: [PATCH v3 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-22 Thread Woojung.Huh
> > 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

RE: [PATCH v3 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-19 Thread Woojung.Huh
>> + 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-

[PATCH v3 net-next 5/5] dsa: add maintainer of Microchip KSZ switches

2017-05-19 Thread Woojung.Huh
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

[PATCH v3 net-next 4/5] dsa: Add spi support to Microchip KSZ switches

2017-05-19 Thread Woojung.Huh
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

[PATCH v3 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-19 Thread Woojung.Huh
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

[PATCH v3 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-19 Thread Woojung.Huh
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

[PATCH v3 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-19 Thread Woojung.Huh
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

[PATCH v3 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-19 Thread 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

RE: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Woojung.Huh
> > +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

RE: [PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-15 Thread Woojung.Huh
> >> + 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. > >

[PATCH v2 net-next 5/5] dsa: add maintainer of Microchip KSZ switches

2017-05-12 Thread Woojung.Huh
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

[PATCH v2 net-next 4/5] dsa: Add spi support to Microchip KSZ switches

2017-05-12 Thread Woojung.Huh
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 -

[PATCH v2 net-next 1/5] dsa: add support for Microchip KSZ tail tagging

2017-05-12 Thread Woojung.Huh
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

[PATCH v2 net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-12 Thread Woojung.Huh
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

[PATCH v2 net-next 0/5] dsa: add Microchip KSZ9477 DSA driver

2017-05-12 Thread Woojung.Huh
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

[PATCH v2 net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-12 Thread 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

RE: [PATCH net-next 3/5] dsa: add DSA switch driver for Microchip KSZ9477

2017-05-08 Thread Woojung.Huh
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

RE: [PATCH net-next 2/5] phy: micrel: add Microchip KSZ 9477 Switch PHY support

2017-05-08 Thread Woojung.Huh
> > >> +}, { > > >> + .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   2   3   >