<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/usb, branch v5.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-09-13T20:08:13Z</updated>
<entry>
<title>cdc_ether: fix rndis support for Mediatek based smartphones</title>
<updated>2019-09-13T20:08:13Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2019-09-12T08:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d7ffcf3bf1be98d876c570cab8fc31d9fa92725'/>
<id>urn:sha1:4d7ffcf3bf1be98d876c570cab8fc31d9fa92725</id>
<content type='text'>
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 descriptors

The problem is a failsafe test intended to filter out ACM serial
functions using the same 02/02/ff class/subclass/protocol as RNDIS.
The serial functions are recognized by their non-zero bmCapabilities.

No RNDIS function with non-zero bmCapabilities were known at the time
this failsafe was added. But it turns out that some Wireless class
RNDIS functions are using the bmCapabilities field. These functions
are uniquely identified as RNDIS by their class/subclass/protocol, so
the failing test can safely be disabled.  The same applies to the two
types of Misc class RNDIS functions.

Applying the failsafe to Communication class functions only retains
the original functionality, and fixes the problem for the Mediatek based
smartphone.

Tow examples of CDC functional descriptors with non-zero bmCapabilities
from Wireless class RNDIS functions are:

0e8d:000a  Mediatek Crosscall Spider X5 3G Phone

      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x0f
          connection notifications
          sends break
          line coding and serial state
          get/set/clear comm features
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          1

and

19d2:1023  ZTE K4201-z

      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          1
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1

The Mediatek example is believed to apply to most smartphones with
Mediatek firmware.  The ZTE example is most likely also part of a larger
family of devices/firmwares.

Suggested-by: Lars Melin &lt;larsm17@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>r8152: remove calling netif_napi_del</title>
<updated>2019-08-28T23:02:32Z</updated>
<author>
<name>Hayes Wang</name>
<email>hayeswang@realtek.com</email>
</author>
<published>2019-08-28T01:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=973dc6cfc0e2c43ff29ca5645ceaf1ae694ea110'/>
<id>urn:sha1:973dc6cfc0e2c43ff29ca5645ceaf1ae694ea110</id>
<content type='text'>
Remove unnecessary use of netif_napi_del. This also avoids to call
napi_disable() after netif_napi_del().

Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Revert "r8152: napi hangup fix after disconnect"</title>
<updated>2019-08-28T23:02:32Z</updated>
<author>
<name>Hayes Wang</name>
<email>hayeswang@realtek.com</email>
</author>
<published>2019-08-28T01:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49d4b14113cae1410eb4654ada5b9583bad971c4'/>
<id>urn:sha1:49d4b14113cae1410eb4654ada5b9583bad971c4</id>
<content type='text'>
This reverts commit 0ee1f4734967af8321ecebaf9c74221ace34f2d5.

