--- linux-2.5.36-orig/drivers/scsi/aic7xxx/aic7770.c Tue Sep 17 20:59:20 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7770.c Tue Nov 19 09:11:31 2002 @@ -130,7 +130,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); } @@ -248,7 +248,7 @@ sd.sd_DI = DI_2840; if (bootverbose) - printf("%s: Reading SEEPROM...", ahc_name(ahc)); + printf(KERN_DEBUG "%s: Reading SEEPROM...", ahc_name(ahc)); have_seeprom = read_seeprom(&sd, (uint16_t *)&sc, /*start_addr*/0, @@ -264,16 +264,16 @@ checksum = checksum + scarray[i]; if (checksum != sc.checksum) { 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.5.36-orig/drivers/scsi/aic7xxx/aic7xxx_core.c Mon Nov 18 17:25:20 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7xxx_core.c Tue Nov 19 09:31:46 2002 @@ -316,7 +316,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); @@ -370,7 +370,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)); @@ -426,7 +426,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); @@ -455,7 +455,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: @@ -469,7 +469,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 @@ -492,7 +492,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); @@ -573,29 +573,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; @@ -608,7 +608,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; @@ -624,13 +624,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; @@ -646,7 +646,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)); @@ -657,7 +657,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)); @@ -787,18 +787,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), @@ -851,7 +851,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); @@ -871,7 +871,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; @@ -881,7 +881,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); @@ -890,12 +890,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, @@ -903,19 +903,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; @@ -963,7 +963,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; @@ -981,7 +981,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); /* @@ -997,7 +997,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); @@ -1051,10 +1051,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), @@ -1063,13 +1063,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-"); } @@ -1132,7 +1132,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 { @@ -1205,7 +1205,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, @@ -1302,13 +1302,13 @@ * 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) break; } - 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) @@ -1318,7 +1318,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); } @@ -1387,7 +1387,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"); @@ -1444,23 +1444,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), @@ -1890,13 +1890,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); } @@ -1959,7 +1959,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)); } @@ -2198,7 +2198,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 @@ -2214,7 +2214,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 @@ -2227,9 +2227,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, @@ -2345,7 +2345,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); } @@ -2365,7 +2365,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); } @@ -2390,7 +2390,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); @@ -2794,7 +2794,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, @@ -2825,7 +2825,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); @@ -2867,7 +2867,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, @@ -2883,7 +2883,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, @@ -2896,7 +2896,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); @@ -3007,12 +3007,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); @@ -3024,7 +3024,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", @@ -3154,7 +3154,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); @@ -3170,7 +3170,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, @@ -3198,7 +3198,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); @@ -3209,13 +3209,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 @@ -3265,7 +3265,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); } @@ -3489,7 +3489,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); } @@ -3530,7 +3530,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; } @@ -3784,7 +3784,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); @@ -3807,7 +3807,7 @@ ahc->features |= AHC_TWIN; break; default: - printf(" Unsupported adapter type. Ignoring\n"); + printf(KERN_ERR " Unsupported adapter type. Ignoring\n"); return(-1); } @@ -3924,7 +3924,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); } @@ -4024,7 +4024,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; @@ -4241,22 +4241,27 @@ #endif #ifdef AHC_PRINT_SRAM - printf("Scratch Ram:"); - for (i = 0x20; i < 0x5f; i++) { + { + char tmp_buf[1024]; /* used: 400 + 150 + 14 = 664 bytes */ + 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); #endif max_targ = 15; @@ -4364,14 +4369,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); } @@ -4388,7 +4393,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), @@ -4449,7 +4454,7 @@ /* Grab the disconnection disable table and invert it for our needs */ if (ahc->flags & AHC_USEDEFAULTS) { - 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; @@ -4668,7 +4673,7 @@ * in "fast" mode. */ if (bootverbose) - printf("%s: Downloading Sequencer Program...", + printf(KERN_DEBUG "%s: Downloading Sequencer Program...", ahc_name(ahc)); ahc_loadseq(ahc); @@ -4735,7 +4740,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); @@ -5128,7 +5133,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"); } @@ -5152,7 +5157,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 */ @@ -5195,7 +5200,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"); } @@ -5233,7 +5238,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); @@ -5241,7 +5246,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"); } @@ -5265,7 +5270,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 */ } @@ -5346,7 +5351,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; } @@ -5394,7 +5399,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); @@ -5650,7 +5655,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++; } @@ -5920,7 +5925,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 } @@ -5959,7 +5964,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++; @@ -6037,7 +6042,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]); @@ -6136,7 +6141,7 @@ ahc_restart(ahc); if (bootverbose) - printf(" %d instructions downloaded\n", downloaded); + printf(KERN_DEBUG " %d instructions downloaded\n", downloaded); } static int @@ -6318,33 +6323,33 @@ 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\n", ahc_inb(ahc, HCNT)); - printf("SCSISEQ = 0x%x, SBLKCTL = 0x%x\n", + printf(KERN_DEBUG "HCNT = 0x%x\n", ahc_inb(ahc, HCNT)); + 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 "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); @@ -6357,7 +6362,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) { @@ -6367,7 +6372,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) { @@ -6378,7 +6383,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) { @@ -6387,7 +6392,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) { @@ -6397,7 +6402,7 @@ } printf("\n"); - printf("Pending list: "); + printf(KERN_DEBUG "Pending list: "); i = 0; LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) { if (i++ > 256) @@ -6413,7 +6418,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) @@ -6427,7 +6432,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) @@ -6551,7 +6556,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; @@ -6579,7 +6584,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; } @@ -6591,7 +6596,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; } @@ -6603,7 +6608,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; } @@ -6611,7 +6616,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; } @@ -6623,7 +6628,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; } @@ -6698,7 +6703,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; @@ -6717,7 +6722,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; @@ -6725,12 +6730,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; } @@ -6740,7 +6745,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); @@ -6794,7 +6799,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); @@ -6936,7 +6941,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 @@ -6983,7 +6988,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; } @@ -6999,7 +7004,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.5.36-orig/drivers/scsi/aic7xxx/aic7xxx_93cx6.c Tue Sep 17 20:58:56 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7xxx_93cx6.c Mon Nov 18 17:25:41 2002 @@ -170,14 +170,19 @@ CLOCK_PULSE(sd, sd->sd_RDY); } #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.5.36-orig/drivers/scsi/aic7xxx/aic7xxx_linux.c Mon Nov 18 17:23:28 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7xxx_linux.c Tue Nov 19 09:33:36 2002 @@ -276,7 +276,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, @@ -643,7 +643,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"); @@ -1065,8 +1065,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 @@ -1076,7 +1076,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" @@ -1495,10 +1495,10 @@ && (ahc->user_discenable & devinfo.target_mask) != 0) { if (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; @@ -1514,7 +1514,7 @@ if (tags != 0) { 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, device->channel + 'A', device->id, device->lun, tags); } else { @@ -1545,7 +1545,7 @@ dev = ahc_linux_get_device(ahc, cmd->channel, cmd->target, cmd->lun, /*alloc*/TRUE); if (dev == NULL) { - 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; @@ -1912,6 +1912,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; @@ -1959,17 +1960,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: @@ -2014,7 +2015,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); } @@ -2043,7 +2044,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)); @@ -2094,7 +2095,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); } @@ -2138,7 +2139,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) { @@ -2155,7 +2156,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 { @@ -2217,7 +2218,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; } @@ -2415,7 +2416,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"); @@ -2440,7 +2441,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; @@ -2452,7 +2453,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); @@ -2483,7 +2484,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; } @@ -2514,7 +2515,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; } @@ -2525,7 +2526,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; @@ -2562,7 +2563,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) { @@ -2621,14 +2622,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; @@ -2655,12 +2656,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); @@ -2685,7 +2686,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); } @@ -2699,7 +2700,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); } @@ -2721,7 +2722,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) @@ -2824,7 +2825,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, @@ -2832,7 +2833,7 @@ if (i++ > 256) break; } - printf("%d waiting\n", i); + printf( "%d waiting\n", i); } } } --- linux-2.5.36-orig/drivers/scsi/aic7xxx/aic7xxx_linux_pci.c Tue Sep 17 20:59:07 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7xxx_linux_pci.c Tue Nov 19 09:34:44 2002 @@ -311,7 +311,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), @@ -320,7 +320,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 map device.\n", ahc_get_pci_bus(ahc->dev_softc), ahc_get_pci_slot(ahc->dev_softc), @@ -338,7 +338,7 @@ if (maddr == NULL) { error = io_error; if (error != 0) { - 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.5.36-orig/drivers/scsi/aic7xxx/aic7xxx_osm.h Tue Sep 17 20:58:51 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7xxx_osm.h Mon Nov 18 17:25:41 2002 @@ -586,7 +586,28 @@ }; /************************** OS Utility Wrappers *******************************/ +// #define printf printk +#ifdef CONFIG_EVLOG +#include +#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 "" 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_AIC7XXXX, 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.5.36-orig/drivers/scsi/aic7xxx/aic7xxx_pci.c Tue Sep 17 20:58:44 2002 +++ linux-2.5.36/drivers/scsi/aic7xxx/aic7xxx_pci.c Mon Nov 18 17:25:41 2002 @@ -798,7 +798,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); @@ -927,7 +927,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; @@ -1156,7 +1156,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); @@ -1205,7 +1205,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; @@ -1221,9 +1221,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; } @@ -1263,7 +1263,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; } else { /* @@ -1459,7 +1459,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 = @@ -1467,7 +1467,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); @@ -1492,19 +1492,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) { @@ -1530,7 +1530,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)); @@ -1543,10 +1543,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 " : ""); @@ -1562,10 +1562,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 " : ""); @@ -1575,7 +1575,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)); } @@ -1588,7 +1588,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)); } @@ -1600,7 +1600,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 " : ""); @@ -1610,7 +1610,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 " : ""); @@ -1816,28 +1816,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)); } @@ -1846,7 +1846,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); @@ -2132,7 +2132,7 @@ static int ahc_raid_setup(struct ahc_softc *ahc) { - printf("RAID functionality unsupported\n"); + printf(KERN_ERR "RAID functionality unsupported\n"); return (ENXIO); } @@ -2150,7 +2150,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'; @@ -2175,7 +2175,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'; @@ -2205,7 +2205,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';