Re: rtl8152 / power management kernel hang

2021-04-20 Thread Oliver Neukum
Am Montag, den 19.04.2021, 08:53 -0700 schrieb Thiago Macieira: > On Monday, 19 April 2021 03:35:43 PDT Oliver Neukum wrote: > > One of them at least has a systemic issue with power management. > > Please check the upcoming kernel for whether it is your model. > > Th

Re: rtl8152 / power management kernel hang

2021-04-19 Thread Oliver Neukum
Am Donnerstag, den 15.04.2021, 08:11 -0700 schrieb Thiago Macieira: > On Thursday, 15 April 2021 03:10:58 PDT Oliver Neukum wrote: > > Hi, > > > > is this device part of a docking station? > > Yes, it is. It's a USB-C dock station by Dell, whose product number I

Re: rtl8152 / power management kernel hang

2021-04-15 Thread Oliver Neukum
Am Dienstag, den 13.04.2021, 13:57 -0700 schrieb Thiago Macieira: > This has been happening for at least a year but I've only now decided to > report it. > > Kernel 5.11.11 > Symptom: > - partial kernel freeze > - some kernel tasks end up in state D and never leave it > (notably ipv6_addrcon

Re: [PATCH net-next v4 0/4] usbnet: speed reporting for devices without MDIO

2021-04-07 Thread Oliver Neukum
Am Dienstag, den 06.04.2021, 18:01 + schrieb Grant Grundler: > > Ethernet does not support > > different rates in each direction. So if RX and TX are different, i > > would actually say something is broken. > > Agreed. The question is: Is there data or some heuristics we can use > to determin

Re: [PATCH] usbnet: ipheth: fix connectivity with iOS 14

2021-02-22 Thread Oliver Neukum
Am Sonntag, den 21.02.2021, 10:42 + schrieb Sam Bingner: > There seems to be a problem with this patch: > > Whenever the iPhone sends a packet to the tethered device that is 1500 bytes > long, it gets the error "ipheth 1-1:4.2: ipheth_rcvbulk_callback: urb status: > -79" on the connected dev

Re: [PATCHv3 3/3] CDC-NCM: record speed in status method

2021-02-22 Thread Oliver Neukum
Am Freitag, den 19.02.2021, 07:30 + schrieb Grant Grundler: > On Thu, Feb 18, 2021 at 10:21 AM Oliver Neukum wrote: Hi, > Since this patch is missing the hunks that landed in the previous > patch and needs a v4, I'll offer my version of the commit message in That is bad.

[PATCHv3 1/3] usbnet: specify naming of usbnet_set/get_link_ksettings

2021-02-18 Thread Oliver Neukum
specific. v2: rebased on changed upstream v3: changed names to clearly say that this does NOT use phylib Signed-off-by : Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/asix_devices.c | 12 ++-- drivers/net/usb/cdc_ncm.c | 4 ++-- drivers/net/usb/dm9601.c | 4

[PATCHv3 3/3] CDC-NCM: record speed in status method

2021-02-18 Thread Oliver Neukum
available, we shall now record such notifications and tell the usbnet framework to make direct use of them without going through the PHY layer. v2: rebased on upstream v3: changed variable names Signed-off-by: Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/cdc_ncm.c | 23

[PATCHv3 2/3] usbnet: add method for reporting speed without MDIO

2021-02-18 Thread Oliver Neukum
and made clear which units are used Signed-off-by: Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/usbnet.c | 11 +++ include/linux/usb/usbnet.h | 6 -- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c

[PATCHv3 0/3]usbnet: speed reporting for devices without MDIO

2021-02-18 Thread Oliver Neukum
This series introduces support for USB network devices that report speed as a part of their protocol, not emulating an MII to be accessed over MDIO. v2: rebased on recent upstream changes v3: incorporated hints on naming and comments

Re: [PATCH 2/2] net: usbnet: use new tasklet API

2021-02-01 Thread Oliver Neukum
Am Samstag, den 23.01.2021, 18:32 +0100 schrieb Emil Renner Berthing: > From: Emil Renner Berthing > > This converts the driver to use the new tasklet API introduced in > commit 12cc923f1ccc ("tasklet: Introduce new initialization API") > > Signed-off-by: Emil Renne

Re: [PATCH 1/2] net: usbnet: initialize tasklet using tasklet_init

2021-02-01 Thread Oliver Neukum
Am Samstag, den 23.01.2021, 18:32 +0100 schrieb Emil Renner Berthing: > From: Emil Renner Berthing > > Initialize tasklet using tasklet_init() rather than open-coding it. > > Signed-off-by: Emil Renner Berthing Acked-by: Oliver Neukum

Re: [PATCH] usbnet: fix the indentation of one code snippet

