Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2673578pxb; Mon, 19 Apr 2021 10:57:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPsrZkpQhVfa6ZhH6yGL63B4fVPV8fB6hqxCHQ1XXlvBZAvNK/AiZ8txXj2SqXlURZf8C+ X-Received: by 2002:a17:90a:5885:: with SMTP id j5mr317402pji.102.1618855027717; Mon, 19 Apr 2021 10:57:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618855027; cv=none; d=google.com; s=arc-20160816; b=WwYWknfFLraS5PX1CRfGmTtRzZH9rI/19JBVreSZO5zrZSetYArDKen03jyDHEpTwp ujZC3G7dgBYxKTFmv5cK70jZgnUgVHZeW4eaCv92Ojx/ipcHozssQc5J8c5PIXMwcAdr ifkNq51qcLleyOtC1sfa5y/sNaHYg1JUHrO6iMRc67gBEcrTVwiyWeZqCx6DtM6ToAS+ chU+N6C0TdqID0Lcove2dXhNZFuUkuGj7Mlhvr9w6DbHU9CEqV7p/hA77YwZv8O50PVF t+m+O98QvutaxKhoH0WO9VNA6csdu4gJavgfSswOSEbbb8nLQumSqdkbLYfbfVDE/f0l uDKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jyaHegQ3oWkgSAhcQEIOX47BA361A6Jp8nEWiZS6Btw=; b=nd4YDvYU028xE7JYpAz469q9zSPujIWvZlj9jjOocXTUvhEpRhebTfNT5+iVaAeXnU pZlCiKh4MLGEYNA76rAb/axMv7p9s5urZNFn/ZWB5k+advUJptwCXUAJSd7e6P/Ip9gn 1boNv01Wksx53bwTHV3+3DCV23ZVVYb7EaC5r3x7MEB02X5jpmcNpAXk6qGGiNE2ENe3 JCPYa7iSgorv694VO0JA2LUJx1x8IbL06MdKLrvwsSDqa/HZIx/5aNbwtbn2w2a8m9Lr rNbd6iF4hCHZriFb8ISWg3c+awg4LI9X2h/CY9fF6+cwXng/Vdl1ZCX+vfeYP1FukNrJ LkHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="uTK6lC/f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id na14si224346pjb.60.2021.04.19.10.56.55; Mon, 19 Apr 2021 10:57:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="uTK6lC/f"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240551AbhDSNag (ORCPT + 99 others); Mon, 19 Apr 2021 09:30:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:55300 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240895AbhDSNVb (ORCPT ); Mon, 19 Apr 2021 09:21:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8478D611CE; Mon, 19 Apr 2021 13:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618838275; bh=DA8FpMrayz3kOZYBMN+aJpgiWi+vbCdWRFsLqkh4GUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uTK6lC/f9aZfU5XWJxEnK/kFCO27V3ZCvQmwdzF41jTGnuz8OBQu0X2jYbvTzK2n9 vfz1/JMaLMhHaPDgyDc79rBYiYexszVdequLGaddMXtwma/o/chxeuWfVeM7+GDPj7 IAZ297VJtZNtpxqUzZ1zuKnwf9Go5hFOr7Msjn5U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lijun Pan , "David S. Miller" Subject: [PATCH 5.10 079/103] ibmvnic: remove duplicate napi_schedule call in do_reset function Date: Mon, 19 Apr 2021 15:06:30 +0200 Message-Id: <20210419130530.520374888@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419130527.791982064@linuxfoundation.org> References: <20210419130527.791982064@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lijun Pan commit d3a6abccbd272aea7dc2c6f984bb5a2c11278e44 upstream. During adapter reset, do_reset/do_hard_reset calls ibmvnic_open(), which will calls napi_schedule if previous state is VNIC_CLOSED (i.e, the reset case, and "ifconfig down" case). So there is no need for do_reset to call napi_schedule again at the end of the function though napi_schedule will neglect the request if napi is already scheduled. Fixes: ed651a10875f ("ibmvnic: Updated reset handling") Signed-off-by: Lijun Pan Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/ibm/ibmvnic.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1941,7 +1941,7 @@ static int do_reset(struct ibmvnic_adapt u64 old_num_rx_queues, old_num_tx_queues; u64 old_num_rx_slots, old_num_tx_slots; struct net_device *netdev = adapter->netdev; - int i, rc; + int rc; netdev_dbg(adapter->netdev, "[S:%d FOP:%d] Reset reason %d, reset_state %d\n", @@ -2087,10 +2087,6 @@ static int do_reset(struct ibmvnic_adapt /* refresh device's multicast list */ ibmvnic_set_multi(netdev); - /* kick napi */ - for (i = 0; i < adapter->req_rx_queues; i++) - napi_schedule(&adapter->napi[i]); - if (adapter->reset_reason == VNIC_RESET_FAILOVER || adapter->reset_reason == VNIC_RESET_MOBILITY) { call_netdevice_notifiers(NETDEV_NOTIFY_PEERS, netdev);