Changeset View
Changeset View
Standalone View
Standalone View
head/sys/cam/scsi/scsi_sg.c
Show First 20 Lines • Show All 321 Lines • ▼ Show 20 Lines | sgregister(struct cam_periph *periph, void *arg) | ||||
softc->sg_user_timeout = SG_DEFAULT_TIMEOUT; | softc->sg_user_timeout = SG_DEFAULT_TIMEOUT; | ||||
TAILQ_INIT(&softc->rdwr_done); | TAILQ_INIT(&softc->rdwr_done); | ||||
periph->softc = softc; | periph->softc = softc; | ||||
xpt_path_inq(&cpi, periph->path); | xpt_path_inq(&cpi, periph->path); | ||||
if (cpi.maxio == 0) | if (cpi.maxio == 0) | ||||
softc->maxio = DFLTPHYS; /* traditional default */ | softc->maxio = DFLTPHYS; /* traditional default */ | ||||
else if (cpi.maxio > MAXPHYS) | else if (cpi.maxio > maxphys) | ||||
softc->maxio = MAXPHYS; /* for safety */ | softc->maxio = maxphys; /* for safety */ | ||||
else | else | ||||
softc->maxio = cpi.maxio; /* real value */ | softc->maxio = cpi.maxio; /* real value */ | ||||
/* | /* | ||||
* We pass in 0 for all blocksize, since we don't know what the | * We pass in 0 for all blocksize, since we don't know what the | ||||
* blocksize of the device is, if it even has a blocksize. | * blocksize of the device is, if it even has a blocksize. | ||||
*/ | */ | ||||
cam_periph_unlock(periph); | cam_periph_unlock(periph); | ||||
▲ Show 20 Lines • Show All 677 Lines • Show Last 20 Lines |