Date: Mon, 29 Jun 2009 11:47:55 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 165388 for review Message-ID: <200906291147.n5TBltBH003095@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165388 Change 165388 by mav@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))) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906291147.n5TBltBH003095>