From patchwork Tue Jan 31 12:17:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9547027 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 411EB60425 for ; Tue, 31 Jan 2017 12:18:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 332EF280FC for ; Tue, 31 Jan 2017 12:18:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27DFB28389; Tue, 31 Jan 2017 12:18:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D1BF28338 for ; Tue, 31 Jan 2017 12:18:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752057AbdAaMSu (ORCPT ); Tue, 31 Jan 2017 07:18:50 -0500 Received: from mail-bn3nam01on0043.outbound.protection.outlook.com ([104.47.33.43]:32224 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752021AbdAaMSY (ORCPT ); Tue, 31 Jan 2017 07:18:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnexlabs.onmicrosoft.com; s=selector1-cnexlabs-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=eNqzy0+tMlIbYI6Iay970S/lHVXRHzNJAgOZmwoUWoM=; b=oSxddn8qtU7qWLh+0OkUdFMw+1mQSJFSL24kSzlTPp49haDIMc+v/icLdl1UEQEwBk3xo8f28flKBe/3B36mNgFX1LIWJcyu3q7RWCAq7UhQQQ0cvkp49Ua3kU85OEbnaZ4y8Wa2Pk3fbBUa3qsr9qx0+XGVCsnpmcAnmjMwaN8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=matias@cnexlabs.com; Received: from skyninja.cnexlabs.com (193.106.164.211) by DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Tue, 31 Jan 2017 12:17:59 +0000 From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: CC: , , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 10/12] lightnvm: Add CRC read error Date: Tue, 31 Jan 2017 13:17:18 +0100 Message-ID: <20170131121720.10971-11-matias@cnexlabs.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170131121720.10971-1-matias@cnexlabs.com> References: <20170131121720.10971-1-matias@cnexlabs.com> MIME-Version: 1.0 X-Originating-IP: [193.106.164.211] X-ClientProxiedBy: DB6PR0601CA0024.eurprd06.prod.outlook.com (10.168.88.162) To DM5PR06MB2777.namprd06.prod.outlook.com (10.175.107.139) X-MS-Office365-Filtering-Correlation-Id: e37f1531-575d-4a2a-3805-08d449d332b9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DM5PR06MB2777; X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 3:6j6gewZ3CcrGhLBcRRneE9+yx2JZ9Igr6+PsU42XGRPrtA4gIpbUgtyHhhCzDhJTk27N8WKyUiGBGO5Eov0l+5X+KLm3W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M0Xqz1fjOgSRPjYvXrLWRIPZ1jnu7PyeCLKMHCX37PnmC7frWCwmP5Gs1+D+M6d/iz5Y5xPBW4i6qmC97kjA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123560025)(20161123555025)(20161123562025)(20161123564025)(6072148); SRVR:DM5PR06MB2777; BCL:0; PCL:0; RULEID:; SRVR:DM5PR06MB2777; X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 4:0uDqq6nbGyTYsbtqZM7h/WHdhm4nM6VrQZo8g2yl4zwDvtUSdB+4ZyASVZQfwKtfDrTOU5uMRODe7hwaNSSa5YIcuLsHpDo7YRiVMnBX6MZNBSPv5MVzGd/ECurBi3VCM9KTRKqyG7c/Mhwd9nlGS8YV3RMi/OiGwoeRop4SnVHJ7HmA7oXF/O1JnmZFzGniFoKWrAyAJOu8M9Hs8s9neuH8FUvZdblizlGk8849V9RSffPXeIHVgVNhoHOCH+VFBQnxgk7uIGcuSaS6l9mQUD4D+F8ofW87DwrZe335hlhyuqPYD5foeva9n5j1zqpMbbhrDNl7F6p3O9QXCABOM2oE72+wYzEve5yEoadXDZ7T4yJ+s1fJ/S/q2GqyIErtw4rkO8AjlUMCw5Gz0SRA7QoM0q4knXi+x3CXNQaXB6rUUuQFbbxJ41F0QNYPibqRbxDr9DPGxW59C+nHkGYv7c5S/mvG2DJoKraAgal3Uu0/q5jSi8BLEhBfK7DCept1EE3TJccQ1gZDp+9gRQKSMwAzKAwwm79oCyMiqbmd9WK6Po3U4E2E0m41LdyvpoZNehXXYu8/tHxHDqtWzwFx9w== X-Forefront-PRVS: 0204F0BDE2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(189002)(199003)(42186005)(66066001)(50466002)(6486002)(47776003)(38730400001)(105586002)(54906002)(25786008)(106356001)(2351001)(36756003)(68736007)(4001430100002)(53416004)(50986999)(107886002)(7736002)(2906002)(305945005)(4326007)(110136003)(23676002)(2870700001)(189998001)(5660300001)(92566002)(86362001)(1076002)(6116002)(3846002)(33646002)(6916009)(97736004)(2950100002)(5820100001)(6666003)(76176999)(101416001)(53936002)(81166006)(81156014)(8676002)(50226002)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR06MB2777; H:skyninja.cnexlabs.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cnexlabs.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTVQUjA2TUIyNzc3OzIzOll6eUJVS3hSNzZXT2NuRFNlWCsrYkZMdVFh?= =?utf-8?B?Vm95YjFkTi9hamxKR0J6eWhkQzVRS1c2WnNhNC9xZUhkU3FuQm1oZ1pMMDVC?= =?utf-8?B?Sk1UZ0lWZ2xIQk54RXlCNG1wbG1UNjd3dENxZjF4RGRTeUZHdDg0c1QwMTI3?= =?utf-8?B?Zm5sM1o1UFRvaHdiRjdBVjZjZmZKZmFJS1JyNWxlQWxnVDN6NmxUaXU4TkhD?= =?utf-8?B?TU9IOFU0K1J2NE9rWHpRclgwUW5KVVZ4K1NEUVpmL3c3alNVeC9uR0hQb0R6?= =?utf-8?B?cHJkYTRxcWlZSzBXOHl4M0p6bGJQcWxkWjNWZVE2L0lVOFo1cjhrWWFqWHdS?= =?utf-8?B?dEtuemJteXdlbWlJYzRkUC8wc3cvejR2TXBkRi81NDg5RE51RGdPaXJhbTcx?= =?utf-8?B?RmJZWkZ1aWRCdG9ZRW01UXlkai9nVW5ZMHJQTlUrQlVYdlJneE9aOXhOL3lQ?= =?utf-8?B?eUV3T2dLb2Rrb3R1MmhqWFMzbnpTTGRCY3Y1YlRQWU5EUjJ2QmpyQm84cllK?= =?utf-8?B?WkcvWnRtcFRzWUZJZ04wdmFqempyS1VLM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cHNNbjU1ZDRWVXZxY2xDMXBXNVMyMWZ5NlBxNUw0?= =?utf-8?B?czAxVEozMHJBNXNDM3kyWkllcUg5b2llQ2Q0b2hLNngwQldVRGN2MmJzRXYw?= =?utf-8?B?M3NoRU5SQlpIaGM3K3dmRC84Z2thWUxoRlJxcnhZUmVET21kSllqV09rT2VL?= =?utf-8?B?RXE1T1hYYjhvOHJUU25ZYVZKR0wvemxuMFI0OS9DTjRLMEhCS1J2dnN3PT0=?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 6:2Xui2pSQ7ladFp94JnZh6Kd9kpuGo25CE3u+phD7Q7onnzkIR7Wx/rC/dX5OGQbWwlH5hcGD8LAQk0RLzBu88I7CoojXCS2xtWytAAzYaDkPwRhwmLU+cHsBs5DhF4ConH7BFECYT6Ez4mhi6V85kbIaEOapjMsyepu2X0z/YzFgwaLNIGFJjq+ktOnbZaMPtsIPFDFDa+HY/oNWurZ46ork1TsZi6SsBcDnyjKJZd77Ffp6880RP6QutlUJ2PhQDu9cfRMyMdrad7SzQvrAWupLZxk7ml8anG6zC3VCwc8Hsw2M/un4YvKCbwqRJZ/LCAjWDnrJskF89dEXvORhi7Tst8Rzbn9njPV2XAp5xiADmltr6UBlhQ1EAEX/C2WKmedmjpGK/ImLlvURmQMo6YWZhMJ+m7HPGbtwpQFZN0Y=; 5:8LNxe4k6GQooqWSLprfiq5dqN8KOwMflfMuxshd/HlVHOhloPyJvCzNcAca4RnM+klKwuI8zwTtBZTdxou7SGSbQ2KUE2bU8Joy5VRyxbIs2qN8FrO1TsrCa+UQ3Y7pa+pwEhroDBeCXAkw9heceEw==; 24:LQvH/hF45znCN/ulTozY9oJOOdSIwvhtXUGLi49BNfOVmnulIeIgD0coeOArfSmFXzSWhvo97N3575kSd9X6/Pb2zXXTHuj2CSzqKhQUmBE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR06MB2777; 7:iJJGPW1LGWNKgONWnD3s/halGbYT5bv5Ajn+rDP5p5HmL73wbrGb+JGfQI2FobxnZBGJeoDUI4X9Y5WBwJAU1lzI1jyDy5Mx82GIcem3ZsMxsZuvrJERvsXUM1KyyOSxi5nOP2bzGW473ymOqsxfsz3mKDTZ4ZRYir5/CDClmJoIgFntx4iTUMfUbovmduJ2NeZSOnqp7UM5lbgnvgJbuBBbBHWrVpM0P8WAR8oWQMFvcM/K7jOYb/HLhJjctAM7mOjyQgpBqkl6Q7zMpcvr8uz0jD7dz/JFZJrXV7TA11T4zmUPZcx9RDD0r6ZD513k3gxjNeZjA2ZaSr4TIOxu2FZnUCopP5lZCWVVyQgqyaizihZYpBeFWMqvZuKIr3bytrU1ahBwsR9s4FjUN35v+Kp5XmWoGfGfzN+epOotlEqNb8WG5CNlBBsna9fTEidZKHudKRGlTS/e2opQ852D5rn9OeigM1rDrY+u/DFwWtri09ndarqItGPjmXuHXY9gVIenshTpBLIncNxMGq0zxA5288xDgSn59kom5UIq6MofGxnHpHtvGzg9LKXBtmNm X-OriginatorOrg: cnexlabs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2017 12:17:59.2979 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR06MB2777 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Javier González Let the host differentiate between a read error and a CRC check error on the device side. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- include/linux/lightnvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 17cd454..bc282d2 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -107,6 +107,7 @@ enum { NVM_RSP_ERR_FAILWRITE = 0x40ff, NVM_RSP_ERR_EMPTYPAGE = 0x42ff, NVM_RSP_ERR_FAILECC = 0x4281, + NVM_RSP_ERR_FAILCRC = 0x4004, NVM_RSP_WARN_HIGHECC = 0x4700, /* Device opcodes */