qla2xxx: Let DPORT be enabled purely by nvram.
authorJoe Carnuccio <joe.carnuccio@qlogic.com>
Wed, 6 Jul 2016 15:14:28 +0000 (11:14 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Jul 2016 19:35:48 +0000 (15:35 -0400)
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_dbg.c
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_init.c

index 2a1eb027e162da0a432b2999e8874077af51761a..eebd1a585cdd7c6ab0212d9e2c8c821332640ab8 100644 (file)
@@ -11,7 +11,7 @@
  * ----------------------------------------------------------------------
  * |             Level            |   Last Value Used  |     Holes     |
  * ----------------------------------------------------------------------
- * | Module Init and Probe        |       0x018f       | 0x0146         |
+ * | Module Init and Probe        |       0x0191       | 0x0146         |
  * |                              |                    | 0x015b-0x0160 |
  * |                              |                    | 0x016e                |
  * | Mailbox commands             |       0x1196       |               |
index 7d4bd7de3e9c8be58c7e9561de4256b6e2f608a8..c04d83e6a8b606f6df629c31c0bb059c16e8530d 100644 (file)
@@ -3029,6 +3029,7 @@ struct qla_hw_data {
                uint32_t        mr_reset_hdlr_active:1;
                uint32_t        mr_intr_valid:1;
 
+               uint32_t        dport_enabled:1;
                uint32_t        fawwpn_enabled:1;
                uint32_t        exlogins_enabled:1;
                uint32_t        exchoffld_enabled:1;
index 68e9309aa5d4a382198ba3cd17ca6c16d3dd8a3a..5b09296b46a3058f9c938990274d158b508af884 100644 (file)
@@ -2288,13 +2288,13 @@ qla2x00_init_rings(scsi_qla_host_t *vha)
                mid_init_cb->options = cpu_to_le16(BIT_1);
                mid_init_cb->init_cb.execution_throttle =
                    cpu_to_le16(ha->cur_fw_xcb_count);
-               /* D-Port Status */
-               if (IS_DPORT_CAPABLE(ha))
-                       mid_init_cb->init_cb.firmware_options_1 |=
-                           cpu_to_le16(BIT_7);
-               /* Enable FA-WWPN */
+               ha->flags.dport_enabled =
+                   (mid_init_cb->init_cb.firmware_options_1 & BIT_7) != 0;
+               ql_dbg(ql_dbg_init, vha, 0x0191, "DPORT Support: %s.\n",
+                   (ha->flags.dport_enabled) ? "enabled" : "disabled");
+               /* FA-WWPN Status */
                ha->flags.fawwpn_enabled =
-                   (mid_init_cb->init_cb.firmware_options_1 & BIT_6) ? 1 : 0;
+                   (mid_init_cb->init_cb.firmware_options_1 & BIT_6) != 0;
                ql_dbg(ql_dbg_init, vha, 0x0141, "FA-WWPN Support: %s.\n",
                    (ha->flags.fawwpn_enabled) ? "enabled" : "disabled");
        }