summaryrefslogtreecommitdiffstats
path: root/sys/dev
AgeCommit message (Collapse)AuthorFilesLines
2015-11-24Double the delay between the PHY reset and the status check formpi1-2/+2
ServerWorks SATA. Allow to reliably found disks on xserve G5. from miod@
2015-11-24fix tx ring accounting in myx_start.dlg1-20/+24
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-24regendaniel2-2/+152
2015-11-24Add some intel 6th gen and 100 series ids.daniel1-1/+31
ok jsg@
2015-11-23you cant touch m_pkthdr in between ifq_deq_begin and ifq_deq_commit.dlg1-12/+4
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.mpi2-2/+4
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%. Somereyk1-2/+2
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'dlg1-2/+2
found by deraadt@
2015-11-22regenkettenis2-2/+7
2015-11-22Unknown device in a MacBookPro9,2. Almost certainly the first generationkettenis1-1/+2
Intel Thunderbolt controller, as this model was introduced in 2012, and the second generation controllers were introduced in 2013.
2015-11-22regenkettenis2-2/+7
2015-11-22Broadcom BCM4331. From Ossi Herrala.kettenis1-1/+2
2015-11-22Remove drm_gem_object_alloc() and associated infrastructure. It's unused andkettenis5-46/+5
has been removed upstream as well.
2015-11-22The "CRITICAL" APM battery level, that is exported/faked by the ACPIreyk1-2/+2
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()jsg1-2/+2
ok kettenis@
2015-11-21The drm irq stuff isn't actually used on OpenBSD. Using the PCI devicekettenis2-7/+3
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 newkettenis1-13/+12
pcengines APU. ok deraadt@
2015-11-20Add pledge "disklabel", which allows sysctl kern.rawpartition, aderaadt1-1/+3
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@mpi1-5/+6
2015-11-20Revert all the changes to run the tx completion path wihtout holding thempi1-35/+44
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.mpi2-22/+24
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.dlg60-273/+317
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.dlg1-9/+14
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 timerjmatthew1-1/+2
doesn't fire a few seconds later. problem reported by Hrvoje Popovski, ok dlg@
2015-11-17shuffle transmit to avoid IFQ_POLL.dlg1-32/+30
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()kettenis1-4/+7
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 setdlg1-2/+3
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.mpi1-13/+8
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_POLLdlg1-54/+34
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 Network Devicederaadt1-2/+1
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.stsp1-3/+12
2015-11-15Declare 802.11n mode and channel flags. Tweak 11n related fields in structstsp1-2/+7
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.mpi18-89/+18
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>mpi1-1/+2
2015-11-14Various *syncron* -> *synchron* typos.miod3-7/+7
2015-11-13vmm is i386 only for nowderaadt1-1/+5
2015-11-13remove unused ARC4 support; ok mikeb@naddy1-42/+28
2015-11-13regenstsp2-4/+9
2015-11-13Add USB device ID found in an RTL8192EU device.stsp1-1/+2
ok mpi@
2015-11-13Remove unused non HMAC versions of MD5 and SHA1; ok mpi, deraadt, naddymikeb1-29/+5
2015-11-13Check for space on the ring before dequeuing packets.mpi4-55/+32
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 codemlarkin2-3/+6
circulated on hackers@, no objections. Disabled by default.
2015-11-12Revert 1.372, reported to cause regressions on some models.miod1-2/+2
2015-11-12two newlines in the middle of a func doenst look right.dlg1-2/+1
2015-11-11Kill useless IFQ_POLL().mpi4-12/+8
ok dlg@
2015-11-11mark ehci_intr() as IPL_MPSAFE here as welljsg1-2/+2
ok mpi@
2015-11-10In bge_reset(), after figuring out which register access routines to usemiod1-2/+2
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, somiod1-6/+6
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.mpi1-3/+2
Fix a NULL dereference reported by jsg@ in case a Root Port Hub interrupt is handled before the soft-interrupt has been established.
2015-11-09regenmlarkin2-2/+14