<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/net/usb, branch v4.3-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>r8152: fix the runtime suspend issues</title>
<updated>2015-09-10T03:27:54+00:00</updated>
<author>
<name>hayeswang</name>
<email>hayeswang@realtek.com</email>
</author>
<published>2015-09-07T03:57:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2dd49e0f16fb0e07c6fcc1322ebba310f5827072'/>
<id>2dd49e0f16fb0e07c6fcc1322ebba310f5827072</id>
<content type='text'>
Fix the runtime suspend issues result from the linking change.

Case 1:
a) link down occurs.
b) driver disable tx/rx.
c) autosuspend occurs.
d) hw linking up.
e) device suspends without enabling tx/rx.
f) couldn't wake up when receiving packets.

Case 2:
a) Nway results in linking down.
b) autosuspend occurs.
c) device suspends.
d) device may not wake up when linking up.

Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix the runtime suspend issues result from the linking change.

Case 1:
a) link down occurs.
b) driver disable tx/rx.
c) autosuspend occurs.
d) hw linking up.
e) device suspends without enabling tx/rx.
f) couldn't wake up when receiving packets.

Case 2:
a) Nway results in linking down.
b) autosuspend occurs.
c) device suspends.
d) device may not wake up when linking up.

Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>r8152: split DRIVER_VERSION</title>
<updated>2015-09-10T03:27:54+00:00</updated>
<author>
<name>hayeswang</name>
<email>hayeswang@realtek.com</email>
</author>
<published>2015-09-07T03:57:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d0942473e3ca4629a40bbf0c9fd74fc0c7ff2a79'/>
<id>d0942473e3ca4629a40bbf0c9fd74fc0c7ff2a79</id>
<content type='text'>
Split DRIVER_VERSION into NETNEXT_VERSION and NET_VERSION. Then,
according to the value of DRIVER_VERSION, we could know which
patches are used generally without comparing the source code.

Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Split DRIVER_VERSION into NETNEXT_VERSION and NET_VERSION. Then,
according to the value of DRIVER_VERSION, we could know which
patches are used generally without comparing the source code.

Signed-off-by: Hayes Wang &lt;hayeswang@realtek.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>usbnet: Fix a race between usbnet_stop() and the BH</title>
<updated>2015-09-08T20:17:43+00:00</updated>
<author>
<name>Eugene Shatokhin</name>
<email>eugene.shatokhin@rosalab.ru</email>
</author>
<published>2015-09-01T14:05:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=fcb0bb6aab256288a4e0a8650d26e4096ec30319'/>
<id>fcb0bb6aab256288a4e0a8650d26e4096ec30319</id>
<content type='text'>
The race may happen when a device (e.g. YOTA 4G LTE Modem) is
unplugged while the system is downloading a large file from the Net.

Hardware breakpoints and Kprobes with delays were used to confirm that
the race does actually happen.

The race is on skb_queue ('next' pointer) between usbnet_stop()
and rx_complete(), which, in turn, calls usbnet_bh().

Here is a part of the call stack with the code where the changes to the
queue happen. The line numbers are for the kernel 4.1.0:

*0 __skb_unlink (skbuff.h:1517)
    prev-&gt;next = next;
*1 defer_bh (usbnet.c:430)
    spin_lock_irqsave(&amp;list-&gt;lock, flags);
    old_state = entry-&gt;state;
    entry-&gt;state = state;
    __skb_unlink(skb, list);
    spin_unlock(&amp;list-&gt;lock);
    spin_lock(&amp;dev-&gt;done.lock);
    __skb_queue_tail(&amp;dev-&gt;done, skb);
    if (dev-&gt;done.qlen == 1)
        tasklet_schedule(&amp;dev-&gt;bh);
    spin_unlock_irqrestore(&amp;dev-&gt;done.lock, flags);
*2 rx_complete (usbnet.c:640)
    state = defer_bh(dev, skb, &amp;dev-&gt;rxq, state);

At the same time, the following code repeatedly checks if the queue is
empty and reads these values concurrently with the above changes:

*0  usbnet_terminate_urbs (usbnet.c:765)
    /* maybe wait for deletions to finish. */
    while (!skb_queue_empty(&amp;dev-&gt;rxq)
        &amp;&amp; !skb_queue_empty(&amp;dev-&gt;txq)
        &amp;&amp; !skb_queue_empty(&amp;dev-&gt;done)) {
            schedule_timeout(msecs_to_jiffies(UNLINK_TIMEOUT_MS));
            set_current_state(TASK_UNINTERRUPTIBLE);
            netif_dbg(dev, ifdown, dev-&gt;net,
                  "waited for %d urb completions\n", temp);
    }
