Commit graph

2278 commits

Author SHA1 Message Date
cinap_lenrek 5a138029db move devusb to port
moved devusb to port, shifting the responsibility of how
to enable interrupts to the arch specific hci driver.
2012-12-06 18:53:17 +01:00
cinap_lenrek 75b1ec6716 audiohda: dont xspanalloc() Ctlr structure
theres no requirement for the Ctlr structure to be 8 byte aligned.
its not passed to hardware.
2012-12-06 17:19:13 +01:00
cinap_lenrek 7a99d3c6a6 ipconfig(8): better way to say it :) 2012-12-06 07:34:56 +01:00
cinap_lenrek df8c55ec71 ipconfig(8): document new default behaviour for finding ethernet device 2012-12-06 07:30:16 +01:00
cinap_lenrek a81a6f2ff4 inst: add a linebreak before install boot record description 2012-12-06 07:09:16 +01:00
cinap_lenrek b929f24b92 inst: remove broken winnt boot setup 2012-12-06 06:35:36 +01:00
cinap_lenrek c3105131fe bootrc: fix mistake, god damn it 2012-12-06 03:46:22 +01:00
cinap_lenrek 620d6df973 bootrc: reparse all env variables, not just #ec 2012-12-06 02:03:59 +01:00
cinap_lenrek 6e630a2d1f nusb/ether: remove debug prints, cleanup 2012-12-06 00:31:25 +01:00
cinap_lenrek 29ca49ca38 nusb/ether: remove vid check in smsc driver, cleanup cdc driver 2012-12-06 23:24:42 +01:00
cinap_lenrek 04fd67ab06 nusb(4): document new nusb/ether options 2012-12-06 23:17:18 +01:00
cinap_lenrek 23239adf54 nusb/ether: port drivers for asix and smsc ethernet 2012-12-06 23:05:24 +01:00
cinap_lenrek 49c8aed2db ip/ipconfig: automatically find ethernet device on /net if not given 2012-12-05 14:38:30 +01:00
cinap_lenrek 0750687012 move usb ethernet in bootfs.paq 2012-12-05 13:53:34 +01:00
cinap_lenrek 96cc3eb2ee devtls: add support for aes_128_cbc and aes_256_cbc (import from sources) 2012-12-04 10:53:53 +01:00
cinap_lenrek b296b96c68 devssl: handle bad secretin/secretout ctl arguments (import from sources) 2012-12-04 10:52:42 +01:00
cinap_lenrek b142e2a308 devpipe: import pipe wstat() support to change permissions (import from sources) 2012-12-04 10:40:08 +01:00
cinap_lenrek 98bd636424 upas: fix original mail in /sys/src/cmd/upas/misc 2012-12-04 08:02:50 +01:00
cinap_lenrek 580a8ae857 syscallfmt: fix syscall trace for kw/opamp4 2012-12-04 07:26:33 +01:00
cinap_lenrek 4ae38efc1c ape/mv: check if from path fits and error if too long 2012-12-04 06:06:28 +01:00
cinap_lenrek b4e34c1c74 kw: syscallfmt() declaration moved to port/portfns.h 2012-12-04 05:28:38 +01:00
cinap_lenrek 6d47c25f6f python: fix pgen build for other archs 2012-12-04 03:05:01 +01:00
cinap_lenrek 2fcd19f16e ape: fix memory leak and path limit in unlink()
db1 was leaked, and newname could overflow. fixed.
2012-12-03 19:16:22 +01:00
cinap_lenrek a16f5cd2a3 ape: forgot to set errno in access() for dir create fail 2012-12-03 18:54:56 +01:00
cinap_lenrek 4661934e31 ape: fix _grpmems(), access(), getppid(), cleanup
_grpmems() was broken tokenizing group list in place.
we have to copy it to status buffer before tokenizing.

dynamically alloc path for test file to check write
permission on directory and add pid to the name to
prevent races.

use _OPEN instead of ape open to read /dev/ppid in
getppid().

