diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:18:22 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:18:22 -0500 |
| commit | 6d272940537e834848d88c11b428e9973b8fa2bc (patch) | |
| tree | f01b6d173c62e5f9daeb50937ff6d1d17e4320f6 /drivers/ata/libata-eh.c | |
| parent | f4d53cedce872fe1439818d15e067b497b5d466f (diff) | |
| parent | e190222d04cb1119c62876ac87cf9b9403ba3bd5 (diff) | |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (21 commits)
libata: bump transfer chunk size if it's odd
libata: Return proper ATA INT status in pata_bf54x driver
pata_ali: trim trailing whitespace (fix checkpatch complaints)
pata_isapnp: Polled devices
pata_hpt37x: Fix cable detect bug spotted by Sergei
pata_ali: Lots of problems still showing up with small ATAPI DMA
pata_ali: Add Mitac 8317 and derivatives
libata-core: List more documentation sources for reference
ata_piix: Invalid use of writel/readl with iomap
sata_sil24: fix sg table sizing
pata_jmicron: fix disabled port handling in jmicron_pre_reset()
pata_sil680: kill bogus reset code (take 2)
ata_piix: port enable for the first SATA controller of ICH8 is 0xf not 0x3
ata_piix: only enable the first port on apple macbook pro
ata_piix: reorganize controller IDs
pata_sis.c: Add Packard Bell EasyNote K5305 to laptops
libata-scsi: be tolerant of 12-byte ATAPI commands in 16-byte CDBs
libata: use ATA_HORKAGE_STUCK_ERR for ATAPI tape drives
libata: workaround DRQ=1 ERR=1 for ATAPI tape drives
libata: remove unused functions
...
Diffstat (limited to 'drivers/ata/libata-eh.c')
| -rw-r--r-- | drivers/ata/libata-eh.c | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index ed8813b222a0..0dac69db1fdf 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
| @@ -559,101 +559,6 @@ void ata_port_wait_eh(struct ata_port *ap) | |||
| 559 | } | 559 | } |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | /** | ||
| 563 | * ata_qc_timeout - Handle timeout of queued command | ||
| 564 | * @qc: Command that timed out | ||
| 565 | * | ||
| 566 | * Some part of the kernel (currently, only the SCSI layer) | ||
| 567 | * has noticed that the active command on port @ap has not | ||
| 568 | * completed after a specified length of time. Handle this | ||
| 569 | * condition by disabling DMA (if necessary) and completing | ||
| 570 | * transactions, with error if necessary. | ||
| 571 | * | ||
| 572 | * This also handles the case of the "lost interrupt", where | ||
| 573 | * for some reason (possibly hardware bug, possibly driver bug) | ||
| 574 | * an interrupt was not delivered to the driver, even though the | ||
| 575 | * transaction completed successfully. | ||
| 576 | * | ||
| 577 | * TODO: kill this function once old EH is gone. | ||
| 578 | * | ||
| 579 | * LOCKING: | ||
| 580 | * Inherited from SCSI layer (none, can sleep) | ||
| 581 | */ | ||
| 582 | static void ata_qc_timeout(struct ata_queued_cmd *qc) | ||
| 583 | { | ||
| 584 | struct ata_port *ap = qc->ap; | ||
| 585 | u8 host_stat = 0, drv_stat; | ||
| 586 | unsigned long flags; | ||
| 587 | |||
| 588 | DPRINTK("ENTER\n"); | ||
| 589 | |||
| 590 | ap->hsm_task_state = HSM_ST_IDLE; | ||
| 591 | |||
| 592 | spin_lock_irqsave(ap->lock, flags); | ||
| 593 | |||
| 594 | switch (qc->tf.protocol) { | ||
| 595 | |||
| 596 | case ATA_PROT_DMA: | ||
| 597 | case ATA_PROT_ATAPI_DMA: | ||
| 598 | host_stat = ap->ops->bmdma_status(ap); | ||
| 599 | |||
| 600 | /* before we do anything else, clear DMA-Start bit */ | ||
| 601 | ap->ops->bmdma_stop(qc); | ||
| 602 | |||
| 603 | /* fall through */ | ||
| 604 | |||
| 605 | default: | ||
| 606 | ata_altstatus(ap); | ||
| 607 | drv_stat = ata_chk_status(ap); | ||
| 608 | |||
| 609 | /* ack bmdma irq events */ | ||
| 610 | ap->ops->irq_clear(ap); | ||
| 611 | |||
| 612 | ata_dev_printk(qc->dev, KERN_ERR, "command 0x%x timeout, " | ||
| 613 | "stat 0x%x host_stat 0x%x\n", | ||
| 614 | qc->tf.command, drv_stat, host_stat); | ||
| 615 | |||
| 616 | /* complete taskfile transaction */ | ||
| 617 | qc->err_mask |= AC_ERR_TIMEOUT; | ||
| 618 | break; | ||
| 619 | } | ||
| 620 | |||
| 621 | spin_unlock_irqrestore(ap->lock, flags); | ||
| 622 | |||
| 623 | ata_eh_qc_complete(qc); | ||
| 624 | |||
| 625 | DPRINTK("EXIT\n"); | ||
| 626 | } | ||
| 627 | |||
| 628 | /** | ||
| 629 | * ata_eng_timeout - Handle timeout of queued command | ||
| 630 | * @ap: Port on which timed-out command is active | ||
| 631 | * | ||
| 632 | * Some part of the kernel (currently, only the SCSI layer) | ||
| 633 | * has noticed that the active command on port @ap has not | ||
| 634 | * completed after a specified length of time. Handle this | ||
| 635 | * condition by disabling DMA (if necessary) and completing | ||
| 636 | * transactions, with error if necessary. | ||
| 637 | * | ||
| 638 | * This also handles the case of the "lost interrupt", where | ||
| 639 | * for some reason (possibly hardware bug, possibly driver bug) | ||
| 640 | * an interrupt was not delivered to the driver, even though the | ||
| 641 | * transaction completed successfully. | ||
| 642 | * | ||
| 643 | * TODO: kill this function once old EH is gone. | ||
| 644 | * | ||
| 645 | * LOCKING: | ||
| 646 | * Inherited from SCSI layer (none, can sleep) | ||
| 647 | */ | ||
| 648 | void ata_eng_timeout(struct ata_port *ap) | ||
| 649 | { | ||
| 650 | DPRINTK("ENTER\n"); | ||
| 651 | |||
| 652 | ata_qc_timeout(ata_qc_from_tag(ap, ap->link.active_tag)); | ||
| 653 | |||
| 654 | DPRINTK("EXIT\n"); | ||
| 655 | } | ||
| 656 | |||
| 657 | static int ata_eh_nr_in_flight(struct ata_port *ap) | 562 | static int ata_eh_nr_in_flight(struct ata_port *ap) |
| 658 | { | 563 | { |
| 659 | unsigned int tag; | 564 | unsigned int tag; |
