]> git.lizzy.rs Git - plan9front.git/log
plan9front.git
10 years agopage(1): minus
cinap_lenrek [Mon, 26 May 2014 07:59:57 +0000 (09:59 +0200)]
page(1): minus

10 years agopage(1): theres no -r option, nor multipage restrictions
cinap_lenrek [Mon, 26 May 2014 07:52:47 +0000 (09:52 +0200)]
page(1): theres no -r option, nor multipage restrictions

10 years agomerge
aiju [Sun, 25 May 2014 23:11:08 +0000 (01:11 +0200)]
merge

10 years agogames/md: moonwalker!
aiju [Sun, 25 May 2014 23:10:46 +0000 (01:10 +0200)]
games/md: moonwalker!

10 years agopc64: fix ulongs for address of devarchs realmodemem file
cinap_lenrek [Sun, 25 May 2014 22:45:10 +0000 (00:45 +0200)]
pc64: fix ulongs for address of devarchs realmodemem file

10 years agodevproc: handle 64bit address writes to /proc/n/mem files
cinap_lenrek [Sun, 25 May 2014 22:27:06 +0000 (00:27 +0200)]
devproc: handle 64bit address writes to /proc/n/mem files

procwrite() did truncate the offset to 32bit ulong.
introduce off2addr() function that does the sign
extension hack and use it conststently for Qmem
reads and writes.

10 years agomerge
cinap_lenrek [Mon, 26 May 2014 20:49:07 +0000 (22:49 +0200)]
merge

10 years agokernel: simplify fdclose()
cinap_lenrek [Mon, 26 May 2014 20:47:34 +0000 (22:47 +0200)]
kernel: simplify fdclose()

10 years agodevproc: fix close and closefiles procctl
cinap_lenrek [Mon, 26 May 2014 20:43:21 +0000 (22:43 +0200)]
devproc: fix close and closefiles procctl

for the CMclose procctl, the fd number was not
bounds checked before indexing in the Fgrp.fd
array.

for the CMclosefiles, we looped fd from 0..maxfd-1,
but need to loop from 0..maxfd as maxfd is inclusive.

10 years agogames/md: small cpu and vdp bug fixes
aiju [Sun, 25 May 2014 19:45:13 +0000 (21:45 +0200)]
games/md: small cpu and vdp bug fixes

10 years agopc64: cleanup mmuzap
cinap_lenrek [Sun, 25 May 2014 18:34:26 +0000 (20:34 +0200)]
pc64: cleanup mmuzap

10 years agogames/md: first bug fixes
aiju [Sat, 24 May 2014 23:11:21 +0000 (01:11 +0200)]
games/md: first bug fixes

10 years agoadded crude version of games/md
aiju [Sun, 25 May 2014 21:14:23 +0000 (23:14 +0200)]
added crude version of games/md

10 years agolibauth: dont print blobs in auth_proxy error strings
cinap_lenrek [Sat, 24 May 2014 17:49:54 +0000 (19:49 +0200)]
libauth: dont print blobs in auth_proxy error strings

10 years agocpu: remove duplicate environment and chdir($home) code (thanks qrstuv)
cinap_lenrek [Sat, 24 May 2014 00:09:52 +0000 (02:09 +0200)]
cpu: remove duplicate environment and chdir($home) code (thanks qrstuv)

newns() (called by auth_chuid()) already prepares the
environment variables and puts us in a sane working
directory (as specified by the namespace file).

10 years agokernel: fix read size calculation in pio() demand load
cinap_lenrek [Fri, 23 May 2014 23:27:57 +0000 (01:27 +0200)]
kernel: fix read size calculation in pio() demand load

on amd64, the text segment is aligned and padded to
2MB, but segment granularity is 4K which can give
us page faults that are beyond the highest file
offset. this is perfectly valid, but was not handled
correctly in pio().

