<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/usb/serial, branch v3.6</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=v3.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-09-11T19:34:29Z</updated>
<entry>
<title>USB: option: replace ZTE K5006-Z entry with vendor class rule</title>
<updated>2012-09-11T19:34:29Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-09-11T07:40:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ba9edaa468869a8cea242a411066b0f490751798'/>
<id>urn:sha1:ba9edaa468869a8cea242a411066b0f490751798</id>
<content type='text'>
Fix the ZTE K5006-Z entry so that it actually matches anything

  commit f1b5c997 USB: option: add ZTE K5006-Z

added a device specific entry assuming that the device would use
class/subclass/proto == ff/ff/ff like other ZTE devices. It
turns out that ZTE has started using vendor specific subclass
and protocol codes:

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  4 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=1018 Rev= 0.00
S:  Manufacturer=ZTE,Incorporated
S:  Product=ZTE LTE Technologies MSM
S:  SerialNumber=MF821Vxxxxxxx
C:* #Ifs= 5 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=86 Prot=10 Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=02 Prot=05 Driver=(none)
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=02 Prot=01 Driver=(none)
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=06 Prot=00 Driver=qmi_wwan
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

We do not have any information on how ZTE intend to use these
codes, but let us assume for now that the 3 sets matching
serial functions in the K5006-Z always will identify a serial
function in a ZTE device.

Cc: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: ftdi_sio: do not claim CDC ACM function</title>
<updated>2012-09-10T17:55:52Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-09-10T10:01:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f08dea734844aa42ec57c229b0b73b3d7d21f810'/>
<id>urn:sha1:f08dea734844aa42ec57c229b0b73b3d7d21f810</id>
<content type='text'>
The Microchip vid:pid 04d8:000a is used for their CDC ACM
demo firmware application.  This is a device with a single
function conforming to the CDC ACM specification and with
the intention of demonstrating CDC ACM class firmware and
driver interaction.  The demo is used on a number of
development boards, and may also be used unmodified by
vendors using Microchip hardware.

Some vendors have re-used this vid:pid for other types of
firmware, emulating FTDI chips. Attempting to continue to
support such devices without breaking class based
applications that by matching on interface
class/subclass/proto being ff/ff/00.  I have no information
about the actual device or interface descriptors, but this
will at least make the proper CDC ACM devices work again.
Anyone having details of the offending device's descriptors
should update this entry with the details.

Reported-by: Florian Wöhrl &lt;fw@woehrl.biz&gt;
Reported-by: Xiaofan Chen &lt;xiaofanc@gmail.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Cc: Bruno Thomsen &lt;bruno.thomsen@gmail.com&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: ftdi_sio: PID for NZR SEM 16+ USB</title>
<updated>2012-09-05T23:43:49Z</updated>
<author>
<name>Horst Schirmeier</name>
<email>horst@schirmeier.com</email>
</author>
<published>2012-08-30T22:00:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=26a538b9ea2a3ee10dafc0068f0560dfd7b7ba37'/>
<id>urn:sha1:26a538b9ea2a3ee10dafc0068f0560dfd7b7ba37</id>
<content type='text'>
This adds the USB PID for the NZR SEM 16+ USB energy monitor device
&lt;http://www.nzr.de&gt;.  It works perfectly with the GPL software on
&lt;http://schou.dk/linux/sparometer/&gt;.

Signed-off-by: Horst Schirmeier &lt;horst@schirmeier.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: ftdi-sio: add support for more Physik Instrumente devices</title>
<updated>2012-09-05T23:43:49Z</updated>
<author>
<name>Éric Piel</name>
<email>piel@delmic.com</email>
</author>
<published>2012-09-04T15:25:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dafc4f7be1a556ca3868d343c00127728b397068'/>
<id>urn:sha1:dafc4f7be1a556ca3868d343c00127728b397068</id>
<content type='text'>
Commit b69cc672052540 added support for the E-861.  After acquiring a C-867, I
realised that every Physik Instrumente's device has a different PID. They are
listed in the Windows device driver's .inf file. So here are all PIDs for the
current (and probably future) USB devices from Physik Instrumente.

Compiled, but only actually tested on the E-861 and C-867.

Signed-off-by: Éric Piel &lt;piel@delmic.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: qcserial: fix port handling on Gobi 1K and 2K+</title>
<updated>2012-08-16T16:48:03Z</updated>
<author>
<name>Dan Williams</name>
<email>dcbw@redhat.com</email>
</author>
<published>2012-07-23T19:26:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=731879f8e3d4c61220462160311fa650a8b96abf'/>
<id>urn:sha1:731879f8e3d4c61220462160311fa650a8b96abf</id>
<content type='text'>
Bjorn's latest patchset does break Gobi 1K and 2K because on both
devices as it claims usb interface 0.  That's because usbif 0 is not
handled in the switch statement, and thus the if0 gets claimed when it
should not.  So let's just make things even simpler yet, and handle both
the 1K and 2K+ cases separately.  This patch should not affect the new
Sierra device support, because those devices are matched via
interface-specific matching and thus should never hit the composite
code.

