From patchwork Wed Sep 7 18:11:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivo van Doorn X-Patchwork-Id: 1128212 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p87IBidw012561 for ; Wed, 7 Sep 2011 18:11:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756067Ab1IGSLt (ORCPT ); Wed, 7 Sep 2011 14:11:49 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:39060 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755850Ab1IGSLs (ORCPT ); Wed, 7 Sep 2011 14:11:48 -0400 Received: by mail-ew0-f46.google.com with SMTP id 4so274569ewy.19 for ; Wed, 07 Sep 2011 11:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=u0XpAmIgrfp4RLWRTLBUL4hbQGTD0hUqrBO8IESGY60=; b=fZO/5n5aJHaIevYLd7+U2neWrnfSsUMUYdw8HVg6Q1HnMa2JVtJn9kWWM6ySjYh2b8 N+ZaCyxtyNG4lf+Mo6YkLQYXtqHhQ06wUMpTfbs23lSYmDTUZ6e2AMmH4Y1qM7MxXdUV MKXNSB1lUQAqVKQuOPzySO8qsSeKBCjwyTEw8= Received: by 10.14.3.193 with SMTP id 41mr2606593eeh.217.1315419108210; Wed, 07 Sep 2011 11:11:48 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id f1sm2174629eec.0.2011.09.07.11.11.46 (version=SSLv3 cipher=OTHER); Wed, 07 Sep 2011 11:11:47 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 5/5] rt2x00: Avoid unnecessary uncached Date: Wed, 7 Sep 2011 20:11:26 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.x86_64; KDE/4.4.5; x86_64; ; ) Cc: users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org References: <201109072010.04023.IvDoorn@gmail.com> <201109072010.45905.IvDoorn@gmail.com> <201109072011.04627.IvDoorn@gmail.com> In-Reply-To: <201109072011.04627.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201109072011.27532.IvDoorn@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 07 Sep 2011 18:11:54 +0000 (UTC) From: Helmut Schaa Reading the TX desciptor words from coherent memory is always uncached and potentially slow. Hence, don't read the TX descriptor prior to writing it since we update all fields anyway. Signed-off-by: Helmut Schaa Acked-by: Gertjan van Wingerde Signed-off-by: Ivo van Doorn --- drivers/net/wireless/rt2x00/rt2800pci.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 2633628..e0493fb 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c @@ -619,11 +619,11 @@ static void rt2800pci_write_tx_desc(struct queue_entry *entry, /* * Initialize TX descriptor */ - rt2x00_desc_read(txd, 0, &word); + word = 0; rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma); rt2x00_desc_write(txd, 0, word); - rt2x00_desc_read(txd, 1, &word); + word = 0; rt2x00_set_field32(&word, TXD_W1_SD_LEN1, entry->skb->len); rt2x00_set_field32(&word, TXD_W1_LAST_SEC1, !test_bit(ENTRY_TXD_MORE_FRAG, &txdesc->flags)); @@ -634,12 +634,12 @@ static void rt2800pci_write_tx_desc(struct queue_entry *entry, rt2x00_set_field32(&word, TXD_W1_DMA_DONE, 0); rt2x00_desc_write(txd, 1, word); - rt2x00_desc_read(txd, 2, &word); + word = 0; rt2x00_set_field32(&word, TXD_W2_SD_PTR1, skbdesc->skb_dma + TXWI_DESC_SIZE); rt2x00_desc_write(txd, 2, word); - rt2x00_desc_read(txd, 3, &word); + word = 0; rt2x00_set_field32(&word, TXD_W3_WIV, !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); rt2x00_set_field32(&word, TXD_W3_QSEL, 2);