[lkml]   [2003]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectuart_ioctl OOPS with irtty-sir
    	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);

    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...

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:34    [W:0.019 / U:12.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site