mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-09 10:09:11 +00:00
dmaengine: idxd: fix opcap sysfs attribute output
[ Upstream commitea6a5735d2
] The operation capability register is 256bits. The current output only prints out the first 64bits. Fix to output the entire 256bits. The current code omits operation caps from IAX devices. Fixes:c52ca47823
("dmaengine: idxd: add configuration component of driver") Reported-by: Lucas Van <lucas.van@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/161645624963.2003736.829798666998490151.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0e3f147551
commit
db23b7b5ca
1 changed files with 7 additions and 1 deletions
|
@ -1259,8 +1259,14 @@ static ssize_t op_cap_show(struct device *dev,
|
||||||
{
|
{
|
||||||
struct idxd_device *idxd =
|
struct idxd_device *idxd =
|
||||||
container_of(dev, struct idxd_device, conf_dev);
|
container_of(dev, struct idxd_device, conf_dev);
|
||||||
|
int i, rc = 0;
|
||||||
|
|
||||||
return sprintf(buf, "%#llx\n", idxd->hw.opcap.bits[0]);
|
for (i = 0; i < 4; i++)
|
||||||
|
rc += sysfs_emit_at(buf, rc, "%#llx ", idxd->hw.opcap.bits[i]);
|
||||||
|
|
||||||
|
rc--;
|
||||||
|
rc += sysfs_emit_at(buf, rc, "\n");
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
static DEVICE_ATTR_RO(op_cap);
|
static DEVICE_ATTR_RO(op_cap);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue