diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 12:20:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-06 12:20:19 -0400 |
commit | 132a4edb2b69924742f62dc06ace42ad2a9f57f3 (patch) | |
tree | 53b73abd91273d2cad021fb9b5218f3d18d90c86 /drivers/ata/sata_mv.c | |
parent | e6da54d84f9286edbe4c92ff5023ff481ce2a5c9 (diff) | |
parent | 752e386c247664152f2cce37915d1f50631d7f42 (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:
sata_fsl,mv,nv: prepare for NCQ command completion update
ata: Convert pci_table entries to PCI_VDEVICE (if PCI_ANY_ID is used)
libata: more PCI IDs for jmicron controllers
ata_piix: fix locking around SIDPR access
[libata] update blacklist for new hyphenated pattern ranges (v2)
libata: allow hyphenated pattern ranges
ata_generic: drop hard coded DMA force logic for CENATEK
[libata] ahci: Fix warning: comparison between 'enum <anonymous>' and 'enum <anonymous>'
[libata] add ATA_CMD_DSM to ata_get_cmd_descript
[libata] Add Samsung PATA controller driver, pata_samsung_cf
[libata] Add 460EX on-chip SATA driver, sata_dwc_460ex
libata: reduce blacklist size even more (v2)
libata: reduce blacklist size (v2)
libata: glob_match for ata_device_blacklist (v2)
ahci_platform: Remove unneeded ahci_driver.probe assignment
ahci_platform: Provide for vendor specific init
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r-- | drivers/ata/sata_mv.c | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index a476cd99b95d..9463c71dd38e 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -2716,34 +2716,35 @@ static void mv_err_intr(struct ata_port *ap) | |||
2716 | static void mv_process_crpb_response(struct ata_port *ap, | 2716 | static void mv_process_crpb_response(struct ata_port *ap, |
2717 | struct mv_crpb *response, unsigned int tag, int ncq_enabled) | 2717 | struct mv_crpb *response, unsigned int tag, int ncq_enabled) |
2718 | { | 2718 | { |
2719 | u8 ata_status; | ||
2720 | u16 edma_status = le16_to_cpu(response->flags); | ||
2719 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag); | 2721 | struct ata_queued_cmd *qc = ata_qc_from_tag(ap, tag); |
2720 | 2722 | ||
2721 | if (qc) { | 2723 | if (unlikely(!qc)) { |
2722 | u8 ata_status; | ||
2723 | u16 edma_status = le16_to_cpu(response->flags); | ||
2724 | /* | ||
2725 | * edma_status from a response queue entry: | ||
2726 | * LSB is from EDMA_ERR_IRQ_CAUSE (non-NCQ only). | ||
2727 | * MSB is saved ATA status from command completion. | ||
2728 | */ | ||
2729 | if (!ncq_enabled) { | ||
2730 | u8 err_cause = edma_status & 0xff & ~EDMA_ERR_DEV; | ||
2731 | if (err_cause) { | ||
2732 | /* | ||
2733 | * Error will be seen/handled by mv_err_intr(). | ||
2734 | * So do nothing at all here. | ||
2735 | */ | ||
2736 | return; | ||
2737 | } | ||
2738 | } | ||
2739 | ata_status = edma_status >> CRPB_FLAG_STATUS_SHIFT; | ||
2740 | if (!ac_err_mask(ata_status)) | ||
2741 | ata_qc_complete(qc); | ||
2742 | /* else: leave it for mv_err_intr() */ | ||
2743 | } else { | ||
2744 | ata_port_printk(ap, KERN_ERR, "%s: no qc for tag=%d\n", | 2724 | ata_port_printk(ap, KERN_ERR, "%s: no qc for tag=%d\n", |
2745 | __func__, tag); | 2725 | __func__, tag); |
2726 | return; | ||
2727 | } | ||
2728 | |||
2729 | /* | ||
2730 | * edma_status from a response queue entry: | ||
2731 | * LSB is from EDMA_ERR_IRQ_CAUSE (non-NCQ only). | ||
2732 | * MSB is saved ATA status from command completion. | ||
2733 | */ | ||
2734 | if (!ncq_enabled) { | ||
2735 | u8 err_cause = edma_status & 0xff & ~EDMA_ERR_DEV; | ||
2736 | if (err_cause) { | ||
2737 | /* | ||
2738 | * Error will be seen/handled by | ||
2739 | * mv_err_intr(). So do nothing at all here. | ||
2740 | */ | ||
2741 | return; | ||
2742 | } | ||
2746 | } | 2743 | } |
2744 | ata_status = edma_status >> CRPB_FLAG_STATUS_SHIFT; | ||
2745 | if (!ac_err_mask(ata_status)) | ||
2746 | ata_qc_complete(qc); | ||
2747 | /* else: leave it for mv_err_intr() */ | ||
2747 | } | 2748 | } |
2748 | 2749 | ||
2749 | static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp) | 2750 | static void mv_process_crpb_entries(struct ata_port *ap, struct mv_port_priv *pp) |