[PATCH] [2/106] qla2xxx: Make the FC port capability mutual exclusive.

From: Andi Kleen
Date: Tue Apr 26 2011 - 17:41:36 EST


2.6.35-longterm review patch. If anyone has any objections, please let me know.

------------------
From: Andrew Vasquez <andrew.vasquez@xxxxxxxxxx>

[ upstream commit b0cd579cde8ee0c7ed52239531ba09bcbc5b54c2 ]

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@xxxxxxxxxx>
Signed-off-by: James Bottomley <James.Bottomley@xxxxxxx>
Acked-by: Madhuranath Iyengar <Madhu.Iyengar@xxxxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

Index: linux-2.6.35.y/drivers/scsi/qla2xxx/qla_isr.c
===================================================================
--- linux-2.6.35.y.orig/drivers/scsi/qla2xxx/qla_isr.c
+++ linux-2.6.35.y/drivers/scsi/qla2xxx/qla_isr.c
@@ -1119,9 +1119,9 @@ qla24xx_logio_entry(scsi_qla_host_t *vha
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])
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/