Home
last modified time | relevance | path

Searched refs:drvp (Results 1 – 25 of 44) sorted by relevance

12

/netbsd-src/sys/dev/pci/
H A Dpiixide.c600 struct ata_drive_datas *drvp = cp->ata_channel.ch_drive; in piix_setup_channel() local
620 if ((drvp[0].drive_flags & ATA_DRIVE_DMA) && in piix_setup_channel()
621 (drvp[1].drive_flags & ATA_DRIVE_DMA)) { in piix_setup_channel()
623 uimin(drvp[0].DMA_mode, drvp[1].DMA_mode); in piix_setup_channel()
624 drvp[0].DMA_mode = mode[0]; in piix_setup_channel()
625 drvp[1].DMA_mode = mode[1]; in piix_setup_channel()
632 if (drvp[0].drive_flags & ATA_DRIVE_DMA) { in piix_setup_channel()
633 mode[0] = drvp[0].DMA_mode; in piix_setup_channel()
634 mode[1] = drvp[1].PIO_mode; in piix_setup_channel()
637 mode[1] = drvp[1].PIO_mode = 0; in piix_setup_channel()
[all …]
H A Dsiside.c342 struct ata_drive_datas *drvp; in sis96x_setup_channel() local
359 drvp = &chp->ch_drive[drive]; in sis96x_setup_channel()
361 if (drvp->drive_type == ATA_DRIVET_NONE) in sis96x_setup_channel()
364 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in sis96x_setup_channel()
367 drvp->drive_flags &= ~ATA_DRIVE_DMA; in sis96x_setup_channel()
371 if (drvp->UDMA_mode > 2) in sis96x_setup_channel()
372 drvp->UDMA_mode = 2; in sis96x_setup_channel()
374 sis_tim |= sis_udma133new_tim[drvp->UDMA_mode]; in sis96x_setup_channel()
375 sis_tim |= sis_pio133new_tim[drvp->PIO_mode]; in sis96x_setup_channel()
377 } else if (drvp->drive_flags & ATA_DRIVE_DMA) { in sis96x_setup_channel()
[all …]
H A Dtoshide.c168 struct ata_drive_datas *drvp; in piccolo_setup_channel() local
185 drvp = &chp->ch_drive[drive]; in piccolo_setup_channel()
187 if (drvp->drive_type == ATA_DRIVET_NONE) in piccolo_setup_channel()
190 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in piccolo_setup_channel()
193 drvp->drive_flags &= ~ATA_DRIVE_DMA; in piccolo_setup_channel()
218 else if (drvp->drive_flags & ATA_DRIVE_DMA) { in piccolo_setup_channel()
222 if (drvp->PIO_mode > (drvp->DMA_mode + 2)) in piccolo_setup_channel()
223 drvp->PIO_mode = drvp->DMA_mode + 2; in piccolo_setup_channel()
224 if (drvp->DMA_mode + 2 > (drvp->PIO_mode)) in piccolo_setup_channel()
225 drvp->DMA_mode = (drvp->PIO_mode > 2) ? in piccolo_setup_channel()
[all …]
H A Diteide.c165 struct ata_drive_datas *drvp; in ite_setup_channel() local
189 drvp = &chp->ch_drive[drive]; in ite_setup_channel()
192 if (drvp->drive_type == ATA_DRIVET_NONE) in ite_setup_channel()
196 (drvp->drive_flags & ATA_DRIVE_UDMA) != 0) { in ite_setup_channel()
198 drvp->drive_flags &= ~ATA_DRIVE_DMA; in ite_setup_channel()
203 if (drvp->UDMA_mode > 2 && in ite_setup_channel()
209 drvp->UDMA_mode = 2; in ite_setup_channel()
213 if (drvp->UDMA_mode >= 5) in ite_setup_channel()
218 mode = drvp->PIO_mode; in ite_setup_channel()
220 (drvp->drive_flags & ATA_DRIVE_DMA) != 0) { in ite_setup_channel()
[all …]
H A Dacardide.c183 struct ata_drive_datas *drvp; in acard_setup_channel() local
222 drvp = &chp->ch_drive[drive]; in acard_setup_channel()
224 if (drvp->drive_type == ATA_DRIVET_NONE) in acard_setup_channel()
228 (drvp->drive_flags & ATA_DRIVE_UDMA)) { in acard_setup_channel()
232 acard_act_udma[drvp->UDMA_mode], in acard_setup_channel()
233 acard_rec_udma[drvp->UDMA_mode]); in acard_setup_channel()
235 acard_udma_conf[drvp->UDMA_mode]); in acard_setup_channel()
238 acard_act_udma[drvp->UDMA_mode], in acard_setup_channel()
239 acard_rec_udma[drvp->UDMA_mode]); in acard_setup_channel()
241 acard_udma_conf[drvp->UDMA_mode]); in acard_setup_channel()
[all …]
H A Dslide.c190 struct ata_drive_datas *drvp; in sl82c105_setup_channel() local
209 drvp = &chp->ch_drive[drive]; in sl82c105_setup_channel()
211 if (drvp->drive_type == ATA_DRIVET_NONE) { in sl82c105_setup_channel()
216 if (drvp->drive_flags & ATA_DRIVE_DMA) { in sl82c105_setup_channel()
221 if (drvp->PIO_mode >= 3) { in sl82c105_setup_channel()
222 if ((drvp->DMA_mode + 2) > drvp->PIO_mode) in sl82c105_setup_channel()
223 drvp->DMA_mode = drvp->PIO_mode - 2; in sl82c105_setup_channel()
224 if (drvp->DMA_mode < 1) { in sl82c105_setup_channel()
230 drvp->drive_flags &= ~ATA_DRIVE_DMA; in sl82c105_setup_channel()
239 drvp->drive_flags &= ~ATA_DRIVE_DMA; in sl82c105_setup_channel()
[all …]
H A Doptiide.c172 struct ata_drive_datas *drvp; in opti_setup_channel() local
199 drvp = &chp->ch_drive[drive]; in opti_setup_channel()
201 if (drvp->drive_type == ATA_DRIVET_NONE) { in opti_setup_channel()
206 if ((drvp->drive_flags & ATA_DRIVE_DMA)) { in opti_setup_channel()
211 if (drvp->PIO_mode > (drvp->DMA_mode + 2)) in opti_setup_channel()
212 drvp->PIO_mode = drvp->DMA_mode + 2; in opti_setup_channel()
213 if (drvp->DMA_mode + 2 > (drvp->PIO_mode)) in opti_setup_channel()
214 drvp->DMA_mode = (drvp->PIO_mode > 2) ? in opti_setup_channel()
215 drvp->PIO_mode - 2 : 0; in opti_setup_channel()
216 if (drvp->DMA_mode == 0) in opti_setup_channel()
[all …]
H A Dcmdide.c393 struct ata_drive_datas *drvp; in cmd0643_9_setup_channel() local
405 drvp = &chp->ch_drive[drive]; in cmd0643_9_setup_channel()
407 if (drvp->drive_type == ATA_DRIVET_NONE) in cmd0643_9_setup_channel()
410 tim = cmd0643_9_data_tim_pio[drvp->PIO_mode]; in cmd0643_9_setup_channel()
411 if (drvp->drive_flags & (ATA_DRIVE_DMA | ATA_DRIVE_UDMA)) { in cmd0643_9_setup_channel()
412 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in cmd0643_9_setup_channel()
415 drvp->drive_flags &= ~ATA_DRIVE_DMA; in cmd0643_9_setup_channel()
419 if (drvp->UDMA_mode > 2 && in cmd0643_9_setup_channel()
423 drvp->UDMA_mode = 2; in cmd0643_9_setup_channel()
424 if (drvp->UDMA_mode > 2) in cmd0643_9_setup_channel()
[all …]
H A Daceride.c262 struct ata_drive_datas *drvp; in acer_setup_channel() local
288 drvp = &chp->ch_drive[drive]; in acer_setup_channel()
290 if (drvp->drive_type == ATA_DRIVET_NONE) in acer_setup_channel()
302 if (drvp->drive_type == ATA_DRIVET_ATAPI) { in acer_setup_channel()
304 drvp->drive_flags &= ~(ATA_DRIVE_DMA|ATA_DRIVE_UDMA); in acer_setup_channel()
309 if ((drvp->drive_flags & ATA_DRIVE_DMA) == 0 && in acer_setup_channel()
310 (drvp->drive_flags & ATA_DRIVE_UDMA) == 0) { in acer_setup_channel()
317 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in acer_setup_channel()
320 drvp->drive_flags &= ~ATA_DRIVE_DMA; in acer_setup_channel()
325 acer_udma[drvp->UDMA_mode]); in acer_setup_channel()
[all …]
H A Dnside.c158 struct ata_drive_datas *drvp; in natsemi_setup_channel() local
169 drvp = &chp->ch_drive[drive]; in natsemi_setup_channel()
171 if (drvp->drive_type == ATA_DRIVET_NONE) in natsemi_setup_channel()
175 if ((drvp->drive_flags & ATA_DRIVE_DMA) == 0) { in natsemi_setup_channel()
176 tim = natsemi_pio_pulse[drvp->PIO_mode] | in natsemi_setup_channel()
177 (natsemi_pio_recover[drvp->PIO_mode] << 4); in natsemi_setup_channel()
184 if (drvp->PIO_mode >= 3 && in natsemi_setup_channel()
185 (drvp->DMA_mode + 2) > drvp->PIO_mode) { in natsemi_setup_channel()
186 drvp->DMA_mode = drvp->PIO_mode - 2; in natsemi_setup_channel()
189 tim = natsemi_dma_pulse[drvp->DMA_mode] | in natsemi_setup_channel()
[all …]
H A Dhptide.c281 struct ata_drive_datas *drvp; in hpt_setup_channel() local
339 drvp = &chp->ch_drive[drive]; in hpt_setup_channel()
341 if (drvp->drive_type == ATA_DRIVET_NONE) in hpt_setup_channel()
347 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in hpt_setup_channel()
350 drvp->drive_flags &= ~ATA_DRIVE_DMA; in hpt_setup_channel()
353 drvp->UDMA_mode > 2) in hpt_setup_channel()
354 drvp->UDMA_mode = 2; in hpt_setup_channel()
355 after = tim_udma[drvp->UDMA_mode]; in hpt_setup_channel()
357 } else if (drvp->drive_flags & ATA_DRIVE_DMA) { in hpt_setup_channel()
363 if (drvp->PIO_mode >= 3 && in hpt_setup_channel()
[all …]
H A Drccide.c184 struct ata_drive_datas *drvp; in serverworks_setup_channel() local
213 drvp = &chp->ch_drive[drive]; in serverworks_setup_channel()
215 if (drvp->drive_type == ATA_DRIVET_NONE) in serverworks_setup_channel()
219 pio_time |= pio_modes[drvp->PIO_mode] << (8 * (unit^1)); in serverworks_setup_channel()
220 pio_mode |= drvp->PIO_mode << (4 * unit + 16); in serverworks_setup_channel()
222 (drvp->drive_flags & ATA_DRIVE_UDMA)) { in serverworks_setup_channel()
224 if (drvp->UDMA_mode > 2 && in serverworks_setup_channel()
228 drvp->UDMA_mode = 2; in serverworks_setup_channel()
229 dma_time |= dma_modes[drvp->DMA_mode] << (8 * (unit^1)); in serverworks_setup_channel()
230 udma_mode |= drvp->UDMA_mode << (4 * unit + 16); in serverworks_setup_channel()
[all …]
H A Dschide.c172 struct ata_drive_datas *drvp; in sch_setup_channel() local
186 drvp = &chp->ch_drive[drive]; in sch_setup_channel()
188 if (drvp->drive_type == ATA_DRIVET_NONE) in sch_setup_channel()
195 if (((drvp->drive_flags & ATA_DRIVE_DMA) == 0 && in sch_setup_channel()
196 (drvp->drive_flags & ATA_DRIVE_UDMA) == 0)) in sch_setup_channel()
201 (drvp->drive_flags & ATA_DRIVE_UDMA)) { in sch_setup_channel()
203 tim |= (drvp->UDMA_mode << 16) | SCH_TIM_SYNCDMA; in sch_setup_channel()
207 drvp->drive_flags &= ~ATA_DRIVE_UDMA; in sch_setup_channel()
215 tim |= (drvp->DMA_mode << 8) | (drvp->PIO_mode); in sch_setup_channel()
H A Dixpide.c180 struct ata_drive_datas *drvp; in ixp_setup_channel() local
191 drvp = &chp->ch_drive[drive]; in ixp_setup_channel()
192 if (drvp->drive_type == ATA_DRIVET_NONE) in ixp_setup_channel()
194 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in ixp_setup_channel()
196 drvp->drive_flags &= ~ATA_DRIVE_DMA; in ixp_setup_channel()
199 IXP_SET_MODE(udma, chp->ch_channel, drive, drvp->UDMA_mode); in ixp_setup_channel()
200 } else if (drvp->drive_flags & ATA_DRIVE_DMA) { in ixp_setup_channel()
203 ixp_mdma_timings[drvp->DMA_mode]); in ixp_setup_channel()
211 if (drvp->PIO_mode == 1) in ixp_setup_channel()
212 drvp->PIO_mode = 0; in ixp_setup_channel()
[all …]
H A Drdcide.c207 struct ata_drive_datas *drvp = cp->ata_channel.ch_drive; in rdcide_setup_channel() local
228 if (drvp[drive].drive_type == ATA_DRIVET_NONE) in rdcide_setup_channel()
230 if (drvp[drive].drive_type == ATA_DRIVET_ATAPI) in rdcide_setup_channel()
234 rdcide_setup[drvp[drive].PIO_mode], in rdcide_setup_channel()
237 rdcide_hold[drvp[drive].PIO_mode], in rdcide_setup_channel()
242 rdcide_setup[drvp[drive].PIO_mode], in rdcide_setup_channel()
245 rdcide_hold[drvp[drive].PIO_mode], in rdcide_setup_channel()
248 if (drvp[drive].PIO_mode > 0) { in rdcide_setup_channel()
252 if (drvp[drive].drive_flags & ATA_DRIVE_DMA) { in rdcide_setup_channel()
255 if ((drvp[drive].drive_flags & ATA_DRIVE_UDMA) == 0) in rdcide_setup_channel()
[all …]
H A Dcypide.c171 struct ata_drive_datas *drvp; in cy693_setup_channel() local
188 drvp = &chp->ch_drive[drive]; in cy693_setup_channel()
190 if (drvp->drive_type == ATA_DRIVET_NONE) in cy693_setup_channel()
193 if (drvp->drive_flags & ATA_DRIVE_DMA) { in cy693_setup_channel()
196 if (dma_mode == -1 || dma_mode > drvp->DMA_mode) in cy693_setup_channel()
197 dma_mode = drvp->DMA_mode; in cy693_setup_channel()
199 cy_cmd_ctrl |= (cy_pio_pulse[drvp->PIO_mode] << in cy693_setup_channel()
201 cy_cmd_ctrl |= (cy_pio_rec[drvp->PIO_mode] << in cy693_setup_channel()
203 cy_cmd_ctrl |= (cy_pio_pulse[drvp->PIO_mode] << in cy693_setup_channel()
205 cy_cmd_ctrl |= (cy_pio_rec[drvp->PIO_mode] << in cy693_setup_channel()
H A Dgeodeide.c171 struct ata_drive_datas *drvp; in geodeide_setup_channel() local
205 drvp = &chp->ch_drive[drive]; in geodeide_setup_channel()
207 if (drvp->drive_type == ATA_DRIVET_NONE) in geodeide_setup_channel()
226 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in geodeide_setup_channel()
228 dma_timing |= geode_udma[drvp->UDMA_mode]; in geodeide_setup_channel()
230 } else if (drvp->drive_flags & ATA_DRIVE_DMA) { in geodeide_setup_channel()
232 dma_timing |= geode_dma[drvp->DMA_mode]; in geodeide_setup_channel()
237 drvp->drive_flags &= ~(ATA_DRIVE_UDMA | ATA_DRIVE_DMA); in geodeide_setup_channel()
246 piooff, geode_pio[drvp->PIO_mode]); in geodeide_setup_channel()
253 geode_pio[drvp->PIO_mode]); in geodeide_setup_channel()
H A Dpdcide.c329 struct ata_drive_datas *drvp; in pdc202xx_setup_channel() local
392 drvp = &chp->ch_drive[drive]; in pdc202xx_setup_channel()
394 if (drvp->drive_type == ATA_DRIVET_NONE) in pdc202xx_setup_channel()
397 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in pdc202xx_setup_channel()
400 drvp->drive_flags &= ~ATA_DRIVE_DMA; in pdc202xx_setup_channel()
403 pdc2xx_udma_mb[drvp->UDMA_mode]); in pdc202xx_setup_channel()
405 pdc2xx_udma_mc[drvp->UDMA_mode]); in pdc202xx_setup_channel()
407 } else if (drvp->drive_flags & ATA_DRIVE_DMA) { in pdc202xx_setup_channel()
409 pdc2xx_dma_mb[drvp->DMA_mode]); in pdc202xx_setup_channel()
411 pdc2xx_dma_mc[drvp->DMA_mode]); in pdc202xx_setup_channel()
[all …]
/netbsd-src/sys/dev/ata/
H A Data.c487 struct ata_drive_datas *drvp; in atabus_thread() local
489 drvp = &chp->ch_drive[i]; in atabus_thread()
491 if (drvp->drive_flags & ATA_DRIVE_TH_RESET) { in atabus_thread()
814 ata_get_params(struct ata_drive_datas *drvp, uint8_t flags, in ata_get_params() argument
818 struct ata_channel *chp = drvp->chnl_softc; in ata_get_params()
836 if (drvp->drive_type == ATA_DRIVET_ATA) { in ata_get_params()
841 } else if (drvp->drive_type == ATA_DRIVET_ATAPI) { in ata_get_params()
855 (*atac->atac_bustype_ata->ata_exec_command)(drvp, xfer); in ata_get_params()
887 ((drvp->drive_type == ATA_DRIVET_ATAPI) ? in ata_get_params()
917 ata_set_mode(struct ata_drive_datas *drvp, uint8_t mode, uint8_t flags) in ata_set_mode() argument
[all …]
H A Data_wdc.c146 wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_xfer *xfer) in wdc_ata_bio() argument
148 struct ata_channel *chp = drvp->chnl_softc; in wdc_ata_bio()
157 if ((drvp->drive_flags & (ATA_DRIVE_DMA | ATA_DRIVE_UDMA)) && in wdc_ata_bio()
168 xfer->c_drive = drvp->drive; in wdc_ata_bio()
182 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; in wdc_ata_bio_start() local
194 drvp->state, drvp->drive_flags, xfer->c_flags, chp->ch_flags), in wdc_ata_bio_start()
200 if (__predict_false(drvp->state < READY)) { in wdc_ata_bio_start()
239 if ((drvp->drive_flags & ATA_DRIVE_MODE) == 0) in wdc_ata_bio_start()
241 wdccommand(chp, drvp->drive, SET_FEATURES, 0, 0, 0, in wdc_ata_bio_start()
242 0x08 | drvp->PIO_mode, WDSF_SET_MODE); in wdc_ata_bio_start()
[all …]
H A Data_recovery.c67 ata_read_log_ext_ncq(struct ata_drive_datas *drvp, uint8_t flags, in ata_read_log_ext_ncq() argument
71 struct ata_channel *chp = drvp->chnl_softc; in ata_read_log_ext_ncq()
79 if (drvp->drive_type != ATA_DRIVET_ATA || in ata_read_log_ext_ncq()
80 (drvp->drive_flags & ATA_DRIVE_NCQ) == 0) in ata_read_log_ext_ncq()
106 (*atac->atac_bustype_ata->ata_exec_command)(drvp, xfer); in ata_read_log_ext_ncq()
118 device_printf(drvp->drv_softc, in ata_read_log_ext_ncq()
142 device_printf(drvp->drv_softc, in ata_read_log_ext_ncq()
162 struct ata_drive_datas *drvp; in ata_recovery_resume() local
176 drvp = &chp->ch_drive[drive]; in ata_recovery_resume()
185 error = ata_read_log_ext_ncq(drvp, flags, &eslot, &st, &err); in ata_recovery_resume()
H A Dwd.c327 wd->drvp = adev->adev_drv_data; in wdattach()
329 wd->drvp->drv_openings = 1; in wdattach()
330 wd->drvp->drv_done = wddone; in wdattach()
331 wd->drvp->drv_softc = dksc->sc_dev; /* done in atabusconfig_thread() in wdattach()
383 wd->drvp->multi = wd->sc_params.atap_multi & 0xff; in wdattach()
385 wd->drvp->multi = 1; in wdattach()
389 wd->drvp->multi); in wdattach()
520 wd->drvp->lp = dksc->sc_dkdev.dk_label; in wdattach()
537 if (sc->atabus->ata_addref(sc->drvp)) in wd_suspend()
543 sc->atabus->ata_delref(sc->drvp); in wd_suspend()
1267 struct ata_drive_datas *drvp = wd->drvp; wdperror() local
[all...]
/netbsd-src/sys/dev/scsipi/
H A Datapi_wdc.c272 struct ata_drive_datas *drvp = &chp->ch_drive[target]; in wdc_atapi_probe_device() local
282 if (drvp->drive_type != ATA_DRIVET_ATAPI) { in wdc_atapi_probe_device()
313 drvp->drive_flags |= ATA_DRIVE_ATAPIDSCW; in wdc_atapi_probe_device()
341 drvp->drv_softc = atapi_probe_device(sc, target, periph, &sa); in wdc_atapi_probe_device()
343 if (drvp->drv_softc) in wdc_atapi_probe_device()
344 ata_probe_caps(drvp); in wdc_atapi_probe_device()
347 drvp->drive_type = ATA_DRIVET_NONE; in wdc_atapi_probe_device()
352 drvp->drive_type = ATA_DRIVET_NONE; in wdc_atapi_probe_device()
484 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive]; in wdc_atapi_start() local
490 device_xname(atac->atac_dev), chp->ch_channel, drvp->drive, in wdc_atapi_start()
[all …]
/netbsd-src/sys/dev/ic/
H A Dmvsata.c618 mvsata_reset_drive(struct ata_drive_datas *drvp, int flags, uint32_t *sigp) in mvsata_reset_drive() argument
620 struct ata_channel *chp = drvp->chnl_softc; in mvsata_reset_drive()
631 device_xname(MVSATA_DEV2(mvport)), chp->ch_channel, drvp->drive, in mvsata_reset_drive()
637 mvsata_pmp_select(mvport, drvp->drive); in mvsata_reset_drive()
693 mvsata_addref(struct ata_drive_datas *drvp) in mvsata_addref() argument
700 mvsata_delref(struct ata_drive_datas *drvp) in mvsata_delref() argument
707 mvsata_killpending(struct ata_drive_datas *drvp) in mvsata_killpending() argument
768 struct ata_drive_datas *drvp = &chp->ch_drive[target]; in mvsata_atapi_probe_device() local
778 if (drvp->drive_type != ATA_DRIVET_ATAPI) { in mvsata_atapi_probe_device()
787 if (ata_get_params(drvp, AT_WAIT, id) == 0) { in mvsata_atapi_probe_device()
[all …]
/netbsd-src/sys/arch/i386/pci/
H A Dgcscide.c194 struct ata_drive_datas *drvp; in gcscide_setup_channel() local
201 drvp = &chp->ch_drive[drive]; in gcscide_setup_channel()
202 if (drvp->drive_type == ATA_DRIVET_NONE) in gcscide_setup_channel()
208 if (drvp->drive_flags & ATA_DRIVE_UDMA) { in gcscide_setup_channel()
210 drvp->drive_flags &= ~ATA_DRIVE_DMA; in gcscide_setup_channel()
215 reg |= gcscide_udma_timings[drvp->UDMA_mode]; in gcscide_setup_channel()
220 } else if (drvp->drive_flags & ATA_DRIVE_DMA) { in gcscide_setup_channel()
224 reg |= gcscide_mdma_timings[drvp->DMA_mode]; in gcscide_setup_channel()
236 gcscide_pio_timings[drvp->PIO_mode]); in gcscide_setup_channel()

12