summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2014-07-08bus_dmamap_sync the rx ring once per em_rxeof call, rather than for everyDavid Gwynne
rx descriptor. slightly tweak by matthew tested on alpha and amd64
2014-07-08in em_rxeof, when the ifp stack var is declared its initted to theDavid Gwynne
right value out of the softc. then its assigned the same value again after the rest of the var decls. well, it used to be. not after this commit.
2014-07-08em_rxeof is only called from em_intr, and only if IFF_RUNNING isDavid Gwynne
set. em_rxeof doesnt have to check that flag again.
2014-07-07if em encounters a heavilty fragmented packet, it can (will) stall theDavid Gwynne
entire tx path. if we try to bus_dmamap_load a very fragmented packet m_defrag it and try again. this is just like if_bge.c r1.355.
2014-07-07Don't print warnings for mouse interrupts on bsd.rdAlexandr Shadchin
request and ok deraadt
2014-07-06If we find a bogus interrupt (undefined polarity or trigger) don't panic butMark Kettenis
print a message and ignore the interrupt. There are BIOSen out there with random garbage in NMI entries for the non-BP CPUs.
2014-07-06drm/radeon: avoid segfault on device open when accel is not working.Jonathan Gray
From Jerome Glisse 16d30071c6cd4b72a950d265b0d7d08fb4220b92 in ubuntu 3.8 24f47acc78b0ab5e2201f859fe1f693ae90c7c83 in mainline linux
2014-07-06drm/radeon: handle non-VGA class pci devices with ATRMJonathan Gray
From Alex Deucher 6a6170926060797bdf25e5d6609a3168466f2e6c in ubuntu 3.8 d8ade3526b2aa0505132c404c05a38b73ea15490 in mainline linux
2014-07-06drm/radeon: also try GART for CPU accessed buffersJonathan Gray
From Christian Koenig 72568eb7e4e40096fd80c7c8abd04ac630e45bb9 in ubuntu 3.8 544092596e8ac269f70e70961b5e9381909c9b1e in mainline linux
2014-07-03Get clocks from Open Firmware on macppc and sparc64.Mark Kettenis
ok jsg@
2014-07-03sending a heavily fragmented packet will cause the bus_dmamap_loadDavid Gwynne
in bge_encap to fail because the dmamap lacks space, not necessarily because the ring is full. however, bge_encap failure sets the OACTIVE flag on the interface and keeps the packet at the start of the send queue. the next time we try to fill the tx ring we'll try to load the same packet and fail. an empty tx ring means bge_txeof hasnt got anything which is where the OACTIVE condition is cleared. this diff adds handling of fragmented packets via m_defrag. this might fix the issues landry@ has been complaining about on his bulk build machines. i can reproduce the above problem in contrived circumstances here and this diff fixes it, so its going in so landry@ is forced to test it.
2014-07-02Use real parameter types for u{dv,vn}_attach() instead of void *Matthew Dempsky
ok guenther
2014-07-01Adding an additonal delay after each access to SystemMemory or SystemIOMark Kettenis
during autoconf makes no sense. ok deraadt@
2014-06-28Add the userland facing drm header for nouveau.Jonathan Gray
This is required by the generic loader code in newer versions of Mesa even when we aren't building any nouveau drivers. The way these headers are used on Linux is with a kernel version and a libdrm version which are largely identical with the *_drm.h headers always installed by libdrm when libdrm is built with autoconf. In OpenBSD we have a single version of the _drm.h headers that are shared by the kernel and userspace and have our own simple Makefile for the libdrm build.
2014-06-27Standardize xfer byte counts to ssize_t rather than a mix of size_t and intMiod Vallat
(we need to make them signed to spot controller overruns), and fix format strings accordingly. While there, make sure every runtime printf is prefixed by either the complete target information, if available, or at least the driver name with the proper instance number - supported systems with > 1 wdsc are quite common.
2014-06-26fix format string when compiled with VIRTIO_DEBUGJasper Lievisse Adriaanse
ok sf@
2014-06-26Work around compatibility problems with Intel ahci and Intel SSDs by retryingJonathan Matthew
device detection if the port is still busy after our normal timeout. based on a diff by chris@, based on a change in dragonflybsd tested by Peter J Philipp ok dlg@
2014-06-25So it turns out that there is AML out there that asks for an accessMark Kettenis
width that isn't compatible with the alignment of the region: OperationRegion (SATC, SystemMemory, 0xE008800A, 0x04) Field (SATC, DWordAcc, NoLock, Preserve) { STCL, 16 } DWordAcc means 4-byte access, but 0xE008800A is only 2-byte aligned. Moreover, the region itself is 4 bytes long. From this I conclude that 4-byte wide access to a 2-byte aligned address is really wanted in cases like this. ok deraadt@
2014-06-25If the Embedded Contoller device has a _STA method, evaluate it and bail outMark Kettenis
early during attach if it signals that the device isn't present. Reduces the noise on machines where the AML provides an (incomplete) description of the Embedded Controller but doesn't actually have one. ok mlarkin@, deraadt@
2014-06-23SystemMemory is used to access memory mapped registers on some machines, so weMark Kettenis
must use the bus_space(9) API to access it instead of memcpy(9). Also make sure we properly align access to fields that need more than byte alignment. ok guenther@
2014-06-21drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc()Jonathan Gray
From Egbert Eich 9e68a1156da093385f057b9e4576652203f1248e in ubuntu 3.8 7f1950fbb989e8fc5463b307e062b4529d51c862 in mainline linux
2014-06-21drm/radeon/si: make sure mc ucode is loaded before checking the sizeJonathan Gray
From Alex Deucher eed35bff1fe05f3a32989ace86107a1402f18537 in ubuntu 3.8 8c79bae6a30f606b7a4e17c994bc5f72f8fdaf11 in mainline linux
2014-06-21drm/radeon: memory leak on bo reservation failure. v2Jonathan Gray
From Quentin Casasnovas 2b9149f17e7135c31c9df1c80ab6d912c4265126 in ubuntu 3.8 74073c9dd29905645feb6dee03c144657a9844cd in mainline linux
2014-06-21remove useless brace block; from dhillTheo de Raadt
2014-06-20sf@ pointed out that atom.c defines a DEBUG macro that takes arguments,Jonathan Gray
this breaks when compiling a kernel with DEBUG defined for additional printfs elsewhere. Instead of renaming the macro, undefine DEBUG before the new definition to minimise the diff the linux.
2014-06-19drm/i915: fix lane bandwidth capping for DP 1.2 sinksJonathan Gray
DP 1.2 compatible displays may report a 5.4Gbps maximum bandwidth which the driver will treat as an invalid value and use 1.62Gbps instead. Fix this by capping to 2.7Gbps for sinks reporting a 5.4Gbps max bw. Also add a warning for reserved values. From Imre Deak d4eead50eb206b875f54f66cc0f6ec7d54122c28 in mainline linux One of two backported commits to prevent a black screen on a Lenovo IdeaPad Yoga 2 Pro as reported/debugged by Steven Wilson.
2014-06-19drm/i915: kill intel_dp_link_clock()Jonathan Gray
Use drm_dp_bw_code_to_link_rate insead. It's the same thing, but supports DP_LINK_BW_5_4 and is also used by the other drivers. From Paulo Zanoni 9fa5f6522e6eecb5ab20192a264a29ba4f2f4e85 in mainline linux One of two backported commits to prevent a black screen on a Lenovo IdeaPad Yoga 2 Pro as reported/debugged by Steven Wilson.
2014-06-17Add a configurable workaround for a bug in qemu < 2.0 that prevented VLANsStefan Fritsch
from working.
2014-06-17whitespace fix.David Gwynne
im sick of fixing this by hand on all my boxes while hacking on other stuff and having it pollute my diffs. no functional change.
2014-06-17Revise previous: if a user calls STRIOCGETCWD two or more times in a rowPhilip Guenther
without an intervening STRIOCRESCWD, release the current values instead of the saved values, so as to effectively emulate a STRIOCRESCWD. While here, make sure the fdc->fd_[cr]dir members are updated before vrele()ing their old values, so that they can't be caught as dangling refs. ok matthew@
2014-06-17ansi function declarations.David Gwynne
ok gcc sha256
2014-06-15Fix vnode leak in systrace(4).Matthew Dempsky
If a user calls STRIOCGETCWD two or more times in a row without an intervening STRIOCRESCWD, then the references held on fst->fd_{c,r}dir would leak. ok miod
2014-06-15Fix a few format string bugs with -DDEBUGStefan Fritsch
2014-06-15Fix hang with virtio event_idx featureStefan Fritsch
When using the RING_EVENT_IDX feature, we must first call publish_avail_idx() and then read VQ_AVAIL_EVENT(vq), or there is a race condition that may cause us to miss that the host needs to be notified. This resulted in an occasional hang of network in vio(4).
2014-06-15Decode ModR/M for 32-bit MOVSX instruction.Paul Irofti
Heads-up from Xen Li (delphij@FreeBSD), thanks! Tested on Sony VGN-P530H. Okay mlarkin@, matthieu@
2014-06-15Fix 0x67 prefixed LEA instruction.Paul Irofti
Heads-up from Xen Li (delphij@FreeBSD), thanks! Tested on Sony VGN-P530H. Okay mlarkin@, matthieu@
2014-06-15Fix 0x67 prefixed near CALL decoding.Paul Irofti
Heads-up from Xen Li (delphij@FreeBSD), thanks! Tested on Sony VGN-P530H. Okay mlarkin@, matthieu@
2014-06-14Change return value of getentropy() to int 0 for success. MaximumTheo de Raadt
buffersize is enforced strictly, this supplies sufficient entropy payload to act as seed material. Discourage general use of this API, but lock down this function name as the go-to for userland PRNG seeding. Improve documentation. ok miod matthew
2014-06-13Make run(4) attach to RT5572.Stefan Sperling
Tested with "MAC/BBP RT5592 (rev 0x0222), RF RT5592 (MIMO 2T2R)" device.
2014-06-13regenStefan Sperling
2014-06-13Add USB device ID of Ralink RT5572. Found in a TP-LINK TL-WDN3200 device.Stefan Sperling
2014-06-13Add new getentropy() system call. Code and pressure from matthew.Theo de Raadt
I accepted that he's right (again) to seperate this out from heavy sysctl API and this will simply a variety of things. Functionname is not used by anyone in the ports tree, so we guess we can use it. Shocking that no application has a function called this. ok matthew & others who pushed him to start this early on
2014-06-11Reject negative file offsets in /dev/ksyms.Matthew Dempsky
ok deraadt, kettenis
2014-06-11em(4) receives jumbos by chaining its MCLBYTES sized descriptorsDavid Gwynne
together, so to receive a full 9000 byte frame, it needs 5 descriptors. its current mclgeti low watermark is 4. it appears that the chip will block if it has rxed a packet into its internal buffers waiting for descriptors. if you're at the lwm, that means you're DoSed. this raises the lwm so we can get at least two jumbos, ie, 10 descriptors. ok deraadt@
2014-06-07In run(4), fix TXWI and RXWI offset calculations for RT5592 devices.Stefan Sperling
Makes RT5592 devices work, except for an 11a scanning issue, according to Brendan MacDonell who submitted this patch on tech@. Thanks! ok claudio@
2014-06-07Document bwi(4) interrupt error flags by using named constantsStefan Sperling
instead of magic numbers. Constants found in Linux brcmsmac. ok claudio@
2014-06-04Clearing the data toggle bit only makes sense for endpoints that use it,Martin Pieuchot
since this function is optional get rid of the no-op ones. ok ratchov@
2014-06-04Use C99 initializers for pipe and bus methods.Martin Pieuchot
Apart from improving readability, this will help us reduce the number of no-op functions now that some of them are optional. ok ratchov@
2014-06-04Properly compare endpoint addresses: ignore the direction bit whichAlexandre Ratchov
is not part of the address. From Remco <remco at d-compu.dyndns.org>, thanks! ok mpi@
2014-06-03Make zyd(4) compile with ZYD_DEBUG.Stefan Sperling
ok krw@ kettenis@ mpi@