Re: [PATCH] net: ethernet: dec: tulip: Random spelling fixes throughout the file pnic2.c

2021-03-11 Thread Randy Dunlap
On 3/11/21 11:05 PM, Bhaskar Chowdhury wrote: > > Random spelling fixes throughout the file. > > Signed-off-by: Bhaskar Chowdhury > --- > drivers/net/ethernet/dec/tulip/pnic2.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/dri

[PATCH] net: ethernet: dec: tulip: Random spelling fixes throughout the file pnic2.c

2021-03-11 Thread Bhaskar Chowdhury
Random spelling fixes throughout the file. Signed-off-by: Bhaskar Chowdhury --- drivers/net/ethernet/dec/tulip/pnic2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/pnic2.c b/drivers/net/ethernet/dec/tulip/pnic2.c index

[RFC net-next 08/28] tulip: use ndo_siocdevprivate

2020-11-06 Thread Arnd Bergmann
From: Arnd Bergmann The tulip driver has a debugging method over ioctl built-in, but it does not actually check the command type, which may end up leading to random behavior when trying to run other ioctls on it. Change the driver to use ndo_siocdevprivate and limit the execution further to the

Re: [PATCH net-next v4] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-30 Thread Jakub Kicinski
On Wed, 28 Oct 2020 10:21:25 -0700 Moritz Fischer wrote: > The driver does not implement a shutdown handler which leads to issues > when using kexec in certain scenarios. The NIC keeps on fetching > descriptors which gets flagged by the IOMMU with errors like this: > > DMAR: DMAR:[DMA read] Reques

Re: [PATCH/RFC net-next v3] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-28 Thread Jakub Kicinski
On Tue, 27 Oct 2020 18:59:09 -0700 Moritz Fischer wrote: > Hi Jakub, > > On Tue, Oct 27, 2020 at 04:16:06PM -0700, Jakub Kicinski wrote: > > On Fri, 23 Oct 2020 13:28:34 -0700 Moritz Fischer wrote: > > > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > >

[PATCH net-next v4] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-28 Thread Moritz Fischer
rtnl_lock()/unlock() as suggested by Jakub and use dev_close() Changes from v2: - Changed to net-next - Removed extra whitespace Changes from v1: - Replace call to de_remove_one with de_shutdown() function as suggested by James. --- drivers/net/ethernet/dec/tulip/de2104x.c | 10 ++ 1

Re: [PATCH/RFC net-next v3] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-28 Thread Moritz Fischer
Hi Jakub, On Tue, Oct 27, 2020 at 04:16:06PM -0700, Jakub Kicinski wrote: > On Fri, 23 Oct 2020 13:28:34 -0700 Moritz Fischer wrote: > > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > > b/drivers/net/ethernet/dec/tulip/de2104x.c > > index d9f6c19940ef..ea7442cc

Re: [PATCH/RFC net-next v3] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-27 Thread Jakub Kicinski
On Fri, 23 Oct 2020 13:28:34 -0700 Moritz Fischer wrote: > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > b/drivers/net/ethernet/dec/tulip/de2104x.c > index d9f6c19940ef..ea7442cc8e75 100644 > --- a/drivers/net/ethernet/dec/tulip/de2104x.c > +++ b/drivers/net/ethernet/dec/

[PATCH/RFC net-next v3] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-23 Thread Moritz Fischer
g-fix but Jakub said it's a feature, so net-next it is. I don't have a strong preference either way. Changes from v2: - Changed to net-next - Removed extra whitespace Changes from v1: - Replace call to de_remove_one with de_shutdown() function as suggested by James. --- drivers/net/eth

Re: [PATCH/RFC net v2] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-23 Thread Jakub Kicinski
ong preference I'd rather apply this to net-next. In any case - you need to respin, 'cause this does not apply to net either :) > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > b/drivers/net/ethernet/dec/tulip/de2104x.c > index f1a2da15dd0a..6de0cd6cf4ca 100644 &

[PATCH/RFC net v2] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-22 Thread Moritz Fischer
call to de_remove_one with de_shutdown() function as suggested by James. --- drivers/net/ethernet/dec/tulip/de2104x.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index f1a2da15dd0a..6de0cd6cf4ca