10 years agolibc: avoid static table and supurious reads in nsec()
cinap_lenrek [Fri, 23 May 2014 16:56:20 +0000 (18:56 +0200)]
libc: avoid static table and supurious reads in nsec()

use two per process memory slots, one for the
pid and one for the fd instead of a global table
avoiding the case when the table gets full.

instead of calling pread() on the cached fd
(dangerous as it has side effects when the
fd was not closed), we check if the cached fd
is still good  using fd2path() when called
the first time in this process.

10 years agolibc: revert nsec() change, bring back filedescriptor caching
cinap_lenrek [Tue, 20 May 2014 05:05:53 +0000 (07:05 +0200)]
libc: revert nsec() change, bring back filedescriptor caching

theres big performance regression with this using
cwfs. cwfs calls time() to update atime on every
read/write which now causes walks on /dev.

reverting to the previous version for now. in the
long run, we'll use new _nsec() syscall but this
has to wait for a later release once new kernels
are established.

10 years agosyscall: add missing _nsec() declaration
cinap_lenrek [Tue, 20 May 2014 03:21:22 +0000 (05:21 +0200)]
syscall: add missing _nsec() declaration

10 years agoadd _nsec() syscall 53 for binary compatibility with labs distribution
cinap_lenrek [Tue, 20 May 2014 03:06:31 +0000 (05:06 +0200)]
add _nsec() syscall 53 for binary compatibility with labs distribution

the new syscall is added under the symbol _nsec() for
binary compatibility.

nsec() is still a library function reading /dev/bintime.

10 years agolibc: dont cache /dev/bintime filedescriptor for nsec()
cinap_lenrek [Tue, 20 May 2014 03:01:26 +0000 (05:01 +0200)]
libc: dont cache /dev/bintime filedescriptor for nsec()

10 years agoinit: dont interpret environment var contents as fmtstring, cleanup
cinap_lenrek [Mon, 19 May 2014 04:58:53 +0000 (06:58 +0200)]
init: dont interpret environment var contents as fmtstring, cleanup

10 years agopc64: remove cpuserver bigboy hack and honor *kernelpercent=
cinap_lenrek [Mon, 19 May 2014 04:57:04 +0000 (06:57 +0200)]
pc64: remove cpuserver bigboy hack and honor *kernelpercent=

10 years agoip/torrent: use "torrent" as default user agent
cinap_lenrek [Mon, 19 May 2014 02:56:07 +0000 (04:56 +0200)]
ip/torrent: use "torrent" as default user agent

10 years agoip/torrent: fix usage, add -A option to set user-agent
cinap_lenrek [Mon, 19 May 2014 21:23:08 +0000 (23:23 +0200)]
ip/torrent: fix usage, add -A option to set user-agent

trackers do like the new default Mozilla/5.0 (compatible)
user agent. so force useragent to hjdicks and give option
to override it in case trackers get even more clever in
the future.

10 years agoipconfig: fix dhcp watch
cinap_lenrek [Sun, 18 May 2014 17:20:31 +0000 (19:20 +0200)]
ipconfig: fix dhcp watch

in dhcpwatch, the sleep time "secs" could become
zero potentially freezing the lease time.

give up when in Sinit state in dhcpquery() as this
is a terminal state.

10 years agofortunes: 14:37 -!- kfx was kicked from #suckless by __20h__ [kfx]
stanley lieber [Fri, 16 May 2014 20:31:41 +0000 (16:31 -0400)]
fortunes: 14:37 -!- kfx was kicked from #suckless by __20h__ [kfx]

10 years agosdiahci: fix (unused) hba reset function (thanks erik quanstro)
cinap_lenrek [Fri, 16 May 2014 19:33:49 +0000 (21:33 +0200)]
sdiahci: fix (unused) hba reset function (thanks erik quanstro)

from the specification:

software may reset the entire HBA by setting GHC.HR to '1'.
When software sets the GHC.HR bit to '1', the HBA shall perform
an internal reset action. The bit shall be cleared to '0'
by the HBA when the reset is complete.

