Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp961277yba; Mon, 1 Apr 2019 22:29:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZV8J5pMD6YVhDAMp5X2mJ0FYJUWR9jRN5kl+fPGzfNz/UPrjruxkUIXclD975qwzKY3O8 X-Received: by 2002:a62:19c3:: with SMTP id 186mr65791769pfz.172.1554182983147; Mon, 01 Apr 2019 22:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554182983; cv=none; d=google.com; s=arc-20160816; b=bJOVj1IFHW0ipGqI69b8nJjN+9Lbj/3FtYWEVfxl4icoI54TNvtJrky7xq+DtLlKVU 3ohh4Txg7GJhCwbdoOCpgXOcgKHruYmfF7iFQqQilNYzHNq6D4vc9JNiwneOYfrGU302 3jpTkAv+zAKyyYz0cUOIiV7LKryJu+HBhlaldqaSIyhXoyBWuvvQbX3A9t7mWs46Sg44 LYf+0IAosKktIwcTW3umwKMd+qq//f8+v1RE968/4euPydI67815FfMKXLUqZyiKPm6r Iz1X0NSewrZ4MjawShoRVak/76xDhIQt3JBH0vcIFznmIfklM8T/TLJn1e5xlT5+L8Sa k7aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=LzWcnxzOpXEJKhyFicUoT3iXchrXHoNzL1460F4wetc=; b=QtcD/9knXWUkmk8csdegUmwiyBhgyY/Z42fzxj0GAGIMhdpAeH/LD4olnwV/QtYUwd zvKh5SbeTXP1mbOEuMimWg4rvdV/kgF4vrgIF3jPkZwC6NsNPTwn1biYAlz59udGb4nq XE7p+5sctAoofS8XJgbHPASXTNSGJMf/T/B52u7kE/TyL8optWYR/NqfmsL0F6V9HyQR /1RmVs2cB5lQw/9lgeJAVfTGoKtYoC+tLcRmk7hjo5TzKdxXOOqkRKVLALMRKve6yzQv FH6jOqboNMUdfefRzGTZxagN9gfZw7MgjVUuBCSmE969qnGZEB2ssTR1BYgm2otaWaJ1 CJKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o16si9337753pgj.392.2019.04.01.22.29.27; Mon, 01 Apr 2019 22:29:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728967AbfDBFJk (ORCPT + 99 others); Tue, 2 Apr 2019 01:09:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59696 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726591AbfDBFJj (ORCPT ); Tue, 2 Apr 2019 01:09:39 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 820D259443; Tue, 2 Apr 2019 05:09:39 +0000 (UTC) Received: from 192-168-1-108.tpgi.com.com (vpn2-54-38.bne.redhat.com [10.64.54.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 319297FA10; Tue, 2 Apr 2019 05:09:36 +0000 (UTC) From: Jon Maxwell To: davem@davemloft.net, siva.kallam@broadcom.com Cc: prashant@broadcom.com, mchan@broadcom.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jmaxwell@redhat.com Subject: [net-next] tg3: allow ethtool -p to work for NICs in down state Date: Tue, 2 Apr 2019 16:07:56 +1100 Message-Id: <20190402050756.20507-1-jmaxwell37@gmail.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 02 Apr 2019 05:09:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Make tg3 behave like other drivers and let "ethtool -p" identify the NIC even when it's in the DOWN state. Before this patch it would get an error as follows if the NIC was down: # ip link set down dev em4 # ethtool -p em4 Cannot identify NIC: Resource temporarily unavailable With this patch ethtool identify works regardless of whether the NIC is up or down as it does for other drivers. Signed-off-by: Jon Maxwell --- drivers/net/ethernet/broadcom/tg3.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c index 328373e0578f..3e458394f149 100644 --- a/drivers/net/ethernet/broadcom/tg3.c +++ b/drivers/net/ethernet/broadcom/tg3.c @@ -12763,9 +12763,6 @@ static int tg3_set_phys_id(struct net_device *dev, { struct tg3 *tp = netdev_priv(dev); - if (!netif_running(tp->dev)) - return -EAGAIN; - switch (state) { case ETHTOOL_ID_ACTIVE: return 1; /* cycle on/off once per second */ -- 2.13.6