sys/cnmac: support CN71xx 1000BASE-X ports
Some CN71xx boards describe active GMX ports only in the PIP device
tree, and mark the CPU facing link as cavium,sgmii-mac-1000x-mode with
cavium,disable-autonegotiation, but without a PHY handle. OpenBSD
otherwise trusts GMX0_INF_MODE for port discovery and insists on a PHY
attach in cn30xxgmx_attach(), so such ports never reach cnmac with a
usable media setup.
Enumerate CN71xx SGMII ports from pip/interface at N when that description
is present, carry the 1000x and disable-autonegotiation flags into the
per port state, and let cnmac seed fixed 1000baseT full duplex media for
that case. Ports that still use a normal SGMII PHY path continue to go
through cn30xxsmi_get_phy() and mii_attach() unchanged.
Tested on two CN71xx Octeon systems: Juniper SRX300, which uses
1000BASE-X DT ports, and Ubiquiti EdgeRouter 4, which does not.
OK: visa@
When updating the ranges after an insertion or deletion, the range
should be up to and including the current line number.
This behavior is consistent with historic vi as well as modern vim.
Reported by Tim Case, fix from Walter Alejandro Iglesias
grow the buffer to hold the sprintf'd rtable id by 8 bytes so it can hold
the full range an int can express.
the previous buffer was large enough since the rtable id is clamped to 0..
RT_TABLEID_MAX which is 255, however, it is a bit much to ask for analyzers -
including those in compilers - to detect that, 8 extra bytes on the stack
cost us effectively nothing, and it feels a bit more robust.
triggered by bcook's portable diffs, ok claudio
in show_peer_msg, grow the buffer to hold the sprintf'd stratum by 1 byte.
the previous buffer was large enough since startum is clamped to 0..15,
however, it is a bit much to ask for analyzers - including those in
compilers - to detect that, an extra byte on the stack costs us effectively
nothing, and it feels a bit more robust.
triggered by bcook's portable diffs, ok claudio
Use &nowake as ident in tsleep_nsec call instead of using a stack variable
for the same goal. Using &nowake is becomes clear that there is no wakeup
call for this sleep.
noticed by robert@ with llvm22
OK jca@ krw@
Sanitize pane titles and window and session names more consistently and
strictly, prevents C0 characters and other nonvisible characters causing
problems. Reported (with a different fix) by Chris Monardo in GitHub
issue 4999.
fix section merging for .srodata and .openbsd.randomdata
there was a bad merge of changes and a comma was lost and with that
section merging for .srodata and .openbsd.randomdata
ok naddy@, sthen@