Re: [PATCH 4/4] RFC: net: dsa: realtek-smi: Add Realtek SMI driver

2017-11-06 Thread Linus Walleij
using it so it's not a one-off. This Realtek is a RTK-specific thing plus I don't think they are doing it anymore. It's very confusing since they are using the MDIO electrical specification and signal names but a totally different custom SMI wire protocol on top. Yours, Linus Walleij

Re: [PATCH 4/4] RFC: net: dsa: realtek-smi: Add Realtek SMI driver

2017-11-10 Thread Linus Walleij
SA device present an irqchip that the PHY can pick an IRQ from and it works like a charm. Yours, Linus Walleij

[PATCH] net: ethernet: ixp4xx: Set the DMA masks explicitly

2021-04-18 Thread Linus Walleij
: e45d0fad4a5f ("net: ethernet: ixp4xx: Use parent dev for DMA pool") Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_e

[PATCH 1/3] net: ethernet: ixp4xx: Add DT bindings

2021-04-19 Thread Linus Walleij
This adds device tree bindings for the IXP4xx ethernet controller with optional MDIO bridge. Cc: Zoltan HERPAI Cc: Raylynn Knight Cc: devicet...@vger.kernel.org Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Add schema for the (optional) embedded MDIO bus inside the ethernet control

[PATCH 2/3] net: ethernet: ixp4xx: Support device tree probing

2021-04-19 Thread Linus Walleij
device. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Do not rely on earlier attempt for identifying which ports to use: we split the support clearly in a DT way and a playform data way. - Isolate the DT code better. --- drivers/net/ethernet/xsc

[PATCH 3/3] net: ethernet: ixp4xx: Use OF MDIO bus registration

2021-04-19 Thread Linus Walleij
This augments the IXP4xx to use the OF MDIO bus code when registering the MDIO bus and when looking up the PHY for the ethernet network device. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - New patch making use of more OF infrastructure. --- driv

Re: [PATCH 3/3] net: ethernet: ixp4xx: Use OF MDIO bus registration

2021-04-19 Thread Linus Walleij
On Tue, Apr 20, 2021 at 12:51 AM Linus Walleij wrote: > This augments the IXP4xx to use the OF MDIO bus code when > registering the MDIO bus and when looking up the PHY > for the ethernet network device. > > Cc: Zoltan HERPAI > Cc: Raylynn Knight > Signed-

Re: [PATCH 2/3] net: ethernet: ixp4xx: Support device tree probing

2021-04-20 Thread Linus Walleij
imitations of the current platform data limit you from implementing > this correctly. In patch 3/3 I migrate to of_phy_get_and_connect() which I assume fixes this, I just wanted to split up the work, but do you prefer that I simply squash patches 2 & 3 into one? Yours, Linus Walleij

Re: [PATCH 3/3] net: ethernet: ixp4xx: Use OF MDIO bus registration

2021-04-20 Thread Linus Walleij
hy_connect_direct() might be better. Do you mean for the legacy code path (else clause), or the new code path with of_phy_get_and_connect() or both? I tried not to change the legacy code in order to not introduce regressions, so if I change that I suppose it should be a separate patch. On the other hand this driver has not been much maintained the recent years so we might need to be a bit rough when bringing it into shape. (After migrating all of IXP4xx to device tree a lot of the legacy code will eventually be deleted.) Yours, Linus Walleij

Re: [PATCH net-next 1/2] dt-bindings: net: dsa: add MT7530 GPIO controller binding

2021-01-18 Thread Linus Walleij
On Mon, Jan 11, 2021 at 6:46 AM DENG Qingfang wrote: > Add device tree binding to support MT7530 GPIO controller. > > Signed-off-by: DENG Qingfang This is a good way to turn it into a GPIO controller. Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH net-next 2/2] drivers: net: dsa: mt7530: MT7530 optional GPIO support

2021-01-18 Thread Linus Walleij
ecomes bits 0, 1, 2, 4, 5, 6, 8, 9, 10, 12 ... 18 What is the logic in this and is it what you intend? Please add a comment explaining what the offset is supposed to become for offsets 0..14 and why. > + gc->ngpio = 15; And it really IS 15 not 16? Not that I know network equipment very well... Yours, Linus Walleij

Re: [PATCH net-next 2/2] drivers: net: dsa: mt7530: MT7530 optional GPIO support

2021-01-22 Thread Linus Walleij
On Tue, Jan 19, 2021 at 4:20 AM DENG Qingfang wrote: > On Mon, Jan 18, 2021 at 10:55 PM Linus Walleij > wrote: > > > > So for offset 0..14 this becomes bits > > 0, 1, 2, 4, 5, 6, 8, 9, 10, 12 ... 18 > > > > What is the logic in this and is it what you inten

