Lines Matching refs:drive

534 static int check_in_drive_list(ide_drive_t *drive, const char **list)  in check_in_drive_list()  argument
536 char *m = (char *)&drive->id[ATA_ID_PROD]; in check_in_drive_list()
557 static u8 hpt3xx_udma_filter(ide_drive_t *drive) in hpt3xx_udma_filter() argument
559 ide_hwif_t *hwif = drive->hwif; in hpt3xx_udma_filter()
566 check_in_drive_list(drive, bad_ata66_4)) in hpt3xx_udma_filter()
570 check_in_drive_list(drive, bad_ata66_3)) in hpt3xx_udma_filter()
575 check_in_drive_list(drive, bad_ata100_5)) in hpt3xx_udma_filter()
580 check_in_drive_list(drive, bad_ata100_5)) in hpt3xx_udma_filter()
586 if (ata_id_is_sata(drive->id)) in hpt3xx_udma_filter()
593 return check_in_drive_list(drive, bad_ata33) ? 0x00 : mask; in hpt3xx_udma_filter()
596 static u8 hpt3xx_mdma_filter(ide_drive_t *drive) in hpt3xx_mdma_filter() argument
598 ide_hwif_t *hwif = drive->hwif; in hpt3xx_mdma_filter()
606 if (ata_id_is_sata(drive->id)) in hpt3xx_mdma_filter()
631 static void hpt3xx_set_mode(ide_hwif_t *hwif, ide_drive_t *drive) in hpt3xx_set_mode() argument
636 u8 itr_addr = 0x40 + (drive->dn * 4); in hpt3xx_set_mode()
638 const u8 speed = drive->dma_mode; in hpt3xx_set_mode()
655 static void hpt3xx_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) in hpt3xx_set_pio_mode() argument
657 drive->dma_mode = drive->pio_mode; in hpt3xx_set_pio_mode()
658 hpt3xx_set_mode(hwif, drive); in hpt3xx_set_pio_mode()
661 static void hpt3xx_maskproc(ide_drive_t *drive, int mask) in hpt3xx_maskproc() argument
663 ide_hwif_t *hwif = drive->hwif; in hpt3xx_maskproc()
667 if ((drive->dev_flags & IDE_DFLAG_NIEN_QUIRK) == 0) in hpt3xx_maskproc()
691 static void hpt366_dma_lost_irq(ide_drive_t *drive) in hpt366_dma_lost_irq() argument
693 struct pci_dev *dev = to_pci_dev(drive->hwif->dev); in hpt366_dma_lost_irq()
700 drive->name, __func__, mcr1, mcr3, scr1); in hpt366_dma_lost_irq()
703 ide_dma_lost_irq(drive); in hpt366_dma_lost_irq()
706 static void hpt370_clear_engine(ide_drive_t *drive) in hpt370_clear_engine() argument
708 ide_hwif_t *hwif = drive->hwif; in hpt370_clear_engine()
715 static void hpt370_irq_timeout(ide_drive_t *drive) in hpt370_irq_timeout() argument
717 ide_hwif_t *hwif = drive->hwif; in hpt370_irq_timeout()
723 printk(KERN_DEBUG "%s: %d bytes in FIFO\n", drive->name, bfifo & 0x1ff); in hpt370_irq_timeout()
729 hpt370_clear_engine(drive); in hpt370_irq_timeout()
732 static void hpt370_dma_start(ide_drive_t *drive) in hpt370_dma_start() argument
735 hpt370_clear_engine(drive); in hpt370_dma_start()
737 ide_dma_start(drive); in hpt370_dma_start()
740 static int hpt370_dma_end(ide_drive_t *drive) in hpt370_dma_end() argument
742 ide_hwif_t *hwif = drive->hwif; in hpt370_dma_end()
750 hpt370_irq_timeout(drive); in hpt370_dma_end()
752 return ide_dma_end(drive); in hpt370_dma_end()
756 static int hpt374_dma_test_irq(ide_drive_t *drive) in hpt374_dma_test_irq() argument
758 ide_hwif_t *hwif = drive->hwif; in hpt374_dma_test_irq()
777 static int hpt374_dma_end(ide_drive_t *drive) in hpt374_dma_end() argument
779 ide_hwif_t *hwif = drive->hwif; in hpt374_dma_end()
788 return ide_dma_end(drive); in hpt374_dma_end()
839 static void hpt3xxn_rw_disk(ide_drive_t *drive, struct request *rq) in hpt3xxn_rw_disk() argument
841 hpt3xxn_set_clock(drive->hwif, rq_data_dir(rq) ? 0x21 : 0x23); in hpt3xxn_rw_disk()