• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/ide/

Lines Matching refs:hwif

76 	const struct ide_tp_ops *tp_ops = drive->hwif->tp_ops;
117 ide_hwif_t *hwif = drive->hwif;
118 struct request *rq = hwif->rq;
130 hwif->rq = NULL;
225 ide_hwif_t *hwif = drive->hwif;
226 struct scatterlist *sg = hwif->sg_table;
306 drive->hwif->name, (unsigned long) rq);
318 drive->hwif->tp_ops->dev_select(drive);
387 static inline int ide_lock_port(ide_hwif_t *hwif)
389 if (hwif->busy)
392 hwif->busy = 1;
397 static inline void ide_unlock_port(ide_hwif_t *hwif)
399 hwif->busy = 0;
402 static inline int ide_lock_host(struct ide_host *host, ide_hwif_t *hwif)
410 host->get_lock(ide_intr, hwif);
431 ide_hwif_t *hwif = drive->hwif;
432 struct ide_host *host = hwif->host;
454 if (ide_lock_host(host, hwif))
457 spin_lock_irq(&hwif->lock);
459 if (!ide_lock_port(hwif)) {
462 WARN_ON_ONCE(hwif->rq);
464 prev_port = hwif->host->cur_port;
467 ide_unlock_port(hwif);
471 if ((hwif->host->host_flags & IDE_HFLAG_SERIALIZE) &&
472 hwif != prev_port) {
486 hwif->host->cur_port = hwif;
488 hwif->cur_dev = drive;
491 spin_unlock_irq(&hwif->lock);
501 spin_lock_irq(&hwif->lock);
504 ide_unlock_port(hwif);
525 ide_unlock_port(hwif);
529 hwif->rq = rq;
531 spin_unlock_irq(&hwif->lock);
533 spin_lock_irq(&hwif->lock);
536 rq = hwif->rq;
537 hwif->rq = NULL;
543 spin_unlock_irq(&hwif->lock);
550 spin_unlock_irq(&hwif->lock);
578 ide_hwif_t *hwif = drive->hwif;
582 return hwif->dma_ops->dma_test_irq(drive);
584 if (hwif->io_ports.ctl_addr &&
585 (hwif->host_flags & IDE_HFLAG_BROKEN_ALTSTATUS) == 0)
586 stat = hwif->tp_ops->read_altstatus(hwif);
589 stat = hwif->tp_ops->read_status(hwif);
601 * @data: timer callback magic (hwif)
615 ide_hwif_t *hwif = (ide_hwif_t *)data;
623 spin_lock_irqsave(&hwif->lock, flags);
625 handler = hwif->handler;
627 if (handler == NULL || hwif->req_gen != hwif->req_gen_timer) {
635 ide_expiry_t *expiry = hwif->expiry;
638 drive = hwif->cur_dev;
644 hwif->timer.expires = jiffies + wait;
645 hwif->req_gen_timer = hwif->req_gen;
646 add_timer(&hwif->timer);
647 spin_unlock_irqrestore(&hwif->lock, flags);
651 hwif->handler = NULL;
652 hwif->expiry = NULL;
658 spin_unlock(&hwif->lock);
660 disable_irq(hwif->irq);
663 if (hwif->polling) {
667 hwif->dma_ops->dma_lost_irq(drive);
668 if (hwif->port_ops && hwif->port_ops->clear_irq)
669 hwif->port_ops->clear_irq(drive);
679 hwif->tp_ops->read_status(hwif));
681 spin_lock_irq(&hwif->lock);
682 enable_irq(hwif->irq);
683 if (startstop == ide_stopped && hwif->polling == 0) {
684 rq_in_flight = hwif->rq;
685 hwif->rq = NULL;
686 ide_unlock_port(hwif);
690 spin_unlock_irqrestore(&hwif->lock, flags);
693 ide_unlock_host(hwif->host);
701 * @hwif: port being processed
727 static void unexpected_intr(int irq, ide_hwif_t *hwif)
729 u8 stat = hwif->tp_ops->read_status(hwif);
740 hwif->name, stat, count);
748 * @dev_id: hwif
755 * hwif is the interface in the group currently performing
756 * a command. hwif->cur_dev is the drive and hwif->handler is
772 ide_hwif_t *hwif = (ide_hwif_t *)dev_id;
773 struct ide_host *host = hwif->host;
783 if (hwif != host->cur_port)
787 spin_lock_irqsave(&hwif->lock, flags);
789 if (hwif->port_ops && hwif->port_ops->test_irq &&
790 hwif->port_ops->test_irq(hwif) == 0)
793 handler = hwif->handler;
795 if (handler == NULL || hwif->polling) {
813 unexpected_intr(irq, hwif);
819 (void)hwif->tp_ops->read_status(hwif);
824 drive = hwif->cur_dev;
836 hwif->handler = NULL;
837 hwif->expiry = NULL;
838 hwif->req_gen++;
839 del_timer(&hwif->timer);
840 spin_unlock(&hwif->lock);
842 if (hwif->port_ops && hwif->port_ops->clear_irq)
843 hwif->port_ops->clear_irq(drive);
851 spin_lock_irq(&hwif->lock);
859 if (startstop == ide_stopped && hwif->polling == 0) {
860 BUG_ON(hwif->handler);
861 rq_in_flight = hwif->rq;
862 hwif->rq = NULL;
863 ide_unlock_port(hwif);
868 spin_unlock_irqrestore(&hwif->lock, flags);
871 ide_unlock_host(hwif->host);
881 ide_hwif_t *hwif = drive->hwif;
886 hwif->tp_ops->output_data(drive, NULL, buf, min(4, len));
888 hwif->tp_ops->input_data(drive, NULL, buf, min(4, len));