Skip to content

Commit d7bf478

Browse files
tpamborMaureenHelm
authored andcommitted
drivers: disk: nvme: Provide correct erase block size
Erase block size should be provided in sectors, not in bytes. Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
1 parent 32e7541 commit d7bf478

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎drivers/disk/nvme/nvme_disk.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ static int nvme_disk_ioctl(struct disk_info *disk, uint8_t cmd, void *buff)
169169
*(uint32_t *)buff = nvme_namespace_get_sector_size(ns);
170170

171171
break;
172-
case DISK_IOCTL_GET_ERASE_BLOCK_SZ:
172+
case DISK_IOCTL_GET_ERASE_BLOCK_SZ: /* in sectors */
173173
if (!buff) {
174174
ret = -EINVAL;
175175
break;
176176
}
177177

178-
*(uint32_t *)buff = nvme_namespace_get_sector_size(ns);
178+
*(uint32_t *)buff = 1;
179179

180180
break;
181181
case DISK_IOCTL_CTRL_DEINIT:

0 commit comments

Comments
 (0)