10 years agoadded devgpio (thanks Krystian!). Also added getrevision() to vcore which allows...
Matthew Veety [Fri, 16 May 2014 14:56:23 +0000 (10:56 -0400)]
added devgpio (thanks Krystian!). Also added getrevision() to vcore which allows you to get the raspberry pi board revision. I kept in the segment that allows direct access to the gpio memory

10 years agomerge
cinap_lenrek [Tue, 13 May 2014 23:17:22 +0000 (01:17 +0200)]
merge

10 years agoplay: set user-agent, otherwise server thinks we'r mozilla m(
cinap_lenrek [Tue, 13 May 2014 23:15:33 +0000 (01:15 +0200)]
play: set user-agent, otherwise server thinks we'r mozilla m(

10 years agosam(1): add ctrl+b
ftrvxmtrx [Mon, 12 May 2014 12:49:10 +0000 (14:49 +0200)]
sam(1): add ctrl+b

10 years agosamterm: fix esc, change ctrl+b behaviour to a more useful one (thanks cinap)
ftrvxmtrx [Mon, 12 May 2014 12:19:22 +0000 (14:19 +0200)]
samterm: fix esc, change ctrl+b behaviour to a more useful one (thanks cinap)

10 years agosamterm: clean up key defines. use ctrl+b as in rio
ftrvxmtrx [Mon, 12 May 2014 10:58:24 +0000 (12:58 +0200)]
samterm: clean up key defines. use ctrl+b as in rio

10 years agousps: remove redundant uhtml pipeline
cinap_lenrek [Mon, 12 May 2014 00:46:04 +0000 (02:46 +0200)]
usps: remove redundant uhtml pipeline

10 years agohtmlfmt: use uhtml for character set conversion
cinap_lenrek [Mon, 12 May 2014 00:38:53 +0000 (02:38 +0200)]
htmlfmt: use uhtml for character set conversion

10 years agodoom: get rid of floating point code for division
cinap_lenrek [Sun, 11 May 2014 18:24:27 +0000 (20:24 +0200)]
doom: get rid of floating point code for division

10 years agopc, pc64: add simd error exception name in trap.c
cinap_lenrek [Sun, 11 May 2014 04:17:13 +0000 (06:17 +0200)]
pc, pc64: add simd error exception name in trap.c

10 years agopc, pc64: handle sse simd exceptions
cinap_lenrek [Sun, 11 May 2014 03:59:10 +0000 (05:59 +0200)]
pc, pc64: handle sse simd exceptions

10 years agotcs: handle surrogate pairs
cinap_lenrek [Sat, 10 May 2014 22:54:59 +0000 (00:54 +0200)]
tcs: handle surrogate pairs

10 years agotcs: prevent accidents with runes beyond 16-bit
cinap_lenrek [Sun, 11 May 2014 20:29:47 +0000 (22:29 +0200)]
tcs: prevent accidents with runes beyond 16-bit

10 years agotcs: fix inplace 16 bit unicode conversion
cinap_lenrek [Sat, 10 May 2014 15:28:17 +0000 (17:28 +0200)]
tcs: fix inplace 16 bit unicode conversion

inplace conversions do not work anymore as
Rune is not unsigned short anymore.

10 years agowebfs: use mozilla compatible user agent as default
cinap_lenrek [Fri, 9 May 2014 16:22:51 +0000 (18:22 +0200)]
webfs: use mozilla compatible user agent as default

sites like google return the wrong characterset when
they do not recognize the user-agent. so setting default
user agent to something thats likely to pass these
idiotic browser tests.

10 years agoabaco: need more stack on amd64
cinap_lenrek [Fri, 9 May 2014 15:16:34 +0000 (17:16 +0200)]
abaco: need more stack on amd64

10 years agoremove old copies of kernels l.s from cmd/?a
cinap_lenrek [Thu, 8 May 2014 16:48:51 +0000 (18:48 +0200)]
remove old copies of kernels l.s from cmd/?a

