summaryrefslogtreecommitdiff
path: root/drivers/scsi/cxlflash/common.h
diff options
context:
space:
mode:
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>2017-04-12 14:13:50 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2017-04-13 22:55:41 -0400
commit78ae028e823701148e4915759459ee79597ea8ec (patch)
tree33bed62cca422ffbe7a37d2244585db649273614 /drivers/scsi/cxlflash/common.h
parent3b225cd32a05b627a6ca366f364a824beaabecc5 (diff)
scsi: cxlflash: Support dynamic number of FC ports
Transition from a static number of FC ports to a value that is derived during probe. For now, a static value is used but this will later be based on the type of card being configured. Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> Signed-off-by: Uma Krishnan <ukrishn@linux.vnet.ibm.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxlflash/common.h')
-rw-r--r--drivers/scsi/cxlflash/common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/cxlflash/common.h b/drivers/scsi/cxlflash/common.h
index 3ff05f15b417..6a04867a0eec 100644
--- a/drivers/scsi/cxlflash/common.h
+++ b/drivers/scsi/cxlflash/common.h
@@ -25,7 +25,9 @@
extern const struct file_operations cxlflash_cxl_fops;
-#define MAX_CONTEXT CXLFLASH_MAX_CONTEXT /* num contexts per afu */
+#define MAX_CONTEXT CXLFLASH_MAX_CONTEXT /* num contexts per afu */
+#define NUM_FC_PORTS CXLFLASH_NUM_FC_PORTS /* ports per AFU */
+#define MAX_FC_PORTS CXLFLASH_MAX_FC_PORTS /* ports per AFU */
#define CXLFLASH_BLOCK_SIZE 4096 /* 4K blocks */
#define CXLFLASH_MAX_XFER_SIZE 16777216 /* 16MB transfer */
@@ -98,6 +100,7 @@ struct cxlflash_cfg {
struct pci_dev *dev;
struct pci_device_id *dev_id;
struct Scsi_Host *host;
+ int num_fc_ports;
ulong cxlflash_regs_pci;
@@ -118,7 +121,7 @@ struct cxlflash_cfg {
struct file_operations cxl_fops;
/* Parameters that are LUN table related */
- int last_lun_index[CXLFLASH_NUM_FC_PORTS];
+ int last_lun_index[MAX_FC_PORTS];
int promote_lun_index;
struct list_head lluns; /* list of llun_info structs */