FreeBSD/sys/cam/scsi/scsi_target.c
/* Disable this softc's target instance if enabled */
Disable this softc's target instance if enabled
Disable this softc ' s target instance if enabled
static cam_status
targdisable(struct targ_softc *softc)
{
	cam_status status;
	if ((softc->state & TARG_STATE_LUN_ENABLED) == 0)
		return (CAM_REQ_CMP);
	CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, ("targdisable\n"));
	abort_all_pending(softc);
	status = targendislun(softc->path, 0,
			      0, 0);
	if (status == CAM_REQ_CMP)
		softc->state &= ~TARG_STATE_LUN_ENABLED;
	else
		printf("Disable lun failed, status %#x\n", status);
	return (status);
}
static cam_status targdisable ( struct targ_softc * softc ) { cam_status status ; if ( ( softc -> state & TARG_STATE_LUN_ENABLED ) == 0 ) return ( CAM_REQ_CMP ) ; CAM_DEBUG ( softc -> path , CAM_DEBUG_PERIPH , ( " \n " ) ) ; abort_all_pending ( softc ) ; status = targendislun ( softc -> path , 0 , 0 , 0 ) ; if ( status == CAM_REQ_CMP ) softc -> state &= ~ TARG_STATE_LUN_ENABLED ; else printf ( " \n " , status ) ; return ( status ) ; }
Disable this softc's target instance if enabled
Disable this softc ' s target instance if enabled
/* Abort any ccbs pending on the controller */ /* Disable this lun */ /*enable*/ /*grp6_len*/ /*grp7_len*/