bce(4): Adjust RX path to avoid fatal error caused by busdma failure
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 27 Jan 2009 14:53:18 +0000 (22:53 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Tue, 17 Feb 2009 10:35:48 +0000 (18:35 +0800)
commitc36fd9eeee1db457b74f08bb1db0c56d97645410
treee79d9c0f1c8850a6d4daa8c9f3faec00a0a39dab
parent314a2fcc7f3d0c61735a1e2cc0d2dfdd1ecc9a9f
bce(4): Adjust RX path to avoid fatal error caused by busdma failure

- Create tmp busdma map for loading mbuf on RX path, so busdma map
  loading failure will not be fatal.
- Don't unload RX buffer's busdma map until we could make sure that
  new RX buffer could be loaded.
- On RX path, if error happens, we only need to reconfigure RX desc,
  so just call bce_setup_rxdesc_std().
- Make sure that sw_chain_cons and sw_chain_prod are same, else
  log error and reconfigure the RX desc indiced by sw_chain_cons.
- Utilize bus_dmamap_load_mbuf_segment().
sys/dev/netif/bce/if_bce.c
sys/dev/netif/bce/if_bcereg.h