Commit d65e634a authored by Finn Thain's avatar Finn Thain Committed by Christoph Hellwig

scsi/NCR5380: adopt dprintk()

All NCR5380 drivers already include the NCR5380.h header. Better to
adopt those macros rather than have three variations on them.

Moreover, the macros in NCR5380.h are preferable because the atari_NCR5380
and sun3_NCR5380 versions are inflexible. For example, they can't accomodate
dprintk(NDEBUG_MAIN | NDEBUG_QUEUES, ...)

Replace the *_PRINTK macros from atari_NCR5380.h and sun3_NCR5380.h with
the equivalent macros from NCR5380.h.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Acked-by: default avatarSam Creasey <sammy@sammy.net>
Acked-by: default avatarMichael Schmitz <schmitz@debian.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 8ad3a593
This diff is collapsed.
...@@ -314,7 +314,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) ...@@ -314,7 +314,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy)
dma_stat = tt_scsi_dma.dma_ctrl; dma_stat = tt_scsi_dma.dma_ctrl;
INT_PRINTK("scsi%d: NCR5380 interrupt, DMA status = %02x\n", dprintk(NDEBUG_INTR, "scsi%d: NCR5380 interrupt, DMA status = %02x\n",
atari_scsi_host->host_no, dma_stat & 0xff); atari_scsi_host->host_no, dma_stat & 0xff);
/* Look if it was the DMA that has interrupted: First possibility /* Look if it was the DMA that has interrupted: First possibility
...@@ -340,7 +340,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) ...@@ -340,7 +340,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy)
if ((dma_stat & 0x02) && !(dma_stat & 0x40)) { if ((dma_stat & 0x02) && !(dma_stat & 0x40)) {
atari_dma_residual = HOSTDATA_DMALEN - (SCSI_DMA_READ_P(dma_addr) - atari_dma_startaddr); atari_dma_residual = HOSTDATA_DMALEN - (SCSI_DMA_READ_P(dma_addr) - atari_dma_startaddr);
DMA_PRINTK("SCSI DMA: There are %ld residual bytes.\n", dprintk(NDEBUG_DMA, "SCSI DMA: There are %ld residual bytes.\n",
atari_dma_residual); atari_dma_residual);
if ((signed int)atari_dma_residual < 0) if ((signed int)atari_dma_residual < 0)
...@@ -371,7 +371,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) ...@@ -371,7 +371,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy)
* other command. These shouldn't disconnect anyway. * other command. These shouldn't disconnect anyway.
*/ */
if (atari_dma_residual & 0x1ff) { if (atari_dma_residual & 0x1ff) {
DMA_PRINTK("SCSI DMA: DMA bug corrected, " dprintk(NDEBUG_DMA, "SCSI DMA: DMA bug corrected, "
"difference %ld bytes\n", "difference %ld bytes\n",
512 - (atari_dma_residual & 0x1ff)); 512 - (atari_dma_residual & 0x1ff));
atari_dma_residual = (atari_dma_residual + 511) & ~0x1ff; atari_dma_residual = (atari_dma_residual + 511) & ~0x1ff;
...@@ -438,7 +438,7 @@ static irqreturn_t scsi_falcon_intr(int irq, void *dummy) ...@@ -438,7 +438,7 @@ static irqreturn_t scsi_falcon_intr(int irq, void *dummy)
"ST-DMA fifo\n", transferred & 15); "ST-DMA fifo\n", transferred & 15);
atari_dma_residual = HOSTDATA_DMALEN - transferred; atari_dma_residual = HOSTDATA_DMALEN - transferred;
DMA_PRINTK("SCSI DMA: There are %ld residual bytes.\n", dprintk(NDEBUG_DMA, "SCSI DMA: There are %ld residual bytes.\n",
atari_dma_residual); atari_dma_residual);
} else } else
atari_dma_residual = 0; atari_dma_residual = 0;
...@@ -474,11 +474,11 @@ static void atari_scsi_fetch_restbytes(void) ...@@ -474,11 +474,11 @@ static void atari_scsi_fetch_restbytes(void)
/* there are 'nr' bytes left for the last long address /* there are 'nr' bytes left for the last long address
before the DMA pointer */ before the DMA pointer */
phys_dst ^= nr; phys_dst ^= nr;
DMA_PRINTK("SCSI DMA: there are %d rest bytes for phys addr 0x%08lx", dprintk(NDEBUG_DMA, "SCSI DMA: there are %d rest bytes for phys addr 0x%08lx",
nr, phys_dst); nr, phys_dst);
/* The content of the DMA pointer is a physical address! */ /* The content of the DMA pointer is a physical address! */
dst = phys_to_virt(phys_dst); dst = phys_to_virt(phys_dst);
DMA_PRINTK(" = virt addr %p\n", dst); dprintk(NDEBUG_DMA, " = virt addr %p\n", dst);
for (src = (char *)&tt_scsi_dma.dma_restdata; nr != 0; --nr) for (src = (char *)&tt_scsi_dma.dma_restdata; nr != 0; --nr)
*dst++ = *src++; *dst++ = *src++;
} }
...@@ -883,7 +883,7 @@ static unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance, ...@@ -883,7 +883,7 @@ static unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance,
{ {
unsigned long addr = virt_to_phys(data); unsigned long addr = virt_to_phys(data);
DMA_PRINTK("scsi%d: setting up dma, data = %p, phys = %lx, count = %ld, " dprintk(NDEBUG_DMA, "scsi%d: setting up dma, data = %p, phys = %lx, count = %ld, "
"dir = %d\n", instance->host_no, data, addr, count, dir); "dir = %d\n", instance->host_no, data, addr, count, dir);
if (!IS_A_TT() && !STRAM_ADDR(addr)) { if (!IS_A_TT() && !STRAM_ADDR(addr)) {
...@@ -1063,7 +1063,7 @@ static unsigned long atari_dma_xfer_len(unsigned long wanted_len, ...@@ -1063,7 +1063,7 @@ static unsigned long atari_dma_xfer_len(unsigned long wanted_len,
possible_len = limit; possible_len = limit;
if (possible_len != wanted_len) if (possible_len != wanted_len)
DMA_PRINTK("Sorry, must cut DMA transfer size to %ld bytes " dprintk(NDEBUG_DMA, "Sorry, must cut DMA transfer size to %ld bytes "
"instead of %ld\n", possible_len, wanted_len); "instead of %ld\n", possible_len, wanted_len);
return possible_len; return possible_len;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment