Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_da.c
Show First 20 Lines • Show All 2,869 Lines • ▼ Show 20 Lines | daregister(struct cam_periph *periph, void *arg) | ||||
strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); | strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); | ||||
cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], | cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], | ||||
cgd->inq_data.product, sizeof(cgd->inq_data.product), | cgd->inq_data.product, sizeof(cgd->inq_data.product), | ||||
sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); | sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); | ||||
softc->disk->d_hba_vendor = cpi.hba_vendor; | softc->disk->d_hba_vendor = cpi.hba_vendor; | ||||
softc->disk->d_hba_device = cpi.hba_device; | softc->disk->d_hba_device = cpi.hba_device; | ||||
softc->disk->d_hba_subvendor = cpi.hba_subvendor; | softc->disk->d_hba_subvendor = cpi.hba_subvendor; | ||||
softc->disk->d_hba_subdevice = cpi.hba_subdevice; | softc->disk->d_hba_subdevice = cpi.hba_subdevice; | ||||
snprintf(softc->disk->d_attachment, sizeof(softc->disk->d_attachment), | |||||
"%s%d", cpi.dev_name, cpi.unit_number); | |||||
/* | /* | ||||
* Acquire a reference to the periph before we register with GEOM. | * Acquire a reference to the periph before we register with GEOM. | ||||
* We'll release this reference once GEOM calls us back (via | * We'll release this reference once GEOM calls us back (via | ||||
* dadiskgonecb()) telling us that our provider has been freed. | * dadiskgonecb()) telling us that our provider has been freed. | ||||
*/ | */ | ||||
if (da_periph_acquire(periph, DA_REF_GEOM) != 0) { | if (da_periph_acquire(periph, DA_REF_GEOM) != 0) { | ||||
xpt_print(periph->path, "%s: lost periph during " | xpt_print(periph->path, "%s: lost periph during " | ||||
▲ Show 20 Lines • Show All 3,664 Lines • Show Last 20 Lines |