Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933274AbcDYSKI (ORCPT ); Mon, 25 Apr 2016 14:10:08 -0400 Received: from 78.218.17.109.rev.sfr.net ([109.17.218.78]:55042 "EHLO electric-eye.fr.zoreil.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932989AbcDYSKF (ORCPT ); Mon, 25 Apr 2016 14:10:05 -0400 X-Greylist: delayed 72240 seconds by postgrey-1.27 at vger.kernel.org; Mon, 25 Apr 2016 14:09:57 EDT Date: Mon, 25 Apr 2016 00:05:29 +0200 From: Francois Romieu To: Florian Westphal Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jay Cliburn , Chris Snook Subject: Re: [PATCH net-next 2/6] atl1c: remove private tx lock Message-ID: <20160424220529.GA29377@electric-eye.fr.zoreil.com> References: <1461526694-11367-1-git-send-email-fw@strlen.de> <1461526694-11367-3-git-send-email-fw@strlen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461526694-11367-3-git-send-email-fw@strlen.de> X-Organisation: Land of Sunshine Inc. User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1057 Lines: 32 Florian Westphal : [...] > diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c > index d0084d4..a3200ea 100644 > --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c > +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c [...] > @@ -2217,16 +2215,10 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb, > } > > tpd_req = atl1c_cal_tpd_req(skb); > - if (!spin_trylock_irqsave(&adapter->tx_lock, flags)) { > - if (netif_msg_pktdata(adapter)) > - dev_info(&adapter->pdev->dev, "tx locked\n"); > - return NETDEV_TX_LOCKED; > - } > > if (atl1c_tpd_avail(adapter, type) < tpd_req) { > /* no enough descriptor, just stop queue */ > netif_stop_queue(netdev); > - spin_unlock_irqrestore(&adapter->tx_lock, flags); > return NETDEV_TX_BUSY; > } > Play it safe and keep the implicit local_irq_{save / restore} call ? It may not be needed but it will help avoiding any unexpected regression report pointing at the NETDEV_TX_LOCKED removal change. -- Ueimor