*1  usbnet_stop (usbnet.c:806)
    if (!(info-&gt;flags &amp; FLAG_AVOID_UNLINK_URBS))
        usbnet_terminate_urbs(dev);

As a result, it is possible, for example, that the skb is removed from
dev-&gt;rxq by __skb_unlink() before the check
"!skb_queue_empty(&amp;dev-&gt;rxq)" in usbnet_terminate_urbs() is made. It is
also possible in this case that the skb is added to dev-&gt;done queue
after "!skb_queue_empty(&amp;dev-&gt;done)" is checked. So
usbnet_terminate_urbs() may stop waiting and return while dev-&gt;done
queue still has an item.

Locking in defer_bh() and usbnet_terminate_urbs() was revisited to avoid
this race.

Signed-off-by: Eugene Shatokhin &lt;eugene.shatokhin@rosalab.ru&gt;
Reviewed-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The race may happen when a device (e.g. YOTA 4G LTE Modem) is
unplugged while the system is downloading a large file from the Net.

Hardware breakpoints and Kprobes with delays were used to confirm that
the race does actually happen.

The race is on skb_queue ('next' pointer) between usbnet_stop()
and rx_complete(), which, in turn, calls usbnet_bh().

Here is a part of the call stack with the code where the changes to the
queue happen. The line numbers are for the kernel 4.1.0:

*0 __skb_unlink (skbuff.h:1517)
    prev-&gt;next = next;
*1 defer_bh (usbnet.c:430)
    spin_lock_irqsave(&amp;list-&gt;lock, flags);
    old_state = entry-&gt;state;
    entry-&gt;state = state;
    __skb_unlink(skb, list);
    spin_unlock(&amp;list-&gt;lock);
    spin_lock(&amp;dev-&gt;done.lock);
    __skb_queue_tail(&amp;dev-&gt;done, skb);
    if (dev-&gt;done.qlen == 1)
        tasklet_schedule(&amp;dev-&gt;bh);
    spin_unlock_irqrestore(&amp;dev-&gt;done.lock, flags);
*2 rx_complete (usbnet.c:640)
    state = defer_bh(dev, skb, &amp;dev-&gt;rxq, state);

At the same time, the following code repeatedly checks if the queue is
empty and reads these values concurrently with the above changes:

*0  usbnet_terminate_urbs (usbnet.c:765)
    /* maybe wait for deletions to finish. */
    while (!skb_queue_empty(&amp;dev-&gt;rxq)
        &amp;&amp; !skb_queue_empty(&amp;dev-&gt;txq)
        &amp;&amp; !skb_queue_empty(&amp;dev-&gt;done)) {
            schedule_timeout(msecs_to_jiffies(UNLINK_TIMEOUT_MS));
            set_current_state(TASK_UNINTERRUPTIBLE);
            netif_dbg(dev, ifdown, dev-&gt;net,
                  "waited for %d urb completions\n", temp);
    }
*1  usbnet_stop (usbnet.c:806)
    if (!(info-&gt;flags &amp; FLAG_AVOID_UNLINK_URBS))
        usbnet_terminate_urbs(dev);

As a result, it is possible, for example, that the skb is removed from
dev-&gt;rxq by __skb_unlink() before the check
"!skb_queue_empty(&amp;dev-&gt;rxq)" in usbnet_terminate_urbs() is made. It is
also possible in this case that the skb is added to dev-&gt;done queue
after "!skb_queue_empty(&amp;dev-&gt;done)" is checked. So
usbnet_terminate_urbs() may stop waiting and return while dev-&gt;done
queue still has an item.

Locking in defer_bh() and usbnet_terminate_urbs() was revisited to avoid
this race.

Signed-off-by: Eugene Shatokhin &lt;eugene.shatokhin@rosalab.ru&gt;
Reviewed-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lan78xx: Fix ladv/radv error handling in lan78xx_link_reset()</title>
<updated>2015-09-07T02:46:56+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2015-09-04T10:47:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=99c79eceb152e2ac7f8a81ff55d4a810f730ec7b'/>
<id>99c79eceb152e2ac7f8a81ff55d4a810f730ec7b</id>
<content type='text'>
net/usb/lan78xx.c: In function ‘lan78xx_link_reset’:
net/usb/lan78xx.c:1107: warning: comparison is always false due to limited range of data type
net/usb/lan78xx.c:1111: warning: comparison is always false due to limited range of data type

Assigning return values that can be negative error codes to "u16"
variables makes them positive, ignoring the errors.  Hence use "int"
instead.

