Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp61526yba; Wed, 8 May 2019 16:23:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoteYoSR3xToPLi9mjYPJg846UGt4E7HBewZsLbL3jwfAm5fSSfwIdPZ3hYXNnFo+wXHmU X-Received: by 2002:a17:902:2d:: with SMTP id 42mr665809pla.34.1557357813647; Wed, 08 May 2019 16:23:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557357813; cv=none; d=google.com; s=arc-20160816; b=klC7e54kvXTUOzld2VmTBXhAH6nDbaE9U8QCQU6aeoOIzn1go7SRH9ZcDa+gK+HZUc GokpddmVJ5UFFXvsSwOgHbL/XSgNzHNPr99bFeBAjqLoe0YkUImdqfOBJ5/uuOJHEscP Q4y7U1JegaYkVR1OrqEBV3TOMAM9PPNz/dSNniMCx35R8O1OFE/0rJggjg51L198Wmd1 MUKhkqT1zu2gh+a2OZu4ZAQqhz5+TuhiYTAgcfPzyUuF8ufFK42gMxA3LgQCq7KJVdCZ fKhsvVIfy8autWDR2mCIOSQIJbtyVssXAMPSHTk2Jg1ttIYgyzUSRkr/H181hiXogGj8 qy6w== 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 :dkim-signature; bh=DjSg7tCxQ1WL8nAHGA2GKXNWz+bl54MNpKVs11Phngg=; b=KwaFoFifAsxjPH6V6FBUYHNp01j2WBFhXNa1BNnxdQkOaZxh0aL11w42UCrDVDoqWk 3/lHpBokm+JPXv8IFwq5xRQH3cAzPZRC2nYnxIIiHUGRSGC10n68bjZ1Z0oiKIIs+YOi dMMp6Sxsl1tcOVaULZN0F5wlH97AFhviSmhgJ4c4CmFAlHXhHcpA1i46LAZrCJnoqP9o UA3KYFqhsSKKqD3+GAU9NgmpwnZD+6pAv8EoIu0a3g9VIjfH5H9HLxEB0zxl8vkskHdp R0GRe4uEUVYyKraz1e8LqeFiya1Qc31tSFmlVrquckyB2g1Sqna+Ot2MfABHj0aWKkhZ XrqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cisco.com header.s=iport header.b=IAhDrj6T; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si166056pfb.231.2019.05.08.16.23.15; Wed, 08 May 2019 16:23:33 -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; dkim=pass header.i=@cisco.com header.s=iport header.b=IAhDrj6T; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=cisco.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728679AbfEHXWC (ORCPT + 99 others); Wed, 8 May 2019 19:22:02 -0400 Received: from alln-iport-2.cisco.com ([173.37.142.89]:8895 "EHLO alln-iport-2.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbfEHXWC (ORCPT ); Wed, 8 May 2019 19:22:02 -0400 X-Greylist: delayed 425 seconds by postgrey-1.27 at vger.kernel.org; Wed, 08 May 2019 19:22:01 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1960; q=dns/txt; s=iport; t=1557357721; x=1558567321; h=from:to:cc:subject:date:message-id; bh=xFoLKN7z00P1NlIEUkNeHdy5RdIl62U+exCN+0sxos0=; b=IAhDrj6TSwPopSgNc3bSk+x5oJu4HqMnAIEuAUrDzCTxZ8RFtRF4UrmJ DhBUa0BMTVuUcLMZRpI6SGpe+kNa2HqXHVylmLYQxn13SclImM/A0Jzbl AuvMwISWZ+vkZeOqjckzabNRrqc0FFhOuYQGeOTx5RiGtrjeS1Mbz52dc A=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AnAACFYtNc/5pdJa1kHAEBAQQBAQc?= =?us-ascii?q?EAQGBUQcBAQsBghCBOgEyKIwtpVSBewkJL4Q/ggojNAkOAQMBAQQBAQIBBG0?= =?us-ascii?q?ohXhSgT4TgyKCC655M4hmgUYUgR4BhneEVheBQD+EYYomBJJDlH8JgguSTwI?= =?us-ascii?q?ZlVYBoUKBTziBVjMaCBsVgyeQUT8DMI14K4IlAQE?= X-IronPort-AV: E=Sophos;i="5.60,447,1549929600"; d="scan'208";a="271168730" Received: from rcdn-core-3.cisco.com ([173.37.93.154]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 08 May 2019 23:14:30 +0000 Received: from sjc-ads-4850.cisco.com (sjc-ads-4850.cisco.com [10.28.39.114]) by rcdn-core-3.cisco.com (8.15.2/8.15.2) with ESMTP id x48NEUx3009602; Wed, 8 May 2019 23:14:30 GMT From: Nikunj Kela To: Jeff Kirsher Cc: xe-linux-external@cisco.com, "David S. Miller" , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] igb: add parameter to ignore nvm checksum validation Date: Wed, 8 May 2019 23:14:29 +0000 Message-Id: <1557357269-9498-1-git-send-email-nkela@cisco.com> X-Mailer: git-send-email 2.5.0 X-Auto-Response-Suppress: DR, OOF, AutoReply X-Outbound-SMTP-Client: 10.28.39.114, sjc-ads-4850.cisco.com X-Outbound-Node: rcdn-core-3.cisco.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some of the broken NICs don't have EEPROM programmed correctly. It results in probe to fail. This change adds a module parameter that can be used to ignore nvm checksum validation. Cc: xe-linux-external@cisco.com Signed-off-by: Nikunj Kela --- drivers/net/ethernet/intel/igb/igb_main.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 39f33af..0ae1324 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -247,6 +247,11 @@ static int debug = -1; module_param(debug, int, 0); MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); +static bool ignore_nvm_checksum; +module_param(ignore_nvm_checksum, bool, 0); +MODULE_PARM_DESC(ignore_nvm_checksum, + "Set to ignore nvm checksum validation (defaults N)"); + struct igb_reg_info { u32 ofs; char *name; @@ -3191,18 +3196,29 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) case e1000_i211: if (igb_get_flash_presence_i210(hw)) { if (hw->nvm.ops.validate(hw) < 0) { - dev_err(&pdev->dev, + if (ignore_nvm_checksum) { + dev_warn(&pdev->dev, "The NVM Checksum Is Not Valid\n"); - err = -EIO; - goto err_eeprom; + } else { + dev_err(&pdev->dev, + "The NVM Checksum Is Not Valid\n"); + err = -EIO; + goto err_eeprom; + } } } break; default: if (hw->nvm.ops.validate(hw) < 0) { - dev_err(&pdev->dev, "The NVM Checksum Is Not Valid\n"); - err = -EIO; - goto err_eeprom; + if (ignore_nvm_checksum) { + dev_warn(&pdev->dev, + "The NVM Checksum Is Not Valid\n"); + } else { + dev_err(&pdev->dev, + "The NVM Checksum Is Not Valid\n"); + err = -EIO; + goto err_eeprom; + } } break; } -- 2.5.0