Re: [PATCH/RFC net] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-22 Thread Moritz Fischer
this is the proper way for a shutdown handler, > > I've tried to look at a bunch of examples and couldn't find a > > specific > > solution, in my tests on hardware this works, though. > > > > Open to suggestions. > > > > Thanks, > > Mo

Re: [PATCH/RFC net] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-22 Thread James Bottomley
ution, in my tests on hardware this works, though. > > Open to suggestions. > > Thanks, > Moritz > > --- > drivers/net/ethernet/dec/tulip/de2104x.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c > b/drivers/ne

[PATCH/RFC net] net: dec: tulip: de2104x: Add shutdown handler to stop NIC

2020-10-22 Thread Moritz Fischer
re if this is the proper way for a shutdown handler, I've tried to look at a bunch of examples and couldn't find a specific solution, in my tests on hardware this works, though. Open to suggestions. Thanks, Moritz --- drivers/net/ethernet/dec/tulip/de2104x.c | 1 + 1 file changed, 1 ins

[PATCH 4.14 11/70] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-12 Thread Greg Kroah-Hartman
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH 4.9 07/54] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-12 Thread Greg Kroah-Hartman
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH 4.4 04/39] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-12 Thread Greg Kroah-Hartman
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH 4.19 15/38] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-05 Thread Greg Kroah-Hartman
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH 5.4 20/57] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-05 Thread Greg Kroah-Hartman
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH 5.8 32/85] net: dec: de2104x: Increase receive ring size for Tulip

2020-10-05 Thread Greg Kroah-Hartman
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH AUTOSEL 5.8 10/29] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-28 Thread Sasha Levin
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH AUTOSEL 4.19 03/11] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-28 Thread Sasha Levin
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH AUTOSEL 4.14 3/9] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-28 Thread Sasha Levin
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH AUTOSEL 4.9 1/5] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-28 Thread Sasha Levin
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH AUTOSEL 4.4 1/4] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-28 Thread Sasha Levin
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

