<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/tty/serial/serial_core.c, branch linux-3.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2013-05-08T03:08:18Z</updated>
<entry>
<title>serial_core.c: add put_device() after device_find_child()</title>
<updated>2013-05-08T03:08:18Z</updated>
<author>
<name>Federico Vaga</name>
</author>
<published>2013-04-15T14:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=377dcc3af695bc2bd7e571f62d8accfb8e0733f1'/>
<id>urn:sha1:377dcc3af695bc2bd7e571f62d8accfb8e0733f1</id>
<content type='text'>
commit 5a65dcc04cda41f4122aacc37a5a348454645399 upstream.

The serial core uses device_find_child() but does not drop the reference to
the retrieved child after using it. This patch add the missing put_device().

What I have done to test this issue.

I used a machine with an AMBA PL011 serial driver. I tested the patch on
next-20120408 because the last branch [next-20120415] does not boot on this
board.

For test purpose, I added some pr_info() messages to print the refcount
after device_find_child() (lines: 1937,2009), and after put_device()
(lines: 1947, 2021).

Boot the machine *without* put_device(). Then:

echo reboot &gt; /sys/power/disk
echo disk &gt; /sys/power/state
[   87.058575] uart_suspend_port:1937 refcount 4
[   87.058582] uart_suspend_port:1947 refcount 4
[   87.098083] uart_resume_port:2009refcount 5
[   87.098088] uart_resume_port:2021 refcount 5

echo disk &gt; /sys/power/state
[  103.055574] uart_suspend_port:1937 refcount 6
[  103.055580] uart_suspend_port:1947 refcount 6
[  103.095322] uart_resume_port:2009 refcount 7
[  103.095327] uart_resume_port:2021 refcount 7

echo disk &gt; /sys/power/state
[  252.459580] uart_suspend_port:1937 refcount 8
[  252.459586] uart_suspend_port:1947 refcount 8
[  252.499611] uart_resume_port:2009 refcount 9
[  252.499616] uart_resume_port:2021 refcount 9

The refcount continuously increased.

Boot the machine *with* this patch. Then:

echo reboot &gt; /sys/power/disk
echo disk &gt; /sys/power/state
[  159.333559] uart_suspend_port:1937 refcount 4
[  159.333566] uart_suspend_port:1947 refcount 3
[  159.372751] uart_resume_port:2009 refcount 4
[  159.372755] uart_resume_port:2021 refcount 3

echo disk &gt; /sys/power/state
[  185.713614] uart_suspend_port:1937 refcount 4
[  185.713621] uart_suspend_port:1947 refcount 3
[  185.752935] uart_resume_port:2009 refcount 4
[  185.752940] uart_resume_port:2021 refcount 3

echo disk &gt; /sys/power/state
[  207.458584] uart_suspend_port:1937 refcount 4
[  207.458591] uart_suspend_port:1947 refcount 3
[  207.498598] uart_resume_port:2009 refcount 4
[  207.498605] uart_resume_port:2021 refcount 3

The refcount correctly handled.

Signed-off-by: Federico Vaga &lt;federico.vaga@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'omap-serial' of git://git.linaro.org/people/rmk/linux-arm</title>
<updated>2012-12-12T15:45:16Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2012-12-12T15:45:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d07e43d70eef15a44a2c328a913d8d633a90e088'/>
<id>urn:sha1:d07e43d70eef15a44a2c328a913d8d633a90e088</id>
<content type='text'>
Pull ARM OMAP serial updates from Russell King:
 "This series is a major reworking of the OMAP serial driver code fixing
  various bugs in the hardware-assisted flow control, extending up into
  serial_core for a couple of issues.  These fixes have been done as a
  set of progressive changes and transformations in the hope that no new
  bugs will be introduced by this series.

  The problems are many-fold, from the driver not being informed about
  updated settings, to the driver not knowing what the intentions of the
  upper layers are.

  The first four patches tackle the serial_core layer, allowing it to
  provide the necessary information to drivers, and the remaining
  patches allow the OMAP serial driver to take advantage of this.

  This brings hardware assisted RTS/CTS and XON/OFF flow control into a
  useful state.

  These patches have been in linux-next for most of the last cycle;
  indeed they predate the previous merge window.  They've also been
  posted to the OMAP people."

* 'omap-serial' of git://git.linaro.org/people/rmk/linux-arm: (21 commits)
  SERIAL: omap: fix hardware assisted flow control
  SERIAL: omap: simplify (2)
  SERIAL: omap: move xon/xoff setting earlier
  SERIAL: omap: always set TCR
  SERIAL: omap: simplify
  SERIAL: omap: don't read back LCR/MCR/EFR
  SERIAL: omap: serial_omap_configure_xonxoff() contents into set_termios
  SERIAL: omap: configure xon/xoff before setting modem control lines
  SERIAL: omap: remove OMAP_UART_SYSC_RESET and OMAP_UART_FIFO_CLR
  SERIAL: omap: move driver private definitions and structures to driver
  SERIAL: omap: remove 'irq_pending' bitfield
  SERIAL: omap: fix MCR TCRTLR bit handling
  SERIAL: omap: fix set_mctrl() breakage
  SERIAL: omap: no need to re-read EFR
  SERIAL: omap: remove setting of EFR SCD bit
  SERIAL: omap: allow hardware assisted IXANY mode to be disabled
  SERIAL: omap: allow hardware assisted rts/cts modes to be disabled
  SERIAL: core: add throttle/unthrottle callbacks for hardware assisted flow control
  SERIAL: core: add hardware assisted h/w flow control support
  SERIAL: core: add hardware assisted s/w flow control support
  ...