2021-02-01 Thread Oliver Neukum
Am Samstag, den 23.01.2021, 13:11 +0800 schrieb Dongliang Mu: > Every line of code should start with tab (8 characters) > > Signed-off-by: Dongliang Mu Acked-by: Oliver Neukum

Re: [PATCHv2 1/3] usbnet: specify naming of usbnet_set/get_link_ksettings

2021-01-26 Thread Oliver Neukum
Am Freitag, den 22.01.2021, 02:10 +0100 schrieb Andrew Lunn: > On Thu, Jan 21, 2021 at 01:57:29PM +0100, Oliver Neukum wrote: > > The old generic functions assume that the devices includes > > an MDIO interface. This is true only for genuine ethernet. > > Devices with a higher

[PATCHv2 3/3] CDC-NCM: record speed in status method

2021-01-21 Thread Oliver Neukum
available, we shall now record such notifications and tell the usbnet framework to make direct use of them without going through the PHY layer. v2: adjusted to recent changes Signed-off-by: Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/cdc_ncm.c | 29 - 1 file

[PATCHv2 2/3] usbnet: add method for reporting speed without MDIO

2021-01-21 Thread Oliver Neukum
-by: Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/usbnet.c | 23 +++ include/linux/usb/usbnet.h | 4 2 files changed, 27 insertions(+) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index e2ca88259b05..6f8fcc276ca7 100644 --- a/drivers

[PATCHv2 1/3] usbnet: specify naming of usbnet_set/get_link_ksettings

2021-01-21 Thread Oliver Neukum
specific. v2: adjusted to recent changes Signed-off-by : Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/asix_devices.c | 12 ++-- drivers/net/usb/cdc_ncm.c | 4 ++-- drivers/net/usb/dm9601.c | 4 ++-- drivers/net/usb/mcs7830.c | 4 ++-- drivers/net/usb

[PATCHv2 0/3] usbnet: speed reporting for devices without MDIO

2021-01-21 Thread Oliver Neukum
This series introduces support for USB network devices that report speed as a part of their protocol, not emulating an MII to be accessed over MDIO. v2: adjusted to recent changes

Re: [PATCH 2/3] usbnet: add method for reporting speed without MDIO

