<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/usb/gadget/function/u_serial.c, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-03-11T06:53:09Z</updated>
<entry>
<title>usb: gadget: serial: fix Tx stall after buffer overflow</title>
<updated>2020-03-11T06:53:09Z</updated>
<author>
<name>Sergey Organov</name>
</author>
<published>2020-01-29T11:21:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd75e3d87256f42cdcc65c2d51a6a106dc721729'/>
<id>urn:sha1:dd75e3d87256f42cdcc65c2d51a6a106dc721729</id>
<content type='text'>
[ Upstream commit e4bfded56cf39b8d02733c1e6ef546b97961e18a ]

Symptom: application opens /dev/ttyGS0 and starts sending (writing) to
it while either USB cable is not connected, or nobody listens on the
other side of the cable. If driver circular buffer overflows before
connection is established, no data will be written to the USB layer
until/unless /dev/ttyGS0 is closed and re-opened again by the
application (the latter besides having no means of being notified about
the event of establishing of the connection.)

Fix: on open and/or connect, kick Tx to flush circular buffer data to
USB layer.

Signed-off-by: Sergey Organov &lt;sorganov@gmail.com&gt;
Reviewed-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Signed-off-by: Felipe Balbi &lt;balbi@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: u_serial: add missing port entry locking</title>
<updated>2019-12-21T09:40:43Z</updated>
<author>
<name>Michał Mirosław</name>
</author>
<published>2019-08-10T08:42:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=72f996aa90cc3f76f64bf51d3668adb663f23dfe'/>
<id>urn:sha1:72f996aa90cc3f76f64bf51d3668adb663f23dfe</id>
<content type='text'>
commit daf82bd24e308c5a83758047aff1bd81edda4f11 upstream.

gserial_alloc_line() misses locking (for a release barrier) while
resetting port entry on TTY allocation failure. Fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Tested-by: Ladislav Michl &lt;ladis@linux-mips.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: serial: fix oops when data rx'd after close</title>
<updated>2018-10-20T07:51:32Z</updated>
<author>
<name>Stephen Warren</name>
</author>
<published>2017-08-16T20:30:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92811e27679945a0cef78288e3d45bc22f3ff86f'/>
<id>urn:sha1:92811e27679945a0cef78288e3d45bc22f3ff86f</id>
<content type='text'>
commit daa35bd95634a2a2d72d1049c93576a02711cb1a upstream.

When the gadget serial device has no associated TTY, do not pass any
received data into the TTY layer for processing; simply drop it instead.
This prevents the TTY layer from calling back into the gadget serial
driver, which will then crash in e.g. gs_write_room() due to lack of
gadget serial device to TTY association (i.e. a NULL pointer dereference).

Signed-off-by: Stephen Warren &lt;swarren@nvidia.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>usb: gadget: Add the gserial port checking in gs_start_tx()</title>
<updated>2016-08-22T07:45:13Z</updated>
<author>
<name>Baolin Wang</name>
</author>
<published>2016-06-30T09:10:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=511a36d2f357724312bb3776d2f6eed3890928b2'/>
<id>urn:sha1:511a36d2f357724312bb3776d2f6eed3890928b2</id>
<content type='text'>
When usb gadget is set gadget serial function, it will be crash in below
situation.

It will clean the 'port-&gt;port_usb' pointer in gserial_disconnect() function
when usb link is inactive, but it will release lock for disabling the endpoints
in this function. Druing the lock release period, it maybe complete one request
to issue gs_write_complete()---&gt;gs_start_tx() function, but the 'port-&gt;port_usb'
pointer had been set NULL, thus it will be crash in gs_start_tx() function.

This patch adds the 'port-&gt;port_usb' pointer checking in gs_start_tx() function
to avoid this situation.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>usb: gadget: fix unused-but-set-variale warnings</title>
<updated>2016-06-21T08:04:09Z</updated>
<author>
<name>Michal Nazarewicz</name>
</author>
<published>2016-05-31T12:17:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=872ce5119524f33fafacc4d9610a431185ea66a2'/>
<id>urn:sha1:872ce5119524f33fafacc4d9610a431185ea66a2</id>
<content type='text'>
Those are enabled with W=1 make option.

The patch leaves of some type-limits warnings which are caused by
generic macros used in a way where they produce always-false
conditions.

