<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/usb/serial/usb-serial.c, branch v4.12</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.12</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v4.12'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2017-03-31T11:14:39+00:00</updated>
<entry>
<title>USB: serial: drop obsolete open-race workaround</title>
<updated>2017-03-31T11:14:39+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-30T13:46:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e1fdd5b2620198979b23abb679848a78461481e6'/>
<id>urn:sha1:e1fdd5b2620198979b23abb679848a78461481e6</id>
<content type='text'>
Commit a65a6f14dc24 ("USB: serial: fix race between probe and open")
fixed a race between probe and open, which could lead to crashes when a
not yet fully initialised port was being opened.

This race was later incidentally closed by commit 7e73eca6a7b2 ("TTY:
move cdev_add to tty_register_device") which moved character-device
registration from tty_register_driver to tty_register_device, which
isn't called until the port has been fully set up.

Remove the now redundant workaround which had the negative side effect
of not allowing a port to be opened immediately after user space had
been notified of a new tty device.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: move pl2303 hack out of usb-serial core</title>
<updated>2017-03-28T08:59:01+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-16T16:13:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=9fda620a5f3d7711d0b27d36eeec3a24a097af97'/>
<id>urn:sha1:9fda620a5f3d7711d0b27d36eeec3a24a097af97</id>
<content type='text'>
Some pl2303 devices require the use of the interrupt endpoint of an
unrelated interface. This has so far been dealt with in usb-serial core,
but can now be moved to a driver calc_num_ports callback.

Note that we relax the endpoint requirements checked by core and instead
verify that we have an interrupt-in endpoint in calc_num_ports for all
devices so that the hack can first be applied.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: add calc_num_ports callback to generic driver</title>
<updated>2017-03-28T08:54:39+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-16T16:13:32+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=a794499b261b8487a984783ccc864975e1bcc7bf'/>
<id>urn:sha1:a794499b261b8487a984783ccc864975e1bcc7bf</id>
<content type='text'>
Add a calc_num_ports callback to the generic driver and verify that the
device has the required endpoints there instead of in core.

Note that the generic driver num_ports field was never used.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: add probe callback to generic driver</title>
<updated>2017-03-28T08:54:39+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-16T16:13:31+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=415d7b3a5407d91fdf47a07fd31d63e4b548651f'/>
<id>urn:sha1:415d7b3a5407d91fdf47a07fd31d63e4b548651f</id>
<content type='text'>
Add a probe callback to the generic driver and print the
only-for-testing message there.

This is a first step in getting rid of the CONFIG_USB_SERIAL_GENERIC
ifdef from usb-serial core.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: allow subdrivers to modify port-endpoint mapping</title>
<updated>2017-03-28T08:54:39+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-16T16:13:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=07814246dd5530860ef758fd9b2b5f2e26472aa2'/>
<id>urn:sha1:07814246dd5530860ef758fd9b2b5f2e26472aa2</id>
<content type='text'>
Allow subdrivers to modify the port-endpoint mapping by passing the
endpoint descriptors to calc_num_ports.

The callback can now also be used to verify that the required endpoints
exists and abort probing otherwise.

This will allow us to get rid of a few hacks in subdrivers that are
already modifying the port-endpoint mapping (or aborting probe due to
missing endpoints), but only after the port structures have been setup.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: add endpoint sanity check to core</title>
<updated>2017-03-16T09:33:41+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-02T11:51:19+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=92e6b2c675e1d247317ec41a078f49aaade7f716'/>
<id>urn:sha1:92e6b2c675e1d247317ec41a078f49aaade7f716</id>
<content type='text'>
Allow drivers to specify a minimum number of endpoints per type, which
USB serial core will verify after subdriver probe has returned (where
the current alternate setting may have been changed).

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: replace runtime overflow check</title>
<updated>2017-03-16T09:33:41+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-02T11:51:18+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=8520ac0d70d6c1709bf6768cb79f3b75115def09'/>
<id>urn:sha1:8520ac0d70d6c1709bf6768cb79f3b75115def09</id>
<content type='text'>
Since commit 0a8fd1346254 ("USB: fix problems with duplicate endpoint
addresses") USB core guarantees that there are no more than 15 endpoint
descriptors per type (and altsetting) so the corresponding overflow
checks can now be replaced with a compile-time check on the array sizes
(and indirectly the maximum number of ports).

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: refactor and clean up endpoint handling</title>
<updated>2017-03-16T09:33:09+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2014-08-21T17:33:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1546e6aecb2490c4510bcd953cbb522d85957791'/>
<id>urn:sha1:1546e6aecb2490c4510bcd953cbb522d85957791</id>
<content type='text'>
Refactor and clean up endpoint handling.

This specifically moves the endpoint-descriptor arrays of the stack.

Note that an err_free_epds label is not yet added to avoid a compilation
warning when neither CONFIG_USB_SERIAL_PL2303 or
CONFIG_USB_SERIAL_GENERIC is selected.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: clean up endpoint and port-counter types</title>
<updated>2017-03-16T09:13:37+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-02T11:51:15+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=ef88f33fc1ee0a12a1e5eee7e4f70b7743100a19'/>
<id>urn:sha1:ef88f33fc1ee0a12a1e5eee7e4f70b7743100a19</id>
<content type='text'>
Use unsigned-char type for the endpoint and port counters.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: clean up probe error paths</title>
<updated>2017-03-16T09:13:36+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-03-02T11:51:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c2fef4564cae387c2f724a95350084c2e9371250'/>
<id>urn:sha1:c2fef4564cae387c2f724a95350084c2e9371250</id>
<content type='text'>
Clean up the probe error paths by adding a couple of new error labels.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
</feed>
