diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-20 19:29:18 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-10-20 19:29:18 +0200 |
commit | 29865005f9c90b6addc423221afa421bf555c84e (patch) | |
tree | 7216e7f481ce8b2b276494c00ff23986b9976ac1 /sys/src | |
parent | 499478eb621bf29975cb617a98ebbb3c1febea93 (diff) |
nusb/ether: tune buffer size parameters for SMSC ethernet (raspi) (thanks richard miller)
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/cmd/nusb/ether/smsc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/src/cmd/nusb/ether/smsc.c b/sys/src/cmd/nusb/ether/smsc.c index 43143d3d8..87c59e917 100644 --- a/sys/src/cmd/nusb/ether/smsc.c +++ b/sys/src/cmd/nusb/ether/smsc.c @@ -14,10 +14,9 @@ enum { Resettime = 1000, E2pbusytime = 1000, Afcdefault = 0xF830A1, -// Hsburst = 37, /* from original linux driver */ - Hsburst = 8, + Hsburst = 24, Fsburst = 129, - Defbulkdly = 0x2000, + Defbulkdly = 1000, Ethp8021q = 0x8100, MACoffset = 1, @@ -211,11 +210,9 @@ smscreceive(Dev *ep) uint hd; int n; - if(Doburst) - b = allocb(Hsburst*512); - else - b = allocb(Maxpkt+4); - if((n = read(ep->dfd, b->wp, b->lim - b->base)) < 0){ + n = Doburst? Hsburst*512 : Maxpkt+4; + b = allocb(n); + if((n = read(ep->dfd, b->wp, n)) < 0){ freeb(b); return -1; } |