--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7770.c	Fri Aug  2 20:39:44 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7770.c	Wed Sep 25 13:46:14 2002
@@ -148,7 +148,7 @@
 	case 15:
 		break;
 	default:
-		printf("aic7770_config: illegal irq setting %d\n", intdef);
+		printf(KERN_ERR "aic7770_config: illegal irq setting %d\n", intdef);
 		return (ENXIO);
 	}
 
@@ -272,7 +272,7 @@
 	sc = ahc->seep_config;
 
 	if (bootverbose)
-		printf("%s: Reading SEEPROM...", ahc_name(ahc));
+		printf(KERN_DEBUG "%s: Reading SEEPROM...", ahc_name(ahc));
 	have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)&sc,
 					/*start_addr*/0, sizeof(sc)/2);
 
@@ -280,16 +280,16 @@
 
 		if (ahc_verify_cksum(sc) == 0) {
 			if(bootverbose)
-				printf ("checksum error\n");
+				printf (KERN_DEBUG "checksum error\n");
 			have_seeprom = 0;
 		} else if (bootverbose) {
-			printf("done.\n");
+			printf(KERN_DEBUG "done.\n");
 		}
 	}
 
 	if (!have_seeprom) {
 		if (bootverbose)
-			printf("%s: No SEEPROM available\n", ahc_name(ahc));
+			printf(KERN_DEBUG "%s: No SEEPROM available\n", ahc_name(ahc));
 		ahc->flags |= AHC_USEDEFAULTS;
 	} else {
 		/*
--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7xxx_core.c	Wed Sep 25 13:31:42 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_core.c	Wed Sep 25 14:01:37 2002
@@ -327,7 +327,7 @@
 
 		scb = ahc_lookup_scb(ahc, scb_index);
 		if (scb == NULL) {
-			printf("%s: WARNING no command for scb %d "
+			printf(KERN_WARNING "%s: WARNING no command for scb %d "
 			       "(cmdcmplt)\nQOUTPOS = %d\n",
 			       ahc_name(ahc), scb_index,
 			       ahc->qoutfifonext - 1);
@@ -381,7 +381,7 @@
 	error = ahc_inb(ahc, ERROR);
 	for (i = 0; error != 1 && i < num_errors; i++)
 		error >>= 1;
-	printf("%s: brkadrint, %s at seqaddr = 0x%x\n",
+	printf(KERN_ERR "%s: brkadrint, %s at seqaddr = 0x%x\n",
 	       ahc_name(ahc), ahc_hard_errors[i].errmesg,
 	       ahc_inb(ahc, SEQADDR0) |
 	       (ahc_inb(ahc, SEQADDR1) << 8));
@@ -437,7 +437,7 @@
 		scb_index = ahc_inb(ahc, SCB_TAG);
 		scb = ahc_lookup_scb(ahc, scb_index);
 		if (scb == NULL) {
-			printf("%s:%c:%d: ahc_intr - referenced scb "
+			printf(KERN_CRIT "%s:%c:%d: ahc_intr - referenced scb "
 			       "not valid during seqint 0x%x scb(%d)\n",
 			       ahc_name(ahc), devinfo.channel,
 			       devinfo.target, intstat, scb_index);
@@ -466,7 +466,7 @@
 		ahc_set_scsi_status(scb, hscb->shared_data.status.scsi_status);
 		switch (hscb->shared_data.status.scsi_status) {
 		case SCSI_STATUS_OK:
-			printf("%s: Interrupted for staus of 0???\n",
+			printf(KERN_WARNING "%s: Interrupted for staus of 0???\n",
 			       ahc_name(ahc));
 			break;
 		case SCSI_STATUS_CMD_TERMINATED:
@@ -480,7 +480,7 @@
 #ifdef AHC_DEBUG
 			if (ahc_debug & AHC_SHOWSENSE) {
 				ahc_print_path(ahc, scb);
-				printf("SCB %d: requests Check Status\n",
+				printf(KERN_DEBUG "SCB %d: requests Check Status\n",
 				       scb->hscb->tag);
 			}
 #endif
@@ -503,7 +503,7 @@
 #ifdef AHC_DEBUG
 			if (ahc_debug & AHC_SHOWSENSE) {
 				ahc_print_path(ahc, scb);
-				printf("Sending Sense\n");
+				printf(KERN_DEBUG "Sending Sense\n");
 			}
 #endif
 			sg->addr = ahc_get_sense_bufaddr(ahc, scb);
@@ -584,29 +584,29 @@
 		ahc_outb(ahc, SCSISEQ,
 			 ahc_inb(ahc, SCSISEQ) & (ENSELI|ENRSELI|ENAUTOATNP));
 
-		printf("%s:%c:%d: no active SCB for reconnecting "
+		printf(KERN_ERR "%s:%c:%d: no active SCB for reconnecting "
 		       "target - issuing BUS DEVICE RESET\n",
 		       ahc_name(ahc), devinfo.channel, devinfo.target);
-		printf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, "
+		printf(KERN_ERR "SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, "
 		       "ARG_1 == 0x%x ACCUM = 0x%x\n",
 		       ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
 		       ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
-		printf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, "
+		printf(KERN_ERR "SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, "
 		       "SINDEX == 0x%x\n",
 		       ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
 		       ahc_index_busy_tcl(ahc,
 			    BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID),
 				      ahc_inb(ahc, SAVED_LUN))),
 		       ahc_inb(ahc, SINDEX));
-		printf("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, "
+		printf(KERN_ERR "SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, "
 		       "SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n",
 		       ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID),
 		       ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG),
 		       ahc_inb(ahc, SCB_CONTROL));
-		printf("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n",
+		printf(KERN_ERR "SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n",
 		       ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI));
-		printf("SXFRCTL0 == 0x%x\n", ahc_inb(ahc, SXFRCTL0));
-		printf("SEQCTL == 0x%x\n", ahc_inb(ahc, SEQCTL));
+		printf(KERN_ERR "SXFRCTL0 == 0x%x\n", ahc_inb(ahc, SXFRCTL0));
+		printf(KERN_ERR "SEQCTL == 0x%x\n", ahc_inb(ahc, SEQCTL));
 		ahc_dump_card_state(ahc);
 		ahc->msgout_buf[0] = MSG_BUS_DEV_RESET;
 		ahc->msgout_len = 1;
@@ -619,7 +619,7 @@
 	case SEND_REJECT: 
 	{
 		u_int rejbyte = ahc_inb(ahc, ACCUM);
-		printf("%s:%c:%d: Warning - unknown message received from "
+		printf(KERN_WARNING "%s:%c:%d: Warning - unknown message received from "
 		       "target (0x%x).  Rejecting\n", 
 		       ahc_name(ahc), devinfo.channel, devinfo.target, rejbyte);
 		break; 
@@ -635,13 +635,13 @@
 		 */
 		int found;
 
-		printf("%s:%c:%d: Target did not send an IDENTIFY message. "
+		printf(KERN_ERR "%s:%c:%d: Target did not send an IDENTIFY message. "
 		       "LASTPHASE = 0x%x, SAVED_SCSIID == 0x%x\n",
 		       ahc_name(ahc), devinfo.channel, devinfo.target,
 		       ahc_inb(ahc, LASTPHASE), ahc_inb(ahc, SAVED_SCSIID));
 		found = ahc_reset_channel(ahc, devinfo.channel, 
 					  /*initiate reset*/TRUE);
-		printf("%s: Issued Channel %c Bus Reset. "
+		printf(KERN_ERR "%s: Issued Channel %c Bus Reset. "
 		       "%d SCBs aborted\n", ahc_name(ahc), devinfo.channel,
 		       found);
 		return;
@@ -657,7 +657,7 @@
 		u_int lastphase;
 
 		lastphase = ahc_inb(ahc, LASTPHASE);
-		printf("%s:%c:%d: unknown scsi bus phase %x, "
+		printf(KERN_WARNING "%s:%c:%d: unknown scsi bus phase %x, "
 		       "lastphase = 0x%x.  Attempting to continue\n",
 		       ahc_name(ahc), devinfo.channel, devinfo.target,
 		       lastphase, ahc_inb(ahc, SCSISIGI));
@@ -668,7 +668,7 @@
 		u_int lastphase;
 
 		lastphase = ahc_inb(ahc, LASTPHASE);
-		printf("%s:%c:%d: Missed busfree. "
+		printf(KERN_ERR "%s:%c:%d: Missed busfree. "
 		       "Lastphase = 0x%x, Curphase = 0x%x\n",
 		       ahc_name(ahc), devinfo.channel, devinfo.target,
 		       lastphase, ahc_inb(ahc, SCSISIGI));
@@ -798,18 +798,18 @@
 				break;
 		}
 		ahc_print_path(ahc, scb);
-		printf("data overrun detected %s."
+		printf(KERN_ERR "data overrun detected %s."
 		       "  Tag == 0x%x.\n",
 		       ahc_phase_table[i].phasemsg,
   		       scb->hscb->tag);
 		ahc_print_path(ahc, scb);
-		printf("%s seen Data Phase.  Length = %ld.  NumSGs = %d.\n",
+		printf(KERN_ERR "%s seen Data Phase.  Length = %ld.  NumSGs = %d.\n",
 		       (flg & DPHASE ? "Have" : "Haven't"),
 		       ahc_get_transfer_length(scb), scb->sg_count);
 		if (scb->sg_count > 0) {
 			for (i = 0; i < scb->sg_count; i++) {
 
-				printf("sg[%d] - Addr 0x%x%x : Length %d\n",
+				printf(KERN_ERR "sg[%d] - Addr 0x%x%x : Length %d\n",
 				       i,
 				       (ahc_le32toh(scb->sg_list[i].len) >> 24
 				        & SG_HIGH_ADDR_BITS),
@@ -867,7 +867,7 @@
 	{
 		u_int scbindex;
 
-		printf("%s:%c:%d:%d: Attempt to issue message failed\n",
+		printf(KERN_ERR "%s:%c:%d:%d: Attempt to issue message failed\n",
 		       ahc_name(ahc), devinfo.channel, devinfo.target,
 		       devinfo.lun);
 		scbindex = ahc_inb(ahc, SCB_TAG);
@@ -887,7 +887,7 @@
 	}
 	case NO_FREE_SCB:
 	{
-		printf("%s: No free or disconnected SCBs\n", ahc_name(ahc));
+		printf(KERN_CRIT "%s: No free or disconnected SCBs\n", ahc_name(ahc));
 		ahc_dump_card_state(ahc);
 		panic("for safety");
 		break;
@@ -897,7 +897,7 @@
 		u_int scbptr;
 
 		scbptr = ahc_inb(ahc, SCBPTR);
-		printf("Bogus TAG after DMA.  SCBPTR %d, tag %d, our tag %d\n",
+		printf(KERN_CRIT "Bogus TAG after DMA.  SCBPTR %d, tag %d, our tag %d\n",
 		       scbptr, ahc_inb(ahc, ARG_1),
 		       ahc->scb_data->hscbs[scbptr].tag);
 		ahc_dump_card_state(ahc);
@@ -906,12 +906,12 @@
 	}
 	case OUT_OF_RANGE:
 	{
-		printf("%s: BTT calculation out of range\n", ahc_name(ahc));
-		printf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, "
+		printf(KERN_CRIT "%s: BTT calculation out of range\n", ahc_name(ahc));
+		printf(KERN_CRIT "SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, "
 		       "ARG_1 == 0x%x ACCUM = 0x%x\n",
 		       ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN),
 		       ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM));
-		printf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, "
+		printf(KERN_CRIT "SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, "
 		       "SINDEX == 0x%x\n, A == 0x%x\n",
 		       ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR),
 		       ahc_index_busy_tcl(ahc,
@@ -919,19 +919,19 @@
 				      ahc_inb(ahc, SAVED_LUN))),
 		       ahc_inb(ahc, SINDEX),
 		       ahc_inb(ahc, ACCUM));
-		printf("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, "
+		printf(KERN_CRIT "SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, "
 		       "SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n",
 		       ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID),
 		       ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG),
 		       ahc_inb(ahc, SCB_CONTROL));
-		printf("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n",
+		printf(KERN_CRIT "SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n",
 		       ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI));
 		ahc_dump_card_state(ahc);
 		panic("for safety");
 		break;
 	}
 	default:
-		printf("ahc_intr: seqint, "
+		printf(KERN_WARNING "ahc_intr: seqint, "
 		       "intstat == 0x%x, scsisigi = 0x%x\n",
 		       intstat, ahc_inb(ahc, SCSISIGI));
 		break;
@@ -979,7 +979,7 @@
 			intr_channel = (cur_channel == 'A') ? 'B' : 'A';
 		}
 		if (status == 0) {
-			printf("%s: Spurious SCSI interrupt\n", ahc_name(ahc));
+			printf(KERN_WARNING "%s: Spurious SCSI interrupt\n", ahc_name(ahc));
 			ahc_outb(ahc, CLRINT, CLRSCSIINT);
 			ahc_unpause(ahc);
 			return;
@@ -997,7 +997,7 @@
 		int now_lvd;
 
 		now_lvd = ahc_inb(ahc, SBLKCTL) & ENAB40;
-		printf("%s: Transceiver State Has Changed to %s mode\n",
+		printf(KERN_WARNING "%s: Transceiver State Has Changed to %s mode\n",
 		       ahc_name(ahc), now_lvd ? "LVD" : "SE");
 		ahc_outb(ahc, CLRSINT0, CLRIOERR);
 		/*
@@ -1013,7 +1013,7 @@
 		ahc_reset_channel(ahc, intr_channel,
 				 /*Initiate Reset*/now_lvd == 0);
 	} else if ((status & SCSIRSTI) != 0) {
-		printf("%s: Someone reset channel %c\n",
+		printf(KERN_WARNING "%s: Someone reset channel %c\n",
 			ahc_name(ahc), intr_channel);
 		if (intr_channel != cur_channel)
 		 	ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB);
@@ -1067,10 +1067,10 @@
 		if (scb != NULL)
 			ahc_print_path(ahc, scb);
 		else
-			printf("%s:%c:%d: ", ahc_name(ahc), intr_channel,
+			printf(KERN_ERR "%s:%c:%d: ", ahc_name(ahc), intr_channel,
 			       SCSIID_TARGET(ahc, ahc_inb(ahc, SAVED_SCSIID)));
 		scsirate = ahc_inb(ahc, SCSIRATE);
-		printf("parity error detected %s. "
+		printf(KERN_ERR "parity error detected %s. "
 		       "SEQADDR(0x%x) SCSIRATE(0x%x)\n",
 		       ahc_phase_table[i].phasemsg,
 		       ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8),
@@ -1079,13 +1079,13 @@
 		if ((ahc->features & AHC_DT) != 0) {
 
 			if ((sstat2 & CRCVALERR) != 0)
-				printf("\tCRC Value Mismatch\n");
+				printf(KERN_ERR "\tCRC Value Mismatch\n");
 			if ((sstat2 & CRCENDERR) != 0)
-				printf("\tNo terminal CRC packet recevied\n");
+				printf(KERN_ERR "\tNo terminal CRC packet recevied\n");
 			if ((sstat2 & CRCREQERR) != 0)
-				printf("\tIllegal CRC packet request\n");
+				printf(KERN_ERR "\tIllegal CRC packet request\n");
 			if ((sstat2 & DUAL_EDGE_ERR) != 0)
-				printf("\tUnexpected %sDT Data Phase\n",
+				printf(KERN_ERR "\tUnexpected %sDT Data Phase\n",
 				       (scsirate & SINGLE_EDGE) ? "" : "non-");
 		}
 
@@ -1148,7 +1148,7 @@
 
 		scb = ahc_lookup_scb(ahc, scb_index);
 		if (scb == NULL) {
-			printf("%s: ahc_intr - referenced scb not "
+			printf(KERN_ERR "%s: ahc_intr - referenced scb not "
 			       "valid during SELTO scb(%d, %d)\n",
 			       ahc_name(ahc), scbptr, scb_index);
 		} else {
@@ -1221,7 +1221,7 @@
 				 == MSG_ABORT_TAG)
 					tag = scb->hscb->tag;
 				ahc_print_path(ahc, scb);
-				printf("SCB %d - Abort%s Completed.\n",
+				printf(KERN_WARNING "SCB %d - Abort%s Completed.\n",
 				       scb->hscb->tag, tag == SCB_LIST_NULL ?
 				       "" : " Tag");
 				ahc_abort_scbs(ahc, target, channel,
@@ -1318,7 +1318,7 @@
 				 * We had not fully identified this connection,
 				 * so we cannot abort anything.
 				 */
-				printf("%s: ", ahc_name(ahc));
+				printf(KERN_WARNING "%s: ", ahc_name(ahc));
 			}
 			for (i = 0; i < num_phases; i++) {
 				if (lastphase == ahc_phase_table[i].phase)
@@ -1331,7 +1331,7 @@
 			 * device.
 			 */
 			ahc_force_renegotiation(ahc);
-			printf("Unexpected busfree %s\n"
+			printf(KERN_WARNING "Unexpected busfree %s\n"
 			       "SEQADDR == 0x%x\n",
 			       ahc_phase_table[i].phasemsg,
 			       ahc_inb(ahc, SEQADDR0)
@@ -1340,7 +1340,7 @@
 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
 		ahc_restart(ahc);
 	} else {
-		printf("%s: Missing case in ahc_handle_scsiint. status = %x\n",
+		printf(KERN_WARNING "%s: Missing case in ahc_handle_scsiint. status = %x\n",
 		       ahc_name(ahc), status);
 		ahc_outb(ahc, CLRINT, CLRSCSIINT);
 	}
@@ -1409,7 +1409,7 @@
 			break;
 
 		if (steps > AHC_MAX_STEPS) {
-			printf("%s: Infinite loop in critical section\n",
+			printf(KERN_CRIT "%s: Infinite loop in critical section\n",
 			       ahc_name(ahc));
 			ahc_dump_card_state(ahc);
 			panic("critical section loop");
@@ -1472,23 +1472,23 @@
 
 	struct hardware_scb *hscb = scb->hscb;
 
-	printf("scb:%p control:0x%x scsiid:0x%x lun:%d cdb_len:%d\n",
+	printf(KERN_DEBUG "scb:%p control:0x%x scsiid:0x%x lun:%d cdb_len:%d\n",
 	       (void *)scb,
 	       hscb->control,
 	       hscb->scsiid,
 	       hscb->lun,
 	       hscb->cdb_len);
-	printf("Shared Data: ");
+	printf(KERN_DEBUG "Shared Data: ");
 	for (i = 0; i < sizeof(hscb->shared_data.cdb); i++)
-		printf("%#02x", hscb->shared_data.cdb[i]);
-	printf("        dataptr:%#x datacnt:%#x sgptr:%#x tag:%#x\n",
+		printf(KERN_DEBUG "%#02x", hscb->shared_data.cdb[i]);
+	printf(KERN_DEBUG "        dataptr:%#x datacnt:%#x sgptr:%#x tag:%#x\n",
 		ahc_le32toh(hscb->dataptr),
 		ahc_le32toh(hscb->datacnt),
 		ahc_le32toh(hscb->sgptr),
 		hscb->tag);
 	if (scb->sg_count > 0) {
 		for (i = 0; i < scb->sg_count; i++) {
-			printf("sg[%d] - Addr 0x%x%x : Length %d\n",
+			printf(KERN_DEBUG "sg[%d] - Addr 0x%x%x : Length %d\n",
 			       i,
 			       (ahc_le32toh(scb->sg_list[i].len) >> 24
 			        & SG_HIGH_ADDR_BITS),
@@ -1919,13 +1919,13 @@
 			       CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL);
 		if (bootverbose) {
 			if (offset != 0) {
-				printf("%s: target %d synchronous at %sMHz%s, "
+				printf(KERN_DEBUG "%s: target %d synchronous at %sMHz%s, "
 				       "offset = 0x%x\n", ahc_name(ahc),
 				       devinfo->target, syncrate->rate,
 				       (ppr_options & MSG_EXT_PPR_DT_REQ)
 				       ? " DT" : "", offset);
 			} else {
-				printf("%s: target %d using "
+				printf(KERN_DEBUG "%s: target %d using "
 				       "asynchronous transfers\n",
 				       ahc_name(ahc), devinfo->target);
 			}
@@ -1988,7 +1988,7 @@
 		ahc_send_async(ahc, devinfo->channel, devinfo->target,
 			       CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL);
 		if (bootverbose) {
-			printf("%s: target %d using %dbit transfers\n",
+			printf(KERN_DEBUG "%s: target %d using %dbit transfers\n",
 			       ahc_name(ahc), devinfo->target,
 			       8 * (0x01 << width));
 		}
@@ -2227,7 +2227,7 @@
 		ahc->msgout_buf[ahc->msgout_index++] = MSG_BUS_DEV_RESET;
 		ahc->msgout_len++;
 		ahc_print_path(ahc, scb);
-		printf("Bus Device Reset Message Sent\n");
+		printf(KERN_NOTICE "Bus Device Reset Message Sent\n");
 		/*
 		 * Clear our selection hardware in advance of
 		 * the busfree.  We may have an entry in the waiting
@@ -2243,7 +2243,7 @@
 			ahc->msgout_buf[ahc->msgout_index++] = MSG_ABORT;
 		ahc->msgout_len++;
 		ahc_print_path(ahc, scb);
-		printf("Abort%s Message Sent\n",
+		printf(KERN_WARNING "Abort%s Message Sent\n",
 		       (scb->hscb->control & TAG_ENB) != 0 ? " Tag" : "");
 		/*
 		 * Clear our selection hardware in advance of
@@ -2256,9 +2256,9 @@
 	} else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) {
 		ahc_build_transfer_msg(ahc, devinfo);
 	} else {
-		printf("ahc_intr: AWAITING_MSG for an SCB that "
+		printf(KERN_CRIT "ahc_intr: AWAITING_MSG for an SCB that "
 		       "does not have a waiting message\n");
-		printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
+		printf(KERN_CRIT "SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid,
 		       devinfo->target_mask);
 		panic("SCB = %d, SCB Control = %x, MSG_OUT = %x "
 		      "SCB flags = %x", scb->hscb->tag, scb->hscb->control,
@@ -2374,7 +2374,7 @@
 	ahc->msgout_buf[ahc->msgout_index++] = offset;
 	ahc->msgout_len += 5;
 	if (bootverbose) {
-		printf("(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n",
+		printf(KERN_DEBUG "(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n",
 		       ahc_name(ahc), devinfo->channel, devinfo->target,
 		       devinfo->lun, period, offset);
 	}
@@ -2394,7 +2394,7 @@
 	ahc->msgout_buf[ahc->msgout_index++] = bus_width;
 	ahc->msgout_len += 4;
 	if (bootverbose) {
-		printf("(%s:%c:%d:%d): Sending WDTR %x\n",
+		printf(KERN_DEBUG "(%s:%c:%d:%d): Sending WDTR %x\n",
 		       ahc_name(ahc), devinfo->channel, devinfo->target,
 		       devinfo->lun, bus_width);
 	}
@@ -2419,7 +2419,7 @@
 	ahc->msgout_buf[ahc->msgout_index++] = ppr_options;
 	ahc->msgout_len += 8;
 	if (bootverbose) {
-		printf("(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, "
+		printf(KERN_DEBUG "(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, "
 		       "offset %x, ppr_options %x\n", ahc_name(ahc),
 		       devinfo->channel, devinfo->target, devinfo->lun,
 		       bus_width, period, offset, ppr_options);
@@ -2838,7 +2838,7 @@
 					    targ_scsirate & WIDEXFER,
 					    devinfo->role);
 			if (bootverbose) {
-				printf("(%s:%c:%d:%d): Received "
+				printf(KERN_DEBUG "(%s:%c:%d:%d): Received "
 				       "SDTR period %x, offset %x\n\t"
 				       "Filtered to period %x, offset %x\n",
 				       ahc_name(ahc), devinfo->channel,
@@ -2869,7 +2869,7 @@
 				 */
 				if (bootverbose
 				 && devinfo->role == ROLE_INITIATOR) {
-					printf("(%s:%c:%d:%d): Target "
+					printf(KERN_DEBUG "(%s:%c:%d:%d): Target "
 					       "Initiated SDTR\n",
 					       ahc_name(ahc), devinfo->channel,
 					       devinfo->target, devinfo->lun);
@@ -2911,7 +2911,7 @@
 			ahc_validate_width(ahc, tinfo, &bus_width,
 					   devinfo->role);
 			if (bootverbose) {
-				printf("(%s:%c:%d:%d): Received WDTR "
+				printf(KERN_DEBUG "(%s:%c:%d:%d): Received WDTR "
 				       "%x filtered to %x\n",
 				       ahc_name(ahc), devinfo->channel,
 				       devinfo->target, devinfo->lun,
@@ -2927,7 +2927,7 @@
 				 */
 				if (saved_width > bus_width) {
 					reject = TRUE;
-					printf("(%s:%c:%d:%d): requested %dBit "
+					printf(KERN_WARNING "(%s:%c:%d:%d): requested %dBit "
 					       "transfers.  Rejecting...\n",
 					       ahc_name(ahc), devinfo->channel,
 					       devinfo->target, devinfo->lun,
@@ -2940,7 +2940,7 @@
 				 */
 				if (bootverbose
 				 && devinfo->role == ROLE_INITIATOR) {
-					printf("(%s:%c:%d:%d): Target "
+					printf(KERN_DEBUG "(%s:%c:%d:%d): Target "
 					       "Initiated WDTR\n",
 					       ahc_name(ahc), devinfo->channel,
 					       devinfo->target, devinfo->lun);
@@ -3051,12 +3051,12 @@
 				}
 			} else {
 				if (devinfo->role != ROLE_TARGET)
-					printf("(%s:%c:%d:%d): Target "
+					printf(KERN_INFO "(%s:%c:%d:%d): Target "
 					       "Initiated PPR\n",
 					       ahc_name(ahc), devinfo->channel,
 					       devinfo->target, devinfo->lun);
 				else
-					printf("(%s:%c:%d:%d): Initiator "
+					printf(KERN_INFO "(%s:%c:%d:%d): Initiator "
 					       "Initiated PPR\n",
 					       ahc_name(ahc), devinfo->channel,
 					       devinfo->target, devinfo->lun);
@@ -3068,7 +3068,7 @@
 				response = TRUE;
 			}
 			if (bootverbose) {
-				printf("(%s:%c:%d:%d): Received PPR width %x, "
+				printf(KERN_DEBUG "(%s:%c:%d:%d): Received PPR width %x, "
 				       "period %x, offset %x,options %x\n"
 				       "\tFiltered to width %x, period %x, "
 				       "offset %x, options %x\n",
@@ -3198,7 +3198,7 @@
 		 * Attempt to negotiate SPI-2 style.
 		 */
 		if (bootverbose) {
-			printf("(%s:%c:%d:%d): PPR Rejected. "
+			printf(KERN_DEBUG "(%s:%c:%d:%d): PPR Rejected. "
 			       "Trying WDTR/SDTR\n",
 			       ahc_name(ahc), devinfo->channel,
 			       devinfo->target, devinfo->lun);
@@ -3214,7 +3214,7 @@
 	} else if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_WDTR, /*full*/FALSE)) {
 
 		/* note 8bit xfers */
-		printf("(%s:%c:%d:%d): refuses WIDE negotiation.  Using "
+		printf(KERN_INFO "(%s:%c:%d:%d): refuses WIDE negotiation.  Using "
 		       "8bit transfers\n", ahc_name(ahc),
 		       devinfo->channel, devinfo->target, devinfo->lun);
 		ahc_set_width(ahc, devinfo, MSG_EXT_WDTR_BUS_8_BIT,
@@ -3242,7 +3242,7 @@
 				 /*offset*/0, /*ppr_options*/0,
 				 AHC_TRANS_ACTIVE|AHC_TRANS_GOAL,
 				 /*paused*/TRUE);
-		printf("(%s:%c:%d:%d): refuses synchronous negotiation. "
+		printf(KERN_INFO "(%s:%c:%d:%d): refuses synchronous negotiation. "
 		       "Using asynchronous transfers\n",
 		       ahc_name(ahc), devinfo->channel,
 		       devinfo->target, devinfo->lun);
@@ -3253,13 +3253,13 @@
 		tag_type = (scb->hscb->control & MSG_SIMPLE_TASK);
 
 		if (tag_type == MSG_SIMPLE_TASK) {
-			printf("(%s:%c:%d:%d): refuses tagged commands.  "
+			printf(KERN_INFO "(%s:%c:%d:%d): refuses tagged commands.  "
 			       "Performing non-tagged I/O\n", ahc_name(ahc),
 			       devinfo->channel, devinfo->target, devinfo->lun);
 			ahc_set_tags(ahc, devinfo, AHC_QUEUE_NONE);
 			mask = ~0x23;
 		} else {
-			printf("(%s:%c:%d:%d): refuses %s tagged commands.  "
+			printf(KERN_INFO "(%s:%c:%d:%d): refuses %s tagged commands.  "
 			       "Performing simple queue tagged I/O only\n",
 			       ahc_name(ahc), devinfo->channel, devinfo->target,
 			       devinfo->lun, tag_type == MSG_ORDERED_TASK
@@ -3309,7 +3309,7 @@
 		/*
 		 * Otherwise, we ignore it.
 		 */
-		printf("%s:%c:%d: Message reject for %x -- ignored\n",
+		printf(KERN_WARNING "%s:%c:%d: Message reject for %x -- ignored\n",
 		       ahc_name(ahc), devinfo->channel, devinfo->target,
 		       last_msg);
 	}
@@ -3533,7 +3533,7 @@
 
 	if (message != NULL
 	 && (verbose_level <= bootverbose))
-		printf("%s: %s on %c:%d. %d SCBs aborted\n", ahc_name(ahc),
+		printf(KERN_INFO "%s: %s on %c:%d. %d SCBs aborted\n", ahc_name(ahc),
 		       message, devinfo->channel, devinfo->target, found);
 }
 
@@ -3574,7 +3574,7 @@
 #ifndef	__FreeBSD__
 	ahc = malloc(sizeof(*ahc), M_DEVBUF, M_NOWAIT);
 	if (!ahc) {
-		printf("aic7xxx: cannot malloc softc!\n");
+		printf(KERN_ERR "aic7xxx: cannot malloc softc!\n");
 		free(name, M_DEVBUF);
 		return NULL;
 	}
@@ -3858,7 +3858,7 @@
 	} while (--wait && !(ahc_inb(ahc, HCNTRL) & CHIPRSTACK));
 
 	if (wait == 0) {
-		printf("%s: WARNING - Failed chip reset!  "
+		printf(KERN_WARNING "%s: WARNING - Failed chip reset!  "
 		       "Trying to initialize anyway.\n", ahc_name(ahc));
 	}
 	ahc_outb(ahc, HCNTRL, ahc->pause);
@@ -3881,7 +3881,7 @@
 		ahc->features |= AHC_TWIN;
 		break;
 	default:
-		printf(" Unsupported adapter type.  Ignoring\n");
+		printf(KERN_ERR " Unsupported adapter type.  Ignoring\n");
 		return(-1);
 	}
 
@@ -4011,7 +4011,7 @@
 	}
 
 	if (ahc->scb_data->maxhscbs == 0) {
-		printf("%s: No SCB space found\n", ahc_name(ahc));
+		printf(KERN_ERR "%s: No SCB space found\n", ahc_name(ahc));
 		return (ENXIO);
 	}
 
@@ -4111,7 +4111,7 @@
 	ahc_alloc_scbs(ahc);
 
 	if (scb_data->numscbs == 0) {
-		printf("%s: ahc_init_scbdata - "
+		printf(KERN_ERR "%s: ahc_init_scbdata - "
 		       "Unable to allocate initial scbs\n",
 		       ahc_name(ahc));
 		goto error_exit;
@@ -4328,22 +4328,25 @@
 #endif
 
 #ifdef AHC_PRINT_SRAM
-	printf("Scratch Ram:");
-	for (i = 0x20; i < 0x5f; i++) {
+	{
+	  char tmp_buf[1024];
+	  memset(tmp_buf,0,1024);
+	  for (i = 0x20; i < 0x5f; i++) {
 		if (((i % 8) == 0) && (i != 0)) {
-			printf ("\n              ");
+			sprintf (&tmp_buf[strlen(tmp_buf)],"\n              ");
 		}
-		printf (" 0x%x", ahc_inb(ahc, i));
-	}
-	if ((ahc->features & AHC_MORE_SRAM) != 0) {
+		sprintf (&tmp_buf[strlen(tmp_buf)], " 0x%x", ahc_inb(ahc, i));
+	  }
+	  if ((ahc->features & AHC_MORE_SRAM) != 0) {
 		for (i = 0x70; i < 0x7f; i++) {
 			if (((i % 8) == 0) && (i != 0)) {
-				printf ("\n              ");
+				sprintf(&tmp_buf[strlen(tmp_buf)],
+					"\n              ");
 			}
-			printf (" 0x%x", ahc_inb(ahc, i));
+			sprintf (&tmp_buf[strlen(tmp_buf)]," 0x%x", ahc_inb(ahc, i));
 		}
 	}
-	printf ("\n");
+	printf(KERN_DEBUG "Scratch Ram: %s\n",tmp_buf);
 	/*
 	 * Reading uninitialized scratch ram may
 	 * generate parity errors.
@@ -4457,14 +4460,14 @@
 	 * data for any target mode initiator.
 	 */
 	if (ahc_alloc_tstate(ahc, ahc->our_id, 'A') == NULL) {
-		printf("%s: unable to allocate ahc_tmode_tstate.  "
+		printf(KERN_ERR "%s: unable to allocate ahc_tmode_tstate.  "
 		       "Failing attach\n", ahc_name(ahc));
 		return (ENOMEM);
 	}
 
 	if ((ahc->features & AHC_TWIN) != 0) {
 		if (ahc_alloc_tstate(ahc, ahc->our_id_b, 'B') == NULL) {
-			printf("%s: unable to allocate ahc_tmode_tstate.  "
+			printf(KERN_ERR "%s: unable to allocate ahc_tmode_tstate.  "
 			       "Failing attach\n", ahc_name(ahc));
 			return (ENOMEM);
 		}
@@ -4481,7 +4484,7 @@
 
 #ifdef AHC_DEBUG
 	if (ahc_debug & AHC_SHOWMISC) {
-		printf("%s: hardware scb %d bytes; kernel scb %d bytes; "
+		printf(KERN_DEBUG "%s: hardware scb %d bytes; kernel scb %d bytes; "
 		       "ahc_dma %d bytes\n",
 			ahc_name(ahc),
 			sizeof(struct hardware_scb),
@@ -4542,7 +4545,7 @@
 
 	/* Grab the disconnection disable table and invert it for our needs */
 	if ((ahc->flags & AHC_USEDEFAULTS) != 0) {
-		printf("%s: Host Adapter Bios disabled.  Using default SCSI "
+		printf(KERN_INFO "%s: Host Adapter Bios disabled.  Using default SCSI "
 			"device parameters\n", ahc_name(ahc));
 		ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B|
 			      AHC_TERM_ENB_A|AHC_TERM_ENB_B;
@@ -4761,7 +4764,7 @@
 	 * in "fast" mode.
 	 */
 	if (bootverbose)
-		printf("%s: Downloading Sequencer Program...",
+		printf(KERN_DEBUG "%s: Downloading Sequencer Program...",
 		       ahc_name(ahc));
 
 	ahc_loadseq(ahc);
@@ -4828,7 +4831,7 @@
 		maxloops--;
 	} while (((intstat = ahc_inb(ahc, INTSTAT)) & INT_PEND) && --maxloops);
 	if (maxloops == 0) {
-		printf("Infinite interrupt loop, INTSTAT = %x",
+		printf(KERN_ERR "Infinite interrupt loop, INTSTAT = %x",
 		      ahc_inb(ahc, INTSTAT));
 	}
 	ahc_platform_flushwork(ahc);
@@ -5219,7 +5222,7 @@
 	while (qinpos != qintail) {
 		scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]);
 		if (scb == NULL) {
-			printf("qinpos = %d, SCB index = %d\n",
+			printf(KERN_CRIT "qinpos = %d, SCB index = %d\n",
 				qinpos, ahc->qinfifo[qinpos]);
 			panic("Loop 1\n");
 		}
@@ -5242,7 +5245,7 @@
 				if (cstat != CAM_REQ_CMP)
 					ahc_freeze_scb(scb);
 				if ((scb->flags & SCB_ACTIVE) == 0)
-					printf("Inactive SCB in qinfifo\n");
+					printf(KERN_WARNING "Inactive SCB in qinfifo\n");
 				ahc_done(ahc, scb);
 
 				/* FALLTHROUGH */
@@ -5285,7 +5288,7 @@
 		scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]);
 
 		if (scb == NULL) {
-			printf("found = %d, qinstart = %d, qinfifionext = %d\n",
+			printf(KERN_CRIT "found = %d, qinstart = %d, qinfifionext = %d\n",
 				found, qinstart, ahc->qinfifonext);
 			panic("First/Second Qinfifo fixup\n");
 		}
@@ -5323,7 +5326,7 @@
 		ahc_outb(ahc, SCBPTR, next);
 		scb_index = ahc_inb(ahc, SCB_TAG);
 		if (scb_index >= ahc->scb_data->numscbs) {
-			printf("Waiting List inconsistency. "
+			printf(KERN_CRIT "Waiting List inconsistency. "
 			       "SCB index == %d, yet numscbs == %d.",
 			       scb_index, ahc->scb_data->numscbs);
 			ahc_dump_card_state(ahc);
@@ -5331,7 +5334,7 @@
 		}
 		scb = ahc_lookup_scb(ahc, scb_index);
 		if (scb == NULL) {
-			printf("scb_index = %d, next = %d\n",
+			printf(KERN_CRIT "scb_index = %d, next = %d\n",
 				scb_index, next);
 			panic("Waiting List traversal\n");
 		}
@@ -5355,7 +5358,7 @@
 				if (cstat != CAM_REQ_CMP)
 					ahc_freeze_scb(scb);
 				if ((scb->flags & SCB_ACTIVE) == 0)
-					printf("Inactive SCB in Waiting List\n");
+					printf(KERN_WARNING "Inactive SCB in Waiting List\n");
 				ahc_done(ahc, scb);
 				/* FALLTHROUGH */
 			}
@@ -5462,7 +5465,7 @@
 				if (cstat != CAM_REQ_CMP)
 					ahc_freeze_scb(scb);
 				if ((scb->flags & SCB_ACTIVE) == 0)
-					printf("Inactive SCB in untaggedQ\n");
+					printf(KERN_WARNING "Inactive SCB in untaggedQ\n");
 				ahc_done(ahc, scb);
 				break;
 			}
@@ -5508,7 +5511,7 @@
 		ahc_outb(ahc, SCBPTR, next);
 		scb_index = ahc_inb(ahc, SCB_TAG);
 		if (scb_index >= ahc->scb_data->numscbs) {
-			printf("Disconnected List inconsistency. "
+			printf(KERN_CRIT "Disconnected List inconsistency. "
 			       "SCB index == %d, yet numscbs == %d.",
 			       scb_index, ahc->scb_data->numscbs);
 			ahc_dump_card_state(ahc);
@@ -5764,7 +5767,7 @@
 			if (ahc_get_transaction_status(scbp) != CAM_REQ_CMP)
 				ahc_freeze_scb(scbp);
 			if ((scbp->flags & SCB_ACTIVE) == 0)
-				printf("Inactive SCB on pending list\n");
+				printf(KERN_WARNING "Inactive SCB on pending list\n");
 			ahc_done(ahc, scbp);
 			found++;
 		}
@@ -6044,7 +6047,7 @@
 #ifdef AHC_DEBUG
 	if ((ahc_debug & AHC_SHOWMISC) != 0) {
 		ahc_print_path(ahc, scb);
-		printf("Handled Residual of %d bytes\n", resid);
+		printf(KERN_DEBUG "Handled Residual of %d bytes\n", resid);
 	}
 #endif
 }
@@ -6083,7 +6086,7 @@
 
 	if (pending == AHC_TMODE_EVENT_BUFFER_SIZE) {
 		xpt_print_path(lstate->path);
-		printf("immediate event %x:%x lost\n",
+		printf(KERN_WARNING "immediate event %x:%x lost\n",
 		       lstate->event_buffer[lstate->event_r_idx].event_type,
 		       lstate->event_buffer[lstate->event_r_idx].event_arg);
 		lstate->event_r_idx++;
@@ -6161,7 +6164,7 @@
 		uint8_t ins_bytes[4];
 
 		ahc_insb(ahc, SEQRAM, ins_bytes, 4);
-		printf("0x%08x\n", ins_bytes[0] << 24
+		printf(KERN_DEBUG "0x%08x\n", ins_bytes[0] << 24
 				 | ins_bytes[1] << 16
 				 | ins_bytes[2] << 8
 				 | ins_bytes[3]);
@@ -6260,7 +6263,7 @@
 	ahc_restart(ahc);
 
 	if (bootverbose)
-		printf(" %d instructions downloaded\n", downloaded);
+		printf(KERN_DEBUG " %d instructions downloaded\n", downloaded);
 }
 
 static int
@@ -6442,34 +6445,34 @@
 	saved_scbptr = ahc_inb(ahc, SCBPTR);
 
 	last_phase = ahc_inb(ahc, LASTPHASE);
-	printf("%s: Dumping Card State %s, at SEQADDR 0x%x\n",
+	printf(KERN_DEBUG "%s: Dumping Card State %s, at SEQADDR 0x%x\n",
 	       ahc_name(ahc), ahc_lookup_phase_entry(last_phase)->phasemsg,
 	       ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
-	printf("ACCUM = 0x%x, SINDEX = 0x%x, DINDEX = 0x%x, ARG_2 = 0x%x\n",
+	printf(KERN_DEBUG "ACCUM = 0x%x, SINDEX = 0x%x, DINDEX = 0x%x, ARG_2 = 0x%x\n",
 	       ahc_inb(ahc, ACCUM), ahc_inb(ahc, SINDEX), ahc_inb(ahc, DINDEX),
 	       ahc_inb(ahc, ARG_2));
-	printf("HCNT = 0x%x SCBPTR = 0x%x\n", ahc_inb(ahc, HCNT),
+	printf(KERN_DEBUG "HCNT = 0x%x SCBPTR = 0x%x\n", ahc_inb(ahc, HCNT),
 	       ahc_inb(ahc, SCBPTR));
-	printf("SCSISEQ = 0x%x, SBLKCTL = 0x%x\n",
+	printf(KERN_DEBUG "SCSISEQ = 0x%x, SBLKCTL = 0x%x\n",
 	       ahc_inb(ahc, SCSISEQ), ahc_inb(ahc, SBLKCTL));
-	printf(" DFCNTRL = 0x%x, DFSTATUS = 0x%x\n",
+	printf(KERN_DEBUG " DFCNTRL = 0x%x, DFSTATUS = 0x%x\n",
 	       ahc_inb(ahc, DFCNTRL), ahc_inb(ahc, DFSTATUS));
-	printf("LASTPHASE = 0x%x, SCSISIGI = 0x%x, SXFRCTL0 = 0x%x\n",
+	printf(KERN_DEBUG "LASTPHASE = 0x%x, SCSISIGI = 0x%x, SXFRCTL0 = 0x%x\n",
 	       last_phase, ahc_inb(ahc, SCSISIGI), ahc_inb(ahc, SXFRCTL0));
-	printf("SSTAT0 = 0x%x, SSTAT1 = 0x%x\n",
+	printf(KERN_DEBUG "SSTAT0 = 0x%x, SSTAT1 = 0x%x\n",
 	       ahc_inb(ahc, SSTAT0), ahc_inb(ahc, SSTAT1));
 	if ((ahc->features & AHC_DT) != 0)
-		printf("SCSIPHASE = 0x%x\n", ahc_inb(ahc, SCSIPHASE));
-	printf("STACK == 0x%x, 0x%x, 0x%x, 0x%x\n",
+		printf(KERN_DEBUG "SCSIPHASE = 0x%x\n", ahc_inb(ahc, SCSIPHASE));
+	printf(KERN_DEBUG "STACK == 0x%x, 0x%x, 0x%x, 0x%x\n",
 		ahc_inb(ahc, STACK) | (ahc_inb(ahc, STACK) << 8),
 		ahc_inb(ahc, STACK) | (ahc_inb(ahc, STACK) << 8),
 		ahc_inb(ahc, STACK) | (ahc_inb(ahc, STACK) << 8),
 		ahc_inb(ahc, STACK) | (ahc_inb(ahc, STACK) << 8));
-	printf("SCB count = %d\n", ahc->scb_data->numscbs);
-	printf("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag);
-	printf("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB));
+	printf(KERN_DEBUG "SCB count = %d\n", ahc->scb_data->numscbs);
+	printf(KERN_DEBUG "Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag);
+	printf(KERN_DEBUG "Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB));
 	/* QINFIFO */
-	printf("QINFIFO entries: ");
+	printf(KERN_DEBUG "QINFIFO entries: ");
 	if ((ahc->features & AHC_QUEUE_REGS) != 0) {
 		qinpos = ahc_inb(ahc, SNSCB_QOFF);
 		ahc_outb(ahc, SNSCB_QOFF, qinpos);
@@ -6482,7 +6485,7 @@
 	}
 	printf("\n");
 
-	printf("Waiting Queue entries: ");
+	printf(KERN_DEBUG "Waiting Queue entries: ");
 	scb_index = ahc_inb(ahc, WAITING_SCBH);
 	i = 0;
 	while (scb_index != SCB_LIST_NULL && i++ < 256) {
@@ -6492,7 +6495,7 @@
 	}
 	printf("\n");
 
-	printf("Disconnected Queue entries: ");
+	printf(KERN_DEBUG "Disconnected Queue entries: ");
 	scb_index = ahc_inb(ahc, DISCONNECTED_SCBH);
 	i = 0;
 	while (scb_index != SCB_LIST_NULL && i++ < 256) {
@@ -6503,7 +6506,7 @@
 	printf("\n");
 		
 	ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD);
-	printf("QOUTFIFO entries: ");
+	printf(KERN_DEBUG "QOUTFIFO entries: ");
 	qoutpos = ahc->qoutfifonext;
 	i = 0;
 	while (ahc->qoutfifo[qoutpos] != SCB_LIST_NULL && i++ < 256) {
@@ -6512,7 +6515,7 @@
 	}
 	printf("\n");
 
-	printf("Sequencer Free SCB List: ");
+	printf(KERN_DEBUG "Sequencer Free SCB List: ");
 	scb_index = ahc_inb(ahc, FREE_SCBH);
 	i = 0;
 	while (scb_index != SCB_LIST_NULL && i++ < 256) {
@@ -6522,7 +6525,7 @@
 	}
 	printf("\n");
 
-	printf("Sequencer SCB Info: ");
+	printf(KERN_DEBUG "Sequencer SCB Info: ");
 	for (i = 0; i < ahc->scb_data->maxhscbs; i++) {
 		ahc_outb(ahc, SCBPTR, i);
 		printf("%d(c 0x%x, s 0x%x, l %d, t 0x%x) ",
@@ -6533,7 +6536,7 @@
 	}
 	printf("\n");
 
-	printf("Pending list: ");
+	printf(KERN_DEBUG "Pending list: ");
 	i = 0;
 	LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) {
 		if (i++ > 256)
@@ -6550,7 +6553,7 @@
 	}
 	printf("\n");
 
-	printf("Kernel Free SCB list: ");
+	printf(KERN_DEBUG "Kernel Free SCB list: ");
 	i = 0;
 	SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) {
 		if (i++ > 256)
@@ -6564,7 +6567,7 @@
 		untagged_q = &ahc->untagged_queues[target];
 		if (TAILQ_FIRST(untagged_q) == NULL)
 			continue;
-		printf("Untagged Q(%d): ", target);
+		printf(KERN_DEBUG "Untagged Q(%d): ", target);
 		i = 0;
 		TAILQ_FOREACH(scb, untagged_q, links.tqe) {
 			if (i++ > 256)
@@ -6688,7 +6691,7 @@
 	 && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) {
 		u_long	s;
 
-		printf("Configuring Target Mode\n");
+		printf(KERN_INFO "Configuring Target Mode\n");
 		ahc_lock(ahc, &s);
 		if (LIST_FIRST(&ahc->pending_scbs) != NULL) {
 			ccb->ccb_h.status = CAM_BUSY;
@@ -6716,7 +6719,7 @@
 		/* Are we already enabled?? */
 		if (lstate != NULL) {
 			xpt_print_path(ccb->ccb_h.path);
-			printf("Lun already enabled\n");
+			printf(KERN_WARNING "Lun already enabled\n");
 			ccb->ccb_h.status = CAM_LUN_ALRDY_ENA;
 			return;
 		}
@@ -6728,7 +6731,7 @@
 			 * specific commands.
 			 */
 			ccb->ccb_h.status = CAM_REQ_INVALID;
-			printf("Non-zero Group Codes\n");
+			printf(KERN_ERR "Non-zero Group Codes\n");
 			return;
 		}
 
@@ -6740,7 +6743,7 @@
 			tstate = ahc_alloc_tstate(ahc, target, channel);
 			if (tstate == NULL) {
 				xpt_print_path(ccb->ccb_h.path);
-				printf("Couldn't allocate tstate\n");
+				printf(KERN_ERR "Couldn't allocate tstate\n");
 				ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
 				return;
 			}
@@ -6748,7 +6751,7 @@
 		lstate = malloc(sizeof(*lstate), M_DEVBUF, M_NOWAIT);
 		if (lstate == NULL) {
 			xpt_print_path(ccb->ccb_h.path);
-			printf("Couldn't allocate lstate\n");
+			printf(KERN_ERR "Couldn't allocate lstate\n");
 			ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
 			return;
 		}
@@ -6760,7 +6763,7 @@
 		if (status != CAM_REQ_CMP) {
 			free(lstate, M_DEVBUF);
 			xpt_print_path(ccb->ccb_h.path);
-			printf("Couldn't allocate path\n");
+			printf(KERN_ERR "Couldn't allocate path\n");
 			ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
 			return;
 		}
@@ -6835,7 +6838,7 @@
 		ahc_unlock(ahc, &s);
 		ccb->ccb_h.status = CAM_REQ_CMP;
 		xpt_print_path(ccb->ccb_h.path);
-		printf("Lun now enabled for target mode\n");
+		printf(KERN_INFO "Lun now enabled for target mode\n");
 	} else {
 		struct scb *scb;
 		int i, empty;
@@ -6854,7 +6857,7 @@
 			ccbh = &scb->io_ctx->ccb_h;
 			if (ccbh->func_code == XPT_CONT_TARGET_IO
 			 && !xpt_path_comp(ccbh->path, ccb->ccb_h.path)){
-				printf("CTIO pending\n");
+				printf(KERN_WARNING "CTIO pending\n");
 				ccb->ccb_h.status = CAM_REQ_INVALID;
 				ahc_unlock(ahc, &s);
 				return;
@@ -6862,12 +6865,12 @@
 		}
 
 		if (SLIST_FIRST(&lstate->accept_tios) != NULL) {
-			printf("ATIOs pending\n");
+			printf(KERN_WARNING "ATIOs pending\n");
 			ccb->ccb_h.status = CAM_REQ_INVALID;
 		}
 
 		if (SLIST_FIRST(&lstate->immed_notifies) != NULL) {
-			printf("INOTs pending\n");
+			printf(KERN_WARNING "INOTs pending\n");
 			ccb->ccb_h.status = CAM_REQ_INVALID;
 		}
 
@@ -6877,7 +6880,7 @@
 		}
 
 		xpt_print_path(ccb->ccb_h.path);
-		printf("Target mode disabled\n");
+		printf(KERN_INFO "Target mode disabled\n");
 		xpt_free_path(lstate->path);
 		free(lstate, M_DEVBUF);
 
@@ -6931,7 +6934,7 @@
 			ahc_outb(ahc, SCSISEQ, scsiseq);
 
 			if ((ahc->features & AHC_MULTIROLE) == 0) {
-				printf("Configuring Initiator Mode\n");
+				printf(KERN_INFO "Configuring Initiator Mode\n");
 				ahc->flags &= ~AHC_TARGETROLE;
 				ahc->flags |= AHC_INITIATORROLE;
 				ahc_pause(ahc);
@@ -7075,7 +7078,7 @@
 	} else
 		ahc->flags &= ~AHC_TQINFIFO_BLOCKED;
 #if 0
-	printf("Incoming command from %d for %d:%d%s\n",
+	printf(KERN_INFO "Incoming command from %d for %d:%d%s\n",
 	       initiator, target, lun,
 	       lstate == ahc->black_hole ? "(Black Holed)" : "");
 #endif
@@ -7122,7 +7125,7 @@
 	default:
 		/* Only copy the opcode. */
 		atio->cdb_len = 1;
-		printf("Reserved or VU command code type encountered\n");
+		printf(KERN_WARNING "Reserved or VU command code type encountered\n");
 		break;
 	}
 	
@@ -7138,7 +7141,7 @@
 		 * to this accept tio.
 		 */
 #if 0
-		printf("Received Immediate Command %d:%d:%d - %p\n",
+		printf(KERN_WARNING "Received Immediate Command %d:%d:%d - %p\n",
 		       initiator, target, lun, ahc->pending_device);
 #endif
 		ahc->pending_device = lstate;
--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7xxx_93cx6.c	Fri Aug  2 20:39:44 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_93cx6.c	Wed Sep 25 13:33:50 2002
@@ -202,14 +202,19 @@
 		reset_seeprom(sd);
 	}
 #ifdef AHC_DUMP_EEPROM
-	printf("\nSerial EEPROM:\n\t");
-	for (k = 0; k < count; k = k + 1) {
-		if (((k % 8) == 0) && (k != 0)) {
-			printf ("\n\t");
-		}
-		printf (" 0x%x", buf[k]);
+        {
+          char tmp_buf[2048];
+          if (count > 2048) count=2048;
+
+          memset(tmp_buf,0,2048);
+          for (k = 0; k < count; k = k + 1) {
+                if (((k % 8) == 0) && (k != 0)) {
+                        sprintf( &tmp_buf[strlen(tmp_buf)], "\n\t");
+                }
+                sprintf (&tmp_buf[strlen(tmp_buf)], " 0x%x", buf[k]);
+          }
+          printf(KERN_INFO "\nSerial EEPROM:\n\t %s\n",tmp_buf); 
 	}
-	printf ("\n");
 #endif
 	return (1);
 }
--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7xxx_osm.c	Wed Sep 25 13:28:27 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_osm.c	Wed Sep 25 14:02:41 2002
@@ -288,7 +288,7 @@
 void
 ahc_print_path(struct ahc_softc *ahc, struct scb *scb)
 {
-	printk("(scsi%d:%c:%d:%d): ",
+	printf(KERN_NOTICE "(scsi%d:%c:%d:%d): ",
 	       ahc->platform_data->host->host_no,
 	       scb != NULL ? SCB_GET_CHANNEL(ahc, scb) : 'X',
 	       scb != NULL ? SCB_GET_TARGET(ahc, scb) : -1,
@@ -672,7 +672,7 @@
 			struct	 ahc_dma_seg *next_sg;
 			uint32_t next_len;
 
-			printf("Crossed Seg\n");
+			printf(KERN_INFO "Crossed Seg\n");
 			if ((scb->sg_count + 2) > AHC_NSEG)
 				panic("Too few segs for dma mapping.  "
 				      "Increase AHC_NSEG\n");
@@ -1124,8 +1124,8 @@
 	 */
 	if (offsetof(struct ahc_cmd_internal, end)
 	  > offsetof(struct scsi_cmnd, host_scribble)) {
-		printf("ahc_linux_detect: SCSI data structures changed.\n");
-		printf("ahc_linux_detect: Unable to attach\n");
+		printf(KERN_ERR "ahc_linux_detect: SCSI data structures changed.\n");
+		printf(KERN_ERR "ahc_linux_detect: Unable to attach\n");
 		return (0);
 	}
 #ifdef MODULE
@@ -1135,7 +1135,7 @@
 	if (aic7xxx)
 		aic7xxx_setup(aic7xxx);
 	if (dummy_buffer[0] != 'P')
-		printk(KERN_WARNING
+		printf(KERN_WARNING
 "aic7xxx: Please read the file /usr/src/linux/drivers/scsi/README.aic7xxx\n"
 "aic7xxx: to see the proper way to specify options to the aic7xxx module\n"
 "aic7xxx: Specifically, don't use any commas when passing arguments to\n"
@@ -1575,10 +1575,10 @@
 		if (warned_user == 0
 		 && ahc->unit >= NUM_ELEMENTS(aic7xxx_tag_info)) {
 
-			printf("aic7xxx: WARNING, insufficient "
+			printf(KERN_WARNING "aic7xxx: WARNING, insufficient "
 			       "tag_info instances for installed "
 			       "controllers. Using defaults\n");
-			printf("aic7xxx: Please update the "
+			printf(KERN_WARNING "aic7xxx: Please update the "
 			       "aic7xxx_tag_info array in the "
 			       "aic7xxx.c source file.\n");
 			tags = AHC_MAX_QUEUE;
@@ -1615,7 +1615,7 @@
 
 		device->queue_depth = tags;
 		ahc_set_tags(ahc, &devinfo, AHC_QUEUE_TAGGED);
-		printf("scsi%d:%c:%d:%d: Tagged Queuing enabled.  Depth %d\n",
+		printf(KERN_INFO "scsi%d:%c:%d:%d: Tagged Queuing enabled.  Depth %d\n",
 	       	       ahc->platform_data->host->host_no, devinfo.channel,
 		       devinfo.target, devinfo.lun, tags);
 	} else {
@@ -1651,7 +1651,7 @@
 				   cmd->lun, /*alloc*/TRUE);
 	if (dev == NULL) {
 		ahc_unlock(ahc, &flags);
-		printf("aic7xxx_linux_queue: Unable to allocate device!\n");
+		printf(KERN_ERR "aic7xxx_linux_queue: Unable to allocate device!\n");
 		return (-ENOMEM);
 	}
 	cmd->result = CAM_REQ_INPROG << 16;
@@ -2020,6 +2020,7 @@
 	case AC_TRANSFER_NEG:
 	{
 		char	buf[80];
+		char	tmp_buf[64];
 		struct	ahc_linux_target *targ;
 		struct	info_str info;
 		struct	ahc_initiator_tinfo *tinfo;
@@ -2068,17 +2069,17 @@
 		targ->last_tinfo.offset = tinfo->curr.offset;
 		targ->last_tinfo.ppr_options = tinfo->curr.ppr_options;
 
-		printf("(%s:%c:", ahc_name(ahc), channel);
+		sprintf(tmp_buf,"(%s:%c:", ahc_name(ahc), channel);
 		if (target == CAM_TARGET_WILDCARD)
-			printf("*): ");
+			sprintf(&tmp_buf[strlen(tmp_buf)], "*): ");
 		else
-			printf("%d): ", target);
+			sprintf(&tmp_buf[strlen(tmp_buf)], "%d): ", target);
 		ahc_format_transinfo(&info, &tinfo->curr);
 		if (info.pos < info.length)
 			*info.buffer = '\0';
 		else
 			buf[info.length - 1] = '\0';
-		printf("%s", buf);
+		printf(KERN_INFO "%s %s", tmp_buf,buf);
 		break;
 	}
         case AC_SENT_BDR:
@@ -2123,7 +2124,7 @@
 	}
 
 	if ((scb->flags & SCB_ACTIVE) == 0) {
-		printf("SCB %d done'd twice\n", scb->hscb->tag);
+		printf(KERN_CRIT "SCB %d done'd twice\n", scb->hscb->tag);
 		ahc_dump_card_state(ahc);
 		panic("SCB %d done'd twice, stopping.",scb->hscb->tag);
 	}
@@ -2152,7 +2153,7 @@
 		amount_xferred =
 		    ahc_get_transfer_length(scb) - ahc_get_residual(scb);
 		if (amount_xferred < scb->io_ctx->underflow) {
-			printf("Saw underflow (%ld of %ld bytes). "
+			printf(KERN_ERR "Saw underflow (%ld of %ld bytes). "
 			       "Treated as error\n",
 				ahc_get_residual(scb),
 				ahc_get_transfer_length(scb));
@@ -2203,7 +2204,7 @@
 	}
 
 	if ((scb->flags & SCB_RECOVERY_SCB) != 0) {
-		printf("Recovery SCB completes\n");
+		printf(KERN_INFO "Recovery SCB completes\n");
 		up(&ahc->platform_data->eh_sem);
 	}
 
@@ -2247,7 +2248,7 @@
 			dev->openings = 0;
 /*
 			ahc_print_path(ahc, scb);
-			printf("Dropping tag count to %d\n", dev->active);
+			printf(KERN_INFO "Dropping tag count to %d\n", dev->active);
  */
 			if (dev->active == dev->tags_on_last_queuefull) {
 
@@ -2264,7 +2265,7 @@
 				 == AHC_LOCK_TAGS_COUNT) {
 					dev->maxtags = dev->active;
 					ahc_print_path(ahc, scb);
-					printf("Locking max tag count at %d\n",
+					printf(KERN_INFO "Locking max tag count at %d\n",
 					       dev->active);
 				}
 			} else {
@@ -2342,7 +2343,7 @@
 			break;
 
 		if (cmd->use_sg != 0) {
-			printf("%s: SG Inquiry response ignored\n",
+			printf(KERN_INFO "%s: SG Inquiry response ignored\n",
 			       ahc_name(ahc));
 			break;
 		}
@@ -2568,7 +2569,7 @@
 	ahc = *(struct ahc_softc **)cmd->host->hostdata;
 	acmd = (struct ahc_cmd *)cmd;
 
-	printf("%s:%d:%d:%d: Attempting to queue a%s message\n",
+	printf(KERN_NOTICE "%s:%d:%d:%d: Attempting to queue a%s message\n",
 	       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun,
 	       flag == SCB_ABORT ? "n ABORT" : " TARGET RESET");
 
@@ -2595,7 +2596,7 @@
 		 * No target device for this command exists,
 		 * so we must not still own the command.
 		 */
-		printf("%s:%d:%d:%d: Is not an active device\n",
+		printf(KERN_NOTICE "%s:%d:%d:%d: Is not an active device\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		retval = SUCCESS;
 		goto no_cmd;
@@ -2607,7 +2608,7 @@
 	}
 
 	if (list_acmd != NULL) {
-		printf("%s:%d:%d:%d: Command found on device queue\n",
+		printf(KERN_ERR "%s:%d:%d:%d: Command found on device queue\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		if (flag == SCB_ABORT) {
 			TAILQ_REMOVE(&dev->busyq, list_acmd, acmd_links.tqe);
@@ -2648,7 +2649,7 @@
 	}
 
 	if (pending_scb == NULL) {
-		printf("%s:%d:%d:%d: Command not found\n",
+		printf(KERN_ERR "%s:%d:%d:%d: Command not found\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		goto no_cmd;
 	}
@@ -2684,7 +2685,7 @@
 	ahc_dump_card_state(ahc);
 
 	if ((pending_scb->flags & SCB_ACTIVE) == 0) {
-		printf("%s:%d:%d:%d: Command already completed\n",
+		printf(KERN_WARNING "%s:%d:%d:%d: Command already completed\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		goto no_cmd;
 	}
@@ -2695,7 +2696,7 @@
 				       cmd->lun, pending_scb->hscb->tag,
 				       ROLE_INITIATOR, CAM_REQ_ABORTED,
 				       SEARCH_COMPLETE) > 0) {
-			printf("%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
+			printf(KERN_WARNING "%s:%d:%d:%d: Cmd aborted from QINFIFO\n",
 			       ahc_name(ahc), cmd->channel, cmd->target,
 					cmd->lun);
 			retval = SUCCESS;
@@ -2744,7 +2745,7 @@
 		pending_scb->flags |= SCB_RECOVERY_SCB|flag;
 		ahc_outb(ahc, MSG_OUT, HOST_MSG);
 		ahc_outb(ahc, SCSISIGO, last_phase|ATNO);
-		printf("%s:%d:%d:%d: Device is active, asserting ATN\n",
+		printf(KERN_NOTICE "%s:%d:%d:%d: Device is active, asserting ATN\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		wait = TRUE;
 	} else if (disconnected) {
@@ -2803,14 +2804,14 @@
 				   cmd->lun, SCB_LIST_NULL, ROLE_INITIATOR,
 				   CAM_REQUEUE_REQ, SEARCH_COMPLETE);
 		ahc_print_path(ahc, pending_scb);
-		printf("Queuing a recovery SCB\n");
+		printf(KERN_NOTICE "Queuing a recovery SCB\n");
 		ahc_qinfifo_requeue_tail(ahc, pending_scb);
 		ahc_outb(ahc, SCBPTR, saved_scbptr);
-		printf("%s:%d:%d:%d: Device is disconnected, re-queuing SCB\n",
+		printf(KERN_WARNING "%s:%d:%d:%d: Device is disconnected, re-queuing SCB\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		wait = TRUE;
 	} else {
-		printf("%s:%d:%d:%d: Unable to deliver message\n",
+		printf(KERN_ERR "%s:%d:%d:%d: Unable to deliver message\n",
 		       ahc_name(ahc), cmd->channel, cmd->target, cmd->lun);
 		retval = FAILED;
 		goto done;
@@ -2837,12 +2838,12 @@
 		timer.expires = jiffies + (5 * HZ);
 		timer.function = ahc_linux_sem_timeout;
 		add_timer(&timer);
-		printf("Recovery code sleeping\n");
+		printf(KERN_NOTICE "Recovery code sleeping\n");
 		down(&ahc->platform_data->eh_sem);
-		printf("Recovery code awake\n");
+		printf(KERN_NOTICE "Recovery code awake\n");
         	ret = del_timer(&timer);
 		if (ret == 0) {
-			printf("Timer Expired\n");
+			printf(KERN_NOTICE "Timer Expired\n");
 			retval = FAILED;
 		}
 		ahc_lock(ahc, &s);
@@ -2867,7 +2868,7 @@
 
 	error = ahc_linux_queue_recovery_cmd(cmd, SCB_ABORT);
 	if (error != 0)
-		printf("aic7xxx_abort returns 0x%x\n", error);
+		printf(KERN_ERR "aic7xxx_abort returns 0x%x\n", error);
 	return (error);
 }
 
@@ -2881,7 +2882,7 @@
 
 	error = ahc_linux_queue_recovery_cmd(cmd, SCB_DEVICE_RESET);
 	if (error != 0)
-		printf("aic7xxx_dev_reset returns 0x%x\n", error);
+		printf(KERN_ERR "aic7xxx_dev_reset returns 0x%x\n", error);
 	return (error);
 }
 
@@ -2910,7 +2911,7 @@
 	TAILQ_INIT(&ahc->platform_data->completeq);
 	ahc_unlock(ahc, &s);
 	if (bootverbose)
-		printf("%s: SCSI bus reset delivered. "
+		printf(KERN_DEBUG "%s: SCSI bus reset delivered. "
 		       "%d SCBs aborted.\n", ahc_name(ahc), found);
 
 	if (acmd != NULL)
@@ -3026,7 +3027,7 @@
 				if (dev == NULL)
 					continue;
 
-				printf("DevQ(%d:%d:%d): ",
+				printf(KERN_INFO "DevQ(%d:%d:%d): ",
 				       channel, target, lun);
 				i = 0;
 				TAILQ_FOREACH(acmd, &dev->busyq,
@@ -3034,7 +3035,7 @@
 					if (i++ > AHC_SCB_MAX)
 						break;
 				}
-				printf("%d waiting\n", i);
+				printf( "%d waiting\n", i);
 			}
 		}
 	}
--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	Fri Aug  2 20:39:44 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c	Wed Sep 25 14:04:07 2002
@@ -316,7 +316,7 @@
 		 */
 		if (ahc_inb(ahc, HCNTRL) == 0xFF) {
 
-			printf("aic7xxx: PCI Device %d:%d:%d "
+			printf(KERN_WARNING "aic7xxx: PCI Device %d:%d:%d "
 			       "failed memory mapped test\n",
 			       ahc_get_pci_bus(ahc->dev_softc),
 			       ahc_get_pci_slot(ahc->dev_softc),
@@ -331,7 +331,7 @@
 		} else
 			command |= PCIM_CMD_MEMEN;
 	} else {
-		printf("aic7xxx: PCI%d:%d:%d MEM region 0x%lx "
+		printf(KERN_WARNING "aic7xxx: PCI%d:%d:%d MEM region 0x%lx "
 		       "unavailable. Cannot memory map device.\n",
 		       ahc_get_pci_bus(ahc->dev_softc),
 		       ahc_get_pci_slot(ahc->dev_softc),
@@ -351,7 +351,7 @@
 			ahc->bsh.ioport = base;
 			command |= PCIM_CMD_PORTEN;
 		} else {
-			printf("aic7xxx: PCI%d:%d:%d IO region 0x%lx[0..255] "
+			printf(KERN_WARNING "aic7xxx: PCI%d:%d:%d IO region 0x%lx[0..255] "
 			       "unavailable. Cannot map device.\n",
 			       ahc_get_pci_bus(ahc->dev_softc),
 			       ahc_get_pci_slot(ahc->dev_softc),
--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7xxx_osm.h	Fri Aug  2 20:39:44 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_osm.h	Wed Sep 25 14:07:11 2002
@@ -606,7 +606,28 @@
 };
 
 /************************** OS Utility Wrappers *******************************/
+// #define printf printk
+#ifdef CONFIG_EVLOG
+#include <linux/evl_log.h>
+#define LOG_AIC7XXX 1001     /* event ids */
+#define LOG_SCSIMOD 1011
+#define LOG_RAIDMD  1021
+
+static inline int
+evl_xlate_kseva(const char *kstr)
+{
+       int n;
+       if (kstr == NULL) n = LOG_INFO;
+       else { n = kstr[1] - '0';  /* assumes "<n>" prefix */
+              if (n > 7) n = LOG_INFO; }
+       return (n);
+}
+#define printf(fmt, ...) \
+(evl_xlate_kseva(fmt) >= LOG_INFO ? printk(fmt, ## __VA_ARGS__) : posix_log_printf(LOG_KERN, LOG_AIC7XXX, evl_xlate_kseva(fmt), 0, fmt, ## __VA_ARGS__))
+#else
 #define printf printk
+#endif /* CONFIG_EVLOG */      
+
 #define M_NOWAIT GFP_ATOMIC
 #define M_WAITOK 0
 #define malloc(size, type, flags) kmalloc(size, flags)
--- linux-2.4.19-orig/drivers/scsi/aic7xxx/aic7xxx_pci.c	Fri Aug  2 20:39:44 2002
+++ linux-2.4.19/drivers/scsi/aic7xxx/aic7xxx_pci.c	Wed Sep 25 13:34:34 2002
@@ -813,7 +813,7 @@
 		uint32_t devconfig;
 
 		if (bootverbose)
-			printf("%s: Enabling 39Bit Addressing\n",
+			printf(KERN_DEBUG "%s: Enabling 39Bit Addressing\n",
 			       ahc_name(ahc));
 		devconfig = ahc_pci_read_config(ahc->dev_softc,
 						DEVCONFIG, /*bytes*/4);
@@ -942,7 +942,7 @@
 		 */
 		/* See if someone else set us up already */
 		if (scsiseq != 0) {
-			printf("%s: Using left over BIOS settings\n",
+			printf(KERN_INFO "%s: Using left over BIOS settings\n",
 				ahc_name(ahc));
 			ahc->flags &= ~AHC_USEDEFAULTS;
 			ahc->flags |= AHC_BIOS_ENABLED;
@@ -1186,7 +1186,7 @@
 	ahc_outb(ahc, CLRINT, CLRPARERR);
 	ahc_outb(ahc, CLRINT, CLRBRKADRINT);
 	if (bootverbose && enable) {
-		printf("%s: External SRAM, %s access%s, %dbytes/SCB\n",
+		printf(KERN_DEBUG "%s: External SRAM, %s access%s, %dbytes/SCB\n",
 		       ahc_name(ahc), fast ? "fast" : "slow", 
 		       pcheck ? ", parity checking enabled" : "",
 		       large ? 64 : 32);
@@ -1234,7 +1234,7 @@
 	if (have_seeprom) {
 
 		if (bootverbose) 
-			printf("%s: Reading SEEPROM...", ahc_name(ahc));
+			printf(KERN_DEBUG "%s: Reading SEEPROM...", ahc_name(ahc));
 
 		for (;;) {
 			u_int start_addr;
@@ -1251,9 +1251,9 @@
 			if (have_seeprom != 0 || sd.sd_chip == C56_66) {
 				if (bootverbose) {
 					if (have_seeprom == 0)
-						printf ("checksum error\n");
+						printf(KERN_DEBUG "checksum error\n");
 					else
-						printf ("done.\n");
+						printf(KERN_DEBUG "done.\n");
 				}
 				break;
 			}
@@ -1301,7 +1301,7 @@
 
 	if (!have_seeprom) {
 		if (bootverbose)
-			printf("%s: No SEEPROM available.\n", ahc_name(ahc));
+			printf(KERN_DEBUG "%s: No SEEPROM available.\n", ahc_name(ahc));
 		ahc->flags |= AHC_USEDEFAULTS;
 		free(ahc->seep_config, M_DEVBUF);
 		ahc->seep_config = NULL;
@@ -1507,7 +1507,7 @@
 					    &eeprom_present);
 			if ((adapter_control & CFSEAUTOTERM) == 0) {
 				if (bootverbose)
-					printf("%s: Manual SE Termination\n",
+					printf(KERN_DEBUG "%s: Manual SE Termination\n",
 					       ahc_name(ahc));
 				enableSEC_low = (adapter_control & CFSELOWTERM);
 				enableSEC_high =
@@ -1515,7 +1515,7 @@
 			}
 			if ((adapter_control & CFAUTOTERM) == 0) {
 				if (bootverbose)
-					printf("%s: Manual LVD Termination\n",
+					printf(KERN_DEBUG "%s: Manual LVD Termination\n",
 					       ahc_name(ahc));
 				enablePRI_low = (adapter_control & CFSTERM);
 				enablePRI_high = (adapter_control & CFWSTERM);
@@ -1540,19 +1540,19 @@
 
 		if (bootverbose
 		 && (ahc->features & AHC_ULTRA2) == 0) {
-			printf("%s: internal 50 cable %s present",
+			printf(KERN_DEBUG "%s: internal 50 cable %s present",
 			       ahc_name(ahc),
 			       internal50_present ? "is":"not");
 
 			if ((ahc->features & AHC_WIDE) != 0)
-				printf(", internal 68 cable %s present",
+				printf(KERN_DEBUG ", internal 68 cable %s present",
 				       internal68_present ? "is":"not");
-			printf("\n%s: external cable %s present\n",
+			printf(KERN_DEBUG "\n%s: external cable %s present\n",
 			       ahc_name(ahc),
 			       externalcable_present ? "is":"not");
 		}
 		if (bootverbose)
-			printf("%s: BIOS eeprom %s present\n",
+			printf(KERN_DEBUG "%s: BIOS eeprom %s present\n",
 			       ahc_name(ahc), eeprom_present ? "is" : "not");
 
 		if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) {
@@ -1578,7 +1578,7 @@
 		 && (internal50_present != 0)
 		 && (internal68_present != 0)
 		 && (externalcable_present != 0)) {
-			printf("%s: Illegal cable configuration!!. "
+			printf(KERN_ERR "%s: Illegal cable configuration!!. "
 			       "Only two connectors on the "
 			       "adapter may be used at a "
 			       "time!\n", ahc_name(ahc));
@@ -1600,10 +1600,10 @@
 			brddat |= BRDDAT6;
 			if (bootverbose) {
 				if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
-					printf("%s: 68 pin termination "
+					printf(KERN_DEBUG "%s: 68 pin termination "
 					       "Enabled\n", ahc_name(ahc));
 				else
-					printf("%s: %sHigh byte termination "
+					printf(KERN_DEBUG "%s: %sHigh byte termination "
 					       "Enabled\n", ahc_name(ahc),
 					       enableSEC_high ? "Secondary "
 							      : "");
@@ -1619,10 +1619,10 @@
 				*sxfrctl1 |= STPWEN;
 			if (bootverbose) {
 				if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0)
-					printf("%s: 50 pin termination "
+					printf(KERN_DEBUG "%s: 50 pin termination "
 					       "Enabled\n", ahc_name(ahc));
 				else
-					printf("%s: %sLow byte termination "
+					printf(KERN_DEBUG "%s: %sLow byte termination "
 					       "Enabled\n", ahc_name(ahc),
 					       enableSEC_low ? "Secondary "
 							     : "");
@@ -1632,7 +1632,7 @@
 		if (enablePRI_low != 0) {
 			*sxfrctl1 |= STPWEN;
 			if (bootverbose)
-				printf("%s: Primary Low Byte termination "
+				printf(KERN_DEBUG "%s: Primary Low Byte termination "
 				       "Enabled\n", ahc_name(ahc));
 		}
 
@@ -1645,7 +1645,7 @@
 		if (enablePRI_high != 0) {
 			brddat |= BRDDAT4;
 			if (bootverbose)
-				printf("%s: Primary High Byte "
+				printf(KERN_DEBUG "%s: Primary High Byte "
 				       "termination Enabled\n",
 				       ahc_name(ahc));
 		}
@@ -1657,7 +1657,7 @@
 			*sxfrctl1 |= STPWEN;
 
 			if (bootverbose)
-				printf("%s: %sLow byte termination Enabled\n",
+				printf(KERN_DEBUG "%s: %sLow byte termination Enabled\n",
 				       ahc_name(ahc),
 				       (ahc->features & AHC_ULTRA2) ? "Primary "
 								    : "");
@@ -1667,7 +1667,7 @@
 		 && (ahc->features & AHC_WIDE) != 0) {
 			brddat |= BRDDAT6;
 			if (bootverbose)
-				printf("%s: %sHigh byte termination Enabled\n",
+				printf(KERN_DEBUG "%s: %sHigh byte termination Enabled\n",
 				       ahc_name(ahc),
 				       (ahc->features & AHC_ULTRA2)
 				     ? "Secondary " : "");
@@ -1878,28 +1878,28 @@
 	status1 = ahc_pci_read_config(ahc->dev_softc,
 				      PCIR_STATUS + 1, /*bytes*/1);
 
-	printf("%s: PCI error Interrupt at seqaddr = 0x%x\n",
+	printf(KERN_ERR "%s: PCI error Interrupt at seqaddr = 0x%x\n",
 	      ahc_name(ahc),
 	      ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
 
 	if (status1 & DPE) {
-		printf("%s: Data Parity Error Detected during address "
+		printf(KERN_ERR "%s: Data Parity Error Detected during address "
 		       "or write data phase\n", ahc_name(ahc));
 	}
 	if (status1 & SSE) {
-		printf("%s: Signal System Error Detected\n", ahc_name(ahc));
+		printf(KERN_ERR "%s: Signal System Error Detected\n", ahc_name(ahc));
 	}
 	if (status1 & RMA) {
-		printf("%s: Received a Master Abort\n", ahc_name(ahc));
+		printf(KERN_ERR "%s: Received a Master Abort\n", ahc_name(ahc));
 	}
 	if (status1 & RTA) {
-		printf("%s: Received a Target Abort\n", ahc_name(ahc));
+		printf(KERN_ERR "%s: Received a Target Abort\n", ahc_name(ahc));
 	}
 	if (status1 & STA) {
-		printf("%s: Signaled a Target Abort\n", ahc_name(ahc));
+		printf(KERN_ERR "%s: Signaled a Target Abort\n", ahc_name(ahc));
 	}
 	if (status1 & DPR) {
-		printf("%s: Data Parity Error has been reported via PERR#\n",
+		printf(KERN_ERR "%s: Data Parity Error has been reported via PERR#\n",
 		       ahc_name(ahc));
 	}
 
@@ -1908,7 +1908,7 @@
 			     status1, /*bytes*/1);
 
 	if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) {
-		printf("%s: Latched PCIERR interrupt with "
+		printf(KERN_ERR "%s: Latched PCIERR interrupt with "
 		       "no status bits set\n", ahc_name(ahc)); 
 	} else {
 		ahc_outb(ahc, CLRINT, CLRPARERR);
@@ -2194,7 +2194,7 @@
 static int
 ahc_raid_setup(struct ahc_softc *ahc)
 {
-	printf("RAID functionality unsupported\n");
+	printf(KERN_ERR "RAID functionality unsupported\n");
 	return (ENXIO);
 }
 
@@ -2212,7 +2212,7 @@
 		ahc->channel = 'B';
 		break;
 	default:
-		printf("adapter at unexpected slot %d\n"
+		printf(KERN_ERR "adapter at unexpected slot %d\n"
 		       "unable to map to a channel\n",
 		       ahc_get_pci_slot(pci));
 		ahc->channel = 'A';
@@ -2237,7 +2237,7 @@
 		ahc->channel = 'C';
 		break;
 	default:
-		printf("adapter at unexpected slot %d\n"
+		printf(KERN_ERR "adapter at unexpected slot %d\n"
 		       "unable to map to a channel\n",
 		       ahc_get_pci_slot(pci));
 		ahc->channel = 'A';
@@ -2267,7 +2267,7 @@
 		ahc->channel = 'D';
 		break;
 	default:
-		printf("adapter at unexpected slot %d\n"
+		printf(KERN_ERR "adapter at unexpected slot %d\n"
 		       "unable to map to a channel\n",
 		       ahc_get_pci_slot(pci));
 		ahc->channel = 'A';
