Hello,

I think I have found a bug in kl5kusb105.c. I am using 2.6.0. I tried to use a few lines of the kl5kusb105.c code in my own driver and it didn't work. This was what I took:

Line 994:
    if (user_termios_to_kernel_termios(&priv->termios,
                  (struct termios *)arg))
        return -EFAULT;
    klsi_105_set_termios(port, &priv->termios);

The problem here is, that this puts the new termio settings into priv->termios and gives that to klsi_105_set_termios as the old_termios parameter. That means, that all changes are discarded. I now use this instead and it works for me:

    if (user_termios_to_kernel_termios(&termios,
            (struct termios *)arg))
        return -EFAULT;
    memcpy(port->tty->termios,&termios,sizeof(struct termios));
    saal_set_termios(port, NULL);

So I copy the new termios to port->tty->termios so that set_termios sees them as the new termio settings. I am now running a serial terminal attached to my usb serial converter. Perhaps one should also save the old settings from port->tty->termios and give that to set_termios as the
old_termios parameter, but my set_termios doesn't currently use it.


Any comments? Did you allready know this?

Regards
  Alexander


-- ,,, (o o) +-oOO--(_)--OOo--/""""T""""""""""""""""""""""""""""""""""""""""""T | Alexander Schulz | ... denn man ist immer so tot, | | [EMAIL PROTECTED] | wie man sich fuehlt! | | www.shark-linux.de | (D. Adams : mostly harmless) | +---------------------+------------------------------------------+ | The system has detected an internal processing error in module | | reality.ko Please shut down your universe and reboot. | +----------------------------------------------------------------+



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to