Conflicts:
	drivers/tty/serial/omap-serial.c
</content>
</entry>
<entry>
<title>drivers/tty/serial/serial_core.c: clean up HIGH_BITS_OFFSET usage</title>
<updated>2012-11-27T00:18:04Z</updated>
<author>
<name>Andrew Morton</name>
</author>
<published>2012-11-26T23:47:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd985e1def964bb3a3adf5e2760af10510fd3f58'/>
<id>urn:sha1:fd985e1def964bb3a3adf5e2760af10510fd3f58</id>
<content type='text'>
serial_core.c usually does

	if (HIGH_BITS_OFFSET)
		expr-involving-HIGH_BITS_OFFSET()

at least to avoid generating useless code on 32-bit machines, where
HIGH_BITS_OFFSET is zero.  Do that in uart_get_attr_port().

Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: call tty_port_destroy in the rest of drivers</title>
<updated>2012-11-16T01:20:58Z</updated>
<author>
<name>Jiri Slaby</name>
</author>
<published>2012-11-15T08:49:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=191c5f10275cfbb36802edadbdb10c73537327b4'/>
<id>urn:sha1:191c5f10275cfbb36802edadbdb10c73537327b4</id>
<content type='text'>
After commit "TTY: move tty buffers to tty_port", the tty buffers are
not freed in some drivers. This is because tty_port_destructor is not
called whenever a tty_port is freed. This was an assumption I counted
with but was unfortunately untrue. So fix the drivers to fulfil this
assumption.

To be sure, the TTY buffers (and later some stuff) are gone along with
the tty_port, we have to call tty_port_destroy at tear-down places.
This is mostly where the structure containing a tty_port is freed.
This patch does exactly that -- put tty_port_destroy at those places.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: cast before shifting on port io</title>
<updated>2012-11-16T00:59:58Z</updated>
<author>
<name>Alan Cox</name>
</author>
<published>2012-11-06T14:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a876b39b5bc94f67e8a3a7adfd270b8c21fc762'/>
<id>urn:sha1:7a876b39b5bc94f67e8a3a7adfd270b8c21fc762</id>
<content type='text'>
Without this we will shift data into oblivion and give wrong results on
some configurations

Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>SERIAL: core: add throttle/unthrottle callbacks for hardware assisted flow control</title>
<updated>2012-11-04T11:25:56Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2012-04-17T16:23:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9aba8d5b011193c8e01d565c5b585df5b94f1db2'/>
<id>urn:sha1:9aba8d5b011193c8e01d565c5b585df5b94f1db2</id>
<content type='text'>
Add two callbacks for hardware assisted flow control; we need to know
when the tty layers want us to stop and restart due to their buffer
levels.

Call a driver specific throttle/unthrottle function if and only if the
driver indicates that it is using an enabled hardware assisted flow
control method, otherwise fall back to the non-hardware assisted
methods.

Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>SERIAL: core: add hardware assisted h/w flow control support</title>
<updated>2012-11-04T11:25:55Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2012-04-17T15:41:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dba05832cbe4f305dfd998fb26d7c685d91fbbd8'/>
<id>urn:sha1:dba05832cbe4f305dfd998fb26d7c685d91fbbd8</id>
<content type='text'>
Ports which are handling h/w flow control in hardware must not have
their RTS state altered depending on the tty's hardware-stopped state.
Avoid this additional logic when setting the termios state.

Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>SERIAL: core: add hardware assisted s/w flow control support</title>
<updated>2012-11-04T11:25:54Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2012-04-17T15:34:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2cbacafd7af0f1cc7a433668c662a91ba6aabc1b'/>
<id>urn:sha1:2cbacafd7af0f1cc7a433668c662a91ba6aabc1b</id>
<content type='text'>
Ports which are capable of handling s/w flow control in hardware to
know when the s/w flow control termios settings are changed.  Add a
flag to allow the low level serial drivers to indicate that they
support this, and these changes should be propagated to them.

Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>SERIAL: core: use local variable uport in uart_set_termios()</title>
<updated>2012-11-04T11:25:53Z</updated>
<author>
<name>Russell King</name>
</author>
<published>2012-09-24T10:13:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dec94e70e12c39440e63159e0050d46795dfcf09'/>
<id>urn:sha1:dec94e70e12c39440e63159e0050d46795dfcf09</id>
<content type='text'>
This is to make the following change more clear.

Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Russell King &lt;rmk+kernel@arm.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>uart: add other serial core layer get attributes</title>
<updated>2012-10-30T21:05:32Z</updated>
<author>
<name>Alan Cox</name>
</author>
<published>2012-10-29T15:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=373bac4cf4c3198cc6d6b9aec7c5d576a06f1f1c'/>
<id>urn:sha1:373bac4cf4c3198cc6d6b9aec7c5d576a06f1f1c</id>
<content type='text'>
Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