[PATCH] net: dsa: tag_rtl4_a: Support also egress tags

2021-02-16 Thread Linus Walleij
ang Fixes: efd7fe68f0c6 ("net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag") Signed-off-by: Linus Walleij --- net/dsa/tag_rtl4_a.c | 43 +-- 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/net/dsa/tag_rtl4_a.c b/net/dsa/tag_rtl4_a.

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-17 Thread Linus Walleij
On Wed, Feb 17, 2021 at 7:21 AM DENG Qingfang wrote: > Add support for Realtek RTL8366S switch tag > > Signed-off-by: DENG Qingfang I suppose this switch can just use the existing RTL4 A tag code after the recent patch so this one is not needed? Yours, Linus Walleij

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-17 Thread Linus Walleij
are at least four protocols out there using ethertype 0x8899. Yours, Linus Walleij

Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver

2021-02-17 Thread Linus Walleij
RT_4BIT(3) /* In userspace port 3 > */ > +#define RTL8366S_PORT_5BIT(4) /* In userspace port 4 > */ > +#define RTL8366S_PORT_CPU BIT(5) /* CPU port */ Same here. Overall the question about whether the switch is 5+1 or 7+1 is my big design remark. Maybe it is only 5+1 who knows... Yours, Linus Walleij

Re: [RFC net-next 2/2] net: dsa: add Realtek RTL8366S switch driver

2021-02-17 Thread Linus Walleij
driver, maybe it wasn't optimal. Maybe we can move some of the driver into the shared rtl8366.c file. Yours, Linus Walleij

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-02-27 Thread Linus Walleij
CONFIG_NET_DSA_TAG_RTL4_A) += tag_rtl4_a.o > +obj-$(CONFIG_NET_DSA_TAG_RTL8366S) += tag_rtl8366s.o So tag_rtl2_9.o etc. Yours, Linus Walleij

Re: [RFC net-next 1/2] net: dsa: add Realtek RTL8366S switch tag

2021-03-01 Thread Linus Walleij
On Sun, Feb 28, 2021 at 12:32 PM DENG Qingfang wrote: > On Sun, Feb 28, 2021 at 7:47 AM Linus Walleij > wrote: > > > > I names the previous protocol "RTL4 A" after a 4-byte tag > > with protocol indicted as "A", what about naming this > > "

[PATCH net 2/3] net: dsa: rtl4_a: Drop skb_cow_head()

2021-03-01 Thread Linus Walleij
The DSA core already provides the tag headroom, drop this. Fixes: 86dd9868b878 ("net: dsa: tag_rtl4_a: Support also egress tags") Reported-by: Andrew Lunn Reported-by: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- net/dsa/tag_rtl4_a.c | 2 -- 1 file changed, 2

[PATCH net 3/3] net: dsa: rtl4_a: Syntax fixes

2021-03-01 Thread Linus Walleij
Some errors spotted in the initial patch: use reverse christmas tree for nice code looks and fix a spelling mistake. Reported-by: Andrew Lunn Reported-by: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- net/dsa/tag_rtl4_a.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH net 1/3] net: dsa: rtl4_a: Pad using __skb_put_padto()

2021-03-01 Thread Linus Walleij
i Sandberg Signed-off-by: Linus Walleij --- net/dsa/tag_rtl4_a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dsa/tag_rtl4_a.c b/net/dsa/tag_rtl4_a.c index c17d39b4a1a0..804d756dd80a 100644 --- a/net/dsa/tag_rtl4_a.c +++ b/net/dsa/tag_rtl4_a.c @@ -40,7 +40,7 @@ static stru

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-01 Thread Linus Walleij
gt; - return ret; I suppose we can delete that confused VLAN set-up after this. > - ds->configure_vlan_while_not_filtering = false; This is default true not IIUC so we should be good! With my minor changes: Tested-by: Linus Walleij Yours, Linus Walleij

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-01 Thread Linus Walleij
) > +#define RTL8366RB_PORT_ISO_PORTS_MASK GENMASK(7, 1) BTW where did you find this register? It's not in any of my vendor driver code dumps. Curious! Yours, Linus Walleij

Re: [PATCH net] net: dsa: tag_rtl4_a: fix egress tags

2021-03-01 Thread Linus Walleij
; "number". > > Fixes: 86dd9868b878 ("net: dsa: tag_rtl4_a: Support also egress tags") > Signed-off-by: DENG Qingfang Ooops I send patches before properly going through the mailbox. Oh well things like that happen. David: ignore my patches to the same tagger and apply this instead! Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread Linus Walleij
On Tue, Mar 2, 2021 at 4:58 AM DENG Qingfang wrote: > On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij wrote: > > With my minor changes: > > Tested-by: Linus Walleij > > How about using a mutex lock in port_bridge_{join,leave} ? > In my opinion all functions that access mult