10 years agoabaco: remove strange line
cinap_lenrek [Thu, 8 May 2014 16:41:30 +0000 (18:41 +0200)]
abaco: remove strange line

10 years agotail: fix follow for empty files (thanks cinap_lenrek)
ftrvxmtrx [Thu, 8 May 2014 12:29:44 +0000 (14:29 +0200)]
tail: fix follow for empty files (thanks cinap_lenrek)

10 years agotail: seek to EOF to check if seekable. fixes tail on /proc files
ftrvxmtrx [Thu, 8 May 2014 10:33:24 +0000 (12:33 +0200)]
tail: seek to EOF to check if seekable. fixes tail on /proc files

10 years agohgfs: avoid revlogupdate() calls when reading root (thanks burnzez)
cinap_lenrek [Thu, 8 May 2014 20:20:26 +0000 (22:20 +0200)]
hgfs: avoid revlogupdate() calls when reading root (thanks burnzez)

we do not need to check for revlog updates on every
(directory) read when reading the root. only do it
when reading from the start.

10 years agosed: remove unused ecmp function
ftrvxmtrx [Wed, 7 May 2014 12:43:11 +0000 (14:43 +0200)]
sed: remove unused ecmp function

10 years agocc: fix spurious warning on comparsion with scope redeclared variable (thanks aiju)
cinap_lenrek [Tue, 6 May 2014 19:36:28 +0000 (21:36 +0200)]
cc: fix spurious warning on comparsion with scope redeclared variable (thanks aiju)

> warning: a.c:9 useless or misleading comparison: UINT < 0

the error can be observed by compiling the following code
with warnings enabled:

#include <u.h>
#include <libc.h>

uint r;

void
main(int argc, char *argv[])
{
int r;

if(r < 0){
exits(0);
}
}

the offending code in the compiler is:

- if(l->op == ONAME && l->sym->type){
- lt = l->sym->type;
- if(lt->etype == TARRAY)
- lt = lt->link;
- }

compiler handles scope by overwritin and reverting
symbols while parsing. in the ccom phase, the nodes symbol
(n->sym) is not in the right scope and we wrongly think r
is uint instead of int.

it is not clear to me what this code tried to accomplish in
the first place nor could anyone answer me this question.

the risk is small as this change doesnt affect the compiled
program, only the warning, so removing the offending code.

10 years agopc64: fix embrassing typo in mmuzap()
cinap_lenrek [Tue, 6 May 2014 16:59:56 +0000 (18:59 +0200)]
pc64: fix embrassing typo in mmuzap()

10 years agogs: fix /undefined in --setcolor-- errors on amd64
cinap_lenrek [Sun, 4 May 2014 22:49:26 +0000 (00:49 +0200)]
gs: fix /undefined in --setcolor-- errors on amd64

10 years agomerge
ftrvxmtrx [Sun, 4 May 2014 01:16:37 +0000 (03:16 +0200)]
merge

10 years agovga font: hammer and sickle
ftrvxmtrx [Sun, 4 May 2014 01:16:11 +0000 (03:16 +0200)]
vga font: hammer and sickle

10 years agofonts: add swastika to naga10. fixes swastika in default font
ftrvxmtrx [Sun, 4 May 2014 20:14:45 +0000 (22:14 +0200)]
fonts: add swastika to naga10. fixes swastika in default font

10 years agogs: remove PStorage data type from ttf interpreter
cinap_lenrek [Sat, 3 May 2014 22:17:27 +0000 (00:17 +0200)]
gs: remove PStorage data type from ttf interpreter

i dont see that pointers are stored in PStorage at all,
so just use PLong directly avoding all this confusion.

10 years agogs: fix truetype interpreter for amd64
cinap_lenrek [Sun, 4 May 2014 21:31:59 +0000 (23:31 +0200)]
gs: fix truetype interpreter for amd64

