Commit 6a6ff4ac authored by Finn Thain's avatar Finn Thain Committed by Martin K. Petersen

atari_NCR5380: Remove HOSTNO macro from printk() and seq_printf() calls

Remove the HOSTNO macro that is peculiar to atari_NCR5380.c and
contributes to the problem of divergence of the NCR5380 core drivers.
Keep NCR5380.c in sync.
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 62717f53
...@@ -418,10 +418,10 @@ static void NCR5380_print_phase(struct Scsi_Host *instance) ...@@ -418,10 +418,10 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
status = NCR5380_read(STATUS_REG); status = NCR5380_read(STATUS_REG);
if (!(status & SR_REQ)) if (!(status & SR_REQ))
printk("scsi%d : REQ not asserted, phase unknown.\n", instance->host_no); shost_printk(KERN_DEBUG, instance, "REQ not asserted, phase unknown.\n");
else { else {
for (i = 0; (phases[i].value != PHASE_UNKNOWN) && (phases[i].value != (status & PHASE_MASK)); ++i); for (i = 0; (phases[i].value != PHASE_UNKNOWN) && (phases[i].value != (status & PHASE_MASK)); ++i);
printk("scsi%d : phase %s\n", instance->host_no, phases[i].name); shost_printk(KERN_DEBUG, instance, "phase %s\n", phases[i].name);
} }
} }
#endif #endif
...@@ -1247,7 +1247,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance, ...@@ -1247,7 +1247,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
NCR5380_reselect(instance); NCR5380_reselect(instance);
if (!hostdata->connected) if (!hostdata->connected)
NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
printk("scsi%d : reselection after won arbitration?\n", instance->host_no); shost_printk(KERN_ERR, instance, "reselection after won arbitration?\n");
goto out; goto out;
} }
...@@ -1852,7 +1852,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { ...@@ -1852,7 +1852,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
switch (phase) { switch (phase) {
case PHASE_DATAOUT: case PHASE_DATAOUT:
#if (NDEBUG & NDEBUG_NO_DATAOUT) #if (NDEBUG & NDEBUG_NO_DATAOUT)
printk("scsi%d : NDEBUG_NO_DATAOUT set, attempted DATAOUT aborted\n", instance->host_no); shost_printk(KERN_DEBUG, instance, "NDEBUG_NO_DATAOUT set, attempted DATAOUT aborted\n");
sink = 1; sink = 1;
do_abort(instance); do_abort(instance);
cmd->result = DID_ERROR << 16; cmd->result = DID_ERROR << 16;
...@@ -2053,10 +2053,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { ...@@ -2053,10 +2053,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
tmp = 0; tmp = 0;
} }
} else if (len) { } else if (len) {
printk("scsi%d: error receiving extended message\n", instance->host_no); shost_printk(KERN_ERR, instance, "error receiving extended message\n");
tmp = 0; tmp = 0;
} else { } else {
printk("scsi%d: extended message code %02x length %d is too long\n", instance->host_no, extended_msg[2], extended_msg[1]); shost_printk(KERN_NOTICE, instance, "extended message code %02x length %d is too long\n",
extended_msg[2], extended_msg[1]);
tmp = 0; tmp = 0;
} }
...@@ -2072,7 +2073,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { ...@@ -2072,7 +2073,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
*/ */
default: default:
if (!tmp) { if (!tmp) {
printk("scsi%d: rejecting message ", instance->host_no); shost_printk(KERN_ERR, instance, "rejecting message ");
spi_print_msg(extended_msg); spi_print_msg(extended_msg);
printk("\n"); printk("\n");
} else if (tmp != EXTENDED_MESSAGE) } else if (tmp != EXTENDED_MESSAGE)
...@@ -2118,7 +2119,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) { ...@@ -2118,7 +2119,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) {
cmd->SCp.Status = tmp; cmd->SCp.Status = tmp;
break; break;
default: default:
printk("scsi%d : unknown phase\n", instance->host_no); shost_printk(KERN_ERR, instance, "unknown phase\n");
NCR5380_dprint(NDEBUG_ANY, instance); NCR5380_dprint(NDEBUG_ANY, instance);
} /* switch(phase) */ } /* switch(phase) */
} else { } else {
......
...@@ -569,12 +569,12 @@ static void NCR5380_print_phase(struct Scsi_Host *instance) ...@@ -569,12 +569,12 @@ static void NCR5380_print_phase(struct Scsi_Host *instance)
status = NCR5380_read(STATUS_REG); status = NCR5380_read(STATUS_REG);
if (!(status & SR_REQ)) if (!(status & SR_REQ))
printk(KERN_DEBUG "scsi%d: REQ not asserted, phase unknown.\n", HOSTNO); shost_printk(KERN_DEBUG, instance, "REQ not asserted, phase unknown.\n");
else { else {
for (i = 0; (phases[i].value != PHASE_UNKNOWN) && for (i = 0; (phases[i].value != PHASE_UNKNOWN) &&
(phases[i].value != (status & PHASE_MASK)); ++i) (phases[i].value != (status & PHASE_MASK)); ++i)
; ;
printk(KERN_DEBUG "scsi%d: phase %s\n", HOSTNO, phases[i].name); shost_printk(KERN_DEBUG, instance, "phase %s\n", phases[i].name);
} }
} }
...@@ -1428,8 +1428,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance, ...@@ -1428,8 +1428,7 @@ static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *instance,
NCR5380_reselect(instance); NCR5380_reselect(instance);
if (!hostdata->connected) if (!hostdata->connected)
NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask); NCR5380_write(SELECT_ENABLE_REG, hostdata->id_mask);
printk(KERN_ERR "scsi%d: reselection after won arbitration?\n", shost_printk(KERN_ERR, instance, "reselection after won arbitration?\n");
HOSTNO);
goto out; goto out;
} }
...@@ -1957,8 +1956,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) ...@@ -1957,8 +1956,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
switch (phase) { switch (phase) {
case PHASE_DATAOUT: case PHASE_DATAOUT:
#if (NDEBUG & NDEBUG_NO_DATAOUT) #if (NDEBUG & NDEBUG_NO_DATAOUT)
printk("scsi%d: NDEBUG_NO_DATAOUT set, attempted DATAOUT " shost_printk(KERN_DEBUG, instance, "NDEBUG_NO_DATAOUT set, attempted DATAOUT aborted\n");
"aborted\n", HOSTNO);
sink = 1; sink = 1;
do_abort(instance); do_abort(instance);
cmd->result = DID_ERROR << 16; cmd->result = DID_ERROR << 16;
...@@ -2219,13 +2217,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) ...@@ -2219,13 +2217,11 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
tmp = 0; tmp = 0;
} }
} else if (len) { } else if (len) {
printk(KERN_NOTICE "scsi%d: error receiving " shost_printk(KERN_ERR, instance, "error receiving extended message\n");
"extended message\n", HOSTNO);
tmp = 0; tmp = 0;
} else { } else {
printk(KERN_NOTICE "scsi%d: extended message " shost_printk(KERN_NOTICE, instance, "extended message code %02x length %d is too long\n",
"code %02x length %d is too long\n", extended_msg[2], extended_msg[1]);
HOSTNO, extended_msg[2], extended_msg[1]);
tmp = 0; tmp = 0;
} }
...@@ -2241,8 +2237,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) ...@@ -2241,8 +2237,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
*/ */
default: default:
if (!tmp) { if (!tmp) {
printk(KERN_INFO "scsi%d: rejecting message ", shost_printk(KERN_ERR, instance, "rejecting message ");
instance->host_no);
spi_print_msg(extended_msg); spi_print_msg(extended_msg);
printk("\n"); printk("\n");
} else if (tmp != EXTENDED_MESSAGE) } else if (tmp != EXTENDED_MESSAGE)
...@@ -2291,7 +2286,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance) ...@@ -2291,7 +2286,7 @@ static void NCR5380_information_transfer(struct Scsi_Host *instance)
cmd->SCp.Status = tmp; cmd->SCp.Status = tmp;
break; break;
default: default:
printk("scsi%d: unknown phase\n", HOSTNO); shost_printk(KERN_ERR, instance, "unknown phase\n");
NCR5380_dprint(NDEBUG_ANY, instance); NCR5380_dprint(NDEBUG_ANY, instance);
} /* switch(phase) */ } /* switch(phase) */
} else { } else {
......
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