Commit graph

10904 commits

Author SHA1 Message Date
cinap_lenrek
682e47137a ether2114x: fix automatic media detection
We used to reject media info if FD was not specified
in plan9.ini. Instead, initialize fd override to -1
which makes us use it if the infoblock tells us to
and provide a "HD" option to force half-duplex mode.

This makes the media detection work on hyper-v.
2025-01-07 00:45:41 +00:00
cinap_lenrek
3ff88ede01 libmp: fix mips build breakage from previous commit (thanks eyss) 2025-01-06 07:25:11 +00:00
Ori Bernstein
b3d44a5141 gefs: use broke() when we get a corrupt block
now that broke() doesn't abort the whole fs, but instead
makes it go read-only, it makes sense to just use it in
all cases that get a corrupt block
2025-01-06 02:45:53 +00:00
cinap_lenrek
ce4926cfc2 merge 2025-01-06 00:53:15 +00:00
cinap_lenrek
c91fd35518 gefs: getblk(): remove duplicate getcallerpc(), check b->bp.gen from cache 2025-01-06 00:51:36 +00:00
Ori Bernstein
9a648220b6 configfs: adjust phrasing on file system state/usecases 2025-01-05 23:35:20 +00:00
Ori Bernstein
01f50db963 inst/configfs: make gefs visible in the installer 2025-01-05 22:36:06 +00:00
Ori Bernstein
c709e09178 gefs: don't abort when the fs breaks
it's useful to debug when something goes wrong
2025-01-05 22:25:35 +00:00
cinap_lenrek
66d2e1ac59 gefs: use freeblk() instead of freebp() when we already have the block 2025-01-05 21:28:04 +00:00
Ori Bernstein
e0358fd432 mkfiles: stop cargo culting UPDATE=
UPDATE= is used by mk update, which
calls 'update $UPDATE'; we don't have
an update binary.
2025-01-05 21:13:43 +00:00
cinap_lenrek
11ac75e789 devether: provide ethersetspeed() function to adjust queue sizes
When the link-speed changes, we want to adjust not
only the output queue limit (done by some drivers)
but also the input queue limit per netif file.

Now, instead of setting Ether->mbps directly,
drivers should call ethersetspeed(ether, mbps).
2025-01-05 20:16:14 +00:00
Ori Bernstein
3b5e83f164 9/pc64: remove reference to stale conf
we don't have a pccpu64 kernel any more, it's all just pc64;
remove it from the mkfile
2025-01-05 19:49:07 +00:00
Ori Bernstein
a8361bc1b4 gefs: flush limbo lists on halt
the limbo lists are full of blocks that are queued
for deferred free -- if we exit, we lose track of
them, and they never get freed.
2025-01-05 18:07:53 +00:00
cinap_lenrek
ddfbf28cd4 htmlroff: fix tcs pipe leak 2025-01-05 17:52:36 +00:00
Jacob Moody
8d0702ad19 /sys/doc/fs: don't make fs.html by default
The convention is to only make ps and pdf's by default.
2025-01-05 17:49:10 +00:00
Jacob Moody
7ed56c370d /sys/doc: remove generated files 2025-01-05 02:35:40 +00:00
Jacob Moody
05f2965980 /sys/doc: add mk clean
Add a mk clean to remove all generated files,
and add pdf generation to subdirs missing it.
2025-01-05 02:35:00 +00:00
Jacob Moody
28465682cf kprof: don't downsample the pc
Kprof rounded the pc to 8 byte boundaries in order to save memory.
With x86 instruction rounding this can lead to some pretty misleading
results.

With the old rounding kpdata was ~680kb for a pc64 kernel, with this
change we use ~5.4M (8x) and considering we only allocate when we
first attach this seems reasonable.
2025-01-05 00:26:52 +00:00
cinap_lenrek
4de9d8a511 gefs: fix waserror() bugs 2025-01-05 00:12:16 +00:00
cinap_lenrek
2a622dfcec gefs: fix dlist cache limit by maintaining fs->dlcount 2025-01-05 00:11:47 +00:00
cinap_lenrek
5a460a150b nusb/ether: dont break lan78xx chip (rpi3b+)
The rpi3b+ uses different chip lan78xx.
This one does not append fcs in received frames,
so the previous change broke ethernet.
2025-01-03 09:24:18 +00:00
Jacob Moody
ef5a8a7337 aux/mnihongo: formatting 2025-01-03 00:41:09 +00:00
Jacob Moody
3273db5a84 aux/mnihongo: use memdraw instead of draw
We used to rely on there being a draw(3) there in order to render the
characters in to, this resulted in flashing the rio window white and
made some documents only buildable under a terminal environment.  This
fixes both of those issues.
2025-01-03 00:43:05 +00:00
Jacob Moody
9e0913fa71 libmemdraw: change openmemsubfont() to accept rune minimum as argument
Subfonts for non ascii characters are offset by some minimum rune,
typically specified within the parent font file.  Because libmemdraw
only deals in subfonts, if we want to have it draw non ascii runes we
need some method of providing that base offset.