2021-01-11 Thread Oliver Neukum
Am Donnerstag, den 07.01.2021, 20:27 +0100 schrieb Andrew Lunn: > On Thu, Jan 07, 2021 at 12:35:17PM +0100, Oliver Neukum wrote: > > Hi Oliver > > > +++ b/include/linux/usb/usbnet.h > > @@ -53,6 +53,8 @@ struct usbnet { > > u32 hard_mtu;

[PATCH 2/3] usbnet: add method for reporting speed without MDIO

2021-01-07 Thread Oliver Neukum
The old method for reporting network speed upwards assumed that a device uses MDIO and uses the generic phy functions based on that. Add a a primitive internal version not making the assumption reporting back directly what the status operations record. Signed-off-by: Oliver Neukum Tested-by

[PATCH 1/3] usbnet: specify naming of usbnet_set/get_link_ksettings

2021-01-07 Thread Oliver Neukum
specific. Signed-off-by : Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/asix_devices.c | 12 ++-- drivers/net/usb/cdc_ncm.c | 4 ++-- drivers/net/usb/dm9601.c | 4 ++-- drivers/net/usb/mcs7830.c | 4 ++-- drivers/net/usb/sierra_net.c | 4 ++-- drivers/net/usb

support for USB network devices without MDIO to report speed

2021-01-07 Thread Oliver Neukum
The assumption that a USB network devices would contain an MDIO accessible to the host is true only for a subset of genuine ethernet devices. It is not true for class devices like NCM. Hence an implementation purely internal to usbnet is needed.

[PATCH 3/3] CDC-NCM: record speed in status method

2021-01-07 Thread Oliver Neukum
available, we shall now record such notifications and tell the usbnet framework to make direct use of them without going through the PHY layer. Signed-off-by: Oliver Neukum Tested-by: Roland Dreier --- drivers/net/usb/cdc_ncm.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions

Re: [PATCH] CDC-NCM: remove "connected" log message

2021-01-05 Thread Oliver Neukum
Am Montag, den 04.01.2021, 11:13 -0800 schrieb Roland Dreier: > > > to preserve the legacy behavior rather than changing the behavior of > > > every usbnet driver all at once? Like make a new > > > usbnet_get_link_ksettings_nonmdio and update only cdc_ncm to use it? > > > > Then I would have to t

Re: [PATCH] CDC-NCM: remove "connected" log message

2021-01-04 Thread Oliver Neukum
Am Donnerstag, den 31.12.2020, 10:51 -0800 schrieb Roland Dreier: > I haven't tried these patches yet but they don't look quite right to > me. inlining the first 0001 patch: OK, let's see. > > diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c > > index 1447da1d5729..bcd17f6d6de6

Re: [PATCH] CDC-NCM: remove "connected" log message

2020-12-30 Thread Oliver Neukum
ase. I have a good test setup now so I can easily try out patches. Thank you, here we go. Regards Oliver From 7dfb5f35933ebbe12076e41606b178fa7d8d2e7b Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 1 Dec 2020 11:31:15 +0100 Subject: [PATCH 1/2] usbnet: add me

Re: [PATCH] CDC-NCM: remove "connected" log message

2020-12-29 Thread Oliver Neukum
Am Montag, den 28.12.2020, 23:56 -0800 schrieb Roland Dreier: > > Applied to net and queued for LTS, thanks! > > Thanks - is Oliver's series of 3 patches that get rid of the other > half of the log spam also on the way upstream? Hi, I looked at them again and found that there is a way to get the

struct mii_if_info in usbnet.h

2020-11-26 Thread Oliver Neukum
Hi, I was looking at usbnet_get_link_ksettings() and it seems in hindsight that the idea it rests upon makes an assumption about the hardware that was at the time it was introduced was often true, but today isn't. struct usbnet contains a member struct mii_if_info. Why? That makes a pretty strong

Re: cdc_ncm kernel log spam with trendnet 2.5G USB adapter

2020-11-26 Thread Oliver Neukum
Am Montag, den 16.11.2020, 09:23 -0800 schrieb Roland Dreier: > Hi, I recently got a 2.5G USB adapter, and although it works fine, the > driver continually spams the kernel log with messages like > > [127662.025647] cdc_ncm 4-1:2.0 enx3c8cf8f942e0: network connection: connected > [127662.057680] c

Re: [PATCH v3] net: usb: usbnet: update __usbnet_{read|write}_cmd() to use new API

2020-11-02 Thread Oliver Neukum
Am Sonntag, den 01.11.2020, 03:05 +0530 schrieb Anant Thazhemadam: > Currently, __usbnet_{read|write}_cmd() use usb_control_msg(). > However, this could lead to potential partial reads/writes being > considered valid, and since most of the callers of > usbnet_{read|write}_cmd() don't take partial r

Re: INFO: task hung in hub_port_init

2020-10-06 Thread Oliver Neukum
Am Dienstag, den 06.10.2020, 01:19 -0700 schrieb syzbot: Hi, > HEAD commit:d3d45f82 Merge tag 'pinctrl-v5.9-2' of git://git.kernel.or.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=14c3b3db90 > kernel config: https://syzkaller.appspot.com/x/.conf

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-24 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 20:02 +0530 schrieb Himadri Pandya: > I meant that it was stupid to change it without properly understanding > the significance of GFP_NOIO in this context. > > So now, do we re-write the wrapper functions with flag passed as a parameter? Hi, I hope I set you in CC

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-24 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 17:48 +0300 schrieb Petko Manolov: > > This internally uses kmemdup() with GFP_KERNEL. > > You cannot make this change. The API does not support it. > > I am afraid we will have to change the API first, before more > > such changes are done. > > One possible fix is to

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Oliver Neukum
Am Mittwoch, den 23.09.2020, 19:36 +0530 schrieb Himadri Pandya: > On Wed, Sep 23, 2020 at 3:52 PM Oliver Neukum wrote: > > > > Am Mittwoch, den 23.09.2020, 14:35 +0530 schrieb Himadri Pandya: > > GFP_NOIO is used here for a reason. You need to use this helper > >

Re: [PATCH 3/4] net: usb: rtl8150: use usb_control_msg_recv() and usb_control_msg_send()

2020-09-23 Thread Oliver Neukum
th proper > error check. Hence use the wrappers instead of calling usb_control_msg() > directly. > > Signed-off-by: Himadri Pandya Nacked-by: Oliver Neukum > --- > drivers/net/usb/rtl8150.c | 32 ++-- > 1 file changed, 6 insertions(+), 26 deletions(-)

Re: [RESEND net-next v2 12/12] net: usbnet: convert tasklets to use new tasklet_setup() API

2020-09-14 Thread Oliver Neukum
Am Montag, den 14.09.2020, 13:01 +0530 schrieb Allen Pais: > From: Allen Pais > > In preparation for unconditionally passing the > struct tasklet_struct pointer to all tasklet > callbacks, switch to using the new tasklet_setup() > and from_tasklet() to pass the tasklet pointer explicitly > and re

[PATCH 1/3] hso: fix bailout in error case of probe

2020-08-05 Thread Oliver Neukum
The driver tries to reuse code for disconnect in case of a failed probe. If resources need to be freed after an error in probe, the netdev must not be freed because it has never been registered. Fix it by telling the helper which path we are in. Signed-off-by: Oliver Neukum --- drivers/net/usb

[PATCH 2/3] usb: hso: no complaint about kmalloc failure

2020-08-05 Thread Oliver Neukum
If this fails, kmalloc() will print a report including a stack trace. There is no need for a separate complaint. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index

[PATCH 0/3] misc bug fixes for the hso driver

2020-08-05 Thread Oliver Neukum
1. Code reuse led to an unregistration of a net driver that has not been registered 2. The kernel complains generically if kmalloc with GFP_KERNEL fails 3. A race that can lead to an URB that is in use being reused or a use after free

[PATCH 3/3] usb: hso: remove bogus check for EINPROGRESS

2020-08-05 Thread Oliver Neukum
This check an inherent race. It opens a race where an error code has already been set or cleared yet the URB has not been given back. We cannot do such an optimization and must unlink unconditionally. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 3 +-- 1 file changed, 1 insertion

Re: [PATCH v5 net-next 2/5] net: cdc_ether: export usbnet_cdc_update_filter

2020-07-27 Thread Oliver Neukum
Am Freitag, den 24.07.2020, 16:18 +0200 schrieb Bjørn Mork: > > On July 21, 2020 11:00:08 AM GMT+02:00, Oliver Neukum wrote: > > Am Mittwoch, den 15.07.2020, 20:40 +0200 schrieb Bjørn Mork: > > > > > > @@ -90,6 +90,7 @@ static void usbnet_cdc_update_filt

Re: [PATCH v5 net-next 2/5] net: cdc_ether: export usbnet_cdc_update_filter

2020-07-21 Thread Oliver Neukum
Am Mittwoch, den 15.07.2020, 20:40 +0200 schrieb Bjørn Mork: > > @@ -90,6 +90,7 @@ static void usbnet_cdc_update_filter(struct usbnet *dev) > USB_CTRL_SET_TIMEOUT > ); > } > +EXPORT_SYMBOL_GPL(usbnet_cdc_update_filter); Hi, this function is pretty primitive.

