diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2014-07-20 11:59:13 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2014-07-20 11:59:13 +0000 |
commit | 1e0f3ef33af1826c03834c10973d19eeeb902da8 (patch) | |
tree | 0806a8c6f76354b8fa3d6a21c9f3de76797a1db0 /sys/dev/ic/bwivar.h | |
parent | 6713489079ffe59f273b6fc68745f901a16096a1 (diff) |
Always allocate bwi(4) ring descriptors below the 1GB boundary to give 30bit
devices a chance to work. Use bounce buffers for mbufs on 30bit devices.
This fixes "intr fatal TX/RX" errors that render the internal wifi on many
macppc machines unusable. However, packet loss problems remain. In my testing
the device works fine sometimes, but experiences packet loss rates of up
to 80% at other times. Still, this is a step forward.
Helpful hints from claudio@ and dlg@
Tested on macppc by mpi@ and myself
"go ahead" kettenis@, ok mpi@
Diffstat (limited to 'sys/dev/ic/bwivar.h')
-rw-r--r-- | sys/dev/ic/bwivar.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/ic/bwivar.h b/sys/dev/ic/bwivar.h index 1489e552af6..d55a72f9140 100644 --- a/sys/dev/ic/bwivar.h +++ b/sys/dev/ic/bwivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bwivar.h,v 1.29 2013/12/06 21:03:02 deraadt Exp $ */ +/* $OpenBSD: bwivar.h,v 1.30 2014/07/20 11:59:12 stsp Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -195,7 +195,7 @@ struct bwi_txstats { struct bwi_ring_data { uint32_t rdata_txrx_ctrl; - bus_dma_segment_t rdata_seg; + bus_size_t rdata_ring_sz; bus_dmamap_t rdata_dmap; bus_addr_t rdata_paddr; void *rdata_desc; @@ -556,6 +556,10 @@ struct bwi_softc { enum bwi_bus_space sc_bus_space; + /* bounce buffers for 30 bit bus space devices */ + caddr_t sc_bounce_tx_data[BWI_TX_NRING]; + caddr_t sc_bounce_rx_data; + struct bwi_txbuf_data sc_tx_bdata[BWI_TX_NRING]; struct bwi_rxbuf_data sc_rx_bdata; @@ -575,6 +579,7 @@ struct bwi_softc { int (*sc_init_rx_ring)(struct bwi_softc *); void (*sc_free_rx_ring)(struct bwi_softc *); + int (*sc_newbuf)(struct bwi_softc *, int, int); int (*sc_init_txstats)(struct bwi_softc *); void (*sc_free_txstats)(struct bwi_softc *); |