From patchwork Mon Jan 4 22:34:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Verma, Vishal L" X-Patchwork-Id: 7951881 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C4C0EBEEE5 for ; Mon, 4 Jan 2016 22:35:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0132720304 for ; Mon, 4 Jan 2016 22:35:08 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0628320303 for ; Mon, 4 Jan 2016 22:35:07 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DE59D1A20F8; Mon, 4 Jan 2016 14:35:06 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id C3B9B1A20F8 for ; Mon, 4 Jan 2016 14:35:05 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 04 Jan 2016 14:35:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,522,1444719600"; d="scan'208";a="883735430" Received: from omniknight.lm.intel.com ([10.232.112.62]) by orsmga002.jf.intel.com with ESMTP; 04 Jan 2016 14:35:04 -0800 From: Vishal Verma To: linux-nvdimm@lists.01.org Subject: [PATCH] nfit: add a module parameter to ignore ars errors Date: Mon, 4 Jan 2016 15:34:43 -0700 Message-Id: <1451946883-28092-1-git-send-email-vishal.l.verma@intel.com> X-Mailer: git-send-email 2.5.0 Cc: linux-acpi@vger.kernel.org X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Normally, if a platform does not advertise support for Address Range Scrub (ARS), we skip it. But if ARS is advertised, it is expected to always succeed. If it fails, we normally fail initialization at that point. Add a module parameter to nfit that lets it ignore ARS failures and continue with initialization for debugging. Signed-off-by: Vishal Verma --- This applies on top of both of the previous error handling series (badblocks and libnvdimm poison list). The tree at: https://git.kernel.org/cgit/linux/kernel/git/vishal/nvdimm.git/log/?h=err_handling_latest has been updated with this patch. drivers/acpi/nfit.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index ad6d8c6..0a152f1 100644 --- a/drivers/acpi/nfit.c +++ b/drivers/acpi/nfit.c @@ -34,6 +34,10 @@ static bool force_enable_dimms; module_param(force_enable_dimms, bool, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(force_enable_dimms, "Ignore _STA (ACPI DIMM device) status"); +static bool ignore_ars; +module_param(ignore_ars, bool, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(ignore_ars, "Ignore ARS (Address Range Scrub) failures"); + struct nfit_table_prev { struct list_head spas; struct list_head memdevs; @@ -1786,7 +1790,10 @@ static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc, dev_err(acpi_desc->dev, "error while performing ARS to find poison: %d\n", rc); - return rc; + if (ignore_ars) + ; /* continue initialization */ + else + return rc; } if (!nvdimm_pmem_region_create(nvdimm_bus, ndr_desc)) return -ENOMEM;