aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c37
1 files changed, 12 insertions, 25 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index ad169ffbc4c..13c1d2af18a 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1134,30 +1134,16 @@ static int mv_qc_defer(struct ata_queued_cmd *qc)
1134 if (ap->nr_active_links == 0) 1134 if (ap->nr_active_links == 0)
1135 return 0; 1135 return 0;
1136 1136
1137 if (pp->pp_flags & MV_PP_FLAG_EDMA_EN) { 1137 /*
1138 /* 1138 * The port is operating in host queuing mode (EDMA) with NCQ
1139 * The port is operating in host queuing mode (EDMA). 1139 * enabled, allow multiple NCQ commands. EDMA also allows
1140 * It can accomodate a new qc if the qc protocol 1140 * queueing multiple DMA commands but libata core currently
1141 * is compatible with the current host queue mode. 1141 * doesn't allow it.
1142 */ 1142 */
1143 if (pp->pp_flags & MV_PP_FLAG_NCQ_EN) { 1143 if ((pp->pp_flags & MV_PP_FLAG_EDMA_EN) &&
1144 /* 1144 (pp->pp_flags & MV_PP_FLAG_NCQ_EN) && ata_is_ncq(qc->tf.protocol))
1145 * The host queue (EDMA) is in NCQ mode. 1145 return 0;
1146 * If the new qc is also an NCQ command, 1146
1147 * then allow the new qc.
1148 */
1149 if (qc->tf.protocol == ATA_PROT_NCQ)
1150 return 0;
1151 } else {
1152 /*
1153 * The host queue (EDMA) is in non-NCQ, DMA mode.
1154 * If the new qc is also a non-NCQ, DMA command,
1155 * then allow the new qc.
1156 */
1157 if (qc->tf.protocol == ATA_PROT_DMA)
1158 return 0;
1159 }
1160 }
1161 return ATA_DEFER_PORT; 1147 return ATA_DEFER_PORT;
1162} 1148}
1163 1149
@@ -3036,7 +3022,8 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
3036 break; 3022 break;
3037 case chip_soc: 3023 case chip_soc:
3038 hpriv->ops = &mv_soc_ops; 3024 hpriv->ops = &mv_soc_ops;
3039 hp_flags |= MV_HP_FLAG_SOC | MV_HP_ERRATA_60X1C0; 3025 hp_flags |= MV_HP_FLAG_SOC | MV_HP_GEN_IIE |
3026 MV_HP_ERRATA_60X1C0;
3040 break; 3027 break;
3041 3028
3042 default: 3029 default: