| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
ok dlg@ tobhe@
|
| |
|
|
|
|
|
|
|
|
| |
miod explained it was initially a long as it was thought drivers may
need to allocate storage but in practice they don't need more than
32 bits for an attribute.
suggested and reviewed by miod@
|
|
|
|
|
|
|
|
| |
Suggested by John Carmack. miod agrees a rename would make sense and
explained it was initially thought drivers may need to allocate storage
but in practice they don't need more than 32 bits for an attribute.
ok mpi@
|
|
|
|
|
|
| |
Tested on IP30 with DS1687.
Looks good to miod@
|
| |
|
|
|
|
| |
OK miod@
|
|
|
|
|
|
|
| |
The PHY register offsets are adjusted because the registers are accessed
using 64-bit loads and stores.
From miod@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After a cold boot, the mii bus appears to take some time to initialize;
the phy does not answer to address 8 but to a larger address (10 or 11),
then, after being reset, to its correct address of 8.
So the kernel would discover the phy at a wrong address, attach it, and
after it gets reset, reading from the phy at the wrong address would
return either all bits clear or all bits set, confusing the link speed
logic without any way to recover.
Work around the issue by resetting all phys found when the interface is
reset for the first time. Thus, by the time mii_attach() runs and walks
the bus again, the phy will answer at the right address.
From miod@
|
|
|
|
|
|
|
|
| |
handler registration. The code is inherited from isa(4), but on the O2,
although some interrupt sources on CRIME are edge-triggered, all
the MACE interrupts are level-triggered.
From miod@
|
| |
|
|
|
|
|
| |
Found by Ilja Van Sprundel
OK bluhm@ deraadt@
|
|
|
|
|
| |
head and tail in the interrupt handler. This fixes an old bug that
causes a Tx stall when Tx ring gets full.
|
| |
|
|
|
|
|
|
|
| |
this means packets are consistently counted in one place, unlike the
many and various ways that drivers thought they should do it.
ok mpi@ deraadt@
|
|
|
|
|
|
| |
NULL tests.
ok mpi@
|
| |
|
|
|
|
|
| |
methods from all audio drivers and from the audio_if structure as they
are never called.
|
| |
|
|
|
|
|
|
|
| |
have had uninitialised bus space handle arguments since the mapping became
conditional in rev 1.9
confirmed with miod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there are two things shared between the network stack and drivers
in the send path: the send queue and the IFF_OACTIVE flag. the send
queue is now protected by a mutex. this diff makes the oactive
functionality mpsafe too.
IFF_OACTIVE is part of if_flags. there are two problems with that.
firstly, if_flags is a short and we dont have any MI atomic operations
to manipulate a short. secondly, while we could make the IFF_OACTIVE
operates mpsafe, all changes to other flags would have to be made
safe at the same time, otherwise a read-modify-write cycle on their
updates could clobber the oactive change.
instead, this moves the oactive mark into struct ifqueue and provides
an API for changing it. there's ifq_set_oactive, ifq_clr_oactive,
and ifq_is_oactive. these are modelled on ifsq_set_oactive,
ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd.
this diff includes changes to all the drivers manipulating IFF_OACTIVE
to now use the ifsq_{set,clr_is}_oactive API too.
ok kettenis@ mpi@ jmatthew@ deraadt@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the code is refactored so the IFQ macros call newly implemented ifq
functions. the ifq code is split so each discipline (priq and hfsc
in our case) is an opaque set of operations that the common ifq
code can call. the common code does the locking, accounting (ifq_len
manipulation), and freeing of the mbuf if the disciplines enqueue
function rejects it. theyre kind of like bufqs in the block layer
with their fifo and nscan disciplines.
the new api also supports atomic switching of disciplines at runtime.
the hfsc setup in pf_ioctl.c has been tweaked to build a complete
hfsc_if structure which it attaches to the send queue in a single
operation, rather than attaching to the interface up front and
building up a list of queues.
the send queue is now mutexed, which raises the expectation that
packets can be enqueued or purged on one cpu while another cpu is
dequeueing them in a driver for transmission. a lot of drivers use
IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before
committing to it with a later IFQ_DEQUEUE operation. if the mbuf
gets freed in between the POLL and DEQUEUE operations, fireworks
will ensue.
to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback,
and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq
mutex and get a reference to the mbuf they wish to try and tx. if
there's space, they can ifq_deq_commit it to remove the mbuf and
release the mutex. if there's no space, ifq_deq_rollback simply
releases the mutex. this api was developed to make updating the
drivers using IFQ_POLL easy, instead of having to do significant
semantic changes to avoid POLL that we cannot test on all the
hardware.
the common code has been tested pretty hard, and all the driver
modifications are straightforward except for de(4). if that breaks
it can be dealt with later.
ok mpi@ jmatthew@
|
| |
|
|
|
|
|
|
|
| |
While here, fix the size parameter of bus_dmamem_unmap() in
iec_alloc_physical().
ok miod@
|
| |
|
|
|
|
|
|
|
| |
Note that pseudo-drivers not using if_input() are not affected by this
conversion.
ok mikeb@, kettenis@, claudio@, dlg@
|
|
|
|
|
|
|
|
|
| |
the kernel_lock), as we already do better conversions in
user-mode. Yet, no need for every single driver to fiddle with the
conversion code as they are done transparently by common MI code. With
help from armani and miod, support from mpi
ok armani@
|
| |
|
| |
|
|
|
|
| |
with and ok miod@
|
| |
|
|
|
|
| |
ok tedu@ deraadt@
|
| |
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
Remember initprocess instead of initproc.
ok matthew@ blambert@
|
|
|
|
| |
initial diff from jasper@
|
|
|
|
|
| |
circumstances where the pckbc code gets confused otherwise, on *some*
controllers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mouse port, depending upon the system time, match what the prom is doing and
actually probe for a keyboard on both ports, and decide the first port with a
keyboard is the keyboard port.
If no keyboard is found, but a mouse is found, decide the keyboard port is the
empty one.
If no device is found, then we can try and pick the defaults, depending upon
the system we are running on, as this used to be the case (i.e. coping with
Fuel having keyboard on port 1 and mouse on port 0 when connecting devices
according to the chassis' markings).
This is necessary because different IO9 board revisions on Tezro come with
different wirings, and we can not tell these boards apart.
Discussed with "nullnilaki" (nullnilaki on gmail) who is the lucky owner of an
Onyx 350 with correct wiring and a Tezro with inverted wiring. Tested on Octane
and Fuel with all combinations of devices connected (mouse only, keyboard only,
keyboard and mouse) in both ports, glass and serial console.
XXX We probably want to allow for more pckbd attachment flexibility on non-x86
XXX platforms eventually (at least where the PS/2 slots are really independent,
XXX so that we can attach pckbd to any port and better cope with human error
XXX when connecting devices.
|
|
|
|
|
| |
Trivial except for tga(4) and gpx(4/vax) which need a bit more care setting
up a new font.
|
|
|
|
| |
No functional change.
|
|
|
|
|
| |
don't have to. Remove these include lines from sgi drivers.
test jsing@
|
|
|
|
|
| |
native one. Allows encoding conversions to be handled in
userland
|
|
|
|
| |
ok otto
|
|
|
|
|
|
| |
cleaning up some shutdown-hook related code on the way.
(A few drivers related to sparc are still skipped at kettenis' request)
ok kettenis mlarkin, tested by many others too
|
|
|
|
|
|
|
|
|
| |
resolution is not a multiple of the tile size, in emulation (text) mode.
The usual 1280x1024 resolution ended up with the correct value, by chance,
but a width of 1600 would be wrong. (X11 was running fine)
Tested on the 1600x1024 resolution of the 1600SW display. Thanks to Johan
Sanchez for lending me a 1600SW monitor and an adapter board.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
structures (including sound-card registers) from concurent
access by syscall and interrupt code-paths. Since critical
sections remain the same, calls to splraise/spllower can be
safely replaced by calls to mtx_enter/mtx_leave with two
exceptions: (1) mutexes are not reentrant (the inner splraise
is thus removed), and (2) we're not allowed to sleep with a
mutex (either msleep is used or the mutex is released before
sleeping).
ok and help from kettenis, a lot of work from armani
|
| |
|