summaryrefslogtreecommitdiff
path: root/sys/dev/pci
AgeCommit message (Collapse)Author
2015-12-18Make ix(4) mpsafer. Take advantage of intr_barrier() to eliminate the mutexMark Kettenis
introduced in the previous step, and use atomic instructions to make the tx completion path mpsafe as well. ok claudio@, mpi@
2015-12-18Remove an error-on-NULL condition after a mallocarray() call that cannotmmcc
fail. This codepath doesn't exist upstream, so it's fine to change. ok jsg@
2015-12-17If CORB/RIRB are not running, log error message unconditonnalyAlexandre Ratchov
and return error. From Alexey Suslikov <alexey.suslikov at gmail.com>
2015-12-14Add initial 802.11n support to the iwm(4) driver.Stefan Sperling
Adds support for HT MCS 0-7 (theoretical limit 65 Mbit/s) and the reception of A-MSDU and A-MPDU aggregated frames. None of the optional 11n features are supported for now. MIMO, 40Mhz channels, short guard interval, etc. are left for future work. And we're not sending A-MSDU or A-MPDU frames yet either. Tested with various 11a/b/g/n access points. With some APs I'm seeing a noticable increase in throughput, especially on 5Ghz. Also, fix automatic rate selection by using the current Tx rate selected by AMRR as the upper bound for the firmware's rate table and updating the firmware's table whenever AMRR switches Tx rate, rather than setting the table just once after association and ignoring AMRR updates. ok mpi@ krw@ (earlier version), ok jasper@
2015-12-14"harware" -> "hardware"mmcc
2015-12-12Add OpenBSD Id.Reyk Floeter
2015-12-11Replace mountroothook_establish(9) by config_mountroot(9) a narrower APIMartin Pieuchot
similar to config_defer(9). ok mikeb@, deraadt@
2015-12-10Remove plain DES from the kernel crypto framework, including the cryptoChristian Weisgerber
accelerator drivers. No longer used by anything. ok sthen@ mikeb@
2015-12-10a couple comment typosmmcc
2015-12-10mark bnx_start as mpsafe.David Gwynne
tweak it to use ifq_restart so ifq_clr_oactive is serialised with start. ok jmatthew@
2015-12-09No need to check if size = az->pstream.buffer.size is zero, asAlexandre Ratchov
this is handled in audio(4) layer. From Alexey Suslikov <alexey.suslikov at gmail.com>
2015-12-09Backport some commits from mainline linux to enable High Bit Rate 2Jonathan Gray
(HBR2) for Broadwell and non-ULX Haswell DisplayPort. This enables support for 3840x2160 60Hz SST. Initial patch from and tested by Scot Doyle. drm/i915: Enable 5.4Ghz (HBR2) link rate for Displayport 1.2-capable devices from Todd Previte 06ea66b6bb445043dc25a9626254d5c130093199 drm/i915: don't try DP_LINK_BW_5_4 on HSW ULX from Paulo Zanoni 9bbfd20abe5025adbb0ac75160bd2e41158a9e83 drm/i915/dp: add missing \n in the TPS3 debug message from Jani Nikula f8d8a672f9370278ae2c9752ad3021662dbc42fd drm/i915/dp: only use training pattern 3 on platforms that support it from Jani Nikula 7809a61176b385ebb3299ea43c58b1bb31ffb8c0
2015-12-09rework the if_start mpsafe serialisation so it can serialise arbitrary workDavid Gwynne
work is represented by struct task. the start routine is now wrapped by a task which is serialised by the infrastructure. if_start_barrier has been renamed to ifq_barrier and is now implemented as a task that gets serialised with the start routine. this also adds an ifq_restart() function. it serialises a call to ifq_clr_oactive and calls the start routine again. it exists to avoid a race that kettenis@ identified in between when a start routine discovers theres no space left on a ring, and when it calls ifq_set_oactive. if the txeof side of the driver empties the ring and calls ifq_clr_oactive in between the above calls in start, the queue will be marked oactive and the stack will never call the start routine again. by serialising the ifq_set_oactive call in the start routine and ifq_clr_oactive calls we avoid that race. tested on various nics ok mpi@
2015-12-08Driver for the XenSource Platform DeviceMike Belopuhov
This is a simple driver for the virtual PCI device with only one purpose: to allocate the interrupt vector and communicate that to the Hypervisor in case the IDT callback method was not available. With input from and OK deraadt, mlarkin, reyk, mpi
2015-12-08When iwm(4) moves to AUTH state it asks the firmware for a "time event" toStefan Sperling
prevent it from moving off-channel during association. The firmware issues interrupts at beginning and end of the time event. The driver tried detecting the beginning with a tsleep() in the newstate task followed by a wakeup() from the interrupt handler. However, sometimes the newstate task did not get scheduled until the time event had already passed, and association was aborted. In rare cases the newstate task would even sleep forever and the iwm(4) interface would stop working until reboot. Fix these issues by issuing the time event and continuing association without checking for a "go" from the firmware. Our kernel does not provide the scheduling guarantees required for such precise synchronization so association is more likely to fail with the additional check than without. ok mpi@ tedu@
2015-12-08No trailers has been the default and only option for 20 years, yet someTed Unangst
drivers still set IFF_NOTRAILERS while others do not. Remove all usage of the flag from the drivers which in ancient times used it (and the modern drivers which blindly copied it from those drivers of yore). suggested by guenther. ok mpi
2015-12-08dont need to repeatedly set if_start to the same function.David Gwynne
2015-12-07enable snooping on Intel 100 Series HDAJonathan Gray
from and tested by daniel@
2015-12-07match on intel 100 seriesJonathan Gray
from and tested by daniel@
2015-12-06switch on the return value of bus_dmamap_load_mbuf not value != 0Jonathan Gray
problem in rev 1.47 spotted by clang's -Wswitch-bool ok jmatthew@ kettenis@
2015-12-05vioblk: Don't send flush ops if flush feature not presentStefan Fritsch
If we haven't negotiated the flush feature, don't send VIRTIO_BLK_T_FLUSH to the device. noticed by mlarkin@
2015-12-05make vioblk_scsi_cmd more normalStefan Fritsch
Declare all variables at the start of the function and get rid of the strangely-indented block around the second half of the function.
2015-12-05Make virtio_enqueue_commit return voidStefan Fritsch
The return value was unused
2015-12-05Make the bnx interrupt handler mpsafe, and perform rx and tx completionJonathan Matthew
outside the kernel lock. Remove tx descriptor lists (essentially backing out if_bnx.c r1.77), add an interrupt barrier in bnx_stop, check the rx ring state before receiving packets, adjust the tx counter with atomic operations, and rework bnx_start to check for ring space before dequeueing and drop the packet if bnx_encap fails. tested on BCM5708 by me and on BCM5709 by Hrvoje Popovski ok dlg@
2015-12-03tell the stack myx_start is mpsafe.David Gwynne
as per the stack commit, the driver changes are: 1. setting ifp->if_xflags = IFXF_MPSAFE 2. only calling if_start() instead of its own start routine 3. clearing IFF_RUNNING before calling if_start_barrier() on its way down 4. only using IFQ_DEQUEUE (not ifq_deq_begin/commit/rollback)
2015-12-03Rework cas_start to check for space on the ring before dequeueing and dropJonathan Matthew
the packet if encap fails, use m_defrag if the mbuf is too fragmented, adjust sc_tx_cnt using atomic operations, hold the kernel lock while calling cas_init and cas_start from the interrupt handler, use an interrupt barrier in cas_stop, and finally mark the interupt handler mpsafe. encouragement from dlg@ and kettenis@
2015-12-02Add an unmute quirk for IDT 92HD75B3/4 codecs with HP subids.Jonathan Gray
This is required to get speaker audio on the HP Elitebook 2540p. Reported and fix tested by Mike Cond.
2015-12-01Teach ppb(4) how to allocate PCI bus numbers such that it can properlyMark Kettenis
condigure bridges left unconfigured by the system firmware. Not perfect yet, but good enough to make the Apple Thunderbolt Giabit Ethernet adapter work when inserted at boot time. ok deraadt@
2015-12-01Enable the GSE interrupt on Broadwell. Fixes acpi brightness control onMark Kettenis
the MacBookPro12,1, 3rd gen Lenovo X1 Carbon (when hacked to use the standard acpi mechanism for this purpose) and probably many others. Seems this hasn't been figured out over in Linux land yet.
2015-12-01myx doesnt use atomic.h anymore.David Gwynne
2015-11-29Make it possible to detach bge(4).Mark Kettenis
ok deraadt@
2015-11-28regenMark Kettenis
2015-11-28Add a few devices found on the MacBookPro12,1Mark Kettenis
2015-11-28Rework gem_start to check that there's enough space in the ring beforeJonathan Matthew
dequeueing a packet, then drop the packet if it can't be sent, rather than using two phase dequeue then commit. Adjust sc_tx_cnt using atomic operations, take the kernel lock before calling gem_start or gem_init from the interrupt handler, and use an interrupt barrier when taking the interface down. With all this done, we can mark the interrupt handler for pci (but not sbus) attached gem(4) as mpsafe. mpi@ wrote this initially, I fixed bugs to keep sparc64 happy and kept it up to date with ifq changes. ok mpi@ dlg@
2015-11-27Don't report a bus conflict for bridges that are left (partly) unconfigured byMark Kettenis
the system firmware.
2015-11-25Network drivers should not include <net/route.h> or <net/netisr.h>Martin Pieuchot
2015-11-25replace IFF_OACTIVE manipulation with mpsafe operations.David Gwynne
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@
2015-11-24regenMark Kettenis
2015-11-24Add a few missing devices found on recent Apple hardware.Mark Kettenis
From Bryan Vyhmeister.
2015-11-24Fix inverted condition in previous.Mark Kettenis
Problem reported by Mikolaj Kucharski.
2015-11-24You only need <net/if_dl.h> if you're using LLADDR() or a sockaddr_dl.Martin Pieuchot
2015-11-24You need <netinet/ip.h> if you use "struct ip" for hw checksum.Martin Pieuchot
You never need <netinet/ip_var.h> nor <netinet/in_systm.h>.
2015-11-24No need for "vlan.h" if you don't check for "#if NVLAN > 0".Martin Pieuchot
2015-11-24No need to include <net/if_arp.h>Martin Pieuchot
This header is only needed because <netinet/if_ether.h> declares a structure that needs it. But it turns out that <net/if.h> already includes it as workaround. A proper solution would be to stop declarting "struct ether_arp" there. But no driver should need this header.
2015-11-24The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.Martin Pieuchot
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@