nvmecontrol tries to upload firmware in chunks as large as it thinks
the device permits. It fails to take into account the FWUG value used
by some drives to advertise the size and alignment limits for firmware
chunks.
- Add an ioctl to get the device's max transfer size
- Use the firwmare update granularity value from the identify-controller response to set the max transfer size.
- If the granularity is not reported or not restricted, fall back to the previously existing logic that calculates the max transfer size based on MDTS.
- Add firmware update granularity to the identify-controller output.