aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_fsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_fsl.c')
-rw-r--r--drivers/ata/sata_fsl.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index e076e1f2e4d1..c3b036004735 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -730,10 +730,6 @@ static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
730 u8 *cfis; 730 u8 *cfis;
731 u32 Serror; 731 u32 Serror;
732 int i = 0; 732 int i = 0;
733 struct ata_queued_cmd qc;
734 u8 *buf;
735 dma_addr_t dma_address;
736 struct scatterlist *sg;
737 unsigned long start_jiffies; 733 unsigned long start_jiffies;
738 734
739 DPRINTK("in xx_softreset\n"); 735 DPRINTK("in xx_softreset\n");
@@ -833,9 +829,6 @@ try_offline_again:
833 * reached here, we can send a command to the target device 829 * reached here, we can send a command to the target device
834 */ 830 */
835 831
836 if (link->sactive)
837 goto skip_srst_do_ncq_error_handling;
838
839 DPRINTK("Sending SRST/device reset\n"); 832 DPRINTK("Sending SRST/device reset\n");
840 833
841 ata_tf_init(link->device, &tf); 834 ata_tf_init(link->device, &tf);
@@ -903,69 +896,6 @@ try_offline_again:
903 * command bit of the CCreg 896 * command bit of the CCreg
904 */ 897 */
905 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */ 898 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
906 goto check_device_signature;
907
908skip_srst_do_ncq_error_handling:
909
910 VPRINTK("Sending read log ext(10h) command\n");
911
912 memset(&qc, 0, sizeof(struct ata_queued_cmd));
913 ata_tf_init(link->device, &tf);
914
915 tf.command = ATA_CMD_READ_LOG_EXT;
916 tf.lbal = ATA_LOG_SATA_NCQ;
917 tf.nsect = 1;
918 tf.hob_nsect = 0;
919 tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_LBA48 | ATA_TFLAG_DEVICE;
920 tf.protocol = ATA_PROT_PIO;
921
922 qc.tag = ATA_TAG_INTERNAL;
923 qc.scsicmd = NULL;
924 qc.ap = ap;
925 qc.dev = link->device;
926
927 qc.tf = tf;
928 qc.flags |= ATA_QCFLAG_RESULT_TF;
929 qc.dma_dir = DMA_FROM_DEVICE;
930
931 buf = ap->sector_buf;
932 ata_sg_init_one(&qc, buf, 1 * ATA_SECT_SIZE);
933
934 /*
935 * Need to DMA-map the memory buffer associated with the command
936 */
937
938 sg = qc.__sg;
939 dma_address = dma_map_single(ap->dev, qc.buf_virt,
940 sg->length, DMA_FROM_DEVICE);
941
942 sg_dma_address(sg) = dma_address;
943 sg_dma_len(sg) = sg->length;
944
945 VPRINTK("EH, addr = 0x%x, len = 0x%x\n", dma_address, sg->length);
946
947 sata_fsl_qc_prep(&qc);
948 sata_fsl_qc_issue(&qc);
949
950 temp = ata_wait_register(CQ + hcr_base, 0x1, 0x1, 1, 5000);
951 if (temp & 0x1) {
952 VPRINTK("READ_LOG_EXT_10H issue failed\n");
953
954 VPRINTK("READ_LOG@5000,CQ=0x%x,CA=0x%x,CC=0x%x\n",
955 ioread32(CQ + hcr_base),
956 ioread32(CA + hcr_base), ioread32(CC + hcr_base));
957
958 sata_fsl_scr_read(ap, SCR_ERROR, &Serror);
959
960 VPRINTK("HStatus = 0x%x\n", ioread32(hcr_base + HSTATUS));
961 VPRINTK("HControl = 0x%x\n", ioread32(hcr_base + HCONTROL));
962 VPRINTK("Serror = 0x%x\n", Serror);
963 goto err;
964 }
965
966 iowrite32(0x01, CC + hcr_base); /* We know it will be cmd#0 always */
967
968check_device_signature:
969 899
970 DPRINTK("SATA FSL : Now checking device signature\n"); 900 DPRINTK("SATA FSL : Now checking device signature\n");
971 901