diff options
author | Uma Krishnan <ukrishn@linux.vnet.ibm.com> | 2018-03-26 18:31:44 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-04-19 01:32:48 +0200 |
commit | 41df40d817781c9052c8755b612479445e5db638 (patch) | |
tree | 248e7a18d36fd4ec60d128cee208ce10b1ebb836 /drivers/scsi/cxlflash/ocxl_hw.c | |
parent | scsi: cxlflash: Setup AFU acTag range (diff) | |
download | linux-41df40d817781c9052c8755b612479445e5db638.tar.xz linux-41df40d817781c9052c8755b612479445e5db638.zip |
scsi: cxlflash: Setup AFU PASID
Per the OCXL specification, the maximum PASID supported by the AFU is
indicated by a field within the configuration space. Similar to acTags,
implementations can choose to use any sub-range of PASID within their assigned
range. For cxlflash, the entire range is used.
Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com>
Acked-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash/ocxl_hw.c')
-rw-r--r-- | drivers/scsi/cxlflash/ocxl_hw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/cxlflash/ocxl_hw.c b/drivers/scsi/cxlflash/ocxl_hw.c index 105712b29b2e..44688af7af3a 100644 --- a/drivers/scsi/cxlflash/ocxl_hw.c +++ b/drivers/scsi/cxlflash/ocxl_hw.c @@ -118,6 +118,9 @@ static int ocxlflash_config_afu(struct pci_dev *pdev, struct ocxl_hw_afu *afu) dev_dbg(dev, "%s: acTag base=%d enabled=%d\n", __func__, base, count); afu->afu_actag_base = base; afu->afu_actag_enabled = count; + afu->max_pasid = 1 << acfg->pasid_supported_log; + + ocxl_config_set_afu_pasid(pdev, pos, 0, acfg->pasid_supported_log); out: return rc; } |