<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/tty_driver.h, branch v3.9</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.9</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-02-04T23:40:28Z</updated>
<entry>
<title>tty: Document required behavior of tty driver close()</title>
<updated>2013-02-04T23:40:28Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-01-30T17:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7be88b4ccb62737abe4bf27f9e66e224a70a12c4'/>
<id>urn:sha1:7be88b4ccb62737abe4bf27f9e66e224a70a12c4</id>
<content type='text'>
If the tty driver open() fails, the tty driver close() is still
called during the resultant tty release.

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>TTY: move cdev_add to tty_register_device</title>
<updated>2012-08-13T23:45:39Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-08-08T20:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7e73eca6a7b2967423902a4543821bb97cbbe698'/>
<id>urn:sha1:7e73eca6a7b2967423902a4543821bb97cbbe698</id>
<content type='text'>
We need the /dev/ node not to be available before we call
tty_register_device. Otherwise we might race with open and
tty_struct-&gt;port might not be available at that time.

This is not an issue now, but would be a problem after "TTY: use
tty_port_register_device" is applied.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: add support for unnumbered device nodes</title>
<updated>2012-08-13T23:45:38Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-08-08T20:26:43Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0019b4089ccef8148d8be83cc8adfc81a75b47d4'/>
<id>urn:sha1:0019b4089ccef8148d8be83cc8adfc81a75b47d4</id>
<content type='text'>
This allows drivers like ttyprintk to avoid hacks to create an
unnumbered node in /dev. It used to set TTY_DRIVER_DYNAMIC_DEV in
flags and call device_create on its own. That is incorrect, because
TTY_DRIVER_DYNAMIC_DEV may be set only if tty_register_device is
called explicitly.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: pty, switch to tty_alloc_driver</title>
<updated>2012-08-13T23:45:38Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-08-08T20:26:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21aca2fa00259f781d228496631b61dbb4274e90'/>
<id>urn:sha1:21aca2fa00259f781d228496631b61dbb4274e90</id>
<content type='text'>
Switch to the new driver allocation interface, as this is one of the
special call-sites. Here, we need TTY_DRIVER_DYNAMIC_ALLOC to not
allocate tty_driver-&gt;ports, cdevs and potentially other structures
because we reserve too many lines in pty. Instead, it provides the
tty_port&lt;-&gt;tty_struct link in tty-&gt;ops-&gt;install already.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Acked-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: pass flags to alloc_tty_driver</title>
<updated>2012-08-10T20:29:58Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-08-07T19:47:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7f0bc6a68ed93f3b4ad77b94df5ef32446c583e3'/>
<id>urn:sha1:7f0bc6a68ed93f3b4ad77b94df5ef32446c583e3</id>
<content type='text'>
We need to allow drivers that use neither tty_port_install nor
tty_port_register_device to link a tty_port to a tty somehow.  To
avoid a race with open, this has to be performed before
tty_register_device. But currently tty_driver-&gt;ports is allocated even
in tty_register_device because we do not know whether this is the PTY
driver. The PTY driver is special here due to an excessive count of
lines it declares to handle. We cannot handle tty_ports there this
way.

To circumvent this, we start passing tty_driver flags to
alloc_tty_driver already and we create tty_alloc_driver for this
purpose. There we can allocate tty_driver-&gt;ports and do all the magic
between tty_alloc_driver and tty_register_device. Later we will
introduce tty_port_link_device function for that purpose.

All drivers should eventually switch to this new tty driver allocation
interface.

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>tty: Move the handling of the tty release logic</title>
<updated>2012-07-17T16:13:38Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@linux.intel.com</email>
</author>
<published>2012-07-17T16:06:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=36b3c070d2346c890d690d71f6eab02f8c511137'/>
<id>urn:sha1:36b3c070d2346c890d690d71f6eab02f8c511137</id>
<content type='text'>
Now that we don't have tty-&gt;termios tied to drivers-&gt;tty we can untangle
the logic here. In addition we can push the removal logic out of the
destructor path.

At that point we can think about sorting out tty_port and console and all
the other ugly hangovers.

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>TTY: add ports array to tty_driver</title>
<updated>2012-06-14T00:30:54Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-06-04T11:35:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=04831dc154df9b83c3e5fd54b18448da507871f7'/>
<id>urn:sha1:04831dc154df9b83c3e5fd54b18448da507871f7</id>
<content type='text'>
It will hold tty_port structures for all drivers which do not want to
define tty-&gt;ops-&gt;install hook.

We ignore PTY here because it wants 1 million lines and it installs
tty_port in -&gt;install anyway.

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>TTY: tty_driver, document tty-&gt;ops-&gt;shutdown limitation</title>
<updated>2012-03-08T19:38:51Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=26b23209c0ea5503824df60b8f218fb04b80cad0'/>
<id>urn:sha1:26b23209c0ea5503824df60b8f218fb04b80cad0</id>
<content type='text'>
Note that tty-&gt;ops-&gt;shutdown is called from whatever context the user
drops the last tty reference from. E.g. if one takes a reference in
an ISR, tty close happens on other CPU and the final tty put is from
the ISR, tty-&gt;ops-&gt;shutdown will be called from that hard irq context.

We would have a problem in vt if we start using tty refcounting from
other contexts than user there. It is because vt's shutdown uses
mutexes. This is yet to be fixed.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Reported-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>TTY: remove minor_num from tty_driver</title>
<updated>2012-03-08T19:30:21Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=87cab16beb882d3f9e61a2c0184fa7cf76de1f90'/>
<id>urn:sha1:87cab16beb882d3f9e61a2c0184fa7cf76de1f90</id>
<content type='text'>
It was added back in 2004 and never used for anything real. Remove the
only assignment in the tree as well.

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>TTY: let alloc_tty_driver deduce the owner automatically</title>
<updated>2012-03-08T19:30:21Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2012-03-05T13:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1a54a76d5171f3ffd89eb69f6f38d535724e3d05'/>
<id>urn:sha1:1a54a76d5171f3ffd89eb69f6f38d535724e3d05</id>
<content type='text'>
Like the rest of the kernel, make a stub from alloc_tty_driver which
calls __alloc_tty_driver with proper owner. This will save us one more
assignment on the driver side.

Also this fixes some drivers which didn't set the owner. This allowed
user to remove the module from the system even though a tty from the
driver is still open.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
