summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-11-01libbio: add aux pointer to bioOri Bernstein
This allows us to attach additional context to the biobuf so can read from some sort of data structure without a global variable.
2020-11-01libc: recurse on smaller half of arrayOri Bernstein
Our qsort has an optimization to recurse on one half of the array, and do a tail call on the other half. Unfortunately, the condition deciding which half of the array to recurse on was wrong, so we were recursing on the larger half of the array and iterating on the smaller half. This meant that if we picked the partition poorly, we were pessimizing our stack usage instead of optimizing it. This change reduces our stack usage from O(n) to O(log(n)) for poorly chosen pivots.
2020-10-31jpg: treat EOF as EOI markerAlex Musolino
Some jpegs, rightly or wrongly, do not contain an EOI marker. This causes jpg(1) to bail out even after correctly parsing the entire image.
2020-10-30vt: improve behavior of chordingOri Bernstein
vt chording behaves slightly differently from other applications: a chord must be fully released before the next chord can be applied. This makes any change in chord apply the action.
2020-10-29ip/cifsd: fix missing int return type for vpack() (thanks pr)cinap_lenrek
2020-10-29aux/cpuid: decode leaf 7; extend leaf 13 decodingSigrid
2020-10-27audiohda: make it work with qemu (thanks mischief)cinap_lenrek
the driver was not using irb interrupts and was just polling the irb write pointer to wait for command completion. this is not supported by qemu. qemu requires the use of irb interrupt handshake and it refuses to accept the next command until we acknowledge the irb interrupt.
2020-10-25ip/tinc: fix reportedge()cinap_lenrek
supplying a non-ip address in ADD_EDGE crashes the unix tincd. the reason was that we where misreporting ADD_EDGE messages; ignoring the information from our peers; and always supplying the Address string from our configuration instead of the connections ip address. now we just report the edge information as is.
2020-10-24mp(2): correct documentation of error handling (thanks LordCreepity)Ori Bernstein
The documentation for mp(2) claimed we'd return nil on error, when we actually sysfatal. This corrects the documentation to match our actual behavior.
2020-10-25kbmap: add latvian keymap (thanks freddy)cinap_lenrek
2020-10-25kbmap: add croatian kbmap (thanks skerbergs)cinap_lenrek
2020-10-23newuser(8): fix reference to incorrect file server console commandAlex Musolino
2020-10-23vmx/vga: fix allocimage leaksSigrid
2020-10-22upas/fs/mbox.c: fix cosmetic typokhm
2020-10-21libaml: add (nop) "signal" opSigrid
2020-10-18vncv: pick an auth type that we supportOri Bernstein
We used to pick the highest auth type regardless of whether we supported it. Now we filter down to types that we support.
2020-10-19sdiahci: accept AHCI controllers from ASMedia vendor id (thanks mischief)cinap_lenrek
2020-10-18pc, pc64: remove mystery "type" bits in pcicfgrw*raw() (fixes qemu, thanks ↵cinap_lenrek
mischief) the access functions for pci config space in config mode #1 used to set bit 0 in the register offset if the access was to a device on any bus different from 0. it is completely unclear why this was done and i can't find any documentation on this. but for sure, this breaks all pci config spacess access to pci devices behind a bridge on qemu. with -trace pci* it was discovered that all config space register offsets on devies behind pci brige where off by one. on real hardware, setting bit 0 in the offset doesnt appear to be an issue. thanks mischief for reporting and providing a qemu demo configuration to reproduce the problem.
2020-10-18sdnvme: use PCIWADDR() instead of PADDR()cinap_lenrek
2020-10-18etherbcm: handle 64-bit host addresses, use PCIWADDR() instead of PADDR()cinap_lenrek
2020-10-18audiohda: use PCIWADDR() instead of PADDR(), handle 64-bit dma addressescinap_lenrek
2020-10-18etheriwl: delay before crystal calibrationOri Bernstein
On my 6235 card, if we calibrate the crystal immediately after disabling wimax, the the firmware gets unhappy. A short nap before sending the command prevents the command from timing out.
2020-10-17nusb/serial: add ids for FT230X (thanks mischief)Ori Bernstein
2020-10-17mergeOri Bernstein
2020-10-17upas: fix appendfolder timestamps (thanks umbraticus)Ori Bernstein
When moving messages between folders, mbappend, deliver, and nedmail were trying to parse the timestamp ouut of the message. They were doing it incorrectly, trying to include the user name as part of the date format. Change to pass just the date to the date parser.
2020-10-18etheriwl: don't break controller on command flush timeoutcinap_lenrek
ori and echoline are reporting regression on some 6000 cards; which sometimes time out on crystal calibration command; which is expected by the driver. but the new code used to force a device reset on any command timeout. reverting to old behaviour until for now until we have a chance investigating.
2020-10-18sdnvme: handle machines with more cpu's than submit queues (thanks mischief)cinap_lenrek
We used to assume a 1:1 pairing of processors to submit queues. With recent machines, we now got more cpu cores than what some nvme drives support so we need to distribute the queues across these cpu's which requires locking on command submission. There is a feature get/set command to probe the number of submit and completion queues, but we decided to just handling submission queue create command error gracefully as it is simpler and has less chance of regression with existing setups. Thanks to mischief for investigating and writing the code.
2020-10-17mergecinap_lenrek
2020-10-17ndb/dnsdebug: add -c flag to debug caching dns server behaviourcinap_lenrek
2020-10-17ndb/dns: mark ns record authoritative when in our area for delegationcinap_lenrek
I have the problem that i need to delegate a subdomain to another name server that is confused about its own zone (and its own name) returning unusable ns records. With this, one can make up a nameserver entry in ndb that is authoritative and owned by us for that nameserver, and then put it in the soa=delegated ns entry. This promotes the ns record in the soa=delegated to Authoritative, which avoids overriding the ns rr's from the confused server for the delegated zone.
2020-10-15games/nes: workaround for truncated chrSigrid
2020-10-12ip/torrent: try harder allocating portscinap_lenrek
we used to only allocate ports from 6881 to 6890, which limits the maximum of parallel torrents to 9. this change make it go up to 9000, which gives us at best 2120 ports, which is overkill but ports might be randomly occupied by other connections.
2020-10-11upas/fs: fix truncation of plumb datecinap_lenrek
the new date format introduced by the previous commit; using numeric timezone offsets; needs one character more, so increase the date format buffer to 31 characters.
2020-10-09kernel: get rid of unused ucallocbcinap_lenrek
the whole idea of a ucallocb() is bad, as even access to the metadata header would be in uncached memory. also, it tuns out that it was never used by anyone.
2020-10-09vmx: add Kmod4Sigrid
2020-10-05etheriwl: add Wireless 8260 cardOri Bernstein
After the latest tweaks to the order of operations, the card works.
2020-10-05mergecinap_lenrek
2020-10-05etheriwl: remove stations *after* disabling binding quotas, drain all queues ↵cinap_lenrek
in rxoff7000()
2020-10-04rio: move the code for 'send' into a functionkvik
Makes the code a bit nicer and allows reusing wsend() in patches.
2020-10-04etheriwl: add for Intel Wireless-AC 9260cinap_lenrek
the 9000 series uses a new receive descriptor format wich appears to reqire 4k aligned buffers. the old format "halfworks" and just makes the firmware not respond to any commands after the enable paging command. the smartfifo command appears to causes problems. but apparently not issuing it at all seems to work fine on both the 8265 and 9260. so removing the code for now. issuing the bindingquota command before associated makes association impossible. but enabling afterwards works fine. (tested in 8265 and 9260). the prph access functions now mask the address with 0xfffff. it is unclear why linux and openbsd drivers specify addresses beyond that in ther register constants. the timeevent change is interesting. the timeevent needs to be restarted when it has stoped to make sure probing/association packets are sent during the evnet.
2020-10-01bootrc: allow kbmap to be set via plan9.ini (thanks Aaron Bieber)kvik
2020-09-29acme: revert stray changesOri Bernstein
forgot I had local changes when testing, re-revert scrolling.
2020-09-27vncv: implement rfb 3.8 protocol (thanks Iruatã)Ori Bernstein
Gnome and bhyve's VNC servers implement the RFB 3.8 protocol, so we need to support it in the client in order to connect.
2020-09-26aux/vga: eepc igfx support (thanks p.kosyh)Ori Bernstein
This patch to makes 1024x600x32 work. Without it only 800x600 is supported. To load this mode, run: aux/vga -m eeepc -l 1024x600x32
2020-09-26upas: convert to tmdate, change timezone formatOri Bernstein
Complete the conversion of upas to remove ctime, use the new date library, and print time zones in +hhmm format, instead of NNN format. This may affect code that expects specific names for timezones. Fix that code.
2020-09-25tmdate(1): fix missing arg, fix formatting (thanks joe9)Ori Bernstein
2020-09-25mergeOri Bernstein
2020-09-25tmdate(2): fix mistakes in prototype (thanks moody)Ori Bernstein
2020-09-25aux/acpi: connect EC region handler, fixes battery status on eeepc 1000px ↵Sigrid
(thanks Peter Kosyh)
2020-09-23syscall: fix build problem caused by stale tab.hkvik
Recently the script which generates tab.h and the code including it got incompatibly changed. People reported problems involving syntax errors when trying to rebuild the system following a sysupdate. The problem was with the script being embedded within a mkfile rule, meaning that mk didn't notice it changing and therefore didn't rebuild the target file. For people who were rebuilding the system this meant that the old tab.h got included, causing syntax errors. This patch moves the codegen script into a file and tells mk about this new dependency, so that tab.h will get rebuilt for everyone. I also took an opportunity to rewrite the script, hopefuly making it easier to follow.