This function is only used in one place, so update the function
signature and fix the only caller.
2025-01-03 00:51:43 +00:00
cinap_lenrek
a101561223 auth/factotum: avoid static buffer from netmkaddr()
factotum calls authdial() in parallel, so use
the reentrant version netmkaddrbuf() instead.
2025-01-02 20:11:22 +00:00
cinap_lenrek
e981a26000 libc: provide netmkaddrbuf() function avoiding the static buffer
We need a reentrant version for netmkaddr() that
can be used in multithreaded programs.
2025-01-02 20:09:50 +00:00
cinap_lenrek
5ea80693ba usbuhci, usbehci: remove portlck qlock
Everything is already serialized by usbd. For ehci, portlck
also doubled for waiting for doorbell, so rename it to match
its use case.
2024-12-29 17:09:51 +00:00
Jacob Moody
68c89f4a43 acid: remove outdated 8.out binary default (thanks Tekk) 2024-12-27 19:29:34 +00:00
cinap_lenrek
b849349e0c devusb: fix enable delays to avoid device suspend (thanks cgnarne)
cgnarne experienced issues with his xbox controller when
connected to uhci root-port.

doing some experiments, we determined that the delay
between clearing reset and setting enable needed to
be between 5µs and 2.7ms for it to attach successfully.

this timing is close to the 3ms idle time that makes
devices enter suspend mode, so we concluded that the
delay here must be shortend (50ms -> 2ms).
2024-12-26 17:35:44 +00:00
Jacob Moody
242e1dc552 vdiff: accept diff as filename argument and man page touch-up (thanks humm) 2024-12-26 03:54:31 +00:00
Jacob Moody
ed318aac59 rio(4): fix paragraph spacing (thanks humm) 2024-12-26 03:53:18 +00:00
Ori Bernstein
0bfa3ffcb4 gefs: fix error handling in readsnap() 2024-12-26 00:46:07 +00:00
Ori Bernstein
d4938f099d auth/totp(1): separate docs for auth/totp, auth/userpasswd 2024-12-25 17:33:17 +00:00
cinap_lenrek
e05e30eaca auth/userpasswd: remove factotum-bug work-around from 2002, cruft (thanks ori) 2024-12-25 17:08:34 +00:00
Ori Bernstein
21731dd45e auth/factotum: add support for TOTP code generation 2024-12-25 02:18:43 +00:00
cinap_lenrek
1a91932731 ip/dhcpd: impvoe validip(), make validipmask() reject ipv6 masks
Because isv4() is never true for IPnoaddr,
we can skip the check.

Make validipmask() ensure that the top IPv4off
bytes are all 0xff, then check that the low
4 bytes are a valid mask (must be a power
of two minus one).
2024-12-23 16:12:35 +00:00
Jacob Moody
248634879a git: bikeshed git/walk relative path calculation and add tests 2024-12-22 22:41:02 +00:00
Jacob Moody
7814ec46c3 git: make git/diff -s print relative file paths
This makes the output of git/diff -s plumbable
when the user is not within the root of the git repo.
This is implemented through adding a flag to git/walk
and having git/walk work out how many '..'s are needed.

Also includes a small piece of documentation regarding
the use of $editor in git/commit.
2024-12-22 21:06:53 +00:00
cinap_lenrek
35cab9b816 ip/dhcpd: don't get confused by ipv6 addresses for bootp Info
When looking up tftp/bootp information from ndb,
filter out ipv6 addresses. This can happen
when for example the tftp= attribute points to
a domain or sys-name that resolves to both
ipv4 and ipv6 addresses.

Make validip() do the isv4() check, and provide
separate validipmask() function.
2024-12-22 20:06:18 +00:00
Ori Bernstein
94d9b7a49d cpp: remove stray line from tests 2024-12-22 04:53:12 +00:00
cinap_lenrek
9853ea28c8 /sys/src/9/mkfile: add imx8, lx2k and mt7688 to kernel ARCH list 2024-12-22 03:37:25 +00:00
Ori Bernstein
8b3a70dcd1 git/pull: fix typo 2024-12-22 01:19:50 +00:00
Ori Bernstein
66abd6e50a cpp: implement empty arg handling for function-like macros (thanks rod) 2024-12-22 00:48:14 +00:00
Ori Bernstein
60ea3e6d25 git/pull: only show commit summary after updating branches
this makes human error somewhat harder in noscroll windows.
2024-12-21 22:40:27 +00:00
Ori Bernstein
83fe095033 git/get: support side-band and multi-ack 2024-12-14 17:11:01 +00:00
cinap_lenrek
837c596bdf usbdwc: preserve Prtpwr bit for portstatus, turn off power by default, handle channel timeout
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.
2024-12-16 05:14:45 +00:00
cinap_lenrek
5028b882da usbehci: implement portpower control for rootports 2024-12-16 01:52:12 +00:00
Ori Bernstein
eff4b93652 acme/Mail: correct message line number for partially hidden threads 2024-12-15 21:56:54 +00:00
cinap_lenrek
f86cc3e912 usbxhci: preserve RsvdP bits in registers, print recovery reason, print base address.
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.
2024-12-15 21:27:00 +00:00
cinap_lenrek
d38dbf6415 nusb/usbd: use longer reset delay for rootports
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.
2024-12-15 21:19:57 +00:00