FreeBSD/sys/cam/ctl/scsi_ctl.c
/*
 * Datamove/done routine called by CTL.  Put ourselves on the queue to
 * receive a CCB from CAM so we can queue the continue I/O request down
 * to the adapter.
 */
Datamove/done routine called by CTL.  Put ourselves on the queue to
receive a CCB from CAM so we can queue the continue I/O request down
to the adapter.
Datamove / done routine called by CTL . Put ourselves on the queue to receive a CCB from CAM so we can queue the continue I / O request down to the adapter .
static void
ctlfe_datamove(union ctl_io *io)
{
	union ccb *ccb;
	struct cam_periph *periph;
	struct ctlfe_lun_softc *softc;
	KASSERT(io->io_hdr.io_type == CTL_IO_SCSI,
	    ("Unexpected io_type (%d) in ctlfe_datamove", io->io_hdr.io_type));
	ccb = io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr;
	periph = xpt_path_periph(ccb->ccb_h.path);
	cam_periph_lock(periph);
	softc = (struct ctlfe_lun_softc *)periph->softc;
	io->io_hdr.flags |= CTL_FLAG_DMA_QUEUED;
	if ((io->io_hdr.status & CTL_STATUS_MASK) != CTL_STATUS_NONE)
		io->io_hdr.flags |= CTL_FLAG_STATUS_QUEUED;
	TAILQ_INSERT_TAIL(&softc->work_queue, &ccb->ccb_h,
			  periph_links.tqe);
	xpt_schedule(periph,  1);
	cam_periph_unlock(periph);
}
static void ctlfe_datamove ( union ctl_io * io ) { union ccb * ccb ; struct cam_periph * periph ; struct ctlfe_lun_softc * softc ; KASSERT ( io -> io_hdr . io_type == CTL_IO_SCSI , ( " " , io -> io_hdr . io_type ) ) ; ccb = io -> io_hdr . ctl_private [ CTL_PRIV_FRONTEND ] . ptr ; periph = xpt_path_periph ( ccb -> ccb_h . path ) ; cam_periph_lock ( periph ) ; softc = ( struct ctlfe_lun_softc * ) periph -> softc ; io -> io_hdr . flags |= CTL_FLAG_DMA_QUEUED ; if ( ( io -> io_hdr . status & CTL_STATUS_MASK ) != CTL_STATUS_NONE ) io -> io_hdr . flags |= CTL_FLAG_STATUS_QUEUED ; TAILQ_INSERT_TAIL ( & softc -> work_queue , & ccb -> ccb_h , periph_links . tqe ) ; xpt_schedule ( periph , 1 ) ; cam_periph_unlock ( periph ) ; }
Datamove/done routine called by CTL.
Datamove / done routine called by CTL .
/*priority*/