preserve the Prtpwr bit in portstatus instead of
unconditionally setting it.
turn off port powert on init. (let usbd will turn it on).
make chanio() halt the channel and error out
when interrupt status is 0 after timout.
this happens when the port is powered off.
Preserve reserved "RsvdP" bits in registers
according to 2019 xhci specification 1.2.
Print the USBSTS register and event-ring stopped flag
on recovery.
Add the controller base address in prints,
so it can be identified what errors belong
to what controller.
Make reset delays more conservative:
The usb spec says root ports need 50ms reset minimum, use 100ms.
The usb spec says hub ports need 20ms minimum, use 50ms.
We used to always provide soa and ns hints when
we where not authoritative.
This changed with the last commit, where we
would instead return refused error.
But this breaks when we want to explicitely
delegate to another nameserver, so add parameter
to inmyarea() to get the delegated soa out,
and provide delegated nameservers when we have one.
the code for skipping directory loops in
walk was taken from du, but the desired
behavior for the two programs is differnt;
while du wants to count the total size used,
and double-counting directories would be a
mistake, walk wants to enumerate all finite
paths in a namespace.
maintaining ->nsub was fragile, and didn't save very many cycles;
instead just compute it every time; it's only going to hurt with
a ton of giant threads.
This can be usefull for debugging usb enumeration issues from boot,
if one has the chance to pass parameters on the bootloader.
It was initially suggested in a troubleshooting session todo as
a quick modification, but it can be usefull in general.
- always dprint() all the port state transitions.
- when port is attaching in short succession and we'r reaching the limit,
don't return -1 as that would cause portfail(), return 1 instead
which would make us ignore it.
- cleanup portattach(), use Dev *d instead of h->dev.
We want to avoid long delays with interrupts disabled,
so handle the delay from devusb/usbd.
Do not expect SetFeatrue/PortEnable request, this is
invalid by the usb standard. But some HCI's require
setting enable bit in port status/ctrl register of
rootports, so handle this internally.
xhci, dwc and ohci have a power-power control bit,
so implement standard Set/ClearFeature/PortPower in
roothub, which allows us to control port on some
rootports.
Added a custom hid descriptor for Xbox360 controllers.
Up to six axes are now supported for analog input.
Added a simple deadband filter for analog axes.
When we have errors in the code, passing it on to the backend
just generates cryptic or incorrect errors, and in some case,
crashes as we try to process trees with missing labels, or
which are malformed in other ways.
Instead, bail out of codgen() and don't even try.
After discussion, it was suggested that it might make more
sense to handle the noswap stuff outside of gefs, like
with any other fileserver.
plan9 file-servers are not privileged. one might even run
them in a test script to mount an image.
Factotum used to mount itself on /mnt and serving the first-level
directory "factotum" itself. This has the undesired consequence
that it has to respond to all walks crossing the /mnt directory.
Instead, we make factotum interpret the previously ignored
mount-spec (aname). If it is "factotum", it serves the
factotum directory as the root, so it can be directly mounted
onto /mnt/factotum. For backwards compatibility, the old
behaviour is preserved.
The namespace file will now always mount factotum onto /mnt/factotum.
In the case of a old factotum, that ignores the mount-spec,
do a bind moving /mnt/factotum/factotum to /mnt/factotum.
when doing bulk operations one after the other, like
mass-marking messages read, the cursor tends to jump
to update the messages, but they're already in the
right state; don't do that.
We do not want to unconditionally pull in all of
/lib/firmware, when we dont have the driver for it.
So group the files into separate proto-files
and make boot/bootmkfile simply checks that the basename
of a proto file matches the basename in $OBJ to be
considered.
This way, we can also avoid including user-space usb
daemon when the kernel lacks the usb driver.
Same for machines without devsd, devfs or devusb,
theres no disk so no reason to include disk file
servers.
The bootfs.paq file is specific to the configuration,
so give it a unique name. (Just using bootfs.paq
is fine as long as theres only a single configuration,
but i want to avoid future mistakes as people copy-paste
the kernel configuration).
We can move the pcibios code to its own module
and just provide a stub pcibiosinit() function
for pc64 so we do not have to pull in that code
and the data structures.
also lets us clean up mkdevlist hacks.
we should properly zero-pad the ethernet frames we send out
instead of sending random garbage.
for ppp -> ethernet, the ethernet header is fixed, so we
can generate it once before the read()/write() loop.
Use a 1514 byte buffer for all ethernet frames as the
maximum, and limit the mtu to 1514-14-8 -> 1492.