From owner-svn-src-all@FreeBSD.ORG Mon Oct 21 06:04:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7738F1AE; Mon, 21 Oct 2013 06:04:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 565A52C52; Mon, 21 Oct 2013 06:04:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9L64fnx063237; Mon, 21 Oct 2013 06:04:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9L64edC063231; Mon, 21 Oct 2013 06:04:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201310210604.r9L64edC063231@svn.freebsd.org> From: Alexander Motin Date: Mon, 21 Oct 2013 06:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r256826 - in head/sys/dev: aic7xxx firewire isp mpt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 06:04:41 -0000 Author: mav Date: Mon Oct 21 06:04:39 2013 New Revision: 256826 URL: http://svnweb.freebsd.org/changeset/base/256826 Log: Partial MFproject/camlock r256671: Fix several target mode SIMs to not blindly clear ccb_h.flags field of ATIO CCBs. Not all CCB flags there belong to them. Modified: head/sys/dev/aic7xxx/aic79xx.c head/sys/dev/aic7xxx/aic7xxx.c head/sys/dev/firewire/sbp_targ.c head/sys/dev/isp/isp_freebsd.c head/sys/dev/mpt/mpt_cam.c Modified: head/sys/dev/aic7xxx/aic79xx.c ============================================================================== --- head/sys/dev/aic7xxx/aic79xx.c Mon Oct 21 05:57:36 2013 (r256825) +++ head/sys/dev/aic7xxx/aic79xx.c Mon Oct 21 06:04:39 2013 (r256826) @@ -10343,9 +10343,9 @@ ahd_handle_target_cmd(struct ahd_softc * /* 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++; Modified: head/sys/dev/aic7xxx/aic7xxx.c ============================================================================== --- head/sys/dev/aic7xxx/aic7xxx.c Mon Oct 21 05:57:36 2013 (r256825) +++ head/sys/dev/aic7xxx/aic7xxx.c Mon Oct 21 06:04:39 2013 (r256826) @@ -7843,9 +7843,9 @@ ahc_handle_target_cmd(struct ahc_softc * /* 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++; Modified: head/sys/dev/firewire/sbp_targ.c ============================================================================== --- head/sys/dev/firewire/sbp_targ.c Mon Oct 21 05:57:36 2013 (r256825) +++ head/sys/dev/firewire/sbp_targ.c Mon Oct 21 06:04:39 2013 (r256826) @@ -1483,7 +1483,7 @@ sbp_targ_cmd_handler(struct fw_xfer *xfe 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", Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Mon Oct 21 05:57:36 2013 (r256825) +++ head/sys/dev/isp/isp_freebsd.c Mon Oct 21 06:04:39 2013 (r256826) @@ -2286,9 +2286,9 @@ isp_handle_platform_atio(ispsoftc_t *isp 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 *is 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 *is 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 cc } 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) { Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Mon Oct 21 05:57:36 2013 (r256825) +++ head/sys/dev/mpt/mpt_cam.c Mon Oct 21 06:04:39 2013 (r256826) @@ -3683,7 +3683,6 @@ mpt_action(struct cam_sim *sim, union cc 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, 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;