summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2020-01-23wire up pppac(4) to some majors on each arch.David Gwynne
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@
2020-01-23ciss(4): tsleep(9) -> tsleep_nsec(9)cheloha
"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@
2020-01-23fix some ioctl/kq weirdness in the pppx(4) side of things.David Gwynne
- 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.
2020-01-23add /etc/protocols to the magic unveil whitelist that the dns pledge hasDavid Gwynne
"i get it" deraadt@
2020-01-23ciss(4): ciss_cmd: split polling loop into two loopscheloha
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@
2020-01-22add pppac(4) code for a dedicated PPP Access Concentrator interface.David Gwynne
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@
2020-01-22add ml_hdatalen and mq_hdatalen as workalikes of ifq_hdatalen.David Gwynne
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.
2020-01-22Unbreak !DIAGNOSTIC build.Martin Pieuchot
From Andrius V vezhlys (at) gmail, on bugs@
2020-01-22Recognize BCM4345 rev 9, which requires a different firmware,Patrick Wildt
as shipped with the Pinebook Pro as an AMPAK AP6256 module.
2020-01-22Ack SDIO interrupts earlier on dwmmc(4). While handling an SDIOPatrick Wildt
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@
2020-01-22delete wasteful ;;Theo de Raadt
ok tedu
2020-01-22Remove empty unmap_mapping_range() define and hide drm_vma_node_unmap().Jonathan Gray
Errors at compile time are preferred over being silently broken. ok kettenis@
2020-01-22The Pinebook Pro's u-boot seems to add a zero-length framebufferPatrick Wildt
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@
2020-01-22rm rtfps driver. disabled and man page doesn't inspire much confidence.Ted Unangst
ok deraadt
2020-01-22Make ttm_bo_unmap_virtual_locked() actually unmap things. Fixes cursorMark Kettenis
issues and suspend/resume on amdgpu(4). Might help radeondrm(4) issues as well. tested by mortimer@, abieber@, krw@ ok jsg@
2020-01-22Some devices do not update the TRB transfer residual information asKenneth R Westerback
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@
2020-01-22Remove trailing whitespace, no code change.Mike Larkin
2020-01-22wbsd(4): timeout_add(9) -> timeout_add_msec(9); ok deraadt@cheloha
2020-01-22Add a zero length TD, rather than adding a zero length TRB to theKenneth R Westerback
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@
2020-01-22xbf(4): tsleep(9) -> tsleep_nsec(9); ok mikeb@cheloha
2020-01-22scsi_delay(): sleep without lboltcheloha
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@
2020-01-21Import dt(4) a driver and framework for Dynamic Profiling.Martin Pieuchot
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@
2020-01-21regenVisa Hankala
2020-01-21Make __thrsleep(2) and __thrwakeup(2) MP-safeVisa Hankala
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@
2020-01-21Enable mmhub power gating on picasso. Matches linux 4.20.Jonathan Gray
mmhub on soc15 is a memory controller hub for sdma, uvd and vce. ok kettenis@
2020-01-21Fix support for additional I2C busses in piixpm(4) for older SB800 SMBusClaudio Jeker
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@
2020-01-21Whitespace fixes. No code change.Mike Larkin
2020-01-21Remove some prototypes under #ifdef HIBERNATE that we don't use anymore.Mike Larkin
No functional change.
2020-01-21Whitespace/style fixes. No code change.Mike Larkin
2020-01-21remove unfinished macppc esp driver.Ted Unangst
ok deraadt krw
2020-01-21remove a few disabled drivers that don't compile and seem unlikely toTed Unangst
become interesting in the future. ok deraadt krw
2020-01-21Add the beginnings of an nvmem "framework".Mark Kettenis
ok patrick@
2020-01-21sys/nfs: misc. tsleep(9) -> tsleep_nsec(9); ok mpi@cheloha
2020-01-20match on Intel Comet Lake and Tiger Lake EthernetJonathan Gray
2020-01-20floppy is a bit tight right now, evict fxp temporarily until anotherTheo de Raadt
space-saving candidate is found (this candidate selected by jsg and kettenis, don't blame the commiter)
2020-01-20regenJonathan Gray
2020-01-20add ids for Intel Comet Lake and Tiger Lake EthernetJonathan Gray
2020-01-20struct vops is not modified during runtime so use const which moves eachClaudio Jeker
into read-only data segment. OK deraadt@ tedu@
2020-01-20remove esp at pcmcia attachment. it doesn't even compile.Ted Unangst
ok deraadt krw
2020-01-20Separate the stack trace saving interface from ddb. The saving does notVisa Hankala
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@
2020-01-20ciss(4): de-indent polling logiccheloha
Should make untangling the polling logic simpler. "Sure." krw@
2020-01-20regenJonathan Gray
2020-01-20add another Intel Bluetooth deviceJonathan Gray
2020-01-20regenJonathan Gray
2020-01-20add some more Intel NVMe devicesJonathan Gray
2020-01-19eso(4): do not retake audio_lock during draincheloha
We can pass PNORELOCK to msleep_nsec(9) and avoid retaking the lock for no reason during a drain. ok ratchov@
2020-01-19eso(4): msleep(9) -> msleep_nsec(9)cheloha
Ticks to milliseconds. ok ratchov@
2020-01-18Invalidate knote list of uhid(4) after device detach. This preventsVisa Hankala
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@
2020-01-18Make klist_invalidate() more careful and general. Acquire knotes beforeVisa Hankala
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@
2020-01-18Clear mount operation argument flags from mnt_flag after mount.Visa Hankala
OK bluhm@