From patchwork Wed Dec 9 21:13:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 341715 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF2CAC433FE for ; Wed, 9 Dec 2020 21:15:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD0C323B98 for ; Wed, 9 Dec 2020 21:15:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387938AbgLIVPS (ORCPT ); Wed, 9 Dec 2020 16:15:18 -0500 Received: from mga11.intel.com ([192.55.52.93]:24061 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387611AbgLIVOv (ORCPT ); Wed, 9 Dec 2020 16:14:51 -0500 IronPort-SDR: w1Qayq3SiPVXu98lZCP8iGfNRLTtafhYrvqjt+BA2VOnAHEkVgoAZm4iWA30+czNt75j7lGC1m 9hTlbc9nEj7w== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="170641630" X-IronPort-AV: E=Sophos;i="5.78,405,1599548400"; d="scan'208";a="170641630" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Dec 2020 13:13:53 -0800 IronPort-SDR: kOOrGCTmqYHRL8jrKfVX25kOWDIpz2T/iWTlCGkL3MEdco3Cxx5KU2j5IBWQdcmghOB9AAvGXs q4HKgcmM4RMw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,405,1599548400"; d="scan'208";a="408228645" Received: from anguy11-desk2.jf.intel.com ([10.166.244.147]) by orsmga001.jf.intel.com with ESMTP; 09 Dec 2020 13:13:52 -0800 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org Cc: Paul M Stillwell Jr , netdev@vger.kernel.org, sassmann@redhat.com, anthony.l.nguyen@intel.com, Aaron Brown Subject: [net-next v4 2/9] ice: don't always return an error for Get PHY Abilities AQ command Date: Wed, 9 Dec 2020 13:13:05 -0800 Message-Id: <20201209211312.3850588-3-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201209211312.3850588-1-anthony.l.nguyen@intel.com> References: <20201209211312.3850588-1-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Paul M Stillwell Jr There are times when the driver shouldn't return an error when the Get PHY abilities AQ command (0x0600) returns an error. Instead the driver should log that the error occurred and continue on. This allows the driver to load even though the AQ command failed. The user can then later determine the reason for the failure and correct it. Signed-off-by: Paul M Stillwell Jr Tested-by: Aaron Brown Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/ice/ice_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index 7db5fd977367..ab9d7ae93706 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c @@ -925,7 +925,8 @@ enum ice_status ice_init_hw(struct ice_hw *hw) ICE_AQC_REPORT_TOPO_CAP, pcaps, NULL); devm_kfree(ice_hw_to_dev(hw), pcaps); if (status) - goto err_unroll_sched; + dev_warn(ice_hw_to_dev(hw), "Get PHY capabilities failed status = %d, continuing anyway\n", + status); /* Initialize port_info struct with link information */ status = ice_aq_get_link_info(hw->port_info, false, NULL, NULL);