Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp108209ybg; Mon, 8 Jun 2020 17:49:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/ggGvKTEthqUnbxl+g15UqcQJF6pPCR2zUMBrNyv3lBrDQYkL9sobgPvByxLga0j/FVNe X-Received: by 2002:a17:906:eb0c:: with SMTP id mb12mr21335178ejb.378.1591663775760; Mon, 08 Jun 2020 17:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591663775; cv=none; d=google.com; s=arc-20160816; b=KTO1XcZPcdxGEzqLeaiCk2LeUI4FjEEZDleaQI8oiUN8RJbMRKN+5WMcbfwLmgy/ws Ql3Lc5dt7SBcAQzHZukl8QS8CBOsJ/t1mFm6hlsbszV0a0oetvnVe5fDRgMGIGvK7WiD r7AVEmf/JS52FG831vFYAN9yrDWc2HhpXBx2OIZ4xsdW3Y0lYENIqAvPx8CY2VPJ2wk2 DjL3qhxMqgsFyNB64IK1NMug/+wvKFaqK6cyDd1mSOL3A1+lKWoYO/yXhcep+Bq2AUCz V5Jy5w+mvxg18Cd4g4Acj6qZztPb8apprVx27Eu2ZJsEEKxbMFQqzZzl2VyeYv4UiNv8 jbhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FwE0VeYu1DGwaRdCi9OpuQheciTYL+yxFmDDBjOpCBM=; b=wjJxzW39gfrHr5Mfx+QpsjNSj9w1rQXbZ9MSYCYhjDFb3uDspV3EL1PriWoUZmaJ2M FVkvUc9I38cqzZIG0XG2SM0GpSobnL1vb4VpPtw7an26stjo/owXnji1m8tmgGJck2kU c1/Ciqokk6eVfPbdyNIIK985YDef3VRX7DA0fy/ajNiuC+J57qeGlCs5ug/9JCrXJrII 5Ub1jHxWVRp1/bUAL5I1+RDLV+KczYGMsvwYxni1g0OsKYZv6ExG8S9+Pnpktn/Vv4Xn K1c6Za+jzLLPJcsGTcqLnE0Sr2zZHpx8mAeeho1TvsQG1Y3S+M/es0gj3MrQ02vlvswn kBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="DYRO/nsq"; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i8si9413363ejz.15.2020.06.08.17.49.12; Mon, 08 Jun 2020 17:49:35 -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=@kernel.org header.s=default header.b="DYRO/nsq"; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733276AbgFIApX (ORCPT + 99 others); Mon, 8 Jun 2020 20:45:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:58842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728232AbgFHXLs (ORCPT ); Mon, 8 Jun 2020 19:11:48 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89D1B20CC7; Mon, 8 Jun 2020 23:11:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657908; bh=ZOBjPwNTxWrUqyukv0mLvrQ62a6ylels/hEl/abfOe8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DYRO/nsqRMkgaHjFhOl5gtJMBRnUFQOOjShQO6tMGRGQY98thHz8hSU951rb2fr99 rfmw/gv1jZmAehPSt7I7VLXoaez3RBpa8gI9iO33MtTwsZT8R4bHGaAppM7uBDNgsE TnDUZmaoQN0kqhLd/fam+CO19qP78n0pp61jens0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jesse Brandeburg , Andrew Bowers , Jeff Kirsher , Sasha Levin , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.7 260/274] ice: Fix inability to set channels when down Date: Mon, 8 Jun 2020 19:05:53 -0400 Message-Id: <20200608230607.3361041-260-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jesse Brandeburg [ Upstream commit 765dd7a1827c687b782e6ab3dd6daf4d13a4780f ] Currently the driver prevents a user from doing modprobe ice ethtool -L eth0 combined 5 ip link set eth0 up The ethtool command fails, because the driver is checking to see if the interface is down before allowing the get_channels to proceed (even for a set_channels). Remove this check and allow the user to configure the interface before bringing it up, which is a much better usability case. Fixes: 87324e747fde ("ice: Implement ethtool ops for channels") Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ice/ice_ethtool.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index 593fb37bd59e..153e3565e313 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c @@ -3171,10 +3171,6 @@ ice_get_channels(struct net_device *dev, struct ethtool_channels *ch) struct ice_vsi *vsi = np->vsi; struct ice_pf *pf = vsi->back; - /* check to see if VSI is active */ - if (test_bit(__ICE_DOWN, vsi->state)) - return; - /* report maximum channels */ ch->max_rx = ice_get_max_rxq(pf); ch->max_tx = ice_get_max_txq(pf); -- 2.25.1