aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_fw.h
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2007-11-12 13:30:58 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-11 19:22:45 -0500
commiteb66dc60be5a72bc940458a5adfd400e4d810d49 (patch)
tree677baf5655d9ae312e877cab4adb33a1319e9993 /drivers/scsi/qla2xxx/qla_fw.h
parent06e23b7470ca7974b0ca8150c5415b55b5ea2a99 (diff)
[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 25364b1aaf1..69a5e31dd93 100644
--- a/drivers/scsi/qla2xxx/qla_fw.h
+++ b/drivers/scsi/qla2xxx/qla_fw.h
@@ -954,7 +954,15 @@ struct device_reg_24xx {
954 954
955/* MID Support ***************************************************************/ 955/* MID Support ***************************************************************/
956 956
957#define MAX_MID_VPS 125 957#define MIN_MULTI_ID_FABRIC 64 /* Must be power-of-2. */
958#define MAX_MULTI_ID_FABRIC 256 /* ... */
959
960#define for_each_mapped_vp_idx(_ha, _idx) \
961 for (_idx = find_next_bit((_ha)->vp_idx_map, \
962 (_ha)->max_npiv_vports + 1, 1); \
963 _idx <= (_ha)->max_npiv_vports; \
964 _idx = find_next_bit((_ha)->vp_idx_map, \
965 (_ha)->max_npiv_vports + 1, _idx + 1)) \
958 966
959struct mid_conf_entry_24xx { 967struct mid_conf_entry_24xx {
960 uint16_t reserved_1; 968 uint16_t reserved_1;
@@ -982,7 +990,7 @@ struct mid_init_cb_24xx {
982 uint16_t count; 990 uint16_t count;
983 uint16_t options; 991 uint16_t options;
984 992
985 struct mid_conf_entry_24xx entries[MAX_MID_VPS]; 993 struct mid_conf_entry_24xx entries[MAX_MULTI_ID_FABRIC];
986}; 994};
987 995
988 996
@@ -1002,10 +1010,6 @@ struct mid_db_entry_24xx {
1002 uint8_t reserved_1; 1010 uint8_t reserved_1;
1003}; 1011};
1004 1012
1005struct mid_db_24xx {
1006 struct mid_db_entry_24xx entries[MAX_MID_VPS];
1007};
1008
1009 /* 1013 /*
1010 * Virtual Fabric ID type definition. 1014 * Virtual Fabric ID type definition.
1011 */ 1015 */