Re: [RFC net-next] net: dsa: rtl8366rb: support bridge offloading

2021-03-02 Thread Linus Walleij
On Tue, Mar 2, 2021 at 5:11 PM Vladimir Oltean wrote: > On Tue, Mar 02, 2021 at 05:05:00PM +0100, Linus Walleij wrote: > > On Tue, Mar 2, 2021 at 4:58 AM DENG Qingfang wrote: > > > On Mon, Mar 1, 2021 at 9:48 PM Linus Walleij > > > wrote: > > > > With my

[PATCH 00/10] IXP4xx networking cleanups

2019-10-20 Thread Linus Walleij
move platform_data definition Linus Walleij (6): net: ethernet: ixp4xx: Standard module init net: ethernet: ixp4xx: Use distinct local variable net: ehernet: ixp4xx: Use devm_alloc_etherdev() ARM/net: ixp4xx: Pass ethernet physical base as resource net: ethernet: ixp4xx: Get port ID from base ad

[PATCH 01/10] wan: ixp4xx_hss: fix compile-testing on 64-bit

2019-10-20 Thread Linus Walleij
dma_addr_t *handle); ^ Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- drivers/net/wan/ixp4xx_hss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wan/ixp4xx_hss.c b/drivers/net/wan/ixp4xx_hss.c in

[PATCH 02/10] wan: ixp4xx_hss: enable compile testing

2019-10-20 Thread Linus Walleij
From: Arnd Bergmann The ixp4xx_hss driver needs the platform data definition and the system clock rate to be compiled. Move both into a new platform_data header file and enable compile testing. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- arch/arm/mach-ixp4xx/goramo_mlr.c

[PATCH 05/10] net: ethernet: ixp4xx: Standard module init

2019-10-20 Thread Linus Walleij
MDIO bus is present on any of the registered interfaces we will eventually bail out. None of the platforms I've seen has e.g. MDIO on EthB and only uses EthC, there is always a Ethernet hardware on the NPE (B, C) that has the MDIO bus, we just might have to wait for it. Signed-off-by: Lin

[PATCH 06/10] net: ethernet: ixp4xx: Use distinct local variable

2019-10-20 Thread Linus Walleij
Use "ndev" for the struct net_device and "dev" for the struct device in probe() and remove(). Add the local "dev" pointer for later use in refactoring. Take this opportunity to fix inverse christmas tree coding style. Signed-off-by: Linus Walleij --- drivers/ne

[PATCH 04/10] ixp4xx_eth: move platform_data definition

2019-10-20 Thread Linus Walleij
From: Arnd Bergmann The platform data is needed to compile the driver as standalone, so move it to a global location along with similar files. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- arch/arm/mach-ixp4xx/include/mach/platform.h | 13 + .../xscale

[PATCH 03/10] ptp: ixp46x: move next to ethernet driver

2019-10-20 Thread Linus Walleij
other ptp drivers and allows compile-testing this driver on other targets. Signed-off-by: Arnd Bergmann Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/Kconfig| 14 ++ drivers/net/ethernet/xscale/Makefile | 3 ++- drivers/net/ethernet/xscale

[PATCH 10/10] net: ethernet: ixp4xx: Use parent dev for DMA pool

2019-10-20 Thread Linus Walleij
Use the netdevice struct device .parent field when calling dma_pool_create(): the .dma_coherent_mask and .dma_mask pertains to the bus device on the hardware (platform) bus in this case, not the struct device inside the network device. This makes the pool allocation work. Signed-off-by: Linus

[PATCH 09/10] net: ethernet: ixp4xx: Get port ID from base address

2019-10-20 Thread Linus Walleij
The port->id was picked from the platform device .id field, but this is not supposed to be used for passing around random numbers in hardware. Identify the port ID number from the base address instead. Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c |

[PATCH 07/10] net: ehernet: ixp4xx: Use devm_alloc_etherdev()

2019-10-20 Thread Linus Walleij
Using the devm_alloc_etherdev() function simplifies the error path. I also patch the message to use dev_info(). Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet

[PATCH 08/10] ARM/net: ixp4xx: Pass ethernet physical base as resource

2019-10-20 Thread Linus Walleij
mapped virtual address in the driver. Signed-off-by: Linus Walleij --- arch/arm/mach-ixp4xx/fsg-setup.c | 20 arch/arm/mach-ixp4xx/goramo_mlr.c| 20 arch/arm/mach-ixp4xx/ixdp425-setup.c | 20 arch/arm/mach-ixp4xx

Re: [patch 16/30] mfd: ab8500-debugfs: Remove the racy fiddling with irq_desc

