Commit d10b3acb authored by Matias Bjørling's avatar Matias Bjørling Committed by Tim Gardner

lightnvm: sectors first in ppa list

BugLink: http://bugs.launchpad.net/bugs/1531539

The Westlake controller requires that the PPA list has sectors defined
sequentially. Currently, the PPA list is created with planes first, then
sectors. Change this to sectors first, then planes.
Signed-off-by: default avatarMatias Bjørling <m@bjorling.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
(cherry picked from commit 556755e9)
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent c1a70ac8
......@@ -245,10 +245,10 @@ int nvm_set_rqd_ppalist(struct nvm_dev *dev, struct nvm_rq *rqd,
return -ENOMEM;
}
for (i = 0; i < nr_ppas; i++) {
for (pl_idx = 0; pl_idx < plane_cnt; pl_idx++) {
for (pl_idx = 0; pl_idx < plane_cnt; pl_idx++) {
for (i = 0; i < nr_ppas; i++) {
ppas[i].g.pl = pl_idx;
rqd->ppa_list[(i * plane_cnt) + pl_idx] = ppas[i];
rqd->ppa_list[(pl_idx * nr_ppas) + i] = ppas[i];
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment