From patchwork Thu Feb 25 00:36:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8415471 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5BCBBC0553 for ; Thu, 25 Feb 2016 00:42:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6553620274 for ; Thu, 25 Feb 2016 00:42:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90D022026F for ; Thu, 25 Feb 2016 00:42:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYjzb-0008JD-Gy; Thu, 25 Feb 2016 00:41:19 +0000 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aYjyt-0007zm-Ob for linux-arm-kernel@lists.infradead.org; Thu, 25 Feb 2016 00:40:36 +0000 Received: by mail-pa0-x236.google.com with SMTP id fy10so21760747pac.1 for ; Wed, 24 Feb 2016 16:40:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PTVk+rR67RWo06xD3Jh/Vc4ca5a1rbV354PAGymVARU=; b=N0CRAf+wI0AO/W5c0Rwu7g6grAPIuMcuUfTvHxIW+Bj/aS620YW4iloQ/+yPJASU6w imLUjA8+lHnTFr14d5FgbKruWj+TECPPcSMgffwVyiudu51zgUl3E9unAvwlMGPDTS+i hocxWfcwx3/7JhTaR2RrM5qGIcOSK14Bcbim1rIpkBUUI255G1UCD3g3VsvkVrOaNYtB noDuQikwFYDuDgm91fB5YaoECfAc20td2SGOVsB/S3Nl0H2jhXJ86twJ8Mzr1KYsBILB 0SHTT0ujEAitbYyGDC3yVM9eNNbrzD/ljJQW8/twRtcHyJkxTMwaZMED1r5LSgG/C3QP UhKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PTVk+rR67RWo06xD3Jh/Vc4ca5a1rbV354PAGymVARU=; b=N5kDHA4/2mljHkhkfNzz/d+SFt9jxJAopsfOUI0f03CAKm36JiGFddhfM7hHXZfb7I 5v+mtpmDTrw3+1hiWZZqmMaT7K9K8TDtPs9wxhcwP6jEYg60/f1nLnzpfuwfZGySmdli 5c0VLPrM9c2eWXvR4sKmcNyF6wsHOfz6Uayo7G5u1gov9TaXtr71FgYoID/4I4sbbGmN 81IJARC7iesZEuZPonvNtvYHzE32W6cOuURAyyjjybCbPFMS39k4Srf5BebghJwe5Ucp n/SpAY61IC/H9fwKVieotSEwbSSFkp+gv8v1JKppJwlZW/mbdnziUph8XNK+CyqN9yYZ XFdw== X-Gm-Message-State: AG10YOQzzmiLOspXTEe/YW5pKmnDZXIcbuBgghGoc+F0/8oOBR0umFEe4I1YqFEbYJVeZg== X-Received: by 10.66.90.199 with SMTP id by7mr58843701pab.113.1456360816194; Wed, 24 Feb 2016 16:40:16 -0800 (PST) Received: from localhost.localdomain (wsip-70-184-93-199.ph.ph.cox.net. [70.184.93.199]) by smtp.googlemail.com with ESMTPSA id 79sm7561982pfr.22.2016.02.24.16.40.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 24 Feb 2016 16:40:15 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next V2 03/16] net: fec: pass txq to fec_enet_tx_queue instead of queue_id Date: Wed, 24 Feb 2016 17:36:46 -0700 Message-Id: <1456360619-24390-4-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1456360619-24390-1-git-send-email-troy.kisky@boundarydevices.com> References: <1456360619-24390-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160224_164035_903088_C916C4BD X-CRM114-Status: GOOD ( 12.34 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: fabio.estevam@freescale.com, andrew@lunn.ch, stillcompiling@gmail.com, linux@arm.linux.org.uk, arnd@arndb.de, sergei.shtylyov@cogentembedded.com, Troy Kisky , laci@boundarydevices.com, johannes@sipsolutions.net, l.stach@pengutronix.de, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org, tremyfr@gmail.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP queue_id is the qid member of struct bufdesc_prop. Signed-off-by: Troy Kisky --- drivers/net/ethernet/freescale/fec_main.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index 9619b9e..c517194 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1156,25 +1156,18 @@ fec_enet_hwtstamp(struct fec_enet_private *fep, unsigned ts, hwtstamps->hwtstamp = ns_to_ktime(ns); } -static void -fec_enet_tx_queue(struct net_device *ndev, u16 queue_id) +static void fec_txq(struct net_device *ndev, struct fec_enet_private *fep, + struct fec_enet_priv_tx_q *txq) { - struct fec_enet_private *fep; struct bufdesc *bdp; unsigned short status; struct sk_buff *skb; - struct fec_enet_priv_tx_q *txq; struct netdev_queue *nq; int index = 0; int entries_free; - fep = netdev_priv(ndev); - - queue_id = FEC_ENET_GET_QUQUE(queue_id); - - txq = fep->tx_queue[queue_id]; /* get next bdp of dirty_tx */ - nq = netdev_get_tx_queue(ndev, queue_id); + nq = netdev_get_tx_queue(ndev, txq->bd.qid); bdp = txq->dirty_tx; /* get next bdp of dirty_tx */ @@ -1268,11 +1261,13 @@ static void fec_enet_tx(struct net_device *ndev) { struct fec_enet_private *fep = netdev_priv(ndev); + struct fec_enet_priv_tx_q *txq; u16 queue_id; /* First process class A queue, then Class B and Best Effort queue */ for_each_set_bit(queue_id, &fep->work_tx, FEC_ENET_MAX_TX_QS) { clear_bit(queue_id, &fep->work_tx); - fec_enet_tx_queue(ndev, queue_id); + txq = fep->tx_queue[FEC_ENET_GET_QUQUE(queue_id)]; + fec_txq(ndev, fep, txq); } return; }