Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1951525ybl; Sun, 19 Jan 2020 15:19:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwoR91ZthsO3+JYx4yze2SM/iofMp816Fo/P5TtoFCZ1npMCFS3BeyXjqTwnUTsQEbfk7a2 X-Received: by 2002:a9d:6b91:: with SMTP id b17mr14236880otq.321.1579475947679; Sun, 19 Jan 2020 15:19:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579475947; cv=none; d=google.com; s=arc-20160816; b=rFCEUlcpSIqbLO47a0DaOFcLZSYBZLlYk/qdBsnH+ud+loSx/0HJzqAV9LAQgX+gRL 9NABV9oEEItSnJmkWc/XnRyXmND6Yl3zfDSjNzY9oamBHBDObuRbaz9iEETwPOxecKcD eVpgNKRFAb7kKOvndqj2ZHUNrEmP6fQE1kyzGmb2uqfEzGLXzlVXlZRgAukzibTdEz1d JeXsif1DQWFdj+rGM0jNFYt+yG76a+OVPuwQBFU7mm9AUdBladTf1YMJILEuQR+Waffp +KRb+GGvL26RV1bMxeC+rIJ/basADAz4WeNnQvsbIJCSZ+fCg2Eme1qGfj8nxygeVfZG aAeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:subject:from:references:in-reply-to :message-id:cc:to; bh=8P7gkU607mrR8Fgwjw87qLJjtNJtw05MPPj3lv94Sro=; b=zFwnmE1Z90LzdtGqrxaZihlucCmueE2lS6dByHVZ4kuDq1e3oHBeEDvcTclhx+H+6O dkl9igL8MeqHeGrqGgs8ZmgHPKchlzYMYEhiO4ivEMXt4JMmLqghZ38lZSB2SxkBm8ii GnFISmfaomjY8SgnJqzXb/yW+VWAnA8qCSexgKpCWL0Qv+yT4HzWkeXBshi2K1ZG+m5m myNKu8F7Idi9El3qnzRHDKTIQ7Xe0SgUKWGQcVEfn9y/MF20ZScQ4EGHxAtg0ddslBpd lGbXrsqoCL95Ov4q1O1zSdqPkAKB4a+2a+VlUNRRBIjOs3bvvBde2mXCjE0Ylegl8KsR Acew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si18988875otp.131.2020.01.19.15.18.51; Sun, 19 Jan 2020 15:19:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729485AbgASXRl (ORCPT + 99 others); Sun, 19 Jan 2020 18:17:41 -0500 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:49806 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728949AbgASXQc (ORCPT ); Sun, 19 Jan 2020 18:16:32 -0500 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 434B72997F; Sun, 19 Jan 2020 18:16:31 -0500 (EST) To: "David S. Miller" Cc: Thomas Bogendoerfer , Chris Zankel , Laurent Vivier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Message-Id: <031786f4029e93b7df05fddaed34e1faf4c89ad7.1579474569.git.fthain@telegraphics.com.au> In-Reply-To: References: From: Finn Thain Subject: [PATCH net 10/19] net/sonic: Start packet transmission immediately Date: Mon, 20 Jan 2020 09:56:09 +1100 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Give the transmit command as soon as the transmit descriptor is ready. Tested-by: Stan Johnson Signed-off-by: Finn Thain --- drivers/net/ethernet/natsemi/sonic.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/natsemi/sonic.c b/drivers/net/ethernet/natsemi/sonic.c index 6322b4543e0b..6660bd75b699 100644 --- a/drivers/net/ethernet/natsemi/sonic.c +++ b/drivers/net/ethernet/natsemi/sonic.c @@ -287,12 +287,15 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) sonic_tda_put(dev, entry, SONIC_TD_LINK, sonic_tda_get(dev, entry, SONIC_TD_LINK) | SONIC_EOL); + sonic_tda_put(dev, lp->eol_tx, SONIC_TD_LINK, ~SONIC_EOL & + sonic_tda_get(dev, lp->eol_tx, SONIC_TD_LINK)); + + SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP); + lp->tx_len[entry] = length; lp->tx_laddr[entry] = laddr; lp->tx_skb[entry] = skb; - sonic_tda_put(dev, lp->eol_tx, SONIC_TD_LINK, - sonic_tda_get(dev, lp->eol_tx, SONIC_TD_LINK) & ~SONIC_EOL); lp->eol_tx = entry; entry = (entry + 1) & SONIC_TDS_MASK; @@ -305,8 +308,6 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) netif_dbg(lp, tx_queued, dev, "%s: issuing Tx command\n", __func__); - SONIC_WRITE(SONIC_CMD, SONIC_CR_TXP); - local_irq_restore(flags); return NETDEV_TX_OK; -- 2.24.1