What's the purpose of ath5k_rx_stop setting sc->rxlink to NULL? As Bob points out, it causes problems if it's not done while holding the rx buffer spinlock.
There's code in ath5k_intr that sets sc->rxlink to NULL, apparently to handle a chip bug. It needs to hold the spinlock as well to avoid self-linked buffers in the middle of the rx buffer list. I'm not sure this patch fixes anything, however. If reading the RXDP register is not reliable, the driver already won't work correctly. bob ==================== On Fri, Jun 11, 2010 at 11:14 AM, Bob Copeland <m...@bobcopeland.com> wrote: > On Fri, Jun 11, 2010 at 5:50 AM, Bruno Randolf <b...@einfach.org> wrote: > > Add an extra check to be sure we never process the self-linked rx > descriptor > > at the end of the list. This should not happen since in this case the > RXDP > > Here's a way this might happen frequently BTW: > > cpu 0: cpu 1: > ath5k_rx_stop > ath5k_tasklet_rx > // following not protected by rxbuf lock > sc->rxlink = NULL; /* just in case */ > // following doesn't link used > // buffer to prev. > ath5k_rxbuf_setup() > > AFAICT this can lead to lots of self-linked descriptors even in the > middle of the list. > > -- > Bob Copeland %% www.bobcopeland.com > _______________________________________________ > ath5k-devel mailing list > ath5k-devel@lists.ath5k.org > https://lists.ath5k.org/mailman/listinfo/ath5k-devel >
_______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel