summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_fw.h
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2007-11-12 10:30:58 -0800
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 18:22:45 -0600
commiteb66dc60be5a72bc940458a5adfd400e4d810d49 (patch)
tree677baf5655d9ae312e877cab4adb33a1319e9993 /drivers/scsi/qla2xxx/qla_fw.h
parent06e23b7470ca7974b0ca8150c5415b55b5ea2a99 (diff)
downloadop-kernel-dev-eb66dc60be5a72bc940458a5adfd400e4d810d49.zip
op-kernel-dev-eb66dc60be5a72bc940458a5adfd400e4d810d49.tar.gz
[SCSI] qla2xxx: Correct NPIV support for recent ISPs.
Firmware will export to software the maximum number of vports supported for any given firmware version and ISP type. Use this information rather than the current hardcoding of limitations within the driver. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_fw.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_fw.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h
index 25364b1..69a5e31 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -954,7 +954,15 @@ struct device_reg_24xx {
/* MID Support ***************************************************************/
-#define MAX_MID_VPS 125
+#define MIN_MULTI_ID_FABRIC 64 /* Must be power-of-2. */
+#define MAX_MULTI_ID_FABRIC 256 /* ... */
+
+#define for_each_mapped_vp_idx(_ha, _idx) \
+ for (_idx = find_next_bit((_ha)->vp_idx_map, \
+ (_ha)->max_npiv_vports + 1, 1); \
+ _idx <= (_ha)->max_npiv_vports; \
+ _idx = find_next_bit((_ha)->vp_idx_map, \
+ (_ha)->max_npiv_vports + 1, _idx + 1)) \
struct mid_conf_entry_24xx {
uint16_t reserved_1;
@@ -982,7 +990,7 @@ struct mid_init_cb_24xx {
uint16_t count;
uint16_t options;
- struct mid_conf_entry_24xx entries[MAX_MID_VPS];
+ struct mid_conf_entry_24xx entries[MAX_MULTI_ID_FABRIC];
};
@@ -1002,10 +1010,6 @@ struct mid_db_entry_24xx {
uint8_t reserved_1;
};
-struct mid_db_24xx {
- struct mid_db_entry_24xx entries[MAX_MID_VPS];
-};
-
/*
* Virtual Fabric ID type definition.
*/
OpenPOWER on IntegriCloud