[PATCH] usb: hso: correct debug message

2020-05-07 Thread Oliver Neukum
If you do not find the OUT endpoint, you should say so, rather than copy the error message for the IN endpoint. Presumably a copy and paste error. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/hso.c b

Re: [PATCH] usb: hso: obey DMA rules in tiocmget

2019-10-17 Thread Oliver Neukum
Am Donnerstag, den 17.10.2019, 14:20 -0400 schrieb David Miller: > From: David Miller > Date: Thu, 17 Oct 2019 14:19:55 -0400 (EDT) > > > From: Oliver Neukum > > Date: Thu, 17 Oct 2019 11:53:38 +0200 > > > > > The serial state information must not be embedd

[PATCHv2] usb: hso: obey DMA rules in tiocmget

2019-10-17 Thread Oliver Neukum
The serial state information must not be embedded into another data structure, as this interferes with cache handling for DMA on architectures without cache coherence.. That would result in data corruption on some architectures Allocating it separately. v2: fix syntax error Signed-off-by: Oliver

[PATCH] usb: hso: obey DMA rules in tiocmget

2019-10-17 Thread Oliver Neukum
The serial state information must not be embedded into another data structure, as this interferes with cache handling for DMA on architectures without cache coherence.. That would result in data corruption on some architectures Allocating it separately. Signed-off-by: Oliver Neukum --- drivers

[PATCH] usbnet: sanity checking of packet sizes and device mtu

2019-09-19 Thread Oliver Neukum
After a reset packet sizes and device mtu can change and need to be reevaluated to calculate queue sizes. Malicious devices can set this to zero and we divide by it. Introduce sanity checking. Reported-and-tested-by: syzbot+6102c120be558c885...@syzkaller.appspotmail.com Signed-off-by: Oliver

[PATCH] zd1211rw: remove false assertion from zd_mac_clear()

2019-08-08 Thread Oliver Neukum
The function is called before the lock which is asserted was ever used. Just remove it. Reported-by: syzbot+74c65761783d66a9c...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum --- drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net

[PATCH] pcan_usb_fd: zero out the common command buffer

2019-08-08 Thread Oliver Neukum
Lest we leak kernel memory to a device we better zero out buffers. Reported-by: syzbot+513e4d0985298538b...@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum --- drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can

[PATCHv2] libertas: add terminating entry to fw_table

2019-07-23 Thread Oliver Neukum
In case no firmware was found, the system would happily read and try to load garbage. Terminate the table properly. V2: change style issues Fixes: ce84bb69f50e6 ("libertas USB: convert to asynchronous firmware loading") Signed-off-by: Oliver Neukum Reported-by: syzbot+8a8f486

[PATCH] libertas: add terminating entry to fw_table

2019-07-11 Thread Oliver Neukum
In case no firmware was found, the system would happily read and try to load garbage. Terminate the table properly. Signed-off-by: Oliver Neukum Fixes: ce84bb69f50e6 ("libertas USB: convert to asynchronous firmware loading") Reported-by: syzbot+8a8f48672560c8ca5...@syzkaller.appsp

