From: Christian Lamparter Date: Thu, 22 Jul 2010 23:51:35 +0000 (+0200) Subject: carl9170 firmware: streamline dma_put hot-path X-Git-Tag: 1.7.2~2 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=fce55bd78997d0363c1029d90e62eb1de8a5ba6d;p=carl9170fw.git carl9170 firmware: streamline dma_put hot-path 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 --- diff --git a/carlfw/src/dma.c b/carlfw/src/dma.c index 2896032..dc4d278 100644 --- a/carlfw/src/dma.c +++ b/carlfw/src/dma.c @@ -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; diff --git a/carlfw/usb/main.c b/carlfw/usb/main.c index f32efc2..d07eb25 100644 --- a/carlfw/usb/main.c +++ b/carlfw/usb/main.c @@ -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;