summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2015-11-24No need to include <net/if_types.h> for <net/if_vlan_var.h>Martin Pieuchot
2015-11-24Double the delay between the PHY reset and the status check forMartin Pieuchot
ServerWorks SATA. Allow to reliably found disks on xserve G5. from miod@
2015-11-24fix tx ring accounting in myx_start.David Gwynne
turns out i was calculating the number of packets (not descriptors) on the tx ring, and then using that as the free space for descriptors.
2015-11-24regenDaniel Dickman
2015-11-24Add some intel 6th gen and 100 series ids.Daniel Dickman
ok jsg@
2015-11-23you cant touch m_pkthdr in between ifq_deq_begin and ifq_deq_commit.David Gwynne
TULIP_SETCTX() does though. this moves that call after ifq_deq_commit. problem reported (with great detail) and fix tested by ricardo mestre ok mpi@
2015-11-23Include <sys/atomic.h> when atomic operations are used.Martin Pieuchot
This has been masked because <sys/srp.h> is pulled unconditionally. ok dlg@
2015-11-23Back out the CRITICAL change, turn it back from 10% to 25%. SomeReyk Floeter
people with old/broken batteries didn't like this change, and the underlying heuristics are wrong.
2015-11-22too many arguments to function 'ifq_deq_begin'David Gwynne
found by deraadt@
2015-11-22regenMark Kettenis
2015-11-22Unknown device in a MacBookPro9,2. Almost certainly the first generationMark Kettenis
Intel Thunderbolt controller, as this model was introduced in 2012, and the second generation controllers were introduced in 2013.
2015-11-22regenMark Kettenis
2015-11-22Broadcom BCM4331. From Ossi Herrala.Mark Kettenis
2015-11-22Remove drm_gem_object_alloc() and associated infrastructure. It's unused andMark Kettenis
has been removed upstream as well.
2015-11-22The "CRITICAL" APM battery level, that is exported/faked by the ACPIReyk Floeter
stack, is currently set to 25%. With 25% battery left, a typical modern laptop will have at least one hour runtime left. It is an arbitrary value, and other APM power layers in the kernel set CRITICAL to something like 5% or 10%, so set it to 10% for now. OK mlarkin@
2015-11-22fix uninitialised variable use in nep_rx_proc()Jonathan Gray
ok kettenis@
2015-11-21The drm irq stuff isn't actually used on OpenBSD. Using the PCI deviceMark Kettenis
interrupt line register as the irq number doesn't really work as the contents of that register might be 0, and the code has checks for non-zero irq numbers in places. Insteadmake drm_dev_to_irq() return -1, which is an obviously bogus, but non-zero value. This should fix inteldrm(4) on recent Apple hardware.
2015-11-21Make this work with 64-bit memory BARs such as those found on the newMark Kettenis
pcengines APU. ok deraadt@
2015-11-20Add pledge "disklabel", which allows sysctl kern.rawpartition, aTheo de Raadt
few disklabel ioctls, and the DIOCMAP ioctl against /dev/diskmap used to translate duid numbers into partitions. This will allow pledging of at least 12 disk/filesystem aware programs; due to the negative impact that diff will wait a bit so everyone has a chance to update their kernels. ok semarie
2015-11-20Missed in previous, pointed by benoit@Martin Pieuchot
2015-11-20Revert all the changes to run the tx completion path wihtout holding theMartin Pieuchot
KERNE_LOCK. A piece is still not right as many peole reported a "watchdog timeout" problem. This basically brings us back to r1.305. ok dlg@, jmatthew@
2015-11-20Check for space on the ring before dequeuing packets.Martin Pieuchot
Allows us to get rid of mq_requeue(9) and IFQ_POLL(9) because wireless drivers use a special queue for management frames. Tested by stsp@, ok dlg@, stsp@
2015-11-20shuffle struct ifqueue so in flight mbufs are protected by a mutex.David Gwynne
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@
2015-11-19get rid of sc_tx_free and the atomic ops on it in myx_start and myx_txeof.David Gwynne
myx_start calculates the free space by reading the consumer index and doing some maths, which lets us avoid the interlocked cpu ops.
2015-11-17Clear if_timer when shutting down the interface so the watchdog timerJonathan Matthew
doesn't fire a few seconds later. problem reported by Hrvoje Popovski, ok dlg@
2015-11-17shuffle transmit to avoid IFQ_POLL.David Gwynne
basically make sure there's enough space in the ring before dequeueing a packet for it. ok mpi@ jmatthew@
2015-11-16Don't attempt to restore the framebuffer mode in radeon_driver_lastclose_kms()Mark Kettenis
if the mode config stuff has not been initialized yet. Fixes a panic that happens when radeondrm(4) detaches because the hardware couldn't be initialized properly. Tested by Lubos Boucek.
2015-11-16pvbus_types isnt full on i386 cos the openbsd vmm entry is only setDavid Gwynne
on amd64. make sure the signature is not null before using it in pvbus_attach. fixes a panic on i386 under vmware.
2015-11-16Check for space on the ring before dequeuing packets.Martin Pieuchot
Allows us to get rid of mq_requeue(9) and IFQ_POLL(9) because wireless drivers use a special queue for management frames. Tested by stsp@, ok dlg@, stsp@
2015-11-16rework vge_start to avoid IFQ_POLLDavid Gwynne
firstly, this checks for space in the tx ring before looking at the send queue. if there's no space, then IFF_OACTIVE is set and break. if there's space use IFQ_DEQUEUE to pull a packet off. if we fail to encapsulate it, it gets dropped. encap has been changed so the dmamaps the mbufs are loaded into are created with 7 segments instead of 32. this means we detect when the packet would overflow the tx descriptor at dmamap load time, rather than after we've looped over the segments writing them into the descriptor. we now use m_defrag to defrag the mbuf instead of allocating a new one and using m_copydata. now if we have any encap error on the first mbuf, we no longer set IFF_OACTIVE and wait for an interrupt that never comes to clear it. testing and (excellent) code review by richard proctor
2015-11-15virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00: Virtio ↵Theo de Raadt
Network Device becomes simply virtio2 at pci0 dev 3 function 0 "Qumranet Virtio Network" rev 0x00
2015-11-15Declare macros for antenna flags. Lifted from Linux iwlwifi.Stefan Sperling
2015-11-15Declare 802.11n mode and channel flags. Tweak 11n related fields in structStefan Sperling
ieee80211com and move them inside #ifndef IEEE80211_NO_HT without breaking the build in rsu(4) for RAMDISK_CD. Also declare 11n protection modes and MCS count. ok deraadt mpi kettenis guenther
2015-11-14Do not include <net/if_vlan_var.h> when it's not necessary.Martin Pieuchot
Because of the VLAN hacks in mpw(4) this file still contains the definition of "struct ifvlan" which depends on <sys/refcnt.h> which in turns pull <sys/atomic.h>...
2015-11-14Add missing header found while removing <sys/srp.h> from <sys/param.h>Martin Pieuchot
2015-11-14Various *syncron* -> *synchron* typos.Miod Vallat
2015-11-13vmm is i386 only for nowTheo de Raadt
2015-11-13remove unused ARC4 support; ok mikeb@Christian Weisgerber
2015-11-13regenStefan Sperling
2015-11-13Add USB device ID found in an RTL8192EU device.Stefan Sperling
ok mpi@
2015-11-13Remove unused non HMAC versions of MD5 and SHA1; ok mpi, deraadt, naddyMike Belopuhov
2015-11-13Check for space on the ring before dequeuing packets.Martin Pieuchot
Allows us to get rid of mq_requeue(9) and IFQ_POLL(9) because wireless drivers use a special queue for management frames. Tested by stsp@, ok dlg@, stsp@
2015-11-13vmm(4) kernel codeMike Larkin
circulated on hackers@, no objections. Disabled by default.
2015-11-12Revert 1.372, reported to cause regressions on some models.Miod Vallat
2015-11-12two newlines in the middle of a func doenst look right.David Gwynne
2015-11-11Kill useless IFQ_POLL().Martin Pieuchot
ok dlg@
2015-11-11mark ehci_intr() as IPL_MPSAFE here as wellJonathan Gray
ok mpi@
2015-11-10In bge_reset(), after figuring out which register access routines to useMiod Vallat
depending upon the chip capabilities, use it everywhere instead of hardcoding one call to bge_writemem_ind() by mistake; this unbreaks the BCM5704 A3 found on some xserve G5 (RackMac3,1). Also tested on a few other bge(4) chip models by jmatthew@ (5703X, 5714), mpi@ (5780), naddy@ (5761) and me (5701). ok dlg@
2015-11-10The window accessible with BGE_MEMWIN_{READ,WRITE} only spans 32KB, soMiod Vallat
program it as such and not as a 64KB window; fortunately none of the current users of these macros would cross a 32KB boundary. ok dlg@
2015-11-09Run config_found() under splusb.Martin Pieuchot
Fix a NULL dereference reported by jsg@ in case a Root Port Hub interrupt is handled before the soft-interrupt has been established.