Lines Matching defs:drv

89 	struct idad_softc *drv;
92 drv = bp->bio_disk->d_drv1;
93 if (drv == NULL) {
101 if (drv->flags & DRV_WRITEPROT && (bp->bio_cmd == BIO_WRITE)) {
106 bp->bio_driver1 = drv;
108 ida_submit_buf(drv->controller, bp);
127 struct idad_softc *drv;
132 drv = dp->d_drv1;
133 if (drv == NULL)
136 drv->controller->flags &= ~IDA_INTERRUPTS;
139 error = ida_command(drv->controller, CMD_WRITE, virtual,
140 length, drv->drive, offset / DEV_BSIZE, DMA_DATA_OUT);
142 drv->controller->flags |= IDA_INTERRUPTS;
149 struct idad_softc *drv;
151 drv = bp->bio_disk->d_drv1;
173 struct idad_softc *drv;
177 drv = (struct idad_softc *)device_get_softc(dev);
179 drv->dev = dev;
180 drv->controller = (struct ida_softc *)device_get_softc(parent);
181 drv->unit = device_get_unit(dev);
182 drv->drive = drv->controller->num_drives;
183 drv->controller->num_drives++;
185 error = ida_command(drv->controller, CMD_GET_LOG_DRV_INFO,
186 &dinfo, sizeof(dinfo), drv->drive, 0, DMA_DATA_IN);
192 drv->cylinders = dinfo.dp.ncylinders;
193 drv->heads = dinfo.dp.nheads;
194 drv->sectors = dinfo.dp.nsectors;
195 drv->secsize = dinfo.secsize == 0 ? 512 : dinfo.secsize;
196 drv->secperunit = dinfo.secperunit;
202 drv->secperunit / ((1024 * 1024) / drv->secsize),
203 drv->secperunit, drv->secsize);
205 drv->disk = disk_alloc();
206 drv->disk->d_strategy = idad_strategy;
207 drv->disk->d_name = "idad";
208 drv->disk->d_dump = idad_dump;
209 drv->disk->d_sectorsize = drv->secsize;
210 drv->disk->d_mediasize = (off_t)drv->secperunit * drv->secsize;
211 drv->disk->d_fwsectors = drv->sectors;
212 drv->disk->d_fwheads = drv->heads;
213 drv->disk->d_drv1 = drv;
214 drv->disk->d_maxsize = DFLTPHYS; /* XXX guess? */
215 drv->disk->d_unit = drv->unit;
216 drv->disk->d_flags = DISKFLAG_NEEDSGIANT;
217 disk_create(drv->disk, DISK_VERSION);
225 struct idad_softc *drv;
227 drv = (struct idad_softc *)device_get_softc(dev);
228 disk_destroy(drv->disk);