Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dave Liu and committed by
Jeff Garzik
d3587243 f48c019f

+5 -3
+5 -3
drivers/ata/sata_fsl.c
··· 205 205 * Description information bitdefs 206 206 */ 207 207 enum { 208 + CMD_DESC_RES = (1 << 11), 208 209 VENDOR_SPECIFIC_BIST = (1 << 10), 209 210 CMD_DESC_SNOOP_ENABLE = (1 << 9), 210 211 FPDMA_QUEUED_CMD = (1 << 8), ··· 389 388 void __iomem *hcr_base = host_priv->hcr_base; 390 389 unsigned int tag = sata_fsl_tag(qc->tag, hcr_base); 391 390 struct command_desc *cd; 392 - u32 desc_info = CMD_DESC_SNOOP_ENABLE; 391 + u32 desc_info = CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE; 393 392 u32 num_prde = 0; 394 393 u32 ttl_dwords = 0; 395 394 dma_addr_t cd_paddr; ··· 842 841 843 842 /* device reset/SRST is a control register update FIS, uses tag0 */ 844 843 sata_fsl_setup_cmd_hdr_entry(pp, 0, 845 - SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 844 + SRST_CMD | CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 846 845 847 846 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ 848 847 ata_tf_to_fis(&tf, pmp, 0, cfis); ··· 888 887 * using ATA signature D2H register FIS to the host controller. 889 888 */ 890 889 891 - sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 890 + sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_RES | CMD_DESC_SNOOP_ENABLE, 891 + 0, 0, 5); 892 892 893 893 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ 894 894 ata_tf_to_fis(&tf, pmp, 0, cfis);