Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp3410198pxy; Mon, 26 Apr 2021 00:43:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRAAYWjflqQkUL7T+TshSI9MGUiP0E9BhwvTayvM7ol8GTE6/lr6wLfc3h8k6Lgup+7JXQ X-Received: by 2002:aa7:8103:0:b029:247:74a8:e54d with SMTP id b3-20020aa781030000b029024774a8e54dmr16507184pfi.60.1619423005992; Mon, 26 Apr 2021 00:43:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619423005; cv=none; d=google.com; s=arc-20160816; b=MOeA+Hwbhf5cVt95oBogPOpF2MBO1jWpfIS7XX/rEhhfclGtKUer99EsrnFQS04cq7 HUDQASGUxS8mengoHS7pkpEFw8iXlfr2JeFyyBXBPol5/2WyvUKFJldkKMOqGNVD4Pme MZGtjWiga6nClqpwyw3wqmN24+ifXsLkbWS0oUCePkDIjnPY5IyousyWx6CARyGUUU1U 2Gn+X9O4cF9ADuxXt5rOFXn4LxuUMUpyccIbucostJ0Rrcq1eYgguQmilhy+moW6Woag CGZvRfpB1sAzPWHl83cffLbR34F+KLyZiTjftOwYvmO3iOXKBoojI9Yz0Jct5HZnYcki YxlQ== 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=RI+oEco0ZISe5mlFAfb8vAgVin34A1U7hfUWp7kbUhI=; b=K0DMZkQw5uYuRmxAmhbx0DFZfD0P175U29MuACgzR4Td8ygBlVdp2/SI++ZC1olBBp 6yuXCou1lZyRIvWrE6M2sB6wmDGI+3nN+xiZPlCAy4zFgUOigykpBBjorP0IkbZG/Elm 5IKg116SNcVJZ4+woCv16HZ6bNVZS8J2Mo2sgto82dyvyrenLqdHpEwPF0XFxICP4Hjo pHoqzs8/xIXz5QcEKNqhy150ibY85LseCEb48XAYZQFT7cR9sIiSrA9wPKZPIS7Ql9/r dg8FKX7qusQUKV5YqAvibojLtJSpZX8IiU5QMLmuRtlSNtZ1kmYkBgb2ml6zTN7iqd6e DyUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=U8UPSFQf; 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 x13si16685324pgc.145.2021.04.26.00.43.13; Mon, 26 Apr 2021 00:43:25 -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=U8UPSFQf; 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 S232665AbhDZHnU (ORCPT + 99 others); Mon, 26 Apr 2021 03:43:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:49798 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232571AbhDZHha (ORCPT ); Mon, 26 Apr 2021 03:37:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A917613D7; Mon, 26 Apr 2021 07:35:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1619422542; bh=LOdzuD3WJUlPIfQtPBrWx+Srod6U7vS9VcjxhfKBw+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U8UPSFQfbDyh1uXLWfoqcMn1CVIIks9/1cNDRpJtb/lS3kcFzahjUOsNw8PiN32hn 8fF8ILPm1+aBaQ0y+JcTo+ROJdsusVmoG+wxkHWsf6xWLnImv6pFHJxJnMG87JogDk RYRxJ8xuEYjNhZwya1anjW61Q13Rkjp3ehAlTOZI= 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 4.14 32/49] ibmvnic: remove duplicate napi_schedule call in do_reset function Date: Mon, 26 Apr 2021 09:29:28 +0200 Message-Id: <20210426072820.813674741@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210426072819.721586742@linuxfoundation.org> References: <20210426072819.721586742@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 @@ -1431,7 +1431,7 @@ static int do_reset(struct ibmvnic_adapt struct ibmvnic_rwi *rwi, u32 reset_state) { struct net_device *netdev = adapter->netdev; - int i, rc; + int rc; netdev_dbg(adapter->netdev, "Re-setting driver (%d)\n", rwi->reset_reason); @@ -1496,10 +1496,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) netdev_notify_peers(netdev);