2029 while (in_index != pp->resp_idx) {
2030 unsigned int tag;
2031 struct mv_crpb *response = &pp->crpb[pp->resp_idx];
2032
2033 pp->resp_idx = (pp->resp_idx + 1) & MV_MAX_Q_DEPTH_MASK;
2034
2035 if (IS_GEN_I(hpriv)) {
2036
2037 tag = ap->link.active_tag;
2038 } else {
2039
2040 tag = le16_to_cpu(response->id) & 0x1f;
2041 }
2042 mv_process_crpb_response(ap, response, tag, ncq_enabled);
2043 work_done = true;
2044 }
2045
2046
2047 if (work_done)
2048 writelfl((pp->crpb_dma & EDMA_RSP_Q_BASE_LO_MASK) |
2049 (pp->resp_idx << EDMA_RSP_Q_PTR_SHIFT),
2050 port_mmio + EDMA_RSP_Q_OUT_PTR_OFS);
2051}
2052
2053static void mv_port_intr(struct ata_port *ap, u32 port_cause)
2054{
2055 struct mv_port_priv *pp;
2056 int edma_was_enabled;
2057
2058 if (!ap || (ap->flags & ATA_FLAG_DISABLED)) {
2059 mv_unexpected_intr(ap, 0);
2060 return;
2061 }
2062
2063
2064
2065
2066
2067 pp = ap->private_data;
2068 edma_was_enabled = (pp->pp_flags & MV_PP_FLAG_EDMA_EN);
2069