Artur Paszkiewicz [off-list ref] writes:
Don't rely on SCSI ioctl for reading NVMe serials - SCSI emulation for
NVMe devices can be disabled in the kernel config. Instead, try to get a
serial from /sys/block/nvme*/device/serial. If that fails for whatever
reason (i.e. no such attribute in old kernels) - fall back to the SCSI
method.
This also moves some SCSI-specific code from imsm_read_serial() to
scsi_get_serial().
Signed-off-by: Artur Paszkiewicz <redacted>
Reviewed-by: Tomasz Majchrzak <redacted>
Reviewed-by: Alexey Obitotskiy <redacted>
---
sg_io.c | 23 +++++++++++++++++++----
super-intel.c | 46 +++++++++++++++++++++++++++-------------------
2 files changed, 46 insertions(+), 23 deletions(-)
Hi Artur,
Looks quite reasonable - applied!
Thanks,
Jes