The commit 0ee1f4734967 ("r8152: napi hangup fix after
disconnect") adds a check about RTL8152_UNPLUG to determine
if calling napi_disable() is invalid in rtl8152_close(),
when rtl8152_disconnect() is called. This avoids to use
napi_disable() after calling netif_napi_del().

Howver, commit ffa9fec30ca0 ("r8152: set RTL8152_UNPLUG
only for real disconnection") causes that RTL8152_UNPLUG
is not always set when calling rtl8152_disconnect().
Therefore, I have to revert commit 0ee1f4734967 ("r8152:
napi hangup fix after disconnect"), first. And submit
another patch to fix it.

Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>r8152: Set memory to all 0xFFs on failed reg reads</title>
<updated>2019-08-26T02:52:59Z</updated>
<author>
<name>Prashant Malani</name>
<email>pmalani@chromium.org</email>
</author>
<published>2019-08-24T08:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f53a7ad189594a112167efaf17ea8d0242b5ac00'/>
<id>urn:sha1:f53a7ad189594a112167efaf17ea8d0242b5ac00</id>
<content type='text'>
get_registers() blindly copies the memory written to by the
usb_control_msg() call even if the underlying urb failed.

This could lead to junk register values being read by the driver, since
some indirect callers of get_registers() ignore the return values. One
example is:
  ocp_read_dword() ignores the return value of generic_ocp_read(), which
  calls get_registers().

So, emulate PCI "Master Abort" behavior by setting the buffer to all
0xFFs when usb_control_msg() fails.

This patch is copied from the r8152 driver (v2.12.0) published by
Realtek (www.realtek.com).

Signed-off-by: Prashant Malani &lt;pmalani@chromium.org&gt;
Acked-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: kalmia: fix memory leaks</title>
<updated>2019-08-18T20:03:21Z</updated>
<author>
<name>Wenwen Wang</name>
<email>wenwen@cs.uga.edu</email>
</author>
<published>2019-08-14T18:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1472cb09f11ddb41d4be84f0650835cb65a9073'/>
<id>urn:sha1:f1472cb09f11ddb41d4be84f0650835cb65a9073</id>
<content type='text'>
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 fix this issue, add the 'out' label to free 'usb_buf'.

Signed-off-by: Wenwen Wang &lt;wenwen@cs.uga.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>cx82310_eth: fix a memory leak bug</title>
<updated>2019-08-18T20:01:54Z</updated>
<author>
<name>Wenwen Wang</name>
<email>wenwen@cs.uga.edu</email>
</author>
<published>2019-08-14T18:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1eca92eef18719027d394bf1a2d276f43e7cf886'/>
<id>urn:sha1:1eca92eef18719027d394bf1a2d276f43e7cf886</id>
<content type='text'>
In cx82310_bind(), 'dev-&gt;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-&gt;partial_data' is not deallocated on this path, leading to a memory
leak bug. To fix this issue, free 'dev-&gt;partial_data' before returning the
error.

Signed-off-by: Wenwen Wang &lt;wenwen@cs.uga.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>lan78xx: Fix memory leaks</title>
<updated>2019-08-16T22:24:42Z</updated>
<author>
<name>Wenwen Wang</name>
<email>wenwen@cs.uga.edu</email>
</author>
<published>2019-08-14T16:23:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9cbf8a64865b50fd0f4a3915fa00ac7365cdf8f'/>
<id>urn:sha1:b9cbf8a64865b50fd0f4a3915fa00ac7365cdf8f</id>
<content type='text'>
In lan78xx_probe(), a new urb is allocated through usb_alloc_urb() and
saved to 'dev-&gt;urb_intr'. However, in the following execution, if an error
occurs, 'dev-&gt;urb_intr' is not deallocated, leading to memory leaks. To fix
this issue, invoke usb_free_urb() to free the allocated urb before
returning from the function.

Signed-off-by: Wenwen Wang &lt;wenwen@cs.uga.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>r8152: fix typo in register name</title>
<updated>2019-08-03T01:17:06Z</updated>
<author>
<name>Kevin Lo</name>
<email>kevlo@kevlo.org</email>
</author>
<published>2019-08-01T03:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59c0b47a1e11b5e81ab1dfd13579c9fbdb02f0b4'/>
<id>urn:sha1:59c0b47a1e11b5e81ab1dfd13579c9fbdb02f0b4</id>
<content type='text'>
It is likely that PAL_BDC_CR should be PLA_BDC_CR.

Signed-off-by: Kevin Lo &lt;kevlo@kevlo.org&gt;
Acked-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: usb: pegasus: fix improper read if get_registers() fail</title>
<updated>2019-08-01T22:18:27Z</updated>
<author>
<name>Denis Kirjanov</name>
<email>kda@linux-powerpc.org</email>
</author>
<published>2019-07-30T13:13:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=224c04973db1125fcebefffd86115f99f50f8277'/>
<id>urn:sha1:224c04973db1125fcebefffd86115f99f50f8277</id>
<content type='text'>
get_registers() may fail with -ENOMEM and in this
case we can read a garbage from the status variable tmp.

Reported-by: syzbot+3499a83b2d062ae409d4@syzkaller.appspotmail.com
Signed-off-by: Denis Kirjanov &lt;kda@linux-powerpc.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: usb: qmi_wwan: Add the BroadMobi BM818 card</title>
<updated>2019-07-26T20:59:42Z</updated>
<author>
<name>Bob Ham</name>
<email>bob.ham@puri.sm</email>
</author>
<published>2019-07-24T14:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9a07406b00cdc6ec689dc142540739575c717f3c'/>
<id>urn:sha1:9a07406b00cdc6ec689dc142540739575c717f3c</id>
<content type='text'>
The BroadMobi BM818 M.2 card uses the QMI protocol

Signed-off-by: Bob Ham &lt;bob.ham@puri.sm&gt;
Signed-off-by: Angus Ainslie (Purism) &lt;angus@akkea.ca&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
