lkml.org 
[lkml]   [2016]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] lightnvm: clear reserved bit on generic addr
Date
When an address is converted from device to generic mode, the reserved
bit needs to be cleared in order to signal that the address points to a
flash block, not to a cacheline on the write buffer.

Signed-off-by: Javier González <javier@cnexlabs.com>
---
include/linux/lightnvm.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h
index 45be892..3d2c380 100644
--- a/include/linux/lightnvm.h
+++ b/include/linux/lightnvm.h
@@ -418,6 +418,9 @@ static inline struct ppa_addr dev_to_generic_addr(struct nvm_dev *dev,
l.g.ch |= (r.ppa >> dev->ppaf.ch_offset) &
(((1 << dev->ppaf.ch_len) - 1));

+ /* On device side, reserved bit is always 0 */
+ l.g.reserved = 0;
+
return l;
}

--
2.5.0
\
 
 \ /
  Last update: 2016-05-11 14:21    [W:0.045 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site