Age | Commit message (Collapse) | Author |
|
i was lazy and just put them at the end of the existing set. fyi,
i think major 51 is free on all archs if anyone is looking for
another one.
ok claudio@
|
|
"i" is a count of milliseconds. We convert it to a starting interval
"ts" and determine our absolute timeout "end". Then we loop through
until the poll is successful or "end" elapses.
This could be simplified with an absolute timeout interface for
tsleep(9) but alas, we don't have one yet.
ok krw@
|
|
- pppx does not support FIOASYNC, so don't pretend it's fine.
- have FIONREAD return the number of bytes that will be read.
- have kevent data return the number of bytes to read instead of
the number of packets on the svcq to read.
|
|
"i get it" deraadt@
|
|
There are really two loops here. One for SCSI_NOSLEEP and delay(9),
the other for tsleep(9). The paths share a loop in the code but they
shouldn't. They have different termination conditions and share little
code.
If we pull the conditional clause out of the for-loop and then give each
path its own polling loop the logic should be easier to follow.
ok krw@
|
|
this is so we can pull the PIPEX code out of tun(4), which in turn
will let us lock down tun(4) functionality and start moving the
code around.
ok claudio@ yasuoka@
|
|
this is so pppx(4) and the upcoming pppac(4) can give kq read data
dn FIONREAD values that makes sense like the ones tun(4) and tap(4)
provide with ifq_hdatalen.
|
|
From Andrius V vezhlys (at) gmail, on bugs@
|
|
as shipped with the Pinebook Pro as an AMPAK AP6256 module.
|
|
interrupt it is possible that the card immediately raises another
one. Since the interrupt seems to be edge triggered, and we only
acked it after said handling, it was possible we lose the next one.
This heavily improves bwfm(4) on the Pinebook Pro.
ok kettenis@
|
|
ok tedu
|
|
Errors at compile time are preferred over being silently broken.
ok kettenis@
|
|
node, which essentially means that there is none. Make sure we
don't attach in that case, so that we don't panic while trying
to map it.
ok kettenis@
|
|
ok deraadt
|
|
issues and suspend/resume on amdgpu(4). Might help radeondrm(4) issues
as well.
tested by mortimer@, abieber@, krw@
ok jsg@
|
|
STALL'ing. So use the standard's recommended csw.dCSWDataResidue and
copy data only on successful completion of the request.
Fixes issue where N bytes are requested, M bytes are returned, and the
device STALL's because it has no more data to give. Thus resulting in
no data is copied to the user buffer but the claim being made that
said buffer now contains M new bytes of valid data.
e.g. when cdio(1) asks for 4096 bytes of media data and only 96 bytes
are provided by the CDRW device.
Feeback, cluebats, fixes and ok patrick@
|
|
|
|
|
|
original TD, when a transfer is a multiple of the max packet size. The
zero length TD will have a NULL xfer pointer.
As a result "NULL xfer pointer" situations become perfectly normal. So
change the log_warnx() that issues that verbiage to a log_debug().
Note that the original transfer will complete and report its result up
the USB stack before the zero length transfer is executed.
Fixes (at least) urtwn(4) interfaces.
Feeback, cluebats, fixes and ok patrick@
|
|
|
|
If we want to sleep for a multiple of seconds we can do that without
involving lbolt.
This may cause some paths to sleep longer than they have on average,
as sleeping on lbolt wakes you up within one second, not after one
second. If this is a problem we will need to shorten the intervals
given to scsi_delay().
With insight from deraadt@.
ok krw@
|
|
The design is fairly simple: events, in the form of descriptors on a
ring, are being produced in any kernel context and being consumed by
a userland process reading /dev/dt.
Code and hooks are all guarded under '#if NDT > 0' so this commit
shouldn't introduce any change as long as dt(4) is disable in GENERIC.
ok kettenis@, visa@, jasper@, deraadt@
|
|
|
|
Threads in __thrsleep(2) are tracked using queues, one queue per each
process for synchronization between threads of a process, and one
system-wide queue for the special ident -1 handling. Each of these
queues has an associated rwlock that serializes access.
The queue lock is released when calling copyin() and copyout() in
thrsleep(). This preserves the existing behaviour where a blocked copy
operation does not prevent other threads from making progress.
Tested by anton@, claudio@
OK anton@, claudio@, tedu@, mpi@
|
|
mmhub on soc15 is a memory controller hub for sdma, uvd and vce.
ok kettenis@
|
|
controllers. Devices where SB800_PMREG_SMB0SELEN returns 0 will only use
the first port.
Also clean up the PCI_PRODUCT_AMD_HUDSON2_SMB detection a bit more.
The PCI ID 1022:780b is used by AMD Bolton FCH and AMD Family 16h
model 30h-3fh. The problem is the former uses old register layout while
the latter uses the new FCH layout. Make sure AMD Bolton FCH uses the
old code path.
Finally fix a confusion about the IRQ / SMI detection. The logic was
reversed since if the bit is 0 then SMI is used.
This should fix attaching sensors 4 times on old AMD machines.
OK kettenis@
|
|
|
|
No functional change.
|
|
|
|
ok deraadt krw
|
|
become interesting in the future.
ok deraadt krw
|
|
ok patrick@
|
|
|
|
|
|
space-saving candidate is found
(this candidate selected by jsg and kettenis, don't blame the commiter)
|
|
|
|
|
|
into read-only data segment.
OK deraadt@ tedu@
|
|
ok deraadt krw
|
|
require the debugger on most architectures, and the separation makes the
code easier to use from other subsystems.
The function definitions are still conditional to DDB. However, that
should not matter for now.
OK deraadt@, mpi@
|
|
Should make untangling the polling logic simpler.
"Sure." krw@
|
|
|
|
|
|
|
|
|
|
We can pass PNORELOCK to msleep_nsec(9) and avoid retaking the lock
for no reason during a drain.
ok ratchov@
|
|
Ticks to milliseconds.
ok ratchov@
|
|
a crash that can happen if a uhid(4) device is detached while kqueue
still holds references to knotes that point to the device.
The invalidation has to be done after vdevgone(). This order ensures
that the file descriptors return an error or EOF when kevent(2) returns
the EOF events.
Crash reported and fix tested by Greg Steuck
OK mpi@
|
|
changing them, to synchronize with kqueue_register() and kqueue_scan().
Detach the knotes from the original knote list, change the filterops
to one that always indicates EOF condition, and activate in one-shot
mode.
The detaching allows the original knote list head to be deleted after
klist_invalidate() returns. The knotes are activated to make the EOF
condition visible to the event subscribers as soon as possible. As the
knotes are detached from the list, klist_invalidate() does not have to
wait for userspace to process them.
The use of the special filterops minimizes the need to handle klist
invalidation in actual implementations of filterops.
Tested by Greg Steuck
OK mpi@
|
|
OK bluhm@
|