<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/usb/serial, branch v5.2-rc2</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>USB: serial: f81232: implement break control</title>
<updated>2019-05-03T07:19:55+00:00</updated>
<author>
<name>Ji-Ze Hong (Peter Hong)</name>
<email>hpeter@gmail.com</email>
</author>
<published>2019-04-30T01:22:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7f6fc50242d11d4fedab9cf6c5e8af368c076ccd'/>
<id>7f6fc50242d11d4fedab9cf6c5e8af368c076ccd</id>
<content type='text'>
Implement Fintek F81232 break on/off with LCR register.
It's the same with 16550A LCR register layout.

Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
[ johan: fix corrupt line settings on break due to missing shadow_lcr
  update in set_termios() ]
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement Fintek F81232 break on/off with LCR register.
It's the same with 16550A LCR register layout.

Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
[ johan: fix corrupt line settings on break due to missing shadow_lcr
  update in set_termios() ]
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: f81232: add high baud rate support</title>
<updated>2019-05-03T07:19:54+00:00</updated>
<author>
<name>Ji-Ze Hong (Peter Hong)</name>
<email>hpeter@gmail.com</email>
</author>
<published>2019-04-30T01:22:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=268ddb5e9b62221beda22b8e956cf6e732538a90'/>
<id>268ddb5e9b62221beda22b8e956cf6e732538a90</id>
<content type='text'>
The F81232 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates
can be up to 1.5Mbits with 24MHz.

F81232 Clock registers (106h)

Bit1-0:     Clock source selector
                    00: 1.846MHz.
                    01: 18.46MHz.
                    10: 24MHz.
                    11: 14.77MHz.

Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The F81232 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates
can be up to 1.5Mbits with 24MHz.

F81232 Clock registers (106h)

Bit1-0:     Clock source selector
                    00: 1.846MHz.
                    01: 18.46MHz.
                    10: 24MHz.
                    11: 14.77MHz.

Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: f81232: clear overrun flag</title>
<updated>2019-05-03T07:19:54+00:00</updated>
<author>
<name>Ji-Ze Hong (Peter Hong)</name>
<email>hpeter@gmail.com</email>
</author>
<published>2019-04-30T01:22:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1c6b7ab2dd0763657fc7cac562976fa01772d040'/>
<id>1c6b7ab2dd0763657fc7cac562976fa01772d040</id>
<content type='text'>
The F81232 will report data and LSR with bulk like following format:
bulk-in data: [LSR(1Byte)+DATA(1Byte)][LSR(1Byte)+DATA(1Byte)]...

LSR will auto clear frame/parity/break error flag when reading by H/W,
but overrrun will only cleared when reading LSR. So this patch add a
worker to read LSR when overrun and flush the worker on close() &amp;
suspend().

Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The F81232 will report data and LSR with bulk like following format:
bulk-in data: [LSR(1Byte)+DATA(1Byte)][LSR(1Byte)+DATA(1Byte)]...

LSR will auto clear frame/parity/break error flag when reading by H/W,
but overrrun will only cleared when reading LSR. So this patch add a
worker to read LSR when overrun and flush the worker on close() &amp;
suspend().

Cc: Oliver Neukum &lt;oneukum@suse.com&gt;
Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: f81232: fix interrupt worker not stop</title>
<updated>2019-05-03T07:18:31+00:00</updated>
<author>
<name>Ji-Ze Hong (Peter Hong)</name>
<email>hpeter@gmail.com</email>
</author>
<published>2019-04-30T01:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=804dbee1e49774918339c1e5a87400988c0819e8'/>
<id>804dbee1e49774918339c1e5a87400988c0819e8</id>
<content type='text'>
The F81232 will use interrupt worker to handle MSR change.
This patch will fix the issue that interrupt work should stop
in close() and suspend().

This also fixes line-status events being disabled after a suspend cycle
until the port is re-opened.

Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
[ johan: amend commit message ]
Fixes: 87fe5adcd8de ("USB: f81232: implement read IIR/MSR with endpoint")
Cc: stable &lt;stable@vger.kernel.org&gt;	# 4.1
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The F81232 will use interrupt worker to handle MSR change.
This patch will fix the issue that interrupt work should stop
in close() and suspend().

This also fixes line-status events being disabled after a suspend cycle
until the port is re-opened.

Signed-off-by: Ji-Ze Hong (Peter Hong) &lt;hpeter+linux_kernel@gmail.com&gt;
[ johan: amend commit message ]
Fixes: 87fe5adcd8de ("USB: f81232: implement read IIR/MSR with endpoint")
Cc: stable &lt;stable@vger.kernel.org&gt;	# 4.1
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: io_edgeport: fix up switch fall-through comments</title>
<updated>2019-05-03T06:01:11+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2019-05-02T17:35:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=deb55e40ced4109c53d92af1bc07e1e998979792'/>
<id>deb55e40ced4109c53d92af1bc07e1e998979792</id>
<content type='text'>
Gustavo has been working to fix up all of the switch statements that
"fall through" such that we can eventually turn on
-Wimplicit-fallthrough.  As part of that, the io_edgeport.c driver is a
bit "messy" with the parsing logic of a data packet.  Clean that logic
up a bit by unindenting one level of the logic, and properly label
/* Fall through */ to make gcc happy.

