svn commit: r320493 - head/sys/cam/ctl

Alexander Motin mav at FreeBSD.org
Fri Jun 30 06:34:50 UTC 2017


Author: mav
Date: Fri Jun 30 06:34:49 2017
New Revision: 320493
URL: https://svnweb.freebsd.org/changeset/base/320493

Log:
  Unify INOT/ATIO setup.

Modified:
  head/sys/cam/ctl/scsi_ctl.c

Modified: head/sys/cam/ctl/scsi_ctl.c
==============================================================================
--- head/sys/cam/ctl/scsi_ctl.c	Fri Jun 30 06:10:18 2017	(r320492)
+++ head/sys/cam/ctl/scsi_ctl.c	Fri Jun 30 06:34:49 2017	(r320493)
@@ -523,7 +523,7 @@ ctlferegister(struct cam_periph *periph, void *arg)
 		new_ccb->ccb_h.io_ptr = new_io;
 		LIST_INSERT_HEAD(&softc->atio_list, &new_ccb->ccb_h, periph_links.le);
 
-		xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1);
+		xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE);
 		new_ccb->ccb_h.func_code = XPT_ACCEPT_TARGET_IO;
 		new_ccb->ccb_h.cbfcnp = ctlfedone;
 		new_ccb->ccb_h.flags |= CAM_UNLOCKED;
@@ -570,7 +570,7 @@ ctlferegister(struct cam_periph *periph, void *arg)
 		new_ccb->ccb_h.io_ptr = new_io;
 		LIST_INSERT_HEAD(&softc->inot_list, &new_ccb->ccb_h, periph_links.le);
 
-		xpt_setup_ccb(&new_ccb->ccb_h, periph->path, /*priority*/ 1);
+		xpt_setup_ccb(&new_ccb->ccb_h, periph->path, CAM_PRIORITY_NONE);
 		new_ccb->ccb_h.func_code = XPT_IMMEDIATE_NOTIFY;
 		new_ccb->ccb_h.cbfcnp = ctlfedone;
 		new_ccb->ccb_h.flags |= CAM_UNLOCKED;
@@ -1003,10 +1003,7 @@ ctlfe_requeue_ccb(struct cam_periph *periph, union ccb
 	 * target/lun.  Reset the target and LUN fields back to the wildcard
 	 * values before we send them back down to the SIM.
 	 */
-	if (softc->flags & CTLFE_LUN_WILDCARD) {
-		ccb->ccb_h.target_id = CAM_TARGET_WILDCARD;
-		ccb->ccb_h.target_lun = CAM_LUN_WILDCARD;
-	}
+	xpt_setup_ccb(&ccb->ccb_h, periph->path, CAM_PRIORITY_NONE);
 
 	xpt_action(ccb);
 }


More information about the svn-src-all mailing list