Signed-off-by: Dan Williams &lt;dcbw@redhat.com&gt;
Tested-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: Fix mos7840 timeout</title>
<updated>2012-08-15T22:10:50Z</updated>
<author>
<name>Mark Ferrell</name>
<email>mferrell@uplogix.com</email>
</author>
<published>2012-07-24T18:38:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1e658489ba8d87b7c89ca6f734b8319acc534dbc'/>
<id>urn:sha1:1e658489ba8d87b7c89ca6f734b8319acc534dbc</id>
<content type='text'>
* mos7840 driver was using multiple of HZ for the timeout handed off to
  usb_control_msg().  Changed the timeout to use msecs instead.

* Remove unused WAIT_FOR_EVER definition

Signed-off-by: Mark Ferrell &lt;mferrell@uplogix.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: option: add ZTE K5006-Z</title>
<updated>2012-08-15T22:10:49Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-08-15T13:43:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1b5c997e68533df1f96dcd3068a231bca495603'/>
<id>urn:sha1:f1b5c997e68533df1f96dcd3068a231bca495603</id>
<content type='text'>
The ZTE (Vodafone) K5006-Z use the following
interface layout:

00 DIAG
01 secondary
02 modem
03 networkcard
04 storage

Ignoring interface #3 which is handled by the qmi_wwan
driver.

Cc: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usb_wwan: resume/suspend can be called after port is gone</title>
<updated>2012-08-10T18:51:43Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-07-26T23:11:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=032129cb03df196c4216a82295e6555539da4ce7'/>
<id>urn:sha1:032129cb03df196c4216a82295e6555539da4ce7</id>
<content type='text'>
We cannot unconditionally access any usb-serial port specific
data from the interface driver.  Both supending and resuming
may happen after the port has been removed and portdata is
freed.

Treat ports with no portdata as closed ports to avoid a NULL
pointer dereference on resume.  No need to kill URBs for
removed ports on suspend, avoiding the same NULL pointer
reference there.

Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: serial: prevent suspend/resume from racing against probe/remove</title>
<updated>2012-08-10T18:51:43Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-07-26T23:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5fd650cfc7ffeca4af0da939293c8e7a5aa7c36'/>
<id>urn:sha1:d5fd650cfc7ffeca4af0da939293c8e7a5aa7c36</id>
<content type='text'>
Some usb-serial drivers may access port data in their suspend/
resume functions. Such drivers must always verify the validity
of the data as both suspend and resume can be called both before
usb_serial_device_probe and after usb_serial_device_remove.

But the port data may be invalidated during port_probe and
port_remove. This patch prevents the race against suspend and
resume by disabling suspend while port_probe or port_remove is
running.

Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: usb_wwan: replace release and disconnect with a port_remove hook</title>
<updated>2012-08-10T18:51:43Z</updated>
<author>
<name>Bjørn Mork</name>
<email>bjorn@mork.no</email>
</author>
<published>2012-07-26T23:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1028f0abfb321e0f87c10ac0cce8508097c2b42'/>
<id>urn:sha1:a1028f0abfb321e0f87c10ac0cce8508097c2b42</id>
<content type='text'>
Doing port specific cleanup in the .port_remove hook is a
lot simpler and safer than doing it in the USB driver
.release or .disconnect methods. The removal of the port
from the usb-serial bus will happen before the USB driver
cleanup, so we must be careful about accessing port specific
driver data from any USB driver functions.

This problem surfaced after the commit

 0998d0631 device-core: Ensure drvdata = NULL when no driver is bound

which turned the previous unsafe access into a reliable NULL
pointer dereference.

Fixes the following Oops:

