Re: rfcomm-tty driver->put_char

David Woodhouse (dwmw2@infradead.org)
Mon, 19 May 2003 22:54:10 +0100


On Mon, 2003-05-19 at 22:16, Marcel Holtmann wrote:
> > Once possible solution is to implement our own put_char() routine which
> > _does_ always allow the character to be queued, rather than allowing
> > tty_default_put_char() to call rfcomm_tty_write() which will fail.
>
> After some more tests, I plan to push this change.

Note that I recommend this for 2.4 _only_. For 2.5 the correct fix is to
fix the tty_driver API, so you can perhaps let this 'bug' remain there
for a while. I seem to be the only person using an rfcomm modem for
dialin anyway, and 2.5 doesn't even get as far as a login prompt on that
box, let alone support V.110 dialin over ISDN which is also required, so
I really won't miss it :)

The write_room() function is documented to return the number of
characters which can _currently_ be pushed to the tty driver. The n_tty
code has no business thinking that the value returned from write_room()
will be valid at _any_ point in the future, and the fact that put_char()
is not permitted to return any success/failure indication like write()
can is just bizarre.

-- 
dwmw2

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/