aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Liu <daveliu@freescale.com>2009-05-14 10:47:07 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-05-15 14:14:08 -0400
commitd358724385d9bb3e360f5b95c17ec4f77c913460 (patch)
treebf848f530e12466616a341196abf74ea87ecdcf7 /drivers
parentf48c019f1550aea7a3a1227efb9901916f5cd30d (diff)
sata_fsl: Fix the command description of FSL SATA controller
The bit 11 of command description is reserved bit in Freescale SATA controller and needs to be set to '1'. This is needed to make sure the last write from the controller to the buffer descriptor is seen before an interrupt is raised. Signed-off-by: Dave Liu <daveliu@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/sata_fsl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 5edd6549876d..36b8629203be 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -205,6 +205,7 @@ struct cmdhdr_tbl_entry {
205 * Description information bitdefs 205 * Description information bitdefs
206 */ 206 */
207enum { 207enum {
208 CMD_DESC_RES = (1 << 11),
208 VENDOR_SPECIFIC_BIST = (1 << 10), 209 VENDOR_SPECIFIC_BIST = (1 << 10),
209 CMD_DESC_SNOOP_ENABLE = (1 << 9), 210 CMD_DESC_SNOOP_ENABLE = (1 << 9),
210 FPDMA_QUEUED_CMD = (1 << 8), 211 FPDMA_QUEUED_CMD = (1 << 8),
@@ -388,7 +389,7 @@ static void sata_fsl_qc_prep(struct ata_queued_cmd *qc)
388 void __iomem *hcr_base = host_priv->hcr_base; 389 void __iomem *hcr_base = host_priv->hcr_base;
389 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); 390 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base);
390 struct command_desc *cd; 391 struct command_desc *cd;
391 u32 desc_info = CMD_DESC_SNOOP_ENABLE; 392 u32 desc_info = CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE;
392 u32 num_prde = 0; 393 u32 num_prde = 0;
393 u32 ttl_dwords = 0; 394 u32 ttl_dwords = 0;
394 dma_addr_t cd_paddr; 395 dma_addr_t cd_paddr;
@@ -841,7 +842,7 @@ issue_srst:
841 842
842 /* device reset/SRST is a control register update FIS, uses tag0 */ 843 /* device reset/SRST is a control register update FIS, uses tag0 */
843 sata_fsl_setup_cmd_hdr_entry(pp, 0, 844 sata_fsl_setup_cmd_hdr_entry(pp, 0,
844 SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 845 SRST_CMD | CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE, 0, 0, 5);
845 846
846 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ 847 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */
847 ata_tf_to_fis(&tf, pmp, 0, cfis); 848 ata_tf_to_fis(&tf, pmp, 0, cfis);
@@ -887,7 +888,8 @@ issue_srst:
887 * using ATA signature D2H register FIS to the host controller. 888 * using ATA signature D2H register FIS to the host controller.
888 */ 889 */
889 890
890 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 891 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE,
892 0, 0, 5);
891 893
892 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ 894 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */
893 ata_tf_to_fis(&tf, pmp, 0, cfis); 895 ata_tf_to_fis(&tf, pmp, 0, cfis);