<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/usb/serial/usb_wwan.c, branch linux-6.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.18.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2022-07-25T09:28:52Z</updated>
<entry>
<title>Merge tag 'usb-serial-5.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next</title>
<updated>2022-07-25T09:28:52Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2022-07-25T09:28:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b6de1f901039cfcbd605842d454bd80c589105d8'/>
<id>urn:sha1:b6de1f901039cfcbd605842d454bd80c589105d8</id>
<content type='text'>
Johan writes:

USB-serial updates for 5.20-rc1

Here are the USB-serial updates for 5.20-rc1, including

 - a fix up of some tty-port initialized comments that had got
   truncated and obfuscated

Included are also various clean ups.

All but the final commit have been in linux-next and with no reported
issues.

* tag 'usb-serial-5.20-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: fix tty-port initialized comments
  USB: serial: fix repeated word "the" in comments
  USB: serial: io_edgeport: fix spelling mistakes
  USB: serial: use kmemdup instead of kmalloc + memcpy
</content>
</entry>
<entry>
<title>USB: serial: fix tty-port initialized comments</title>
<updated>2022-07-25T09:01:40Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2022-07-25T08:44:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=688ee1d1785c1359f9040f615dd8e6054962bce2'/>
<id>urn:sha1:688ee1d1785c1359f9040f615dd8e6054962bce2</id>
<content type='text'>
Fix up the tty-port initialized comments which got truncated and
obfuscated when replacing the old ASYNCB_INITIALIZED flag.

Fixes: d41861ca19c9 ("tty: Replace ASYNC_INITIALIZED bit and update atomically")
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: usb_wwan: replace DTR/RTS magic numbers with macros</title>
<updated>2022-07-25T08:57:43Z</updated>
<author>
<name>Yan Xinyu</name>
<email>sdlyyxy@bupt.edu.cn</email>
</author>
<published>2022-07-25T07:58:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d5e22360e907dbf570116c3c08be0d3e5be43a23'/>
<id>urn:sha1:d5e22360e907dbf570116c3c08be0d3e5be43a23</id>
<content type='text'>
The usb_wwan_send_setup function generates DTR/RTS signals in compliance
with CDC ACM standard. This patch changes magic numbers in this function
to equivalent macros.

Link: https://lore.kernel.org/r/20220722085040.704885-1-sdlyyxy@bupt.edu.cn
[ johan: use the new CDC control-line defines ]
Signed-off-by: Yan Xinyu &lt;sdlyyxy@bupt.edu.cn&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Link: https://lore.kernel.org/r/20220725075841.1187-8-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: usb_wwan: remove redundant assignment to variable i</title>
<updated>2022-03-08T17:51:02Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2022-03-07T18:31:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4ac56b1f1ef8139dbfc5dab918aa235e8344ec4e'/>
<id>urn:sha1:4ac56b1f1ef8139dbfc5dab918aa235e8344ec4e</id>
<content type='text'>
Variable i is being assigned a value that is never read, it is being
re-assigned two statements later in a for-loop. The assignment is
redundant and can be removed.

Cleans up clang scan build warning:
drivers/usb/serial/usb_wwan.c:151:2: warning: Value stored to 'i'
is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: make usb_serial_driver::chars_in_buffer return uint</title>
<updated>2021-05-19T08:56:41Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2021-05-05T09:19:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=155591d3ceeec2cd6a50b40278e2014c45f6b5f6'/>
<id>urn:sha1:155591d3ceeec2cd6a50b40278e2014c45f6b5f6</id>
<content type='text'>
tty_operations::chars_in_buffer is being switched to return uint. Do the
same for usb_serial_driver's chars_in_buffer.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
[ johan: amend commit message ]
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: make usb_serial_driver::write_room return uint</title>
<updated>2021-05-19T08:56:40Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2021-05-05T09:19:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560'/>
<id>urn:sha1:94cc7aeaf6c0cff0b8aeb7cb3579cee46b923560</id>
<content type='text'>
Line disciplines expect a positive value or zero returned from
tty-&gt;ops-&gt;write_room (invoked by tty_write_room). Both of them are being
updated to return an unsigned int. Switch also
usb_serial_driver::write_room and all its users.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
[ johan: amend commit message, drop unrelated comment change ]
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: add generic support for TIOCSSERIAL</title>
<updated>2021-04-08T07:46:02Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-04-07T10:39:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=01fd45f676f1b3785b7cdd5d815f9c31ddcd9dd1'/>
<id>urn:sha1:01fd45f676f1b3785b7cdd5d815f9c31ddcd9dd1</id>
<content type='text'>
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

The closing_wait parameter determines how long to wait for the transfer
buffers to drain during close and the default timeout of 30 seconds may
not be sufficient at low line speeds. In other cases, when for example
flow is stopped, the default timeout may instead be too long.

Add generic support for TIOCSSERIAL and TIOCGSERIAL with handling of the
three common parameters close_delay, closing_wait and line for the
benefit of all USB serial drivers while still allowing drivers to
implement further functionality through the existing callbacks.

This currently includes a few drivers that report their base baud clock
rate even if that is really only of interest when setting custom
divisors through the deprecated ASYNC_SPD_CUST interface; an interface
which only the FTDI driver actually implements.

Some drivers have also been reporting back a fake UART type, something
which should no longer be needed and will be dropped by a follow-on
patch.

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: usb_wwan: fix TIOCGSERIAL implementation</title>
<updated>2021-04-08T07:46:00Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-04-07T10:39:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b6be55625138c07627d7559ecdd11333545436ae'/>
<id>urn:sha1:b6be55625138c07627d7559ecdd11333545436ae</id>
<content type='text'>
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

The port parameter is used to set the I/O port and does not make any
sense to use for USB serial devices.

The baud_base parameter could be used to set the UART base clock when it
could not be detected but might as well be left unset when it is not
known.

Fix the usb_wwan TIOCGSERIAL implementation by dropping its custom
interpretation of the unused port and baud_base fields, which were set
to the port index and current line speed, respectively.

Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)")
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: usb_wwan: fix unprivileged TIOCCSERIAL</title>
<updated>2021-04-08T07:45:59Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-04-07T10:39:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a3cb01e2fe3793b8ffcb9cc7f7c7f2ca55793e62'/>
<id>urn:sha1:a3cb01e2fe3793b8ffcb9cc7f7c7f2ca55793e62</id>
<content type='text'>
TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

A non-privileged user has only ever been able to set the since long
deprecated ASYNC_SPD flags and trying to change any other *supported*
feature should result in -EPERM being returned. Setting the current
values for any supported features should return success.

Fix the usb_wwan implementation which instead indicated that the
TIOCSSERIAL ioctl was not even implemented when a non-privileged user
set the current values.

Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)")
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: usb_wwan: fix TIOCSSERIAL jiffies conversions</title>
<updated>2021-04-08T07:45:59Z</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-04-07T10:39:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3d732690d2267f4d0e19077b178dffbedafdf0c9'/>
<id>urn:sha1:3d732690d2267f4d0e19077b178dffbedafdf0c9</id>
<content type='text'>
The port close_delay and closing_wait parameters set by TIOCSSERIAL are
specified in jiffies and not milliseconds.

Add the missing conversions so that the TIOCSSERIAL works as expected
also when HZ is not 1000.

Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)")
Cc: stable@vger.kernel.org      # 2.6.38
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
</feed>