[  243.148471] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  243.148508] IP: [&lt;ffffffffa0468527&gt;] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[  243.148556] PGD 79d60067 PUD 79d61067 PMD 0
[  243.148590] Oops: 0000 [#1] SMP
[  243.148617] Modules linked in: sr_mod cdrom qmi_wwan usbnet option cdc_wdm usb_wwan usbserial usb_storage uas fuse af_packet ip6table_filter ip6_tables iptable_filter ip_tables x_tables tun edd
cpufreq_conservative cpufreq_userspace cpufreq_powersave snd_pcm_oss snd_mixer_oss acpi_cpufreq snd_seq mperf snd_seq_device coretemp arc4 sg hp_wmi sparse_keymap uvcvideo videobuf2_core
videodev videobuf2_vmalloc videobuf2_memops rtl8192ce rtl8192c_common rtlwifi joydev pcspkr microcode mac80211 i2c_i801 lpc_ich r8169 snd_hda_codec_idt cfg80211 snd_hda_intel snd_hda_codec rfkill
snd_hwdep snd_pcm wmi snd_timer ac snd soundcore snd_page_alloc battery uhci_hcd i915 drm_kms_helper drm i2c_algo_bit ehci_hcd thermal usbcore video usb_common button processor thermal_sys
[  243.149007] CPU 1
[  243.149027] Pid: 135, comm: khubd Not tainted 3.5.0-rc7-next-20120720-1-vanilla #1 Hewlett-Packard HP Mini 110-3700                /1584
[  243.149072] RIP: 0010:[&lt;ffffffffa0468527&gt;]  [&lt;ffffffffa0468527&gt;] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[  243.149118] RSP: 0018:ffff880037e75b30  EFLAGS: 00010286
[  243.149133] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88005912aa28
[  243.149150] RDX: ffff88005e95f028 RSI: 0000000000000000 RDI: ffff88005f7c1a10
[  243.149166] RBP: ffff880037e75b60 R08: 0000000000000000 R09: ffffffff812cea90
[  243.149182] R10: 0000000000000000 R11: 0000000000000001 R12: ffff88006539b440
[  243.149198] R13: ffff88006539b440 R14: 0000000000000000 R15: 0000000000000000
[  243.149216] FS:  0000000000000000(0000) GS:ffff88007ee80000(0000) knlGS:0000000000000000
[  243.149233] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  243.149248] CR2: 0000000000000000 CR3: 0000000079fe0000 CR4: 00000000000007e0
[  243.149264] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  243.149280] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  243.149298] Process khubd (pid: 135, threadinfo ffff880037e74000, task ffff880037d40600)
[  243.149313] Stack:
[  243.149323]  ffff880037e75b40 ffff88006539b440 ffff8800799bc830 ffff88005f7c1800
[  243.149348]  0000000000000001 ffff88006539b448 ffff880037e75b70 ffffffffa04685e9
[  243.149371]  ffff880037e75bc0 ffffffffa0473765 ffff880037354988 ffff88007b594800
[  243.149395] Call Trace:
[  243.149419]  [&lt;ffffffffa04685e9&gt;] usb_wwan_disconnect+0x9/0x10 [usb_wwan]
[  243.149447]  [&lt;ffffffffa0473765&gt;] usb_serial_disconnect+0xd5/0x120 [usbserial]
[  243.149511]  [&lt;ffffffffa0046b48&gt;] usb_unbind_interface+0x58/0x1a0 [usbcore]
[  243.149545]  [&lt;ffffffff8139ebd7&gt;] __device_release_driver+0x77/0xe0
[  243.149567]  [&lt;ffffffff8139ec67&gt;] device_release_driver+0x27/0x40
[  243.149587]  [&lt;ffffffff8139e5cf&gt;] bus_remove_device+0xdf/0x150
[  243.149608]  [&lt;ffffffff8139bc78&gt;] device_del+0x118/0x1a0
[  243.149661]  [&lt;ffffffffa0044590&gt;] usb_disable_device+0xb0/0x280 [usbcore]
[  243.149718]  [&lt;ffffffffa003c6fd&gt;] usb_disconnect+0x9d/0x140 [usbcore]
[  243.149770]  [&lt;ffffffffa003da7d&gt;] hub_port_connect_change+0xad/0x8a0 [usbcore]
[  243.149825]  [&lt;ffffffffa0043bf5&gt;] ? usb_control_msg+0xe5/0x110 [usbcore]
[  243.149878]  [&lt;ffffffffa003e6e3&gt;] hub_events+0x473/0x760 [usbcore]
[  243.149931]  [&lt;ffffffffa003ea05&gt;] hub_thread+0x35/0x1d0 [usbcore]
[  243.149955]  [&lt;ffffffff81061960&gt;] ? add_wait_queue+0x60/0x60
[  243.150004]  [&lt;ffffffffa003e9d0&gt;] ? hub_events+0x760/0x760 [usbcore]
[  243.150026]  [&lt;ffffffff8106133e&gt;] kthread+0x8e/0xa0
[  243.150047]  [&lt;ffffffff8157ec04&gt;] kernel_thread_helper+0x4/0x10
[  243.150068]  [&lt;ffffffff810612b0&gt;] ? flush_kthread_work+0x120/0x120
[  243.150088]  [&lt;ffffffff8157ec00&gt;] ? gs_change+0xb/0xb
[  243.150101] Code: fd 41 54 53 48 83 ec 08 80 7f 1a 00 74 57 49 89 fc 31 db 90 49 8b 7c 24 20 45 31 f6 48 81 c7 10 02 00 00 e8 bc 64 f3 e0 49 89 c7 &lt;4b&gt; 8b 3c 37 49 83 c6 08 e8 4c a5 bd ff 49 83 fe 20
75 ed 45 30
[  243.150257] RIP  [&lt;ffffffffa0468527&gt;] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[  243.150282]  RSP &lt;ffff880037e75b30&gt;
[  243.150294] CR2: 0000000000000000
[  243.177170] ---[ end trace fba433d9015ffb8c ]---

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reported-by: Thomas Schäfer &lt;tschaefer@t-online.de&gt;
Suggested-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Bjørn Mork &lt;bjorn@mork.no&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
