From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Russkikh Subject: Re: [PATCH net-next 1/5] net: aquantia: Ethtool based ring size configuration Date: Fri, 1 Jun 2018 12:19:33 +0300 Message-ID: References: <7b86f8ec337f9c27a362c5a0a5c306928b07b04e.1527596210.git.igor.russkikh@aquantia.com> <20180529120403.3f89a394@cakuba> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "David S . Miller" , netdev@vger.kernel.org, David Arcari , Pavel Belous , Anton Mikaev To: Jakub Kicinski Return-path: Received: from mail-by2nam03on0087.outbound.protection.outlook.com ([104.47.42.87]:54880 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750790AbeFAJTq (ORCPT ); Fri, 1 Jun 2018 05:19:46 -0400 In-Reply-To: <20180529120403.3f89a394@cakuba> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: >> + >> + spin_lock(&aq_nic->aq_spinlock); >> + >> + if (netif_running(ndev)) >> + dev_close(ndev); > > I don't think you can hold a spinlock around dev_close()/dev_open() > calls. Thanks Jakub, think you are right, will consider changing this lock to mutex. >> + if (!netif_running(ndev)) >> + err = dev_open(ndev); > > Will this not open the device regardless if it was open before or not? Correct, thanks! BR, Igor