[PATCH AUTOSEL 5.4 05/18] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-28 Thread Sasha Levin
reached [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/dec/tulip/de2104x.c

Re: [PATCH net-next v2 0/3] First bunch of Tulip cleanups

2020-09-15 Thread David Miller
From: Moritz Fischer Date: Mon, 14 Sep 2020 21:24:49 -0700 > This series is the first bunch of minor cleanups for the de2104x driver > to make it look and behave more like a modern driver. > > These changes replace some of the non-devres versions with devres > versions of functions to simplify t

[PATCH net-next v2 3/3] net: dec: tulip: de2104x: Replace kmemdup() with devm_kmempdup()

2020-09-14 Thread Moritz Fischer
Replace an instance of kmemdup() with the devres counted version instead. Signed-off-by: Moritz Fischer --- drivers/net/ethernet/dec/tulip/de2104x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec

[PATCH net-next v2 2/3] net: dec: tulip: de2104x: Replace pci_enable_device with devres version

2020-09-14 Thread Moritz Fischer
replace for resume function --- drivers/net/ethernet/dec/tulip/de2104x.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index 9bcfc82b71d1..698d79bc4784 100644 --- a/drivers/net

[PATCH net-next v2 1/3] net: dec: tulip: de2104x: Replace alloc_etherdev by devm_alloc_etherdev

2020-09-14 Thread Moritz Fischer
Replace devm_alloc_etherdev() with its devres version. Signed-off-by: Moritz Fischer --- drivers/net/ethernet/dec/tulip/de2104x.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index

[PATCH net-next v2 0/3] First bunch of Tulip cleanups

2020-09-14 Thread Moritz Fischer
from v1: - Fix issue with the pci_enable_device patch. Moritz Fischer (3): net: dec: tulip: de2104x: Replace alloc_etherdev by devm_alloc_etherdev net: dec: tulip: de2104x: Replace pci_enable_device with devres version net: dec: tulip: de2104x: Replace kmemdup() with devm_kmempdup

Re: [PATCH net-next 2/3] net: dec: tulip: de2104x: Replace pci_enable_device with devres version

2020-09-13 Thread Moritz Fischer
On Sun, Sep 13, 2020 at 05:10:01PM -0700, Moritz Fischer wrote: > Replace pci_enable_device() with its devres counterpart > pcim_enable_device(). > > Signed-off-by: Moritz Fischer > --- > drivers/net/ethernet/dec/tulip/de2104x.c | 7 ++- > 1 file changed, 2 inser

[PATCH net-next 1/3] net: dec: tulip: de2104x: Replace alloc_etherdev by devm_alloc_etherdev

2020-09-13 Thread Moritz Fischer
Replace devm_alloc_etherdev() with its devres version. Signed-off-by: Moritz Fischer --- drivers/net/ethernet/dec/tulip/de2104x.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index

[PATCH net-next 2/3] net: dec: tulip: de2104x: Replace pci_enable_device with devres version

2020-09-13 Thread Moritz Fischer
Replace pci_enable_device() with its devres counterpart pcim_enable_device(). Signed-off-by: Moritz Fischer --- drivers/net/ethernet/dec/tulip/de2104x.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet

[PATCH net-next 3/3] net: dec: tulip: de2104x: Replace kmemdup() with devm_kmempdup()

2020-09-13 Thread Moritz Fischer
Replace an instance of kmemdup() with the devres counted version instead. Signed-off-by: Moritz Fischer --- drivers/net/ethernet/dec/tulip/de2104x.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec

Re: [PATCH] tulip: switch from 'pci_' to 'dma_' API

2020-09-13 Thread David Miller
From: Christophe JAILLET Date: Sun, 13 Sep 2020 14:55:46 +0200 > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > W

Re: [PATCH] tulip: dmfe: switch from 'pci_' to 'dma_' API

2020-09-13 Thread David Miller
From: Christophe JAILLET Date: Sun, 13 Sep 2020 14:38:34 +0200 > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > W

Re: [PATCH] tulip: de2104x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread David Miller
From: Christophe JAILLET Date: Sun, 13 Sep 2020 14:44:53 +0200 > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > W

Re: [PATCH] tulip: uli526x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread David Miller
From: Christophe JAILLET Date: Sun, 13 Sep 2020 14:30:42 +0200 > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > W

Re: [PATCH] tulip: windbond-840: Fix a debug message

2020-09-13 Thread David Miller
From: Christophe JAILLET Date: Sun, 13 Sep 2020 09:01:07 +0200 > 'w89c840_open()' is incorrectly reported in a debug message. Use __func__ > instead. > > While at it, fix some style issue in the same function. > > Signed-off-by: Christophe JAILLET Applied.

Re: [PATCH] tulip: windbond-840: switch from 'pci_' to 'dma_' API

2020-09-13 Thread David Miller
From: Christophe JAILLET Date: Sun, 13 Sep 2020 08:57:11 +0200 > The wrappers in include/linux/pci-dma-compat.h should go away. > > The patch has been generated with the coccinelle script below and has been > hand modified to replace GFP_ with a correct flag. > It has been compile tested. > > W

Re: [PATCH] tulip: de2104x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Moritz Fischer
; > @@ > -pci_dma_mapping_error(e1, e2) > +dma_mapping_error(&e1->dev, e2) > > @@ > expression e1, e2; > @@ > -pci_set_dma_mask(e1, e2) > +dma_set_mask(&e1->dev, e2) > > @@ > expression e1, e2; > @@ > -pci_set_consistent_

[PATCH] tulip: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
p;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=15874567830

[PATCH] tulip: de2104x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 --- drivers/net/ethernet/dec/tulip/de2104x.c | 62 ++-- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/drivers/net/ethernet/

[PATCH] tulip: dmfe: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
>dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=1587456

[PATCH] tulip: uli526x: switch from 'pci_' to 'dma_' API

2020-09-13 Thread Christophe JAILLET
p;e1->dev, e2) @@ expression e1, e2; @@ -pci_set_consistent_dma_mask(e1, e2) +dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=1587456

[PATCH] tulip: windbond-840: Fix a debug message

2020-09-13 Thread Christophe JAILLET
'w89c840_open()' is incorrectly reported in a debug message. Use __func__ instead. While at it, fix some style issue in the same function. Signed-off-by: Christophe JAILLET --- drivers/net/ethernet/dec/tulip/winbond-840.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

[PATCH] tulip: windbond-840: switch from 'pci_' to 'dma_' API

2020-09-12 Thread Christophe JAILLET
ILLET --- If needed, see post from Christoph Hellwig on the kernel-janitors ML: https://marc.info/?l=kernel-janitors&m=158745678307186&w=4 --- drivers/net/ethernet/dec/tulip/winbond-840.c | 73 ++-- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/drivers/net/e

