mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
dmanegine: idxd: add software command status
Enabling device and wq returns standard errno and that does not provide enough details to indicate what exactly failed. The hardware command status is only 8bits. Expand the command status to 32bits and use the upper 16 bits to define software errors to provide more details on the exact failure. Bit 31 will be used to indicate the error is software set as the driver is using some of the spec defined hardware error as well. Cc: Ramesh Thomas <ramesh.thomas@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/162681373579.1968485.5891788397526827892.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
a9c171527a
commit
125d10373a
7 changed files with 63 additions and 6 deletions
|
@ -9,6 +9,29 @@
|
|||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
/* Driver command error status */
|
||||
enum idxd_scmd_stat {
|
||||
IDXD_SCMD_DEV_ENABLED = 0x80000010,
|
||||
IDXD_SCMD_DEV_NOT_ENABLED = 0x80000020,
|
||||
IDXD_SCMD_WQ_ENABLED = 0x80000021,
|
||||
IDXD_SCMD_DEV_DMA_ERR = 0x80020000,
|
||||
IDXD_SCMD_WQ_NO_GRP = 0x80030000,
|
||||
IDXD_SCMD_WQ_NO_NAME = 0x80040000,
|
||||
IDXD_SCMD_WQ_NO_SVM = 0x80050000,
|
||||
IDXD_SCMD_WQ_NO_THRESH = 0x80060000,
|
||||
IDXD_SCMD_WQ_PORTAL_ERR = 0x80070000,
|
||||
IDXD_SCMD_WQ_RES_ALLOC_ERR = 0x80080000,
|
||||
IDXD_SCMD_PERCPU_ERR = 0x80090000,
|
||||
IDXD_SCMD_DMA_CHAN_ERR = 0x800a0000,
|
||||
IDXD_SCMD_CDEV_ERR = 0x800b0000,
|
||||
IDXD_SCMD_WQ_NO_SWQ_SUPPORT = 0x800c0000,
|
||||
IDXD_SCMD_WQ_NONE_CONFIGURED = 0x800d0000,
|
||||
IDXD_SCMD_WQ_NO_SIZE = 0x800e0000,
|
||||
};
|
||||
|
||||
#define IDXD_SCMD_SOFTERR_MASK 0x80000000
|
||||
#define IDXD_SCMD_SOFTERR_SHIFT 16
|
||||
|
||||
/* Descriptor flags */
|
||||
#define IDXD_OP_FLAG_FENCE 0x0001
|
||||
#define IDXD_OP_FLAG_BOF 0x0002
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue