]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: fw-download: handle overlapping range errors
authorJeremy Kerr <jk@codeconstruct.com.au>
Mon, 14 Nov 2022 06:04:19 +0000 (14:04 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Fri, 25 Nov 2022 02:36:09 +0000 (10:36 +0800)
commit0a831533e7d513a076eaa7bc37eeb1ce89daeb6c
treeb5216fadcef5131556f515cbda0ef8e3b8be440f
parent4565a173a0a5f0db34d8fc7c04957491fd980609
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>
nvme.c