use mode enums instead of numeric constants for _OPEN()
and _CREATE().
2012-12-03 18:47:41 +01:00
cinap_lenrek 52b9a06896 9boot: truncate long lines instead of producing partial lines from console/plan9.ini 2012-12-03 16:52:14 +01:00
cinap_lenrek ee251568fb ape: putenv, add file :) 2012-12-03 06:47:01 +01:00
cinap_lenrek 84c930a078 ape: fix putenv()
writing /env in putenv() doesnt work. exec will create
new enviroment anyway. we have to modify environ array!
2012-12-03 06:44:30 +01:00
cinap_lenrek eb9de925c6 ape: fix more bugs, use /env and /proc instead of #e and #p, cleanup
remove envname length limitation in _envsetup()
by using allocated buffer and use /env instead of #e

use /proc and getpid() instead of #p and #c in
readprocfdinit()

fix buffer overflow in execlp(), check if name
of failed exec starts with / . or is \0

make sure not to close our own filedescriptors
for FD_CLOEXEC in execve(), fix wrong length
check for flushing buffer to /env/_fdinfo.
fix error handling cases. copy the enviroment
before decoding \1 to \0 because the strings in
environ[] array might not be writable.

remove bogus close if we fail to open ppid file
in getppid() and use /dev/ppid instead of #c/ppid
2012-12-03 05:35:33 +01:00
cinap_lenrek f3842de5fd ape: initialize _tos and use _tos->pid for getpid() 2012-12-03 05:22:21 +01:00
cinap_lenrek 3b91c0fcc5 /lib/greg: Ebios[] 2012-12-02 13:41:40 +01:00
cinap_lenrek 45b498c027 ape: fix buffer overflow in _envsetup() 2012-12-02 12:32:23 +01:00
cinap_lenrek 50c9769bbd sdiahci: fix staggered spinup wait loop, fix confusion
setting Asud in the cmd register is not needed, because
Apwr is (Asud|Apod) already. the problem really was that
the drive comes up with sstatus Spresent (001), so we never
spun it up because (p->sstatus & Sphylink) == 0 was never
met (Sphylink being a mask (011) overlaping Spresent bit).

the spinup wait loop has to run only for the staggered spinup
case (h->cap & Hss) and it should wait for the drive to be
detected by the phy, not just cold presence detect.
2012-12-02 04:50:37 +01:00
cinap_lenrek a9206fa5ad sdiahci: make drive dvd drive spinup work, add *ahcidebug= boot parameter
thinkpad r400 dvd drive was not recognized. port status
indicated present device but no Sphylink because the
device did not spin up. setting the Asud bit in ahciconfigdrive()
made it come up clean.

add scsciverify() call in iaverify() for atapi inquiry.

keep in some of the debug prints and add a *ahcidebug= boot
parameter to enable them.
2012-12-02 01:39:03 +01:00
cinap_lenrek 86eaffdcaa nusb/kb: fix 5ms sleep polling in repeatproc, notegroup, cleanup
fix repeatproc timeout handling, add constants for Kbdelay
and Kbrepeat.

set procname so one knows which is keyboard and which is mouse
and on what endpoints they work.

9front's /dev/mousein and /dev/kbdin allow multiple opens,
so theres no need for the refcounted Kin structures.

