From c3dfb166eeb405887a8fbe7666d2436133a39c0b Mon Sep 17 00:00:00 2001 From: jimharris Date: Fri, 19 Jul 2013 21:33:24 +0000 Subject: 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 --- sbin/nvmecontrol/devlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin') 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 -- cgit v1.1