Re: [PATCH net] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-10 Thread David Miller
From: Lucy Yan Date: Thu, 10 Sep 2020 12:05:09 -0700 > Increase Rx ring size to address issue where hardware is reaching > the receive work limit. > > Before: > > [ 102.223342] de2104x :17:00.0 eth0: rx work limit reached > [ 102.245695] de2104x :17:00.0 eth0: rx work limit reached >

Re: [PATCH net] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-10 Thread Moritz Fischer
0 eth0: rx work limit reached > [ 102.251387] de2104x :17:00.0 eth0: rx work limit reached > [ 102.267444] de2104x :17:00.0 eth0: rx work limit reached > > Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer > --- > drivers/net/ethernet/dec/tulip/de2104x.c | 2 +- >

[PATCH net] net: dec: de2104x: Increase receive ring size for Tulip

2020-09-10 Thread Lucy Yan
[ 102.267444] de2104x :17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan --- drivers/net/ethernet/dec/tulip/de2104x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/dec/tulip/de2104x.c b/drivers/net/ethernet/dec/tulip/de2104x.c index

Re: [PATCH v1 0/5] ethernet: dec: tulip: use generic power management

2020-06-23 Thread David Miller
From: Vaibhav Gupta Date: Mon, 22 Jun 2020 17:12:23 +0530 > Linux Kernel Mentee: Remove Legacy Power Management. > > The purpose of this patch series is to remove legacy power management > callbacks and invocation of PCI helper functions, from tulip ethernet drivers. > &

[PATCH v1 5/5] tulip: uli526x: use generic power management

2020-06-22 Thread Vaibhav Gupta
ended. Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/net/ethernet/dec/tulip/uli526x.c | 48 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/uli526x.c b/drivers/net/ethernet/dec/tulip/uli526x.c index f726436

[PATCH v1 4/5] tulip: tulip_core: use generic power management

2020-06-22 Thread Vaibhav Gupta
ned-off-by: Vaibhav Gupta --- drivers/net/ethernet/dec/tulip/tulip_core.c | 51 + 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c index 15efc294f513..9db23527275a 100644 --- a/d

[PATCH v1 0/5] ethernet: dec: tulip: use generic power management

2020-06-22 Thread Vaibhav Gupta
Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks and invocation of PCI helper functions, from tulip ethernet drivers. With legacy PM, drivers themselves are responsible for handling the device's power states

[PATCH v1 2/5] tulip: windbond-840: use generic power management

2020-06-22 Thread Vaibhav Gupta
ernet/dec/tulip/winbond-840.c | 26 ++-- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/winbond-840.c b/drivers/net/ethernet/dec/tulip/winbond-840.c index 4d5e4fa53023..5dcc66f60144 100644 --- a/drivers/net/ethernet/dec/tulip/winbond-

[PATCH v1 1/5] tulip: dmfe: use generic power management

2020-06-22 Thread Vaibhav Gupta
iting configuration registers of a device is not recommended. Thus replace them all with device_wakeup_enable/disable(). Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/net/ethernet/dec/tulip/dmfe.c | 49 +-- 1 file changed, 9 insertions(+), 40 deletions(-)

[PATCH v1 3/5] tulip: de2104x: use generic power management

2020-06-22 Thread Vaibhav Gupta
ively to manage the device's power state. With generic PM, it is no longer needed. The driver is expected to just implement driver-specific operations and leave power transitions to PCI core. Compile-tested only. Signed-off-by: Vaibhav Gupta --- drivers/net/ethernet/dec/tulip/de21

Re: [PATCH net-next] net: tulip: de4x5: make PCI_signature() return void

2020-05-07 Thread David Miller
From: Jason Yan Date: Thu, 7 May 2020 19:08:47 +0800 > This function always return 0 now, we can make it return void to > simplify the code. This fixes the following coccicheck warning: > > drivers/net/ethernet/dec/tulip/de4x5.c:3908:11-17: Unneeded variable: > "status"

[PATCH net-next] net: tulip: de4x5: make PCI_signature() return void

