mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04: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:
@@ -320,9 +320,12 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
|
||||
goto err;
|
||||
|
||||
rc = idxd_wq_add_cdev(wq);
|
||||
if (rc < 0)
|
||||
if (rc < 0) {
|
||||
idxd->cmd_status = IDXD_SCMD_CDEV_ERR;
|
||||
goto err_cdev;
|
||||
}
|
||||
|
||||
idxd->cmd_status = 0;
|
||||
mutex_unlock(&wq->wq_lock);
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user