u3g and ubsa
Nick Hibma
nick at van-laarhoven.org
Wed Nov 26 01:29:16 PST 2008
> dmesg has:
> Nov 26 10:25:49 vbook kernel: ucom0: invalid receive data size,
> -754491385 chars
> Nov 26 10:25:49 vbook kernel: ucom0: invalid receive data size,
> -754491390 chars
> Nov 26 10:25:51 vbook kernel: ucom0: invalid receive data size,
> -754491385 chars
> Nov 26 10:25:52 vbook kernel: ucom0: invalid receive data size,
> -754491390 chars
> Nov 26 10:25:56 vbook kernel: ucom0: invalid receive data size,
> 626606082 chars
> Nov 26 10:25:59 vbook kernel: ucom0: invalid receive data size,
> 466214914 chars
> Nov 26 10:26:00 vbook kernel: ucom0: invalid receive data size,
> 466214919 chars
> Nov 26 10:26:01 vbook kernel: ucom0: invalid receive data size,
> 466214914 chars
Could you try the following:
Change the ibufsize and obufsize values to a power of 2 in u3g_attach:
ucom->sc_ibufsize = 4096;
ucom->sc_ibufsizepad = ucom->sc_ibufsize;
ucom->sc_obufsize = 4096;
Perhaps the USB stack does not like arbitrarily sized buffers due to
transfer rollovers at the end of the buffer / memory page or something.
If that does not work could you lower it to 512, and if that does not work
change it to:
ucom->sc_ibufsize = UGETW(ed->wMaxPacketSize);
ucom->sc_ibufsizepad = ucom->sc_ibufsize;
ucom->sc_obufsize = UGETW(ed->wMaxPacketSize);
That last case is worst case as it would considerably increase overhead,
especially in USB 1.0 cases where the max. wMaxPacketSize is 64 bytes.
If it works I'd be interested to hear about performance (download from SUN
is always a good one), and any messages in dmesg or in a ppp logfile for
dropped chars, and invalid FCS.
Cheers,
Nick
More information about the freebsd-current
mailing list