summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.c
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2017-01-15 18:50:57 -0500
committerMartin K. Petersen <martin.petersen@oracle.com>2017-01-31 21:37:19 -0500
commit090284610632bb32a5d2eea41420ee7c2b6975ca (patch)
tree81e0cafcb3081f115791084be219d61e626ff33c /drivers/scsi/NCR5380.c
parent13c599069130e5a1f04a9409d65566e149b12708 (diff)
scsi: ncr5380: Shorten host info string by removing unused option macros
The DIFFERENTIAL and PARITY option macros are unused: no supported hardware uses differential signalling and the core driver never implemented parity checking. These options just waste space in the host info string. While we are here, fix a typo in the NCR5380_info() kernel-doc comment. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR5380.c')
-rw-r--r--drivers/scsi/NCR5380.c49
1 files changed, 9 insertions, 40 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 4f5ca794bb71..f29b407d91d1 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -96,17 +96,6 @@
96 * of chips. To use it, you write an architecture specific functions 96 * of chips. To use it, you write an architecture specific functions
97 * and macros and include this file in your driver. 97 * and macros and include this file in your driver.
98 * 98 *
99 * These macros control options :
100 * AUTOSENSE - if defined, REQUEST SENSE will be performed automatically
101 * for commands that return with a CHECK CONDITION status.
102 *
103 * DIFFERENTIAL - if defined, NCR53c81 chips will use external differential
104 * transceivers.
105 *
106 * PSEUDO_DMA - if defined, PSEUDO DMA is used during the data transfer phases.
107 *
108 * REAL_DMA - if defined, REAL DMA is used during the data transfer phases.
109 *
110 * These macros MUST be defined : 99 * These macros MUST be defined :
111 * 100 *
112 * NCR5380_read(register) - read from the specified register 101 * NCR5380_read(register) - read from the specified register
@@ -347,7 +336,7 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
347#endif 336#endif
348 337
349/** 338/**
350 * NCR58380_info - report driver and host information 339 * NCR5380_info - report driver and host information
351 * @instance: relevant scsi host instance 340 * @instance: relevant scsi host instance
352 * 341 *
353 * For use as the host template info() handler. 342 * For use as the host template info() handler.
@@ -360,33 +349,6 @@ static const char *NCR5380_info(struct Scsi_Host *instance)
360 return hostdata->info; 349 return hostdata->info;
361} 350}
362 351
363static void prepare_info(struct Scsi_Host *instance)
364{
365 struct NCR5380_hostdata *hostdata = shost_priv(instance);
366
367 snprintf(hostdata->info, sizeof(hostdata->info),
368 "%s, irq %d, "
369 "io_port 0x%lx, base 0x%lx, "
370 "can_queue %d, cmd_per_lun %d, "
371 "sg_tablesize %d, this_id %d, "
372 "flags { %s%s%s}, "
373 "options { %s} ",
374 instance->hostt->name, instance->irq,
375 hostdata->io_port, hostdata->base,
376 instance->can_queue, instance->cmd_per_lun,
377 instance->sg_tablesize, instance->this_id,
378 hostdata->flags & FLAG_DMA_FIXUP ? "DMA_FIXUP " : "",
379 hostdata->flags & FLAG_NO_PSEUDO_DMA ? "NO_PSEUDO_DMA " : "",
380 hostdata->flags & FLAG_TOSHIBA_DELAY ? "TOSHIBA_DELAY " : "",
381#ifdef DIFFERENTIAL
382 "DIFFERENTIAL "
383#endif
384#ifdef PARITY
385 "PARITY "
386#endif
387 "");
388}
389
390/** 352/**
391 * NCR5380_init - initialise an NCR5380 353 * NCR5380_init - initialise an NCR5380
392 * @instance: adapter to configure 354 * @instance: adapter to configure
@@ -436,7 +398,14 @@ static int NCR5380_init(struct Scsi_Host *instance, int flags)
436 if (!hostdata->work_q) 398 if (!hostdata->work_q)
437 return -ENOMEM; 399 return -ENOMEM;
438 400
439 prepare_info(instance); 401 snprintf(hostdata->info, sizeof(hostdata->info),
402 "%s, irq %d, io_port 0x%lx, base 0x%lx, can_queue %d, cmd_per_lun %d, sg_tablesize %d, this_id %d, flags { %s%s%s}",
403 instance->hostt->name, instance->irq, hostdata->io_port,
404 hostdata->base, instance->can_queue, instance->cmd_per_lun,
405 instance->sg_tablesize, instance->this_id,
406 hostdata->flags & FLAG_DMA_FIXUP ? "DMA_FIXUP " : "",
407 hostdata->flags & FLAG_NO_PSEUDO_DMA ? "NO_PSEUDO_DMA " : "",
408 hostdata->flags & FLAG_TOSHIBA_DELAY ? "TOSHIBA_DELAY " : "");
440 409
441 NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE); 410 NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE);
442 NCR5380_write(MODE_REG, MR_BASE); 411 NCR5380_write(MODE_REG, MR_BASE);