From patchwork Thu Jan 28 21:25:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 8154091 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 E7C3DBEEE5 for ; Thu, 28 Jan 2016 21:34:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15C2A20142 for ; Thu, 28 Jan 2016 21:34:55 +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 395D72013A for ; Thu, 28 Jan 2016 21:34:54 +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 1aOuBn-0002Cp-SR; Thu, 28 Jan 2016 21:33:16 +0000 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aOu7T-0005st-LL for linux-arm-kernel@lists.infradead.org; Thu, 28 Jan 2016 21:28:52 +0000 Received: by mail-pa0-x232.google.com with SMTP id cy9so29201323pac.0 for ; Thu, 28 Jan 2016 13:28:27 -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=sNkEX8qvW640lfIUeBsap2kwWauXbqVxizTkIwypils=; b=hG/QLRZuqOhYeGrVY48foH9mjD7yHp8ZJUDKmLXz4Gyf6Fp1S1G2IwnQo1m6VxYxbZ 5qkZ3DH4DMZ00p8YH/Z2nHYci3PEI/rvYVmOKTqQNwDSkk/b4wZcFm15d/9m0FustQbA ITIoXu/7/qB0htOV+FmCBh2vx9O11iqYIhqXr5rFizxBTX9PX5LmzHOBG1d9Y+vh/IKn Ou9+dxIAJ2H5q7YlL2M77IcLZqMAY+6fWXqmirOET46HaHWuTgOWhcoE2+2qA9CHbL+s L+AqbShsPK0ImYKsgOGwh/5GkxND6nLL07qkODvvqDftAVdAMeauHJKvcBb5CYKNVip5 DvPQ== 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=sNkEX8qvW640lfIUeBsap2kwWauXbqVxizTkIwypils=; b=eQvkBIRWd/zIEyUODxYhGZoQ4F8LiwMTYEdmqSeubLOCLIUlgOaESjr2UqAGQtgpJK 2Bfs0iQZukx8Xws2O1VJ87k1lGvlveY1/qiR0weR1+3DOF+aVj4VxC1/UpRB5GXoPcFA KyQGdnbxxv4D+UrbOtZGo2/Cycb25QCAUpR7hwRDtCXgWyFEki1CioHBSblbNh3QmQUO OougwjNmB+WeUokjuU4b34D+MFrZKoCFdHDPLp27aLSpuYFfNL0A0Y2PES9bvPhX3ff1 RQdn1oY4vy4bdFnJFQuFj4M06AYQkAPLxi8fdy2jvflFU6crv/5zVBCQJVYtguvZf7kg 31Fg== X-Gm-Message-State: AG10YOQ31n6W2gI26yNm37EFWdWIEqKBLAz4/Xf6BsdKqQZp44jkA7gXHG8osMgA1jK95Q== X-Received: by 10.66.55.73 with SMTP id q9mr8042545pap.44.1454016506987; Thu, 28 Jan 2016 13:28:26 -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 c90sm18583190pfd.31.2016.01.28.13.28.25 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 13:28:26 -0800 (PST) From: Troy Kisky To: netdev@vger.kernel.org, davem@davemloft.net, B38611@freescale.com Subject: [PATCH net-next 11/40] net: fec: pass txq to fec_enet_tx_queue instead of queue_id Date: Thu, 28 Jan 2016 14:25:35 -0700 Message-Id: <1454016364-30985-12-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> References: <1454016364-30985-1-git-send-email-troy.kisky@boundarydevices.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160128_132848_134276_0D722720 X-CRM114-Status: GOOD ( 11.50 ) 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, linux@arm.linux.org.uk, Troy Kisky , laci@boundarydevices.com, 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 01b9740..711a8d6 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1149,25 +1149,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 */ @@ -1259,11 +1252,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; }