Reported-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Gustavo has been working to fix up all of the switch statements that
"fall through" such that we can eventually turn on
-Wimplicit-fallthrough.  As part of that, the io_edgeport.c driver is a
bit "messy" with the parsing logic of a data packet.  Clean that logic
up a bit by unindenting one level of the logic, and properly label
/* Fall through */ to make gcc happy.

Reported-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: drop unnecessary goto</title>
<updated>2019-04-30T08:25:04+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-04-25T16:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b67b10a5229c26931b3b5a7d07e1095ba58acb4'/>
<id>5b67b10a5229c26931b3b5a7d07e1095ba58acb4</id>
<content type='text'>
Drop an unnecessary goto from a write-urb completion error path.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drop an unnecessary goto from a write-urb completion error path.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: clean up throttle handling</title>
<updated>2019-04-30T08:23:29+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-04-25T16:05:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a8d78d9f385642696723fcb9c52c2c2805fa4249'/>
<id>a8d78d9f385642696723fcb9c52c2c2805fa4249</id>
<content type='text'>
Clean up the throttle implementation by dropping the redundant
throttle_req flag which was a remnant from back when there was only a
single read URB.

Also convert the throttled flag to an atomic bit flag.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clean up the throttle implementation by dropping the redundant
throttle_req flag which was a remnant from back when there was only a
single read URB.

Also convert the throttled flag to an atomic bit flag.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: fix unthrottle races</title>
<updated>2019-04-30T08:23:28+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-04-25T16:05:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3f5edd58d040bfa4b74fb89bc02f0bc6b9cd06ab'/>
<id>3f5edd58d040bfa4b74fb89bc02f0bc6b9cd06ab</id>
<content type='text'>
Fix two long-standing bugs which could potentially lead to memory
corruption or leave the port throttled until it is reopened (on weakly
ordered systems), respectively, when read-URB completion races with
unthrottle().

First, the URB must not be marked as free before processing is complete
to prevent it from being submitted by unthrottle() on another CPU.

	CPU 1				CPU 2
	================		================
	complete()			unthrottle()
	  process_urb();
	  smp_mb__before_atomic();
	  set_bit(i, free);		  if (test_and_clear_bit(i, free))
	  					  submit_urb();

Second, the URB must be marked as free before checking the throttled
flag to prevent unthrottle() on another CPU from failing to observe that
the URB needs to be submitted if complete() sees that the throttled flag
is set.

	CPU 1				CPU 2
	================		================
	complete()			unthrottle()
	  set_bit(i, free);		  throttled = 0;
	  smp_mb__after_atomic();	  smp_mb();
	  if (throttled)		  if (test_and_clear_bit(i, free))
	  	  return;			  submit_urb();

Note that test_and_clear_bit() only implies barriers when the test is
successful. To handle the case where the URB is still in use an explicit
barrier needs to be added to unthrottle() for the second race condition.

Fixes: d83b405383c9 ("USB: serial: add support for multiple read urbs")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix two long-standing bugs which could potentially lead to memory
corruption or leave the port throttled until it is reopened (on weakly
ordered systems), respectively, when read-URB completion races with
unthrottle().

First, the URB must not be marked as free before processing is complete
to prevent it from being submitted by unthrottle() on another CPU.

	CPU 1				CPU 2
	================		================
	complete()			unthrottle()
	  process_urb();
	  smp_mb__before_atomic();
	  set_bit(i, free);		  if (test_and_clear_bit(i, free))
	  					  submit_urb();

Second, the URB must be marked as free before checking the throttled
flag to prevent unthrottle() on another CPU from failing to observe that
the URB needs to be submitted if complete() sees that the throttled flag
is set.

	CPU 1				CPU 2
	================		================
	complete()			unthrottle()
	  set_bit(i, free);		  throttled = 0;
	  smp_mb__after_atomic();	  smp_mb();
	  if (throttled)		  if (test_and_clear_bit(i, free))
	  	  return;			  submit_urb();

Note that test_and_clear_bit() only implies barriers when the test is
successful. To handle the case where the URB is still in use an explicit
barrier needs to be added to unthrottle() for the second race condition.

Fixes: d83b405383c9 ("USB: serial: add support for multiple read urbs")
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: spcp8x5: simplify init_termios</title>
<updated>2019-04-26T06:38:02+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-04-21T12:21:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=623c46f7b641bc95397eac5c28a04e8e832b9a97'/>
<id>623c46f7b641bc95397eac5c28a04e8e832b9a97</id>
<content type='text'>
Simplify init_termios which is only used to override the initial
baudrate.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify init_termios which is only used to override the initial
baudrate.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>USB: serial: oti6858: simplify init_termios</title>
<updated>2019-04-26T06:38:00+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2019-04-21T12:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d8a7f23c59cfb9420f0f9e22af6fa8afddaba55d'/>
<id>d8a7f23c59cfb9420f0f9e22af6fa8afddaba55d</id>
<content type='text'>
Simplify init_termios which is only used to override the initial
baudrate.

Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simplify init_termios which is only used to override the initial
baudrate.

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