Re: [PATCH net,stable] cdc_ether: fix rndis support for Mediatek based smartphones

2019-09-13 Thread David Miller
From: Bjørn Mork Date: Thu, 12 Sep 2019 10:42:00 +0200 > A Mediatek based smartphone owner reports problems with USB > tethering in Linux. The verbose USB listing shows a rndis_host > interface pair (e0/01/03 + 10/00/00), but the driver fails to > bind with > > [ 355.960428] usb 1-4: bad CDC d

Re: [PATCH] net: usb: Delete unnecessary checks before the macro call “dev_kfree_skb”

2019-08-22 Thread David Miller
From: Markus Elfring Date: Wed, 21 Aug 2019 22:24:16 +0200 > From: Markus Elfring > Date: Wed, 21 Aug 2019 22:16:02 +0200 > > The dev_kfree_skb() function performs also input parameter validation. > Thus the test around the shown calls is not needed. > > This issue was detected by using the Co

Re: [PATCH] net: kalmia: fix memory leaks

2019-08-18 Thread David Miller
From: Wenwen Wang Date: Wed, 14 Aug 2019 13:56:43 -0500 > In kalmia_init_and_get_ethernet_addr(), 'usb_buf' is allocated through > kmalloc(). In the following execution, if the 'status' returned by > kalmia_send_init_packet() is not 0, 'usb_buf' is not deallocated, leading > to memory leaks. To f

Re: [PATCH] cx82310_eth: fix a memory leak bug

2019-08-18 Thread David Miller
From: Wenwen Wang Date: Wed, 14 Aug 2019 13:03:38 -0500 > In cx82310_bind(), 'dev->partial_data' is allocated through kmalloc(). > Then, the execution waits for the firmware to become ready. If the firmware > is not ready in time, the execution is terminated. However, the allocated > 'dev->partia

Re: [PATCH] lan78xx: Fix memory leaks

2019-08-16 Thread David Miller
From: Wenwen Wang Date: Wed, 14 Aug 2019 11:23:13 -0500 > In lan78xx_probe(), a new urb is allocated through usb_alloc_urb() and > saved to 'dev->urb_intr'. However, in the following execution, if an error > occurs, 'dev->urb_intr' is not deallocated, leading to memory leaks. To fix > this issue,

Re: [PATCH net-next 5/5] r8152: change rx_frag_head_sz and rx_max_agg_num dynamically

2019-08-08 Thread David Miller
From: Hayes Wang Date: Fri, 9 Aug 2019 03:38:53 + > Jakub Kicinski [jakub.kicin...@netronome.com] > [..]> The kernel could support it. And I has finished it. >> > However, when I want to test it by ethtool, I couldn't find suitable >> > command. >> > I couldn't find relative feature in the s

Re: [PATCH] NFC: nfcmrvl: fix gpio-handling regression

2019-08-05 Thread David Miller
From: Johan Hovold Date: Mon, 5 Aug 2019 12:00:55 +0200 > Fix two reset-gpio sanity checks which were never converted to use > gpio_is_valid(), and make sure to use -EINVAL to indicate a missing > reset line also for the UART-driver module parameter and for the USB > driver. > > This specifical

