From patchwork Thu Jul 7 07:54:10 2016 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: 9218079 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 518086048B for ; Thu, 7 Jul 2016 07:58:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46EE928794 for ; Thu, 7 Jul 2016 07:58:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B74A28796; Thu, 7 Jul 2016 07:58:44 +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 C188B28794 for ; Thu, 7 Jul 2016 07:58:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756621AbcGGH6k (ORCPT ); Thu, 7 Jul 2016 03:58:40 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36273 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756617AbcGGHyj (ORCPT ); Thu, 7 Jul 2016 03:54:39 -0400 Received: by mail-wm0-f65.google.com with SMTP id i4so3077450wmg.3 for ; Thu, 07 Jul 2016 00:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=3Q39bxnZAf/BSfbXdi3sFfbiC9MQA0p1bwn0egiTT8E=; b=vZ63kZvY+te1Lz3MAvC06ln3s56NTd4WaVQpe9d8y8h5XML9RBxZTt3SdcfRtdPn5q QDkX9MqrHXn7WtsGQo1DEeF4vT6QLgTJsJntV2f8ze2bTVUaMcnivfY9UmALt+LIvgWb W8V7YsEHa+xUXIDtNq+sALby9t2Jd7dD76/cQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3Q39bxnZAf/BSfbXdi3sFfbiC9MQA0p1bwn0egiTT8E=; b=gKf1SQix4UM/dOmsmgtOg4qBWPf1y6zhuI5CaxswkjSLKOH8pOMOViIbfDcDaXvHfV SkBLWavqDLwNBmr8vrP2CWwm/okLqVnARkW1noAVWCvK960j6tomE2mKzp17UgZO2lLH fF31KiR5yuuD5btn1njoYByo0sCm+p9Xt2uy3Iu5glXUeJxbA4LF2lH5gO8nP0Uu+avW rSDr53Ovr+pi5+INdX4IKslspoYa6nJS9Kj0GJDNYO6xgAr61v8xk/1udXKD/aPsb1O+ xea5vWaTttTFRWJE2chuC2LGNFdOSwR7XXkrJPPfavRZW2z1mjd3YV75/+IFVQPoc9M3 0FPQ== X-Gm-Message-State: ALyK8tLjzHoVGibagVgpLZZI6dLdaFggE4U53t3NPfnjaDuzhWoUznMYO0QjDrx6e/GXWw== X-Received: by 10.28.176.7 with SMTP id z7mr1324716wme.17.1467878077617; Thu, 07 Jul 2016 00:54:37 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id i74sm1654796wmg.21.2016.07.07.00.54.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jul 2016 00:54:37 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: Johannes Thumshirn , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 04/17] nvme: lightnvm: make MLC num_pairs little endian Date: Thu, 7 Jul 2016 09:54:10 +0200 Message-Id: <1467878063-22919-5-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1467878063-22919-1-git-send-email-m@bjorling.me> References: <1467878063-22919-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 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: Johannes Thumshirn According to the OpenChannel SSD interface specification the NAND flash MLC page pairing information's number of page page pairings field is the first two bytes in the MLC Page Pairing data structure. The hardware's data structure itself is little endian so annotate it as such, like the rest of lighnvm's data structures. Signed-off-by: Johannes Thumshirn Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index a0af055..97fe610 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -156,7 +156,7 @@ struct nvme_nvm_completion { #define NVME_NVM_LP_MLC_PAIRS 886 struct nvme_nvm_lp_mlc { - __u16 num_pairs; + __le16 num_pairs; __u8 pairs[NVME_NVM_LP_MLC_PAIRS]; };