2020-12-11 Thread Linus Walleij
ts. > > Signed-off-by: Thomas Gleixner > Cc: Linus Walleij > Cc: Lee Jones > Cc: linux-arm-ker...@lists.infradead.org Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [patch 15/30] pinctrl: nomadik: Use irq_has_action()

2020-12-11 Thread Linus Walleij
On Thu, Dec 10, 2020 at 8:42 PM Thomas Gleixner wrote: > Let the core code do the fiddling with irq_desc. > > Signed-off-by: Thomas Gleixner > Cc: Linus Walleij > Cc: linux-arm-ker...@lists.infradead.org > Cc: linux-g...@vger.kernel.org Reviewed-by: Linus Walleij I suppo

Re: [PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings

2019-06-18 Thread Linus Walleij
he NPE'}, {'description': 'index of the NPE engine RX queue to use', 'enum': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}]}]}]}] is not of type 'object', 'boolean' make[3]: *** [../Documentation/devicetree/bindings/Makefile:12: Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.example.dts] Error 1 Hm I just can't figure out what this recursive parsing thingie means... I tried to update the pip3 repo but no cigar. Any hints? Yours, Linus Walleij

Re: [PATCH V2] net: dsa: microchip: Use gpiod_set_value_cansleep()

2019-06-24 Thread Linus Walleij
d-off-by: Marek Vasut > Cc: Andrew Lunn > Cc: Florian Fainelli > Cc: Linus Walleij > Cc: Tristram Ha > Cc: Woojung Huh > Reviewed-by: Andrew Lunn > --- > V2: use _cansleep in .remove as well Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH v2 2/4] net: dsa: vsc73xx: Split vsc73xx driver

2019-07-04 Thread Linus Walleij
into two parts: core and spi. It is required > for add support to another managing interface. > > Tested-by: Linus Walleij > Signed-off-by: Pawel Dembicki That's a nice and clean split. Reviewed-by: Linus Walleij Yours, Linus Walleij

[net-next PATCH v3] net: dsa: rtl8366rb: Roof MTU for switch

2020-10-08 Thread Linus Walleij
RTL8366RB to use for the RTL8366RB-specific stuff. Other SMI switches does seem to have per-port MTU setting capabilities. Fixes: 5f4a8ef384db ("net: dsa: rtl8366rb: Support setting MTU") Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Fix the reverse-christmas-tree properly by a

[net-next PATCH v4] net: dsa: rtl8366rb: Roof MTU for switch

2020-10-08 Thread Linus Walleij
RTL8366RB to use for the RTL8366RB-specific stuff. Other SMI switches does seem to have per-port MTU setting capabilities. Fixes: 5f4a8ef384db ("net: dsa: rtl8366rb: Support setting MTU") Signed-off-by: Linus Walleij --- ChangeLog v3->v4: - Fix the missing kerneldoc. ChangeLog v2->v3: -

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

2020-10-15 Thread Linus Walleij
On Thu, Oct 8, 2020 at 5:46 PM Arnd Bergmann wrote: > With Arm EBSA110 gone, nothing uses it any more, so the corresponding > code and the Kconfig option can be removed. > > Signed-off-by: Arnd Bergmann Very nice cleanup. Reviewed-by: Linus Walleij At some point we should do

Re: [PATCH 3/3] timekeeping: remove arch_gettimeoffset

2020-10-15 Thread Linus Walleij
timer, true that. At one point I even read up on the details of it and then forgot them :/ Yours, Linus Walleij

Re: [net-next PATCH 1/5] net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag

2020-06-17 Thread Linus Walleij
hat the tag will be inserted, it is named "instag" right? But that is not how it works. That bit needs to be set to 0 to insert the tag and 1 to disable insertion of the tag. For this reason the patch also renames this bit to RTL8368RB_CPU_NO_TAG which is more to the point. Yours, Linus Walleij

[net-next PATCH 1/5 v2] net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag

2020-06-17 Thread Linus Walleij
configuration so this is a real improvement for users. Egress packets need to be restricted to the proper target ports using VLAN, which the RTL8366RB DSA switch driver already sets up. Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Drop some netdev_dbg() ca

[net-next PATCH 4/5 v2] net: dsa: rtl8366: VLAN 0 as disable tagging

2020-06-17 Thread Linus Walleij
online. Make sure that setting VLAN 0 has the same effect and does not try to actually tell the hardware to use VLAN 0 on the port because that will not work. Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebased on v5.8-rc1 and other changes. --- driv

[net-next PATCH 3/5 v2] net: dsa: rtl8366: Split out default VLAN config