10 years agofix threadsetname usage in few places
ftrvxmtrx [Sat, 3 May 2014 11:07:52 +0000 (13:07 +0200)]
fix threadsetname usage in few places

10 years agothread.h: varargck argpos for threadsetname
ftrvxmtrx [Sat, 3 May 2014 10:09:53 +0000 (12:09 +0200)]
thread.h: varargck argpos for threadsetname

10 years agobio.h: add varargck argpos pragma for Berror
ftrvxmtrx [Sat, 3 May 2014 09:46:01 +0000 (11:46 +0200)]
bio.h: add varargck argpos pragma for Berror

10 years agouniq: document -s option (thanks heaumer)
ftrvxmtrx [Sat, 3 May 2014 09:38:36 +0000 (11:38 +0200)]
uniq: document -s option (thanks heaumer)

10 years agouniq: use Bsize for buffers
ftrvxmtrx [Sat, 3 May 2014 08:48:13 +0000 (10:48 +0200)]
uniq: use Bsize for buffers

10 years agocwfs: fix 1GB memsize limitation
cinap_lenrek [Fri, 2 May 2014 22:51:45 +0000 (00:51 +0200)]
cwfs: fix 1GB memsize limitation

the malloc pool allocator is limited in its allocation
size. as almost all data structures in cwfs are never
freed, use brk() in ialloc() instead of mallocalign().
this means memory returned by ialloc() cannot be freed!

to make sure we do not call free by accident, remove
the #define malloc(n) ialloc(n, 0) macro and use ialloc()
directly as in the original code to show the intend
of permanent allocations.

10 years agowc: simplify and avoid buffer overflow on long filenames
ftrvxmtrx [Sat, 3 May 2014 21:38:17 +0000 (23:38 +0200)]
wc: simplify and avoid buffer overflow on long filenames

10 years ago1l, 2l, 7l, kl, vl: add missing setmalloctag() dummy in compat.c
cinap_lenrek [Fri, 2 May 2014 03:17:40 +0000 (05:17 +0200)]
1l, 2l, 7l, kl, vl: add missing setmalloctag() dummy in compat.c

10 years agobio: Brdstr, Bopen: set malloc tag to the caller
ftrvxmtrx [Fri, 2 May 2014 02:27:29 +0000 (04:27 +0200)]
bio: Brdstr, Bopen: set malloc tag to the caller

10 years agosdide: never timeout or retry scsi commands from the controller driver
cinap_lenrek [Fri, 2 May 2014 02:23:21 +0000 (04:23 +0200)]
sdide: never timeout or retry scsi commands from the controller driver

this was a big mistake. we should never attempt to
timeout or retry a scsi command from the controller
driver because theres no way to tell how long a
command would take or if a command has side effects
when being retried.

10 years agobio: on a second thought, make it one line less
ftrvxmtrx [Fri, 2 May 2014 02:03:35 +0000 (04:03 +0200)]
bio: on a second thought, make it one line less

10 years agobio: do not leak memory if realloc fails
ftrvxmtrx [Fri, 2 May 2014 01:58:38 +0000 (03:58 +0200)]
bio: do not leak memory if realloc fails

10 years agosamterm: free() after getenv()
ftrvxmtrx [Fri, 2 May 2014 01:47:18 +0000 (03:47 +0200)]
samterm: free() after getenv()

10 years agopc64: increase sizes of physical memory bank maps
cinap_lenrek [Thu, 1 May 2014 15:24:50 +0000 (17:24 +0200)]
pc64: increase sizes of physical memory bank maps

number of bank slots in Conf.mem[4] was too small
for kenjis machine, set it to maximum 16 (the
size of the RAM map in pc64/memory.c).

also increasing the UPA memory map to 64. the
e820 map on my x200s has 31 entries and many
holes. this gets rid of the "mapfree: ... losing"
messages on boot.

