Commit 51d628f1 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Damien Le Moal
Browse files

ata: pdc_adma: Drop pointless VPRINTK() calls and remove disabled NCQ debugging



Drop pointless VPRINTK() calls for entering routines and setting up sg
tables. And while we're at it, remove the disabled debugging messages.

Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
parent 93c77114
Loading
Loading
Loading
Loading
+2 −29
Original line number Original line Diff line number Diff line
@@ -284,9 +284,6 @@ static int adma_fill_sg(struct ata_queued_cmd *qc)
		*(__le32 *)(buf + i) =
		*(__le32 *)(buf + i) =
			(pFLAGS & pEND) ? 0 : cpu_to_le32(pp->pkt_dma + i + 4);
			(pFLAGS & pEND) ? 0 : cpu_to_le32(pp->pkt_dma + i + 4);
		i += 4;
		i += 4;

		VPRINTK("PRD[%u] = (0x%lX, 0x%X)\n", i/4,
					(unsigned long)addr, len);
	}
	}


	if (likely(last_buf))
	if (likely(last_buf))
@@ -302,8 +299,6 @@ static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc)
	u32 pkt_dma = (u32)pp->pkt_dma;
	u32 pkt_dma = (u32)pp->pkt_dma;
	int i = 0;
	int i = 0;


	VPRINTK("ENTER\n");

	adma_enter_reg_mode(qc->ap);
	adma_enter_reg_mode(qc->ap);
	if (qc->tf.protocol != ATA_PROT_DMA)
	if (qc->tf.protocol != ATA_PROT_DMA)
		return AC_ERR_OK;
		return AC_ERR_OK;
@@ -355,22 +350,6 @@ static enum ata_completion_errors adma_qc_prep(struct ata_queued_cmd *qc)


	i = adma_fill_sg(qc);
	i = adma_fill_sg(qc);
	wmb();	/* flush PRDs and pkt to memory */
	wmb();	/* flush PRDs and pkt to memory */
#if 0
	/* dump out CPB + PRDs for debug */
	{
		int j, len = 0;
		static char obuf[2048];
		for (j = 0; j < i; ++j) {
			len += sprintf(obuf+len, "%02x ", buf[j]);
			if ((j & 7) == 7) {
				printk("%s\n", obuf);
				len = 0;
			}
		}
		if (len)
			printk("%s\n", obuf);
	}
#endif
	return AC_ERR_OK;
	return AC_ERR_OK;
}
}


@@ -379,8 +358,6 @@ static inline void adma_packet_start(struct ata_queued_cmd *qc)
	struct ata_port *ap = qc->ap;
	struct ata_port *ap = qc->ap;
	void __iomem *chan = ADMA_PORT_REGS(ap);
	void __iomem *chan = ADMA_PORT_REGS(ap);


	VPRINTK("ENTER, ap %p\n", ap);

	/* fire up the ADMA engine */
	/* fire up the ADMA engine */
	writew(aPIOMD4 | aGO, chan + ADMA_CONTROL);
	writew(aPIOMD4 | aGO, chan + ADMA_CONTROL);
}
}
@@ -502,14 +479,10 @@ static irqreturn_t adma_intr(int irq, void *dev_instance)
	struct ata_host *host = dev_instance;
	struct ata_host *host = dev_instance;
	unsigned int handled = 0;
	unsigned int handled = 0;


	VPRINTK("ENTER\n");

	spin_lock(&host->lock);
	spin_lock(&host->lock);
	handled  = adma_intr_pkt(host) | adma_intr_mmio(host);
	handled  = adma_intr_pkt(host) | adma_intr_mmio(host);
	spin_unlock(&host->lock);
	spin_unlock(&host->lock);


	VPRINTK("EXIT\n");

	return IRQ_RETVAL(handled);
	return IRQ_RETVAL(handled);
}
}


@@ -545,7 +518,7 @@ static int adma_port_start(struct ata_port *ap)
		return -ENOMEM;
		return -ENOMEM;
	/* paranoia? */
	/* paranoia? */
	if ((pp->pkt_dma & 7) != 0) {
	if ((pp->pkt_dma & 7) != 0) {
		printk(KERN_ERR "bad alignment for pp->pkt_dma: %08x\n",
		ata_port_err(ap, "bad alignment for pp->pkt_dma: %08x\n",
			     (u32)pp->pkt_dma);
			     (u32)pp->pkt_dma);
		return -ENOMEM;
		return -ENOMEM;
	}
	}