Drop the "unlikely"s (unlikely considered harmful) and propagate the
actual error values instead of overriding them to -EIO while we're at
it.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
net/usb/lan78xx.c: In function ‘lan78xx_link_reset’:
net/usb/lan78xx.c:1107: warning: comparison is always false due to limited range of data type
net/usb/lan78xx.c:1111: warning: comparison is always false due to limited range of data type

Assigning return values that can be negative error codes to "u16"
variables makes them positive, ignoring the errors.  Hence use "int"
instead.

Drop the "unlikely"s (unlikely considered harmful) and propagate the
actual error values instead of overriding them to -EIO while we're at
it.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: qmi_wwan: Sierra Wireless MC73xx -&gt; Sierra Wireless MC7304/MC7354</title>
<updated>2015-08-31T22:16:17+00:00</updated>
<author>
<name>David Ward</name>
<email>david.ward@ll.mit.edu</email>
</author>
<published>2015-08-31T18:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e704059272aae2aaa5e5ce7a76e4c27c492e947e'/>
<id>e704059272aae2aaa5e5ce7a76e4c27c492e947e</id>
<content type='text'>
Other Sierra Wireless MC73xx devices exist, with different USB IDs.

Cc: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David Ward &lt;david.ward@ll.mit.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Other Sierra Wireless MC73xx devices exist, with different USB IDs.

Cc: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: David Ward &lt;david.ward@ll.mit.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-08-28T04:45:31+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-08-28T04:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0d36938bb82a7775c21ce0a7429f08ba13d025b6'/>
<id>0d36938bb82a7775c21ce0a7429f08ba13d025b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>usbnet: Get EVENT_NO_RUNTIME_PM bit before it is cleared</title>
<updated>2015-08-26T02:44:13+00:00</updated>
<author>
<name>Eugene Shatokhin</name>
<email>eugene.shatokhin@rosalab.ru</email>
</author>
<published>2015-08-24T20:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f50791ac1aca1ac1b0370d62397b43e9f831421a'/>
<id>f50791ac1aca1ac1b0370d62397b43e9f831421a</id>
<content type='text'>
It is needed to check EVENT_NO_RUNTIME_PM bit of dev-&gt;flags in
usbnet_stop(), but its value should be read before it is cleared
when dev-&gt;flags is set to 0.

The problem was spotted and the fix was provided by
Oliver Neukum &lt;oneukum@suse.de&gt;.

Signed-off-by: Eugene Shatokhin &lt;eugene.shatokhin@rosalab.ru&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is needed to check EVENT_NO_RUNTIME_PM bit of dev-&gt;flags in
usbnet_stop(), but its value should be read before it is cleared
when dev-&gt;flags is set to 0.

The problem was spotted and the fix was provided by
Oliver Neukum &lt;oneukum@suse.de&gt;.

Signed-off-by: Eugene Shatokhin &lt;eugene.shatokhin@rosalab.ru&gt;
Acked-by: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-08-21T18:44:04+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-08-21T18:44:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=dc25b25897289bad4907f30151ffe5baf75ff369'/>
<id>dc25b25897289bad4907f30151ffe5baf75ff369</id>
<content type='text'>
Conflicts:
	drivers/net/usb/qmi_wwan.c

Overlapping additions of new device IDs to qmi_wwan.c

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	drivers/net/usb/qmi_wwan.c

Overlapping additions of new device IDs to qmi_wwan.c

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: qmi_wwan: add HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module</title>
<updated>2015-08-17T22:39:58+00:00</updated>
<author>
<name>David Ward</name>
<email>david.ward@ll.mit.edu</email>
</author>
<published>2015-08-16T00:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a8079092c1bbf9aec3756b35256c7816b8845af7'/>
<id>a8079092c1bbf9aec3756b35256c7816b8845af7</id>
<content type='text'>
This is an HP-branded Sierra Wireless EM7355:
https://bugzilla.redhat.com/show_bug.cgi?id=1223646#c2

Signed-off-by: David Ward &lt;david.ward@ll.mit.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an HP-branded Sierra Wireless EM7355:
https://bugzilla.redhat.com/show_bug.cgi?id=1223646#c2

Signed-off-by: David Ward &lt;david.ward@ll.mit.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lan78xx: Remove BUG_ON()</title>
<updated>2015-08-12T21:44:16+00:00</updated>
<author>
<name>Woojung.Huh@microchip.com</name>
<email>Woojung.Huh@microchip.com</email>
</author>
<published>2015-08-11T15:23:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d57f6232c157f03db7cb1ae62a3dcc548014a530'/>
<id>d57f6232c157f03db7cb1ae62a3dcc548014a530</id>
<content type='text'>
Removing BUG_ON()

Signed-off-by: Woojung Huh &lt;woojung.huh@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing BUG_ON()

Signed-off-by: Woojung Huh &lt;woojung.huh@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
