Lines Matching +full:firmware +full:- +full:reset
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
7 * Copyright (C) 2012-2013 Intel Corporation
53 static cmd_fn_t firmware;
71 "Attempt to activate firmware"),
73 "Slot to activate and/or download firmware to"),
74 OPT("firmware", 'f', arg_path, opt, fw_img,
75 "Firmware image to download"),
81 { arg_string, &opt.dev, "controller-id|namespace-id" },
86 .name = "firmware",
87 .fn = firmware,
88 .descr = "Download firmware image to controller",
108 if (fw.revision[slot-1][0] != '\0')
130 * The NVMe spec does not explicitly state a maximum firmware image
132 * for the size and offset fields in the Firmware Image Download
182 pt.cmd.cdw10 = htole32((size / sizeof(uint32_t)) - 1);
189 err(EX_IOERR, "firmware download request failed");
192 errx(EX_IOERR, "firmware download request returned error");
194 resid -= size;
212 err(EX_IOERR, "firmware activate request failed");
222 errx(EX_IOERR, "firmware activate request returned error");
228 firmware(const struct cmd *f, int argc, char *argv[])
230 int fd = -1;
258 "Neither a replace ([-f path_to_firmware]) nor "
259 "activate ([-a]) firmware image action\n"
285 "controller does not support firmware activate/download");
302 "slot %d does not contain valid firmware,\n"
303 "try 'nvmecontrol logpage -p 3 %s' to get a list "
312 "firmware image (%s) to controller %s.\n"
314 "overwrite an existing firmware image.\n",
317 printf("You are about to activate a new firmware "
322 printf("You are about to download firmware image "
325 "overwrite an existing firmware image.\n",
352 printf("New firmware image activated but requires "
353 "conventional reset (i.e. reboot) to "
356 printf("New firmware image activated and will take "
357 "effect after next controller reset.\n"
358 "Controller reset can be initiated via "
359 "'nvmecontrol reset %s'\n",