Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_pt.c
Show First 20 Lines • Show All 271 Lines • ▼ Show 20 Lines | ptctor(struct cam_periph *periph, void *arg) | ||||
LIST_INIT(&softc->pending_ccbs); | LIST_INIT(&softc->pending_ccbs); | ||||
softc->state = PT_STATE_NORMAL; | softc->state = PT_STATE_NORMAL; | ||||
bioq_init(&softc->bio_queue); | bioq_init(&softc->bio_queue); | ||||
softc->io_timeout = SCSI_PT_DEFAULT_TIMEOUT * 1000; | softc->io_timeout = SCSI_PT_DEFAULT_TIMEOUT * 1000; | ||||
periph->softc = softc; | periph->softc = softc; | ||||
bzero(&cpi, sizeof(cpi)); | xpt_path_inq(&cpi, periph->path, CAM_PRIORITY_NORMAL); | ||||
xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL); | |||||
cpi.ccb_h.func_code = XPT_PATH_INQ; | |||||
xpt_action((union ccb *)&cpi); | |||||
cam_periph_unlock(periph); | cam_periph_unlock(periph); | ||||
make_dev_args_init(&args); | make_dev_args_init(&args); | ||||
args.mda_devsw = &pt_cdevsw; | args.mda_devsw = &pt_cdevsw; | ||||
args.mda_unit = periph->unit_number; | args.mda_unit = periph->unit_number; | ||||
args.mda_uid = UID_ROOT; | args.mda_uid = UID_ROOT; | ||||
args.mda_gid = GID_OPERATOR; | args.mda_gid = GID_OPERATOR; | ||||
▲ Show 20 Lines • Show All 349 Lines • Show Last 20 Lines |