Some more small nits in the printf's fixed.

This commit is contained in:
Rodney W. Grimes
1993-08-22 10:00:16 +00:00
parent 2365e64f8b
commit f254020327
4 changed files with 39 additions and 49 deletions
+5 -10
View File
@@ -14,7 +14,7 @@
* *
* commenced: Sun Sep 27 18:14:01 PDT 1992 * commenced: Sun Sep 27 18:14:01 PDT 1992
* *
* $Id$ * $Id: aha1742.c,v 1.7 1993/08/21 20:01:31 rgrimes Exp $
*/ */
#include <sys/types.h> #include <sys/types.h>
@@ -868,10 +868,8 @@ int unit;
\***********************************************/ \***********************************************/
#ifdef __386BSD__ #ifdef __386BSD__
printf("ahb%d: reading board settings, ",unit); printf("ahb%d: reading board settings, ",unit);
#define PRNT(x) printf(x)
#else __386BSD__ #else __386BSD__
printf("ahb%d:",unit); printf("ahb%d:",unit);
#define PRNT(x) printf(x)
#endif __386BSD__ #endif __386BSD__
intdef = inb(port + INTDEF); intdef = inb(port + INTDEF);
@@ -879,35 +877,32 @@ int unit;
{ {
case INT9: case INT9:
ahb_data[unit].vect = 9; ahb_data[unit].vect = 9;
PRNT("int=9 ");
break; break;
case INT10: case INT10:
ahb_data[unit].vect = 10; ahb_data[unit].vect = 10;
PRNT("int=10 ");
break; break;
case INT11: case INT11:
ahb_data[unit].vect = 11; ahb_data[unit].vect = 11;
PRNT("int=11 ");
break; break;
case INT12: case INT12:
ahb_data[unit].vect = 12; ahb_data[unit].vect = 12;
PRNT("int=12 ");
break; break;
case INT14: case INT14:
ahb_data[unit].vect = 14; ahb_data[unit].vect = 14;
PRNT("int=14 ");
break; break;
case INT15: case INT15:
ahb_data[unit].vect = 15; ahb_data[unit].vect = 15;
PRNT("int=15 ");
break; break;
default: default:
printf("illegal int setting\n"); printf("illegal int setting\n");
return(EIO); return(EIO);
} }
#ifdef __386BSD__ #ifdef __386BSD__
printf("\n"); printf("int=%d\n",ahb_data[unit].vect);
#else __386BSD__
printf("int=%d ",ahb_data[unit].vect);
#endif __386BSD__ #endif __386BSD__
outb(port + INTDEF ,(intdef | INTEN)); /* make sure we can interrupt */ outb(port + INTDEF ,(intdef | INTEN)); /* make sure we can interrupt */
/* who are we on the scsi bus */ /* who are we on the scsi bus */
ahb_data[unit].our_id = (inb(port + SCSIDEF) & HSCSIID); ahb_data[unit].our_id = (inb(port + SCSIDEF) & HSCSIID);
+5 -10
View File
@@ -14,7 +14,7 @@
* *
* commenced: Sun Sep 27 18:14:01 PDT 1992 * commenced: Sun Sep 27 18:14:01 PDT 1992
* *
* $Id$ * $Id: aha1742.c,v 1.7 1993/08/21 20:01:31 rgrimes Exp $
*/ */
#include <sys/types.h> #include <sys/types.h>
@@ -868,10 +868,8 @@ int unit;
\***********************************************/ \***********************************************/
#ifdef __386BSD__ #ifdef __386BSD__
printf("ahb%d: reading board settings, ",unit); printf("ahb%d: reading board settings, ",unit);
#define PRNT(x) printf(x)
#else __386BSD__ #else __386BSD__
printf("ahb%d:",unit); printf("ahb%d:",unit);
#define PRNT(x) printf(x)
#endif __386BSD__ #endif __386BSD__
intdef = inb(port + INTDEF); intdef = inb(port + INTDEF);
@@ -879,35 +877,32 @@ int unit;
{ {
case INT9: case INT9:
ahb_data[unit].vect = 9; ahb_data[unit].vect = 9;
PRNT("int=9 ");
break; break;
case INT10: case INT10:
ahb_data[unit].vect = 10; ahb_data[unit].vect = 10;
PRNT("int=10 ");
break; break;
case INT11: case INT11:
ahb_data[unit].vect = 11; ahb_data[unit].vect = 11;
PRNT("int=11 ");
break; break;
case INT12: case INT12:
ahb_data[unit].vect = 12; ahb_data[unit].vect = 12;
PRNT("int=12 ");
break; break;
case INT14: case INT14:
ahb_data[unit].vect = 14; ahb_data[unit].vect = 14;
PRNT("int=14 ");
break; break;
case INT15: case INT15:
ahb_data[unit].vect = 15; ahb_data[unit].vect = 15;
PRNT("int=15 ");
break; break;
default: default:
printf("illegal int setting\n"); printf("illegal int setting\n");
return(EIO); return(EIO);
} }
#ifdef __386BSD__ #ifdef __386BSD__
printf("\n"); printf("int=%d\n",ahb_data[unit].vect);
#else __386BSD__
printf("int=%d ",ahb_data[unit].vect);
#endif __386BSD__ #endif __386BSD__
outb(port + INTDEF ,(intdef | INTEN)); /* make sure we can interrupt */ outb(port + INTDEF ,(intdef | INTEN)); /* make sure we can interrupt */
/* who are we on the scsi bus */ /* who are we on the scsi bus */
ahb_data[unit].our_id = (inb(port + SCSIDEF) & HSCSIID); ahb_data[unit].our_id = (inb(port + SCSIDEF) & HSCSIID);
+23 -23
View File
@@ -12,7 +12,7 @@
* on the understanding that TFS is not responsible for the correct * on the understanding that TFS is not responsible for the correct
* functioning of this software in any circumstances. * functioning of this software in any circumstances.
* *
* $Id$ * $Id: bt742a.c,v 1.5 1993/08/21 20:01:32 rgrimes Exp $
*/ */
/* /*
@@ -1047,11 +1047,9 @@ int unit;
* level * * level *
\***********************************************/ \***********************************************/
#ifdef __386BSD__ #ifdef __386BSD__
printf("bt%d reading board settings, ",unit); printf("bt%d: reading board settings, ",unit);
#define PRNT(x) printf(x)
#else __386BSD__ #else __386BSD__
printf("bt%d:",unit); printf("bt%d:",unit);
#define PRNT(x) printf(x)
#endif __386BSD__ #endif __386BSD__
bt_cmd(unit,0, sizeof(conf), 0 ,&conf, BT_CONF_GET); bt_cmd(unit,0, sizeof(conf), 0 ,&conf, BT_CONF_GET);
@@ -1059,66 +1057,66 @@ int unit;
{ {
case EISADMA: case EISADMA:
bt_dma[unit] = -1; bt_dma[unit] = -1;
PRNT("eisa dma,");
break; break;
case CHAN0: case CHAN0:
outb(0x0b, 0x0c); outb(0x0b, 0x0c);
outb(0x0a, 0x00); outb(0x0a, 0x00);
bt_dma[unit] = 0; bt_dma[unit] = 0;
PRNT("dma=0,");
break; break;
case CHAN5: case CHAN5:
outb(0xd6, 0xc1); outb(0xd6, 0xc1);
outb(0xd4, 0x01); outb(0xd4, 0x01);
bt_dma[unit] = 5; bt_dma[unit] = 5;
PRNT("dma=5,");
break; break;
case CHAN6: case CHAN6:
outb(0xd6, 0xc2); outb(0xd6, 0xc2);
outb(0xd4, 0x02); outb(0xd4, 0x02);
bt_dma[unit] = 6; bt_dma[unit] = 6;
PRNT("dma=6,");
break; break;
case CHAN7: case CHAN7:
outb(0xd6, 0xc3); outb(0xd6, 0xc3);
outb(0xd4, 0x03); outb(0xd4, 0x03);
bt_dma[unit] = 7; bt_dma[unit] = 7;
PRNT("dma=7,");
break; break;
default: default:
printf("illegal dma setting %x\n",conf.chan); printf("illegal dma setting %x\n",conf.chan);
return(EIO); return(EIO);
} }
if (bt_dma[unit] == -1)
printf("eisa dma, ");
else
printf("dma=%d, ",bt_dma[unit]);
switch(conf.intr) switch(conf.intr)
{ {
case INT9: case INT9:
bt_int[unit] = 9; bt_int[unit] = 9;
PRNT("int=9,");
break; break;
case INT10: case INT10:
bt_int[unit] = 10; bt_int[unit] = 10;
PRNT("int=10,");
break; break;
case INT11: case INT11:
bt_int[unit] = 11; bt_int[unit] = 11;
PRNT("int=11,");
break; break;
case INT12: case INT12:
bt_int[unit] = 12; bt_int[unit] = 12;
PRNT("int=12,");
break; break;
case INT14: case INT14:
bt_int[unit] = 14; bt_int[unit] = 14;
PRNT("int=14,");
break; break;
case INT15: case INT15:
bt_int[unit] = 15; bt_int[unit] = 15;
PRNT("int=15,");
break; break;
default: default:
printf("illegal int setting\n"); printf("illegal int setting\n");
return(EIO); return(EIO);
} }
#ifdef __386BSD__
printf("int=%d\n",bt_int[unit]);
#else
printf("int=%d ",bt_int[unit]);
#endif __386BSD__
/* who are we on the scsi bus */ /* who are we on the scsi bus */
bt_scsi_dev[unit] = conf.scsi_dev; bt_scsi_dev[unit] = conf.scsi_dev;
/***********************************************\ /***********************************************\
@@ -1177,24 +1175,25 @@ int unit;
/* Inquire Board ID to Bt742 for FirmWare Version */ /* Inquire Board ID to Bt742 for FirmWare Version */
bt_cmd(unit, 0, sizeof(bID), 0, &bID, BT_INQUIRE ); bt_cmd(unit, 0, sizeof(bID), 0, &bID, BT_INQUIRE );
printf("ver%c.%c,", bID.firm_revision, bID.firm_version ); printf("bt%d: version %c.%c, ",
unit, bID.firm_revision, bID.firm_version );
/* Ask setup information to Bt742 */ /* Ask setup information to Bt742 */
bt_cmd(unit, 1, sizeof(setup), 0, &setup, BT_SETUP_GET, sizeof(setup) ); bt_cmd(unit, 1, sizeof(setup), 0, &setup, BT_SETUP_GET, sizeof(setup) );
if ( setup.sync_neg ) { if ( setup.sync_neg ) {
printf("sync,"); printf("sync, ");
} else { } else {
printf("async,"); printf("async, ");
} }
if ( setup.parity ) { if ( setup.parity ) {
printf("parity,"); printf("parity, ");
} else { } else {
printf("no parity,"); printf("no parity, ");
} }
printf("%dmbxs,%dccbs", setup.num_mbx, printf("%d mbxs, %d ccbs\n", setup.num_mbx,
sizeof(bt_ccb)/(sizeof(struct bt_ccb) * NBT) ); sizeof(bt_ccb)/(sizeof(struct bt_ccb) * NBT) );
for ( i = 0; i < 8; i++ ) { for ( i = 0; i < 8; i++ ) {
@@ -1203,7 +1202,8 @@ int unit;
!setup.sync[i].valid ) !setup.sync[i].valid )
continue; continue;
printf("\ndev%02d Offset=%d,Transfer period=%d, Synchronous? %s",i, printf("bt%d: dev%02d Offset=%d,Transfer period=%d, Synchronous? %s",
unit, i,
setup.sync[i].offset, setup.sync[i].period, setup.sync[i].offset, setup.sync[i].period,
setup.sync[i].valid ? "Yes" : "No" ); setup.sync[i].valid ? "Yes" : "No" );
} }
@@ -1525,7 +1525,7 @@ struct scsi_xfer *xs;
} }
if(!count && !done) if(!count && !done)
{ {
printf("abort failed in wait\n"); printf("bt%d: abort failed in wait\n", unit);
ccb->mbx->cmd = BT_MBO_FREE; ccb->mbx->cmd = BT_MBO_FREE;
} }
bt_free_ccb(unit,ccb,flags); bt_free_ccb(unit,ccb,flags);
+6 -6
View File
@@ -18,7 +18,7 @@
* commenced: Sun Sep 27 18:14:01 PDT 1992 * commenced: Sun Sep 27 18:14:01 PDT 1992
* slight mod to make work with 34F as well: Wed Jun 2 18:05:48 WST 1993 * slight mod to make work with 34F as well: Wed Jun 2 18:05:48 WST 1993
* *
* $Id$ * $Id: ultra14f.c,v 1.6 1993/08/21 20:01:34 rgrimes Exp $
*/ */
#include <sys/types.h> #include <sys/types.h>
@@ -322,7 +322,7 @@ uha_send_mbox( int unit
&& (spincount--)); && (spincount--));
if(spincount == -1) if(spincount == -1)
{ {
printf("uha%d: board not responding\n",unit); printf("uha%d: uha_send_mbox, board not responding\n",unit);
Debugger(); Debugger();
} }
@@ -348,7 +348,7 @@ uha_abort( int unit
&& (spincount--)); && (spincount--));
if(spincount == -1); if(spincount == -1);
{ {
printf("uha%d: board not responding\n",unit); printf("uha%d: uha_abort, board not responding\n",unit);
Debugger(); Debugger();
} }
@@ -358,7 +358,7 @@ uha_abort( int unit
while((abortcount--) && (!(inb(port + UHA_SINT) & UHA_ABORT_FAIL))); while((abortcount--) && (!(inb(port + UHA_SINT) & UHA_ABORT_FAIL)));
if(abortcount == -1) if(abortcount == -1)
{ {
printf("uha%d: board not responding\n",unit); printf("uha%d: uha_abort, board not responding\n",unit);
Debugger(); Debugger();
} }
if((inb(port + UHA_SINT) & 0x10) != 0) if((inb(port + UHA_SINT) & 0x10) != 0)
@@ -387,7 +387,7 @@ uha_poll(int unit ,int wait) /* in msec */
while( (spincount--) && (!(inb(stport) & UHA_SINTP))); while( (spincount--) && (!(inb(stport) & UHA_SINTP)));
if(spincount == -1) if(spincount == -1)
{ {
printf("uha%d: board not responding\n",unit); printf("uha%d: uha_poll, board not responding\n",unit);
return(EIO); return(EIO);
} }
if ((int)cheat != PHYSTOKV(inl(port + UHA_ICM0))) if ((int)cheat != PHYSTOKV(inl(port + UHA_ICM0)))
@@ -713,7 +713,7 @@ int unit;
model = inb(port + UHA_ID0); model = inb(port + UHA_ID0);
submodel = inb(port + UHA_ID1); submodel = inb(port + UHA_ID1);
if ((model != 0x56) & (submodel != 0x40)) if ((model != 0x56) & (submodel != 0x40))
{ printf("uha%d: not responding\n",unit); { printf("uha%d: uha_init, board not responding\n",unit);
return(ENXIO); } return(ENXIO); }
printf("uha%d: reading board settings, ",unit); printf("uha%d: reading board settings, ",unit);