* [PATCH] nvme: lightnvme: make MLC num_pairs little endian
@ 2016-06-03 12:44 Johannes Thumshirn
2016-06-03 13:17 ` Matias Bjørling
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2016-06-03 12:44 UTC (permalink / raw)
To: Jens Axboe
Cc: Keith Busch, linux-nvme, linux-kernel, Matias Bjørling,
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 <jthumshirn@suse.de>
---
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 9461dd6..ea36cbb 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];
};
--
1.8.5.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvme: lightnvme: make MLC num_pairs little endian
2016-06-03 12:44 [PATCH] nvme: lightnvme: make MLC num_pairs little endian Johannes Thumshirn
@ 2016-06-03 13:17 ` Matias Bjørling
0 siblings, 0 replies; 2+ messages in thread
From: Matias Bjørling @ 2016-06-03 13:17 UTC (permalink / raw)
To: Johannes Thumshirn, Jens Axboe; +Cc: Keith Busch, linux-nvme, linux-kernel
On 06/03/2016 02:44 PM, Johannes Thumshirn wrote:
> 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 <jthumshirn@suse.de>
> ---
> 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 9461dd6..ea36cbb 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];
> };
>
>
Thanks Johannes. Applied for 4.8.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-03 13:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-03 12:44 [PATCH] nvme: lightnvme: make MLC num_pairs little endian Johannes Thumshirn
2016-06-03 13:17 ` Matias Bjørling
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox