linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* uart_ioctl OOPS with irtty-sir
@ 2003-04-04  1:34 Jean Tourrilhes
  2003-04-04  9:25 ` Russell King
  0 siblings, 1 reply; 9+ messages in thread
From: Jean Tourrilhes @ 2003-04-04  1:34 UTC (permalink / raw)
  To: Linux kernel mailing list, Russell King

	Hi Russel,

	Sorry to bring more bad news...

	In 2.5.66, somebody (maybe you) added a check to
tty_hung_up_p(filp) in uart_ioctl().
	The code now looks like this (drivers/serial/core.c) :
------------------------------------
static int
uart_ioctl(struct tty_struct *tty, struct file *filp, unsigned int cmd,
	   unsigned long arg)
{
[...]
	if (tty_hung_up_p(filp)) {
		ret = -EIO;
		goto out_up;
	}
[...]
	switch (cmd) {
	case TIOCMSET:
		ret = uart_set_modem_info(state->port, cmd,
					  (unsigned int *)arg);
		break;
------------------------------------

	Unfortunately, the irtty-sir driver, which is a TTY line
discipline and a network driver, need to be able to change the RTS and
DTR line from a kernel thread.
	The code looks like (drivers/net/irda/irtty-sir.c) :
----------------------------
static int irtty_set_dtr_rts(struct sir_dev *dev, int dtr, int rts)
{
[...]
	if (priv->tty->driver.ioctl(priv->tty, NULL, TIOCMSET, (unsigned long) &arg)) { 
		IRDA_DEBUG(2, "%s(), error doing ioctl!\n", __FUNCTION__);
	}
----------------------------

	You can guess the result : instant OPPS.


	I don't really see how I would be able to get hold of a "struct
file" in kernel space, so please advise.

	Have fun, and thanks in advance...

	Jean

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-04-14 16:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-04  1:34 uart_ioctl OOPS with irtty-sir Jean Tourrilhes
2003-04-04  9:25 ` Russell King
2003-04-04 17:24   ` Jean Tourrilhes
2003-04-08 17:44   ` Jean Tourrilhes
2003-04-13 16:04     ` Russell King
2003-04-14 16:30       ` Jean Tourrilhes
2003-04-13 16:51     ` Russell King
2003-04-14 16:31       ` Jean Tourrilhes
2003-04-10  2:29   ` Jean Tourrilhes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).