<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/usb/serial/quatech2.c, branch linux-6.0.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.0.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-02-28T20:49:06+00:00</updated>
<entry>
<title>USB: serial: make use of UART_LCR_WLEN() + tty_get_char_size()</title>
<updated>2022-02-28T20:49:06+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2022-02-24T09:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5e1440bc23324846a003052787af6aa492e90773'/>
<id>urn:sha1:5e1440bc23324846a003052787af6aa492e90773</id>
<content type='text'>
Having a generic UART_LCR_WLEN() macro and the tty_get_char_size()
helper, we can remove all those repeated switch-cases in drivers.

Cc: Johan Hovold &lt;johan@kernel.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: linux-usb@vger.kernel.org
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20220224095558.30929-3-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next</title>
<updated>2021-06-24T10:54:28+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2021-06-24T10:54:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e9910c5ad97aa9479ab19e6535065522d6a0f08'/>
<id>urn:sha1:8e9910c5ad97aa9479ab19e6535065522d6a0f08</id>
<content type='text'>
Johan writes:

USB-serial updates for 5.14-rc1

Here are the USB-serial updates for 5.14-rc1, including:

 - gpio support for CP2108
 - chars_in_buffer and write_room return-value updates
 - chars_in_buffer and write_room clean ups

Included are also various clean ups.

All have been in linux-next with no reported issues.

* tag 'usb-serial-5.14-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial:
  USB: serial: cp210x: add support for GPIOs on CP2108
  USB: serial: drop irq-flags initialisations
  USB: serial: mos7840: drop buffer-callback return-value comments
  USB: serial: mos7720: drop buffer-callback sanity checks
  USB: serial: io_edgeport: drop buffer-callback sanity checks
  USB: serial: digi_acceleport: add chars_in_buffer locking
  USB: serial: digi_acceleport: reduce chars_in_buffer over-reporting
  USB: serial: make usb_serial_driver::chars_in_buffer return uint
  USB: serial: make usb_serial_driver::write_room return uint
</content>
</entry>
<entry>
<title>USB: serial: quatech2: fix control-request directions</title>
<updated>2021-05-25T05:58:10+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-05-24T09:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb8dbe80326c3d44c1e38ee4f40e0d8d3e06f2d0'/>
<id>urn:sha1:eb8dbe80326c3d44c1e38ee4f40e0d8d3e06f2d0</id>
<content type='text'>
The direction of the pipe argument must match the request-type direction
bit or control requests may fail depending on the host-controller-driver
implementation.

Fix the three requests which erroneously used usb_rcvctrlpipe().

Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
Cc: stable@vger.kernel.org      # 3.5
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: drop irq-flags initialisations</title>
<updated>2021-05-21T13:46:25+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-05-19T09:20:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=17cd3a106e9762cd97883cce884a8bfcf5a476ad'/>
<id>urn:sha1:17cd3a106e9762cd97883cce884a8bfcf5a476ad</id>
<content type='text'>
There's no need to initialise irq-flags variables before saving the
interrupt state.

Drop the redundant initialisations from the three drivers that got this
wrong.

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: make usb_serial_driver::write_room return uint</title>
<updated>2021-05-19T08:56:40+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2021-05-05T09:19:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:02+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-04-07T10:39:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: quatech2: fix TIOCGSERIAL implementation</title>
<updated>2021-04-08T07:45:56+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2021-04-07T10:39:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4065158c4897533abc430c02f5071d2e3ddbb191'/>
<id>urn:sha1:4065158c4897533abc430c02f5071d2e3ddbb191</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 xmit_fifo_size parameter could be used to set the hardware transmit
fifo size of a legacy UART when it could not be detected, but the
interface is limited to eight bits and should be left unset when not
used.

Similarly, baud_base 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.

The close_delay and closing_wait parameters returned by TIOCGSERIAL are
specified in centiseconds (not jiffies). The driver does not yet support
changing these, but let's report back the default values actually used
(0.5 and 30 seconds, respectively).

Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
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: make remove callback return void</title>
<updated>2021-02-09T12:13:58+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>uwe@kleine-koenig.org</email>
</author>
<published>2021-02-08T14:31:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5d1448fa353242635fa3e1fed6ab4558e0e7d9a'/>
<id>urn:sha1:c5d1448fa353242635fa3e1fed6ab4558e0e7d9a</id>
<content type='text'>
All usb_serial drivers return 0 in their remove callbacks and driver
core ignores the value returned by usb_serial_device_remove(). So change
the remove callback to return void and return 0 unconditionally in
usb_serial_device_remove().

Signed-off-by: Uwe Kleine-König &lt;uwe@kleine-koenig.org&gt;
Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
<entry>
<title>USB: serial: quatech2: drop two stub functions</title>
<updated>2020-07-02T08:38:44+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-07-01T16:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b83076a94dfa1d804a15d8639f5dff67b50fc265'/>
<id>urn:sha1:b83076a94dfa1d804a15d8639f5dff67b50fc265</id>
<content type='text'>
Drop two unused stub functions which only served as documentation.

This also avoids a W=1 (-Wunused-but-set-variable) warning.

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: quatech2: handle unbound ports</title>
<updated>2020-01-17T15:22:59+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2020-01-17T14:35:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9715a43eea77e42678a1002623f2d9a78f5b81a1'/>
<id>urn:sha1:9715a43eea77e42678a1002623f2d9a78f5b81a1</id>
<content type='text'>
Check for NULL port data in the modem- and line-status handlers to avoid
dereferencing a NULL pointer in the unlikely case where a port device
isn't bound to a driver (e.g. after an allocation failure on port
probe).

Note that the other (stubbed) event handlers qt2_process_xmit_empty()
and qt2_process_flush() would need similar sanity checks in case they
are ever implemented.

Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver")
Cc: stable &lt;stable@vger.kernel.org&gt;     # 3.5
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
</entry>
</feed>
