PERFORCE change 165388 for review

Alexander Motin mav at FreeBSD.org
Mon Jun 29 11:47:57 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=165388

Change 165388 by mav at mav_mavbook on 2009/06/29 11:46:55

	Add user-level memory map/unmap support for XPT_ATA_IO.

Affected files ...

.. //depot/projects/scottl-camlock/src/sys/cam/cam_periph.c#30 edit
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#28 edit

Differences ...

==== //depot/projects/scottl-camlock/src/sys/cam/cam_periph.c#30 (text+ko) ====

@@ -604,6 +604,15 @@
 		dirs[0] = ccb->ccb_h.flags & CAM_DIR_MASK;
 		numbufs = 1;
 		break;
+	case XPT_ATA_IO:
+		if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE)
+			return(0);
+
+		data_ptrs[0] = &ccb->ataio.data_ptr;
+		lengths[0] = ccb->ataio.dxfer_len;
+		dirs[0] = ccb->ccb_h.flags & CAM_DIR_MASK;
+		numbufs = 1;
+		break;
 	default:
 		return(EINVAL);
 		break; /* NOTREACHED */
@@ -739,6 +748,10 @@
 		data_ptrs[0] = &ccb->csio.data_ptr;
 		numbufs = min(mapinfo->num_bufs_used, 1);
 		break;
+	case XPT_ATA_IO:
+		data_ptrs[0] = &ccb->ataio.data_ptr;
+		numbufs = min(mapinfo->num_bufs_used, 1);
+		break;
 	default:
 		/* allow ourselves to be swapped once again */
 		PRELE(curproc);

==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#28 (text+ko) ====

@@ -528,7 +528,8 @@
 	 * ready), it will save a few cycles if we check for it here.
 	 */
 	if (((ccb->ccb_h.flags & CAM_DATA_PHYS) == 0)
-	 && (((ccb->ccb_h.func_code == XPT_SCSI_IO)
+	 && (((ccb->ccb_h.func_code == XPT_SCSI_IO ||
+	       ccb->ccb_h.func_code == XPT_ATA_IO)
 	    && ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE))
 	  || (ccb->ccb_h.func_code == XPT_DEV_MATCH))) {
 


More information about the p4-projects mailing list