summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/io/fibre-channel
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-05-16 00:27:26 +0100
committerRichard Lowe <richlowe@richlowe.net>2012-06-06 15:35:31 -0400
commit7386f4319a95797d8397f24d609435b2c0e027a6 (patch)
tree1110e536740b482c0846d5fcb143842552e877fd /usr/src/uts/common/io/fibre-channel
parentf0f3ef5a19910089bada873cb30b3f5d88cb9e00 (diff)
downloadillumos-gate-7386f4319a95797d8397f24d609435b2c0e027a6.tar.gz
2562 FCoE iniator mistreats its ints
Reviewed by: Jason King <jason.brian.king@gmail.com> Reviewed by: Garrett D'Amore <garrett@damore.org> Approved by: Garrett D'Amore <garrett@damore.org>
Diffstat (limited to 'usr/src/uts/common/io/fibre-channel')
-rw-r--r--usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c2
-rw-r--r--usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c35
2 files changed, 19 insertions, 18 deletions
diff --git a/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c b/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c
index 6b999192a9..889ee6ac11 100644
--- a/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c
+++ b/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_eth.c
@@ -969,7 +969,7 @@ fcoei_fill_els_fpkt_resp(fcoe_frame_t *frm, fcoei_exchange_t *xch, int size)
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 --git a/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c b/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c
index d1dce9b1f3..abf1c26387 100644
--- a/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c
+++ b/usr/src/uts/common/io/fibre-channel/fca/fcoei/fcoei_lv.c
@@ -1089,16 +1089,16 @@ fcoei_initiate_fcp_cmd(fcoei_exchange_t *xch)
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 @@ fcoei_fill_els_prli_cmd(fc_packet_t *fpkt, fcoe_frame_t *frm)
* 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 @@ fcoei_fill_els_prli_cmd(fc_packet_t *fpkt, fcoe_frame_t *frm)
* 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);
}
/*