diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2011-06-13 14:39:22 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-06-29 16:15:05 -0400 |
commit | 4d08e731bd6e3c5fd0b65bcfba22dc159fec3487 (patch) | |
tree | ea67e16b057d033c7d68cc84a3442244db9b3c9c /drivers/scsi/sun3_NCR5380.c | |
parent | 2ba51ea28ba54ea8808ba7dfd694f1dd37e8b7c7 (diff) |
[SCSI] sun3: Remove commented out merge_contiguous_buffers
This fixes:
drivers/scsi/sun3_NCR5380.c:475: warning: ‘merge_contiguous_buffers’ defined but not used
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sam Creasey <sammy@sammy.net>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/sun3_NCR5380.c')
-rw-r--r-- | drivers/scsi/sun3_NCR5380.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c index f3cffdf5a011..7e12a2e4e0a3 100644 --- a/drivers/scsi/sun3_NCR5380.c +++ b/drivers/scsi/sun3_NCR5380.c | |||
@@ -49,13 +49,6 @@ | |||
49 | * inside the execution of NCR5380_intr(), leading to recursive | 49 | * inside the execution of NCR5380_intr(), leading to recursive |
50 | * calls. | 50 | * calls. |
51 | * | 51 | * |
52 | * - I've added a function merge_contiguous_buffers() that tries to | ||
53 | * merge scatter-gather buffers that are located at contiguous | ||
54 | * physical addresses and can be processed with the same DMA setup. | ||
55 | * Since most scatter-gather operations work on a page (4K) of | ||
56 | * 4 buffers (1K), in more than 90% of all cases three interrupts and | ||
57 | * DMA setup actions are saved. | ||
58 | * | ||
59 | * - I've deleted all the stuff for AUTOPROBE_IRQ, REAL_DMA_POLL, PSEUDO_DMA | 52 | * - I've deleted all the stuff for AUTOPROBE_IRQ, REAL_DMA_POLL, PSEUDO_DMA |
60 | * and USLEEP, because these were messing up readability and will never be | 53 | * and USLEEP, because these were messing up readability and will never be |
61 | * needed for Atari SCSI. | 54 | * needed for Atari SCSI. |
@@ -460,47 +453,6 @@ static void free_all_tags( void ) | |||
460 | 453 | ||
461 | 454 | ||
462 | /* | 455 | /* |
463 | * Function: void merge_contiguous_buffers(struct scsi_cmnd *cmd) | ||
464 | * | ||
465 | * Purpose: Try to merge several scatter-gather requests into one DMA | ||
466 | * transfer. This is possible if the scatter buffers lie on | ||
467 | * physical contiguous addresses. | ||
468 | * | ||
469 | * Parameters: struct scsi_cmnd *cmd | ||
470 | * The command to work on. The first scatter buffer's data are | ||
471 | * assumed to be already transferred into ptr/this_residual. | ||
472 | */ | ||
473 | |||
474 | static void merge_contiguous_buffers(struct scsi_cmnd *cmd) | ||
475 | { | ||
476 | unsigned long endaddr; | ||
477 | #if (NDEBUG & NDEBUG_MERGING) | ||
478 | unsigned long oldlen = cmd->SCp.this_residual; | ||
479 | int cnt = 1; | ||
480 | #endif | ||
481 | |||
482 | for (endaddr = virt_to_phys(cmd->SCp.ptr + cmd->SCp.this_residual - 1) + 1; | ||
483 | cmd->SCp.buffers_residual && | ||
484 | virt_to_phys(SGADDR(&(cmd->SCp.buffer[1]))) == endaddr; ) { | ||
485 | |||
486 | MER_PRINTK("VTOP(%p) == %08lx -> merging\n", | ||
487 | SGADDR(&(cmd->SCp.buffer[1])), endaddr); | ||
488 | #if (NDEBUG & NDEBUG_MERGING) | ||
489 | ++cnt; | ||
490 | #endif | ||
491 | ++cmd->SCp.buffer; | ||
492 | --cmd->SCp.buffers_residual; | ||
493 | cmd->SCp.this_residual += cmd->SCp.buffer->length; | ||
494 | endaddr += cmd->SCp.buffer->length; | ||
495 | } | ||
496 | #if (NDEBUG & NDEBUG_MERGING) | ||
497 | if (oldlen != cmd->SCp.this_residual) | ||
498 | MER_PRINTK("merged %d buffers from %p, new length %08x\n", | ||
499 | cnt, cmd->SCp.ptr, cmd->SCp.this_residual); | ||
500 | #endif | ||
501 | } | ||
502 | |||
503 | /* | ||
504 | * Function : void initialize_SCp(struct scsi_cmnd *cmd) | 456 | * Function : void initialize_SCp(struct scsi_cmnd *cmd) |
505 | * | 457 | * |
506 | * Purpose : initialize the saved data pointers for cmd to point to the | 458 | * Purpose : initialize the saved data pointers for cmd to point to the |
@@ -521,11 +473,6 @@ static __inline__ void initialize_SCp(struct scsi_cmnd *cmd) | |||
521 | cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1; | 473 | cmd->SCp.buffers_residual = scsi_sg_count(cmd) - 1; |
522 | cmd->SCp.ptr = (char *) SGADDR(cmd->SCp.buffer); | 474 | cmd->SCp.ptr = (char *) SGADDR(cmd->SCp.buffer); |
523 | cmd->SCp.this_residual = cmd->SCp.buffer->length; | 475 | cmd->SCp.this_residual = cmd->SCp.buffer->length; |
524 | |||
525 | /* ++roman: Try to merge some scatter-buffers if they are at | ||
526 | * contiguous physical addresses. | ||
527 | */ | ||
528 | // merge_contiguous_buffers( cmd ); | ||
529 | } else { | 476 | } else { |
530 | cmd->SCp.buffer = NULL; | 477 | cmd->SCp.buffer = NULL; |
531 | cmd->SCp.buffers_residual = 0; | 478 | cmd->SCp.buffers_residual = 0; |
@@ -2076,11 +2023,6 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance) | |||
2076 | --cmd->SCp.buffers_residual; | 2023 | --cmd->SCp.buffers_residual; |
2077 | cmd->SCp.this_residual = cmd->SCp.buffer->length; | 2024 | cmd->SCp.this_residual = cmd->SCp.buffer->length; |
2078 | cmd->SCp.ptr = SGADDR(cmd->SCp.buffer); | 2025 | cmd->SCp.ptr = SGADDR(cmd->SCp.buffer); |
2079 | |||
2080 | /* ++roman: Try to merge some scatter-buffers if | ||
2081 | * they are at contiguous physical addresses. | ||
2082 | */ | ||
2083 | // merge_contiguous_buffers( cmd ); | ||
2084 | INF_PRINTK("scsi%d: %d bytes and %d buffers left\n", | 2026 | INF_PRINTK("scsi%d: %d bytes and %d buffers left\n", |
2085 | HOSTNO, cmd->SCp.this_residual, | 2027 | HOSTNO, cmd->SCp.this_residual, |
2086 | cmd->SCp.buffers_residual); | 2028 | cmd->SCp.buffers_residual); |