DragonFly kernel List (threaded) for 2008-01
DragonFly BSD
DragonFly kernel List (threaded) for 2008-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

tty(4) buffer sizes

From: Hasso Tepper <hasso@xxxxxxxxx>
Date: Mon, 14 Jan 2008 08:23:01 +0200

I have tested briefly some UMTS/HSDPA modems with idea to obtain one, but 
couldn't get them work reliably in DragonFly. All of them were using the 
umsm(4) driver and using HSDPA (3.6Mbit/s).

The problem is that tty(4) buffers are too small. With current code I 
couldn't get single MTU size packets through, dmesg was full of "kernel: 
ucom0: lost 374 chars" messages. Devices started to work for me without 
the messages if I increased umsm(4) buffers (UMSMBUFSZ) to 4096 and 
applied this oneliner to the sys/kern/tty.c:

@@ -2307,7 +2307,7 @@ ttsetwater(struct tty *tp)
                 * sizes and watermarks.
                cps = TTYHOG - 2 * 256;
-               tp->t_ififosize = 2 * 256;
+               tp->t_ififosize = 2 * 2048;
                cps = tp->t_ispeedwat / 10;

I'm not familiar with tty(4) code in general, so I'm not able to evaluate 
whether it's safe or not and what other things should be changed etc. 
Comment seems to say that it should apply to old devices only, but 
clearly ucom(4) doesn't know anything about t_ispeedwat. Should it? 
umsm(4) doesn't know anything of line speed either :). How should I 

Note, that I'm not able to test every idea yet, I don't have any device 
myself, but it will change soon.

As as sidenote, I think that we should rename umsm(4) to ugensa(4) like it 
is NetBSD. There is nothing Qualcomm MSM chip specific in the driver.


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]