summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
2017-01-17Add missing malloc(9) return value check in athn_node_alloc().Stefan Sperling
ok millert@ tom@
2017-01-12Rename ieee80211_mira_node_destroy() to ieee80211_mira_cancel_timeouts().Stefan Sperling
No functional change. The previous name was chosen at a time when I could not yet anticipate what this function would really end up doing. The new name should make this function's purpose more obvious, especially where it appears at strategic places in driver code.
2017-01-12Finish initial 11n support for athn(4).Stefan Sperling
The heavy lifting was done by damien@ years ago. I didn't even have to figure out what the hardware expects, the code was already there. This driver now supports MCS 0-15 in client and hostap mode. No Tx aggregation and no 40 MHz channels yet. tested by vgross@, bmercer@, tb@, jmc@, Vadim Vygonets, Peter Kay ok bmercer@ tb@ phessler@
2017-01-08Make urtwn(4) use AMRR instead of letting the firmware handle rate scaling.Stefan Sperling
For now this only affects RTL8188EU chips, perhaps because the author of this patch does not own any devices containing any of the other chips (hint hint). Patch by misha aka Mikhail / mp39590 at gmail ok mpi@
2017-01-04better handle empty or full rx rings.David Gwynne
currently re appears to end up spinning on landisk. the most obvious cause of this would be an inability to add entries on the rx ring when we run out of mbufs. cope with this by calling rxeof from the isr when the FIFO_OVERFLOW status bit is set. rxeof in turn unconditionally tries to fill the rx ring, even if it doesnt dequeue any packets off the ring. while here limit the number of entries that can go on the rx ring to 1 less than the size of the ring. a full ring looks the same as an empty ring (cos the producer and consumer are the same in both cases), so avoid letting this happen. ok deraadt@ who hit problems on his landisk and tested this diff
2016-12-26Fix typo, happend -> happenedJeremie Courreges-Anglas
2016-12-23Define HAL_OPCODE using enum ieee80211_opmode to prevent clang from warningMark Kettenis
about an implicit enum conversion. ok stsp@
2016-12-18Add cast to mask and shift macros to silence warnings generated by clang.Mark Kettenis
ok millert@
2016-11-29m_free() and m_freem() test for NULL. Simplify callers which had their ownJonathan Gray
NULL tests. ok mpi@
2016-11-16rework re_start and re_txeof to be more like other drivers.David Gwynne
the important change is to no longer account for packets and descriptors separately, instead we just deal with available descriptors on the ring. this allows us to guarantee that oactive will only be set after re_start has queued at least one packet, which in turn guarantees that the chip will interrupt in the future and run re_txeof to clear oactive. without this change it was possible for a call of re_start to almost fill the descriptor ring, followed by a second call that could fail to post a packet because it had run out of descriptors and would then set oactive. if re_txeof ran concurrently it could complete all the previously posted packets without noticing that oactive had been set and therefore needed to be cleared. in that situation oactive would be set, but nothing would be set up to clear it in the immediate future. this fixes a lockup reported by haesbaert.
2016-11-16allocate dmamaps for every descriptor in the tx ring.David Gwynne
previously there was a limit of 64 packets on the tx ring. soon we will use as many descriptors as we want to fill the ring.
2016-11-16dont restrict the number of tx descriptors to what can fit on a cpu page.David Gwynne
2016-11-16move toward having the a tx packet descriptor per tx ring entry.David Gwynne
previously you could have 64 packets on a ring with up to 1024 descriptors. this mismatch makes the accounting for free space complicated and allows for a data race with OACTIVE being set. it will also let us push more packets.
2016-11-16serialise posts to the txstart register.David Gwynne
without this it is possible for re_txeof to let the chip look at and complete tx descriptors that re_start has written to the ring but not accounted for in the software producer index. in this situation no future interrupts may be generated for packets on the ring, and tx will stall. the serialisation is implemented by only doing the writes from tasks via ifq_serialize. this is part of a bigger diff that fixes lockups reported by haesbaert.
2016-11-15Do not use bus_space_{read,write}_8() even on LP64 archs,Martin Pieuchot
some (broken) controllers require ordered split transfers. From linux a310acd7a7ea53533886c11bb7edd11ffd61a036 Tested by gonzalo@, ok dlg@
2016-11-15Mask non relevant bits when pritting version number.Martin Pieuchot
Makes gonzalo@'s Macbookair7,1 NVMe report the correct version. ok dlg@
2016-10-25mask and unmask the interrupt source in an intx specific intr handler.David Gwynne
it seems devices using levelled intx interrupts need to explicitely ack interrupts by masking and unmasking the source around the completion ring handling. without this completions can be lost, which in turn causes long (permanent?) stalls in the block layer under heavy write load. ive experienced this problem with an intel nvme part that only has intx and msix support. because we dont support msix yet we only use intx on it. it appeared to lock up before this fix. this has been tested on both that intel board and a samsung with msi. this fix was based on work found in code by nonaka
2016-10-08Add comments explaining why athn(4) disables multi-rate retries with RTS.Stefan Sperling
ok kettenis
2016-10-08Bring receive filter handling closer to the way we do things.Mark Kettenis
From Brad Smith.
2016-10-06Disable RTS for long frames in ral(4) for rt2560 chips.Stefan Sperling
On these chips RTS causes bad performance in hostap mode for unknown reasons. Convert some debug printfs to DPRINTF. Add a comment which explains why 2 free slots are needed on the Tx queue. ok phessler@ sthen@
2016-10-02Some HABs reset parts of AHCI_PREG_CMD when AHCI_PREG_SCTL_DET_INITPatrick Wildt
gets set. Therefore, ahci_port_softreset() restores the sate of the former register once the device detection sequence is finished. The device detection code in ahci_pmp_port_portreset() does not restore AHCI_PREG_CMD afterwards, so let it catch up. Apparently, this part was an oversight as ahci_pmp_port_portreset() did not otherwise use "cmd". From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Some HBAs report NCQ capability despite only supporting one commandPatrick Wildt
slot. Thus, extend the check whether NCQ actually should be enabled accordingly. From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Given that ahci_port_alloc() grabs one CCB for use during NCQ errorPatrick Wildt
recovery from the CCB pool sized based on the NCS capability, i. e. number of command slots reported by the controller, it is necessary to pretend at least 2 slots in sc->sc_ncmds for devices without NCQ support. That way, also at least 1 available slot is made available for atascsi(4). Otherwise, controllers having only a single command slot will trigger "no free xfers on a new port" in atascsi(4). Note that pretending 2 command slots is also fine with the abuse of the NCQ error recovery CCB in ahci_port_softreset(). From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-10-02Contrary to e. g. the xHCI specification, the AHCI rev. 1.3 specPatrick Wildt
does not say anything about which type (snoopable/uncached etc.) of bus transactions are issued by HBAs on accesses to the descriptors. Thus, the right assumption would be "classical" concurrent accesses by both CPU/driver as well as hardware to the descriptors and their DMA memory backings respectively, which is also confirmed by actual testing. Consequently, switch to BUS_DMA_COHERENT mappings for said DMA memory as otherwise corruption of descriptors is seen. From Marius Strobl tested by awolk (amd64), bluhm (amd64, i386), myself (amd64, armv7) ok jmatthew@
2016-09-19Make this build again.Mark Kettenis
2016-09-19Remove unused getdev() audio driver functions.Alexandre Ratchov
2016-09-17remove unused arcofi_drain() routineAlexandre Ratchov
2016-09-15all pools have their ipl set via pool_setipl, so fold it into pool_init.David Gwynne
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
2016-09-14Remove drain(), query_encoding(), mappage() and get_default_params()Alexandre Ratchov
methods from all audio drivers and from the audio_if structure as they are never called.
2016-09-04remove some more sparc remnants. ok deraadtTed Unangst
2016-09-04naddy discovered that bha no longer builds because it includes the nowTed Unangst
deleted aha.h header. therefore bha must be dragged into the attic too.
2016-09-03de-zaurus com.cJonathan Gray
"looks correct" deraadt@ guenther@ on an earlier rev
2016-09-02No need to set 'error' to 0 at the beginning of acx_encap(), asTom Cosgrove
we're only going to set it again 10 lines later. ok mpi@
2016-09-01remove another straggler hunted down by miodTed Unangst
2016-08-31these drivers should have perished in the same fire as mvme88kTed Unangst
discovered by the ever alert mlarkin
2016-08-31Remove unnecessary 'error' assignmentTom Cosgrove
2016-08-23Convert %q to %ll in format stringsPhilip Guenther
ok natano@ krw@
2016-08-17Add support for RT5390 and RT5392 chipsets to the ral(4) driver.Stefan Sperling
Tested by procter@ on RT2860 and by me on RT2790 and RT3090. Ported from FreeBSD by James Hastings.
2016-08-17Move to iopool. No voluntary testers after several years of requests so nowKenneth R Westerback
everybody gets to test!
2016-08-17Move to iopool. No voluntary testers after several years of requests so nowKenneth R Westerback
everybody gets to test!
2016-08-17Make error handling (esp. DATA_UNDERRUN) clearer and avoid losing residKenneth R Westerback
value. Specs from mikeb@, ok dlg@
2016-08-16Only probe the UART type if sc_uarttype is set to COM_UART_UNKNOWN.Mark Kettenis
This allows glue drivers to set the type based on other information (such as Oopen Firmware or device tree properties) without going through to risky code paths. ok deraadt@, visa@
2016-08-15For some reason the RTL8211E PHY on the Banana Pi responds to both address 0Mark Kettenis
and 1. As a result rgephy(4) attaches twice. Prevent this from happening by passing the PHY address, which is part of the device tree, down from the bus-specific glue to the generic driver code.
2016-08-14change some types in bio from u_quad_t to uint64_t, and fix casts inDavid Gwynne
drivers that fill that field in too. quad types are going away.
2016-08-14replace u_quad_t with uint64_t.David Gwynne
guenther is proposing the removal of u_quad_t. uint64_t is more portable. tested on a perc5 and perc6, no functional change.
2016-08-13Add the core of the code for dwge(4), a driver for the Synopsis DesignwareMark Kettenis
GMAC core which is used on the Allwinner A20 SoCs and later SoCs in the Allwinner family. Since this core is very likely to show up the base of other devices, it gets to live here in dev/ic. Ported from NetBSD (where it is named awge(4)) by patrick@. Some further fixes by me. ok deraadt@
2016-08-10armish handled some early-gen arm machines, which required tons ofTheo de Raadt
workarounds. Some of them will soon stand in the way of armv7. Off to the attic you go.
2016-07-26Fix byteswap errors in rtwn(4) and urtwn(4) introduced by me on June 17.Stefan Sperling
Repairs urtwn(4) on macppc. Problem reported by juanfra@. ok millert@ deraadt@
2016-07-13remove unused function ether_cmp()Theo de Raadt
from tom
2016-06-17Merge a lot of code from urtwn(4) into rtwn(4). Both drivers now share codeStefan Sperling
in the file sys/dev/ic/rtwn.c. This reduces kernel bloat and will make it easier to have both drivers benefit from future enhancements. ok mpi@