2020-05-07 Thread Jason Yan
This function always return 0 now, we can make it return void to simplify the code. This fixes the following coccicheck warning: drivers/net/ethernet/dec/tulip/de4x5.c:3908:11-17: Unneeded variable: "status". Return "0" on line 3912 Signed-off-by: Jason Yan --- drivers/ne

Re: net: tulip: de2104x: Checking a kmemdup() call in de21041_get_srom_info()

2019-10-12 Thread Sven Schnelle
d call > of the function “kmemdup”. > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/dec/tulip/de2104x.c?id=1c0cc5f1ae5ee5a6913704c0d75a6e99604ee30a#n1940 > https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/net/ethernet/dec/tulip/de2104x.c#L19

net: tulip: de2104x: Checking a kmemdup() call in de21041_get_srom_info()

2019-10-12 Thread Markus Elfring
/linux.git/tree/drivers/net/ethernet/dec/tulip/de2104x.c?id=1c0cc5f1ae5ee5a6913704c0d75a6e99604ee30a#n1940 https://elixir.bootlin.com/linux/v5.4-rc2/source/drivers/net/ethernet/dec/tulip/de2104x.c#L1940 How do you think about to improve it? Regards, Markus

[PATCH 3.16 28/87] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-10-02 Thread Ben Hutchings
3.16.75-rc1 review patch. If anyone has any objections, please let me know. -- From: Kees Cook commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e upstream. Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1

[PATCH 5.1 58/98] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x

[PATCH 4.19 32/61] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x

[PATCH 4.14 23/45] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x

[PATCH 4.9 104/117] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x

[PATCH 4.4 74/84] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-20 Thread Greg Kroah-Hartman
[ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x

[PATCH AUTOSEL 4.14 14/31] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_

[PATCH AUTOSEL 4.9 08/20] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_

[PATCH AUTOSEL 4.4 06/13] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_

[PATCH AUTOSEL 4.19 19/49] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_

[PATCH AUTOSEL 5.1 32/70] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-06-08 Thread Sasha Levin
From: Kees Cook [ Upstream commit 3e66b7cc50ef921121babc91487e1fb98af1ba6e ] Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_

Re: [PATCH] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-05-26 Thread David Miller
From: Kees Cook Date: Fri, 24 May 2019 13:20:19 -0700 > Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): > > drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of > '__mod_eisa__de4x5_eisa_ids_device_table' > MODULE_DEVICE_T

[PATCH] net: tulip: de4x5: Drop redundant MODULE_DEVICE_TABLE()

2019-05-24 Thread Kees Cook
Building with Clang reports the redundant use of MODULE_DEVICE_TABLE(): drivers/net/ethernet/dec/tulip/de4x5.c:2110:1: error: redefinition of '__mod_eisa__de4x5_eisa_ids_device_table' MODULE_DEVICE_TABLE(eisa, de4x5_eisa_ids); ^ ./include/linux/module.h:229:21: note: expanded

Re: [PATCH net-next] tulip: eeprom: use struct_size() in kmalloc()

2019-02-01 Thread David Miller
From: "Gustavo A. R. Silva" Date: Wed, 30 Jan 2019 18:33:55 -0600 > One of the more common cases of allocation size calculations is finding > the size of a structure that has a zero-sized array at the end, along > with memory for some number of elements for that array. For example: > > struct fo

[PATCH net-next] tulip: eeprom: use struct_size() in kmalloc()

2019-01-30 Thread Gustavo A. R. Silva
: Gustavo A. R. Silva --- drivers/net/ethernet/dec/tulip/eeprom.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/eeprom.c b/drivers/net/ethernet/dec/tulip/eeprom.c index 1812f4916917..ba0a69b363f8 100644 --- a/drivers/net/ethernet/dec/tulip

