On Tue, Jan 10, 2012 at 6:24 AM, Kim Lidström <dex...@lacto.se> wrote:
>
>> hi, also did you get some trace with netconsole
>
> No I didn't. netconsole didn't want to sent any messages related to
> ath. But if you wish to elaborate what you said about typing out the
> dmesg levels I can definitely try that!
>
> I got my USB to Serial adapters today! I'm just waiting for the null
> modem now :)
>
> And I will try that patch too!

if  we very much suspect the rx path, attache is a debug patch where
we can find out why bf is NULL.  we should not get 'b'f NULL when are
doing a good amount of rx, other wise not an issue

>



-- 
shafi
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 0e666fb..508f611 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -145,8 +145,10 @@ static bool ath_rx_edma_buf_link(struct ath_softc *sc,
 	struct ath_buf *bf;
 
 	rx_edma = &sc->rx.rx_edma[qtype];
-	if (skb_queue_len(&rx_edma->rx_fifo) >= rx_edma->rx_fifo_hwsize)
+	if (skb_queue_len(&rx_edma->rx_fifo) >= rx_edma->rx_fifo_hwsize) {
+		printk("\nrx_fifo > rx_fifo_hwsize!! %s", __func__);
 		return false;
+	}
 
 	bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
 	list_del_init(&bf->list);
@@ -172,7 +174,7 @@ static void ath_rx_addbuffer_edma(struct ath_softc *sc,
 	u32 nbuf = 0;
 
 	if (list_empty(&sc->rx.rxbuf)) {
-		ath_dbg(common, QUEUE, "No free rx buf available\n");
+		printk("\nNo free rx buf available %s", __func__);
 		return;
 	}
 
@@ -668,8 +670,10 @@ static bool ath_edma_get_buffers(struct ath_softc *sc,
 	int ret;
 
 	skb = skb_peek(&rx_edma->rx_fifo);
-	if (!skb)
+	if (!skb) {
+		printk("\nskb_peek returns NULL skb %s", __func__);
 		return false;
+	}
 
 	bf = SKB_CB_ATHBUF(skb);
 	BUG_ON(!bf);
@@ -679,6 +683,8 @@ static bool ath_edma_get_buffers(struct ath_softc *sc,
 
 	ret = ath9k_hw_process_rxdesc_edma(ah, NULL, skb->data);
 	if (ret == -EINPROGRESS) {
+
+		printk("\ndescriptor status info not yet updated %s", __func__);
 		/*let device gain the buffer again*/
 		dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
 				common->rx_bufsize, DMA_FROM_DEVICE);
@@ -687,6 +693,8 @@ static bool ath_edma_get_buffers(struct ath_softc *sc,
 
 	__skb_unlink(skb, &rx_edma->rx_fifo);
 	if (ret == -EINVAL) {
+
+		printk("\ncorrupt descriptor %s", __func__);
 		/* corrupt descriptor, skip this one and the following one */
 		list_add_tail(&bf->list, &sc->rx.rxbuf);
 		ath_rx_edma_buf_link(sc, qtype);
@@ -717,8 +725,11 @@ static struct ath_buf *ath_edma_get_next_rx_buf(struct ath_softc *sc,
 
 	while (ath_edma_get_buffers(sc, qtype));
 	skb = __skb_dequeue(&rx_edma->rx_buffers);
-	if (!skb)
+
+	if (!skb) {
+		printk("\nskb is NULL dequeued from rx_buffers %s", __func__);
 		return NULL;
+	}
 
 	bf = SKB_CB_ATHBUF(skb);
 	ath9k_hw_process_rxdesc_edma(sc->sc_ah, rs, skb->data);
_______________________________________________
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

Reply via email to