BUG_ON(NULL == ap); port_mmio = mv_ap_base(ap);
static void mv_err_intr(struct ata_port *ap){	void __iomem *port_mmio;	u32 edma_err_cause, serr = 0;	/* bug here b/c we got an err int on a port we don't know about,	 * so there's no way to clear it	 */	BUG_ON(NULL == ap);	port_mmio = mv_ap_base(ap);	edma_err_cause = readl(port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);	if (EDMA_ERR_SERR & edma_err_cause) {		serr = scr_read(ap, SCR_ERROR);		scr_write_flush(ap, SCR_ERROR, serr);	}	DPRINTK("port %u error; EDMA err cause: 0x%08x SERR: 0x%08x\n", 		ap->port_no, edma_err_cause, serr);	/* Clear EDMA now that SERR cleanup done */	writelfl(0, port_mmio + EDMA_ERR_IRQ_CAUSE_OFS);	/* check for fatal here and recover if needed */	if (EDMA_ERR_FATAL & edma_err_cause) {		mv_phy_reset(ap);	}}