diff options
Diffstat (limited to 'drivers/scsi/atari_scsi.c')
-rw-r--r-- | drivers/scsi/atari_scsi.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c index a8d721ff19eb..b522134528d6 100644 --- a/drivers/scsi/atari_scsi.c +++ b/drivers/scsi/atari_scsi.c | |||
@@ -67,12 +67,6 @@ | |||
67 | 67 | ||
68 | #include <linux/module.h> | 68 | #include <linux/module.h> |
69 | 69 | ||
70 | #define NDEBUG (0) | ||
71 | |||
72 | #define NDEBUG_ABORT 0x00100000 | ||
73 | #define NDEBUG_TAGS 0x00200000 | ||
74 | #define NDEBUG_MERGING 0x00400000 | ||
75 | |||
76 | #define AUTOSENSE | 70 | #define AUTOSENSE |
77 | /* For the Atari version, use only polled IO or REAL_DMA */ | 71 | /* For the Atari version, use only polled IO or REAL_DMA */ |
78 | #define REAL_DMA | 72 | #define REAL_DMA |
@@ -314,7 +308,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) | |||
314 | 308 | ||
315 | dma_stat = tt_scsi_dma.dma_ctrl; | 309 | dma_stat = tt_scsi_dma.dma_ctrl; |
316 | 310 | ||
317 | INT_PRINTK("scsi%d: NCR5380 interrupt, DMA status = %02x\n", | 311 | dprintk(NDEBUG_INTR, "scsi%d: NCR5380 interrupt, DMA status = %02x\n", |
318 | atari_scsi_host->host_no, dma_stat & 0xff); | 312 | atari_scsi_host->host_no, dma_stat & 0xff); |
319 | 313 | ||
320 | /* Look if it was the DMA that has interrupted: First possibility | 314 | /* Look if it was the DMA that has interrupted: First possibility |
@@ -340,7 +334,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) | |||
340 | if ((dma_stat & 0x02) && !(dma_stat & 0x40)) { | 334 | if ((dma_stat & 0x02) && !(dma_stat & 0x40)) { |
341 | atari_dma_residual = HOSTDATA_DMALEN - (SCSI_DMA_READ_P(dma_addr) - atari_dma_startaddr); | 335 | atari_dma_residual = HOSTDATA_DMALEN - (SCSI_DMA_READ_P(dma_addr) - atari_dma_startaddr); |
342 | 336 | ||
343 | DMA_PRINTK("SCSI DMA: There are %ld residual bytes.\n", | 337 | dprintk(NDEBUG_DMA, "SCSI DMA: There are %ld residual bytes.\n", |
344 | atari_dma_residual); | 338 | atari_dma_residual); |
345 | 339 | ||
346 | if ((signed int)atari_dma_residual < 0) | 340 | if ((signed int)atari_dma_residual < 0) |
@@ -371,7 +365,7 @@ static irqreturn_t scsi_tt_intr(int irq, void *dummy) | |||
371 | * other command. These shouldn't disconnect anyway. | 365 | * other command. These shouldn't disconnect anyway. |
372 | */ | 366 | */ |
373 | if (atari_dma_residual & 0x1ff) { | 367 | if (atari_dma_residual & 0x1ff) { |
374 | DMA_PRINTK("SCSI DMA: DMA bug corrected, " | 368 | dprintk(NDEBUG_DMA, "SCSI DMA: DMA bug corrected, " |
375 | "difference %ld bytes\n", | 369 | "difference %ld bytes\n", |
376 | 512 - (atari_dma_residual & 0x1ff)); | 370 | 512 - (atari_dma_residual & 0x1ff)); |
377 | atari_dma_residual = (atari_dma_residual + 511) & ~0x1ff; | 371 | atari_dma_residual = (atari_dma_residual + 511) & ~0x1ff; |
@@ -438,7 +432,7 @@ static irqreturn_t scsi_falcon_intr(int irq, void *dummy) | |||
438 | "ST-DMA fifo\n", transferred & 15); | 432 | "ST-DMA fifo\n", transferred & 15); |
439 | 433 | ||
440 | atari_dma_residual = HOSTDATA_DMALEN - transferred; | 434 | atari_dma_residual = HOSTDATA_DMALEN - transferred; |
441 | DMA_PRINTK("SCSI DMA: There are %ld residual bytes.\n", | 435 | dprintk(NDEBUG_DMA, "SCSI DMA: There are %ld residual bytes.\n", |
442 | atari_dma_residual); | 436 | atari_dma_residual); |
443 | } else | 437 | } else |
444 | atari_dma_residual = 0; | 438 | atari_dma_residual = 0; |
@@ -474,11 +468,11 @@ static void atari_scsi_fetch_restbytes(void) | |||
474 | /* there are 'nr' bytes left for the last long address | 468 | /* there are 'nr' bytes left for the last long address |
475 | before the DMA pointer */ | 469 | before the DMA pointer */ |
476 | phys_dst ^= nr; | 470 | phys_dst ^= nr; |
477 | DMA_PRINTK("SCSI DMA: there are %d rest bytes for phys addr 0x%08lx", | 471 | dprintk(NDEBUG_DMA, "SCSI DMA: there are %d rest bytes for phys addr 0x%08lx", |
478 | nr, phys_dst); | 472 | nr, phys_dst); |
479 | /* The content of the DMA pointer is a physical address! */ | 473 | /* The content of the DMA pointer is a physical address! */ |
480 | dst = phys_to_virt(phys_dst); | 474 | dst = phys_to_virt(phys_dst); |
481 | DMA_PRINTK(" = virt addr %p\n", dst); | 475 | dprintk(NDEBUG_DMA, " = virt addr %p\n", dst); |
482 | for (src = (char *)&tt_scsi_dma.dma_restdata; nr != 0; --nr) | 476 | for (src = (char *)&tt_scsi_dma.dma_restdata; nr != 0; --nr) |
483 | *dst++ = *src++; | 477 | *dst++ = *src++; |
484 | } | 478 | } |
@@ -827,7 +821,7 @@ static int atari_scsi_bus_reset(Scsi_Cmnd *cmd) | |||
827 | } else { | 821 | } else { |
828 | atari_turnon_irq(IRQ_MFP_FSCSI); | 822 | atari_turnon_irq(IRQ_MFP_FSCSI); |
829 | } | 823 | } |
830 | if ((rv & SCSI_RESET_ACTION) == SCSI_RESET_SUCCESS) | 824 | if (rv == SUCCESS) |
831 | falcon_release_lock_if_possible(hostdata); | 825 | falcon_release_lock_if_possible(hostdata); |
832 | 826 | ||
833 | return rv; | 827 | return rv; |
@@ -883,7 +877,7 @@ static unsigned long atari_scsi_dma_setup(struct Scsi_Host *instance, | |||
883 | { | 877 | { |
884 | unsigned long addr = virt_to_phys(data); | 878 | unsigned long addr = virt_to_phys(data); |
885 | 879 | ||
886 | DMA_PRINTK("scsi%d: setting up dma, data = %p, phys = %lx, count = %ld, " | 880 | dprintk(NDEBUG_DMA, "scsi%d: setting up dma, data = %p, phys = %lx, count = %ld, " |
887 | "dir = %d\n", instance->host_no, data, addr, count, dir); | 881 | "dir = %d\n", instance->host_no, data, addr, count, dir); |
888 | 882 | ||
889 | if (!IS_A_TT() && !STRAM_ADDR(addr)) { | 883 | if (!IS_A_TT() && !STRAM_ADDR(addr)) { |
@@ -1063,7 +1057,7 @@ static unsigned long atari_dma_xfer_len(unsigned long wanted_len, | |||
1063 | possible_len = limit; | 1057 | possible_len = limit; |
1064 | 1058 | ||
1065 | if (possible_len != wanted_len) | 1059 | if (possible_len != wanted_len) |
1066 | DMA_PRINTK("Sorry, must cut DMA transfer size to %ld bytes " | 1060 | dprintk(NDEBUG_DMA, "Sorry, must cut DMA transfer size to %ld bytes " |
1067 | "instead of %ld\n", possible_len, wanted_len); | 1061 | "instead of %ld\n", possible_len, wanted_len); |
1068 | 1062 | ||
1069 | return possible_len; | 1063 | return possible_len; |