hw/nvme: set error status code explicitly for misc commands
authorKlaus Jensen <k.jensen@samsung.com>
Mon, 16 Dec 2024 12:53:09 +0000 (13:53 +0100)
committerKlaus Jensen <k.jensen@samsung.com>
Wed, 26 Feb 2025 11:40:35 +0000 (12:40 +0100)
commit6fc39228ffe9d54388f6d1080b502634df13bb72
treee77264866c1e9f510adf64ed826bdb5a7aee0313
parent304babd9401d8ce8fe139a70fe464332eef2cee0
hw/nvme: set error status code explicitly for misc commands

The nvme_aio_err() does not handle Verify, Compare, Copy and other misc
commands and defaults to setting the error status code to Internal
Device Error. For some of these commands, we know better, so set it
explicitly.

For the commands using the nvme_misc_cb() callback (Copy, Flush, ...),
if no status code has explicitly been set by the lower handlers, default
to Internal Device Error as previously.

Reviewed-by: Jesper Wendel Devantier <foss@defmacro.it>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
hw/nvme/ctrl.c
include/block/nvme.h