[PATCH 3/6] usb: hso: switch definitions to the BIT macro

2019-06-06 Thread Oliver Neukum
This is just a minor improvement in readability. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index fe1d7bdc8afe..ab18dbe169f3 100644 --- a/drivers/net/usb

[PATCH 5/6] usb: hso: obey DMA rules in tiocmget

2019-06-06 Thread Oliver Neukum
The serial state information must not be embedded into another data structure, as this interferes with cache handling for DMA. Allocating it separately. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a

[PATCH 2/6] usb: hso: no complaint about kmalloc failure

2019-06-06 Thread Oliver Neukum
If this fails, kmalloc() will print a report including a stack trace. There is no need for a separate complaint. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index

[PATCH 4/6] usb: hso: declare endianness

2019-06-06 Thread Oliver Neukum
The driver declares data structures with defined endianness as u16. Be more precise. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index ab18dbe169f3

[PATCH 1/6] usb: hso: correct debug message

2019-06-06 Thread Oliver Neukum
If you do not find the OUT endpoint, you should say so, rather than copy the error message for the IN endpoint. Presumably a copy and paste error. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/usb/hso.c b

[PATCH 6/6] usb: hso: remove bogus check for EINPROGRESS

2019-06-06 Thread Oliver Neukum
This check makes no sense. It is an inherent race. Signed-off-by: Oliver Neukum --- drivers/net/usb/hso.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 489024f0ae62..f7976a6fa570 100644 --- a/drivers/net/usb/hso.c +++ b

Re: [PATCH 2/3] aqc111: fix writing to the phy on BE

2019-05-14 Thread Oliver Neukum
On Di, 2019-05-14 at 12:11 +, Igor Russkikh wrote: > On 09.05.2019 12:08, Oliver Neukum wrote: > > When writing to the phy on BE architectures an internal data structure > > was directly given, leading to it being byte swapped in the wrong > > way for the CPU in 50% of a

[PATCH 2/3] aqc111: fix writing to the phy on BE

2019-05-09 Thread Oliver Neukum
When writing to the phy on BE architectures an internal data structure was directly given, leading to it being byte swapped in the wrong way for the CPU in 50% of all cases. A temporary buffer must be used. Signed-off-by: Oliver Neukum --- drivers/net/usb/aqc111.c | 23

[PATCH 1/3] aqc111: fix endianness issue in aqc111_change_mtu

2019-05-09 Thread Oliver Neukum
If the MTU is large enough, the first write to the device is just repeated. On BE architectures, however, the first word of the command will be swapped a second time and garbage will be written. Avoid that. Signed-off-by: Oliver Neukum --- drivers/net/usb/aqc111.c | 2 ++ 1 file changed, 2

[PATCH 3/3] aqc111: fix double endianness swap on BE

2019-05-09 Thread Oliver Neukum
If you are using a function that does a swap in place, you cannot just reuse the buffer on the assumption that it has not been changed. Signed-off-by: Oliver Neukum --- drivers/net/usb/aqc111.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/usb/aqc111.c b

[PATCH] rtl8150: switch to BIT macro

2019-05-09 Thread Oliver Neukum
A bit of housekeeping switching the driver to the BIT() macro. Signed-off-by: Oliver Neukum --- drivers/net/usb/rtl8150.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 59dbdbb5feff

Re: [PATCH 2/2] RTL8153-BD is used in Dell DA300 type-C dongle. It should be added to the whitelist of devices to activate MAC address pass through.

2019-02-18 Thread Oliver Neukum
On Mo, 2019-02-18 at 11:48 +0800, David Chen wrote: > From: David Chen > > Per confirming with Realtek all devices containing RTL8153-BD should > activate MAC pass through and there won't use pass through bit on efuse > like in RTL8153-AD. > > Signed-off-by: David Chen > --- > drivers/net/usb/

Re: [PATCH lora-next 3/5] net: lora: sx130x: Add PicoCell serdev driver