Signed-off-by: Michal Nazarewicz &lt;mina86@mina86.com&gt;
Signed-off-by: Felipe Balbi &lt;felipe.balbi@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>tty: Replace TTY_THROTTLED bit tests with tty_throttled()</title>
<updated>2016-04-30T16:26:55Z</updated>
<author>
<name>Peter Hurley</name>
</author>
<published>2016-04-10T00:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=97ef38b8210d7459d4cb51668cdf3983772ac6b7'/>
<id>urn:sha1:97ef38b8210d7459d4cb51668cdf3983772ac6b7</id>
<content type='text'>
Abstract TTY_THROTTLED bit tests with tty_throttled().

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: Add the console support for usb-to-serial port</title>
<updated>2015-12-22T17:49:39Z</updated>
<author>
<name>Baolin Wang</name>
</author>
<published>2015-11-21T07:44:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a5beaaf39455e4388251e95ef2ce6849cabf3393'/>
<id>urn:sha1:a5beaaf39455e4388251e95ef2ce6849cabf3393</id>
<content type='text'>
It dose not work when we want to use the usb-to-serial port based
on one usb gadget as a console. Thus this patch adds the console
initialization to support this request.

To avoid the re-entrance when transferring data with usb endpoint,
it introduces a kthread to do the IO transmission.

Signed-off-by: Baolin Wang &lt;baolin.wang@linaro.org&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty</title>
<updated>2015-11-05T05:35:12Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2015-11-05T05:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd0d351de7bbd718bc2b34d5846854831aa2b88c'/>
<id>urn:sha1:fd0d351de7bbd718bc2b34d5846854831aa2b88c</id>
<content type='text'>
Pull tty/serial driver updates from Greg KH:
 "Here is the big tty and serial driver update for 4.4-rc1.

  Lots of serial driver updates and a few small tty core changes.  Full
  details in the shortlog.

  All of these have been in linux-next for a while"

* tag 'tty-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (148 commits)
  tty: Use unbound workqueue for all input workers
  tty: Abstract tty buffer work
  tty: Prevent tty teardown during tty_write_message()
  tty: core: Use correct spinlock flavor in tiocspgrp()
  tty: Combine SIGTTOU/SIGTTIN handling
  serial: amba-pl011: fix incorrect integer size in pl011_fifo_to_tty()
  ttyFDC: Fix build problems due to use of module_{init,exit}
  tty: remove unneeded return statement
  serial: 8250_mid: add support for DMA engine handling from UART MMIO
  dmaengine: hsu: remove platform data
  dmaengine: hsu: introduce stubs for the exported functions
  dmaengine: hsu: make the UART driver in control of selecting this driver
  serial: fix mctrl helper functions
  serial: 8250_pci: Intel MID UART support to its own driver
  serial: fsl_lpuart: add earlycon support
  tty: disable unbind for old 74xx based serial/mpsc console port
  serial: pl011: Spelling s/clocks-names/clock-names/
  n_tty: Remove reader wakeups for TTY_BREAK/TTY_PARITY chars
  tty: synclink, fix indentation
  serial: at91, fix rs485 properties
  ...
</content>
</entry>
<entry>
<title>usb: gadget: gserial: Privatize close_wait</title>
<updated>2015-10-18T04:11:29Z</updated>
<author>
<name>Peter Hurley</name>
</author>
<published>2015-10-10T20:00:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b140dfe622ca23bad6755ce7cd7de2245ef2b68d'/>
<id>urn:sha1:b140dfe622ca23bad6755ce7cd7de2245ef2b68d</id>
<content type='text'>
close_wait is no longer needed or provided by the tty core.
Move close_wait to struct gs_port.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>usb: gadget: u_serial: eliminate abuse of ep-&gt;driver data</title>
<updated>2015-09-27T15:54:31Z</updated>
<author>
<name>Robert Baldyga</name>
</author>
<published>2015-09-16T10:11:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=18411c0f94716ec225a4f7e1d7735c80f5ec0dab'/>
<id>urn:sha1:18411c0f94716ec225a4f7e1d7735c80f5ec0dab</id>
<content type='text'>
Since ep-&gt;driver_data is not used for endpoint claiming, neither for
enabled/disabled state storing, we can reduce number of places where
we read or modify it's value, as now it has no particular meaning for
function or framework logic.

In case of u_serial ep-&gt;driver_data stores pointer to struct gs_port,
which is referenced in many places in code. Code using ep-&gt;driver_data
to mark endpoint as enabled/disabled has been removed.

Signed-off-by: Robert Baldyga &lt;r.baldyga@samsung.com&gt;
Signed-off-by: Felipe Balbi &lt;balbi@ti.com&gt;
</content>
</entry>
</feed>
