[libata] sata_fsl: Fix broken driver, add port multiplier (PMP) support

The following commit (4c9bf4e799ce06a7378f1196587084802a414c03):
libata: replace tf_read with qc_fill_rtf for non-SFF drivers

Broke the sata_fsl.c driver in 2.6.26-rc. I know the following patch fixes
the issue, it clearly also adds port multipler support. The current
2.6.26-rc driver is broken.

On boot with debug enabled we get something like (w/o this patch):

spurious interrupt!!, CC = 0x1
interrupt status 0x1
xx_scr_read, reg_in = 1
spurious interrupt!!, CC = 0x1
interrupt status 0x1
xx_scr_read, reg_in = 1
spurious interrupt!!, CC = 0x1
interrupt status 0x1
xx_scr_read, reg_in = 1

.. continues for ever.

This change fixes this as a side effect of adding port multiplier support.

Signed-off-by: Ashish Kalra <ashish.kalra@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

authored by Ashish Kalra and committed by Jeff Garzik 034d8e8f 19ef9d5e

+160 -58
+160 -58
drivers/ata/sata_fsl.c
··· 34 35 SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 36 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | 37 - ATA_FLAG_NCQ), 38 39 SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, 40 SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ ··· 395 cd = (struct command_desc *)pp->cmdentry + tag; 396 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; 397 398 - ata_tf_to_fis(&qc->tf, 0, 1, (u8 *) &cd->cfis); 399 400 VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", 401 cd->cfis[0], cd->cfis[1], cd->cfis[2]); ··· 437 ioread32(CQ + hcr_base), 438 ioread32(CA + hcr_base), 439 ioread32(CE + hcr_base), ioread32(CC + hcr_base)); 440 441 /* Simply queue command to the controller/device */ 442 iowrite32(1 << tag, CQ + hcr_base); ··· 560 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); 561 } 562 563 static int sata_fsl_port_start(struct ata_port *ap) 564 { 565 struct device *dev = ap->host->dev; 566 struct sata_fsl_port_priv *pp; 567 - int retval; 568 void *mem; 569 dma_addr_t mem_dma; 570 struct sata_fsl_host_priv *host_priv = ap->host->private_data; ··· 715 } 716 717 static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, 718 - unsigned long deadline) 719 { 720 struct ata_port *ap = link->ap; 721 struct sata_fsl_port_priv *pp = ap->private_data; 722 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 723 void __iomem *hcr_base = host_priv->hcr_base; 724 u32 temp; 725 struct ata_taskfile tf; 726 u8 *cfis; ··· 730 unsigned long start_jiffies; 731 732 DPRINTK("in xx_softreset\n"); 733 734 try_offline_again: 735 /* ··· 777 778 temp = ioread32(hcr_base + HCONTROL); 779 temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); 780 iowrite32(temp, hcr_base + HCONTROL); 781 782 temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); ··· 803 ata_port_printk(ap, KERN_WARNING, 804 "No Device OR PHYRDY change,Hstatus = 0x%x\n", 805 ioread32(hcr_base + HSTATUS)); 806 - goto err; 807 } 808 809 /* ··· 816 817 if ((temp & 0xFF) != 0x18) { 818 ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); 819 - goto err; 820 } else { 821 ata_port_printk(ap, KERN_INFO, 822 "Signature Update detected @ %d msecs\n", ··· 832 * reached here, we can send a command to the target device 833 */ 834 835 DPRINTK("Sending SRST/device reset\n"); 836 837 ata_tf_init(link->device, &tf); ··· 843 SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 844 845 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ 846 - ata_tf_to_fis(&tf, 0, 0, cfis); 847 848 DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", 849 cfis[0], cfis[1], cfis[2], cfis[3]); ··· 889 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 890 891 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ 892 - ata_tf_to_fis(&tf, 0, 0, cfis); 893 894 iowrite32(1, CQ + hcr_base); 895 msleep(150); /* ?? */ 896 ··· 923 VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); 924 } 925 926 return 0; 927 928 err: 929 return -EIO; 930 } 931 932 static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) ··· 951 952 static void sata_fsl_error_intr(struct ata_port *ap) 953 { 954 - struct ata_link *link = &ap->link; 955 - struct ata_eh_info *ehi = &link->eh_info; 956 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 957 void __iomem *hcr_base = host_priv->hcr_base; 958 - u32 hstatus, dereg, cereg = 0, SError = 0; 959 unsigned int err_mask = 0, action = 0; 960 - struct ata_queued_cmd *qc; 961 - int freeze = 0; 962 963 hstatus = ioread32(hcr_base + HSTATUS); 964 cereg = ioread32(hcr_base + CE); 965 966 ata_ehi_clear_desc(ehi); 967 968 /* ··· 975 sata_fsl_scr_read(ap, SCR_ERROR, &SError); 976 if (unlikely(SError & 0xFFFF0000)) { 977 sata_fsl_scr_write(ap, SCR_ERROR, SError); 978 - err_mask |= AC_ERR_ATA_BUS; 979 } 980 981 DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", 982 hstatus, cereg, ioread32(hcr_base + DE), SError); 983 984 /* handle single device errors */ 985 if (cereg) { ··· 1021 * clearing the device error, we can issue commands to the 1022 * device to interrogate it to find the source of the error. 1023 */ 1024 - dereg = ioread32(hcr_base + DE); 1025 - iowrite32(dereg, hcr_base + DE); 1026 - iowrite32(cereg, hcr_base + CE); 1027 1028 DPRINTK("single device error, CE=0x%x, DE=0x%x\n", 1029 ioread32(hcr_base + CE), ioread32(hcr_base + DE)); 1030 - /* 1031 - * We should consider this as non fatal error, and TF must 1032 - * be updated as done below. 1033 - */ 1034 1035 - err_mask |= AC_ERR_DEV; 1036 - } 1037 1038 - /* handle fatal errors */ 1039 - if (hstatus & FATAL_ERROR_DECODE) { 1040 - err_mask |= AC_ERR_ATA_BUS; 1041 - action |= ATA_EH_RESET; 1042 - /* how will fatal error interrupts be completed ?? */ 1043 - freeze = 1; 1044 - } 1045 1046 - /* Handle PHYRDY change notification */ 1047 - if (hstatus & INT_ON_PHYRDY_CHG) { 1048 - DPRINTK("SATA FSL: PHYRDY change indication\n"); 1049 1050 - /* Setup a soft-reset EH action */ 1051 - ata_ehi_hotplugged(ehi); 1052 - freeze = 1; 1053 } 1054 1055 /* record error info */ 1056 - qc = ata_qc_from_tag(ap, link->active_tag); 1057 - 1058 - if (qc) 1059 qc->err_mask |= err_mask; 1060 - else 1061 ehi->err_mask |= err_mask; 1062 1063 ehi->action |= action; 1064 - ehi->serror |= SError; 1065 1066 /* freeze or abort */ 1067 if (freeze) 1068 ata_port_freeze(ap); 1069 - else 1070 - ata_port_abort(ap); 1071 } 1072 1073 static void sata_fsl_host_intr(struct ata_port *ap) 1074 { 1075 - struct ata_link *link = &ap->link; 1076 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 1077 void __iomem *hcr_base = host_priv->hcr_base; 1078 u32 hstatus, qc_active = 0; ··· 1105 return; 1106 } 1107 1108 - if (link->sactive) { /* only true for NCQ commands */ 1109 int i; 1110 - /* Read command completed register */ 1111 - qc_active = ioread32(hcr_base + CC); 1112 /* clear CC bit, this will also complete the interrupt */ 1113 iowrite32(qc_active, hcr_base + CC); 1114 ··· 1129 for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { 1130 if (qc_active & (1 << i)) { 1131 qc = ata_qc_from_tag(ap, i); 1132 - if (qc) 1133 ata_qc_complete(qc); 1134 DPRINTK 1135 ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", 1136 i, ioread32(hcr_base + CC), ··· 1140 } 1141 return; 1142 1143 - } else if (ap->qc_active) { 1144 iowrite32(1, hcr_base + CC); 1145 - qc = ata_qc_from_tag(ap, link->active_tag); 1146 1147 - DPRINTK("completing non-ncq cmd, tag=%d,CC=0x%x\n", 1148 - link->active_tag, ioread32(hcr_base + CC)); 1149 1150 - if (qc) 1151 ata_qc_complete(qc); 1152 } else { 1153 /* Spurious Interrupt!! */ 1154 DPRINTK("spurious interrupt!!, CC = 0x%x\n", 1155 ioread32(hcr_base + CC)); 1156 return; 1157 } 1158 } ··· 1230 iowrite32(0x00000FFFF, hcr_base + CE); 1231 iowrite32(0x00000FFFF, hcr_base + DE); 1232 1233 - /* initially assuming no Port multiplier, set CQPMP to 0 */ 1234 - iowrite32(0x0, hcr_base + CQPMP); 1235 - 1236 /* 1237 * host controller will be brought on-line, during xx_port_start() 1238 * callback, that should also initiate the OOB, COMINIT sequence ··· 1251 .dma_boundary = ATA_DMA_BOUNDARY, 1252 }; 1253 1254 - static const struct ata_port_operations sata_fsl_ops = { 1255 - .inherits = &sata_port_ops, 1256 1257 .qc_prep = sata_fsl_qc_prep, 1258 .qc_issue = sata_fsl_qc_issue, ··· 1265 .thaw = sata_fsl_thaw, 1266 .prereset = sata_fsl_prereset, 1267 .softreset = sata_fsl_softreset, 1268 .post_internal_cmd = sata_fsl_post_internal_cmd, 1269 1270 .port_start = sata_fsl_port_start, 1271 .port_stop = sata_fsl_port_stop, 1272 }; 1273 1274 static const struct ata_port_info sata_fsl_port_info[] = {
··· 34 35 SATA_FSL_HOST_FLAGS = (ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | 36 ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | 37 + ATA_FLAG_PMP | ATA_FLAG_NCQ), 38 39 SATA_FSL_MAX_CMDS = SATA_FSL_QUEUE_DEPTH, 40 SATA_FSL_CMD_HDR_SIZE = 16, /* 4 DWORDS */ ··· 395 cd = (struct command_desc *)pp->cmdentry + tag; 396 cd_paddr = pp->cmdentry_paddr + tag * SATA_FSL_CMD_DESC_SIZE; 397 398 + ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *) &cd->cfis); 399 400 VPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x\n", 401 cd->cfis[0], cd->cfis[1], cd->cfis[2]); ··· 437 ioread32(CQ + hcr_base), 438 ioread32(CA + hcr_base), 439 ioread32(CE + hcr_base), ioread32(CC + hcr_base)); 440 + 441 + iowrite32(qc->dev->link->pmp, CQPMP + hcr_base); 442 443 /* Simply queue command to the controller/device */ 444 iowrite32(1 << tag, CQ + hcr_base); ··· 558 ioread32(hcr_base + HCONTROL), ioread32(hcr_base + HSTATUS)); 559 } 560 561 + static void sata_fsl_pmp_attach(struct ata_port *ap) 562 + { 563 + struct sata_fsl_host_priv *host_priv = ap->host->private_data; 564 + void __iomem *hcr_base = host_priv->hcr_base; 565 + u32 temp; 566 + 567 + temp = ioread32(hcr_base + HCONTROL); 568 + iowrite32((temp | HCONTROL_PMP_ATTACHED), hcr_base + HCONTROL); 569 + } 570 + 571 + static void sata_fsl_pmp_detach(struct ata_port *ap) 572 + { 573 + struct sata_fsl_host_priv *host_priv = ap->host->private_data; 574 + void __iomem *hcr_base = host_priv->hcr_base; 575 + u32 temp; 576 + 577 + temp = ioread32(hcr_base + HCONTROL); 578 + temp &= ~HCONTROL_PMP_ATTACHED; 579 + iowrite32(temp, hcr_base + HCONTROL); 580 + 581 + /* enable interrupts on the controller/port */ 582 + temp = ioread32(hcr_base + HCONTROL); 583 + iowrite32((temp | DEFAULT_PORT_IRQ_ENABLE_MASK), hcr_base + HCONTROL); 584 + 585 + } 586 + 587 static int sata_fsl_port_start(struct ata_port *ap) 588 { 589 struct device *dev = ap->host->dev; 590 struct sata_fsl_port_priv *pp; 591 void *mem; 592 dma_addr_t mem_dma; 593 struct sata_fsl_host_priv *host_priv = ap->host->private_data; ··· 688 } 689 690 static int sata_fsl_softreset(struct ata_link *link, unsigned int *class, 691 + unsigned long deadline) 692 { 693 struct ata_port *ap = link->ap; 694 struct sata_fsl_port_priv *pp = ap->private_data; 695 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 696 void __iomem *hcr_base = host_priv->hcr_base; 697 + int pmp = sata_srst_pmp(link); 698 u32 temp; 699 struct ata_taskfile tf; 700 u8 *cfis; ··· 702 unsigned long start_jiffies; 703 704 DPRINTK("in xx_softreset\n"); 705 + 706 + if (pmp != SATA_PMP_CTRL_PORT) 707 + goto issue_srst; 708 709 try_offline_again: 710 /* ··· 746 747 temp = ioread32(hcr_base + HCONTROL); 748 temp |= (HCONTROL_ONLINE_PHY_RST | HCONTROL_SNOOP_ENABLE); 749 + temp |= HCONTROL_PMP_ATTACHED; 750 iowrite32(temp, hcr_base + HCONTROL); 751 752 temp = ata_wait_register(hcr_base + HSTATUS, ONLINE, 0, 1, 500); ··· 771 ata_port_printk(ap, KERN_WARNING, 772 "No Device OR PHYRDY change,Hstatus = 0x%x\n", 773 ioread32(hcr_base + HSTATUS)); 774 + *class = ATA_DEV_NONE; 775 + goto out; 776 } 777 778 /* ··· 783 784 if ((temp & 0xFF) != 0x18) { 785 ata_port_printk(ap, KERN_WARNING, "No Signature Update\n"); 786 + *class = ATA_DEV_NONE; 787 + goto out; 788 } else { 789 ata_port_printk(ap, KERN_INFO, 790 "Signature Update detected @ %d msecs\n", ··· 798 * reached here, we can send a command to the target device 799 */ 800 801 + issue_srst: 802 DPRINTK("Sending SRST/device reset\n"); 803 804 ata_tf_init(link->device, &tf); ··· 808 SRST_CMD | CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 809 810 tf.ctl |= ATA_SRST; /* setup SRST bit in taskfile control reg */ 811 + ata_tf_to_fis(&tf, pmp, 0, cfis); 812 813 DPRINTK("Dumping cfis : 0x%x, 0x%x, 0x%x, 0x%x\n", 814 cfis[0], cfis[1], cfis[2], cfis[3]); ··· 854 sata_fsl_setup_cmd_hdr_entry(pp, 0, CMD_DESC_SNOOP_ENABLE, 0, 0, 5); 855 856 tf.ctl &= ~ATA_SRST; /* 2nd H2D Ctl. register FIS */ 857 + ata_tf_to_fis(&tf, pmp, 0, cfis); 858 859 + if (pmp != SATA_PMP_CTRL_PORT) 860 + iowrite32(pmp, CQPMP + hcr_base); 861 iowrite32(1, CQ + hcr_base); 862 msleep(150); /* ?? */ 863 ··· 886 VPRINTK("cereg = 0x%x\n", ioread32(hcr_base + CE)); 887 } 888 889 + out: 890 return 0; 891 892 err: 893 return -EIO; 894 + } 895 + 896 + static void sata_fsl_error_handler(struct ata_port *ap) 897 + { 898 + 899 + DPRINTK("in xx_error_handler\n"); 900 + sata_pmp_error_handler(ap); 901 + 902 } 903 904 static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc) ··· 905 906 static void sata_fsl_error_intr(struct ata_port *ap) 907 { 908 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 909 void __iomem *hcr_base = host_priv->hcr_base; 910 + u32 hstatus, dereg=0, cereg = 0, SError = 0; 911 unsigned int err_mask = 0, action = 0; 912 + int freeze = 0, abort=0; 913 + struct ata_link *link = NULL; 914 + struct ata_queued_cmd *qc = NULL; 915 + struct ata_eh_info *ehi; 916 917 hstatus = ioread32(hcr_base + HSTATUS); 918 cereg = ioread32(hcr_base + CE); 919 920 + /* first, analyze and record host port events */ 921 + link = &ap->link; 922 + ehi = &link->eh_info; 923 ata_ehi_clear_desc(ehi); 924 925 /* ··· 926 sata_fsl_scr_read(ap, SCR_ERROR, &SError); 927 if (unlikely(SError & 0xFFFF0000)) { 928 sata_fsl_scr_write(ap, SCR_ERROR, SError); 929 } 930 931 DPRINTK("error_intr,hStat=0x%x,CE=0x%x,DE =0x%x,SErr=0x%x\n", 932 hstatus, cereg, ioread32(hcr_base + DE), SError); 933 + 934 + /* handle fatal errors */ 935 + if (hstatus & FATAL_ERROR_DECODE) { 936 + ehi->err_mask |= AC_ERR_ATA_BUS; 937 + ehi->action |= ATA_EH_SOFTRESET; 938 + 939 + /* 940 + * Ignore serror in case of fatal errors as we always want 941 + * to do a soft-reset of the FSL SATA controller. Analyzing 942 + * serror may cause libata to schedule a hard-reset action, 943 + * and hard-reset currently does not do controller 944 + * offline/online, causing command timeouts and leads to an 945 + * un-recoverable state, hence make libATA ignore 946 + * autopsy in case of fatal errors. 947 + */ 948 + 949 + ehi->flags |= ATA_EHI_NO_AUTOPSY; 950 + 951 + freeze = 1; 952 + } 953 + 954 + /* Handle PHYRDY change notification */ 955 + if (hstatus & INT_ON_PHYRDY_CHG) { 956 + DPRINTK("SATA FSL: PHYRDY change indication\n"); 957 + 958 + /* Setup a soft-reset EH action */ 959 + ata_ehi_hotplugged(ehi); 960 + ata_ehi_push_desc(ehi, "%s", "PHY RDY changed"); 961 + freeze = 1; 962 + } 963 964 /* handle single device errors */ 965 if (cereg) { ··· 943 * clearing the device error, we can issue commands to the 944 * device to interrogate it to find the source of the error. 945 */ 946 + abort = 1; 947 948 DPRINTK("single device error, CE=0x%x, DE=0x%x\n", 949 ioread32(hcr_base + CE), ioread32(hcr_base + DE)); 950 951 + /* find out the offending link and qc */ 952 + if (ap->nr_pmp_links) { 953 + dereg = ioread32(hcr_base + DE); 954 + iowrite32(dereg, hcr_base + DE); 955 + iowrite32(cereg, hcr_base + CE); 956 957 + if (dereg < ap->nr_pmp_links) { 958 + link = &ap->pmp_link[dereg]; 959 + ehi = &link->eh_info; 960 + qc = ata_qc_from_tag(ap, link->active_tag); 961 + /* 962 + * We should consider this as non fatal error, 963 + * and TF must be updated as done below. 964 + */ 965 966 + err_mask |= AC_ERR_DEV; 967 968 + } else { 969 + err_mask |= AC_ERR_HSM; 970 + action |= ATA_EH_HARDRESET; 971 + freeze = 1; 972 + } 973 + } else { 974 + dereg = ioread32(hcr_base + DE); 975 + iowrite32(dereg, hcr_base + DE); 976 + iowrite32(cereg, hcr_base + CE); 977 + 978 + qc = ata_qc_from_tag(ap, link->active_tag); 979 + /* 980 + * We should consider this as non fatal error, 981 + * and TF must be updated as done below. 982 + */ 983 + err_mask |= AC_ERR_DEV; 984 + } 985 } 986 987 /* record error info */ 988 + if (qc) { 989 qc->err_mask |= err_mask; 990 + } else 991 ehi->err_mask |= err_mask; 992 993 ehi->action |= action; 994 995 /* freeze or abort */ 996 if (freeze) 997 ata_port_freeze(ap); 998 + else if (abort) { 999 + if (qc) 1000 + ata_link_abort(qc->dev->link); 1001 + else 1002 + ata_port_abort(ap); 1003 + } 1004 } 1005 1006 static void sata_fsl_host_intr(struct ata_port *ap) 1007 { 1008 struct sata_fsl_host_priv *host_priv = ap->host->private_data; 1009 void __iomem *hcr_base = host_priv->hcr_base; 1010 u32 hstatus, qc_active = 0; ··· 1017 return; 1018 } 1019 1020 + /* Read command completed register */ 1021 + qc_active = ioread32(hcr_base + CC); 1022 + 1023 + VPRINTK("Status of all queues :\n"); 1024 + VPRINTK("qc_active/CC = 0x%x, CA = 0x%x, CE=0x%x,CQ=0x%x,apqa=0x%x\n", 1025 + qc_active, 1026 + ioread32(hcr_base + CA), 1027 + ioread32(hcr_base + CE), 1028 + ioread32(hcr_base + CQ), 1029 + ap->qc_active); 1030 + 1031 + if (qc_active & ap->qc_active) { 1032 int i; 1033 /* clear CC bit, this will also complete the interrupt */ 1034 iowrite32(qc_active, hcr_base + CC); 1035 ··· 1032 for (i = 0; i < SATA_FSL_QUEUE_DEPTH; i++) { 1033 if (qc_active & (1 << i)) { 1034 qc = ata_qc_from_tag(ap, i); 1035 + if (qc) { 1036 ata_qc_complete(qc); 1037 + } 1038 DPRINTK 1039 ("completing ncq cmd,tag=%d,CC=0x%x,CA=0x%x\n", 1040 i, ioread32(hcr_base + CC), ··· 1042 } 1043 return; 1044 1045 + } else if ((ap->qc_active & (1 << ATA_TAG_INTERNAL))) { 1046 iowrite32(1, hcr_base + CC); 1047 + qc = ata_qc_from_tag(ap, ATA_TAG_INTERNAL); 1048 1049 + DPRINTK("completing non-ncq cmd, CC=0x%x\n", 1050 + ioread32(hcr_base + CC)); 1051 1052 + if (qc) { 1053 ata_qc_complete(qc); 1054 + } 1055 } else { 1056 /* Spurious Interrupt!! */ 1057 DPRINTK("spurious interrupt!!, CC = 0x%x\n", 1058 ioread32(hcr_base + CC)); 1059 + iowrite32(qc_active, hcr_base + CC); 1060 return; 1061 } 1062 } ··· 1130 iowrite32(0x00000FFFF, hcr_base + CE); 1131 iowrite32(0x00000FFFF, hcr_base + DE); 1132 1133 /* 1134 * host controller will be brought on-line, during xx_port_start() 1135 * callback, that should also initiate the OOB, COMINIT sequence ··· 1154 .dma_boundary = ATA_DMA_BOUNDARY, 1155 }; 1156 1157 + static struct ata_port_operations sata_fsl_ops = { 1158 + .inherits = &sata_pmp_port_ops, 1159 1160 .qc_prep = sata_fsl_qc_prep, 1161 .qc_issue = sata_fsl_qc_issue, ··· 1168 .thaw = sata_fsl_thaw, 1169 .prereset = sata_fsl_prereset, 1170 .softreset = sata_fsl_softreset, 1171 + .pmp_softreset = sata_fsl_softreset, 1172 + .error_handler = sata_fsl_error_handler, 1173 .post_internal_cmd = sata_fsl_post_internal_cmd, 1174 1175 .port_start = sata_fsl_port_start, 1176 .port_stop = sata_fsl_port_stop, 1177 + 1178 + .pmp_attach = sata_fsl_pmp_attach, 1179 + .pmp_detach = sata_fsl_pmp_detach, 1180 }; 1181 1182 static const struct ata_port_info sata_fsl_port_info[] = {