diff options
author | Dave Jiang <dave.jiang@intel.com> | 2021-10-12 11:01:59 -0700 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-10-18 12:04:51 +0530 |
commit | 79c4c3db7d86b9bec94562275efc82e58f3d0132 (patch) | |
tree | 64ca2aa4ed04eddcb14b345b2edb84456386e50f /drivers/dma | |
parent | adec566b05288f2787a1f88dbaf77ed8b0c644fa (diff) | |
download | linux-79c4c3db7d86b9bec94562275efc82e58f3d0132.tar.bz2 |
dmaengine: idxd: check GENCAP config support for gencfg register
DSA spec 1.2 has moved the GENCFG register under the GENCAP configuration
support with respect to writability. Add check in driver before writing to
GENCFG register.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163406171896.1303830.11217958011385656998.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/idxd/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index cbbfa17d8d11..27612329f510 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -791,7 +791,7 @@ static int idxd_groups_config_write(struct idxd_device *idxd) struct device *dev = &idxd->pdev->dev; /* Setup bandwidth token limit */ - if (idxd->token_limit) { + if (idxd->hw.gen_cap.config_en && idxd->token_limit) { reg.bits = ioread32(idxd->reg_base + IDXD_GENCFG_OFFSET); reg.token_limit = idxd->token_limit; iowrite32(reg.bits, idxd->reg_base + IDXD_GENCFG_OFFSET); |