Re: [PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread Jia-Ju Bai
On 2018/4/12 10:21, arvindY wrote: On Thursday 12 April 2018 07:00 AM, Jia-Ju Bai wrote: On 2018/4/12 0:16, James Bottomley wrote: On Wed, 2018-04-11 at 23:39 +0800, Jia-Ju Bai wrote: de4x5_hw_init() is never called in atomic context. de4x5_hw_init() is only called by de4x5_pci_probe(),

Re: [PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread arvindY
On Thursday 12 April 2018 07:00 AM, Jia-Ju Bai wrote: On 2018/4/12 0:16, James Bottomley wrote: On Wed, 2018-04-11 at 23:39 +0800, Jia-Ju Bai wrote: de4x5_hw_init() is never called in atomic context. de4x5_hw_init() is only called by de4x5_pci_probe(), which is only set as ".probe" in stru

Re: [PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread Jia-Ju Bai
On 2018/4/12 0:16, James Bottomley wrote: On Wed, 2018-04-11 at 23:39 +0800, Jia-Ju Bai wrote: de4x5_hw_init() is never called in atomic context. de4x5_hw_init() is only called by de4x5_pci_probe(), which is only set as ".probe" in struct pci_driver. Despite never getting called from atomic

Re: [PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread James Bottomley
On Wed, 2018-04-11 at 23:39 +0800, Jia-Ju Bai wrote: > de4x5_hw_init() is never called in atomic context. > > de4x5_hw_init() is only called by de4x5_pci_probe(), which is only  > set as ".probe" in struct pci_driver. > > Despite never getting called from atomic context, de4x5_hw_init()  > calls

[PATCH v2] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread Jia-Ju Bai
e replaced with usleep_range() to avoid busy waiting. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- v2: * Use usleep_range() to correct usleep() in v1. --- drivers/net/ethernet/dec/tulip/de4x5.c | 2

Re: [PATCH] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-11 Thread kbuild test robot
/commits/Jia-Ju-Bai/dec-tulip-de4x5-Replace-mdelay-with-usleep_range-in-de4x5_hw_init/20180411-222527 config: i386-randconfig-x015-201814 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors

[PATCH] dec: tulip: de4x5: Replace mdelay with usleep_range in de4x5_hw_init

2018-04-10 Thread Jia-Ju Bai
e replaced with usleep_range() to avoid busy waiting. This is found by a static analysis tool named DCNS written by myself. And I also manually check it. Signed-off-by: Jia-Ju Bai --- drivers/net/ethernet/dec/tulip/de4x5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

[BUG] tulip/de4x5: a possible sleep-in-atomic bug in de4x5_interrupt

2017-12-13 Thread Jia-Ju Bai
According to drivers/net/ethernet/dec/tulip/de4x5.c, the driver may sleep in the interrupt handler. The function call path is: de4x5_interrupt (interrupt handler) synchronize_irq --> may sleep I do not find a good way to fix it, so I only report. This possible bug is found by my sta

[PATCH 3.16 251/294] net: tulip: turn compile-time warning into dev_warn()

2017-11-06 Thread Ben Hutchings
3.16.50-rc1 review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann commit de92718883ddbcd11b738d36ffcf57617b97fa12 upstream. The tulip driver causes annoying build-time warnings for allmodconfig builds for all recent architectures: dec/tulip

[PATCH 3.16 253/294] drivers/net/ethernet/dec/tulip/uli526x.c: fix misleading indentation in uli526x_timer

2017-11-06 Thread Ben Hutchings
3.16.50-rc1 review patch. If anyone has any objections, please let me know. -- From: David Malcolm commit e1395a321eab1a7833d82e952eb8255e0a1f03cb upstream. This code in drivers/net/ethernet/dec/tulip/uli526x.c function "uli526x_timer": 1086 } e

[PATCH 21/58] net: tulip: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
s Berg Cc: Eric Dumazet Cc: Philippe Reynes Cc: "yuval.sh...@oracle.com" Cc: net...@vger.kernel.org Cc: linux-par...@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/dec/tulip/de4x5.c | 12 ++-- drivers/net/ethernet/dec/tulip/dmfe.c| 10 +++

[PATCH 14/58] net: tulip: de2104x: Convert timers to use timer_setup()

2017-10-16 Thread Kees Cook
Wilson Cc: Philippe Reynes Cc: net...@vger.kernel.org Cc: linux-par...@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Tobias Klauser --- drivers/net/ethernet/dec/tulip/de2104x.c | 21 + 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/de

Re: [PATCH] net: tulip: de2104x: Convert timers to use

2017-10-05 Thread Tobias Klauser
On 2017-10-05 at 02:50:48 +0200, Kees Cook wrote: > In preparation for unconditionally passing the struct timer_list pointer to > all timer callbacks, switch to using the new timer_setup() and from_timer() > to pass the timer pointer explicitly. > > Cc: "David S. Miller" > Cc: "yuval.sh...@oracl

[PATCH] net: tulip: de2104x: Convert timers to use

2017-10-04 Thread Kees Cook
Wilson Cc: Philippe Reynes Cc: net...@vger.kernel.org Cc: linux-par...@vger.kernel.org Cc: Thomas Gleixner Signed-off-by: Kees Cook --- This requires commit 686fef928bba ("timer: Prepare to change timer callback argument type") in v4.14-rc3, but should be otherwise stand-alone. ---

[PATCH] net: tulip: Convert timers to use timer_setup()

2017-10-04 Thread Kees Cook
;) in v4.14-rc3, but should be otherwise stand-alone. --- drivers/net/ethernet/dec/tulip/de4x5.c | 13 ++--- drivers/net/ethernet/dec/tulip/dmfe.c| 12 +--- drivers/net/ethernet/dec/tulip/interrupt.c | 6 +++--- drivers/net/ethernet/dec/tulip/pnic.c| 6 +++---

Re: [PATCH] net: tulip: Constify tulip_tbl

2017-09-08 Thread David Miller
From: Kees Cook Date: Thu, 7 Sep 2017 12:35:14 -0700 > It looks like all users of tulip_tbl are reads, so mark this table > as read-only. > > $ git grep tulip_tbl # edited to avoid line-wraps... > interrupt.c: iowrite32(tulip_tbl[tp->chip_id].valid_intrs, ... > interrupt.c: iowrite32(tulip_tbl[

[PATCH] net: tulip: Constify tulip_tbl

2017-09-07 Thread Kees Cook
media_timer, tulip_core.c:INIT_WORK(&tp->media_work, tulip_tbl[tp->chip_id].media_task); Cc: "David S. Miller" Cc: Jarod Wilson Cc: "Gustavo A. R. Silva" Cc: net...@vger.kernel.org Cc: linux-par...@vger.kernel.org Signed-off-by: Kees Cook --- drivers/net/ethernet/dec/tulip

Re: [PATCH] net: tulip: remove useless code in tulip_init_one()

2017-07-19 Thread David Miller
From: "Gustavo A. R. Silva" Date: Tue, 18 Jul 2017 15:43:33 -0500 > Remove useless local variable multiport_cnt and the code related. > > Signed-off-by: Gustavo A. R. Silva Applied.

[PATCH] net: tulip: remove useless code in tulip_init_one()

2017-07-18 Thread Gustavo A. R. Silva
Remove useless local variable multiport_cnt and the code related. Signed-off-by: Gustavo A. R. Silva --- drivers/net/ethernet/dec/tulip/tulip_core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/dec/tulip/tulip_core.c b/drivers/net/ethernet/dec/tulip/tulip_core.c

[PATCH 3.18 35/47] net: tulip: turn compile-time warning into dev_warn()

2017-04-28 Thread Greg Kroah-Hartman
3.18-stable review patch. If anyone has any objections, please let me know. -- From: Arnd Bergmann commit de92718883ddbcd11b738d36ffcf57617b97fa12 upstream. The tulip driver causes annoying build-time warnings for allmodconfig builds for all recent architectures: dec/tulip

Re: [PATCH] net: tulip: fix spelling mistake: "attemping" -> "attempting"

2016-07-30 Thread David Miller
From: Colin King Date: Sat, 30 Jul 2016 17:47:07 +0100 > From: Colin Ian King > > trivial fix to spelling mistake in printk message > > Signed-off-by: Colin Ian King Applied, thanks.

[PATCH] net: tulip: fix spelling mistake: "attemping" -> "attempting"

2016-07-30 Thread Colin King
From: Colin Ian King trivial fix to spelling mistake in printk message Signed-off-by: Colin Ian King --- drivers/net/ethernet/dec/tulip/de4x5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/dec/tulip/de4x5.c b/drivers/net/ethernet/dec/tulip/de4x5.c

Re: [PATCH 1/3] net: tulip: Use setup_timer()

2016-02-25 Thread David Miller
From: Amitoj Kaur Chawla Date: Wed, 24 Feb 2016 19:27:49 +0530 > Convert a call to init_timer and accompanying intializations of > the timer's data and function fields to a call to setup_timer. > > The Coccinelle semantic patch that fixes this problem is > as follows: > > // > @@ > expression

  1   2   3   4   >