Lines Matching refs:hwif

11 	ide_hwif_t *hwif = drive->hwif;  in ide_ata_error()  local
22 hwif->tp_ops->read_status(hwif) == ATA_CMD_INIT_DEV_PARAMS) in ide_ata_error()
37 (hwif->host_flags & IDE_HFLAG_ERROR_STOPS_FIFO) == 0) { in ide_ata_error()
48 if (hwif->tp_ops->read_status(hwif) & (ATA_BUSY | ATA_DRQ)) in ide_ata_error()
67 ide_hwif_t *hwif = drive->hwif; in ide_atapi_error() local
77 if (hwif->tp_ops->read_status(hwif) & (ATA_BUSY | ATA_DRQ)) in ide_atapi_error()
79 hwif->tp_ops->exec_command(hwif, ATA_CMD_IDLEIMMEDIATE); in ide_atapi_error()
122 rq = drive->hwif->rq; in ide_error()
149 struct request *rq = drive->hwif->rq; in ide_complete_drive_reset()
170 ide_hwif_t *hwif = drive->hwif; in atapi_reset_pollfunc() local
171 const struct ide_tp_ops *tp_ops = hwif->tp_ops; in atapi_reset_pollfunc()
176 stat = tp_ops->read_status(hwif); in atapi_reset_pollfunc()
181 if (time_before(jiffies, hwif->poll_timeout)) { in atapi_reset_pollfunc()
187 hwif->polling = 0; in atapi_reset_pollfunc()
194 hwif->polling = 0; in atapi_reset_pollfunc()
199 static void ide_reset_report_error(ide_hwif_t *hwif, u8 err) in ide_reset_report_error() argument
208 printk(KERN_ERR "%s: reset: master: ", hwif->name); in ide_reset_report_error()
226 ide_hwif_t *hwif = drive->hwif; in reset_pollfunc() local
227 const struct ide_port_ops *port_ops = hwif->port_ops; in reset_pollfunc()
235 hwif->name, drive->name); in reset_pollfunc()
240 tmp = hwif->tp_ops->read_status(hwif); in reset_pollfunc()
243 if (time_before(jiffies, hwif->poll_timeout)) { in reset_pollfunc()
249 hwif->name, tmp); in reset_pollfunc()
256 printk(KERN_INFO "%s: reset: success\n", hwif->name); in reset_pollfunc()
259 ide_reset_report_error(hwif, tmp); in reset_pollfunc()
265 hwif->polling = 0; /* done polling */ in reset_pollfunc()
290 const struct ide_port_ops *port_ops = drive->hwif->port_ops; in pre_reset()
337 ide_hwif_t *hwif = drive->hwif; in do_reset1() local
338 struct ide_io_ports *io_ports = &hwif->io_ports; in do_reset1()
339 const struct ide_tp_ops *tp_ops = hwif->tp_ops; in do_reset1()
346 spin_lock_irqsave(&hwif->lock, flags); in do_reset1()
349 BUG_ON(hwif->handler != NULL); in do_reset1()
356 tp_ops->exec_command(hwif, ATA_CMD_DEV_RESET); in do_reset1()
358 hwif->poll_timeout = jiffies + WAIT_WORSTCASE; in do_reset1()
359 hwif->polling = 1; in do_reset1()
361 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()
371 ide_port_for_each_present_dev(i, tdrive, hwif) { in do_reset1()
381 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()
383 spin_lock_irqsave(&hwif->lock, flags); in do_reset1()
391 ide_port_for_each_dev(i, tdrive, hwif) in do_reset1()
395 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()
409 tp_ops->write_devctl(hwif, ATA_SRST | ATA_NIEN | ATA_DEVCTL_OBS); in do_reset1()
413 tp_ops->write_devctl(hwif, in do_reset1()
418 hwif->poll_timeout = jiffies + WAIT_WORSTCASE; in do_reset1()
419 hwif->polling = 1; in do_reset1()
427 port_ops = hwif->port_ops; in do_reset1()
431 spin_unlock_irqrestore(&hwif->lock, flags); in do_reset1()