Project

General

Profile

Actions

Bug #16592

open

Cannot update NVMe firmware on Micron 7300

Added by Andy Fiddaman 12 days ago. Updated 12 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

Updating the firmware on a Micron 7300 M.2 drive (Micron_7300_MTFDHBG1T9TDF)
does not work.

gimlet-sn06 # nvmeadm list-firmware nvme0
nvme0: Firmware Slot Information
  Active Firmware Slot:                     2
  Firmware Revision for Slot 1:             95420260 (read-only)
  Firmware Revision for Slot 2:             95420280
  Firmware Revision for Slot 3:             <Unused>

Attempting to load the firmware produces an error:

gimlet-sn06 # nvmeadm load-firmware nvme0 /tmp/micron_7300_fw-95420280_m2.tar
nvmeadm: failed to load firmware image "/tmp/micron_7300_fw-95420280_m2.tar" at offset 7012352:
field number of dwords (numd) value 0xaa00 is invalid: NVME_ERR_FW_LOAD_LEN_RANGE
(libnvme: 0x38, sys: 0)

The real error is actually:

number of dwords (numd) value 0xaa00 must be aligned to the firmware update granularity 0x1000

and I've opened #16591 address the fact that this wasn't reported.

The reason is that the NVMe controller is reporting a Firmware Update
Granularity (FWUG) of 4KiB, but the file that the vendor has supplied
is not a multiple of that.

> ::prtconf -d nvme -i 0 | ::devinfo -d | ::print nvme_t n_idctl[].ap_fwug
n_idctl[].ap_fwug = 0x1

% stat -f '%#Xz' ~/firmware/micron_7300_fw-95420280_m2.tar
0x6baa00

Manually padding this file out to 0x6bb000 results in a working upgrade, so it
seems that libnvme or nvmeadm should do this padding as necessary.

I did not find any guidance on this in the NVMe 1.3 or 2.0d specification
documents (this drive is NVMe 1.3).


Related issues

Related to illumos gate - Bug #16591: nvme_field_validate swallows more specific error messagesIn ProgressAndy Fiddaman

Actions
Actions #1

Updated by Andy Fiddaman 12 days ago

  • Description updated (diff)
Actions #2

Updated by Andy Fiddaman 12 days ago

  • Description updated (diff)
Actions #3

Updated by Andy Fiddaman 12 days ago

  • Related to Bug #16591: nvme_field_validate swallows more specific error messages added
Actions #4

Updated by Electric Monk 12 days ago

  • Gerrit CR set to 3537
Actions

Also available in: Atom PDF