Lines Matching refs:drive
416 aa_link->aa_drv_data->drive); in wdprint()
433 wdc_set_drive(struct channel_softc *chp, int drive) in wdc_set_drive() argument
435 CHP_WRITE_REG(chp, wdr_sdh, (drive << 4) | WDSD_IBM); in wdc_set_drive()
436 WDC_LOG_SET_DRIVE(chp, drive); in wdc_set_drive()
440 wdc_floating_bus(struct channel_softc *chp, int drive) in wdc_floating_bus() argument
445 wdc_set_drive(chp, drive); in wdc_floating_bus()
472 wdc_preata_drive(struct channel_softc *chp, int drive) in wdc_preata_drive() argument
474 if (wdc_floating_bus(chp, drive)) { in wdc_preata_drive()
477 chp->channel, drive), DEBUG_PROBE); in wdc_preata_drive()
481 wdc_set_drive(chp, drive); in wdc_preata_drive()
486 chp->channel, drive), DEBUG_PROBE); in wdc_preata_drive()
495 chp->channel, drive), DEBUG_PROBE); in wdc_preata_drive()
503 wdc_ata_present(struct channel_softc *chp, int drive) in wdc_ata_present() argument
508 wdc_set_drive(chp, drive); in wdc_ata_present()
527 wdccommandshort(chp, drive, WDCC_CHECK_PWR); in wdc_ata_present()
534 chp->channel, drive, chp->ch_status), in wdc_ata_present()
543 chp->channel, drive, chp->ch_status), in wdc_ata_present()
551 chp->channel, drive, time_to_done), DEBUG_PROBE); in wdc_ata_present()
565 chp->channel, drive), DEBUG_PROBE); in wdc_ata_present()
593 u_int8_t drive; in wdcprobe() local
653 for (drive = 0; drive < 2; drive++) { in wdcprobe()
654 if ((ret_value & (0x01 << drive)) == 0) in wdcprobe()
656 wdc_set_drive(chp, drive); in wdcprobe()
669 chp->channel, drive, st0, WDCS_BITS, sc, sn, cl, ch), in wdcprobe()
677 chp->ch_drive[drive].drive_flags |= DRIVE_ATAPI; in wdcprobe()
687 for (drive = 0; drive < 2; drive++) { in wdcprobe()
688 if ((ret_value & (0x01 << drive)) == 0) in wdcprobe()
690 if (chp->ch_drive[drive].drive_flags & DRIVE_ATAPI) in wdcprobe()
695 if (wdc_ata_present(chp, drive)) { in wdcprobe()
696 chp->ch_drive[drive].drive_flags |= DRIVE_ATA; in wdcprobe()
699 chp->ch_drive[drive].drive_flags |= DRIVE_OLD; in wdcprobe()
701 ret_value &= ~(1 << drive); in wdcprobe()
765 chp->ch_drive[i].drive = i; in wdcattach()
898 chp->channel, xfer->drive), DEBUG_XFERS); in wdcstart()
900 if (chp->ch_drive[xfer->drive].drive_flags & DRIVE_RESET) { in wdcstart()
901 chp->ch_drive[xfer->drive].drive_flags &= ~DRIVE_RESET; in wdcstart()
902 chp->ch_drive[xfer->drive].state = 0; in wdcstart()
957 xfer->drive, 0); in wdcintr()
979 int drive; in wdc_reset_channel() local
982 chp->wdc->sc_dev.dv_xname, chp->channel, drvp->drive), in wdc_reset_channel()
985 for (drive = 0; drive < 2; drive++) { in wdc_reset_channel()
986 chp->ch_drive[drive].state = 0; in wdc_reset_channel()
1141 xfer->drive, in wdc_wait_for_status()
1158 chp->channel, xfer->drive, 0); in wdc_dmawait()
1169 chp->channel, xfer->drive, 1); in wdc_dmawait()
1200 chp->channel, xfer->drive, 1); in wdctimeout()
1527 int drive; in wdc_print_current_modes() local
1530 for (drive = 0; drive < 2; drive++) { in wdc_print_current_modes()
1531 drvp = &chp->ch_drive[drive]; in wdc_print_current_modes()
1537 chp->wdc->sc_dev.dv_xname, chp->channel, drive); in wdc_print_current_modes()
1618 chp->wdc->sc_dev.dv_xname, chp->channel, drvp->drive), in wdc_exec_command()
1630 xfer->drive = drvp->drive; in wdc_exec_command()
1667 int drive = xfer->drive; in __wdccommand_start() local
1671 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive), in __wdccommand_start()
1681 wdc_set_drive(chp, drive); in __wdccommand_start()
1696 wdccommand(chp, drive, wdc_c->r_command, wdc_c->r_cyl, wdc_c->r_head, in __wdccommand_start()
1713 wdc_output_bytes(&chp->ch_drive[drive], in __wdccommand_start()
1739 struct ata_drive_datas *drvp = &chp->ch_drive[xfer->drive]; in __wdccommand_intr()
1745 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive), DEBUG_INTR); in __wdccommand_intr()
1779 chp->wdc->sc_dev.dv_xname, chp->channel, xfer->drive, in __wdccommand_done()
1827 wdccommand(struct channel_softc *chp, u_int8_t drive, u_int8_t command, in wdccommand() argument
1833 chp->channel, drive, command, cylin, head, sector, count, features), in wdccommand()
1839 CHP_WRITE_REG(chp, wdr_sdh, WDSD_IBM | (drive << 4) | head); in wdccommand()
1857 wdccommandext(struct channel_softc *chp, u_int8_t drive, u_int8_t command, in wdccommandext() argument
1862 chp->channel, drive, command, blkno, count), in wdccommandext()
1868 CHP_WRITE_REG(chp, wdr_sdh, (drive << 4) | WDSD_LBA); in wdccommandext()
1888 wdccommandshort(struct channel_softc *chp, int drive, int command) in wdccommandshort() argument
1892 chp->wdc->sc_dev.dv_xname, chp->channel, drive, command), in wdccommandshort()
1897 CHP_WRITE_REG(chp, wdr_sdh, WDSD_IBM | (drive << 4)); in wdccommandshort()
1907 xfer, xfer->c_flags, chp->channel, xfer->drive), DEBUG_XFERS); in wdc_exec_xfer()
2017 chp->ch_drive[xfer->drive].drive_name, in __wdcerror()
2019 chp->channel, xfer->drive, msg); in __wdcerror()