Lines Matching refs:drive

52 /* drive states stored in ata_drive_datas */
143 int drive;
209 as->drive = drvp->drive;
281 struct ata_drive_datas *drvp = &chp->ch_drive[as->drive];
313 struct ata_drive_datas *drvp = &chp->ch_drive[as->drive];
319 chp->wdc->sc_dev.dv_xname, chp->channel, as->drive), DEBUG_XFERS);
331 xfer->drive = as->drive;
342 chp->wdc->sc_dev.dv_xname, chp->channel, as->drive),
416 struct ata_drive_datas *drvp = &chp->ch_drive[as->drive];
474 wdc_atapi_drive_selected(struct channel_softc *chp, int drive)
480 return ((reg & 0x10) == (drive << 4));
689 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
693 * At least one older drive failed to complete a 4 byte DMA transfer.
706 wdc_set_drive(chp, xfer->drive);
715 chp->wdc->sc_dev.dv_xname, chp->channel, drvp->drive,
728 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
760 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
771 wdccommand(chp, xfer->drive, ATAPI_PKT_CMD,
790 chp->wdc->sc_dev.dv_xname, chp->channel, drvp->drive
800 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
830 WDC_LOG_ATAPI_CMD(chp, xfer->drive, xfer->c_flags,
840 chp->channel, xfer->drive, xfer->databuf,
854 chp->channel, xfer->drive);
890 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive);
952 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
965 /* The drive has dropped BSY before setting up the
966 registers correctly for DATA phase. This drive is
969 Give the drive 100ms to get its house in order
1001 /* Exceptional case - drive want to transfer more
1005 than to write random stuff to drive? */
1039 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
1069 xfer->drive, 1);
1176 if (!wdc_atapi_drive_selected(chp, xfer->drive)) {
1177 WDCDEBUG_PRINT(("wdc_atapi_intr_for_us: wrong drive selected\n"), DEBUG_INTR);
1178 wdc_set_drive(chp, xfer->drive);
1244 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive,
1257 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
1275 if (!wdc_atapi_drive_selected(chp, xfer->drive))
1277 wdc_set_drive(chp, xfer->drive);
1329 chp->wdc->sc_dev.dv_xname, chp->channel, drvp->drive, drvp->state),
1336 There is a trade-off here. This drive will cause any
1340 (which may have been caused by the other drive on
1352 wdccommandshort(chp, drvp->drive, ATAPI_DEVICE_RESET);
1362 wdccommandshort(chp, drvp->drive, ATAPI_IDENTIFY_DEVICE);
1382 * because the drive is free to assert BSY
1392 /* Also don't try if the drive didn't report its mode */
1398 wdccommand(chp, drvp->drive, SET_FEATURES, 0, 0, 0,
1416 wdccommand(chp, drvp->drive, SET_FEATURES, 0, 0, 0,
1419 wdccommand(chp, drvp->drive, SET_FEATURES, 0, 0, 0,
1447 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive, errstring);
1485 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive,
1487 WDC_LOG_ATAPI_DONE(chp, xfer->drive, xfer->c_flags, sc_xfer->error);
1503 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
1511 wdccommandshort(chp, xfer->drive, ATAPI_SOFT_RESET);
1528 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive];
1534 xfer->drive);