2019-01-07 Thread Oliver Neukum
On Fr, 2019-01-04 at 12:21 +0100, Andreas Färber wrote: > > +struct picogw_device { > + struct serdev_device *serdev; > + > + u8 rx_buf[1024]; No, you cannot do that. AFAICT this buffer can be used for DMA. Thus putting it into another data structure violates the rules of DMA coherency.

Re: [PATCH 07/19] usbnet: smsc95xx: Split the reset function

2019-01-07 Thread Oliver Neukum
On Do, 2019-01-03 at 02:10 +0100, Marek Vasut wrote: > The smsc95xx_reset() is called either during bind or later during > the driver operation. However, the MII structure can be populated > only once, when the smsc95xx_reset() is called from the drivers > bind function. > > Split the reset functi

Re: [PATCH 02/19] usbnet: smsc95xx: Stop propagation of in_pm

2019-01-07 Thread Oliver Neukum
On Do, 2019-01-03 at 02:10 +0100, Marek Vasut wrote: > The information whether the SMSC95xx is in_pm or not can be derived from > the usbdev->suspend_count. First thing called in smsc95xx_suspend() is > usbnet_suspend(), which increments the usbdev->suspend_count and since > then the driver only ca

Re: [PATCH] r8152: limit MAC pass-through to one device

2018-10-10 Thread Oliver Neukum
On Mi, 2018-10-10 at 17:18 +, mario.limoncie...@dell.com wrote: > > > > MAC address having to be unique, a MAC coming from the host > > must be used at most once at a time. Hence the users must > > be recorded and additional users must fall back to conventional > > methods. > > I checked with

[PATCH] r8152: limit MAC pass-through to one device

2018-10-10 Thread Oliver Neukum
MAC address having to be unique, a MAC coming from the host must be used at most once at a time. Hence the users must be recorded and additional users must fall back to conventional methods. Signed-off-by: Oliver Neukum Fixes: 34ee32c9a5696 ("r8152: Add support for setting pass throug

Re: Hangs in r8152 connected to power management in kernels at least up v4.17-rc4

2018-05-16 Thread Oliver Neukum
Am Mittwoch, den 16.05.2018, 10:00 + schrieb Hayes Wang: > Oliver Neukum [mailto:oneu...@suse.com] > > Sent: Wednesday, May 16, 2018 4:27 PM > > [...] > > > > > > Would usb_autopm_get_interface() take a long time? > > > The driver would wake the d

Re: Hangs in r8152 connected to power management in kernels at least up v4.17-rc4

2018-05-16 Thread Oliver Neukum
Am Mittwoch, den 16.05.2018, 03:37 + schrieb Hayes Wang: > Oliver Neukum [mailto:oneu...@suse.com] > > > > Hi, > > > > I got reports about hangs with this trace: > > > > May 13 01:36:55 neroon kernel: INFO: task kworker/0:0:4 blocked for more > >

Hangs in r8152 connected to power management in kernels at least up v4.17-rc4

2018-05-15 Thread Oliver Neukum
Hi, I got reports about hangs with this trace: May 13 01:36:55 neroon kernel: INFO: task kworker/0:0:4 blocked for more than 60 seconds. May 13 01:36:55 neroon kernel: Tainted: G U 4.17.0-rc4-1.g8257a00-vanilla #1 May 13 01:36:55 neroon kernel: "echo 0 > /proc/sys/kernel/h

Re: [PATCH] cdc_ether: flag the Cinterion AHS8 modem by gemalto as WWAN

2018-04-11 Thread Oliver Neukum
and can be used to activate or deactivate a WWAN >     connection for a PDP context defined with the same command. UE supports >     one WWAN adapter. > > Signed-off-by: Bassem Boubaker Acked-by: Oliver Neukum

Re: [2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-13 Thread Oliver Neukum
Am Dienstag, den 13.03.2018, 08:24 +0100 schrieb SF Markus Elfring: > > > > > > > > Use three values directly for a condition check without assigning them > > > to intermediate variables. > > > > Hi, > > > > what is the benefit of this? > > I proposed a small source code reduction. > > Other

Re: [PATCH 2/2] net/usb/ax88179_178a: Delete three unnecessary variables in ax88179_chk_eee()

2018-03-12 Thread Oliver Neukum
Am Samstag, den 10.03.2018, 19:26 +0100 schrieb SF Markus Elfring: > From: Markus Elfring > Date: Sat, 10 Mar 2018 18:53:28 +0100 > > Use three values directly for a condition check without assigning them > to intermediate variables. Hi, what is the benefit of this? It looks like needless code

Re: [PATCH net-next 2/2] net: cdc_eem: clean up bind error path

2018-03-07 Thread Oliver Neukum
> returns early. > > Also remove the bogus call to clear the interface data, which is owned > by the usbnet driver and would not even have been set by the time bind() > is called. > > Signed-off-by: Johan Hovold Acked-by: Oliver Neukum > --- > drivers/net/usb/cdc_

Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-03-05 Thread Oliver Neukum
On Mon, 2018-03-05 at 08:45 +0100, Marek Szyprowski wrote: > Hi Oliver, > > On 2018-02-27 17:07, Oliver Neukum wrote: > > Am Dienstag, den 27.02.2018, 07:13 -0800 schrieb Eric Dumazet: > >> On Tue, 2018-02-27 at 07:09 -0800, Eric Dumazet wrote: > >>> > >&

Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-02-27 Thread Oliver Neukum
Am Dienstag, den 27.02.2018, 07:13 -0800 schrieb Eric Dumazet: > On Tue, 2018-02-27 at 07:09 -0800, Eric Dumazet wrote: > > > > > > Note that for this one, it seems we also could perform stats updates in > > BH context, since skb is queued via defer_bh() > > > > But simplicity wins I guess. > >

Re: [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN

2018-02-27 Thread Oliver Neukum
activate a WWAN >     connection for a PDP context defined with AT+CGDCONT. UE supports >     two WWAN adapter. Both WWAN adapters can be activated a the same time > > Signed-off-by: Bassem Boubaker Acked-by: Oliver Neukum

Re: [PATCH] cdc_ether: flag the Cinterion PLS8 modem by gemalto as WWAN

2018-02-27 Thread Oliver Neukum
Am Dienstag, den 27.02.2018, 13:29 +0100 schrieb Bjørn Mork : > Bassem Boubaker writes: > > > > > +#define GEMALTO_VENDOR_ID 0x1e2d > > This is defined as CINTERION_VENDOR_ID in drivers/usb/serial/option.c. > > I have no idea which defintion is most correct, but I believe the macros > should

Re: inconsistent lock state with usbnet/asix usb ethernet and xhci

2018-02-27 Thread Oliver Neukum
Am Dienstag, den 27.02.2018, 08:26 +0100 schrieb Marek Szyprowski: Hi, > I've noticed that USBnet/ASIX AX88772B USB driver produces deplock kernel > warning ("inconsistent lock state") on Chromebook2 Peach-PIT board. No Is that 32 bit? > special activity is needed to reproduce this issue, it ha

[PATCHv2] usbnet: silence an unnecessary warning

2018-01-17 Thread Oliver Neukum
That a kevent could not be scheduled is not an error. Such handlers must be able to deal with multiple events anyway. As the successful scheduling of a work is a debug event, make the failure debug priority, too. V2: coding style Signed-off-by: Oliver Neukum Reported-by: Cristian Caravena

Re: [PATCH] usbnet: silence an unnecessary warning

2018-01-11 Thread Oliver Neukum
Am Donnerstag, den 11.01.2018, 16:23 +0100 schrieb Bjørn Mork : > Oliver Neukum writes: > > > > > That a kevent could not be scheduled is not an error. > > Such handlers must be able to deal with multiple events anyway. > > As the successful scheduling of a work

[PATCH] usbnet: silence an unnecessary warning

2018-01-11 Thread Oliver Neukum
That a kevent could not be scheduled is not an error. Such handlers must be able to deal with multiple events anyway. As the successful scheduling of a work is a debug event, make the failure debug priority, too. Signed-off-by: Oliver Neukum Reported-by: Cristian Caravena --- drivers/net/usb

Re: [BUG] kaweth: a possible sleep-in-atomic bug in kaweth_start_xmit

2017-12-13 Thread Oliver Neukum
Am Mittwoch, den 13.12.2017, 16:57 +0800 schrieb Jia-Ju Bai: > According to drivers/net/usb/kaweth.c, the driver may sleep under a > spinlock. > The function call path is: > kaweth_start_xmit (acquire the spinlock) >kaweth_async_set_rx_mode > kaweth_control >kaweth_internal_contro

Re: [PATCH] net: usb: asix: fill null-ptr-deref in asix_suspend

2017-11-06 Thread Oliver Neukum
Am Montag, den 06.11.2017, 17:05 +0100 schrieb Andrey Konovalov: > On Mon, Nov 6, 2017 at 4:20 PM, Oliver Neukum wrote: > > > I do have a way to reproduce this. > > As far as I understand, for this particular device ax88172_bind() is > called, which doesn't assign an

Re: [PATCH] net: usb: asix: fill null-ptr-deref in asix_suspend

2017-11-06 Thread Oliver Neukum
Am Montag, den 06.11.2017, 13:30 +0100 schrieb Andrey Konovalov: > On Mon, Nov 6, 2017 at 10:49 AM, Oliver Neukum wrote: > > > > > > 2. Will a device work after that? The appropriate fix may be to wait > > until the device is properly initialized. > > This sho

Re: [PATCH net,stable] net: cdc_ether: fix divide by 0 on bad descriptors

2017-11-06 Thread Oliver Neukum
Am Montag, den 06.11.2017, 15:37 +0100 schrieb Bjørn Mork : > Setting dev->hard_mtu to 0 will cause a divide error in > usbnet_probe. Protect against devices with bogus CDC Ethernet > functional descriptors by ignoring a zero wMaxSegmentSize. > > Signed-off-by: Bjørn Mork Acked-by: Oliver Neukum

Re: [PATCH] net: usb: asix: fill null-ptr-deref in asix_suspend

2017-11-06 Thread Oliver Neukum
Am Donnerstag, den 02.11.2017, 21:26 +0100 schrieb Andrey Konovalov: > When asix_suspend() is called dev->driver_priv might not have been > assigned a value, so we need to check that it's not NULL. > > Found by syzkaller. Hi, 1. if that happens on suspend, it will also happen on resume 2. Will a

Re: [PATCH] drivers/net/usb: add device id for TP-LINK UE300 USB 3.0 Ethernet

2017-10-23 Thread Oliver Neukum
Am Montag, den 23.10.2017, 18:10 +0800 schrieb Ran Wang: > This product is named 'TP-LINK USB 3.0 Gigabit Ethernet Network > Adapter (Model No.is UE300)'. It uses chip RTL8153 and works with > driver drivers/net/usb/r8152.c > Hi, just for the record, have you confirm that it fails with cdc-ether

Re: [PATCH 07/58] net/usb/usbnet: Convert timers to use timer_setup()

2017-10-17 Thread Oliver Neukum
> both a timer and a tasklet, adjust the tasklet to pass the timer address > too. When tasklets have their .data field removed, this can be refactored > to call a central function after resolving the correct container_of() for a > separate callback function for timer and tasklet. > &

Re: [PATCH] rndis_host: support Novatel Verizon USB730L

2017-10-04 Thread Oliver Neukum
Am Dienstag, den 03.10.2017, 16:01 +0200 schrieb Bjørn Mork: > Adding anything else, e.g. based on the table at > http://www.usb.org/developers/defined_class/#BaseClassEFh , is a bit > more risky.  We don't know if a driver will work with *any* such device > until we've actually seen one. > > This

Re: [PATCH V2] r8152: add Linksys USB3GIGV1 id

2017-09-27 Thread Oliver Neukum
Am Dienstag, den 26.09.2017, 08:19 -0700 schrieb Doug Anderson: > > I know that for at least some of the adapters in the CDC Ethernet > blacklist it was claimed that the CDC Ethernet support in the adapter > was kinda broken anyway so the blacklist made sense. ...but for the > Linksys Gigabit ada

Re: [PATCH] r8152: add Linksys USB3GIGV1 id

2017-09-25 Thread Oliver Neukum
Am Freitag, den 22.09.2017, 12:06 -0700 schrieb Grant Grundler: > This Linksys dongle by default comes up in cdc_ether mode. > This patch allows r8152 to claim the device: >    Bus 002 Device 002: ID 13b1:0041 Linksys Hi, have you tested this in case cdc_ether is for some reason already loaded? T

Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-20 Thread Oliver Neukum
Am Dienstag, den 19.09.2017, 13:53 -0700 schrieb Doug Anderson: > Hi, > > On Tue, Sep 19, 2017 at 1:37 PM, Oliver Neukum wrote: > > > > Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: > > > > > > In general when you've got a flag

Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-20 Thread Oliver Neukum
Am Dienstag, den 19.09.2017, 13:51 -0700 schrieb Guenter Roeck: > On Tue, Sep 19, 2017 at 1:37 PM, Oliver Neukum wrote: > > > > Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: > > > [..] > > > NOTES: > > > - No known bugs are fixed b

Re: [RFC PATCH 2/3] usbnet: Avoid potential races in usbnet_deferred_kevent()

2017-09-19 Thread Oliver Neukum
Am Dienstag, den 19.09.2017, 09:15 -0700 schrieb Douglas Anderson: > In general when you've got a flag communicating that "something needs > to be done" you want to clear that flag _before_ doing the task. If > you clear the flag _after_ doing the task you end up with the risk > that this will hap

Re: [RFC PATCH 1/3] usbnet: Get rid of spammy usbnet "kevent X may have been dropped"

2017-09-19 Thread Oliver Neukum
; can just keep an atomic count for that type of work and add a loop > into usbnet_deferred_kevent(). Thanks for doing this, it is overdue. Regards Oliver > Signed-off-by: Douglas Anderson Acked-by: Oliver Neukum

Re: [PATCH V3] Set NTB format again after altsetting switch for Huawei devices

2017-07-11 Thread Oliver Neukum
Am Dienstag, den 11.07.2017, 17:21 +0200 schrieb Enrico Mioso: > > Some firmwares in Huawei E3372H devices have been observed to switch back > to NTB 32-bit format after altsetting switch. > This patch implements a driver flag to check for the device settings and > set NTB format to 16-bit again i

Re: [PATCH net-next 1/2] r8152: split rtl8152_resume function

2017-06-12 Thread Oliver Neukum
Am Montag, den 12.06.2017, 16:21 +0800 schrieb Hayes Wang: > Split rtl8152_resume() into rtl8152_runtime_resume() and > rtl8152_system_resume(). > > Signed-off-by: Hayes Wang > --- >  drivers/net/usb/r8152.c | 99 > ++--- >  1 file changed, 61 insertion

[PATCH] r8152: give the device version

2017-06-12 Thread Oliver Neukum
Getting the device version out of the driver really aids debugging. Signed-off-by: Oliver Neukum --- drivers/net/usb/r8152.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index ddc62cb69be8..1a419a45e2a2 100644 --- a/drivers/net/usb

  1   2   3   >