rework the transmit and receive paths to address reliability issues.
phessler@ has been having trouble with msk on overdrive 1000s. some
of the issues relate to the driver not coping with exhaustion of
mbufs for the rx ring, the other issues are corruption of the mcl9k
pool that msk uses.
this diff adds a timeout that the rx refill code uses when the rx
ring is empty and cannot be filled. it'll periodically retry the
ring refill until it can get some mbufs in the air again.
the current code made hunting for the mcl9k issue too hard, so this
rewrites it to be simpler and more like other drivers. there's now
just arrays of mbuf pointers and dmamaps to shadow the hardware
ring entries, and producer and consumer indexes. what was there
before had linkes lists of something to hold mbuf pointers and
dmamaps, and some way to go from the ring to go back to that. i
think, it was hard to tell what was happening.
this also copies the ADDR64 handling on the tx ring to the rx ring.
this potentially makes more rx descriptors available, but that can
in hindsight the mcl9k problem could have been from letting if_rxr
allocate the entier ring. if every descriptor was filled, the chip
may have run around the ring when it shouldnt have. giving rxr one
less descriptor than there is on the ring may have fixed the problem
this work also makes it easier to make msk mpsafe.
tested by an ok phessler@
ok kettenis@ deraadt@
|message||Remove redundant zeroing and dead code.|
Set the proper bus clock rate based on the "clock-frequency" property and
the rate of the parent clock. If the "clock-frequency" property isn't
present, use the default standard mode clock of 100kHz.
Add sxits(4), a driver for the temperature sensor on the Allwinner A10/A20
pckbd: don't change translation mode if controller is in table 2
This was changed a decade ago to forcibly try table 3 first in order
to make some now-long-gone hardware work.
Newer Lenovo machines seem to have trouble being asked to change
modes which manifests as a long boot delay as it waits for each
request to timeout, or by causing the keyboard to generate junk when
Assume table 2 by default and just leave it alone if it's already
there. This is how Linux has operated for quite a while and seems
to help on these Lenovo machines.
Tested by a few with these machines and has been in snaps for a bit.
|message||Add Silicon Motion SM2260 NVMe.|
Don't advertise L0s if the "aspm-no-l0s" property is present. Base available
bus numbers on the "bus-range" property. Create outbound translations based
on the "ranges" property.
Fix an interrupt storm condition in vldcp(8) (sparc64).
If the Rx channel goes down with pending data on the ring, toss the pending
data to ensure that the firmware's rx ring head index matches the rx ring
tail index. Otherwise we trigger an interrupt storm since vldcpread() never
consumes pending data while the channel is down, and the firmware keeps
triggering the interrupt until all data on the ring is consumed.
Interrupt storm observed and fix tested on a T5220 (which can now run
ldom guests; without this fix starting ldomd would trigger the problem).
Handle %gs like %[def]s and reset set it in cpu_switchto() instead of on
every return to userspace.
ok kettenis@ mlarkin@