busdma - Remove filter functionality - Remove filtfunc and filtarg arguments from bus_dma_tag_create() and fix all callers. All callers use NULL today for both filterfunc and filterarg with one exception: if_jme. - Remove filter functionality internally and parent tag tracking. Without filter functions, we do not need to keep track of tag ancestry. All inheritance of the parent tag's parameters occurs when creating the new child tag. - rename run_filter() to addr_needs_bounce(). - FreeBSD keeps the filtfunc and filtarg arguments but requires them to be NULL. - Drop filterfunc usage from if_jme. In case of "JMC260 chip full mask revision 2", which has a hardware bug when it comes to DMA transfers crossing the 4 GB bounday, the parent buffer tag already limits DMA memory to 32bit address space. As such it should be safe to drop the filterfunc. The filterfunc was checking if the lower 32bits of the physical address used for DMA are all 0. In case of a 32bit address space, the only address where all lower 32-bits are all zero is 0 itself and I am here assuming that the physical address 0 is not used for DMA transfers! Mainly obtained from: FreeBSD (commits 7cb028de, 900907f4, 1228b93b, 3933ff56)
ath - Change the way the edma rxfifo is reset * Do not unconditionally try to reload the whole FIFO. Instead set a flag when the HAL is reset. * Force the hal to cold-reset every time for now to match the flag. * Currently a hack until a Adrian comes up with the correct fix. * TODO - Currently does not re-enable the RXEOL interrupt correctly.
ath - Basic report - Additional DragonFly compatibility work * Implement a quick and dirty if_start() as our ifp API is somewhat different. FreeBSD has a ath_transmit() (per packet), which we do not have (and do not really want). * The FreeBSD OACTIVE mechanics are completely different from ours. Rip it out and add in DFly mechanics. DFly uses OACTIVE for queue control. (not perfect but...) * Add some more wlan_serialize_*() calls that I had forgotten. * Fix a m_getcl() and several other instances where M_* flags were being used for mbuf operations (DragonFly renamed those to MB_* flags). * Fix a m_getm() call in ath_edma_rxbuf_init() to use m_getjcl(). * Fix a bug in my previous TAILQ_FOREACH_SAFE() fix, in ath_edma_recv_proc_deferred_queue(), that I introduced, and another in ath_txfrag_cleanup(). * Fix the mbuf DMA segment defragmentation code in ath_tx_dmasetup(). DragonFly has a neat call that does all the work for us. * Fix an apparent bug in ath_txq_sched() (-> adrian) * Change ATH_TXBUF and ATH_RXBUF defaults to 256. * Add missing MODULE directives in ath_dfs (null.c). * Add AR9300* support from contrib, taken from FreeBSD
ath - Basic re-port, base code compile * First re-port pass, make base code modifications to work with DragonFly. * Remove ath locks (mostly using #define's). * Protect entry points with our global wlan_serializer. This includes: - callout functions - PCI entry/exit - ifnet access (typically already protected from the DFly kernel). - taskqueue functions - sysctl functions * Rework the sysctl hierarchy a little. * Fixup malloc->kmalloc, free->kfree, snprintf->ksnprintf. * Fixup ether_sprintf() use cases. * Fixup bad M_NOWAIT semantics from FreeBSD. Convert all such to M_INTWAIT. * IFF_RUNNING and IFF_OACTIVE adjustments. * Temporarily #if 0 out code that our wlan infrastructure does not yet support. * Add appropriate DRIVER and MODULE declarations for module handling. * #include path adjustments * API differences in bus_dma_tag_create(), bus_dmamap_load_mbuf_sg(), and related interactions. * Several TAILQ_FOREACH_SAFE() interactions were broken (pushed to Adrian). * Revert field name for now (tap->txa_tid -> tap_txa_ac). We need to fixup our wlan infrastructure to rename txa_ac to txa_tid. * va_list/va_start/va_end -> __va_list/__va_start/__va_end.
wlan - if_ath driver - Make some adjustments to ath (preliminary) These adjustments correct some chip races and appear to fix issues related to running the wlan in AP mode with the atheros driver. * Fix a bug in ath_txqmove(). This bug was hidden due to a queue length check in the one place that used the routine but fix it anyway. * Call stoptxdma() before messing with the beacon linkages rather than afterwords (ap mode). I'm a bit unclear as to whether the previously installed beacon should have been allowed to continue to run if no new beacons are found. For now it isn't. * Redo the qbusy logic. The old logic had at least 2 chipset/driver races related to the link field. The new logic makes no assumptions and only reactivates the txdma if the queue is clearly idle and we are adding the first (bf) to it. Otherwise leave it to the INT_TX code to detect where the txdma stopped and restart it at the appropriate place. This bit of code needs more work as the INT_TX for tx completion may be delayed indefinitely (we might need a callout check in there too, I'm not sure). * For the moment use MB_WAIT when loading or replentishing the receive ring. There does not appear to be a proper mechanism to deal with stalls that might be created if a mbuf fails to allocate. What we really need here is proper rx ring mbuf replacement logic where the filled mbuf is NOT removed if no new mbuf can be allocated to take its place. Using MB_WAIT is a bad hack. It isn't entirely trivial due to the DMA load and the 32 bit address space restriction. * Add a few cpu_sfence()s when poking the (bf) link field. This probably isn't correct. * Cleanup, add some debugging kprintf()s for a few unexpected conditions