summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorjimharris <jimharris@FreeBSD.org>2013-07-19 21:33:24 +0000
committerjimharris <jimharris@FreeBSD.org>2013-07-19 21:33:24 +0000
commitc3dfb166eeb405887a8fbe7666d2436133a39c0b (patch)
treefefe5bbb7bdf05aa24b1eb44299388d1777ddcd8 /sbin
parent7018faf19c888299676f60070ea1df0ebe309711 (diff)
downloadFreeBSD-src-c3dfb166eeb405887a8fbe7666d2436133a39c0b.zip
FreeBSD-src-c3dfb166eeb405887a8fbe7666d2436133a39c0b.tar.gz
Fix nvme(4) and nvd(4) to support non 512-byte sector sizes.
Recent testing with QEMU that has variable sector size support for NVMe uncovered some of these issues. Chatham prototype boards supported only 512 byte sectors. Sponsored by: Intel Reviewed by: carl MFC after: 3 days
Diffstat (limited to 'sbin')
-rw-r--r--sbin/nvmecontrol/devlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/nvmecontrol/devlist.c b/sbin/nvmecontrol/devlist.c
index 29c0475..eb40434 100644
--- a/sbin/nvmecontrol/devlist.c
+++ b/sbin/nvmecontrol/devlist.c
@@ -53,7 +53,7 @@ static inline uint32_t
ns_get_sector_size(struct nvme_namespace_data *nsdata)
{
- return (1 << nsdata->lbaf[0].lbads);
+ return (1 << nsdata->lbaf[nsdata->flbas.format].lbads);
}
void
OpenPOWER on IntegriCloud