10 years agoleak(1): typo
ftrvxmtrx [Thu, 1 May 2014 11:08:43 +0000 (13:08 +0200)]
leak(1): typo

10 years agokernel: always reset notepending in eqlock, handle forceclosefgrp in eqlocks
cinap_lenrek [Tue, 29 Apr 2014 19:17:07 +0000 (21:17 +0200)]
kernel: always reset notepending in eqlock, handle forceclosefgrp in eqlocks

10 years agokernel: stop queue bloat before allocating blocks
cinap_lenrek [Tue, 29 Apr 2014 19:15:09 +0000 (21:15 +0200)]
kernel: stop queue bloat before allocating blocks

10 years agoaan(8): fix aanuke synopsis
ftrvxmtrx [Tue, 29 Apr 2014 21:17:06 +0000 (23:17 +0200)]
aan(8): fix aanuke synopsis

10 years agodevmnt: make abandoning fid on botched clunk handle flushes
cinap_lenrek [Mon, 28 Apr 2014 04:55:06 +0000 (06:55 +0200)]
devmnt: make abandoning fid on botched clunk handle flushes

make mntflushfree() return the original rpc and do the
botched clunk check on the original instead of the
current rpc.

so if we get a botched flush of a clunk, we abandon the
fid of the channel as well.

10 years agodevmnt: abandon fid on botched Tclunk or Tremove
cinap_lenrek [Mon, 28 Apr 2014 03:59:10 +0000 (05:59 +0200)]
devmnt: abandon fid on botched Tclunk or Tremove

if theres an error transmitting a Tclunk or Tremove request,
we cannot assume the fid to be clunked. in case this was
a transient error, reusing the fid on further requests
will fail.

as a work arround, we zero the channels fid and allocate
a new fid before the chan is reused.

this is not correct as we essentially leak the fid
on the fileserver, but we will still be able to use
the mount.

10 years agolibip: use snprint() in myetheraddr() to prevent accidents
cinap_lenrek [Mon, 28 Apr 2014 00:32:06 +0000 (02:32 +0200)]
libip: use snprint() in myetheraddr() to prevent accidents

10 years ago8c, 6c: fix peephole bug for eleminating CMPL $0,R after shift
cinap_lenrek [Mon, 28 Apr 2014 20:53:50 +0000 (22:53 +0200)]
8c, 6c: fix peephole bug for eleminating CMPL $0,R after shift

the shift instructions does not change the zero flag
when the shift count is 0, so we cannot remove the
compare instruction in this case.

this fixes oggdec under 386.

10 years agobtc mkfile: mkdir -p
ftrvxmtrx [Mon, 28 Apr 2014 20:39:12 +0000 (22:39 +0200)]
btc mkfile: mkdir -p

10 years agoiwl: support another (broken) variant of centrino ultimate-n 6300
ftrvxmtrx [Sun, 27 Apr 2014 13:12:15 +0000 (15:12 +0200)]
iwl: support another (broken) variant of centrino ultimate-n 6300

10 years agomerge
ftrvxmtrx [Sat, 26 Apr 2014 16:24:39 +0000 (18:24 +0200)]
merge

10 years agoiwl: add Wifi Link 5150 did
ftrvxmtrx [Sat, 26 Apr 2014 16:22:50 +0000 (18:22 +0200)]
iwl: add Wifi Link 5150 did

10 years agopmmc: recognize generic mmc controllers (untested)
cinap_lenrek [Sat, 26 Apr 2014 16:22:17 +0000 (18:22 +0200)]
pmmc: recognize generic mmc controllers (untested)

10 years agotlshand: cleanup 36 -> MD5dlen+SHA1dlen
cinap_lenrek [Sat, 26 Apr 2014 16:09:26 +0000 (18:09 +0200)]
tlshand: cleanup 36 -> MD5dlen+SHA1dlen

