nvme: fw-download: handle overlapping range errors
Some NVMe implementations may return an Overlapping Range error if we
attempt to re-send a image range that has already been sent to a device.
We may hit this in a couple scenarios:
- a prior Firmware Image Download command succeeded, but the success
response was lost due to unrelated transport issues
- a download has been cancelled, and is now being re-attempted
In order to handle this, this change adds a --ignore-ovr option to the
fw-download subcommand, which treats the Overlapping Range errors as
non-fatal, allowing the firmware download to proceed with the
non-overlapping portions.
We don't make this the default behaviour, because we cannot guarantee
that the currently-upoloaded portion is what has already been sent to
the device (and the user actually wants to overwrite with new image
data). In those cases, a firmware commit or device reset is required
instead.
Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>