Re: [PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-30 Thread David Miller
From: Arnd Bergmann Date: Tue, 30 Jul 2019 21:50:28 +0200 > Each of these drivers has a copy of the same trivial helper function to > convert the pointer argument and then call the native ioctl handler. > > We now have a generic implementation of that, so use it. > > Acked-by: Greg Kroah-Hartma

Re: [PATCH 2/2] net: usb: qmi_wwan: Add the BroadMobi BM818 card

2019-07-26 Thread David Miller
From: "Angus Ainslie (Purism)" Date: Wed, 24 Jul 2019 07:52:27 -0700 > From: Bob Ham > > The BroadMobi BM818 M.2 card uses the QMI protocol > > Signed-off-by: Bob Ham > Signed-off-by: Angus Ainslie (Purism) Applied, thanks.

Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Tue, 23 Jul 2019 10:16:27 +0800 > David Miller 于2019年7月23日周二 上午9:22写道: >> >> From: Chuhong Yuan >> Date: Mon, 22 Jul 2019 15:41:34 +0800 >> >> > Merge the combo uses of cpu_to_le32s and memcpy. >> > Use put_unaligne

Re: [PATCH] net: usb: Merge cpu_to_le32s + memcpy to put_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Mon, 22 Jul 2019 15:41:34 +0800 > Merge the combo uses of cpu_to_le32s and memcpy. > Use put_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Isn't the skb->data aligned to 4 bytes in these situations? If so, we should use the aligne

Re: [PATCH] net: lan78xx: Merge memcpy + lexx_to_cpus to get_unaligned_lexx

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Fri, 19 Jul 2019 15:36:15 +0800 > Merge the combo use of memcpy and lexx_to_cpus. > Use get_unaligned_lexx instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Applied.

Re: [PATCH] usbnet: smsc75xx: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Fri, 19 Jul 2019 16:27:31 +0800 > Merge the combo use of memcpy and le32_to_cpus. > Use get_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Applied.

Re: [PATCH] ax88179_178a: Merge memcpy + le32_to_cpus to get_unaligned_le32

2019-07-22 Thread David Miller
From: Chuhong Yuan Date: Fri, 19 Jul 2019 17:07:15 +0800 > Merge the combo use of memcpy and le32_to_cpus. > Use get_unaligned_le32 instead. > This simplifies the code. > > Signed-off-by: Chuhong Yuan Applied.

Re: [PATCH] usb: qmi_wwan: add D-Link DWM-222 A2 device ID

2019-07-18 Thread David Miller
From: Rogan Dawes Date: Wed, 17 Jul 2019 11:14:33 +0200 > Signed-off-by: Rogan Dawes Applied.

Re: [PATCH] ISDN: hfcsusb: checking idx of ep configuration

2019-07-15 Thread David Miller
From: Phong Tran Date: Mon, 15 Jul 2019 22:08:14 +0700 > The syzbot test with random endpoint address which made the idx is > overflow in the table of endpoint configuations. > > this adds the checking for fixing the error report from > syzbot > > KASAN: stack-out-of-bounds Read in hfcsusb_prob

Re: [PATCH net,stable] qmi_wwan: Fix out-of-bounds read

2019-06-24 Thread David Miller
From: Bjørn Mork Date: Mon, 24 Jun 2019 18:45:11 +0200 > The syzbot reported > > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0xca/0x13e lib/dump_stack.c:113 > print_address_description+0x67/0x231 mm/kasan/report.c:188 > __kasan_report.cold+0x1a/0x32 mm/kasan/rep

Re: [PATCH v3] usbnet: fix kernel crash after disconnect

2019-05-21 Thread David Miller
From: Kloetzke Jan Date: Tue, 21 May 2019 13:18:40 + > When disconnecting cdc_ncm the kernel sporadically crashes shortly > after the disconnect: ... > The crash happens roughly 125..130ms after the disconnect. This > correlates with the 'delay' timer that is started on certain USB tx/rx > e

Re: [PATCH v2] usbnet: fix kernel crash after disconnect

2019-05-20 Thread David Miller
From: Kloetzke Jan Date: Thu, 16 May 2019 07:10:30 + > Am Montag, den 06.05.2019, 10:17 +0200 schrieb Oliver Neukum: >> On So, 2019-05-05 at 00:45 -0700, David Miller wrote: >> > From: Kloetzke Jan >> > Date: Tue, 30 Apr 2019 14:15:07 + >> > >&

Re: [PATCH] r8152: Fix an error on RTL8153-BD MAC Address Passthrough support

2019-02-22 Thread David Miller
From: David Chen Date: Wed, 20 Feb 2019 13:47:19 +0800 > From: David Chen > > RTL8153-BD is used in Dell DA300 type-C dongle. > Added RTL8153-BD support to activate MAC address pass through on DA300. > Apply correction on previously submitted patch in net.git tree. > > Signed-off-by: David Che

Re: [PATCH] r8152: Add support for MAC address pass through on RTL8153-BD

2019-02-18 Thread David Miller
From: David Chen Date: Sat, 16 Feb 2019 17:16:42 +0800 > From: David Chen > > 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. > > Per confirming with Realtek all devices containing RTL8153-BD should > acti

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 David Miller
Where is patch #1?

Re: [PATCH] qmi_wwan: apply SET_DTR quirk to Sierra WP7607

2019-02-17 Thread David Miller
From: Beniamino Galvani Date: Fri, 15 Feb 2019 13:20:42 +0100 > The 1199:68C0 USB ID is reused by Sierra WP7607 which requires the DTR > quirk to be detected. Apply QMI_QUIRK_SET_DTR unconditionally as > already done for other IDs shared between different devices. > > Signed-off-by: Beniamino Ga

Re: [PATCH net-next] net: usb: cdc-phonet: use struct_size() in alloc_netdev()

2019-02-08 Thread David Miller
From: "Gustavo A. R. Silva" Date: Thu, 7 Feb 2019 21:13:13 -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 foo

Re: [PATCH net-next] net: usb: rtl8150: mark expected switch fall-through

2019-02-08 Thread David Miller
From: "Gustavo A. R. Silva" Date: Fri, 8 Feb 2019 13:09:06 -0600 > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > Warning level 3 was used: -Wimplicit-fallthrough=3 > > This patch is part of the ongoing efforts to enabling > -W

Re: [PATCH net-next] net: usb: pegasus: Mark expected switch fall-through

2019-02-08 Thread David Miller
From: "Gustavo A. R. Silva" Date: Fri, 8 Feb 2019 13:07:29 -0600 > In preparation to enabling -Wimplicit-fallthrough, mark switch > cases where we are expecting to fall through. > > Warning level 3 was used: -Wimplicit-fallthrough=3 > > This patch is part of the ongoing efforts to enabling > -W

Re: [PATCH] net: usb: asix: ax88772_bind return error when hw_reset fail

2019-01-24 Thread David Miller
From: Zhang Run Date: Thu, 24 Jan 2019 13:48:49 +0800 > The ax88772_bind() should return error code immediately when the PHY > was not reset properly through ax88772a_hw_reset(). > Otherwise, The asix_get_phyid() will block when get the PHY > Identifier from the PHYSID1 MII registers through asi

Re: [PATCH net-next] net: usb: rtl8150: remove set but not used variable 'rx_stat'

2019-01-19 Thread David Miller
From: YueHaibing Date: Fri, 18 Jan 2019 02:06:49 + > From: Yue Haibing > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/usb/rtl8150.c: In function 'read_bulk_callback': > drivers/net/usb/rtl8150.c:391:6: warning: > variable 'rx_stat' set but not used [-Wunused-but-set-va

Re: [PATCH 15/21] sparc: add checks for the return value of memblock_alloc*()

2019-01-16 Thread David Miller
From: Mike Rapoport Date: Wed, 16 Jan 2019 15:44:15 +0200 > Add panic() calls if memblock_alloc*() returns NULL. > > Most of the changes are simply addition of > > if(!ptr) > panic(); > > statements after the calls to memblock_alloc*() variants. > > Exceptions are pcpu

Re: [PATCH] cdc_ether: trivial whitespace readability fix

2019-01-07 Thread David Miller
From: Bjørn Mork Date: Sat, 5 Jan 2019 14:32:39 +0100 > This function is unreadable enough without indenting mismatches > and unnecessary line breaks. > > Signed-off-by: Bjørn Mork Applied, thanks.

Re: [PATCH] r8152: Add support for MAC address pass through on RTL8153-BND

2018-12-14 Thread David Miller
From: Mario Limonciello Date: Tue, 11 Dec 2018 08:16:14 -0600 > All previous docks and dongles that have supported this feature use > the RTL8153-AD chip. > > RTL8153-BND is a new chip that will be used in upcoming Dell type-C docks. > It should be added to the whitelist of devices to activate M

Re: [PATCH net 0/2] aqc111: Thermal throttling feature

2018-12-12 Thread David Miller
From: Igor Russkikh Date: Wed, 12 Dec 2018 13:50:06 + > This patches introduce the thermal throttling feature to prevent possible > heat damage to the hardware. I see what seems to be a bit of a conflict here, maybe you can explain the situation better to me. Andrew suggested that the firmw

Re: [PATCH v3] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-12 Thread David Miller
From: Greg KH Date: Wed, 12 Dec 2018 12:42:24 +0100 > From: Hui Peng > > The function hso_probe reads if_num from the USB device (as an u8) and uses > it without a length check to index an array, resulting in an OOB memory read > in hso_probe or hso_get_config_data. > > Add a length check for

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in

2018-12-09 Thread David Miller
From: Mathias Payer Date: Sun, 9 Dec 2018 21:17:58 +0100 > I've attached the updated patch. (Greg, please add your Signed-off-by). Patches should be posted inline, not as attachments as per process/submitting-patches.rst

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data,Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread David Miller
From: Mathias Payer Date: Sun, 9 Dec 2018 21:02:25 +0100 > Passing an int to the macro results in a compiler warning. One option would be > to test for the individual errors (instead of using the macro) with the > drawback > that future extensions that return different errors may be missed. Anot

Re: [PATCH] USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data

2018-12-09 Thread David Miller
From: Greg KH Date: Sun, 9 Dec 2018 17:32:45 +0100 > + } else { > port_spec = hso_get_config_data(interface); > + if (IS_ERR_VALUE((long)port_spec)) > + goto exit; 'port_spec' is an 'int', it makes no sense to cast it 3 times all the way back to

Re: [PATCH v4 net-next 00/21] Add support for Aquantia AQtion USB to 5/2.5GbE devices

2018-11-27 Thread David Miller
From: Igor Russkikh Date: Mon, 26 Nov 2018 09:32:56 + > This patchset introduces support for new multigig ethernet to USB dongle, > developed jointly by Aquantia (Phy) and ASIX (USB MAC). Series applied, thanks.

Re: [PATCH] usbnet: ipheth: fix potential recvmsg bug and recvmsg bug 2

2018-11-27 Thread David Miller
From: Bernd Eckstein <3erndeckst...@gmail.com> Date: Fri, 23 Nov 2018 13:51:26 +0100 > The bug is not easily reproducable, as it may occur very infrequently > (we had machines with 20minutes heavy downloading before it occurred) > However, on a virual machine (VMWare on Windows 10 host) it occurre

Re: [PATCH v3 net-next 13/21] net: usb: aqc111: Add support for TSO

2018-11-22 Thread David Miller
From: Igor Russkikh Date: Wed, 21 Nov 2018 10:13:48 + > @@ -832,6 +832,10 @@ static struct sk_buff *aqc111_tx_fixup(struct usbnet > *dev, struct sk_buff *skb, > /*Length of actual data*/ > tx_desc |= skb->len & AQ_TX_DESC_LEN_MASK; > > + /* TSO MSS */ > + tx_desc |= ((u

Re: [PATCH v3 net-next 10/21] net: usb: aqc111: Add checksum offload support

2018-11-22 Thread David Miller
From: Igor Russkikh Date: Wed, 21 Nov 2018 10:13:42 + > +static void aqc111_rx_checksum(struct sk_buff *skb, u64 *pkt_desc) > +{ ... > + /* checksum error bit is set */ > + if (*pkt_desc & AQ_RX_PD_L4_ERR || *pkt_desc & AQ_RX_PD_L3_ERR) > + return; ... > @@ -661,6 +698,7

Re: [PATCH v3 net-next 09/21] net: usb: aqc111: Implement RX data path

2018-11-22 Thread David Miller
From: Igor Russkikh Date: Wed, 21 Nov 2018 10:13:39 + > + desc_hdr = *(u64 *)skb_tail_pointer(skb); > + le64_to_cpus(&desc_hdr); This is: desc_hdr = le64_to_cpup(skb_tail_pointer(skb)); > + /* Get the first RX packet descriptor */ > + pkt_desc = (u64 *)(skb->data +

Re: [PATCH v3 net-next 08/21] net: usb: aqc111: Implement TX data path

2018-11-22 Thread David Miller
From: Igor Russkikh Date: Wed, 21 Nov 2018 10:13:37 + > + if (padding_size != 0) > + skb_put(skb, padding_size); I think you want to use skb_put_zero() here rather than leaving it uninitialized. I know it's padding, but if for some reason this leaks onto the wire or elsewher

Re: SMSC95xx driver updates (round 1)

2018-11-16 Thread David Miller
From: Ben Dooks Date: Wed, 14 Nov 2018 11:50:18 + > This is a series of a few driver cleanups and some fixups of the code > for the SMSC95XX driver. There have been a few reviews, and the issues > have been fixed so this should be ready for merging. > > I will work on the tx-alignment and th

Re: [PATCH] net: smsc95xx: Fix MTU range

2018-11-08 Thread David Miller
From: Stefan Wahren Date: Thu, 8 Nov 2018 20:38:26 +0100 > The commit f77f0aee4da4 ("net: use core MTU range checking in USB NIC > drivers") introduce a common MTU handling for usbnet. But it's missing > the necessary changes for smsc95xx. So set the MTU range accordingly. > > This patch has be

Re: [PATCH v2] usbnet: smsc95xx: disable carrier check while suspending

2018-11-02 Thread David Miller
From: Frieder Schrempf Date: Wed, 31 Oct 2018 22:52:19 +0100 > We need to make sure, that the carrier check polling is disabled > while suspending. Otherwise we can end up with usbnet_read_cmd() > being issued when only usbnet_read_cmd_nopm() is allowed. If this > happens, read operations lock up

Re: [PATCH net-next] net: cdc_ncm: remove set but not used variable 'ctx'

2018-10-12 Thread David Miller
From: YueHaibing Date: Fri, 12 Oct 2018 01:49:13 + > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/usb/cdc_ncm.c: In function 'cdc_ncm_status': > drivers/net/usb/cdc_ncm.c:1603:22: warning: > variable 'ctx' set but not used [-Wunused-but-set-variable] > struct cdc_ncm_ctx

Re: [PATCH] net: cdc_ncm: use tasklet_init() for tasklet_struct init

2018-10-11 Thread David Miller
From: Ben Dooks Date: Thu, 11 Oct 2018 14:03:32 +0100 > The tasklet initialisation would be better done by tasklet_init() > instead of assuming all the fields are in an ok state by default. > > This does not fix any actual know bug. > > Signed-off-by: Ben Dooks Applied to net-next.

Re: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-06 Thread David Miller
From: Ben Dooks Date: Sat, 06 Oct 2018 12:27:27 +0100 > Thanks, got a new version of the series just being tested with this. > Should it go into the original, or as a separate change? Into the original.

Re: [PATCH] usbnet: smsc95xx: simplify tx_fixup code

2018-10-05 Thread David Miller
From: Ben Dooks Date: Tue, 2 Oct 2018 17:56:02 +0100 > - memcpy(skb->data, &tx_cmd_a, 4); > + ptr = skb_push(skb, 8); > + tx_cmd_a = cpu_to_le32(tx_cmd_a); > + tx_cmd_b = cpu_to_le32(tx_cmd_b); > + memcpy(ptr, &tx_cmd_a, 4); > + memcpy(ptr+4, &tx_cmd_b, 4); Even a memcpy

Re: [PATCH net-next 06/19] net: usb: aqc111: Introduce link management

2018-10-05 Thread David Miller
From: Igor Russkikh Date: Fri, 5 Oct 2018 10:24:55 + > + switch (aqc111_data->link_speed) { > + case AQ_INT_SPEED_5G: > + { > + link_speed = 5000; > + reg8 = 0x05; > + reg16 = 0x001F; > + break; > + } Please do not put curly bra

Re: [PATCH net-next 03/19] net: usb: aqc111: Add implementation of read and write commands

2018-10-05 Thread David Miller
From: Igor Russkikh Date: Fri, 5 Oct 2018 10:24:44 + > +static int __aqc111_read_cmd(struct usbnet *dev, u8 cmd, u16 value, > + u16 index, u16 size, void *data, int nopm) > +{ > + int ret; > + int (*fn)(struct usbnet *dev, u8 cmd, u8 reqtype, u16 value, > +

Re: [PATCH net-next 02/19] net: usb: aqc111: Add bind and empty unbind callbacks

2018-10-05 Thread David Miller
From: Igor Russkikh Date: Fri, 5 Oct 2018 10:24:42 + > +static int aqc111_bind(struct usbnet *dev, struct usb_interface *intf) > +{ > + int ret; > + struct usb_device *udev = interface_to_usbdev(intf); Please always order local variable declarations from longest to shortest line (rev

Re: [PATCH] net/usb: cancel pending work when unbinding smsc75xx

2018-10-04 Thread David Miller
From: Yu Zhao Date: Fri, 28 Sep 2018 17:04:30 -0600 > Cancel pending work before freeing smsc75xx private data structure > during binding. This fixes the following crash in the driver: > > BUG: unable to handle kernel NULL pointer dereference at 0050 > IP: mutex_lock+0x2b/0x3f > > W

Re: [PATCH] net: usbnet: make driver_info const

2018-10-02 Thread David Miller
From: Ben Dooks Date: Mon, 1 Oct 2018 17:02:43 +0100 > From: Ben Dooks > > The driver_info field that is used for describing each of the usb-net > drivers using the usbnet.c core all declare their information as const > and the usbnet.c itself does not try and modify the struct. > > It is the

Re: [PATCH net v2 0/7] net: usb: Check for Wake-on-LAN modes

2018-09-29 Thread David Miller
From: Florian Fainelli Date: Fri, 28 Sep 2018 16:18:49 -0700 > Most of our USB Ethernet drivers don't seem to be checking properly > whether the user is supplying a correct Wake-on-LAN mode to enter, so > the experience as an user could be confusing, since it would generally > lead to either no w

Re: [PATCH net 0/7] net: usb: Check for Wake-on-LAN modes

2018-09-26 Thread David Miller
From: Florian Fainelli Date: Mon, 24 Sep 2018 13:54:13 -0700 > Most of our USB Ethernet drivers don't seem to be checking properly > whether the user is supplying a correct Wake-on-LAN mode to enter, so > the experience as an user could be confusing, since it would generally > lead to either no w

Re: [PATCH net-next 00/22] net: fix return type of ndo_start_xmit function

2018-09-20 Thread David Miller
From: YueHaibing Date: Thu, 20 Sep 2018 20:32:44 +0800 > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, so make sure the implementation in > this driver has returns 'netdev_tx_t' value, and change the function > return type to netdev_t

Re: [PATCH net,stable] qmi_wwan: set DTR for modems in forced USB2 mode

2018-09-17 Thread David Miller
From: Bjørn Mork Date: Mon, 17 Sep 2018 22:00:24 +0200 > Recent firmware revisions have added the ability to force > these modems to USB2 mode, hiding their SuperSpeed > capabilities from the host. The driver has been using the > SuperSpeed capability, as shown by the bcdUSB field of the > devic

Re: [PATCH] net: usb: remove redundant null pointer check before of_node_put

2018-09-17 Thread David Miller
From: zhong jiang Date: Sun, 16 Sep 2018 21:20:17 +0800 > of_node_put has taken the null pointer check into account. So it is > safe to remove the duplicated check before of_node_put. > > Signed-off-by: zhong jiang Applied.

Re: [PATCH V2 0/4 next] net: lan78xx: Minor improvements

2018-09-05 Thread David Miller
From: Stefan Wahren Date: Tue, 4 Sep 2018 19:29:08 +0200 > This patch series contains some minor improvements for the lan78xx > driver. > > Changes in V2: > - Keep Copyright comment as multi-line > - Add Raghuram's Reviewed-by Series applied, thanks.

Re: [PATCH net-next] net: usbnet: mark expected switch fall-through

2018-09-04 Thread David Miller
From: "Gustavo A. R. Silva" Date: Mon, 3 Sep 2018 13:48:45 -0500 > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Addresses-Coverity-ID: 1077614 ("Missing break in switch") > Signed-off-by: Gustavo A. R. Silva Applied, thank y

Re: [PATCH net-next v2 0/2] of: mdio: Fall back to mdiobus_register() with NULL device_node

2018-05-16 Thread David Miller
From: Florian Fainelli Date: Tue, 15 May 2018 16:56:17 -0700 > This patch series updates of_mdiobus_register() such that when the device_node > argument is NULL, it calls mdiobus_register() directly. This is consistent > with > the behavior of of_mdiobus_register() when CONFIG_OF=n. > > I only

Re: [PATCH net,stable] qmi_wwan: do not steal interfaces from class drivers

2018-05-03 Thread David Miller
From: Bjørn Mork Date: Wed, 2 May 2018 22:22:54 +0200 > The USB_DEVICE_INTERFACE_NUMBER matching macro assumes that > the { vendorid, productid, interfacenumber } set uniquely > identifies one specific function. This has proven to fail > for some configurable devices. One example is the Quectel

Re: [PATCH] NET: usb: qmi_wwan: add support for ublox R410M PID 0x90b2

2018-04-27 Thread David Miller
From: SZ Lin (林上智) Date: Thu, 26 Apr 2018 14:30:13 +0800 > This patch adds support for PID 0x90b2 of ublox R410M. > > qmicli -d /dev/cdc-wdm0 --dms-get-manufacturer > [/dev/cdc-wdm0] Device manufacturer retrieved: > Manufacturer: 'u-blox' > > qmicli -d /dev/cdc-wdm0 --dms-get-model > [/

Re: [PATCH v4 0/3] lan78xx: Read configuration from Device Tree

2018-04-20 Thread David Miller
From: Phil Elwell Date: Thu, 19 Apr 2018 17:59:37 +0100 > The Microchip LAN78XX family of devices are Ethernet controllers with > a USB interface. Despite being discoverable devices it can be useful to > be able to configure them from Device Tree, particularly in low-cost > applications without a

Re: [PATCH] net: qmi_wwan: add Wistron Neweb D19Q1

2018-04-19 Thread David Miller
From: Pawel Dembicki Date: Wed, 18 Apr 2018 16:03:24 +0200 > This modem is embedded on dlink dwr-960 router. > The oem configuration states: ... > Tested on openwrt distribution > > Signed-off-by: Pawel Dembicki Applied and queued up for -stable. -- To unsubscribe from this list: send the lin

Re: [PATCH] lan78xx: Don't reset the interface on open

2018-04-11 Thread David Miller
From: Phil Elwell Date: Tue, 10 Apr 2018 13:18:25 +0100 > Commit 92571a1aae40 ("lan78xx: Connect phy early") moves the PHY > initialisation into lan78xx_probe, but lan78xx_open subsequently calls > lan78xx_reset. As well as forcing a second round of link negotiation, > this reset frequently preve

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

2018-04-11 Thread David Miller
From: Oliver Neukum Date: Wed, 11 Apr 2018 13:25:38 +0200 > Am Mittwoch, den 11.04.2018, 13:15 +0200 schrieb Bassem Boubaker: >>     The Cinterion AHS8 is a 3G device with one embedded WWAN interface >>     using cdc_ether as a driver. >> >>     The modem is  controlled via AT commands through t

Re: [PATCH] lan78xx: Avoid spurious kevent 4 "error"

2018-04-11 Thread David Miller
From: Phil Elwell Date: Wed, 11 Apr 2018 12:02:47 +0100 > lan78xx_defer_event generates an error message whenever the work item > is already scheduled. lan78xx_open defers three events - > EVENT_STAT_UPDATE, EVENT_DEV_OPEN and EVENT_LINK_RESET. Being aware > of the likelihood (or certainty) of an

Re: [PATCH] lan78xx: Correctly indicate invalid OTP

2018-04-11 Thread David Miller
From: Phil Elwell Date: Wed, 11 Apr 2018 10:59:17 +0100 > lan78xx_read_otp tries to return -EINVAL in the event of invalid OTP > content, but the value gets overwritten before it is returned and the > read goes ahead anyway. Make the read conditional as it should be > and preserve the error code.

Re: [PATCH v2] lan78xx: Connect phy early

2018-04-04 Thread David Miller
From: Alexander Graf Date: Wed, 4 Apr 2018 00:19:35 +0200 > When using wicked with a lan78xx device attached to the system, we > end up with ethtool commands issued on the device before an ifup > got issued. That lead to the following crash: > ... > The culprit is quite simple: The driver trie

Re: [PATCH v3 2/2] net: usb: asix88179_178a: de-duplicate code

2018-04-02 Thread David Miller
From: Marc Zyngier Date: Mon, 02 Apr 2018 10:45:40 +0100 > What has changed between this patch and the previous one? Having a bit > of a change-log would certainly help. Also, I would have appreciated a > reply to the questions I had on v2 before you posted a third version. Agreed, and I'm not a

Re: [PATCH v2 2/2] net: usb: asix88179_178a: de-duplicate code

2018-04-01 Thread David Miller
From: Marc Zyngier Date: Sat, 31 Mar 2018 12:16:05 + > I'd suggest that this patch is reverted until we understand what is > actually going on here. Yep, makes sense, reverted. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.

Re: [PATCHv2] net/usb/qmi_wwan.c: Add USB id for lt4120 modem

2018-03-26 Thread David Miller
From: Torsten Hilbrich Date: Mon, 26 Mar 2018 07:19:57 +0200 > This is needed to support the modem found in HP EliteBook 820 G3. > > Signed-off-by: Torsten Hilbrich Applied, thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...

Re: [PATCH] net: qmi_wwan: add BroadMobi BM806U 2020:2033

2018-03-26 Thread David Miller
From: Pawel Dembicki Date: Sat, 24 Mar 2018 22:08:14 +0100 > BroadMobi BM806U is an Qualcomm MDM9225 based 3G/4G modem. > Tested hardware BM806U is mounted on D-Link DWR-921-C3 router. > The USB id is added to qmi_wwan.c to allow QMI communication with > the BM806U. > > Tested on 4.14 kernel and

Re: [PATCH 4/4] drivers/net: Use octal not symbolic permissions

2018-03-26 Thread David Miller
From: Joe Perches Date: Fri, 23 Mar 2018 15:54:39 -0700 > Prefer the direct use of octal for permissions. > > Done with checkpatch -f --types=SYMBOLIC_PERMS --fix-inplace > and some typing. > > Miscellanea: > > o Whitespace neatening around these conversions. > > Signed-off-by: Joe Perches

Re: [PATCH] net/usb/qmi_wwan.c: Add USB id for lt4120 modem

2018-03-25 Thread David Miller
From: Torsten Hilbrich Date: Fri, 23 Mar 2018 14:26:18 +0100 > This is needed to support the modem found in HP EliteBook 820 G3. > > Signed-off-by: Torsten Hilbrich This patch was corrupted by your email client, it transformed TAB characters into sequence of spaces. Please email the patch to

Re: [PATCH] net: drivers/net: Remove unnecessary skb_copy_expand OOM messages

2018-03-15 Thread David Miller
From: Joe Perches Date: Mon, 12 Mar 2018 08:07:12 -0700 > skb_copy_expand without __GFP_NOWARN already does a dump_stack > on OOM so these messages are redundant. > > Signed-off-by: Joe Perches Ok, applied to net-next, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-

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

2018-03-07 Thread David Miller
From: Johan Hovold Date: Wed, 7 Mar 2018 10:46:57 +0100 > Drop bogus call to usb_driver_release_interface() from an error path in > the usbnet bind() callback, which is called during interface probe. At > this point the interface is not bound and usb_driver_release_interface() > returns early. >

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

2018-03-07 Thread David Miller
From: Johan Hovold Date: Wed, 7 Mar 2018 10:46:58 +0100 > Drop bogus call to usb_driver_release_interface() from an error path in > the usbnet bind() callback, which is called during interface probe. At > this point the interface is not bound and usb_driver_release_interface() > returns early. >

Re: [PATCH net] net: usbnet: fix potential deadlock on 32bit hosts

2018-03-07 Thread David Miller
From: Eric Dumazet Date: Mon, 05 Mar 2018 11:41:13 -0800 > From: Eric Dumazet > > Marek reported a LOCKDEP issue occurring on 32bit host, > that we tracked down to the fact that usbnet could either > run from soft or hard irqs. > > This patch adds u64_stats_update_begin_irqsave() and > u64_sta

Re: [PATCH 2/2] net: usb: asix88179_178a: de-duplicate code

2018-03-04 Thread David Miller
From: Alexander Kurz Date: Wed, 28 Feb 2018 21:27:39 + > -static int ax88179_bind(struct usbnet *dev, struct usb_interface *intf) > +static int ax88179_link_bind_or_reset(struct usbnet *dev, int do_reset) "do_reset" is a boolean, therefore please use type 'bool' and true/false. Thank you. -

Re: [PATCH] net/usb/kalmia: use ARRAY_SIZE for various array sizing calculations

2018-03-02 Thread David Miller
From: Colin King Date: Fri, 2 Mar 2018 13:42:39 + > From: Colin Ian King > > Use the ARRAY_SIZE macro on a couple of arrays to determine > size of the arrays. Also fix up alignment to clean up a checkpatch > warning. Improvement suggested by Coccinelle. > > Signed-off-by: Colin Ian King

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

2018-02-27 Thread David Miller
From: Bassem Boubaker Date: Tue, 27 Feb 2018 14:04:44 +0100 > The Cinterion PL8 is an LTE modem with 2 possible WWAN interfaces. > > The modem is controlled via AT commands through the exposed TTYs. > > AT^SWWAN write command can be used to activate or deactivate a WWAN > conne

Re: [PATCH net 0/2] r8152: fix rx issues

2018-02-02 Thread David Miller
From: Hayes Wang Date: Fri, 2 Feb 2018 16:43:34 +0800 > The two patched are used to fix rx issues. Series applied. -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordom

Re: [PATCH 2/2] sparc,leon: Select USB_UHCI_BIG_ENDIAN_{MMIO,DESC}

2018-01-31 Thread David Miller
From: James Hogan Date: Wed, 31 Jan 2018 22:24:46 + > Now that USB_UHCI_BIG_ENDIAN_MMIO and USB_UHCI_BIG_ENDIAN_DESC are moved > outside of the USB_SUPPORT conditional, simply select them from > SPARC_LEON rather than by the symbol's defaults in drivers/usb/Kconfig, > similar to how it is don

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-18 Thread David Miller
From: Hayes Wang Date: Thu, 18 Jan 2018 03:04:08 + > [...] >> > r8153 on Dell TB15/16 dock corrupts rx packets. >> > >> > This change is suggested by Realtek. They guess that the XHCI >> > controller doesn't have enough buffer, and their guesswork is correct, >> > once the RX aggregation gets

Re: [PATCH v2] r8152: disable RX aggregation on Dell TB16 dock

2018-01-17 Thread David Miller
From: Kai-Heng Feng Date: Tue, 16 Jan 2018 16:46:27 +0800 > r8153 on Dell TB15/16 dock corrupts rx packets. > > This change is suggested by Realtek. They guess that the XHCI controller > doesn't have enough buffer, and their guesswork is correct, once the RX > aggregation gets disabled, the issu

Re: [PATCH] NET: usb: qmi_wwan: add support for YUGA CLM920-NC5 PID 0x9625

2018-01-02 Thread David Miller
From: SZ Lin (林上智) Date: Fri, 29 Dec 2017 17:02:17 +0800 > This patch adds support for PID 0x9625 of YUGA CLM920-NC5. > > YUGA CLM920-NC5 needs to enable QMI_WWAN_QUIRK_DTR before QMI operation. > > qmicli -d /dev/cdc-wdm0 -p --dms-get-revision > [/dev/cdc-wdm0] Device revision retrieved: >

Re: [PATCH net-next] qmi_wwan: set FLAG_SEND_ZLP to avoid network initiated disconnect

2017-12-15 Thread David Miller
From: Bjørn Mork Date: Thu, 14 Dec 2017 19:55:50 +0100 > It has been reported that the dummy byte we add to avoid > ZLPs can be forwarded by the modem to the PGW/GGSN, and that > some operators will drop the connection if this happens. > > In theory, QMI devices are based on CDC ECM and should a

Re: [PATCH net,stable] net: qmi_wwan: add Sierra EM7565 1199:9091

2017-12-13 Thread David Miller
From: ssjoh...@mac.com Date: Mon, 11 Dec 2017 21:51:14 +0100 > From: Sebastian Sjoholm > > Sierra Wireless EM7565 is an Qualcomm MDM9x50 based M.2 modem. > The USB id is added to qmi_wwan.c to allow QMI communication > with the EM7565. > > Signed-off-by: Sebastian Sjoholm > Acked-by: Bjørn Mo

Re: [PATCH] usbnet: fix alignment for frames with no ethernet header

2017-12-07 Thread David Miller
From: Bjørn Mork Date: Thu, 07 Dec 2017 20:01:16 +0100 > David Miller writes: > >> From: Bjørn Mork >> Date: Wed, 6 Dec 2017 20:21:24 +0100 >> >>> The qmi_wwan minidriver support a 'raw-ip' mode where frames are >>> received witho

Re: [PATCH] usbnet: fix alignment for frames with no ethernet header

2017-12-06 Thread David Miller
From: Bjørn Mork Date: Wed, 6 Dec 2017 20:21:24 +0100 > The qmi_wwan minidriver support a 'raw-ip' mode where frames are > received without any ethernet header. This causes alignment issues > because the skbs allocated by usbnet are "IP aligned". > > Fix by allowing minidrivers to disable the a

Re: [PATCH net,stable] net: qmi_wwan: add Quectel BG96 2c7c:0296

2017-11-21 Thread David Miller
From: Sebastian Sjoholm Date: Mon, 20 Nov 2017 19:05:17 +0100 > Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both > CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development > board (EVB). The USB id is added to qmi_wwan.c to allow QMI > communication with the

Re: [PATCH] usbnet: ipheth: fix potential null pointer dereference in ipheth_carrier_set

2017-11-18 Thread David Miller
From: "Gustavo A. R. Silva" Date: Fri, 17 Nov 2017 14:02:09 -0600 > _dev_ is being dereferenced before it is null checked, hence there > is a potential null pointer dereference. > > Fix this by moving the pointer dereference after _dev_ has been null > checked. > > Addresses-Coverity-ID: 146202

Re: [PATCH] net: usb: hso.c: remove unneeded DRIVER_LICENSE #define

2017-11-17 Thread David Miller
From: Greg Kroah-Hartman Date: Fri, 17 Nov 2017 15:19:39 +0100 > There is no need to #define the license of the driver, just put it in > the MODULE_LICENSE() line directly as a text string. > > This allows tools that check that the module license matches the source > code license to work properl

Re: [PATCH net,stable] net: cdc_ncm: GetNtbFormat endian fix

2017-11-15 Thread David Miller
From: Bjørn Mork Date: Wed, 15 Nov 2017 09:35:02 +0100 > The GetNtbFormat and SetNtbFormat requests operate on 16 bit little > endian values. We get away with ignoring this most of the time, because > we only care about USB_CDC_NCM_NTB16_FORMAT which is 0x. This > fails for USB_CDC_NCM_NTB32

Re: [PATCH net] qmi_wwan: Add missing skb_reset_mac_header-call

2017-11-07 Thread David Miller
From: Kristian Evensen Date: Tue, 7 Nov 2017 13:47:56 +0100 > When we receive a packet on a QMI device in raw IP mode, we should call > skb_reset_mac_header() to ensure that skb->mac_header contains a valid > offset in the packet. While it shouldn't really matter, the packets have > no MAC heade

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

2017-11-07 Thread David Miller
From: Bjørn Mork Date: Mon, 6 Nov 2017 15:37:22 +0100 > 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 Applied and queued up for

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

2017-11-07 Thread David Miller
From: Bjørn Mork Date: Mon, 6 Nov 2017 15:32:18 +0100 > A CDC Ethernet functional descriptor with wMaxSegmentSize = 0 will > cause a divide error in usbnet_probe: > > divide error: [#1] PREEMPT SMP KASAN ... > Fix by simply ignoring the bogus descriptor, as it is optional > for QMI device

  1   2   3   4   5   6   7   8   >