summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-01-05 22:40:28 +0000
committermav <mav@FreeBSD.org>2014-01-05 22:40:28 +0000
commita5ea679e9359acd69373a4f1a1ba85faf82891a9 (patch)
treea8169245bb3c81b2a70c0adf732ec8cfd362da35 /sys
parenteb69a5b0d10751893c78f04bb85fea20a4d053a2 (diff)
downloadFreeBSD-src-a5ea679e9359acd69373a4f1a1ba85faf82891a9.zip
FreeBSD-src-a5ea679e9359acd69373a4f1a1ba85faf82891a9.tar.gz
MFC r256826:
Fix several target mode SIMs to not blindly clear ccb_h.flags field of ATIO CCBs. Not all CCB flags there belong to them.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/aic7xxx/aic79xx.c4
-rw-r--r--sys/dev/aic7xxx/aic7xxx.c4
-rw-r--r--sys/dev/firewire/sbp_targ.c2
-rw-r--r--sys/dev/isp/isp_freebsd.c17
-rw-r--r--sys/dev/mpt/mpt_cam.c3
5 files changed, 14 insertions, 16 deletions
diff --git a/sys/dev/aic7xxx/aic79xx.c b/sys/dev/aic7xxx/aic79xx.c
index f19cdb5..c403c09 100644
--- a/sys/dev/aic7xxx/aic79xx.c
+++ b/sys/dev/aic7xxx/aic79xx.c
@@ -10342,9 +10342,9 @@ ahd_handle_target_cmd(struct ahd_softc *ahd, struct target_cmd *cmd)
/* Tag was included */
atio->tag_action = *byte++;
atio->tag_id = *byte++;
- atio->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atio->ccb_h.flags |= CAM_TAG_ACTION_VALID;
} else {
- atio->ccb_h.flags = 0;
+ atio->ccb_h.flags &= ~CAM_TAG_ACTION_VALID;
}
byte++;
diff --git a/sys/dev/aic7xxx/aic7xxx.c b/sys/dev/aic7xxx/aic7xxx.c
index f5bd269..e1428e9 100644
--- a/sys/dev/aic7xxx/aic7xxx.c
+++ b/sys/dev/aic7xxx/aic7xxx.c
@@ -7842,9 +7842,9 @@ ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd)
/* Tag was included */
atio->tag_action = *byte++;
atio->tag_id = *byte++;
- atio->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atio->ccb_h.flags |= CAM_TAG_ACTION_VALID;
} else {
- atio->ccb_h.flags = 0;
+ atio->ccb_h.flags &= ~CAM_TAG_ACTION_VALID;
}
byte++;
diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c
index 34a75cb..f3434dd 100644
--- a/sys/dev/firewire/sbp_targ.c
+++ b/sys/dev/firewire/sbp_targ.c
@@ -1483,7 +1483,7 @@ sbp_targ_cmd_handler(struct fw_xfer *xfer)
atio->tag_id = orbi->orb_lo;
atio->init_id = orbi->login->id;
- atio->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atio->ccb_h.flags |= CAM_TAG_ACTION_VALID;
bytes = (u_char *)&orb[5];
if (debug)
printf("%s: %p %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n",
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index a8b118e..1d0da03 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -2286,9 +2286,9 @@ isp_handle_platform_atio(ispsoftc_t *isp, at_entry_t *aep)
atiop->ccb_h.target_id = aep->at_tgt;
atiop->ccb_h.target_lun = aep->at_lun;
if (aep->at_flags & AT_NODISC) {
- atiop->ccb_h.flags = CAM_DIS_DISCONNECT;
+ atiop->ccb_h.flags |= CAM_DIS_DISCONNECT;
} else {
- atiop->ccb_h.flags = 0;
+ atiop->ccb_h.flags &= ~CAM_DIS_DISCONNECT;
}
if (status & QLTM_SVALID) {
@@ -2456,15 +2456,15 @@ isp_handle_platform_atio2(ispsoftc_t *isp, at2_entry_t *aep)
atiop->tag_id = atp->tag;
switch (aep->at_taskflags & ATIO2_TC_ATTR_MASK) {
case ATIO2_TC_ATTR_SIMPLEQ:
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
atiop->tag_action = MSG_SIMPLE_Q_TAG;
break;
case ATIO2_TC_ATTR_HEADOFQ:
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
atiop->tag_action = MSG_HEAD_OF_Q_TAG;
break;
case ATIO2_TC_ATTR_ORDERED:
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
atiop->tag_action = MSG_ORDERED_Q_TAG;
break;
case ATIO2_TC_ATTR_ACAQ: /* ?? */
@@ -2676,15 +2676,15 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t *aep)
atiop->tag_id = atp->tag;
switch (aep->at_cmnd.fcp_cmnd_task_attribute & FCP_CMND_TASK_ATTR_MASK) {
case FCP_CMND_TASK_ATTR_SIMPLE:
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
atiop->tag_action = MSG_SIMPLE_Q_TAG;
break;
case FCP_CMND_TASK_ATTR_HEAD:
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
atiop->tag_action = MSG_HEAD_OF_Q_TAG;
break;
case FCP_CMND_TASK_ATTR_ORDERED:
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
atiop->tag_action = MSG_ORDERED_Q_TAG;
break;
default:
@@ -5004,7 +5004,6 @@ isp_action(struct cam_sim *sim, union ccb *ccb)
}
ccb->ccb_h.spriv_field0 = 0;
ccb->ccb_h.spriv_ptr1 = isp;
- ccb->ccb_h.flags = 0;
if (ccb->ccb_h.func_code == XPT_ACCEPT_TARGET_IO) {
if (ccb->atio.tag_id) {
diff --git a/sys/dev/mpt/mpt_cam.c b/sys/dev/mpt/mpt_cam.c
index cb82957..fa68d6b 100644
--- a/sys/dev/mpt/mpt_cam.c
+++ b/sys/dev/mpt/mpt_cam.c
@@ -3683,7 +3683,6 @@ mpt_action(struct cam_sim *sim, union ccb *ccb)
lun_id_t lun = ccb->ccb_h.target_lun;
ccb->ccb_h.sim_priv.entries[0].field = 0;
ccb->ccb_h.sim_priv.entries[1].ptr = mpt;
- ccb->ccb_h.flags = 0;
if (lun == CAM_LUN_WILDCARD) {
if (ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) {
@@ -5156,7 +5155,7 @@ mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc)
tgt->tag_id = atiop->tag_id;
if (tag_action) {
atiop->tag_action = tag_action;
- atiop->ccb_h.flags = CAM_TAG_ACTION_VALID;
+ atiop->ccb_h.flags |= CAM_TAG_ACTION_VALID;
}
if (mpt->verbose >= MPT_PRT_DEBUG) {
int i;
OpenPOWER on IntegriCloud