spawn the worker procs in ther own note group, so they wont
get killed on interrupt in the original notegroup.
2012-11-30 19:01:59 +01:00
cinap_lenrek 3e0e920c22 upas/ned: fix M command 2012-11-30 15:13:23 +01:00
cinap_lenrek 3f25f69718 nusb/kb: add support for evoluent vertical mouse 2012-11-30 04:02:03 +01:00
cinap_lenrek 8b7897b57a upas/fs: fix tlsClient() memory leaks 2012-11-28 08:51:50 +01:00
cinap_lenrek a8fc4ddc6d usbehci: route ports to all ehci controllers, not just the first
i belive the seizing up was a side effect of broken
bios handover. ehci will not work on the other controllers
if we do not route the ports to them.
2012-11-28 07:35:28 +01:00
cinap_lenrek f98bdfece0 audiohda: add pci vid/did for lenovo thinkpad x230t 2012-11-28 01:20:58 +01:00
cinap_lenrek 87ab441ab4 upas: handle Bcc: header
when -8 flag is given, upas/marshal override To:, Cc: and Bcc: headers.
add -B option for Bcc. it is also now valid to pass recipient list
on upas/marshal arguments and have -8 flag set. make nedmail and
/rc/bin/mail call upas/marshal with -8 now to make it effective.
2012-11-27 21:10:55 +01:00
cinap_lenrek 539f74db81 reverting string "general purpose password" braindamage 2012-11-27 22:07:34 +01:00
glenda 7e0c920fe3 passwd: improved message 2012-11-27 14:16:10 +00:00
stanley lieber 0ef9131b08 sysinfo: -m handle e-mail from unconfigured systems 2012-11-26 16:38:25 -06:00
cinap_lenrek 4260392749 nusb/kb: skip 0x01 lead byte hack, you dont wanna know
apparently, some mouse send constant 0x01 byte
before normal 4 byte mouse packet. this is known in
openbsd/freebsd as UQ_MS_LEADING_BYTE quirk.
2012-11-25 22:37:53 +01:00
cinap_lenrek ffa54947bc usbehci: fix broken bios takeover
bios takeover was broken. bad Ceecpmask (was 8, should be 0xFF)
causing it to miss the legacy control ecap and properly take
overship of the controller. also the order seems wrong, we
have to takeover before we do anything with the controller.

remove the pci config space 0xc0 = 0x2000 write. this the
uhci legacy register. its not anywhere in the ehci spec.
2012-11-25 16:24:10 +01:00
cinap_lenrek f8f118423c usbohci: revert td overrun error handling change from sources
regarding the ohci spec, a overrun td might supply a full
packet of data. this change seemed to have caused nusb/kb to
fail with getting spurious zero byte reads. reverting for now.
2012-11-24 16:41:38 +01:00
cinap_lenrek aadc581040 nusb/kb: zero reads, error handling, priority, cleanup
handle short reads as errors and retry. this can happen
on ohci and some ps2 to usb converter. it might'v deen caused
by a recent change on sources handling td overrun differently.

fix error handling. have to check f->ep == nil after recovery
and check packet size. also, use f->ep->dfd instead of ptrfd
and kbdfd as it might be different after recovery. make a
setleds() error non fatal.

boost process priority for keyboard and mouse worker processes.

cleanup: use single write() in putmod(), improve error reporting.
2012-11-24 16:37:39 +01:00
cinap_lenrek f37d68003d usbohci: implement smm handover, timeouts, donehead dequeue.
implement SMM emulation driver handover in ohcireset(). this fixes
hang and defunct internal keyboard problems on a acer notebook.

dont spin forever waiting for the controller on soft reset in init().

check both, donehead pointer *and* interrupt status for
processed td event (Wdh) similar to the ohci spec example for
processed tds and unlink immidiately. acknowledge *all* the
interrupt status bits before masking. mask out unhandled
events.

various stuff:

check for christmas light interrupt status (cardbus controller
removed?)

add (missing?) break for Tddataovr error case in qhinterrupt().
(changed on sources, not clear why?)

mask interrupt events on shutdown() (from sources).
2012-11-24 03:51:57 +01:00
cinap_lenrek 4b4070a8b9 ratrace: fix race conditions and range check
the syscallno check in syscallfmt() was wrong. the unsigned
syscall number was cast to an signed integer. so negative
values would pass the check provoking bad memory access from
kernel. the check also has an off by one. one has to check
syscallno >= nsyscalls instead of syscallno > nsyscalls.

access to the p->syscalltrace string was not protected
from modification in devproc. you could awake the process
and cause it to free the string giving an opportunity for
the kernel to access bad memory. or someone could kill the
process (pexit would just free it).

now the string is protected by the usual p->debug qlock. we
also keep the string arround until it is overwritten again
or the process exists. this has the nice side effect that
one can inspect it after the process crashed.

another problem was that our validaddr() would error() instead
of pexiting the current process. the code was changed to only
access up->s.args after it was validated and copied instead of
accessing the user stack directly. this also prevents a sneaky
multithreaded process from chaning the arguments under us.

in case our validaddr() errors, we cannot assume valid user
stack after the waserror() if block. use up->s.arg[0] for the
noted() call to avoid bad access.
2012-11-23 20:27:09 +01:00