Skip to contentSkip to conversation

bfa: fix test in bfad_os_fc_host_init()

PATCH In review Roel Kluin 2 participants 2 messages Oct 15, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 bfa: fix test in bfad_os_fc_host_init()

BFA_PORT_ROLE_FCP_IPFC is 0x04 so this always evaluates to true

---
see vi drivers/scsi/bfa/include/defs/bfa_defs_port.h +45 was this intended?

drivers/scsi/bfa/bfad_im.c +1 -1
index 158c992..55d012a 100644
@@ -948,7 +948,7 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port)
 	if (bfad_supported_fc4s & (BFA_PORT_ROLE_FCP_IM | BFA_PORT_ROLE_FCP_TM))
 		/* For FCP type 0x08 */
 		fc_host_supported_fc4s(host)[2] = 1;
-	if (bfad_supported_fc4s | BFA_PORT_ROLE_FCP_IPFC)
+	if (bfad_supported_fc4s & BFA_PORT_ROLE_FCP_IPFC)
 		/* For LLC/SNAP type 0x05 */
 		fc_host_supported_fc4s(host)[3] = 0x20;
 	/* For fibre channel services type 0x20 */
#1 lore raw
Quoted 19 lines

---
see vi drivers/scsi/bfa/include/defs/bfa_defs_port.h +45 was this intended?

drivers/scsi/bfa/bfad_im.c +1 -1
index 158c992..55d012a 100644
@@ -948,7 +948,7 @@ bfad_os_fc_host_init(struct bfad_im_port_s *im_port)
 	if (bfad_supported_fc4s & (BFA_PORT_ROLE_FCP_IM |
 BFA_PORT_ROLE_FCP_TM))
 		/* For FCP type 0x08 */
 		fc_host_supported_fc4s(host)[2] = 1;
-	if (bfad_supported_fc4s | BFA_PORT_ROLE_FCP_IPFC)
+	if (bfad_supported_fc4s & BFA_PORT_ROLE_FCP_IPFC)
 		/* For LLC/SNAP type 0x05 */
 		fc_host_supported_fc4s(host)[3] = 0x20;
Quoted 1 line

/* For fibre channel services type 0x20 */

This is a bug. Thanks!

Jing