2020-06-17 Thread Linus Walleij
We loop over the ports to initialize the default VLAN and PVID for each port. As we need to reuse the code to reinitialize a single port, break out the function rtl8366_set_default_vlan_and_pvid(). Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- ChangeLog v1->

[net-next PATCH 5/5 v2] net: dsa: rtl8366: Use top VLANs for default

2020-06-17 Thread Linus Walleij
so instead of using VLAN 1..6 as default use VLAN 10..15 so VLAN 1 thru VLAN 9 is available for users. Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Rebase on v5.8-rc1. --- drivers/net/dsa/rtl8366.c | 4 ++-- 1 file changed, 2 insertions(+)

[net-next PATCH 2/5 v2] net: dsa: rtl8366rb: Support the CPU DSA tag

2020-06-17 Thread Linus Walleij
RTL8366RB. Cc: DENG Qingfang Cc: Mauri Sandberg Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Update the commit message to explain why we are renaming bit 15 in RTL8368RB_CPU_CTRL_REG. --- drivers/net/dsa/Kconfig | 1 + drivers/net/dsa/rtl8366rb.c |

Re: [net-next PATCH 2/2 v2] net: dsa: rtl8366: Refactor VLAN/PVID init

2020-09-05 Thread Linus Walleij
On Tue, Sep 1, 2020 at 9:14 PM Florian Fainelli wrote: > On 9/1/2020 12:08 PM, Linus Walleij wrote: > [snip] > > > + /* Update the MC entry */ > > + vlanmc.member |= member; > > + vlanmc.untag |= untag; > > + vlanmc.fid = fid; > > Is no

[net-next PATCH] net: dsa: rtl8366: Properly clear member config

2020-09-05 Thread Linus Walleij
: Linus Walleij --- drivers/net/dsa/rtl8366.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index 2dcde7a91721..bd3c947976ce 100644 --- a/drivers/net/dsa/rtl8366.c +++ b/drivers/net/dsa/rtl8366.c

[net-next PATCH] net: gemini: Try to register phy before netdev

2020-09-05 Thread Linus Walleij
It's nice if the phy is online before we register the netdev so try to do that first. Reported-by: David Miller Signed-off-by: Linus Walleij --- drivers/net/ethernet/cortina/gemini.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/co

Re: [net-next PATCH] net: gemini: Try to register phy before netdev

2020-09-05 Thread Linus Walleij
> > I do wonder if more cleanup should be done while you are at it? OK I send a new more invasive version :) Thanks, Linus Walleij

[net-next PATCH v2] net: gemini: Clean up phy registration

2020-09-05 Thread Linus Walleij
added, in probe(). Suggested-by: Andrew Lunn Reported-by: David Miller Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Do a deeper clean-up and remove the confusion around how the phy is registered. --- drivers/net/ethernet/cortina/gemini.c | 32 +-- 1 file chan

[PATCH] net: dsa: rtl8366rb: Support setting MTU

2020-09-05 Thread Linus Walleij
This implements the missing MTU setting for the RTL8366RB switch. Apart from supporting jumboframes, this rids us of annoying boot messages like this: realtek-smi switch: nonfatal error -95 setting MTU on port 0 Signed-off-by: Linus Walleij --- drivers/net/dsa/rtl8366rb.c | 38

[net-next PATCH] net: dsa: rtl8366rb: Switch to phylink

2020-09-05 Thread Linus Walleij
moving dev_info() to dev_dbg(). Signed-off-by: Linus Walleij --- drivers/net/dsa/rtl8366rb.c | 42 ++--- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/rtl8366rb.c b/drivers/net/dsa/rtl8366rb.c index f763f93f600f..574e5e469966 100644

[PATCH v3] net: gemini: Clean up phy registration

2020-09-06 Thread Linus Walleij
added, in probe(). Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Reported-by: David Miller Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Fix a goto on the errorpath noticed by Jakub. ChangeLog v1->v2: - Do a deeper clean-up and remove the confusion around how the phy is reg

Re: [net-next PATCH] net: dsa: rtl8366: Properly clear member config

2020-09-06 Thread Linus Walleij
On Sun, Sep 6, 2020 at 7:41 PM Jakub Kicinski wrote: > On Sat, 5 Sep 2020 12:32:33 +0200 Linus Walleij wrote: > > When removing a port from a VLAN we are just erasing the > > member config for the VLAN, which is wrong: other ports > > can be using it. > > > > Jus

[PATCH v2] net: dsa: rtl8366rb: Switch to phylink

2020-09-06 Thread Linus Walleij
moving dev_info() to dev_dbg(). Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Fix the function declarations to be static. --- drivers/net/dsa/rtl8366rb.c | 44 +++-- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/rtl8366rb.

Re: [PATCH] dsa: vsc73xx: add support for vlan filtering

