Lines Matching refs:hwif
10 ide_hwif_t *hwif = drive->hwif; in ide_ata_error() local
21 hwif->tp_ops->read_status(hwif) == ATA_CMD_INIT_DEV_PARAMS) in ide_ata_error()
36 (hwif->host_flags & IDE_HFLAG_ERROR_STOPS_FIFO) == 0) { in ide_ata_error()
47 if (hwif->tp_ops->read_status(hwif) & (ATA_BUSY | ATA_DRQ)) in ide_ata_error()
66 ide_hwif_t *hwif = drive->hwif; in ide_atapi_error() local
76 if (hwif->tp_ops->read_status(hwif) & (ATA_BUSY | ATA_DRQ)) in ide_atapi_error()
78 hwif->tp_ops->exec_command(hwif, ATA_CMD_IDLEIMMEDIATE); in ide_atapi_error()
121 rq = drive->hwif->rq; in ide_error()
148 struct request *rq = drive->hwif->rq; in ide_complete_drive_reset()
169 ide_hwif_t *hwif = drive->hwif; in atapi_reset_pollfunc() local
170 const struct ide_tp_ops *tp_ops = hwif->tp_ops; in atapi_reset_pollfunc()
175 stat = tp_ops->read_status(hwif); in atapi_reset_pollfunc()
180 if (time_before(jiffies, hwif->poll_timeout)) { in atapi_reset_pollfunc()
186 hwif->polling = 0; in atapi_reset_pollfunc()
193 hwif->polling = 0; in atapi_reset_pollfunc()
198 static void ide_reset_report_error(ide_hwif_t *hwif, u8 err) in ide_reset_report_error() argument
207 printk(KERN_ERR "%s: reset: master: ", hwif->name); in ide_reset_report_error()
225 ide_hwif_t *hwif = drive->hwif; in reset_pollfunc() local
226 const struct ide_port_ops *port_ops = hwif->port_ops; in reset_pollfunc()
234 hwif->name, drive->name); in reset_pollfunc()
239 tmp = hwif->tp_ops->read_status(hwif); in reset_pollfunc()
242 if (time_before(jiffies, hwif->poll_timeout)) { in reset_pollfunc()
248 hwif->name, tmp); in reset_pollfunc()
255 printk(KERN_INFO "%s: reset: success\n", hwif->name); in reset_pollfunc()
258 ide_reset_report_error(hwif, tmp); in reset_pollfunc()
264 hwif->polling = 0; /* done polling */ in reset_pollfunc()
289 const struct ide_port_ops *port_ops = drive->hwif->port_ops; in pre_reset()
336 ide_hwif_t *hwif = drive->hwif; in do_reset1() local
337 struct ide_io_ports *io_ports = &hwif->io_ports; in do_reset1()
338 const struct ide_tp_ops *tp_ops = hwif->tp_ops; in do_reset1()
345 spin_lock_irqsave(&hwif->lock, flags); in do_reset1()
348 BUG_ON(hwif->handler != NULL); in do_reset1()
355 tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); in do_reset1()
357 hwif->poll_timeout = jiffies + WAIT_WORSTCASE; in do_reset1()
358 hwif->polling = 1; in do_reset1()
360 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()
370 ide_port_for_each_present_dev(i, tdrive, hwif) { in do_reset1()
380 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()
382 spin_lock_irqsave(&hwif->lock, flags); in do_reset1()
390 ide_port_for_each_dev(i, tdrive, hwif) in do_reset1()
394 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()
408 tp_ops->write_devctl(hwif, ATA_SRST | ATA_NIEN | ATA_DEVCTL_OBS); in do_reset1()
412 tp_ops->write_devctl(hwif, in do_reset1()
417 hwif->poll_timeout = jiffies + WAIT_WORSTCASE; in do_reset1()
418 hwif->polling = 1; in do_reset1()
426 port_ops = hwif->port_ops; in do_reset1()
430 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()