# HG changeset patch # User Richard Lowe # Date 1305502046 -3600 # Node ID 3db0c1979163618d9e2d59730ce2cce087c06667 # Parent 351036203e4b02f9596ab1e511ebbc43daea7d56 2562 FCoE iniator mistreats its ints Reviewed by: Jason King Reviewed by: Garrett D'Amore Approved by: Garrett D'Amore diff -r 351036203e4b -r 3db0c1979163 usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c --- a/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c Wed Jun 06 10:01:43 2012 -0700 +++ b/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c Mon May 16 00:27:26 2011 +0100 @@ -969,7 +969,7 @@ prli_acc->image_pair_established = (FCOE_B2V_2(src + offset) & BIT_13) ? 1 : 0; prli_acc->accept_response_code = - FCOE_B2V_2(src + offset) & 0x0F00; + (FCOE_B2V_2(src + offset) & 0x0F00) >> 8; /* * process associator */ diff -r 351036203e4b -r 3db0c1979163 usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c --- a/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c Wed Jun 06 10:01:43 2012 -0700 +++ b/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c Mon May 16 00:27:26 2011 +0100 @@ -1089,16 +1089,16 @@ frm->frm_payload[offset] = fcp_cmd_iu->fcp_cntl.cntl_qtype & 0x07; offset += 1; frm->frm_payload[offset] = - (fcp_cmd_iu->fcp_cntl.cntl_kill_tsk * BIT_7) | - (fcp_cmd_iu->fcp_cntl.cntl_clr_aca * BIT_6) | - (fcp_cmd_iu->fcp_cntl.cntl_reset_tgt * BIT_5) | - (fcp_cmd_iu->fcp_cntl.cntl_reset_lun * BIT_4) | - (fcp_cmd_iu->fcp_cntl.cntl_clr_tsk * BIT_2) | - (fcp_cmd_iu->fcp_cntl.cntl_abort_tsk * BIT_1); + (fcp_cmd_iu->fcp_cntl.cntl_kill_tsk << 7) | + (fcp_cmd_iu->fcp_cntl.cntl_clr_aca << 6) | + (fcp_cmd_iu->fcp_cntl.cntl_reset_tgt << 5) | + (fcp_cmd_iu->fcp_cntl.cntl_reset_lun << 4) | + (fcp_cmd_iu->fcp_cntl.cntl_clr_tsk << 2) | + (fcp_cmd_iu->fcp_cntl.cntl_abort_tsk << 1); offset += 1; frm->frm_payload[offset] = - (fcp_cmd_iu->fcp_cntl.cntl_read_data * BIT_1) | - (fcp_cmd_iu->fcp_cntl.cntl_write_data * BIT_0); + (fcp_cmd_iu->fcp_cntl.cntl_read_data << 1) | + (fcp_cmd_iu->fcp_cntl.cntl_write_data); /* * fcp_cdb */ @@ -1455,9 +1455,10 @@ * PRLI flags, only 3 bits are valid */ offset = 6; - FCOE_V2B_2((fcp_spp->orig_process_assoc_valid * BIT_15) | - (fcp_spp->resp_process_assoc_valid * BIT_14) | - (fcp_spp->establish_image_pair * BIT_13), FPLD + offset); + + FCOE_V2B_2(((fcp_spp->orig_process_assoc_valid << 15) | + (fcp_spp->resp_process_assoc_valid << 14) | + (fcp_spp->establish_image_pair << 13)), FPLD + offset); /* * process associator @@ -1472,12 +1473,12 @@ * FC-4 type */ offset = 16; - FCOE_V2B_4((fcp_spp->retry * BIT_8) | - (fcp_spp->confirmed_compl_allowed * BIT_7) | - (fcp_spp->data_overlay_allowed * BIT_6) | - (fcp_spp->initiator_fn * BIT_5) | (fcp_spp->target_fn * BIT_4) | - (fcp_spp->read_xfer_rdy_disabled * BIT_1) | - (fcp_spp->write_xfer_rdy_disabled * BIT_0), FPLD + offset); + FCOE_V2B_4((fcp_spp->retry << 8) | + (fcp_spp->confirmed_compl_allowed << 7) | + (fcp_spp->data_overlay_allowed << 6) | + (fcp_spp->initiator_fn << 5) | (fcp_spp->target_fn << 4) | + (fcp_spp->read_xfer_rdy_disabled << 1) | + (fcp_spp->write_xfer_rdy_disabled), FPLD + offset); } /*