2021-01-24 Thread Linus Walleij
rating system like linux hogging into the CPU port and using it as a managed switch. :/ We currently have the 8051 processor in the switch disabled. Yours, Linus Walleij

Re: [PATCH net-next v2 2/2] net: dsa: mt7530: MT7530 optional GPIO support

2021-01-25 Thread Linus Walleij
On Mon, Jan 25, 2021 at 5:43 AM DENG Qingfang wrote: > MT7530's LED controller can drive up to 15 LED/GPIOs. > > Add support for GPIO control and allow users to use its GPIOs by > setting gpio-controller property in device tree. > > Signed-off-by: DENG Qingfang Rev

Re: [PATCH] dsa: vsc73xx: add support for vlan filtering

2021-01-25 Thread Linus Walleij
the packets make sure they can only reach the desired port. (+/- my half-assed knowledge of how VLAN actually works, one day I think I understand it, next day I don't understand it anymore) Yours, Linus Walleij

Re: [PATCH net-next v2 1/2] dt-bindings: net: dsa: add MT7530 GPIO controller binding

2021-01-26 Thread Linus Walleij
On Mon, Jan 25, 2021 at 5:43 AM DENG Qingfang wrote: > Add device tree binding to support MT7530 GPIO controller. > > Signed-off-by: DENG Qingfang Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-26 Thread Linus Walleij
ound out that they were all originally u16 matrixes. > > > > This commit standardizes the jam tables, turning them all into > > u16 matrixes. > > Why? What difference does it make? I think it's nice that the format is the same on all tables. Yours, Linus Walleij

Re: [PATCH 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-27 Thread Linus Walleij
ixes. > This change makes it easier to understand how the jam tables are used > and also makes it possible for a single function to handle all of them, > removing some duplicated code. > > Signed-off-by: Lorenzo Carletti Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH V2 1/1] net: dsa: rtl8366rb: standardize init jam tables

2021-01-27 Thread Linus Walleij
bl_entry arrays. Each entry contains 2 u16 values. > This change makes it easier to understand how the jam tables are used > and also makes it possible for a single function to handle all of them, > removing some duplicated code. > > Signed-off-by: Lorenzo Carletti Reviewed-by: Linus Walleij Yours, Linus Walleij

Re: [PATCH 1/8] drivers: net: dsa: realtek: fix warning same module names

2019-06-07 Thread Linus Walleij
is patch on net-next and submit it to David > Miller/netdev. > > It would also be nice to state the new name of the module in the > commit message. > > Linus, would you prefer this module is called rtl8366? Yes that should be unique enough! Anders: thanks for looking into this. I just always compiled all modules as y. Yours, Linus Walleij

[PATCH] net: dsa: rtl8366: Fix up VLAN filtering

2019-06-13 Thread Linus Walleij
: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Cc: sta...@vger.kernel.org Signed-off-by: Linus Walleij --- drivers/net/dsa/rtl8366.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/dsa/rtl8366.c b/drivers/net/dsa/rtl8366.c index 6d

Re: [PATCH 1/5] net: dsa: fix a leaked reference by adding a missing of_node_put

2019-02-22 Thread Linus Walleij
esponding object release within this function. > > Signed-off-by: Wen Yang > Cc: Linus Walleij > Cc: Andrew Lunn > Cc: Vivien Didelot > Cc: Florian Fainelli > Cc: "David S. Miller" > Cc: netdev@vger.kernel.org > Cc: linux-ker...@vger.kernel.org Acked-by: Linus Walleij Yours, Linus Walleij

[PATCH] net: phy: realtek: Dummy IRQ calls for RTL8366RB

2019-02-22 Thread Linus Walleij
nk DIR-685. Fixes: 0d2e778e38e0 ("net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt") Cc: Heiner Kallweit Signed-off-by: Linus Walleij --- drivers/net/phy/realtek.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/net/phy/rea

Re: [PATCH] net: phy: realtek: Dummy IRQ calls for RTL8366RB

2019-02-23 Thread Linus Walleij
On Sat, Feb 23, 2019 at 4:17 PM Andrew Lunn wrote: > On Sat, Feb 23, 2019 at 03:36:39AM +0100, Linus Walleij wrote: > > This fixes a regression introduced by > > commit 0d2e778e38e0ddffab4bb2b0e9ed2ad5165c4bf7 > > "net: phy: replace PHY_HAS_INTERRUPT with a che

[PATCH v2] net: phy: realtek: Dummy IRQ calls for RTL8366RB

2019-02-23 Thread Linus Walleij
366RB on D-Link DIR-685. Fixes: 0d2e778e38e0 ("net: phy: replace PHY_HAS_INTERRUPT with a check for config_intr and ack_interrupt") Cc: Heiner Kallweit Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Define generic inline helpers for genphy_no_ack_interrupt and genphy_no_conf

Re: [PATCH] net: phy: realtek: Dummy IRQ calls for RTL8366RB

2019-02-23 Thread Linus Walleij
fine in this case. > > However, in general, i don't think dummy functions will work for a PHY > driver, and may lead to interrupt storms. So it might be better to > have them in the driver, not the core, with comments about why they > are safe. OK shall I just send a v3 moving them back to the driver so we avoid confusion on which version should be applied? Yours, Linus Walleij

Re: [PATCH 3/3] net: dsa: Add Vitesse VSC73xx DSA router driver

2019-03-04 Thread Linus Walleij
ting VLANs are stored. I guess in the kernel so DSA_TAG_PROTO_VLAN would register these VLANs properly and userspace would be able to see them using "ip link show" as eth0.1, eth0.2, eth0.3 etc (the CPU port is == eth0). I have an experimental patch where I use VLAN 0 as "filtering off" VLAN, so that I can make a port member of VLAN 0 and set pvid accordingly to emulate "VLAN disabled", as there is no way to actually disable VLAN filtering on this switch. I didn't submit this patch because I'm not sure it is a good idea. Yours, Linus Walleij

Re: [PATCH 3/3] net: dsa: Add Vitesse VSC73xx DSA router driver

2019-03-04 Thread Linus Walleij
e that neither vitesse-vsc73xx nor rtl8366 do implement the bridge > membership callbacks, and as I don't happen to know nearly enough about DSA, I > wonder at what moment in time does forwarding get activated between ports. I think I should seriously look at other DSA drivers implementing this because I think that is what I really want to achieve here. Yours, Linus Walleij

[PATCH 0/8] Xscale IXP4xx ethernet refurbishing

2019-05-24 Thread Linus Walleij
We are switching the IXP4xx architecture to use device tree so this patch set makes is possible to probe the ethernet from the device tree. We will delete the non-devicetree code path once all peripherals are working with device tree and all boards are converted over. Linus Walleij (8): net

[PATCH 6/8] net: ethernet: ixp4xx: Use parent dev for DMA pool

2019-05-24 Thread Linus Walleij
Use the netdevice struct device .parent field when calling dma_pool_create(): the .dma_coherent_mask and .dma_mask pertains to the bus device on the hardware (platform) bus in this case, not the struct device inside the network device. This makes the pool allocation work. Signed-off-by: Linus

[PATCH 8/8] net: ethernet: ixp4xx: Support device tree probing

2019-05-24 Thread Linus Walleij
This adds device tree probing to the IXP4xx ethernet driver. We need to drop the memory region request as part of this since the OF core will request the memory for the device. Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 80 +++- 1 file

[PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings

2019-05-24 Thread Linus Walleij
This adds device tree bindings for the IXP4xx ethernet. Signed-off-by: Linus Walleij --- .../bindings/net/intel,ixp4xx-ethernet.yaml | 53 +++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml diff --git a

[PATCH 4/8] ARM/net: ixp4xx: Pass ethernet physical base as resource

2019-05-24 Thread Linus Walleij
mapped virtual address in the driver. Signed-off-by: Linus Walleij --- arch/arm/mach-ixp4xx/fsg-setup.c | 20 arch/arm/mach-ixp4xx/goramo_mlr.c| 20 arch/arm/mach-ixp4xx/ixdp425-setup.c | 20 arch/arm/mach-ixp4xx

[PATCH 5/8] net: ethernet: ixp4xx: Get port ID from base address

2019-05-24 Thread Linus Walleij
The port->id was picked from the platform device .id field, but this is not supposed to be used for passing around random numbers in hardware. Identify the port ID number from the base address instead. Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c |

[PATCH 2/8] net: ethernet: ixp4xx: Use distinct local variable

2019-05-24 Thread Linus Walleij
Use "ndev" for the struct net_device and "dev" for the struct device in probe() and remove(). Add the local "dev" pointer for later use in refactoring. Take this opportunity to fix inverse christmas tree coding style. Signed-off-by: Linus Walleij --- drivers/ne

[PATCH 1/8] net: ethernet: ixp4xx: Standard module init

2019-05-24 Thread Linus Walleij
MDIO bus is present on any of the registered interfaces we will eventually bail out. None of the platforms I've seen has e.g. MDIO on EthB and only uses EthC, there is always a Ethernet hardware on the NPE (B, C) that has the MDIO bus, we just might have to wait for it. Signed-off-by: Lin

[PATCH 3/8] net: ehernet: ixp4xx: Use devm_alloc_etherdev()

2019-05-24 Thread Linus Walleij
Using the devm_alloc_etherdev() function simplifies the error path. I also patch the message to use dev_info(). Signed-off-by: Linus Walleij --- drivers/net/ethernet/xscale/ixp4xx_eth.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet

[PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings

2019-05-24 Thread Linus Walleij
This adds device tree bindings for the IXP4xx ethernet. Signed-off-by: Linus Walleij --- .../bindings/net/intel,ixp4xx-ethernet.yaml | 53 +++ 1 file changed, 53 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/intel,ixp4xx-ethernet.yaml diff --git a

Re: [PATCH 1/8] net: ethernet: ixp4xx: Standard module init

2019-05-29 Thread Linus Walleij
DIO in particular is just talking to some mailbox on the NPE. The ethernet has dedicated registers but appear as dependent on the NPE. Only NPE B (second) has MDIO. I guess I should try to make the MDIO a child of the NPE. I try to improve the legacy code little by little. Yours, Linus Walleij

Re: [PATCH 7/8] net: ethernet: ixp4xx: Add DT bindings

2019-05-29 Thread Linus Walleij
ssing engine) node, that is where it actually is implemented. It coincides with having to rewrite the code in Linux to split that off into its own device as you pointed out on patch 1, hm a bit of work ahead here... Yours, Linus Walleij

[PATCH v2] net: phy: fixed-phy: Drop GPIO from fixed_phy_add()

2019-02-04 Thread Linus Walleij
o.c as the fixed phy code anyways requires OF to be in use. Tested-by: Andrew Lunn Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Collected Andrew's Tested-by - Drop and reword some comments. - Fix an instance of missing reverse christmas tree. - Add a newline in fixed_phy_add() ---

[PATCH] net: dsa: microchip: Drop unused GPIO includes

2019-01-03 Thread Linus Walleij
This driver does not use the old GPIO includes so drop them. Signed-off-by: Linus Walleij --- drivers/net/dsa/microchip/ksz_common.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 3b12e2dcff31

[PATCH] net: dsa: mt7530: Drop unused GPIO include

2019-01-03 Thread Linus Walleij
This driver uses GPIO descriptors only, is not used so drop the include. Signed-off-by: Linus Walleij --- drivers/net/dsa/mt7530.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 74547f43b938..a8a2c728afba 100644 --- a/drivers/net

[PATCH] net: phy: fixed-phy: Drop GPIO from fixed_phy_add()

2019-01-14 Thread Linus Walleij
o.c as the fixed phy code anyways requires OF to be in use. Signed-off-by: Linus Walleij --- Possibly more of of_mdio.c should be moved over to drivers/net/ but I can't see clearly where. It doesn't really belong in drivers/of IMO. of_phy_register_fixed_link() really feels like it is in

Re: [PATCH] IrDA: smcinit merged into smsc-ircc driver

2006-04-10 Thread Linus Walleij
On Tue, 11 Apr 2006, Meelis Roos wrote: Detected unconfigured Toshiba Satellite 1800 SMSC IrDA chip, pre-configuring device. SORRY: Toshiba Satellite 1800 has an unsupported bridge controller (ALi): not pre-configured. smsc-ircc2, Preconfiguration failed ! Yep we don't have support for ALi b

[net-next PATCH 1/2 v2] net: dsa: rtl8366: Fix VLAN semantics

2020-07-26 Thread Linus Walleij
ENG Qingfang Cc: Mauri Sandberg Reviewed-by: Florian Fainelli Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij --- ChangeLog v1->v2: - Collect Florian's Review-tag --- drivers/net/dsa/rtl8366.c | 21 +---

[net-next PATCH 2/2 v2] net: dsa: rtl8366: Fix VLAN set-up

2020-07-26 Thread Linus Walleij
port number instead of the VID, assuming a 1-to-1 correspondence between ports and VIDs. This was also a bug. Cc: DENG Qingfang Cc: Mauri Sandberg Reviewed-by: Florian Fainelli Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij --- Ch

[net-next PATCH 0/2 v2] RTL8366 VLAN callback fixes

2020-07-26 Thread Linus Walleij
While we are pondering how to make the core set up the VLANs the right way, let's merge the uncontroversial fixes. Linus Walleij (2): net: dsa: rtl8366: Fix VLAN semantics net: dsa: rtl8366: Fix VLAN set-up drivers/net/dsa/rtl8366.c | 35 --- 1 file ch

Re: [RFC PATCH net-next 3/9] net: switchdev: remove the transaction structure from port attributes

2020-12-27 Thread Linus Walleij
t; could not, so a shim was introduced and this was left for a further > commit. > > Signed-off-by: Vladimir Oltean For RTL8366RB it seems to do what the commit text says so: Reviewed-by: Linus Walleij Yours, Linus Walleij

<    1   2   3   >