carl9170 firmware: streamline dma_put hot-path
authorChristian Lamparter <chunkeey@googlemail.com>
Thu, 22 Jul 2010 23:51:35 +0000 (01:51 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Thu, 22 Jul 2010 23:51:35 +0000 (01:51 +0200)
This patch restores the original code-path in dma_put.
It no longer tries to correct the control flags for
all dma transfers.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/src/dma.c
carlfw/usb/main.c

index 28960326f2f1c742358d9510a101fd1bfaf56849..dc4d2785ac4175fd1ca93cda5c29eba89ba59d63 100644 (file)
@@ -212,9 +212,6 @@ void dma_put(struct dma_queue *q, struct dma_desc *desc)
 
        tmpDesc = desc;
 
-       /* force correct CTRL_BITS */
-       tmpDesc->ctrl = 0;
-       tmpDesc->ctrl |= AR9170_CTRL_FS_BIT;
        while (1) {
                /* update totalLen */
                tmpDesc->totalLen = desc->totalLen;
@@ -229,9 +226,7 @@ void dma_put(struct dma_queue *q, struct dma_desc *desc)
                        break;
 
                tmpDesc = tmpDesc->nextAddr;
-               tmpDesc->ctrl = 0;
        }
-       tmpDesc->ctrl |= AR9170_CTRL_LS_BIT;
 
        /* 2. Next address of Last TD to be added = first TD */
        desc->lastAddr->nextAddr = desc;
index f32efc2a9a0f15aaea30a1b858d21336c3c18701..d07eb25272c7ee3fc1dc54a9be4e5300ce74928a 100644 (file)
@@ -152,6 +152,7 @@ static void usb_status_in(void)
                goto reclaim;
        }
 
+       fw.usb.int_desc->ctrl = AR9170_CTRL_FS_BIT | AR9170_CTRL_LS_BIT;
        fw.usb.int_desc->totalLen = tlen;
        fw.usb.int_desc->dataSize = tlen;