On Gwe, 2004-10-01 at 17:24, Al Borchers wrote: > Its a design decision for the tty layer. You should choose whatever is > best there and the drivers will have to adapt.
>From a tty layer I don't think there is a motivation to enforce no sleep. Hopefully nobody has a reason to need to fiddle with termios data in their IRQ handlers ? > To correctly support TCSETAW/TCSETSW the USB serial drivers would have to > have two different versions of set_termios--a non sleeping one to be called Providing the driver isnt sticking its nose into ->ioctl the tty layer core already correctly handles TCSETAW for you because it uses tty_wait_until_sent before issuing the change. You don't have to deal with that providing you've implemented driver->chars_in_buffer, and if neccessary ->wait_until_sent. In a waiting case the driver will get ->chars_in_buffer until it returns zero ->wait_until_sent ->change_termios which serializes with respect to the one writer. If you have a writer during a termios change by another well tough luck, you lose and I've no intention of changing that behaviour unless someone cites a standard requiring it. ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel