Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754280AbcCIXER (ORCPT ); Wed, 9 Mar 2016 18:04:17 -0500 Received: from mga02.intel.com ([134.134.136.20]:43209 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbcCIXEP (ORCPT ); Wed, 9 Mar 2016 18:04:15 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,313,1455004800"; d="scan'208";a="930514860" From: "Verma, Vishal L" To: "Williams, Dan J" , "linux-nvdimm@lists.01.org" CC: "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" Subject: Re: [PATCH 1/3] nfit, libnvdimm: clear poison command support Thread-Topic: [PATCH 1/3] nfit, libnvdimm: clear poison command support Thread-Index: AQHReYyU42iSgLdqSEuG472fWq2ntJ9SQuoA Date: Wed, 9 Mar 2016 23:03:59 +0000 Message-ID: <1457564634.4525.32.camel@intel.com> References: <20160308224713.16298.33547.stgit@dwillia2-desk3.jf.intel.com> <20160308224718.16298.47066.stgit@dwillia2-desk3.jf.intel.com> In-Reply-To: <20160308224718.16298.47066.stgit@dwillia2-desk3.jf.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.232.112.171] Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u29N4Oa4003844 Content-Length: 2065 Lines: 67 On Tue, 2016-03-08 at 14:47 -0800, Dan Williams wrote: > Add the boiler-plate for a 'clear error' command based on section > 9.20.7.6 "Function Index 4 - Clear Uncorrectable Error" from the ACPI > 6.1 specification, and add a reference implementation in nfit_test. > > Cc: Vishal Verma > Signed-off-by: Dan Williams > --- >  drivers/acpi/nfit.c              |   12 +++++++++++- >  drivers/nvdimm/bus.c             |   19 +++++++++++++++++++ >  include/uapi/linux/ndctl.h       |   13 +++++++++++++ >  tools/testing/nvdimm/test/nfit.c |   29 +++++++++++++++++++++++++++++ >  4 files changed, 72 insertions(+), 1 deletion(-) > > diff --git a/include/uapi/linux/ndctl.h b/include/uapi/linux/ndctl.h > index cc68b92124d4..0f001c571cdd 100644 > --- a/include/uapi/linux/ndctl.h > +++ b/include/uapi/linux/ndctl.h > @@ -98,6 +98,14 @@ struct nd_cmd_ars_status { >   } __packed records[0]; >  } __packed; >   > +struct nd_cmd_clear_error { > + __u64 address; > + __u64 length; > + __u32 status; > + __u8 reserved[4]; > + __u64 cleared; > +} __packed; > + >  enum { >   ND_CMD_IMPLEMENTED = 0, >   > @@ -105,6 +113,7 @@ enum { >   ND_CMD_ARS_CAP = 1, >   ND_CMD_ARS_START = 2, >   ND_CMD_ARS_STATUS = 3, > + ND_CMD_CLEAR_ERROR = 4, >   >   /* per-dimm commands */ >   ND_CMD_SMART = 1, > @@ -129,6 +138,7 @@ static inline const char > *nvdimm_bus_cmd_name(unsigned cmd) >   [ND_CMD_ARS_CAP] = "ars_cap", >   [ND_CMD_ARS_START] = "ars_start", >   [ND_CMD_ARS_STATUS] = "ars_status", > + [ND_CMD_CLEAR_ERROR] = "clear_error", >   }; >   >   if (cmd < ARRAY_SIZE(names) && names[cmd]) > @@ -187,6 +197,9 @@ static inline const char *nvdimm_cmd_name(unsigned > cmd) >  #define ND_IOCTL_ARS_STATUS _IOWR(ND_IOCTL, > ND_CMD_ARS_STATUS,\ >   struct nd_cmd_ars_status) >   > +#define ND_IOCTL_CLEAR_ERROR _IOWR(ND_IOCTL, > ND_CMD_CLEAR_ERROR,\ > + struct nd_cmd_ars_status) > + Typo here? Should be struct nd_cmd_clear_error.