10 years agotlshand: fix memory leaks, fix alloc element size for certs pointer array, error...
cinap_lenrek [Sat, 26 Apr 2014 16:04:04 +0000 (18:04 +0200)]
tlshand: fix memory leaks, fix alloc element size for certs pointer array, error handling

10 years agogames/geigerstats: fix usage() to exit; games(1): geigerstats args
glenda [Sat, 26 Apr 2014 14:08:28 +0000 (15:08 +0100)]
games/geigerstats: fix usage() to exit; games(1): geigerstats args

10 years agotr: fix 4-byte runes fix (thanks rsc)
ftrvxmtrx [Sat, 26 Apr 2014 12:26:40 +0000 (14:26 +0200)]
tr: fix 4-byte runes fix (thanks rsc)

10 years agomerge
ftrvxmtrx [Sat, 26 Apr 2014 11:22:48 +0000 (13:22 +0200)]
merge

10 years agoman pages: fix duplicate words
ftrvxmtrx [Sat, 26 Apr 2014 11:22:15 +0000 (13:22 +0200)]
man pages: fix duplicate words

10 years agodraw(2): fix missing arg of bezspline on page 5
glenda [Sat, 26 Apr 2014 02:38:07 +0000 (03:38 +0100)]
draw(2): fix missing arg of bezspline on page 5

10 years agoman pages: the the wich
ftrvxmtrx [Fri, 25 Apr 2014 23:47:36 +0000 (01:47 +0200)]
man pages: the the wich

10 years agonewt: write message header and body to virtual file before printing, to avoid stutter
stanley lieber [Fri, 25 Apr 2014 13:25:08 +0000 (09:25 -0400)]
newt: write message header and body to virtual file before printing, to avoid stutter

10 years agonusb(4): fix spelling
mischief [Fri, 25 Apr 2014 03:05:09 +0000 (20:05 -0700)]
nusb(4): fix spelling

10 years agogames/snes: mode 5/6; overscan fix
aiju [Thu, 24 Apr 2014 17:22:50 +0000 (19:22 +0200)]
games/snes: mode 5/6; overscan fix

10 years agorevert previous change, i was confused.
cinap_lenrek [Thu, 24 Apr 2014 20:02:47 +0000 (22:02 +0200)]
revert previous change, i was confused.

10 years agonusb: use ep->addr instead of ep->id in unstall() library function
cinap_lenrek [Thu, 24 Apr 2014 20:00:31 +0000 (22:00 +0200)]
nusb: use ep->addr instead of ep->id in unstall() library function

this is not a bug, but using ep->addr makes the intend more clear.

10 years agonusb/rndis: avoid allocation on each transmission
ftrvxmtrx [Wed, 23 Apr 2014 19:20:11 +0000 (21:20 +0200)]
nusb/rndis: avoid allocation on each transmission

The slack space for outgoing packets set to 44+16 bytes.

10 years agonusb: resolve endpoint id conflict with different input and output types
cinap_lenrek [Wed, 23 Apr 2014 18:03:01 +0000 (20:03 +0200)]
nusb: resolve endpoint id conflict with different input and output types

ftrvxmtrx repots devices that use the endpoint number for
input and output of different types like:

 nusb/ether:             parsedesc endpoint 5[7]  07 05 81 03 08 00 09 # ep1 in intr
 nusb/ether:             parsedesc endpoint 5[7]  07 05 82 02 00 02 00
 nusb/ether:             parsedesc endpoint 5[7]  07 05 01 02 00 02 00 # ep1 out bulk

the previous change tried to work arround this but had the
concequence that only the lastly defined endpoint was
usable.

this change addresses the issue by allowing up to 32 endpoints
per device (16 output + 16 input endpoints) in devusb. the
hci driver will ignore the 4th bit and will only use the
lower 4 bits as endpoint address when talking to the usb
device.

when we encounter a conflict, we map the input endpoint
to the upper id range 16..31 and the output endpoint
to id 0..15 so two distinct endpoints are created.