diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/sata_mv.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index ad169ffbc4cb..80c655f85bc8 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 | ||