Deleted Added
full compact
30c30
< __FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 237478 2012-06-23 12:32:53Z mav $");
---
> __FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 237518 2012-06-24 04:29:03Z ken $");
1235a1236,1239
> /*
> * Callback from GEOM, called when it has finished cleaning up its
> * resources.
> */
1236a1241,1250
> dadiskgonecb(struct disk *dp)
> {
> struct cam_periph *periph;
>
> periph = (struct cam_periph *)dp->d_drv1;
>
> cam_periph_release(periph);
> }
>
> static void
1257a1272,1275
> /*
> * Tell GEOM that we've gone away, we'll get a callback when it is
> * done cleaning up its resources.
> */
1258a1277
>
1635a1655
> softc->disk->d_gone = dadiskgonecb;
1657a1678,1690
>
> /*
> * Acquire a reference to the periph before we register with GEOM.
> * We'll release this reference once GEOM calls us back (via
> * dadiskgonecb()) telling us that our provider has been freed.
> */
> if (cam_periph_acquire(periph) != CAM_REQ_CMP) {
> xpt_print(periph->path, "%s: lost periph during "
> "registration!\n", __func__);
> mtx_lock(periph->sim->mtx);
> return (CAM_REQ_CMP_ERR);
> }
>