[SCSI] Rename scsi_print_msg to spi_print_msg

Rename scsi_print_msg to spi_print_msg and move its prototype from
scsi_dbg.h to scsi_transport_spi.h

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Matthew Wilcox 2005-12-15 16:22:01 -05:00 committed by James Bottomley
parent 410ca5c7c6
commit 1abfd37013
11 changed files with 34 additions and 28 deletions

View File

@ -857,7 +857,7 @@ process_extended_message(struct Scsi_Host *host,
printk(KERN_INFO "scsi%d (%d:%d): Unexpected message %s: ",
host->host_no, pun, lun,
NCR_700_phase[(dsps & 0xf00) >> 8]);
scsi_print_msg(hostdata->msgin);
spi_print_msg(hostdata->msgin);
printk("\n");
/* just reject it */
hostdata->msgout[0] = A_REJECT_MSG;
@ -887,7 +887,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
#ifdef NCR_700_DEBUG
printk("scsi%d (%d:%d): message %s: ", host->host_no, pun, lun,
NCR_700_phase[(dsps & 0xf00) >> 8]);
scsi_print_msg(hostdata->msgin);
spi_print_msg(hostdata->msgin);
printk("\n");
#endif
@ -939,7 +939,7 @@ process_message(struct Scsi_Host *host, struct NCR_700_Host_Parameters *hostdata
host->host_no, pun, lun,
NCR_700_phase[(dsps & 0xf00) >> 8]);
scsi_print_msg(hostdata->msgin);
spi_print_msg(hostdata->msgin);
printk("\n");
/* just reject it */
hostdata->msgout[0] = A_REJECT_MSG;

View File

@ -282,6 +282,7 @@
#include "scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_spi.h>
#include "53c7xx.h"
#include <linux/stat.h>
#include <linux/stddef.h>
@ -1724,7 +1725,7 @@ NCR53c7xx_run_tests (struct Scsi_Host *host) {
printk ("scsi%d : status ", host->host_no);
scsi_print_status (status);
printk ("\nscsi%d : message ", host->host_no);
scsi_print_msg (&msg);
spi_print_msg(&msg);
printk ("\n");
} else if (hostdata->test_completed == 3) {
printk("scsi%d : test 2 no connection with target %d\n",
@ -2313,7 +2314,7 @@ NCR53c7x0_dstat_sir_intr (struct Scsi_Host *host, struct
printk ("scsi%d : received message", host->host_no);
if (c)
printk (" from target %d lun %d ", c->device->id, c->device->lun);
scsi_print_msg ((unsigned char *) hostdata->msg_buf);
spi_print_msg((unsigned char *) hostdata->msg_buf);
printk("\n");
}
@ -5540,7 +5541,7 @@ print_dsa (struct Scsi_Host *host, u32 *dsa, const char *prefix) {
i > 0 && !check_address ((unsigned long) ptr, 1);
ptr += len, i -= len) {
printk(" ");
len = scsi_print_msg (ptr);
len = spi_print_msg(ptr);
printk("\n");
if (!len)
break;

View File

@ -87,6 +87,7 @@
* the high level code.
*/
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_transport_spi.h>
#ifndef NDEBUG
#define NDEBUG 0
@ -2377,7 +2378,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
* 3..length+1 arguments
*
* Start the extended message buffer with the EXTENDED_MESSAGE
* byte, since scsi_print_msg() wants the whole thing.
* byte, since spi_print_msg() wants the whole thing.
*/
extended_msg[0] = EXTENDED_MESSAGE;
/* Accept first byte by clearing ACK */
@ -2424,7 +2425,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
default:
if (!tmp) {
printk("scsi%d: rejecting message ", instance->host_no);
scsi_print_msg(extended_msg);
spi_print_msg(extended_msg);
printk("\n");
} else if (tmp != EXTENDED_MESSAGE)
scmd_printk(KERN_INFO, cmd,
@ -2560,7 +2561,7 @@ static void NCR5380_reselect(struct Scsi_Host *instance) {
if (!(msg[0] & 0x80)) {
printk(KERN_ERR "scsi%d : expecting IDENTIFY message, got ", instance->host_no);
scsi_print_msg(msg);
spi_print_msg(msg);
abort = 1;
} else {
/* Accept message by clearing ACK */

View File

@ -259,6 +259,7 @@
#include "scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_spi.h>
#include "aha152x.h"
@ -1845,7 +1846,7 @@ static void msgi_run(struct Scsi_Host *shpnt)
#if defined(AHA152X_DEBUG)
if (HOSTDATA(shpnt)->debug & debug_msgi) {
printk(INFO_LEAD "inbound message %02x ", CMDINFO(CURRENT_SC), MSGI(0));
scsi_print_msg(&MSGI(0));
spi_print_msg(&MSGI(0));
printk("\n");
}
#endif
@ -1933,7 +1934,7 @@ static void msgi_run(struct Scsi_Host *shpnt)
break;
printk(INFO_LEAD, CMDINFO(CURRENT_SC));
scsi_print_msg(&MSGI(0));
spi_print_msg(&MSGI(0));
printk("\n");
ticks = (MSGI(3) * 4 + 49) / 50;
@ -2031,7 +2032,7 @@ static void msgo_init(struct Scsi_Host *shpnt)
int i;
printk(DEBUG_LEAD "messages( ", CMDINFO(CURRENT_SC));
for (i=0; i<MSGOLEN; i+=scsi_print_msg(&MSGO(i)), printk(" "))
for (i=0; i<MSGOLEN; i+=spi_print_msg(&MSGO(i)), printk(" "))
;
printk(")\n");
}

View File

@ -152,6 +152,7 @@
#include "../scsi.h"
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_transport_spi.h>
#include "acornscsi.h"
#include "msgqueue.h"
#include "scsi.h"
@ -1370,7 +1371,7 @@ void acornscsi_sendmessage(AS_Host *host)
host->scsi.last_message = msg->msg[0];
#if (DEBUG & DEBUG_MESSAGES)
scsi_print_msg(msg->msg);
spi_print_msg(msg->msg);
#endif
break;
@ -1392,7 +1393,7 @@ void acornscsi_sendmessage(AS_Host *host)
while ((msg = msgqueue_getmsg(&host->scsi.msgs, msgnr++)) != NULL) {
unsigned int i;
#if (DEBUG & DEBUG_MESSAGES)
scsi_print_msg(msg);
spi_print_msg(msg);
#endif
i = 0;
if (acornscsi_write_pio(host, msg->msg, &i, msg->length, 1000000))
@ -1488,7 +1489,7 @@ void acornscsi_message(AS_Host *host)
#if (DEBUG & DEBUG_MESSAGES)
printk("scsi%d.%c: message in: ",
host->host->host_no, acornscsi_target(host));
scsi_print_msg(message);
spi_print_msg(message);
printk("\n");
#endif

View File

@ -74,6 +74,7 @@
* the high level code.
*/
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_transport_spi.h>
#if (NDEBUG & NDEBUG_LISTS)
#define LIST(x,y) \
@ -2355,7 +2356,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
* 3..length+1 arguments
*
* Start the extended message buffer with the EXTENDED_MESSAGE
* byte, since scsi_print_msg() wants the whole thing.
* byte, since spi_print_msg() wants the whole thing.
*/
extended_msg[0] = EXTENDED_MESSAGE;
/* Accept first byte by clearing ACK */
@ -2408,7 +2409,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
default:
if (!tmp) {
printk(KERN_DEBUG "scsi%d: rejecting message ", HOSTNO);
scsi_print_msg (extended_msg);
spi_print_msg(extended_msg);
printk("\n");
} else if (tmp != EXTENDED_MESSAGE)
printk(KERN_DEBUG "scsi%d: rejecting unknown "
@ -2541,7 +2542,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
if (!(msg[0] & 0x80)) {
printk(KERN_DEBUG "scsi%d: expecting IDENTIFY message, got ", HOSTNO);
scsi_print_msg(msg);
spi_print_msg(msg);
do_abort(instance);
return;
}

View File

@ -1072,7 +1072,7 @@ static const char * const extended_msgs[] = {
#define NO_EXTENDED_MSGS (sizeof(two_byte_msgs) / sizeof (const char *))
int scsi_print_msg (const unsigned char *msg)
int spi_print_msg(const unsigned char *msg)
{
int len = 0, i;
if (msg[0] == EXTENDED_MESSAGE) {
@ -1125,11 +1125,11 @@ int scsi_print_msg (const unsigned char *msg)
printk("reserved");
return len;
}
EXPORT_SYMBOL(scsi_print_msg);
EXPORT_SYMBOL(spi_print_msg);
#else /* ifndef CONFIG_SCSI_CONSTANTS */
int scsi_print_msg (const unsigned char *msg)
int spi_print_msg(const unsigned char *msg)
{
int len = 0, i;
@ -1153,7 +1153,7 @@ int scsi_print_msg (const unsigned char *msg)
printk("%02x ", msg[0]);
return len;
}
EXPORT_SYMBOL(scsi_print_msg);
EXPORT_SYMBOL(spi_print_msg);
#endif /* ! CONFIG_SCSI_CONSTANTS */
#define SETUP_ATTRIBUTE(field) \

View File

@ -70,6 +70,7 @@
*
*/
#include <scsi/scsi_dbg.h>
#include <scsi/scsi_transport_spi.h>
/*
* Further development / testing that should be done :
@ -2378,7 +2379,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
* 3..length+1 arguments
*
* Start the extended message buffer with the EXTENDED_MESSAGE
* byte, since scsi_print_msg() wants the whole thing.
* byte, since spi_print_msg() wants the whole thing.
*/
extended_msg[0] = EXTENDED_MESSAGE;
/* Accept first byte by clearing ACK */
@ -2431,7 +2432,7 @@ static void NCR5380_information_transfer (struct Scsi_Host *instance)
default:
if (!tmp) {
printk(KERN_DEBUG "scsi%d: rejecting message ", HOSTNO);
scsi_print_msg (extended_msg);
spi_print_msg(extended_msg);
printk("\n");
} else if (tmp != EXTENDED_MESSAGE)
printk(KERN_DEBUG "scsi%d: rejecting unknown "
@ -2566,7 +2567,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
if (!(msg[0] & 0x80)) {
printk(KERN_DEBUG "scsi%d: expecting IDENTIFY message, got ", HOSTNO);
scsi_print_msg(msg);
spi_print_msg(msg);
do_abort(instance);
return;
}

View File

@ -75,7 +75,7 @@ static void sym_print_msg(struct sym_ccb *cp, char *label, u_char *msg)
{
sym_print_addr(cp->cmd, "%s: ", label);
scsi_print_msg(msg);
spi_print_msg(msg);
printf("\n");
}
@ -84,7 +84,7 @@ static void sym_print_nego_msg(struct sym_hcb *np, int target, char *label, u_ch
struct sym_tcb *tp = &np->target[target];
dev_info(&tp->starget->dev, "%s: ", label);
scsi_print_msg(msg);
spi_print_msg(msg);
printf("\n");
}

View File

@ -16,7 +16,6 @@ extern void __scsi_print_sense(const char *name,
extern void scsi_print_driverbyte(int);
extern void scsi_print_hostbyte(int);
extern void scsi_print_status(unsigned char);
extern int scsi_print_msg(const unsigned char *);
extern const char *scsi_sense_key_string(unsigned char);
extern const char *scsi_extd_sense_format(unsigned char, unsigned char);

View File

@ -146,5 +146,6 @@ void spi_release_transport(struct scsi_transport_template *);
void spi_schedule_dv_device(struct scsi_device *);
void spi_dv_device(struct scsi_device *);
void spi_display_xfer_agreement(struct scsi_target *);
int spi_print_msg(const unsigned char *);
#endif /* SCSI_TRANSPORT_SPI_H */