[SCSI] qla2xxx: Make the FC port capability mutual exclusive.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Fri, 28 May 2010 22:08:22 +0000 (15:08 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Tue, 27 Jul 2010 17:01:23 +0000 (12:01 -0500)
In case of both target and initiator capabilities reported by fc port,
the fc port port capability is made mutualy exclusive with priority given
for target capabilities.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/qla2xxx/qla_isr.c

index e51fc5f..8a60872 100644 (file)
@@ -1133,9 +1133,9 @@ qla24xx_logio_entry(scsi_qla_host_t *vha, struct req_que *req,
                        fcport->port_type = FCT_TARGET;
                        if (iop[0] & BIT_8)
                                fcport->flags |= FCF_FCP2_DEVICE;
-               }
-               if (iop[0] & BIT_5)
+               } else if (iop[0] & BIT_5)
                        fcport->port_type = FCT_INITIATOR;
+
                if (logio->io_parameter[7] || logio->io_parameter[8])
                        fcport->supported_classes |= FC_COS_CLASS2;
                if (logio->io_parameter[9] || logio->io_parameter[10])