summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2017-04-27track size of pss allocation, so that length can be passed to free(9)Theo de Raadt
ok mlarkin
2017-04-27Restore if_iwm.c r1.173 (mira retry change) which got incarcerated byStefan Sperling
the backout police even though it wasn't responsible for anything. pointed out by tb@
2017-04-27Revert if_iwm.c to the state of r1.170 because ETOOMANYDRAGONSATONCE.Stefan Sperling
Performance regression reported by deraadt@ and uvm_fault reported by fcambus@. I will be poking further at this out of tree.
2017-04-26Get rid of convoluted macros in iwm's receive code path.Stefan Sperling
Since we now sync the entire Rx DMA buffer the SYNC_RESP_STRUCT() macro which was used to sync just parts of the buffer can be replaced by assignments. The SYNC_RESP_PTR() macro was already unused so just remove it. The ADVANCE_RXQ() macro was used just once so expand it in place.
2017-04-26Remove the size argument of iwm_rx_addbuf() and use a constant internally.Stefan Sperling
All callers were passing the same constant IWM_RBUF_SIZE, which is derived from the smallest RX buffer the hardware supports (4k). Smaller sizes don't make sense anyway and larger sizes are not on our horizon for now.
2017-04-26Tell MiRA about the actual number of retries instead of pretending thatStefan Sperling
a frame which was retried N times was retried just once. This punishes retry-heavy data rates even more and should reduce latency. It does not seem to have a noticable effect on net throughput in my testing. If this change causes throughput problems for anyone, let me know. ok tb@ mlarkin@
2017-04-24Since rev 1.1 ix has attempted to require a 64 bit BAR, the test forJonathan Gray
this was wrong and was corrected at the end of last year in rev 1.140. Before then a 64 bit BAR was not enforced as the test was wrong. It turns out there exist 82598 parts which have a 32 bit BAR so change the test to only require a memory BAR and not a 64 bit memory BAR. Problem reported by Robert Blacquiere. ok mikeb@
2017-04-24Implement monitor mode support for iwm(4).Stefan Sperling
The magic commands to capture raw 802.11 frames on e.g. channel 1 are: ifconfig iwm0 mediaopt monitor chan 1 tcpdump -n -i iwm0 -y IEEE802_11_RADIO -s 4096 -w /tmp/iwm.pcap ifconfig iwm0 -mediaopt monitor -chan
2017-04-24Implement support for multiple packets per receive DMA buffer in iwm(4).Stefan Sperling
We can now clear SINGLE_FRAME_MSK in the receive configuration register. Linux has not set this bit in years, and Dragonfly stopped setting it in commit b5eb43f0280bbcfd26af51cf5a4b8e8ff3590b67. This is a prerequisite for monitor mode since the firmware seems to ignore the SINGLE_FRAME_MSK bit while running in monitor mode and sends us garbage. Tested on 7260, 7265, and 8260 devices.
2017-04-21Make id parameter of iwm_send_cmd_pdu() a uint32_t so that it matchesStefan Sperling
the size of the corresponding id field in struct iwm_host_cmd. Patch by Imre Vadasz.
2017-04-21Fix nic lock usage around iwm_disable_rx_dma().Stefan Sperling
iwm_disable_rx_dma() was unintentionally releasing the nic lock too early. Patch by Imre Vadasz.
2017-04-21Fix nic lock usages around iwm_{read,write}_prph().Stefan Sperling
The iwm_{read,write}_prph() calls don't grab the nic lock themselves so make sure to acquire it where necessary. The iwm_{set,clear}_bits_prph() on the other hand acquire/release the nic lock themselves. Since the nic lock doesn't do recursive locking we need to be careful to avoid accidentally releasing the nic lock too early that way. Patch by Imre Vadasz.
2017-04-21Use ether_crc32_le() instead of a custom version.Martin Pieuchot
From Hiltjo Posthuma.
2017-04-20regenJonathan Gray
2017-04-20Remove an incorrect Bay Trail I2C entry that masked a valid Bay TrailJonathan Gray
PCIE entry as it used the same product id. Add another PLX/Avago/"Broadcom" PCIE bridge seen in the wild while here.
2017-04-20Tweak lock inits to make the system runnable with witness(4)Visa Hankala
on amd64 and i386.
2017-04-18Support packet aggregation for umb(4) on tx.Gerhard Roth
tested by bluhm@, ststp@ and Bryan Vyhmeister. ok bluhm@ ststp@
2017-04-18Rearrange ure_iff to resemble other drivers a bit more.Jonathan Matthew
from Brad
2017-04-16Always evaluate expression in BUG_ON() macro to avoid unused variableAlexander Bluhm
warnings. Makes non diagnostic kernel compile. OK kettenis@
2017-04-15Fix format string in ACPI_MEMDEBUG blockPhilip Guenther
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
2017-04-14Avoid some false positives with cppcheck. No binary change.Alexander Bluhm
OK jsg@
2017-04-11Partially revert previous mallocarray conversions that containDavid Hill
constants. The consensus is that if both operands are constant, we don't need mallocarray. Reminded by tedu@ ok deraadt@
2017-04-10Attempt to map msk(4) interrupt via MSI.Jonathan Gray
The device tree that ships with the overdrive 1000 has an interrupt-map property that is known to be wrong. Using MSI on msk makes the builtin Ethernet on the overdrive 1000 work. Tested on arm64 with "Marvell Yukon 88E8059" rev 0x00, Yukon-2 Optima (0x1) and i386 with "Marvell Yukon 88E8072" rev 0x10, Yukon-2 Extreme rev. B0 (0x2) Committing this early in the release cycle to try find cases where using MSI doesn't work. Based on part of an earlier patch from jmatthew@ ok jmatthew@ kettenis@
2017-04-09malloc -> mallocarray; a typoTheo de Raadt
2017-04-09Convert some malloc(9) to mallocarray(9)David Hill
ok deraadt@
2017-04-09Convert some malloc(9) to mallocarray(9)David Hill
ok deraadt@
2017-04-09Convert some malloc(9) to mallocarray(9)David Hill
ok deraadt@
2017-04-09Convert some malloc(9) to mallocarray(9)David Hill
ok deraadt@
2017-04-08Sensors are run as callbacks inside tasks. During suspend a sensorTheo de Raadt
could be running inside a driver that will be force-detached, or due to tsleep end up disrupting the softstate/hardstate contract. At suspend time, quisce all these callbacks by waiting for completion. This issue has never been observed for real, but may be implicated in suspend/resume failures. ok kettenis guenther mlarkin
2017-04-08Use ADDR64 opcodes to specify 64bit DMA addresses for all buffers. ThisJonathan Matthew
consumes two ring entries per segment, halving the effective size of the rings, but keeps things simple. This is required for the onboard nic on the Overdrive 1000 to work. ok kettenis@, tested on i386 by jsg@
2017-04-08A pile of sizes to free(9). In test for a few days in snapshots.Theo de Raadt
Errors will result in nice clean panic messages so we know what's wrong. Reviewed by dhill visa natano jsg.
2017-04-08Two prototypes for acpi_maptable; merge to one placeTheo de Raadt
2017-04-07Simplify the size calculation for memset()Philip Guenther
From Anton Lindqvist (anton.lindqvist(at)gmail.com)
2017-04-06Sizes for the remaining free() calls, and use mallocarray()Theo de Raadt
ok visa
2017-04-06remove stray character in previous that broke the buildJonathan Gray
2017-04-06Unify a few attach-time patterns between usb *com drivers, and removeTheo de Raadt
extra zero'ing of variables not needed because softc is pre-zero'd. ok jsg
2017-04-06add sizes to free() callsTheo de Raadt
ok dhill
2017-04-053 more mallocarray() usesTheo de Raadt
2017-04-04add a free() size near microcode loadingTheo de Raadt
2017-04-04Add 8265 and 3168 support. Both cards need new firmware files which currentlyClaudio Jeker
need to be installed by hand until the iwm-firmware package has been updated. This includes handling (by ignoring) of IWM_UCODE_TLV_FW_MEM_SEG and IWM_DEBUG_LOG_MSG firmware commands. Mostly stolen from dragonflybsd. With this in the X270 has working ethernet and wifi. Commit! deraadt@
2017-04-03provide size to free(9)Theo de Raadt
2017-04-02normalize order of arguments to if ()Theo de Raadt
2017-03-30these free() size choices appear to be wrong. joel has a diff that fixesTheo de Raadt
them, but for release let's be conservative and use 0.
2017-03-30Use m_devget(9) to replace code that does more or less the same but assumesMark Kettenis
the received packet fits in a single mbuf cluster, which isn't necessarily the case. This might fix the pool corruption seen by jcs@. ok jcs@, jmatthew@, deraadt@
2017-03-29Fix iwi(4) regressions. WPA was broken since 6.0 errata 018.Stefan Sperling
Also, the firmware was rejecting RTS frames so iwi(4) didn't work against an OpenBSD athn(4) hostap anymore; fix the config sent to firmware. Prompted by report from bg2200 at jamesjerkinscomputer on misc@ ok deraadt@
2017-03-29Remove quirks for two devices that are known to be CDC ACM protocol 0Jonathan Gray
that are now covered by the generic class matching.
2017-03-29Match on class communications subclass abstract control model protocolJonathan Gray
0 "No class specific protocol required" in addition to the existing protocol 1 "AT Commands: V.250 etc" match. This lets umodem(4) attach to the serial console on the overdrive 1000 which is a usb type-b socket on the back of the box not a db9 like the overdrive 3000.
2017-03-28Make set_params() return the rate the device is using. FixesAlexandre Ratchov
a wrong rate being reported when a unsupported rate was requested.
2017-03-28Simplify rate/channels/bits bounds checking code. FromAlexandre Ratchov
Michael W. Bombardieri <mb at ii.net>. Thanks.
2017-03-28Add quirk for MacBook Pro 5,5. From Manav Rathi <mnvrth at gmail.com>.Alexandre Ratchov
Thanks!