Rename printf -> kprintf in sys/ and add some defines where necessary
authorSascha Wildner <swildner@dragonflybsd.org>
Fri, 22 Dec 2006 23:12:17 +0000 (23:12 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Fri, 22 Dec 2006 23:12:17 +0000 (23:12 +0000)
(files which are used in userland, too).

57 files changed:
sys/bus/cam/cam_debug.h
sys/bus/cam/cam_extend.c
sys/bus/cam/cam_periph.c
sys/bus/cam/cam_queue.c
sys/bus/cam/cam_xpt.c
sys/bus/cam/scsi/scsi_all.c
sys/bus/cam/scsi/scsi_cd.c
sys/bus/cam/scsi/scsi_ch.c
sys/bus/cam/scsi/scsi_da.c
sys/bus/cam/scsi/scsi_low.c
sys/bus/cam/scsi/scsi_pass.c
sys/bus/cam/scsi/scsi_pt.c
sys/bus/cam/scsi/scsi_sa.c
sys/bus/cam/scsi/scsi_ses.c
sys/bus/cam/scsi/scsi_targ_bh.c
sys/bus/cam/scsi/scsi_target.c
sys/bus/eisa/eisaconf.c
sys/bus/firewire/firewire.c
sys/bus/firewire/fwcrom.c
sys/bus/firewire/fwdma.c
sys/bus/firewire/fwmem.c
sys/bus/firewire/fwohci.c
sys/bus/firewire/fwohci_pci.c
sys/bus/iicbus/i386/pcf.c
sys/bus/iicbus/iicbb.c
sys/bus/iicbus/iicbus.c
sys/bus/iicbus/iicsmb.c
sys/bus/isa/i386/isa_compat.c
sys/bus/isa/i386/isa_dma.c
sys/bus/isa/isa_common.c
sys/bus/isa/pnp.c
sys/bus/isa/pnpparse.c
sys/bus/pccard/pccard.c
sys/bus/pccard/pccard_cis.c
sys/bus/pccard/pccard_cis_quirks.c
sys/bus/pci/i386/pci_cfgreg.c
sys/bus/pci/i386/pcibus.c
sys/bus/pci/pci.c
sys/bus/pci/pci_compat.c
sys/bus/pci/pci_isab.c
sys/bus/pci/pcisupport.c
sys/bus/ppbus/ppb_1284.c
sys/bus/ppbus/ppb_msq.c
sys/bus/ppbus/ppbconf.c
sys/bus/smbus/smbus.c
sys/bus/usb/ehci.c
sys/bus/usb/ehci_pci.c
sys/bus/usb/hid.c
sys/bus/usb/ohci.c
sys/bus/usb/uhci.c
sys/bus/usb/uhub.c
sys/bus/usb/usb.c
sys/bus/usb/usb_mem.c
sys/bus/usb/usb_port.h
sys/bus/usb/usb_subr.c
sys/bus/usb/usbdi.c
sys/bus/usb/usbdi_util.c

index 0a8fd44..08ecc73 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/cam_debug.h,v 1.6 1999/12/29 04:54:25 peter Exp $
- * $DragonFly: src/sys/bus/cam/cam_debug.h,v 1.2 2003/06/17 04:28:18 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/cam_debug.h,v 1.3 2006/12/22 23:12:16 swildner Exp $
  */
 #ifndef        _CAM_CAM_DEBUG_H
 #define _CAM_CAM_DEBUG_H 1
@@ -63,20 +63,20 @@ extern u_int32_t cam_debug_delay;
         && (cam_dpath != NULL)                         \
         && (xpt_path_comp(cam_dpath, path) >= 0)       \
         && (xpt_path_comp(cam_dpath, path) < 2))
-#define        CAM_DEBUG(path, flag, printfargs)               \
+#define        CAM_DEBUG(path, flag, kprintfargs)              \
        if ((cam_dflags & (flag))                       \
         && (cam_dpath != NULL)                         \
         && (xpt_path_comp(cam_dpath, path) >= 0)       \
         && (xpt_path_comp(cam_dpath, path) < 2)) {     \
                xpt_print_path(path);                   \
-               printf printfargs;                      \
+               kprintf kprintfargs;                    \
                if (cam_debug_delay != 0)               \
                        DELAY(cam_debug_delay);         \
        }
-#define        CAM_DEBUG_PRINT(flag, printfargs)               \
+#define        CAM_DEBUG_PRINT(flag, kprintfargs)              \
        if (cam_dflags & (flag)) {                      \
-               printf("cam_debug: ");                  \
-               printf printfargs;                      \
+               kprintf("cam_debug: ");                 \
+               kprintf kprintfargs;                    \
                if (cam_debug_delay != 0)               \
                        DELAY(cam_debug_delay);         \
        }
index b19ea16..2ef566e 100644 (file)
@@ -13,7 +13,7 @@
  * functioning of this software in any circumstances.
  *
  * $FreeBSD: src/sys/cam/cam_extend.c,v 1.3 1999/08/28 00:40:39 peter Exp $
- * $DragonFly: src/sys/bus/cam/cam_extend.c,v 1.7 2006/09/10 01:26:32 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/cam_extend.c,v 1.8 2006/12/22 23:12:16 swildner Exp $
  */
 /*
  * XXX XXX XXX XXX  We should get DEVFS working so that we
@@ -69,7 +69,7 @@ cam_extend_set(struct extend_array *ea, int index, void *value)
                ea->nelem = index + EXTEND_CHUNK;
        }
        if (ea->ps[index]) {
-               printf("extend_set: entry %d already has storage.\n", index);
+               kprintf("extend_set: entry %d already has storage.\n", index);
                return 0;
        }
        else
index cc4254e..1d46da6 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/cam_periph.c,v 1.24.2.3 2003/01/25 19:04:40 dillon Exp $
- * $DragonFly: src/sys/bus/cam/cam_periph.c,v 1.17 2006/12/20 18:14:33 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/cam_periph.c,v 1.18 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -99,7 +99,7 @@ cam_periph_alloc(periph_ctor_t *periph_ctor,
                        periph->deferred_ac = code;
                        return (CAM_REQ_INPROG);
                } else {
-                       printf("cam_periph_alloc: attempt to re-allocate "
+                       kprintf("cam_periph_alloc: attempt to re-allocate "
                               "valid device %s%d rejected\n",
                               periph->periph_name, periph->unit_number);
                }
@@ -271,9 +271,9 @@ camperiphnextunit(struct periph_driver *p_drv, u_int newunit, int wired,
                if (periph != NULL && periph->unit_number == newunit) {
                        if (wired != 0) {
                                xpt_print_path(periph->path);
-                               printf("Duplicate Wired Device entry!\n");
+                               kprintf("Duplicate Wired Device entry!\n");
                                xpt_print_path(periph->path);
-                               printf("Second device (%s device at scbus%d "
+                               kprintf("Second device (%s device at scbus%d "
                                       "target %d lun %d) will not be wired\n",
                                       periph_name, pathid, target, lun);
                                wired = 0;
@@ -376,7 +376,7 @@ cam_periph_invalidate(struct cam_periph *periph)
        if (periph->refcount == 0)
                camperiphfree(periph);
        else if (periph->refcount < 0)
-               printf("cam_invalidate_periph: refcount < 0!!\n");
+               kprintf("cam_invalidate_periph: refcount < 0!!\n");
        crit_exit();
 }
 
@@ -391,7 +391,7 @@ camperiphfree(struct cam_periph *periph)
        }
 
        if (*p_drv == NULL) {
-               printf("camperiphfree: attempt to free "
+               kprintf("camperiphfree: attempt to free "
                        "non-existant periph: %s\n", periph->periph_name);
                return;
        }
@@ -489,7 +489,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
        switch(ccb->ccb_h.func_code) {
        case XPT_DEV_MATCH:
                if (ccb->cdm.match_buf_len == 0) {
-                       printf("cam_periph_mapmem: invalid match buffer "
+                       kprintf("cam_periph_mapmem: invalid match buffer "
                               "length 0\n");
                        return(EINVAL);
                }
@@ -545,7 +545,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
                 */
                if ((lengths[i] +
                    (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK)) > DFLTPHYS){
-                       printf("cam_periph_mapmem: attempt to map %lu bytes, "
+                       kprintf("cam_periph_mapmem: attempt to map %lu bytes, "
                               "which is greater than DFLTPHYS(%d)\n",
                               (long)(lengths[i] +
                               (((vm_offset_t)(*data_ptrs[i])) & PAGE_MASK)),
@@ -556,7 +556,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
                if (dirs[i] & CAM_DIR_OUT) {
                        if (!useracc(*data_ptrs[i], lengths[i], 
                                     VM_PROT_READ)) {
-                               printf("cam_periph_mapmem: error, "
+                               kprintf("cam_periph_mapmem: error, "
                                        "address %p, length %lu isn't "
                                        "user accessible for READ\n",
                                        (void *)*data_ptrs[i],
@@ -569,7 +569,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
                        cmd[i] = BUF_CMD_READ;
                        if (!useracc(*data_ptrs[i], lengths[i], 
                                     VM_PROT_WRITE)) {
-                               printf("cam_periph_mapmem: error, "
+                               kprintf("cam_periph_mapmem: error, "
                                        "address %p, length %lu isn't "
                                        "user accessible for WRITE\n",
                                        (void *)*data_ptrs[i],
@@ -595,7 +595,7 @@ cam_periph_mapmem(union ccb *ccb, struct cam_periph_map_info *mapinfo)
 
                /* map the user buffer into kernel memory */
                if (vmapbuf(mapinfo->bp[i], *data_ptrs[i], lengths[i]) < 0) {
-                       printf("cam_periph_mapmem: error, "
+                       kprintf("cam_periph_mapmem: error, "
                                "address %p, length %lu isn't "
                                "user accessible any more\n",
                                (void *)*data_ptrs[i],
index 9c3ee20..ffd46f3 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/cam_queue.c,v 1.5 1999/08/28 00:40:41 peter Exp $
- * $DragonFly: src/sys/bus/cam/cam_queue.c,v 1.7 2006/09/05 00:55:31 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/cam_queue.c,v 1.8 2006/12/22 23:12:16 swildner Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -228,7 +228,7 @@ cam_devq_release(struct cam_devq *devq)
 {
        if (--devq->refcount == 0) {
                if (devq->alloc_active || devq->send_active)
-                       printf("cam_devq_release: WARNING active allocations %d active send %d!\n", devq->alloc_active, devq->send_active);
+                       kprintf("cam_devq_release: WARNING active allocations %d active send %d!\n", devq->alloc_active, devq->send_active);
                camq_fini(&devq->alloc_queue);
                camq_fini(&devq->send_queue);
                kfree(devq, M_DEVBUF);
index 1931836..5fdf5c1 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.80.2.18 2002/12/09 17:31:55 gibbs Exp $
- * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.33 2006/12/20 18:14:33 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.34 2006/12/22 23:12:16 swildner Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -900,7 +900,7 @@ xptopen(struct dev_open_args *ap)
         * We don't allow nonblocking access.
         */
        if ((ap->a_oflags & O_NONBLOCK) != 0) {
-               printf("xpt%d: can't do nonblocking access\n", unit);
+               kprintf("xpt%d: can't do nonblocking access\n", unit);
                return(ENODEV);
        }
 
@@ -910,7 +910,7 @@ xptopen(struct dev_open_args *ap)
         * mistake.
         */
        if (unit != 0) {
-               printf("xptopen: got invalid xpt unit %d\n", unit);
+               kprintf("xptopen: got invalid xpt unit %d\n", unit);
                return(ENXIO);
        }
 
@@ -934,7 +934,7 @@ xptclose(struct dev_close_args *ap)
         * mistake.
         */
        if (unit != 0) {
-               printf("xptclose: got invalid xpt unit %d\n", unit);
+               kprintf("xptclose: got invalid xpt unit %d\n", unit);
                return(ENXIO);
        }
 
@@ -959,7 +959,7 @@ xptioctl(struct dev_ioctl_args *ap)
         * mistake.
         */
        if (unit != 0) {
-               printf("xptioctl: got invalid xpt unit %d\n", unit);
+               kprintf("xptioctl: got invalid xpt unit %d\n", unit);
                return(ENXIO);
        }
 
@@ -1273,9 +1273,9 @@ ptstartover:
                         * kernel.
                         */
                        if (base_periph_found == 1) {
-                               printf("xptioctl: pass driver is not in the "
+                               kprintf("xptioctl: pass driver is not in the "
                                       "kernel\n");
-                               printf("xptioctl: put \"device pass0\" in "
+                               kprintf("xptioctl: put \"device pass0\" in "
                                       "your kernel config file\n");
                        }
                }
@@ -1333,7 +1333,7 @@ xpt_init(void *dummy)
        if ((status = xpt_create_path(&path, NULL, CAM_XPT_PATH_ID,
                                      CAM_TARGET_WILDCARD,
                                      CAM_LUN_WILDCARD)) != CAM_REQ_CMP) {
-               printf("xpt_init: xpt_create_path failed with status %#x,"
+               kprintf("xpt_init: xpt_create_path failed with status %#x,"
                       " failing attach\n", status);
                return;
        }
@@ -1353,7 +1353,7 @@ xpt_init(void *dummy)
        xpt_config_hook->ich_desc = "xpt";
        if (config_intrhook_establish(xpt_config_hook) != 0) {
                kfree (xpt_config_hook, M_TEMP);
-               printf("xpt_init: config_intrhook_establish failed "
+               kprintf("xpt_init: config_intrhook_establish failed "
                       "- failing attach\n");
        }
 
@@ -1366,7 +1366,7 @@ static cam_status
 xptregister(struct cam_periph *periph, void *arg)
 {
        if (periph == NULL) {
-               printf("xptregister: periph was NULL!!\n");
+               kprintf("xptregister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
 
@@ -1450,19 +1450,19 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
         * mask out CAM interrupts.
         */
        crit_enter();
-       printf("%s%d at %s%d bus %d target %d lun %d\n",
+       kprintf("%s%d at %s%d bus %d target %d lun %d\n",
               periph->periph_name, periph->unit_number,
               path->bus->sim->sim_name,
               path->bus->sim->unit_number,
               path->bus->sim->bus_id,
               path->target->target_id,
               path->device->lun_id);
-       printf("%s%d: ", periph->periph_name, periph->unit_number);
+       kprintf("%s%d: ", periph->periph_name, periph->unit_number);
        scsi_print_inquiry(&path->device->inq_data);
        if ((bootverbose)
         && (path->device->serial_num_len > 0)) {
                /* Don't wrap the screen  - print only the first 60 chars */
-               printf("%s%d: Serial Number %.60s\n", periph->periph_name,
+               kprintf("%s%d: Serial Number %.60s\n", periph->periph_name,
                       periph->unit_number, path->device->serial_num);
        }
        xpt_setup_ccb(&cts.ccb_h, path, /*priority*/1);
@@ -1492,40 +1492,40 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
                        speed *= (0x01 << cts.bus_width);
                mb = speed / 1000;
                if (mb > 0)
-                       printf("%s%d: %d.%03dMB/s transfers",
+                       kprintf("%s%d: %d.%03dMB/s transfers",
                               periph->periph_name, periph->unit_number,
                               mb, speed % 1000);
                else
-                       printf("%s%d: %dKB/s transfers", periph->periph_name,
+                       kprintf("%s%d: %dKB/s transfers", periph->periph_name,
                               periph->unit_number, speed);
                if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
                 && cts.sync_offset != 0) {
-                       printf(" (%d.%03dMHz, offset %d", freq / 1000,
+                       kprintf(" (%d.%03dMHz, offset %d", freq / 1000,
                               freq % 1000, cts.sync_offset);
                }
                if ((cts.valid & CCB_TRANS_BUS_WIDTH_VALID) != 0
                 && cts.bus_width > 0) {
                        if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
                         && cts.sync_offset != 0) {
-                               printf(", ");
+                               kprintf(", ");
                        } else {
-                               printf(" (");
+                               kprintf(" (");
                        }
-                       printf("%dbit)", 8 * (0x01 << cts.bus_width));
+                       kprintf("%dbit)", 8 * (0x01 << cts.bus_width));
                } else if ((cts.valid & CCB_TRANS_SYNC_OFFSET_VALID) != 0
                        && cts.sync_offset != 0) {
-                       printf(")");
+                       kprintf(")");
                }
 
                if (path->device->inq_flags & SID_CmdQue
                 || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) {
-                       printf(", Tagged Queueing Enabled");
+                       kprintf(", Tagged Queueing Enabled");
                }
 
-               printf("\n");
+               kprintf("\n");
        } else if (path->device->inq_flags & SID_CmdQue
                || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) {
-               printf("%s%d: Tagged Queueing Enabled\n",
+               kprintf("%s%d: Tagged Queueing Enabled\n",
                       periph->periph_name, periph->unit_number);
        }
 
@@ -1534,7 +1534,7 @@ xpt_announce_periph(struct cam_periph *periph, char *announce_string)
         * passed one in..
         */
        if (announce_string != NULL)
-               printf("%s%d: %s\n", periph->periph_name,
+               kprintf("%s%d: %s\n", periph->periph_name,
                       periph->unit_number, announce_string);
        crit_exit();
 }
@@ -3177,7 +3177,7 @@ xpt_action(union ccb *start_ccb)
 
                                        if (bootverbose) {
                                                xpt_print_path(crs->ccb_h.path);
-                                               printf("tagged openings "
+                                               kprintf("tagged openings "
                                                       "now %d\n",
                                                       crs->openings);
                                        }
@@ -3277,7 +3277,7 @@ xpt_action(union ccb *start_ccb)
                        } else {
                                start_ccb->ccb_h.status = CAM_REQ_CMP;
                                xpt_print_path(cam_dpath);
-                               printf("debugging flags now %x\n", cam_dflags);
+                               kprintf("debugging flags now %x\n", cam_dflags);
                        }
                } else {
                        cam_dpath = NULL;
@@ -3571,7 +3571,7 @@ xpt_run_dev_sendq(struct cam_eb *bus)
 
                work_ccb = cam_ccbq_peek_ccb(&device->ccbq, CAMQ_HEAD);
                if (work_ccb == NULL) {
-                       printf("device on run queue with no ccbs???\n");
+                       kprintf("device on run queue with no ccbs???\n");
                        continue;
                }
 
@@ -3847,30 +3847,30 @@ void
 xpt_print_path(struct cam_path *path)
 {
        if (path == NULL)
-               printf("(nopath): ");
+               kprintf("(nopath): ");
        else {
                if (path->periph != NULL)
-                       printf("(%s%d:", path->periph->periph_name,
+                       kprintf("(%s%d:", path->periph->periph_name,
                               path->periph->unit_number);
                else
-                       printf("(noperiph:");
+                       kprintf("(noperiph:");
 
                if (path->bus != NULL)
-                       printf("%s%d:%d:", path->bus->sim->sim_name,
+                       kprintf("%s%d:%d:", path->bus->sim->sim_name,
                               path->bus->sim->unit_number,
                               path->bus->sim->bus_id);
                else
-                       printf("nobus:");
+                       kprintf("nobus:");
 
                if (path->target != NULL)
-                       printf("%d:", path->target->target_id);
+                       kprintf("%d:", path->target->target_id);
                else
-                       printf("X:");
+                       kprintf("X:");
 
                if (path->device != NULL)
-                       printf("%d): ", path->device->lun_id);
+                       kprintf("%d): ", path->device->lun_id);
                else
-                       printf("X): ");
+                       kprintf("X): ");
        }
 }
 
@@ -4105,7 +4105,7 @@ xptpathid(const char *sim_name, int sim_unit, int sim_bus)
                        pathid = dunit;
                        break;
                } else {
-                       printf("Ambiguous scbus configuration for %s%d "
+                       kprintf("Ambiguous scbus configuration for %s%d "
                               "bus %d, cannot wire down.  The kernel "
                               "config entry for scbus%d should "
                               "specify a controller bus.\n"
@@ -4863,7 +4863,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
                                                 request_ccb->ccb_h.path_id,
                                                 i, 0);
                        if (status != CAM_REQ_CMP) {
-                               printf("xpt_scan_bus: xpt_create_path failed"
+                               kprintf("xpt_scan_bus: xpt_create_path failed"
                                       " with status %#x, bus scan halted\n",
                                       status);
                                break;
@@ -4876,7 +4876,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
                        work_ccb->ccb_h.ppriv_ptr0 = scan_info;
                        work_ccb->crcn.flags = request_ccb->crcn.flags;
 #if 0
-                       printf("xpt_scan_bus: probing %d:%d:%d\n",
+                       kprintf("xpt_scan_bus: probing %d:%d:%d\n",
                                request_ccb->ccb_h.path_id, i, 0);
 #endif
                        xpt_action(work_ccb);
@@ -4902,7 +4902,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
                xpt_action(request_ccb);
 
 #if 0
-               printf("xpt_scan_bus: got back probe from %d:%d:%d\n",
+               kprintf("xpt_scan_bus: got back probe from %d:%d:%d\n",
                        path_id, target_id, lun_id);
 #endif
 
@@ -4976,7 +4976,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
                        status = xpt_create_path(&path, xpt_periph,
                                                 path_id, target_id, lun_id);
                        if (status != CAM_REQ_CMP) {
-                               printf("xpt_scan_bus: xpt_create_path failed "
+                               kprintf("xpt_scan_bus: xpt_create_path failed "
                                       "with status %#x, halting LUN scan\n",
                                       status);
                                xpt_free_ccb(request_ccb);
@@ -5000,7 +5000,7 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb)
                                scan_info->request_ccb->crcn.flags;
 #if 0
                        xpt_print_path(path);
-                       printf("xpt_scan bus probing\n");
+                       kprintf("xpt_scan bus probing\n");
 #endif
                        xpt_action(request_ccb);
                }
@@ -5081,7 +5081,7 @@ xpt_scan_lun(struct cam_periph *periph, struct cam_path *path,
 
                if (status != CAM_REQ_CMP) {
                        xpt_print_path(path);
-                       printf("xpt_scan_lun: can't compile path, can't "
+                       kprintf("xpt_scan_lun: can't compile path, can't "
                               "continue\n");
                        kfree(request_ccb, M_TEMP);
                        kfree(new_path, M_TEMP);
@@ -5109,7 +5109,7 @@ xpt_scan_lun(struct cam_periph *periph, struct cam_path *path,
 
                if (status != CAM_REQ_CMP) {
                        xpt_print_path(path);
-                       printf("xpt_scan_lun: cam_alloc_periph returned an "
+                       kprintf("xpt_scan_lun: cam_alloc_periph returned an "
                               "error, can't continue probe\n");
                        request_ccb->ccb_h.status = status;
                        xpt_done(request_ccb);
@@ -5134,12 +5134,12 @@ proberegister(struct cam_periph *periph, void *arg)
 
        request_ccb = (union ccb *)arg;
        if (periph == NULL) {
-               printf("proberegister: periph was NULL!!\n");
+               kprintf("proberegister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
 
        if (request_ccb == NULL) {
-               printf("proberegister: no probe CCB, "
+               kprintf("proberegister: no probe CCB, "
                       "can't register device\n");
                return(CAM_REQ_CMP_ERR);
        }
@@ -5952,9 +5952,9 @@ xptconfigfunc(struct cam_eb *bus, void *arg)
                if ((status = xpt_create_path(&path, xpt_periph, bus->path_id,
                                              CAM_TARGET_WILDCARD,
                                              CAM_LUN_WILDCARD)) !=CAM_REQ_CMP){
-                       printf("xptconfigfunc: xpt_create_path failed with "
+                       kprintf("xptconfigfunc: xpt_create_path failed with "
                               "status %#x for bus %d\n", status, bus->path_id);
-                       printf("xptconfigfunc: halting bus configuration\n");
+                       kprintf("xptconfigfunc: halting bus configuration\n");
                        xpt_free_ccb(work_ccb);
                        busses_to_config--;
                        xpt_finishconfig(xpt_periph, NULL);
@@ -5964,7 +5964,7 @@ xptconfigfunc(struct cam_eb *bus, void *arg)
                work_ccb->ccb_h.func_code = XPT_PATH_INQ;
                xpt_action(work_ccb);
                if (work_ccb->ccb_h.status != CAM_REQ_CMP) {
-                       printf("xptconfigfunc: CPI failed on bus %d "
+                       kprintf("xptconfigfunc: CPI failed on bus %d "
                               "with status %d\n", bus->path_id,
                               work_ccb->ccb_h.status);
                        xpt_finishconfig(xpt_periph, work_ccb);
@@ -6009,7 +6009,7 @@ xpt_config(void *arg)
                if (xpt_create_path(&cam_dpath, xpt_periph,
                                    CAM_DEBUG_BUS, CAM_DEBUG_TARGET,
                                    CAM_DEBUG_LUN) != CAM_REQ_CMP) {
-                       printf("xpt_config: xpt_create_path() failed for debug"
+                       kprintf("xpt_config: xpt_create_path() failed for debug"
                               " target %d:%d:%d, debugging disabled\n",
                               CAM_DEBUG_BUS, CAM_DEBUG_TARGET, CAM_DEBUG_LUN);
                        cam_dflags = CAM_DEBUG_NONE;
@@ -6031,7 +6031,7 @@ xpt_config(void *arg)
                xpt_finishconfig(xpt_periph, NULL);
        } else  {
                if (busses_to_reset > 0 && SCSI_DELAY >= 2000) {
-                       printf("Waiting %d seconds for SCSI "
+                       kprintf("Waiting %d seconds for SCSI "
                               "devices to settle\n", SCSI_DELAY/1000);
                }
                xpt_for_all_busses(xptconfigfunc, NULL);
index b548915..fc10728 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.14.2.11 2003/10/30 15:06:35 thomas Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_all.c,v 1.6 2006/12/20 18:14:34 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_all.c,v 1.7 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -44,7 +44,7 @@
 #include <string.h>
 
 #define ksnprintf      snprintf        /* ick, userland uses us too */
-
+#define kprintf                printf
 #endif
 
 #include "../cam.h"
@@ -1669,13 +1669,13 @@ scsi_sense_print(struct ccb_scsiio *csio)
                xpt_print_path(csio->ccb_h.path);
 
                if ((csio->ccb_h.flags & CAM_CDB_POINTER) != 0) {
-                       printf("%s. CDB: %s\n", 
+                       kprintf("%s. CDB: %s\n", 
                                scsi_op_desc(csio->cdb_io.cdb_ptr[0],
                                &cgd.inq_data),
                                scsi_cdb_string(csio->cdb_io.cdb_ptr, cdb_str,
                                                sizeof(cdb_str)));
                } else {
-                       printf("%s. CDB: %s\n",
+                       kprintf("%s. CDB: %s\n",
                                scsi_op_desc(csio->cdb_io.cdb_bytes[0], 
                                &cgd.inq_data), scsi_cdb_string(
                                csio->cdb_io.cdb_bytes, cdb_str,
@@ -1718,11 +1718,11 @@ scsi_sense_print(struct ccb_scsiio *csio)
 
        switch (error_code) {
        case SSD_DEFERRED_ERROR:
-               printf("Deferred Error: ");
+               kprintf("Deferred Error: ");
                /* FALLTHROUGH */
        case SSD_CURRENT_ERROR:
 
-               printf("%s", scsi_sense_key_text[sense_key]);
+               kprintf("%s", scsi_sense_key_text[sense_key]);
                info = scsi_4btoul(sense->info);
                
                if (sense->error_code & SSD_ERRCODE_VALID) {
@@ -1734,25 +1734,25 @@ scsi_sense_print(struct ccb_scsiio *csio)
                        case SSD_KEY_DATA_PROTECT:
                                break;
                        case SSD_KEY_BLANK_CHECK:
-                               printf(" req sz: %d (decimal)",
+                               kprintf(" req sz: %d (decimal)",
                                    info);
                                break;
                        default:
                                if (info) {
                                        if (sense->flags & SSD_ILI) {
-                                               printf(" ILI (length mismatch):"
+                                               kprintf(" ILI (length mismatch):"
                                                       " %d", info);
                                        } else {
-                                               printf(" info:%x", info);
+                                               kprintf(" info:%x", info);
                                        }
                                }
                        }
                } else if (info)
-                       printf(" info?:%x", info);
+                       kprintf(" info?:%x", info);
 
                if (sense->extra_len >= 4) {
                        if (bcmp(sense->cmd_spec_info, "\0\0\0\0", 4)) {
-                               printf(" csi:%x,%x,%x,%x",
+                               kprintf(" csi:%x,%x,%x,%x",
                                       sense->cmd_spec_info[0],
                                       sense->cmd_spec_info[1],
                                       sense->cmd_spec_info[2],
@@ -1766,33 +1766,33 @@ scsi_sense_print(struct ccb_scsiio *csio)
                if (asc || ascq) {
                        const char *desc = scsi_sense_desc(asc, ascq,
                                                           &cgd.inq_data);
-                       printf(" asc:%x,%x\n", asc, ascq);
+                       kprintf(" asc:%x,%x\n", asc, ascq);
 
                        xpt_print_path(csio->ccb_h.path);
-                       printf("%s", desc);
+                       kprintf("%s", desc);
                }
 
                if (sense->extra_len >= 7 && sense->fru) {
-                       printf(" field replaceable unit: %x", sense->fru);
+                       kprintf(" field replaceable unit: %x", sense->fru);
                }
 
                if ((sense->extra_len >= 10)
                 && (sense->sense_key_spec[0] & SSD_SCS_VALID) != 0) {
-                       printf(" sks:%x,%x", sense->sense_key_spec[0],
+                       kprintf(" sks:%x,%x", sense->sense_key_spec[0],
                               scsi_2btoul(&sense->sense_key_spec[1]));
                }
                break;
 
        default:
-               printf("error code %d",
+               kprintf("error code %d",
                    sense->error_code & SSD_ERRCODE);
                if (sense->error_code & SSD_ERRCODE_VALID) {
-                       printf(" at block no. %d (decimal)",
+                       kprintf(" at block no. %d (decimal)",
                               info = scsi_4btoul(sense->info));
                }
        }
 
-       printf("\n");
+       kprintf("\n");
 }
 
 #else /* !_KERNEL */
@@ -2403,7 +2403,7 @@ scsi_print_inquiry(struct scsi_inquiry_data *inq_data)
                bcopy("CCS", rstr, 4);
        else
                ksnprintf(rstr, sizeof (rstr), "%d", SID_ANSI_REV(inq_data));
-       printf("<%s %s %s> %s %s SCSI-%s device %s\n",
+       kprintf("<%s %s %s> %s %s SCSI-%s device %s\n",
               vendor, product, revision,
               SID_IS_REMOVABLE(inq_data) ? "Removable" : "Fixed",
               dtype, rstr, qtype);
index dbd613f..aa38ab6 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.31.2.16 2003/10/21 22:26:11 thomas Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_cd.c,v 1.26 2006/12/20 18:14:34 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_cd.c,v 1.27 2006/12/22 23:12:16 swildner Exp $
  */
 /*
  * Portions of this driver taken from the original FreeBSD cd driver.
@@ -361,7 +361,7 @@ cdinit(void)
         */
        cdperiphs = cam_extend_new();
        if (cdperiphs == NULL) {
-               printf("cd: Failed to alloc extend array!\n");
+               kprintf("cd: Failed to alloc extend array!\n");
                return;
        }
 
@@ -386,7 +386,7 @@ cdinit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("cd: Failed to attach master async callback "
+               kprintf("cd: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
 }
@@ -446,7 +446,7 @@ cdoninvalidate(struct cam_periph *periph)
                camq_remove(&softc->changer->devq, softc->pinfo.index);
 
        xpt_print_path(periph->path);
-       printf("lost device\n");
+       kprintf("lost device\n");
 }
 
 static void
@@ -457,12 +457,12 @@ cdcleanup(struct cam_periph *periph)
        softc = (struct cd_softc *)periph->softc;
 
        xpt_print_path(periph->path);
-       printf("removing device entry\n");
+       kprintf("removing device entry\n");
 
        if ((softc->flags & CD_FLAG_SCTX_INIT) != 0
            && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
                xpt_print_path(periph->path);
-               printf("can't remove sysctl context\n");
+               kprintf("can't remove sysctl context\n");
        }
 
        crit_enter();
@@ -528,7 +528,7 @@ cdcleanup(struct cam_periph *periph)
                STAILQ_REMOVE(&changerq, softc->changer, cdchanger,
                              changer_links);
                xpt_print_path(periph->path);
-               printf("removing changer entry\n");
+               kprintf("removing changer entry\n");
                kfree(softc->changer, M_DEVBUF);
                num_changers--;
        }
@@ -573,7 +573,7 @@ cdasync(void *callback_arg, u_int32_t code,
 
                if (status != CAM_REQ_CMP
                 && status != CAM_REQ_INPROG)
-                       printf("cdasync: Unable to attach new device "
+                       kprintf("cdasync: Unable to attach new device "
                               "due to status 0x%x\n", status);
 
                break;
@@ -623,7 +623,7 @@ cdsysctlinit(void *context, int pending)
        tmpstr2, CTLFLAG_RD, 0, tmpstr);
 
        if (softc->sysctl_tree == NULL) {
-               printf("cdsysctlinit: unable to allocate sysctl tree\n");
+               kprintf("cdsysctlinit: unable to allocate sysctl tree\n");
                return;
        }
 
@@ -686,11 +686,11 @@ cdregister(struct cam_periph *periph, void *arg)
 
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("cdregister: periph was NULL!!\n");
+               kprintf("cdregister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
        if (cgd == NULL) {
-               printf("cdregister: no getdev CCB, can't register device\n");
+               kprintf("cdregister: no getdev CCB, can't register device\n");
                return(CAM_REQ_CMP_ERR);
        }
 
@@ -854,7 +854,7 @@ cdregister(struct cam_periph *periph, void *arg)
                                        nchanger->num_devices++;
                                        if (camq_resize(&nchanger->devq,
                                           nchanger->num_devices)!=CAM_REQ_CMP){
-                                               printf("cdregister: "
+                                               kprintf("cdregister: "
                                                       "camq_resize "
                                                       "failed, changer "
                                                       "support may "
@@ -870,7 +870,7 @@ cdregister(struct cam_periph *periph, void *arg)
                        } else if (status == CAM_REQ_CMP)
                                xpt_free_path(path);
                        else {
-                               printf("cdregister: unable to allocate path\n"
+                               kprintf("cdregister: unable to allocate path\n"
                                       "cdregister: changer support may be "
                                       "broken\n");
                        }
@@ -882,7 +882,7 @@ cdregister(struct cam_periph *periph, void *arg)
 
                        if (camq_resize(&nchanger->devq,
                            nchanger->num_devices) != CAM_REQ_CMP) {
-                               printf("cdregister: camq_resize "
+                               kprintf("cdregister: camq_resize "
                                       "failed, changer support may "
                                       "be messed up\n");
                        }
@@ -905,7 +905,7 @@ cdregister(struct cam_periph *periph, void *arg)
                        callout_init(&nchanger->long_handle);
                        if (camq_init(&nchanger->devq, 1) != 0) {
                                softc->flags &= ~CD_FLAG_CHANGER;
-                               printf("cdregister: changer support "
+                               kprintf("cdregister: changer support "
                                       "disabled\n");
                                goto cdregisterexit;
                        }
@@ -949,7 +949,7 @@ cdregister(struct cam_periph *periph, void *arg)
                                nchanger->num_devices++;
                                if (camq_resize(&nchanger->devq,
                                    nchanger->num_devices) != CAM_REQ_CMP) {
-                                       printf("cdregister: camq_resize "
+                                       kprintf("cdregister: camq_resize "
                                               "failed, changer support may "
                                               "be messed up\n");
                                }
@@ -962,7 +962,7 @@ cdregister(struct cam_periph *periph, void *arg)
                        } else if (status == CAM_REQ_CMP)
                                xpt_free_path(path);
                        else {
-                               printf("cdregister: unable to allocate path\n"
+                               kprintf("cdregister: unable to allocate path\n"
                                       "cdregister: changer support may be "
                                       "broken\n");
                        }
@@ -972,7 +972,7 @@ cdregister(struct cam_periph *periph, void *arg)
                        nchanger->num_devices++;
                        if (camq_resize(&nchanger->devq,
                            nchanger->num_devices) != CAM_REQ_CMP) {
-                               printf("cdregister: camq_resize "
+                               kprintf("cdregister: camq_resize "
                                       "failed, changer support may "
                                       "be messed up\n");
                        }
@@ -1337,7 +1337,7 @@ cdchangerschedule(struct cd_softc *softc)
                                    cdrunchangerqueue, changer);
                        changer->flags |= CHANGER_TIMEOUT_SCHED;
                } else
-                       printf("cdchangerschedule: already have a long"
+                       kprintf("cdchangerschedule: already have a long"
                               " timeout!\n");
 
                if ((changer->flags & CHANGER_SHORT_TMOUT_SCHED) == 0) {
@@ -1346,7 +1346,7 @@ cdchangerschedule(struct cd_softc *softc)
                                        cdshorttimeout, changer);
                        changer->flags |= CHANGER_SHORT_TMOUT_SCHED;
                } else
-                       printf("cdchangerschedule: already have a short "
+                       kprintf("cdchangerschedule: already have a short "
                               "timeout!\n");
 
                /*
@@ -1653,7 +1653,7 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
                        struct buf *q_bp;
 
                        xpt_print_path(periph->path);
-                       printf("cddone: got error %#x back\n", error);
+                       kprintf("cddone: got error %#x back\n", error);
                        crit_enter();
                        while ((q_bio = bioq_first(&softc->bio_queue)) != NULL) {
                                bioq_remove(&softc->bio_queue, q_bio);
@@ -1831,11 +1831,11 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
                                                        &done_ccb->csio);
                                        else {
                                                xpt_print_path(periph->path);
-                                               printf("got CAM status %#x\n",
+                                               kprintf("got CAM status %#x\n",
                                                       done_ccb->ccb_h.status);
                                        }
                                        xpt_print_path(periph->path);
-                                       printf("fatal error, failed" 
+                                       kprintf("fatal error, failed" 
                                               " to attach to device\n");
 
                                        /*
@@ -2136,7 +2136,7 @@ cdioctl(struct dev_ioctl_args *ap)
 
                        if ((len > sizeof(struct cd_sub_channel_info)) ||
                            (len < sizeof(struct cd_sub_channel_header))) {
-                               printf(
+                               kprintf(
                                        "scsi_cd: cdioctl: "
                                        "cdioreadsubchannel: error, len=%d\n",
                                        len);
@@ -2217,7 +2217,7 @@ cdioctl(struct dev_ioctl_args *ap)
                         || (te->address_format != CD_MSF_FORMAT
                          && te->address_format != CD_LBA_FORMAT)) {
                                error = EINVAL;
-                               printf("scsi_cd: error in readtocentries, "
+                               kprintf("scsi_cd: error in readtocentries, "
                                       "returning EINVAL\n");
                                kfree(data, M_TEMP);
                                kfree(lead, M_TEMP);
@@ -2248,7 +2248,7 @@ cdioctl(struct dev_ioctl_args *ap)
                                starting_track = th->ending_track + 1;
                        else if (starting_track < th->starting_track ||
                                 starting_track > th->ending_track + 1) {
-                               printf("scsi_cd: error in readtocentries, "
+                               kprintf("scsi_cd: error in readtocentries, "
                                       "returning EINVAL\n");
                                kfree(data, M_TEMP);
                                kfree(lead, M_TEMP);
@@ -2268,7 +2268,7 @@ cdioctl(struct dev_ioctl_args *ap)
                                        readlen = len;
                        }
                        if (len > sizeof(data->entries)) {
-                               printf("scsi_cd: error in readtocentries, "
+                               kprintf("scsi_cd: error in readtocentries, "
                                       "returning EINVAL\n");
                                error = EINVAL;
                                kfree(data, M_TEMP);
@@ -2334,7 +2334,7 @@ cdioctl(struct dev_ioctl_args *ap)
 
                        if (te->address_format != CD_MSF_FORMAT
                            && te->address_format != CD_LBA_FORMAT) {
-                               printf("error in readtocentry, "
+                               kprintf("error in readtocentry, "
                                       " returning EINVAL\n");
                                kfree(data, M_TEMP);
                                error = EINVAL;
@@ -2364,7 +2364,7 @@ cdioctl(struct dev_ioctl_args *ap)
                                /* OK */;
                        else if (track < th->starting_track ||
                                 track > th->ending_track + 1) {
-                               printf("error in readtocentry, "
+                               kprintf("error in readtocentry, "
                                       " returning EINVAL\n");
                                kfree(data, M_TEMP);
                                error = EINVAL;
@@ -3126,14 +3126,14 @@ cd6byteworkaround(union ccb *ccb)
         */
        if (found == 0) {
                xpt_print_path(periph->path);
-               printf("mode buffer not found in mode queue!\n");
+               kprintf("mode buffer not found in mode queue!\n");
                return (0);
        }
 
        params->cdb_size = 10;
        softc->minimum_command_size = 10;
        xpt_print_path(ccb->ccb_h.path);
-       printf("%s(6) failed, increasing minimum CDB size to 10 bytes\n",
+       kprintf("%s(6) failed, increasing minimum CDB size to 10 bytes\n",
               (cdb[0] == MODE_SENSE_6) ? "MODE_SENSE" : "MODE_SELECT");
 
        if (cdb[0] == MODE_SENSE_6) {
@@ -3467,7 +3467,7 @@ cdgetmode(struct cam_periph *periph, struct cd_mode_params *data,
                 */
                if (data_len > data->alloc_len) {
                        xpt_print_path(periph->path);
-                       printf("allocated modepage %d length %d < returned "
+                       kprintf("allocated modepage %d length %d < returned "
                               "length %d\n", page, data->alloc_len, data_len);
 
                        error = ENOSPC;
@@ -3930,7 +3930,7 @@ cdreportkey(struct cam_periph *periph, struct dvd_authinfo *authinfo)
 
        if (ccb->csio.resid != 0) {
                xpt_print_path(periph->path);
-               printf("warning, residual for report key command is %d\n",
+               kprintf("warning, residual for report key command is %d\n",
                       ccb->csio.resid);
        }
 
index 8d28d06..711cf32 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.20.2.2 2000/10/31 08:09:49 dwmalone Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.18 2006/12/20 18:14:34 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.19 2006/12/22 23:12:16 swildner Exp $
  */
 /*
  * Derived from the NetBSD SCSI changer driver.
@@ -235,7 +235,7 @@ chinit(void)
         */
        chperiphs = cam_extend_new();
        if (chperiphs == NULL) {
-               printf("ch: Failed to alloc extend array!\n");
+               kprintf("ch: Failed to alloc extend array!\n");
                return;
        }
 
@@ -260,7 +260,7 @@ chinit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("ch: Failed to attach master async callback "
+               kprintf("ch: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
 }
@@ -287,7 +287,7 @@ choninvalidate(struct cam_periph *periph)
        softc->flags |= CH_FLAG_INVALID;
 
        xpt_print_path(periph->path);
-       printf("lost device\n");
+       kprintf("lost device\n");
 
 }
 
@@ -301,7 +301,7 @@ chcleanup(struct cam_periph *periph)
        devstat_remove_entry(&softc->device_stats);
        cam_extend_release(chperiphs, periph->unit_number);
        xpt_print_path(periph->path);
-       printf("removing device entry\n");
+       kprintf("removing device entry\n");
        dev_ops_remove(&ch_ops, -1, periph->unit_number);
        kfree(softc, M_DEVBUF);
 }
@@ -336,7 +336,7 @@ chasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
 
                if (status != CAM_REQ_CMP
                 && status != CAM_REQ_INPROG)
-                       printf("chasync: Unable to probe new device "
+                       kprintf("chasync: Unable to probe new device "
                               "due to status 0x%x\n", status);
 
                break;
@@ -357,12 +357,12 @@ chregister(struct cam_periph *periph, void *arg)
 
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("chregister: periph was NULL!!\n");
+               kprintf("chregister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
 
        if (cgd == NULL) {
-               printf("chregister: no getdev CCB, can't register device\n");
+               kprintf("chregister: no getdev CCB, can't register device\n");
                return(CAM_REQ_CMP_ERR);
        }
 
@@ -648,11 +648,11 @@ chdone(struct cam_periph *periph, union ccb *done_ccb)
                                        scsi_sense_print(&done_ccb->csio);
                                else {
                                        xpt_print_path(periph->path);
-                                       printf("got CAM status %#x\n",
+                                       kprintf("got CAM status %#x\n",
                                               done_ccb->ccb_h.status);
                                }
                                xpt_print_path(periph->path);
-                               printf("fatal error, failed to attach to"
+                               kprintf("fatal error, failed to attach to"
                                       " device\n");
 
                                cam_periph_invalidate(periph);
@@ -1042,7 +1042,7 @@ copy_element_status(struct ch_softc *softc,
                }
 
                if (!(ces->ces_flags & CES_SOURCE_VALID))
-                       printf("ch: warning: could not map element source "
+                       kprintf("ch: warning: could not map element source "
                               "address %ud to a valid element type\n",
                               eaddr);
        }
@@ -1167,7 +1167,7 @@ chgetelemstatus(struct cam_periph *periph,
 
        if (avail != cesr->cesr_element_count) {
                xpt_print_path(periph->path);
-               printf("warning, READ ELEMENT STATUS avail != count\n");
+               kprintf("warning, READ ELEMENT STATUS avail != count\n");
        }
 
        user_data = (struct changer_element_status *)
@@ -1402,7 +1402,7 @@ chgetparams(struct cam_periph *periph)
 
                if (error) {
                        xpt_print_path(periph->path);
-                       printf("chgetparams: error getting element "
+                       kprintf("chgetparams: error getting element "
                               "address page\n");
                        xpt_release_ccb(ccb);
                        kfree(mode_buffer, M_TEMP);
@@ -1465,7 +1465,7 @@ chgetparams(struct cam_periph *periph)
 
                if (error) {
                        xpt_print_path(periph->path);
-                       printf("chgetparams: error getting device "
+                       kprintf("chgetparams: error getting device "
                               "capabilities page\n");
                        xpt_release_ccb(ccb);
                        kfree(mode_buffer, M_TEMP);
index e4c8a31..b8f886c 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.46 2003/10/21 22:18:19 thomas Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.33 2006/12/20 18:14:34 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.34 2006/12/22 23:12:16 swildner Exp $
  */
 
 #ifdef _KERNEL
@@ -689,7 +689,7 @@ daclose(struct dev_close_args *ap)
                                        scsi_sense_print(&ccb->csio);
                        } else {
                                xpt_print_path(periph->path);
-                               printf("Synchronize cache failed, status "
+                               kprintf("Synchronize cache failed, status "
                                       "== 0x%x, scsi status == 0x%x\n",
                                       ccb->csio.ccb_h.status,
                                       ccb->csio.scsi_status);
@@ -891,12 +891,12 @@ dadump(struct dev_dump_args *ap)
                xpt_polled_action((union ccb *)&csio);
 
                if ((csio.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
-                       printf("Aborting dump due to I/O error.\n");
+                       kprintf("Aborting dump due to I/O error.\n");
                        if ((csio.ccb_h.status & CAM_STATUS_MASK) ==
                             CAM_SCSI_STATUS_ERROR)
                                scsi_sense_print(&csio);
                        else
-                               printf("status == 0x%x, scsi status == 0x%x\n",
+                               kprintf("status == 0x%x, scsi status == 0x%x\n",
                                       csio.ccb_h.status, csio.scsi_status);
                        return(EIO);
                }
@@ -941,7 +941,7 @@ dadump(struct dev_dump_args *ap)
                                        scsi_sense_print(&csio);
                        } else {
                                xpt_print_path(periph->path);
-                               printf("Synchronize cache failed, status "
+                               kprintf("Synchronize cache failed, status "
                                       "== 0x%x, scsi status == 0x%x\n",
                                       csio.ccb_h.status, csio.scsi_status);
                        }
@@ -962,7 +962,7 @@ dainit(void)
        daperiphs = cam_extend_new();
        SLIST_INIT(&softc_list);
        if (daperiphs == NULL) {
-               printf("da: Failed to alloc extend array!\n");
+               kprintf("da: Failed to alloc extend array!\n");
                return;
        }
 
@@ -989,7 +989,7 @@ dainit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("da: Failed to attach master async callback "
+               kprintf("da: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        } else {
 
@@ -1004,7 +1004,7 @@ dainit(void)
                /* Register our shutdown event handler */
                if ((EVENTHANDLER_REGISTER(shutdown_post_sync, dashutdown, 
                                           NULL, SHUTDOWN_PRI_DEFAULT)) == NULL)
-                   printf("dainit: shutdown event registration failed!\n");
+                   kprintf("dainit: shutdown event registration failed!\n");
        }
 }
 
@@ -1055,7 +1055,7 @@ daoninvalidate(struct cam_periph *periph)
        SLIST_REMOVE(&softc_list, softc, da_softc, links);
 
        xpt_print_path(periph->path);
-       printf("lost device\n");
+       kprintf("lost device\n");
 }
 
 static void
@@ -1068,14 +1068,14 @@ dacleanup(struct cam_periph *periph)
        devstat_remove_entry(&softc->device_stats);
        cam_extend_release(daperiphs, periph->unit_number);
        xpt_print_path(periph->path);
-       printf("removing device entry\n");
+       kprintf("removing device entry\n");
        /*
         * If we can't free the sysctl tree, oh well...
         */
        if ((softc->flags & DA_FLAG_SCTX_INIT) != 0
            && sysctl_ctx_free(&softc->sysctl_ctx) != 0) {
                xpt_print_path(periph->path);
-               printf("can't remove sysctl context\n");
+               kprintf("can't remove sysctl context\n");
        }
        if (softc->disk.d_rawdev) {
                disk_destroy(&softc->disk);
@@ -1116,7 +1116,7 @@ daasync(void *callback_arg, u_int32_t code,
 
                if (status != CAM_REQ_CMP
                 && status != CAM_REQ_INPROG)
-                       printf("daasync: Unable to attach to new device "
+                       kprintf("daasync: Unable to attach to new device "
                                "due to status 0x%x\n", status);
                break;
        }
@@ -1164,7 +1164,7 @@ dasysctlinit(void *context, int pending)
                SYSCTL_STATIC_CHILDREN(_kern_cam_da), OID_AUTO, tmpstr2,
                CTLFLAG_RD, 0, tmpstr);
        if (softc->sysctl_tree == NULL) {
-               printf("dasysctlinit: unable to allocate sysctl tree\n");
+               kprintf("dasysctlinit: unable to allocate sysctl tree\n");
                return;
        }
 
@@ -1222,12 +1222,12 @@ daregister(struct cam_periph *periph, void *arg)
 
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("daregister: periph was NULL!!\n");
+               kprintf("daregister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
 
        if (cgd == NULL) {
-               printf("daregister: no getdev CCB, can't register device\n");
+               kprintf("daregister: no getdev CCB, can't register device\n");
                return(CAM_REQ_CMP_ERR);
        }
 
@@ -1474,7 +1474,7 @@ cmd6workaround(union ccb *ccb)
                return 0;
 
        xpt_print_path(ccb->ccb_h.path);
-       printf("READ(6)/WRITE(6) not supported, "
+       kprintf("READ(6)/WRITE(6) not supported, "
               "increasing minimum_cmd_size to 10.\n");
        softc = (struct da_softc *)xpt_path_periph(ccb->ccb_h.path)->softc;
        softc->minimum_cmd_size = 10;
@@ -1553,7 +1553,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
                                         *     change first.
                                         */
                                        xpt_print_path(periph->path);
-                                       printf("Invalidating pack\n");
+                                       kprintf("Invalidating pack\n");
                                        softc->flags |= DA_FLAG_PACK_INVALID;
                                }
 
@@ -1700,12 +1700,12 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
                                                        &done_ccb->csio);
                                        else {
                                                xpt_print_path(periph->path);
-                                               printf("got CAM status %#x\n",
+                                               kprintf("got CAM status %#x\n",
                                                       done_ccb->ccb_h.status);
                                        }
 
                                        xpt_print_path(periph->path);
-                                       printf("fatal error, failed" 
+                                       kprintf("fatal error, failed" 
                                               " to attach to device\n");
 
                                        /*
@@ -1944,7 +1944,7 @@ dashutdown(void * arg, int howto)
                                        scsi_sense_print(&ccb.csio);
                        } else {
                                xpt_print_path(periph->path);
-                               printf("Synchronize cache failed, status "
+                               kprintf("Synchronize cache failed, status "
                                       "== 0x%x, scsi status == 0x%x\n",
                                       ccb.ccb_h.status, ccb.csio.scsi_status);
                        }
index efae248..7c9cce0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * $FreeBSD: src/sys/cam/scsi/scsi_low.c,v 1.1.2.5 2003/08/09 06:18:30 non Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_low.c,v 1.17 2006/12/20 18:14:34 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_low.c,v 1.18 2006/12/22 23:12:16 swildner Exp $
  * $NetBSD: scsi_low.c,v 1.24.10.8 2001/06/26 07:39:44 honda Exp $
  */
 
@@ -152,7 +152,7 @@ static struct scsi_low_softc_tab sl_tab = LIST_HEAD_INITIALIZER(sl_tab);
 #ifdef SCSI_LOW_INFO_DETAIL
 #define        SCSI_LOW_INFO(slp, ti, s) scsi_low_info((slp), (ti), (s))
 #else  /* !SCSI_LOW_INFO_DETAIL */
-#define        SCSI_LOW_INFO(slp, ti, s) printf("%s: %s\n", (slp)->sl_xname, (s))
+#define        SCSI_LOW_INFO(slp, ti, s) kprintf("%s: %s\n", (slp)->sl_xname, (s))
 #endif /* !SCSI_LOW_INFO_DETAIL */
 
 #ifdef SCSI_LOW_STATICS
@@ -440,7 +440,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
 #ifdef SCSI_LOW_DEBUG
        if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_ACTION, target) != 0)
        {
-               printf("%s: cam_action: func code 0x%x target: %d, lun: %d\n",
+               kprintf("%s: cam_action: func code 0x%x target: %d, lun: %d\n",
                        slp->sl_xname, ccb->ccb_h.func_code, target, lun);
        }
 #endif /* SCSI_LOW_DEBUG */
@@ -450,7 +450,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
                if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD)
                {
-                       printf("%s: invalid target/lun\n", slp->sl_xname);
+                       kprintf("%s: invalid target/lun\n", slp->sl_xname);
                        ccb->ccb_h.status = CAM_REQ_INVALID;
                        xpt_done(ccb);
                        return;
@@ -503,7 +503,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
                if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD)
                {
-                       printf("%s: invalid target/lun\n", slp->sl_xname);
+                       kprintf("%s: invalid target/lun\n", slp->sl_xname);
                        ccb->ccb_h.status = CAM_REQ_INVALID;
                        xpt_done(ccb);
                        return;
@@ -529,7 +529,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
                if (target == CAM_TARGET_WILDCARD)
                {
-                       printf("%s: invalid target\n", slp->sl_xname);
+                       kprintf("%s: invalid target\n", slp->sl_xname);
                        ccb->ccb_h.status = CAM_REQ_INVALID;
                        xpt_done(ccb);
                        return;
@@ -605,7 +605,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
 #ifdef SCSI_LOW_DIAGNOSTIC
                if (target == CAM_TARGET_WILDCARD)
                {
-                       printf("%s: invalid target\n", slp->sl_xname);
+                       kprintf("%s: invalid target\n", slp->sl_xname);
                        ccb->ccb_h.status = CAM_REQ_INVALID;
                        xpt_done(ccb);
                        return;
@@ -627,7 +627,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
                        if (li->li_flags_valid != SCSI_LOW_LUN_FLAGS_ALL_VALID)
                        {
                                ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-                               printf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n",
+                               kprintf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n",
                                        slp->sl_xname);
                                goto settings_out;
                        }
@@ -668,7 +668,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
                        if ((li->li_flags_valid & SCSI_LOW_LUN_FLAGS_DISK_VALID) == 0)
                        {
                                ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-                               printf("%s: invalid GET_TRANS_USER_SETTINGS call\n",
+                               kprintf("%s: invalid GET_TRANS_USER_SETTINGS call\n",
                                        slp->sl_xname);
                                goto settings_out;
                        }
@@ -689,7 +689,7 @@ scsi_low_scsi_action_cam(struct cam_sim *sim, union ccb *ccb)
                        if (li->li_flags_valid != SCSI_LOW_LUN_FLAGS_ALL_VALID)
                        {
                                ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-                               printf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n",
+                               kprintf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n",
                                        slp->sl_xname);
                                goto settings_out;
                        }
@@ -749,7 +749,7 @@ settings_out:
 #ifdef SCSI_LOW_DIAGNOSTIC
                if (target == CAM_TARGET_WILDCARD)
                {
-                       printf("%s: invalid target\n", slp->sl_xname);
+                       kprintf("%s: invalid target\n", slp->sl_xname);
                        ccb->ccb_h.status = CAM_REQ_INVALID;
                        xpt_done(ccb);
                        return;
@@ -816,7 +816,7 @@ settings_out:
        }
 
        default:
-               printf("scsi_low: non support func_code = %d ",
+               kprintf("scsi_low: non support func_code = %d ",
                        ccb->ccb_h.func_code);
                ccb->ccb_h.status = CAM_REQ_INVALID;
                xpt_done(ccb);
@@ -949,7 +949,7 @@ scsi_low_done_cam(struct scsi_low_softc *slp, struct slccb *cb)
                    (scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] &
                     SCSI_LOW_CMD_ABORT_WARNING) != 0)
                {
-                       printf("%s: WARNING: scsi_low IO abort\n",
+                       kprintf("%s: WARNING: scsi_low IO abort\n",
                                slp->sl_xname);
                        scsi_low_print(slp, NULL);
                }
@@ -1084,17 +1084,17 @@ scsi_low_msg_log_show(struct scsi_low_msg_log *slmlp, char *s, int len)
 {
        int ptr, ind;
 
-       printf("%s: (%d) ", s, slmlp->slml_ptr);
+       kprintf("%s: (%d) ", s, slmlp->slml_ptr);
        for (ptr = 0; ptr < slmlp->slml_ptr; ptr ++)
        {
                for (ind = 0; ind < len && ind < sizeof(slmlp->slml_msg[0]);
                     ind ++)
                {
-                       printf("[%x]", (u_int) slmlp->slml_msg[ptr].msg[ind]);
+                       kprintf("[%x]", (u_int) slmlp->slml_msg[ptr].msg[ind]);
                }
-               printf(">");
+               kprintf(">");
        }
-       printf("\n");
+       kprintf("\n");
 }
 #endif /* SCSI_LOW_DIAGNOSTIC */
 
@@ -1419,7 +1419,7 @@ step1:
 
 bus_reset:
        cb->ccb_error |= TIMEOUTIO;
-       printf("%s: slccb (0x%lx) timeout!\n", slp->sl_xname, (u_long) cb);
+       kprintf("%s: slccb (0x%lx) timeout!\n", slp->sl_xname, (u_long) cb);
        scsi_low_info(slp, NULL, "scsi bus hangup. try to recover.");
        scsi_low_init(slp, SCSI_LOW_RESTART_HARD);
        scsi_low_start(slp);
@@ -1492,8 +1492,8 @@ scsi_low_attach(struct scsi_low_softc *slp, int openings, int ntargs, int nluns,
 
        if (ntargs > SCSI_LOW_NTARGETS)
        {
-               printf("scsi_low: %d targets are too large\n", ntargs);
-               printf("change kernel options SCSI_LOW_NTARGETS");
+               kprintf("scsi_low: %d targets are too large\n", ntargs);
+               kprintf("change kernel options SCSI_LOW_NTARGETS");
                return EINVAL;
        }
 
@@ -1535,7 +1535,7 @@ scsi_low_attach(struct scsi_low_softc *slp, int openings, int ntargs, int nluns,
        if (rv != 0)
        {
                crit_exit();
-               printf("%s: scsi_low_attach: osdep attach failed\n",
+               kprintf("%s: scsi_low_attach: osdep attach failed\n",
                        slp->sl_xname);
                return EINVAL;
        }
@@ -1545,7 +1545,7 @@ scsi_low_attach(struct scsi_low_softc *slp, int openings, int ntargs, int nluns,
        if (scsi_low_init(slp, SCSI_LOW_RESTART_HARD) != 0)
        {
                crit_exit();
-               printf("%s: scsi_low_attach: initialization failed\n",
+               kprintf("%s: scsi_low_attach: initialization failed\n",
                        slp->sl_xname);
                return EINVAL;
        }
@@ -1932,7 +1932,7 @@ scsi_low_arbit_fail(struct scsi_low_softc *slp, struct slccb *cb)
        if (slp->sl_disc == 0)
        {
 #ifdef SCSI_LOW_DIAGNOSTIC
-               printf("%s: try selection again\n", slp->sl_xname);
+               kprintf("%s: try selection again\n", slp->sl_xname);
 #endif /* SCSI_LOW_DIAGNOSTIC */
                slp->sl_retry_sel = 1;
        }
@@ -2038,7 +2038,7 @@ resume:
 #ifdef SCSI_LOW_DEBUG
                                if (scsi_low_debug & SCSI_LOW_DEBUG_SENSE)
                                {
-                                       printf("SENSE: [%x][%x][%x][%x][%x]\n",
+                                       kprintf("SENSE: [%x][%x][%x][%x][%x]\n",
                                        (u_int) cb->ccb_sense.error_code,
                                        (u_int) cb->ccb_sense.segment,
                                        (u_int) cb->ccb_sense.flags,
@@ -2211,7 +2211,7 @@ scsi_low_done(struct scsi_low_softc *slp, struct slccb *cb)
 #ifdef SCSI_LOW_DEBUG
        if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_DONE, cb->ti->ti_id) != 0)
        {
-               printf(">> SCSI_LOW_DONE_COMPLETE ===============\n");
+               kprintf(">> SCSI_LOW_DONE_COMPLETE ===============\n");
                scsi_low_print(slp, NULL);
        }
 #endif /* SCSI_LOW_DEBUG */
@@ -2226,7 +2226,7 @@ retry:
 #ifdef SCSI_LOW_DEBUG
        if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_DONE, cb->ti->ti_id) != 0)
        {
-               printf("** SCSI_LOW_DONE_RETRY ===============\n");
+               kprintf("** SCSI_LOW_DONE_RETRY ===============\n");
                scsi_low_print(slp, NULL);
        }
 #endif /* SCSI_LOW_DEBUG */
@@ -2343,11 +2343,11 @@ scsi_low_bus_reset(struct scsi_low_softc *slp)
 
        (*slp->sl_funcs->scsi_low_bus_reset) (slp);
 
-       printf("%s: try to reset scsi bus  ", slp->sl_xname);
+       kprintf("%s: try to reset scsi bus  ", slp->sl_xname);
        for (i = 0; i <= SCSI2_RESET_DELAY / TWIDDLEWAIT ; i++)
                scsi_low_twiddle_wait();
        cnputc('\b');
-       printf("\n");
+       kprintf("\n");
 }
 
 int
@@ -2356,7 +2356,7 @@ scsi_low_restart(struct scsi_low_softc *slp, int flags, u_char *s)
        int error;
 
        if (s != NULL)
-               printf("%s: scsi bus restart. reason: %s\n", slp->sl_xname, s);
+               kprintf("%s: scsi bus restart. reason: %s\n", slp->sl_xname, s);
 
        if ((error = scsi_low_init(slp, flags)) != 0)
                return error;
@@ -2392,7 +2392,7 @@ found:
 #ifdef SCSI_LOW_DEBUG
        if (SCSI_LOW_DEBUG_TEST_GO(SCSI_LOW_NEXUS_CHECK, ti->ti_id) != 0)
        {
-               printf("%s: nexus(0x%lx) abort check start\n",
+               kprintf("%s: nexus(0x%lx) abort check start\n",
                        slp->sl_xname, (u_long) cb);
                cb->ccb_flags |= (CCB_NORETRY | CCB_SILENT);
                scsi_low_revoke_ccb(slp, cb, 1);
@@ -2493,7 +2493,7 @@ scsi_low_reselected(struct scsi_low_softc *slp, u_int targ)
        return ti;
 
 world_restart:
-       printf("%s: reselect(%x:unknown) %s\n", slp->sl_xname, targ, s);
+       kprintf("%s: reselect(%x:unknown) %s\n", slp->sl_xname, targ, s);
        scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, 
                         "reselect: scsi world confused");
        return NULL;
@@ -2848,7 +2848,7 @@ scsi_low_errfunc_qtag(struct scsi_low_softc *slp, u_int msgflags)
                        slp->sl_Lnexus->li_cfgflags &= ~SCSI_LOW_QTAG;
                        scsi_low_calcf_lun(slp->sl_Lnexus);
                }
-               printf("%s: scsi_low: qtag msg rejected\n", slp->sl_xname);
+               kprintf("%s: scsi_low: qtag msg rejected\n", slp->sl_xname);
        }
        return 0;
 }
@@ -2871,7 +2871,7 @@ scsi_low_msgout(struct scsi_low_softc *slp, struct targ_info *ti, u_int fl)
        slp->sl_ph_count ++;
        if (slp->sl_ph_count > SCSI_LOW_MAX_PHCHANGES)
        {
-               printf("%s: too many phase changes\n", slp->sl_xname);
+               kprintf("%s: too many phase changes\n", slp->sl_xname);
                slp->sl_error |= FATALIO;
                scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 0);
        }
@@ -2896,7 +2896,7 @@ scsi_low_msgout(struct scsi_low_softc *slp, struct targ_info *ti, u_int fl)
                ti->ti_msgflags |= ti->ti_omsgflags;
                ti->ti_omsgflags = 0;
 #ifdef SCSI_LOW_DIAGNOSTIC
-               printf("%s: scsi_low_msgout: retry msgout\n", slp->sl_xname);
+               kprintf("%s: scsi_low_msgout: retry msgout\n", slp->sl_xname);
 #endif /* SCSI_LOW_DIAGNOSTIC */
        }
 
@@ -2968,7 +2968,7 @@ scsi_low_msginfunc_rejop(struct scsi_low_softc *slp)
        struct targ_info *ti = slp->sl_Tnexus;
        u_int8_t msg = ti->ti_msgin[0];
 
-       printf("%s: MSGIN: msg 0x%x rejected\n", slp->sl_xname, (u_int) msg);
+       kprintf("%s: MSGIN: msg 0x%x rejected\n", slp->sl_xname, (u_int) msg);
        scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_REJECT, 0);
        return 0;
 }
@@ -3160,7 +3160,7 @@ scsi_low_synch(struct scsi_low_softc *slp)
                 */
                ti->ti_maxsynch.period = 0;
                ti->ti_maxsynch.offset = 0;
-               printf("%s: target brain damaged. async transfer\n",
+               kprintf("%s: target brain damaged. async transfer\n",
                        slp->sl_xname);
                return EINVAL;
        }
@@ -3176,7 +3176,7 @@ scsi_low_synch(struct scsi_low_softc *slp)
                 * for our adapter.
                 * The adapter changes max synch and max offset.
                 */
-               printf("%s: synch neg failed. retry synch msg neg ...\n",
+               kprintf("%s: synch neg failed. retry synch msg neg ...\n",
                        slp->sl_xname);
                return error;
        }
@@ -3197,15 +3197,15 @@ scsi_low_synch(struct scsi_low_softc *slp)
                        return 0;
 #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */
 
-               printf("%s(%d:*): <%s> offset %d period %dns ",
+               kprintf("%s(%d:*): <%s> offset %d period %dns ",
                        slp->sl_xname, ti->ti_id, s, offset, period * 4);
 
                if (period != 0)
                {
                        speed = 1000 * 10 / (period * 4);
-                       printf("%d.%d M/s", speed / 10, speed % 10);
+                       kprintf("%d.%d M/s", speed / 10, speed % 10);
                }
-               printf("\n");
+               kprintf("\n");
        }
        return 0;
 }
@@ -3224,7 +3224,7 @@ scsi_low_wide(struct scsi_low_softc *slp)
                 * Current width is not acceptable for our adapter.
                 * The adapter changes max width.
                 */
-               printf("%s: wide neg failed. retry wide msg neg ...\n",
+               kprintf("%s: wide neg failed. retry wide msg neg ...\n",
                        slp->sl_xname);
                return error;
        }
@@ -3246,7 +3246,7 @@ scsi_low_wide(struct scsi_low_softc *slp)
                        return 0;
 #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */
 
-               printf("%s(%d:*): transfer width %d bits\n",
+               kprintf("%s(%d:*): transfer width %d bits\n",
                        slp->sl_xname, ti->ti_id, 1 << (3 + ti->ti_width));
        }
        return 0;
@@ -3386,7 +3386,7 @@ scsi_low_msginfunc_msg_reject(struct scsi_low_softc *slp)
 
        if (ti->ti_emsgflags != 0)
        {
-               printf("%s: msg flags [0x%x] rejected\n",
+               kprintf("%s: msg flags [0x%x] rejected\n",
                       slp->sl_xname, ti->ti_emsgflags);
                msgflags = SCSI_LOW_MSG_REJECT;
                mdp = &scsi_low_msgout_data[0];
@@ -3436,7 +3436,7 @@ scsi_low_msgin(struct scsi_low_softc *slp, struct targ_info *ti, u_int c)
                slp->sl_ph_count ++;
                if (slp->sl_ph_count > SCSI_LOW_MAX_PHCHANGES)
                {
-                       printf("%s: too many phase changes\n", slp->sl_xname);
+                       kprintf("%s: too many phase changes\n", slp->sl_xname);
                        slp->sl_error |= FATALIO;
                        scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 0);
                }
@@ -3597,7 +3597,7 @@ scsi_low_disconnected(struct scsi_low_softc *slp, struct targ_info *ti)
 #ifdef SCSI_LOW_DEBUG
                if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_DISC, ti->ti_id) != 0)
                {
-                       printf("## SCSI_LOW_DISCONNECTED ===============\n");
+                       kprintf("## SCSI_LOW_DISCONNECTED ===============\n");
                        scsi_low_print(slp, NULL);
                }
 #endif /* SCSI_LOW_DEBUG */
@@ -3911,7 +3911,7 @@ scsi_low_calcf_target(struct targ_info *ti)
 #ifdef SCSI_LOW_DEBUG
        if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_CALCF, ti->ti_id) != 0)
        {
-               printf("%s(%d:*): max period(%dns) offset(%d) width(%d)\n",
+               kprintf("%s(%d:*): max period(%dns) offset(%d) width(%d)\n",
                        slp->sl_xname, ti->ti_id,
                        ti->ti_maxsynch.period * 4,
                        ti->ti_maxsynch.offset,
@@ -3926,7 +3926,7 @@ scsi_low_calcf_show(struct lun_info *li)
        struct targ_info *ti = li->li_ti;
        struct scsi_low_softc *slp = ti->ti_sc;
 
-       printf("%s(%d:%d): period(%d ns) offset(%d) width(%d) flags 0x%b\n",
+       kprintf("%s(%d:%d): period(%d ns) offset(%d) width(%d) flags 0x%b\n",
                slp->sl_xname, ti->ti_id, li->li_lun,
                ti->ti_maxsynch.period * 4,
                ti->ti_maxsynch.offset,
@@ -3948,7 +3948,7 @@ scsi_low_start_up(struct scsi_low_softc *slp)
        struct slccb *cb;
        int target, lun;
 
-       printf("%s: scsi_low: probing all devices ....\n", slp->sl_xname);
+       kprintf("%s: scsi_low: probing all devices ....\n", slp->sl_xname);
 
        for (target = 0; target < slp->sl_ntargs; target ++)
        {
@@ -3956,7 +3956,7 @@ scsi_low_start_up(struct scsi_low_softc *slp)
                {
                        if ((slp->sl_show_result & SHOW_PROBE_RES) != 0)
                        {
-                               printf("%s: scsi_low: target %d (host card)\n",
+                               kprintf("%s: scsi_low: target %d (host card)\n",
                                        slp->sl_xname, target);
                        }
                        continue;
@@ -3964,7 +3964,7 @@ scsi_low_start_up(struct scsi_low_softc *slp)
 
                if ((slp->sl_show_result & SHOW_PROBE_RES) != 0)
                {
-                       printf("%s: scsi_low: target %d lun ",
+                       kprintf("%s: scsi_low: target %d lun ",
                                slp->sl_xname, target);
                }
 
@@ -3989,13 +3989,13 @@ scsi_low_start_up(struct scsi_low_softc *slp)
 
                        if ((slp->sl_show_result & SHOW_PROBE_RES) != 0)
                        {
-                               printf("%d ", lun);             
+                               kprintf("%d ", lun);            
                        }
                }
 
                if ((slp->sl_show_result & SHOW_PROBE_RES) != 0)
                {
-                       printf("\n");
+                       kprintf("\n");
                }
        }
        return 0;
@@ -4038,7 +4038,7 @@ scsi_low_test_abort(struct scsi_low_softc *slp, struct targ_info *ti,
                acb = TAILQ_FIRST(&li->li_discq); 
                if (scsi_low_abort_ccb(slp, acb) == 0)
                {
-                       printf("%s: aborting ccb(0x%lx) start\n",
+                       kprintf("%s: aborting ccb(0x%lx) start\n",
                                slp->sl_xname, (u_long) acb);
                }
        }
@@ -4050,7 +4050,7 @@ scsi_low_test_atten(struct scsi_low_softc *slp, struct targ_info *ti, u_int msg)
        if (slp->sl_ph_count < SCSI_LOW_MAX_ATTEN_CHECK)
                scsi_low_assert_msg(slp, ti, msg, 0);
        else
-               printf("%s: atten check OK\n", slp->sl_xname);
+               kprintf("%s: atten check OK\n", slp->sl_xname);
 }
 
 static void
@@ -4076,7 +4076,7 @@ scsi_low_info(struct scsi_low_softc *slp, struct targ_info *ti, u_char *s)
        if (s == NULL)
                s = "no message";
 
-       printf(">>>>> SCSI_LOW_INFO(0x%lx): %s\n", (u_long) slp->sl_Tnexus, s);
+       kprintf(">>>>> SCSI_LOW_INFO(0x%lx): %s\n", (u_long) slp->sl_Tnexus, s);
        if (ti == NULL)
        {
                for (ti = TAILQ_FIRST(&slp->sl_titab); ti != NULL;
@@ -4117,7 +4117,7 @@ scsi_low_print(struct scsi_low_softc *slp, struct targ_info *ti)
        }
        sp = &slp->sl_scp;
 
-       printf("%s: === NEXUS T(0x%lx) L(0x%lx) Q(0x%lx) NIO(%d) ===\n",
+       kprintf("%s: === NEXUS T(0x%lx) L(0x%lx) Q(0x%lx) NIO(%d) ===\n",
                slp->sl_xname, (u_long) ti, (u_long) li, (u_long) cb,
                slp->sl_nio);
 
@@ -4135,7 +4135,7 @@ scsi_low_print(struct scsi_low_softc *slp, struct targ_info *ti)
                        nqio = li->li_nqio;
                }
 
-               printf("%s(%d:%d) ph<%s> => ph<%s> DISC(%d) QIO(%d:%d)\n",
+               kprintf("%s(%d:%d) ph<%s> => ph<%s> DISC(%d) QIO(%d:%d)\n",
                        slp->sl_xname,
                       ti->ti_id, lun, phase[(int) ti->ti_ophase], 
                       phase[(int) ti->ti_phase], ti->ti_disc,
@@ -4143,7 +4143,7 @@ scsi_low_print(struct scsi_low_softc *slp, struct targ_info *ti)
 
                if (cb != NULL)
                {
-printf("CCB: cmd[0] 0x%x clen 0x%x dlen 0x%x<0x%x stat 0x%x err %b\n",
+kprintf("CCB: cmd[0] 0x%x clen 0x%x dlen 0x%x<0x%x stat 0x%x err %b\n",
                       (u_int) cb->ccb_scp.scp_cmd[0],
                       cb->ccb_scp.scp_cmdlen, 
                       cb->ccb_datalen,
@@ -4152,7 +4152,7 @@ printf("CCB: cmd[0] 0x%x clen 0x%x dlen 0x%x<0x%x stat 0x%x err %b\n",
                       cb->ccb_error, SCSI_LOW_ERRORBITS);
                }
 
-printf("MSGIN: ptr(%x) [%x][%x][%x][%x][%x] attention: %d\n",
+kprintf("MSGIN: ptr(%x) [%x][%x][%x][%x][%x] attention: %d\n",
               (u_int) (ti->ti_msginptr), 
               (u_int) (ti->ti_msgin[0]),
               (u_int) (ti->ti_msgin[1]),
@@ -4161,7 +4161,7 @@ printf("MSGIN: ptr(%x) [%x][%x][%x][%x][%x] attention: %d\n",
               (u_int) (ti->ti_msgin[4]),
               slp->sl_atten);
 
-printf("MSGOUT: msgflags 0x%x [%x][%x][%x][%x][%x] msgoutlen %d C_FLAGS: %b\n",
+kprintf("MSGOUT: msgflags 0x%x [%x][%x][%x][%x][%x] msgoutlen %d C_FLAGS: %b\n",
                (u_int) ti->ti_msgflags,
                (u_int) (ti->ti_msgoutstr[0]), 
                (u_int) (ti->ti_msgoutstr[1]), 
@@ -4178,7 +4178,7 @@ printf("MSGOUT: msgflags 0x%x [%x][%x][%x][%x][%x] msgoutlen %d C_FLAGS: %b\n",
 
        }
 
-       printf("SCB: daddr 0x%lx dlen 0x%x stat 0x%x err %b\n",
+       kprintf("SCB: daddr 0x%lx dlen 0x%x stat 0x%x err %b\n",
               (u_long) sp->scp_data,
               sp->scp_datalen,
               (u_int) sp->scp_status,
index 4084f39..d4863a7 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.19 2000/01/17 06:27:37 mjacob Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_pass.c,v 1.18 2006/09/10 01:26:32 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_pass.c,v 1.19 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -136,7 +136,7 @@ passinit(void)
         */
        passperiphs = cam_extend_new();
        if (passperiphs == NULL) {
-               printf("passm: Failed to alloc extend array!\n");
+               kprintf("passm: Failed to alloc extend array!\n");
                return;
        }
 
@@ -161,7 +161,7 @@ passinit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("pass: Failed to attach master async callback "
+               kprintf("pass: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
        
@@ -213,7 +213,7 @@ passoninvalidate(struct cam_periph *periph)
 
        if (bootverbose) {
                xpt_print_path(periph->path);
-               printf("lost device\n");
+               kprintf("lost device\n");
        }
 
 }
@@ -231,7 +231,7 @@ passcleanup(struct cam_periph *periph)
 
        if (bootverbose) {
                xpt_print_path(periph->path);
-               printf("removing device entry\n");
+               kprintf("removing device entry\n");
        }
        dev_ops_remove(&pass_ops, -1, periph->unit_number);
        kfree(softc, M_DEVBUF);
@@ -265,7 +265,7 @@ passasync(void *callback_arg, u_int32_t code,
 
                if (status != CAM_REQ_CMP
                 && status != CAM_REQ_INPROG)
-                       printf("passasync: Unable to attach new device "
+                       kprintf("passasync: Unable to attach new device "
                                "due to status 0x%x\n", status);
 
                break;
@@ -285,12 +285,12 @@ passregister(struct cam_periph *periph, void *arg)
 
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("passregister: periph was NULL!!\n");
+               kprintf("passregister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
 
        if (cgd == NULL) {
-               printf("passregister: no getdev CCB, can't register device\n");
+               kprintf("passregister: no getdev CCB, can't register device\n");
                return(CAM_REQ_CMP_ERR);
        }
 
@@ -385,7 +385,7 @@ passopen(struct dev_open_args *ap)
         */
        if ((ap->a_oflags & O_NONBLOCK) != 0) {
                xpt_print_path(periph->path);
-               printf("can't do nonblocking accesss\n");
+               kprintf("can't do nonblocking accesss\n");
                crit_exit();
                return(EINVAL);
        }
@@ -668,7 +668,7 @@ passioctl(struct dev_ioctl_args *ap)
                 */
                if (inccb->ccb_h.func_code & XPT_FC_XPT_ONLY) {
                        xpt_print_path(periph->path);
-                       printf("CCB function code %#x is restricted to the "
+                       kprintf("CCB function code %#x is restricted to the "
                               "XPT device\n", inccb->ccb_h.func_code);
                        error = ENODEV;
                        break;
@@ -696,7 +696,7 @@ passioctl(struct dev_ioctl_args *ap)
 
                if (ccb == NULL) {
                        xpt_print_path(periph->path);
-                       printf("unable to allocate CCB\n");
+                       kprintf("unable to allocate CCB\n");
                        error = ENOMEM;
                        break;
                }
index 6b0da57..e8c1538 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.17 2000/01/17 06:27:37 mjacob Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_pt.c,v 1.17 2006/09/10 01:26:32 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_pt.c,v 1.18 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -280,7 +280,7 @@ ptinit(void)
         */
        ptperiphs = cam_extend_new();
        if (ptperiphs == NULL) {
-               printf("pt: Failed to alloc extend array!\n");
+               kprintf("pt: Failed to alloc extend array!\n");
                return;
        }
        
@@ -305,7 +305,7 @@ ptinit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("pt: Failed to attach master async callback "
+               kprintf("pt: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
 }
@@ -319,12 +319,12 @@ ptctor(struct cam_periph *periph, void *arg)
 
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("ptregister: periph was NULL!!\n");
+               kprintf("ptregister: periph was NULL!!\n");
                return(CAM_REQ_CMP_ERR);
        }
 
        if (cgd == NULL) {
-               printf("ptregister: no getdev CCB, can't register device\n");
+               kprintf("ptregister: no getdev CCB, can't register device\n");
                return(CAM_REQ_CMP_ERR);
        }
 
@@ -416,7 +416,7 @@ ptoninvalidate(struct cam_periph *periph)
        crit_exit();
 
        xpt_print_path(periph->path);
-       printf("lost device\n");
+       kprintf("lost device\n");
 }
 
 static void
@@ -430,7 +430,7 @@ ptdtor(struct cam_periph *periph)
 
        cam_extend_release(ptperiphs, periph->unit_number);
        xpt_print_path(periph->path);
-       printf("removing device entry\n");
+       kprintf("removing device entry\n");
        dev_ops_remove(&pt_ops, -1, periph->unit_number);
        kfree(softc, M_DEVBUF);
 }
@@ -464,7 +464,7 @@ ptasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
 
                if (status != CAM_REQ_CMP
                 && status != CAM_REQ_INPROG)
-                       printf("ptasync: Unable to attach to new device "
+                       kprintf("ptasync: Unable to attach to new device "
                                "due to status 0x%x\n", status);
                break;
        }
@@ -606,7 +606,7 @@ ptdone(struct cam_periph *periph, union ccb *done_ccb)
                                         * as invalid.
                                         */
                                        xpt_print_path(periph->path);
-                                       printf("Invalidating device\n");
+                                       kprintf("Invalidating device\n");
                                        softc->flags |= PT_FLAG_DEVICE_INVALID;
                                }
 
index b65f611..48f7e93 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * $FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.45.2.13 2002/12/17 17:08:50 trhodes Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.20 2006/09/10 01:26:32 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.21 2006/12/22 23:12:16 swildner Exp $
  *
  * Implementation of SCSI Sequential Access Peripheral driver for CAM.
  *
@@ -546,7 +546,7 @@ saclose(struct dev_close_args *ap)
        error = sacheckeod(periph);
        if (error) {
                xpt_print_path(periph->path);
-               printf("failed to write terminating filemark(s)\n");
+               kprintf("failed to write terminating filemark(s)\n");
                softc->flags |= SA_FLAG_TAPE_FROZEN;
        }
 
@@ -602,10 +602,10 @@ saclose(struct dev_close_args *ap)
                        tmp = saspace(periph, -1, SS_FILEMARKS);
                        if (tmp) {
                                xpt_print_path(periph->path);
-                               printf("unable to backspace over one of double"
+                               kprintf("unable to backspace over one of double"
                                   " filemarks at end of tape\n");
                                xpt_print_path(periph->path);
-                               printf("it is possible that this device"
+                               kprintf("it is possible that this device"
                                   " needs a SA_QUIRK_1FM quirk set for it\n");
                                softc->flags |= SA_FLAG_TAPE_FROZEN;
                        }
@@ -634,7 +634,7 @@ saclose(struct dev_close_args *ap)
         */
        if (softc->flags & SA_FLAG_TAPE_FROZEN) {
                xpt_print_path(periph->path);
-               printf("tape is now frozen- use an OFFLINE, REWIND or MTEOM "
+               kprintf("tape is now frozen- use an OFFLINE, REWIND or MTEOM "
                    "command to clear this state.\n");
        }
        
@@ -708,7 +708,7 @@ sastrategy(struct dev_strategy_args *ap)
                    ((softc->blk_mask == ~0) &&
                    ((bp->b_bcount % softc->min_blk) != 0))) {
                        xpt_print_path(periph->path);
-                       printf("Invalid request.  Fixed block device "
+                       kprintf("Invalid request.  Fixed block device "
                               "requests must be a multiple "
                               "of %d bytes\n", softc->media_blksize);
                        bp->b_error = EINVAL;
@@ -719,12 +719,12 @@ sastrategy(struct dev_strategy_args *ap)
                   (bp->b_bcount & softc->blk_mask) != 0) {
 
                xpt_print_path(periph->path);
-               printf("Invalid request.  Variable block device "
+               kprintf("Invalid request.  Variable block device "
                    "requests must be ");
                if (softc->blk_mask != 0) {
-                       printf("a multiple of %d ", (0x1 << softc->blk_gran));
+                       kprintf("a multiple of %d ", (0x1 << softc->blk_gran));
                }
-               printf("between %d and %d bytes\n", softc->min_blk,
+               kprintf("between %d and %d bytes\n", softc->min_blk,
                    softc->max_blk);
                bp->b_error = EINVAL;
                goto bad;
@@ -1008,7 +1008,7 @@ saioctl(struct dev_ioctl_args *ap)
                        error = sacheckeod(periph);
                        if (error) {
                                xpt_print_path(periph->path);
-                               printf("EOD check prior to spacing failed\n");
+                               kprintf("EOD check prior to spacing failed\n");
                                softc->flags |= SA_FLAG_EIO_PENDING;
                                break;
                        }
@@ -1246,7 +1246,7 @@ saioctl(struct dev_ioctl_args *ap)
                        softc->blkno = (daddr_t) -1;
                        softc->flags &= ~SA_FLAG_TAPE_FROZEN;
                        xpt_print_path(periph->path);
-                       printf("tape state now unfrozen.\n");
+                       kprintf("tape state now unfrozen.\n");
                        break;
                default:
                        break;
@@ -1269,7 +1269,7 @@ sainit(void)
         */
        saperiphs = cam_extend_new();
        if (saperiphs == NULL) {
-               printf("sa: Failed to alloc extend array!\n");
+               kprintf("sa: Failed to alloc extend array!\n");
                return;
        }
        
@@ -1296,7 +1296,7 @@ sainit(void)
        }
 
        if (status != CAM_REQ_CMP) {
-               printf("sa: Failed to attach master async callback "
+               kprintf("sa: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
 }
@@ -1347,7 +1347,7 @@ saoninvalidate(struct cam_periph *periph)
        crit_exit();
 
        xpt_print_path(periph->path);
-       printf("lost device\n");
+       kprintf("lost device\n");
 
 }
 
@@ -1362,7 +1362,7 @@ sacleanup(struct cam_periph *periph)
 
        cam_extend_release(saperiphs, periph->unit_number);
        xpt_print_path(periph->path);
-       printf("removing device entry\n");
+       kprintf("removing device entry\n");
        dev_ops_remove(&sa_ops, SA_UNITMASK, SA_UNIT(periph->unit_number));
        kfree(softc, M_DEVBUF);
 }
@@ -1399,7 +1399,7 @@ saasync(void *callback_arg, u_int32_t code,
 
                if (status != CAM_REQ_CMP
                 && status != CAM_REQ_INPROG)
-                       printf("saasync: Unable to probe new device "
+                       kprintf("saasync: Unable to probe new device "
                                "due to status 0x%x\n", status);
                break;
        }
@@ -1420,12 +1420,12 @@ saregister(struct cam_periph *periph, void *arg)
        
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("saregister: periph was NULL!!\n");
+               kprintf("saregister: periph was NULL!!\n");
                return (CAM_REQ_CMP_ERR);
        }
 
        if (cgd == NULL) {
-               printf("saregister: no getdev CCB, can't register device\n");
+               kprintf("saregister: no getdev CCB, can't register device\n");
                return (CAM_REQ_CMP_ERR);
        }
 
@@ -1453,7 +1453,7 @@ saregister(struct cam_periph *periph, void *arg)
                    ((struct sa_quirk_entry *)match)->prefblk;
 #ifdef CAMDEBUG
                xpt_print_path(periph->path);
-               printf("found quirk entry %d\n", (int)
+               kprintf("found quirk entry %d\n", (int)
                    (((struct sa_quirk_entry *) match) - sa_quirk_table));
 #endif
        } else
@@ -1616,7 +1616,7 @@ again:
                                } else {
                                        bp->b_error = EIO;
                                        xpt_print_path(periph->path);
-                                       printf("zero blocksize for "
+                                       kprintf("zero blocksize for "
                                            "FIXED length writes?\n");
                                        crit_exit();
                                        biodone(bio);
@@ -1846,7 +1846,7 @@ samount(struct cam_periph *periph, int oflags, cdev_t dev)
                        softc->flags &= ~SA_FLAG_TAPE_MOUNTED;
                        if (CAM_DEBUGGED(ccb->ccb_h.path, CAM_DEBUG_INFO)) {
                                xpt_print_path(ccb->ccb_h.path);
-                               printf("error %d on TUR in samount\n", error);
+                               kprintf("error %d on TUR in samount\n", error);
                        }
                }
        } else {
@@ -1924,7 +1924,7 @@ samount(struct cam_periph *periph, int oflags, cdev_t dev)
                        QFRLS(ccb);
                        if (error) {
                                xpt_print_path(ccb->ccb_h.path);
-                               printf("unable to rewind after test read\n");
+                               kprintf("unable to rewind after test read\n");
                                xpt_release_ccb(ccb);
                                goto exit;
                        }
@@ -2089,7 +2089,7 @@ samount(struct cam_periph *periph, int oflags, cdev_t dev)
                    (softc->min_blk > softc->media_blksize &&
                    softc->media_blksize)) {
                        xpt_print_path(ccb->ccb_h.path);
-                       printf("BLOCK LIMITS (%d..%d) could not match current "
+                       kprintf("BLOCK LIMITS (%d..%d) could not match current "
                            "block settings (%d)- adjusting\n", softc->min_blk,
                            softc->max_blk, softc->media_blksize);
                        softc->max_blk = softc->min_blk =
@@ -2124,7 +2124,7 @@ tryagain:
                            softc->media_blksize, 0, 0, SF_NO_PRINT);
                        if (error) {
                                xpt_print_path(ccb->ccb_h.path);
-                               printf("unable to set fixed blocksize to %d\n",
+                               kprintf("unable to set fixed blocksize to %d\n",
                                     softc->media_blksize);
                                goto exit;
                        }
@@ -2151,7 +2151,7 @@ tryagain:
                                        goto tryagain;
                                }
                                xpt_print_path(ccb->ccb_h.path);
-                               printf("unable to set variable blocksize\n");
+                               kprintf("unable to set variable blocksize\n");
                                goto exit;
                        }
                }
@@ -2209,7 +2209,7 @@ tryagain:
                                softc->buffer_mode = SMH_SA_BUF_MODE_SIBUF;
                        } else {
                                xpt_print_path(ccb->ccb_h.path);
-                               printf("unable to set buffered mode\n");
+                               kprintf("unable to set buffered mode\n");
                        }
                        error = 0;      /* not an error */
                }
@@ -2455,7 +2455,7 @@ saerror(union ccb *ccb, u_int32_t cflgs, u_int32_t sflgs)
        if (error == 0 && (sense->flags & SSD_ILI)) {
                if (info < 0) {
                        xpt_print_path(csio->ccb_h.path);
-                       printf(toobig, csio->dxfer_len - info);
+                       kprintf(toobig, csio->dxfer_len - info);
                        csio->resid = csio->dxfer_len;
                        error = EIO;
                } else {
@@ -2653,10 +2653,10 @@ retry:
                int idx;
                char *xyz = mode_buffer;
                xpt_print_path(periph->path);
-               printf("Mode Sense Data=");
+               kprintf("Mode Sense Data=");
                for (idx = 0; idx < mode_buffer_len; idx++)
-                       printf(" 0x%02x", xyz[idx] & 0xff);
-               printf("\n");
+                       kprintf(" 0x%02x", xyz[idx] & 0xff);
+               kprintf("\n");
        }
 
 sagetparamsexit:
@@ -2865,7 +2865,7 @@ retry:
                         */
                        params_to_set &= ~SA_PARAM_COMPRESSION;
                        xpt_print_path(periph->path);
-                       printf("device does not seem to support compression\n");
+                       kprintf("device does not seem to support compression\n");
 
                        /*
                         * If that was the only thing the user wanted us to set,
@@ -2900,10 +2900,10 @@ retry:
                int idx;
                char *xyz = mode_buffer;
                xpt_print_path(periph->path);
-               printf("Err%d, Mode Select Data=", error);
+               kprintf("Err%d, Mode Select Data=", error);
                for (idx = 0; idx < mode_buffer_len; idx++)
-                       printf(" 0x%02x", xyz[idx] & 0xff);
-               printf("\n");
+                       kprintf(" 0x%02x", xyz[idx] & 0xff);
+               kprintf("\n");
        }
 
 
index 3a5539a..fa1c4f1 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.8.2.2 2000/08/08 23:19:21 mjacob Exp $ */
-/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.19 2006/12/18 20:41:01 dillon Exp $ */
+/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.20 2006/12/22 23:12:16 swildner Exp $ */
 /*
  * Copyright (c) 2000 Matthew Jacob
  * All rights reserved.
@@ -117,7 +117,7 @@ static int safte_set_objstat(ses_softc_t *, ses_objstat *, int);
  */
 
 #define        STRNCMP                 strncmp
-#define        PRINTF                  printf
+#define        PRINTF                  kprintf
 #define        SES_LOG                 ses_log
 #ifdef DEBUG
 #define        SES_DLOG                ses_log
@@ -198,7 +198,7 @@ sesinit(void)
         */
        sesperiphs = cam_extend_new();
        if (sesperiphs == NULL) {
-               printf("ses: Failed to alloc extend array!\n");
+               kprintf("ses: Failed to alloc extend array!\n");
                return;
        }
 
@@ -223,7 +223,7 @@ sesinit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("ses: Failed to attach master async callback "
+               kprintf("ses: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
 }
@@ -249,7 +249,7 @@ sesoninvalidate(struct cam_periph *periph)
        softc->ses_flags |= SES_FLAG_INVALID;
 
        xpt_print_path(periph->path);
-       printf("lost device\n");
+       kprintf("lost device\n");
 }
 
 static void
@@ -261,7 +261,7 @@ sescleanup(struct cam_periph *periph)
 
        cam_extend_release(sesperiphs, periph->unit_number);
        xpt_print_path(periph->path);
-       printf("removing device entry\n");
+       kprintf("removing device entry\n");
        dev_ops_remove(&ses_ops, -1, periph->unit_number);
        kfree(softc, M_DEVBUF);
 }
@@ -301,7 +301,7 @@ sesasync(void *callback_arg, u_int32_t code, struct cam_path *path, void *arg)
                    cgd->ccb_h.path, sesasync, AC_FOUND_DEVICE, cgd);
 
                if (status != CAM_REQ_CMP && status != CAM_REQ_INPROG) {
-                       printf("sesasync: Unable to probe new device due to "
+                       kprintf("sesasync: Unable to probe new device due to "
                            "status 0x%x\n", status);
                }
                break;
@@ -322,12 +322,12 @@ sesregister(struct cam_periph *periph, void *arg)
 
        cgd = (struct ccb_getdev *)arg;
        if (periph == NULL) {
-               printf("sesregister: periph was NULL!!\n");
+               kprintf("sesregister: periph was NULL!!\n");
                return (CAM_REQ_CMP_ERR);
        }
 
        if (cgd == NULL) {
-               printf("sesregister: no getdev CCB, can't register device\n");
+               kprintf("sesregister: no getdev CCB, can't register device\n");
                return (CAM_REQ_CMP_ERR);
        }
 
@@ -707,7 +707,7 @@ ses_log(struct ses_softc *ssc, const char *fmt, ...)
 {
        __va_list ap;
 
-       printf("%s%d: ", ssc->periph->periph_name, ssc->periph->unit_number);
+       kprintf("%s%d: ", ssc->periph->periph_name, ssc->periph->unit_number);
        __va_start(ap, fmt);
        kvprintf(fmt, ap);
        __va_end(ap);
index d7f4ed1..d8049dc 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_targ_bh.c,v 1.4.2.6 2003/11/14 11:31:25 simokawa Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_targ_bh.c,v 1.12 2006/09/05 00:55:33 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_targ_bh.c,v 1.13 2006/12/22 23:12:16 swildner Exp $
  */
 #include <sys/param.h>
 #include <sys/queue.h>
@@ -176,7 +176,7 @@ targbhinit(void)
         }
 
        if (status != CAM_REQ_CMP) {
-               printf("targbh: Failed to attach master async callback "
+               kprintf("targbh: Failed to attach master async callback "
                       "due to status 0x%x!\n", status);
        }
 }
@@ -203,7 +203,7 @@ targbhasync(void *callback_arg, u_int32_t code,
                                 bus_path_id,
                                 CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
        if (status != CAM_REQ_CMP) {
-               printf("targbhasync: Unable to create path "
+               kprintf("targbhasync: Unable to create path "
                        "due to status 0x%x\n", status);
                return;
        }
@@ -262,7 +262,7 @@ targbhenlun(struct cam_periph *periph)
        status = immed_ccb.ccb_h.status;
        if (status != CAM_REQ_CMP) {
                xpt_print_path(periph->path);
-               printf("targbhenlun - Enable Lun Rejected with status 0x%x\n",
+               kprintf("targbhenlun - Enable Lun Rejected with status 0x%x\n",
                       status);
                return (status);
        }
@@ -297,7 +297,7 @@ targbhenlun(struct cam_periph *periph)
 
        if (i == 0) {
                xpt_print_path(periph->path);
-               printf("targbhenlun - Could not allocate accept tio CCBs: "
+               kprintf("targbhenlun - Could not allocate accept tio CCBs: "
                       "status = 0x%x\n", status);
                targbhdislun(periph);
                return (CAM_REQ_CMP_ERR);
@@ -327,7 +327,7 @@ targbhenlun(struct cam_periph *periph)
 
        if (i == 0) {
                xpt_print_path(periph->path);
-               printf("targbhenlun - Could not allocate immediate notify "
+               kprintf("targbhenlun - Could not allocate immediate notify "
                       "CCBs: status = 0x%x\n", status);
                targbhdislun(periph);
                return (CAM_REQ_CMP_ERR);
@@ -378,7 +378,7 @@ targbhdislun(struct cam_periph *periph)
        xpt_action(&ccb);
 
        if (ccb.cel.ccb_h.status != CAM_REQ_CMP)
-               printf("targbhdislun - Disabling lun on controller failed "
+               kprintf("targbhdislun - Disabling lun on controller failed "
                       "with status 0x%x\n", ccb.cel.ccb_h.status);
        else 
                softc->flags &= ~TARGBH_FLAG_LUN_ENABLED;
@@ -674,7 +674,7 @@ targbhdone(struct cam_periph *periph, union ccb *done_ccb)
        {
                if (softc->state == TARGBH_STATE_TEARDOWN
                 || done_ccb->ccb_h.status == CAM_REQ_ABORTED) {
-                       printf("Freed an immediate notify\n");
+                       kprintf("Freed an immediate notify\n");
                        kfree(done_ccb, M_DEVBUF);
                }
                break;
index a78dd09..2affe76 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.22.2.7 2003/02/18 22:07:10 njl Exp $
- * $DragonFly: src/sys/bus/cam/scsi/scsi_target.c,v 1.13 2006/09/10 01:26:32 dillon Exp $
+ * $DragonFly: src/sys/bus/cam/scsi/scsi_target.c,v 1.14 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -239,7 +239,7 @@ targioctl(cdev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
                                         new_lun->target_id,
                                         new_lun->lun_id);
                if (status != CAM_REQ_CMP) {
-                       printf("Couldn't create path, status %#x\n", status);
+                       kprintf("Couldn't create path, status %#x\n", status);
                        break;
                }
                status = targenable(softc, path, new_lun->grp6_len,
@@ -369,7 +369,7 @@ targendislun(struct cam_path *path, int enable, int grp6_len, int grp7_len)
        status = en_ccb.ccb_h.status & CAM_STATUS_MASK;
        if (status != CAM_REQ_CMP) {
                xpt_print_path(path);
-               printf("%sable lun CCB rejected, status %#x\n",
+               kprintf("%sable lun CCB rejected, status %#x\n",
                       enable ? "en" : "dis", status);
        }
        return (status);
@@ -393,11 +393,11 @@ targenable(struct targ_softc *softc, struct cam_path *path, int grp6_len,
        xpt_action((union ccb *)&cpi);
        status = cpi.ccb_h.status & CAM_STATUS_MASK;
        if (status != CAM_REQ_CMP) {
-               printf("pathinq failed, status %#x\n", status);
+               kprintf("pathinq failed, status %#x\n", status);
                goto enable_fail;
        }
        if ((cpi.target_sprt & PIT_PROCESSOR) == 0) {
-               printf("controller does not support target mode\n");
+               kprintf("controller does not support target mode\n");
                status = CAM_FUNC_NOTAVAIL;
                goto enable_fail;
        }
@@ -412,7 +412,7 @@ targenable(struct targ_softc *softc, struct cam_path *path, int grp6_len,
                        cam_periph_invalidate(del_softc->periph);
                        del_softc->periph = NULL;
                } else {
-                       printf("Requested path still in use by targ%d\n",
+                       kprintf("Requested path still in use by targ%d\n",
                               periph->unit_number);
                        status = CAM_LUN_ALRDY_ENA;
                        goto enable_fail;
@@ -423,7 +423,7 @@ targenable(struct targ_softc *softc, struct cam_path *path, int grp6_len,
        status = cam_periph_alloc(targctor, NULL, targdtor, targstart,
                        "targ", CAM_PERIPH_BIO, path, targasync, 0, softc);
        if (status != CAM_REQ_CMP) {
-               printf("cam_periph_alloc failed, status %#x\n", status);
+               kprintf("cam_periph_alloc failed, status %#x\n", status);
                goto enable_fail;
        }
 
@@ -436,7 +436,7 @@ targenable(struct targ_softc *softc, struct cam_path *path, int grp6_len,
        /* Send the enable lun message */
        status = targendislun(path, /*enable*/1, grp6_len, grp7_len);
        if (status != CAM_REQ_CMP) {
-               printf("enable lun failed, status %#x\n", status);
+               kprintf("enable lun failed, status %#x\n", status);
                goto enable_fail;
        }
        softc->state |= TARG_STATE_LUN_ENABLED;
@@ -467,7 +467,7 @@ targdisable(struct targ_softc *softc)
        if (status == CAM_REQ_CMP)
                softc->state &= ~TARG_STATE_LUN_ENABLED;
        else
-               printf("Disable lun failed, status %#x\n", status);
+               kprintf("Disable lun failed, status %#x\n", status);
 
        return (status);
 }
@@ -632,7 +632,7 @@ targstart(struct cam_periph *periph, union ccb *start_ccb)
                        error = targsendccb(softc, start_ccb, descr);
                if (error != 0) {
                        xpt_print_path(periph->path);
-                       printf("targsendccb failed, err %d\n", error);
+                       kprintf("targsendccb failed, err %d\n", error);
                        xpt_release_ccb(start_ccb);
                        suword(&descr->user_ccb->ccb_h.status,
                               CAM_REQ_CMP_ERR);
@@ -936,7 +936,7 @@ targreturnccb(struct targ_softc *softc, union ccb *ccb)
        error = copyout(&ccb->ccb_h + 1, u_ccbh + 1, ccb_len);
        if (error != 0) {
                xpt_print_path(softc->path);
-               printf("targreturnccb - CCB copyout failed (%d)\n",
+               kprintf("targreturnccb - CCB copyout failed (%d)\n",
                       error);
        }
        /* Free CCB or send back to devq. */
@@ -1046,7 +1046,7 @@ abort_all_pending(struct targ_softc *softc)
                xpt_action((union ccb *)&cab);
                if (cab.ccb_h.status != CAM_REQ_CMP) {
                        xpt_print_path(cab.ccb_h.path);
-                       printf("Unable to abort CCB, status %#x\n",
+                       kprintf("Unable to abort CCB, status %#x\n",
                               cab.ccb_h.status);
                }
        }
index 34891eb..a75336c 100644 (file)
@@ -29,7 +29,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/eisa/eisaconf.c,v 1.55 2000/01/14 07:13:57 peter Exp $
- * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.10 2006/12/20 18:14:35 dillon Exp $
+ * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.11 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include "opt_eisa.h"
@@ -219,21 +219,21 @@ eisa_reg_print(device_t dev, char *string, char *separator, int *column)
        length += (separator ? 2 : 1);
 
        if (((*column) + length) >= MAX_COL) {
-               printf("\n");
+               kprintf("\n");
                (*column) = 0;
        } else if ((*column) != 0) {
                if (separator) {
-                       printf("%c", *separator);
+                       kprintf("%c", *separator);
                        (*column)++;
                }
-               printf(" ");
+               kprintf(" ");
                (*column)++;
        }
 
        if ((*column) == 0) {
                (*column) += device_printf(dev, "%s", string);
        } else {
-               (*column) += printf("%s", string);
+               (*column) += kprintf("%s", string);
        }
 
        return;
index b76c8d5..ca8ac4c 100644 (file)
@@ -32,7 +32,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  * 
  * $FreeBSD: src/sys/dev/firewire/firewire.c,v 1.68 2004/01/08 14:58:09 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/firewire.c,v 1.17 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/firewire.c,v 1.18 2006/12/22 23:12:16 swildner Exp $
  *
  */
 
@@ -205,7 +205,7 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer)
 
        if(xfer == NULL) return EINVAL;
        if(xfer->act.hand == NULL){
-               printf("act.hand == NULL\n");
+               kprintf("act.hand == NULL\n");
                return EINVAL;
        }
        fp = &xfer->send.hdr;
@@ -213,7 +213,7 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer)
        tcode = fp->mode.common.tcode & 0xf;
        info = &fc->tcode[tcode];
        if (info->flag == 0) {
-               printf("invalid tcode=%x\n", tcode);
+               kprintf("invalid tcode=%x\n", tcode);
                return EINVAL;
        }
        if (info->flag & FWTI_REQ)
@@ -222,7 +222,7 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer)
                xferq = fc->ats;
        len = info->hdr_len;
        if (xfer->send.pay_len > MAXREC(fc->maxrec)) {
-               printf("send.pay_len > maxrec\n");
+               kprintf("send.pay_len > maxrec\n");
                return EINVAL;
        }
        if (info->flag & FWTI_BLOCK_STR)
@@ -232,13 +232,13 @@ fw_asyreq(struct firewire_comm *fc, int sub, struct fw_xfer *xfer)
        else
                len = 0;
        if (len != xfer->send.pay_len){
-               printf("len(%d) != send.pay_len(%d) %s(%x)\n",
+               kprintf("len(%d) != send.pay_len(%d) %s(%x)\n",
                    len, xfer->send.pay_len, tcode_str[tcode], tcode);
                return EINVAL; 
        }
 
        if(xferq->start == NULL){
-               printf("xferq->start == NULL\n");
+               kprintf("xferq->start == NULL\n");
                return EINVAL;
        }
        if(!(xferq->queued < xferq->maxq)){
@@ -277,7 +277,7 @@ fw_asy_callback(struct fw_xfer *xfer){
 void
 fw_asybusy(struct fw_xfer *xfer)
 {
-       printf("fw_asybusy\n");
+       kprintf("fw_asybusy\n");
 /*
        xfer->ch =  timeout((timeout_t *)fw_asystart, (void *)xfer, 20000);
 */
@@ -845,7 +845,7 @@ fw_bindadd(struct firewire_comm *fc, struct fw_bind *fwb)
        struct fw_bind *tfw, *prev = NULL;
 
        if (fwb->start > fwb->end) {
-               printf("%s: invalid range\n", __func__);
+               kprintf("%s: invalid range\n", __func__);
                return EINVAL;
        }
 
@@ -863,7 +863,7 @@ fw_bindadd(struct firewire_comm *fc, struct fw_bind *fwb)
                goto out;
        }
 
-       printf("%s: bind failed\n", __func__);
+       kprintf("%s: bind failed\n", __func__);
        return (EBUSY);
 
 out:
@@ -890,7 +890,7 @@ fw_bindremove(struct firewire_comm *fc, struct fw_bind *fwb)
                        goto found;
                }
 
-       printf("%s: no such bind\n", __func__);
+       kprintf("%s: no such bind\n", __func__);
        crit_exit();
        return (1);
 found:
@@ -944,12 +944,12 @@ fw_tl2xfer(struct firewire_comm *fc, int node, int tlabel)
                        xfer = tl->xfer;
                        crit_exit();
                        if (firewire_debug > 2)
-                               printf("fw_tl2xfer: found tl=%d\n", tlabel);
+                               kprintf("fw_tl2xfer: found tl=%d\n", tlabel);
                        return(xfer);
                }
        }
        if (firewire_debug > 1)
-               printf("fw_tl2xfer: not found tl=%d\n", tlabel);
+               kprintf("fw_tl2xfer: not found tl=%d\n", tlabel);
        crit_exit();
        return(NULL);
 }
@@ -1004,7 +1004,7 @@ void
 fw_xfer_done(struct fw_xfer *xfer)
 {
        if (xfer->act.hand == NULL) {
-               printf("act.hand == NULL\n");
+               kprintf("act.hand == NULL\n");
                return;
        }
 
@@ -1019,7 +1019,7 @@ fw_xfer_unload(struct fw_xfer* xfer)
 {
        if(xfer == NULL ) return;
        if(xfer->state == FWXF_INQ){
-               printf("fw_xfer_free FWXF_INQ\n");
+               kprintf("fw_xfer_free FWXF_INQ\n");
                crit_enter();
                STAILQ_REMOVE(&xfer->q->q, xfer, fw_xfer, link);
                xfer->q->queued --;
@@ -1033,7 +1033,7 @@ fw_xfer_unload(struct fw_xfer* xfer)
                         *  1. We call fwohci_arcv() before fwohci_txd().
                         *  2. firewire_watch() is called.
                         */
-                       printf("fw_xfer_free FWXF_START\n");
+                       kprintf("fw_xfer_free FWXF_START\n");
 #endif
                fw_tl_free(xfer->fc, xfer);
        }
@@ -1048,7 +1048,7 @@ void
 fw_xfer_free_buf( struct fw_xfer* xfer)
 {
        if (xfer == NULL) {
-               printf("%s: xfer == NULL\n", __func__);
+               kprintf("%s: xfer == NULL\n", __func__);
                return;
        }
        fw_xfer_unload(xfer);
@@ -1065,7 +1065,7 @@ void
 fw_xfer_free( struct fw_xfer* xfer)
 {
        if (xfer == NULL) {
-               printf("%s: xfer == NULL\n", __func__);
+               kprintf("%s: xfer == NULL\n", __func__);
                return;
        }
        fw_xfer_unload(xfer);
@@ -1076,7 +1076,7 @@ void
 fw_asy_callback_free(struct fw_xfer *xfer)
 {
 #if 0
-       printf("asyreq done state=%d resp=%d\n",
+       kprintf("asyreq done state=%d resp=%d\n",
                                xfer->state, xfer->resp);
 #endif
        fw_xfer_free(xfer);
@@ -1111,7 +1111,7 @@ fw_phy_config(struct firewire_comm *fc, int root_node, int gap_count)
        fp->mode.common.tcode |= FWTCODE_PHY;
 
        if (firewire_debug)
-               printf("send phy_config root_node=%d gap_count=%d\n",
+               kprintf("send phy_config root_node=%d gap_count=%d\n",
                                                root_node, gap_count);
        fw_asyreq(fc, -1, xfer);
 }
@@ -1125,7 +1125,7 @@ fw_print_sid(u_int32_t sid)
 {
        union fw_self_id *s;
        s = (union fw_self_id *) &sid;
-       printf("node:%d link:%d gap:%d spd:%d del:%d con:%d pwr:%d"
+       kprintf("node:%d link:%d gap:%d spd:%d del:%d con:%d pwr:%d"
                " p0:%d p1:%d p2:%d i:%d m:%d\n",
                s->p0.phy_id, s->p0.link_active, s->p0.gap_count,
                s->p0.phy_speed, s->p0.phy_delay, s->p0.contender,
@@ -1158,7 +1158,7 @@ fw_sidrcv(struct firewire_comm* fc, u_int32_t *sid, u_int len)
        self_id = &fc->topology_map->self_id[0];
        for(i = 0; i < fc->sid_cnt; i ++){
                if (sid[1] != ~sid[0]) {
-                       printf("fw_sidrcv: invalid self-id packet\n");
+                       kprintf("fw_sidrcv: invalid self-id packet\n");
                        sid += 2;
                        continue;
                }
@@ -1223,16 +1223,16 @@ fw_sidrcv(struct firewire_comm* fc, u_int32_t *sid, u_int len)
        bcopy(p, &CSRARC(fc, SPED_MAP + 8), (fc->speed_map->crc_len - 1)*4);
 
        fc->max_hop = fc->max_node - i_branch;
-       printf(", maxhop <= %d", fc->max_hop);
+       kprintf(", maxhop <= %d", fc->max_hop);
                
        if(fc->irm == -1 ){
-               printf(", Not found IRM capable node");
+               kprintf(", Not found IRM capable node");
        }else{
-               printf(", cable IRM = %d", fc->irm);
+               kprintf(", cable IRM = %d", fc->irm);
                if (fc->irm == fc->nodeid)
-                       printf(" (me)");
+                       kprintf(" (me)");
        }
-       printf("\n");
+       kprintf("\n");
 
        if (try_bmr && (fc->irm != -1) && (CSRARC(fc, BUS_MGR_ID) == 0x3f)) {
                if (fc->irm == fc->nodeid) {
@@ -1303,7 +1303,7 @@ loop:
        /* XXX we need to check phy_id first */
        if (!fc->topology_map->self_id[fc->ongonode].p0.link_active) {
                if (firewire_debug)
-                       printf("node%d: link down\n", fc->ongonode);
+                       kprintf("node%d: link down\n", fc->ongonode);
                fc->ongonode++;
                goto loop;
        }
@@ -1386,7 +1386,7 @@ dorequest:
        xfer->act.hand = fw_bus_explore_callback;
 
        if (firewire_debug)
-               printf("node%d: explore addr=0x%x\n",
+               kprintf("node%d: explore addr=0x%x\n",
                                fc->ongonode, fc->ongoaddr);
        err = fw_asyreq(fc, -1, xfer);
        if(err){
@@ -1399,7 +1399,7 @@ done:
        /* fw_attach_devs */
        fc->status = FWBUSEXPDONE;
        if (firewire_debug)
-               printf("bus_explore done\n");
+               kprintf("bus_explore done\n");
        fw_attach_dev(fc);
        return;
 
@@ -1458,17 +1458,17 @@ fw_bus_explore_callback(struct fw_xfer *xfer)
 
        
        if(xfer == NULL) {
-               printf("xfer == NULL\n");
+               kprintf("xfer == NULL\n");
                return;
        }
        fc = xfer->fc;
 
        if (firewire_debug)
-               printf("node%d: callback addr=0x%x\n",
+               kprintf("node%d: callback addr=0x%x\n",
                        fc->ongonode, fc->ongoaddr);
 
        if(xfer->resp != 0){
-               printf("node%d: resp=%d addr=0x%x\n",
+               kprintf("node%d: resp=%d addr=0x%x\n",
                        fc->ongonode, xfer->resp, fc->ongoaddr);
                goto errnode;
        }
@@ -1480,12 +1480,12 @@ fw_bus_explore_callback(struct fw_xfer *xfer)
                u_int32_t *qld;
                int i;
                qld = (u_int32_t *)xfer->recv.buf;
-               printf("len:%d\n", xfer->recv.len);
+               kprintf("len:%d\n", xfer->recv.len);
                for( i = 0 ; i <= xfer->recv.len && i < 32; i+= 4){
-                       printf("0x%08x ", rfp->mode.ld[i/4]);
-                       if((i % 16) == 15) printf("\n");
+                       kprintf("0x%08x ", rfp->mode.ld[i/4]);
+                       if((i % 16) == 15) kprintf("\n");
                }
-               if((i % 16) != 15) printf("\n");
+               if((i % 16) != 15) kprintf("\n");
        }
 #endif
        if(fc->ongodev == NULL){
@@ -1495,7 +1495,7 @@ fw_bus_explore_callback(struct fw_xfer *xfer)
 /* If CSR is minimal confinguration, more investgation is not needed. */
                        if(chdr->info_len == 1){
                                if (firewire_debug)
-                                       printf("node%d: minimal config\n",
+                                       kprintf("node%d: minimal config\n",
                                                                fc->ongonode);
                                goto nextnode;
                        }else{
@@ -1508,7 +1508,7 @@ fw_bus_explore_callback(struct fw_xfer *xfer)
                        fc->ongoeui.lo = ntohl(rfp->mode.rresq.data);
                        if (fc->ongoeui.hi == 0 && fc->ongoeui.lo == 0) {
                                if (firewire_debug)
-                                       printf("node%d: eui64 is zero.\n",
+                                       kprintf("node%d: eui64 is zero.\n",
                                                        fc->ongonode);
                                goto nextnode;
                        }
@@ -1648,7 +1648,7 @@ fw_attach_dev(struct firewire_comm *fc)
        kfree(devlistp, M_TEMP);
 
        if (fc->retry_count > 0) {
-               printf("probe failed for %d node\n", fc->retry_count);
+               kprintf("probe failed for %d node\n", fc->retry_count);
 #if 0
                callout_reset(&fc->retry_probe_callout, hz*2,
                                        (void *)fc->ibr, (void *)fc);
@@ -1682,14 +1682,14 @@ fw_get_tlabel(struct firewire_comm *fc, struct fw_xfer *xfer)
                        STAILQ_INSERT_TAIL(&fc->tlabels[label], tl, link);
                        crit_exit();
                        if (firewire_debug > 1)
-                               printf("fw_get_tlabel: dst=%d tl=%d\n",
+                               kprintf("fw_get_tlabel: dst=%d tl=%d\n",
                                    xfer->send.hdr.mode.hdr.dst, label);
                        return(label);
                }
        }
        crit_exit();
 
-       printf("fw_get_tlabel: no free tlabel\n");
+       kprintf("fw_get_tlabel: no free tlabel\n");
        return(-1);
 }
 
@@ -1732,7 +1732,7 @@ fw_rcv_copy(struct fw_rcv_buf *rb)
        for (i = 0; i < rb->nvec; i++, rb->vec++) {
                len = MIN(rb->vec->iov_len, plen);
                if (res < len) {
-                       printf("rcv buffer(%d) is %d bytes short.\n",
+                       kprintf("rcv buffer(%d) is %d bytes short.\n",
                            rb->xfer->recv.pay_len, len - res);
                        len = res;
                }
@@ -1762,12 +1762,12 @@ fw_rcv(struct fw_rcv_buf *rb)
                u_int32_t *qld;
                int i;
                qld = (u_int32_t *)buf;
-               printf("spd %d len:%d\n", spd, len);
+               kprintf("spd %d len:%d\n", spd, len);
                for( i = 0 ; i <= len && i < 32; i+= 4){
-                       printf("0x%08x ", ntohl(qld[i/4]));
-                       if((i % 16) == 15) printf("\n");
+                       kprintf("0x%08x ", ntohl(qld[i/4]));
+                       if((i % 16) == 15) kprintf("\n");
                }
-               if((i % 16) != 15) printf("\n");
+               if((i % 16) != 15) kprintf("\n");
        }
 #endif
        fp = (struct fw_pkt *)rb->vec[0].iov_base;
@@ -1780,7 +1780,7 @@ fw_rcv(struct fw_rcv_buf *rb)
                rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src,
                                        fp->mode.hdr.tlrt >> 2);
                if(rb->xfer == NULL) {
-                       printf("fw_rcv: unknown response "
+                       kprintf("fw_rcv: unknown response "
                            "%s(%x) src=0x%x tl=0x%x rt=%d data=0x%x\n",
                            tcode_str[tcode], tcode,
                            fp->mode.hdr.src,
@@ -1788,11 +1788,11 @@ fw_rcv(struct fw_rcv_buf *rb)
                            fp->mode.hdr.tlrt & 3,
                            fp->mode.rresq.data);
 #if 1
-                       printf("try ad-hoc work around!!\n");
+                       kprintf("try ad-hoc work around!!\n");
                        rb->xfer = fw_tl2xfer(rb->fc, fp->mode.hdr.src,
                                        (fp->mode.hdr.tlrt >> 2)^3);
                        if (rb->xfer == NULL) {
-                               printf("no use...\n");
+                               kprintf("no use...\n");
                                goto err;
                        }
 #else
@@ -1814,11 +1814,11 @@ fw_rcv(struct fw_rcv_buf *rb)
                case FWXF_START:
 #if 0
                        if (firewire_debug)
-                               printf("not sent yet tl=%x\n", rb->xfer->tl);
+                               kprintf("not sent yet tl=%x\n", rb->xfer->tl);
 #endif
                        break;
                default:
-                       printf("unexpected state %d\n", rb->xfer->state);
+                       kprintf("unexpected state %d\n", rb->xfer->state);
                }
                return;
        case FWTCODE_WREQQ:
@@ -1829,13 +1829,13 @@ fw_rcv(struct fw_rcv_buf *rb)
                bind = fw_bindlookup(rb->fc, fp->mode.rreqq.dest_hi,
                        fp->mode.rreqq.dest_lo);
                if(bind == NULL){
-                       printf("Unknown service addr 0x%04x:0x%08x %s(%x)"
+                       kprintf("Unknown service addr 0x%04x:0x%08x %s(%x)"
                            " src=0x%x data=%x\n",
                            fp->mode.wreqq.dest_hi, fp->mode.wreqq.dest_lo,
                            tcode_str[tcode], tcode,
                            fp->mode.hdr.src, ntohl(fp->mode.wreqq.data));
                        if (rb->fc->status == FWBUSRESET) {
-                               printf("fw_rcv: cannot respond(bus reset)!\n");
+                               kprintf("fw_rcv: cannot respond(bus reset)!\n");
                                goto err;
                        }
                        rb->xfer = fw_xfer_alloc(M_FWXFER);
@@ -1884,7 +1884,7 @@ fw_rcv(struct fw_rcv_buf *rb)
                        crit_enter();
                        rb->xfer = STAILQ_FIRST(&bind->xferlist);
                        if (rb->xfer == NULL) {
-                               printf("Discard a packet for this bind.\n");
+                               kprintf("Discard a packet for this bind.\n");
                                crit_exit();
                                goto err;
                        }
@@ -1906,7 +1906,7 @@ fw_rcv(struct fw_rcv_buf *rb)
                        crit_enter();
                        rb->xfer = STAILQ_FIRST(&bind->xferlist);
                        if (rb->xfer == NULL) {
-                               printf("Discard packet for this bind\n");
+                               kprintf("Discard packet for this bind\n");
                                goto err;
                        }
                        STAILQ_REMOVE_HEAD(&bind->xferlist, link);
@@ -1934,11 +1934,11 @@ fw_rcv(struct fw_rcv_buf *rb)
 
                xferq = rb->fc->ir[sub];
 #if 0
-               printf("stream rcv dma %d len %d off %d spd %d\n",
+               kprintf("stream rcv dma %d len %d off %d spd %d\n",
                        sub, len, off, spd);
 #endif
                if(xferq->queued >= xferq->maxq) {
-                       printf("receive queue is full\n");
+                       kprintf("receive queue is full\n");
                        goto err;
                }
                /* XXX get xfer from xfer queue, we don't need copy for 
@@ -1970,7 +1970,7 @@ fw_rcv(struct fw_rcv_buf *rb)
        }
 #endif
        default:
-               printf("fw_rcv: unknow tcode %d\n", tcode);
+               kprintf("fw_rcv: unknow tcode %d\n", tcode);
                break;
        }
 err:
@@ -2061,9 +2061,9 @@ fw_vmaccess(struct fw_xfer *xfer){
        struct fw_pkt *rfp, *sfp = NULL;
        u_int32_t *ld = (u_int32_t *)xfer->recv.buf;
 
-       printf("vmaccess spd:%2x len:%03x data:%08x %08x %08x %08x\n",
+       kprintf("vmaccess spd:%2x len:%03x data:%08x %08x %08x %08x\n",
                        xfer->spd, xfer->recv.len, ntohl(ld[0]), ntohl(ld[1]), ntohl(ld[2]), ntohl(ld[3]));
-       printf("vmaccess          data:%08x %08x %08x %08x\n", ntohl(ld[4]), ntohl(ld[5]), ntohl(ld[6]), ntohl(ld[7]));
+       kprintf("vmaccess          data:%08x %08x %08x %08x\n", ntohl(ld[4]), ntohl(ld[5]), ntohl(ld[6]), ntohl(ld[7]));
        if(xfer->resp != 0){
                fw_xfer_free( xfer);
                return;
@@ -2173,10 +2173,10 @@ fw_bmr(struct firewire_comm *fc)
        device_printf(fc->bdev, "bus manager %d ", CSRARC(fc, BUS_MGR_ID));
        if(CSRARC(fc, BUS_MGR_ID) != fc->nodeid) {
                /* We are not the bus manager */
-               printf("\n");
+               kprintf("\n");
                return(0);
        }
-       printf("(me)\n");
+       kprintf("(me)\n");
 
        /* Optimize gapcount */
        if(fc->max_hop <= MAX_GAPHOP )
index cbe9382..114c94f 100644 (file)
@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/bus/firewire/fwcrom.c,v 1.8 2006/12/20 18:14:36 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwcrom.c,v 1.9 2006/12/22 23:12:16 swildner Exp $
  */
 
 #ifndef __DragonFly__
@@ -54,6 +54,7 @@ __FBSDID("$FreeBSD: src/sys/dev/firewire/fwcrom.c,v 1.9 2003/10/02 04:06:55 simo
 #include <stdlib.h>
 #include <string.h>
 #define ksnprintf      snprintf        /* sigh. used by fwcontrol */
+#define kprintf                printf
 #endif
 
 #ifdef __DragonFly__
@@ -81,7 +82,7 @@ crom_init_context(struct crom_context *cc, u_int32_t *p)
                 * situation where one host gets the root directory for
                 * another before the other has actually initialized it.
                 */
-               printf("crom_init_context: WARNING, info_len is 0\n");
+               kprintf("crom_init_context: WARNING, info_len is 0\n");
                cc->depth = -1;
                return;
        }
@@ -121,7 +122,7 @@ crom_next(struct crom_context *cc)
        reg = crom_get(cc);
        if ((reg->key & CSRTYPE_MASK) == CSRTYPE_D) {
                if (cc->depth >= CROM_MAX_DEPTH) {
-                       printf("crom_next: too deep\n");
+                       kprintf("crom_next: too deep\n");
                        goto again;
                }
                cc->depth ++;
@@ -140,7 +141,7 @@ check:
                return;
 
        if (ptr->index < ptr->dir->crc_len)
-               printf("crom_next: bound check failed\n");
+               kprintf("crom_next: bound check failed\n");
 
        if (cc->depth > 0) {
                cc->depth--;
@@ -406,7 +407,7 @@ crom_add_quad(struct crom_chunk *chunk, u_int32_t entry)
 
        index = chunk->data.crc_len;
        if (index >= CROM_MAX_CHUNK_LEN - 1) {
-               printf("too large chunk %d\n", index);
+               kprintf("too large chunk %d\n", index);
                return(-1);
        }
        chunk->data.buf[index] = entry;
@@ -460,9 +461,9 @@ crom_add_simple_text(struct crom_src *src, struct crom_chunk *parent,
        len = strlen(buf);
        if (len > MAX_TEXT) {
 #if defined(__DragonFly__) || __FreeBSD_version < 500000
-               printf("text(%d) trancated to %d.\n", len, MAX_TEXT);
+               kprintf("text(%d) trancated to %d.\n", len, MAX_TEXT);
 #else
-               printf("text(%d) trancated to %td.\n", len, MAX_TEXT);
+               kprintf("text(%d) trancated to %td.\n", len, MAX_TEXT);
 #endif
                len = MAX_TEXT;
        }
@@ -484,7 +485,7 @@ static int
 crom_copy(u_int32_t *src, u_int32_t *dst, int *offset, int len, int maxlen)
 {
        if (*offset + len > maxlen) {
-               printf("Config. ROM is too large for the buffer\n");
+               kprintf("Config. ROM is too large for the buffer\n");
                return(-1);
        }
        bcopy(src, (char *)(dst + *offset), len * sizeof(u_int32_t));
@@ -640,7 +641,7 @@ main(int argc, char *argv[])
        p = buf;
 #define DUMP_FORMAT     "%08x %08x %08x %08x %08x %08x %08x %08x\n"
        for (i = 0; i < 256/8; i ++) {
-               printf(DUMP_FORMAT,
+               kprintf(DUMP_FORMAT,
                        p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
                p += 8;
        }
index a6e3085..485d049 100644 (file)
@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/bus/firewire/fwdma.c,v 1.8 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwdma.c,v 1.9 2006/12/22 23:12:16 swildner Exp $
  */
 
 #ifndef __DragonFly__
@@ -67,7 +67,7 @@ fwdma_map_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error)
        bus_addr_t *baddr;
 
        if (error)
-               printf("fwdma_map_cb: error=%d\n", error);
+               kprintf("fwdma_map_cb: error=%d\n", error);
        baddr = (bus_addr_t *)arg;
        *baddr = segs->ds_addr;
 }
@@ -96,14 +96,14 @@ fwdma_malloc(struct firewire_comm *fc, int alignment, bus_size_t size,
 #endif
                &dma->dma_tag);
        if (err) {
-               printf("fwdma_malloc: failed(1)\n");
+               kprintf("fwdma_malloc: failed(1)\n");
                return(NULL);
        }
 
        err = bus_dmamem_alloc(dma->dma_tag, &dma->v_addr,
                flag, &dma->dma_map);
        if (err) {
-               printf("fwdma_malloc: failed(2)\n");
+               kprintf("fwdma_malloc: failed(2)\n");
                /* XXX destory tag */
                return(NULL);
        }
@@ -130,7 +130,7 @@ fwdma_malloc_size(bus_dma_tag_t dmat, bus_dmamap_t *dmamap,
        void *v_addr;
 
        if (bus_dmamem_alloc(dmat, &v_addr, flag, dmamap)) {
-               printf("fwdma_malloc_size: failed(1)\n");
+               kprintf("fwdma_malloc_size: failed(1)\n");
                return(NULL);
        }
        bus_dmamap_load(dmat, *dmamap, v_addr, size,
@@ -171,7 +171,7 @@ fwdma_malloc_multiseg(struct firewire_comm *fc, int alignment,
        am = (struct fwdma_alloc_multi *)kmalloc(sizeof(struct fwdma_alloc_multi)
                        + sizeof(struct fwdma_seg)*nseg, M_FW, M_WAITOK);
        if (am == NULL) {
-               printf("fwdma_malloc_multiseg: malloc failed\n");
+               kprintf("fwdma_malloc_multiseg: malloc failed\n");
                return(NULL);
        }
        am->ssize = ssize;
@@ -193,23 +193,23 @@ fwdma_malloc_multiseg(struct firewire_comm *fc, int alignment,
                        /*lockarg*/&Giant,
 #endif
                        &am->dma_tag)) {
-               printf("fwdma_malloc_multiseg: tag_create failed\n");
+               kprintf("fwdma_malloc_multiseg: tag_create failed\n");
                kfree(am, M_FW);
                return(NULL);
        }
 
 #if 0
 #if defined(__DragonFly__) || __FreeBSD_version < 500000
-       printf("malloc_multi: ssize=%d nseg=%d\n", ssize, nseg);
+       kprintf("malloc_multi: ssize=%d nseg=%d\n", ssize, nseg);
 #else
-       printf("malloc_multi: ssize=%td nseg=%d\n", ssize, nseg);
+       kprintf("malloc_multi: ssize=%td nseg=%d\n", ssize, nseg);
 #endif
 #endif
        for (seg = &am->seg[0]; nseg --; seg ++) {
                seg->v_addr = fwdma_malloc_size(am->dma_tag, &seg->dma_map,
                        ssize, &seg->bus_addr, flag);
                if (seg->v_addr == NULL) {
-                       printf("fwdma_malloc_multi: malloc_size failed %d\n",
+                       kprintf("fwdma_malloc_multi: malloc_size failed %d\n",
                                am->nseg);
                        fwdma_free_multiseg(am);
                        return(NULL);
index 67ae7a8..a36e7fc 100644 (file)
@@ -31,7 +31,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/bus/firewire/fwmem.c,v 1.14 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwmem.c,v 1.15 2006/12/22 23:12:16 swildner Exp $
  */
 
 #ifndef __DragonFly__
@@ -150,7 +150,7 @@ fwmem_read_quad(
        xfer->recv.payload = (u_int32_t *)data;
 
        if (fwmem_debug)
-               printf("fwmem_read_quad: %d %04x:%08x\n", fwdev->dst,
+               kprintf("fwmem_read_quad: %d %04x:%08x\n", fwdev->dst,
                                dst_hi, dst_lo);
 
        if (fw_asyreq(xfer->fc, -1, xfer) == 0)
@@ -186,7 +186,7 @@ fwmem_write_quad(
        xfer->send.payload = xfer->recv.payload = NULL;
 
        if (fwmem_debug)
-               printf("fwmem_write_quad: %d %04x:%08x %08x\n", fwdev->dst,
+               kprintf("fwmem_write_quad: %d %04x:%08x %08x\n", fwdev->dst,
                        dst_hi, dst_lo, *(u_int32_t *)data);
 
        if (fw_asyreq(xfer->fc, -1, xfer) == 0)
@@ -225,7 +225,7 @@ fwmem_read_block(
        xfer->recv.payload = data;
 
        if (fwmem_debug)
-               printf("fwmem_read_block: %d %04x:%08x %d\n", fwdev->dst,
+               kprintf("fwmem_read_block: %d %04x:%08x %d\n", fwdev->dst,
                                dst_hi, dst_lo, len);
        if (fw_asyreq(xfer->fc, -1, xfer) == 0)
                return xfer;
@@ -263,7 +263,7 @@ fwmem_write_block(
        xfer->recv.payload = NULL;
 
        if (fwmem_debug)
-               printf("fwmem_write_block: %d %04x:%08x %d\n", fwdev->dst,
+               kprintf("fwmem_write_block: %d %04x:%08x %d\n", fwdev->dst,
                                dst_hi, dst_lo, len);
        if (fw_asyreq(xfer->fc, -1, xfer) == 0)
                return xfer;
@@ -295,7 +295,7 @@ fwmem_open (struct dev_open_args *ap)
                fms->refcount = 1;
        }
        if (fwmem_debug)
-               printf("%s: refcount=%d\n", __func__, fms->refcount);
+               kprintf("%s: refcount=%d\n", __func__, fms->refcount);
 
        return (0);
 }
@@ -309,7 +309,7 @@ fwmem_close (struct dev_close_args *ap)
        fms = (struct fwmem_softc *)dev->si_drv1;
        fms->refcount --;
        if (fwmem_debug)
-               printf("%s: refcount=%d\n", __func__, fms->refcount);
+               kprintf("%s: refcount=%d\n", __func__, fms->refcount);
        if (fms->refcount < 1) {
                kfree(dev->si_drv1, M_FW);
                dev->si_drv1 = NULL;
@@ -331,7 +331,7 @@ fwmem_biodone(struct fw_xfer *xfer)
 
        if (bp->b_error != 0) {
                if (fwmem_debug)
-                       printf("%s: err=%d\n", __func__, bp->b_error);
+                       kprintf("%s: err=%d\n", __func__, bp->b_error);
                bp->b_flags |= B_ERROR;
                bp->b_resid = bp->b_bcount;
        }
@@ -361,13 +361,13 @@ fwmem_strategy(struct dev_strategy_args *ap)
        fwdev = fw_noderesolve_eui64(sc->fc, &fms->eui);
        if (fwdev == NULL) {
                if (fwmem_debug)
-                       printf("fwmem: no such device ID:%08x%08x\n",
+                       kprintf("fwmem: no such device ID:%08x%08x\n",
                                        fms->eui.hi, fms->eui.lo);
                err = EINVAL;
                goto error;
        }
        if (bio->bio_offset == NOOFFSET) {
-               printf("fwmem: offset was not set bp %p\n", bp);
+               kprintf("fwmem: offset was not set bp %p\n", bp);
                err = EINVAL;
                goto error;
        }
@@ -406,7 +406,7 @@ error:
        crit_exit();
        if (err != 0) {
                if (fwmem_debug)
-                       printf("%s: err=%d\n", __func__, err);
+                       kprintf("%s: err=%d\n", __func__, err);
                bp->b_error = err;
                bp->b_flags |= B_ERROR;
                bp->b_resid = bp->b_bcount;
index 9fee5df..feca33d 100644 (file)
@@ -33,7 +33,7 @@
  * 
  * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.72 2004/01/22 14:41:17 simokawa Exp $
  * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.1.2.19 2003/05/01 06:24:37 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/fwohci.c,v 1.14 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwohci.c,v 1.15 2006/12/22 23:12:16 swildner Exp $
  */
 
 #define ATRQ_CH 0
@@ -519,7 +519,7 @@ fwohci_reset(struct fwohci_softc *sc, device_t dev)
                DELAY(1000);
        }
        if (bootverbose)
-               printf("done (loop=%d)\n", i);
+               kprintf("done (loop=%d)\n", i);
 
        /* Probe phy */
        fwohci_probe_phy(sc, dev);
@@ -819,7 +819,7 @@ fwohci_execute_db(void *arg, bus_dma_segment_t *segs, int nseg, int error)
        db = &db_tr->db[db_tr->dbcnt];
        if (error) {
                if (firewire_debug || error != EFBIG)
-                       printf("fwohci_execute_db: error=%d\n", error);
+                       kprintf("fwohci_execute_db: error=%d\n", error);
                return;
        }
        for (i = 0; i < nseg; i++) {
@@ -961,7 +961,7 @@ again:
                        }
                }
                if (err)
-                       printf("dmamap_load: err=%d\n", err);
+                       kprintf("dmamap_load: err=%d\n", err);
                bus_dmamap_sync(dbch->dmat, db_tr->dma_map,
                                                BUS_DMASYNC_PREWRITE);
 #if 0 /* OHCI_OUTPUT_MODE == 0 */
@@ -1120,7 +1120,7 @@ fwohci_txd(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
                        if (xfer->state == FWXF_RCVD) {
 #if 0
                                if (firewire_debug)
-                                       printf("already rcvd\n");
+                                       kprintf("already rcvd\n");
 #endif
                                fw_xfer_done(xfer);
                        } else {
@@ -1147,7 +1147,7 @@ fwohci_txd(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
                         * transcation timeout for ACKPEND case.
                         */
                } else {
-                       printf("this shouldn't happen\n");
+                       kprintf("this shouldn't happen\n");
                }
                dbch->xferq.queued --;
                tr->xfer = NULL;
@@ -1158,13 +1158,13 @@ fwohci_txd(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
                if (dbch->bottom == dbch->top) {
                        /* we reaches the end of context program */
                        if (firewire_debug && dbch->xferq.queued > 0)
-                               printf("queued > 0\n");
+                               kprintf("queued > 0\n");
                        break;
                }
        }
 out:
        if ((dbch->flags & FWOHCI_DBCH_FULL) && packets > 0) {
-               printf("make free slot\n");
+               kprintf("make free slot\n");
                dbch->flags &= ~FWOHCI_DBCH_FULL;
                fwohci_start(sc, dbch);
        }
@@ -1232,7 +1232,7 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
                kmalloc(sizeof(struct fwohcidb_tr) * dbch->ndb,
                M_FW, M_WAITOK | M_ZERO);
        if(db_tr == NULL){
-               printf("fwohci_db_init: malloc(1) failed\n");
+               kprintf("fwohci_db_init: malloc(1) failed\n");
                return;
        }
 
@@ -1240,7 +1240,7 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
        dbch->am = fwdma_malloc_multiseg(&sc->fc, DB_SIZE(dbch),
                DB_SIZE(dbch), dbch->ndb, BUS_DMA_WAITOK);
        if (dbch->am == NULL) {
-               printf("fwohci_db_init: fwdma_malloc_multiseg failed\n");
+               kprintf("fwohci_db_init: fwdma_malloc_multiseg failed\n");
                kfree(db_tr, M_FW);
                return;
        }
@@ -1253,7 +1253,7 @@ fwohci_db_init(struct fwohci_softc *sc, struct fwohci_dbch *dbch)
                /* XXX do we need 4bytes alignment tag? */
                /* XXX don't alloc dma_map for AR */
                if (bus_dmamap_create(dbch->dmat, 0, &db_tr->dma_map) != 0) {
-                       printf("bus_dmamap_create failed\n");
+                       kprintf("bus_dmamap_create failed\n");
                        dbch->flags = FWOHCI_DBCH_INIT; /* XXX fake */
                        fwohci_db_free(dbch);
                        return;
@@ -1547,7 +1547,7 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
        crit_exit();
        stat = OREAD(sc, OHCI_ITCTL(dmach));
        if (firewire_debug && (stat & OHCI_CNTL_CYCMATCH_S))
-               printf("stat 0x%x\n", stat);
+               kprintf("stat 0x%x\n", stat);
 
        if (stat & (OHCI_CNTL_DMA_ACTIVE | OHCI_CNTL_CYCMATCH_S))
                return 0;
@@ -1564,7 +1564,7 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
        OWRITE(sc, OHCI_ITCMD(dmach),
                ((struct fwohcidb_tr *)(first->start))->bus_addr | dbch->ndesc);
        if (firewire_debug) {
-               printf("fwohci_itxbuf_enable: kick 0x%08x\n", stat);
+               kprintf("fwohci_itxbuf_enable: kick 0x%08x\n", stat);
 #if 1
                dump_dma(sc, ITX_CH + dmach);
 #endif
@@ -1590,7 +1590,7 @@ fwohci_itxbuf_enable(struct firewire_comm *fc, int dmach)
                OWRITE(sc, OHCI_ITCTL(dmach), OHCI_CNTL_DMA_RUN);
 #endif
                if (firewire_debug) {
-                       printf("cycle_match: 0x%04x->0x%04x\n",
+                       kprintf("cycle_match: 0x%04x->0x%04x\n",
                                                cycle_now, cycle_match);
                        dump_dma(sc, ITX_CH + dmach);
                        dump_db(sc, ITX_CH + dmach);
@@ -1682,7 +1682,7 @@ fwohci_irx_enable(struct firewire_comm *fc, int dmach)
        }
 
        if (firewire_debug)
-               printf("start IR DMA 0x%x\n", stat);
+               kprintf("start IR DMA 0x%x\n", stat);
        OWRITE(sc, OHCI_IR_MASKCLR, 1 << dmach);
        OWRITE(sc, OHCI_IR_STATCLR, 1 << dmach);
        OWRITE(sc, OHCI_IR_MASK, 1 << dmach);
@@ -1909,15 +1909,15 @@ busresetout:
                device_printf(fc->dev, "node_id=0x%08x, gen=%d, ",
                        node_id, (plen >> 16) & 0xff);
                if (!(node_id & OHCI_NODE_VALID)) {
-                       printf("Bus reset failure\n");
+                       kprintf("Bus reset failure\n");
                        goto sidout;
                }
                if (node_id & OHCI_NODE_ROOT) {
-                       printf("CYCLEMASTER mode\n");
+                       kprintf("CYCLEMASTER mode\n");
                        OWRITE(sc, OHCI_LNKCTL,
                                OHCI_CNTL_CYCMTR | OHCI_CNTL_CYCTIMER);
                } else {
-                       printf("non CYCLEMASTER mode\n");
+                       kprintf("non CYCLEMASTER mode\n");
                        OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCMTR);
                        OWRITE(sc, OHCI_LNKCTL, OHCI_CNTL_CYCTIMER);
                }
@@ -2187,7 +2187,7 @@ fwohci_rbuf_update(struct fwohci_softc *sc, int dmach)
                                ir->bnpacket, BUS_DMASYNC_POSTREAD);
                } else {
                        /* XXX */
-                       printf("fwohci_rbuf_update: this shouldn't happend\n");
+                       kprintf("fwohci_rbuf_update: this shouldn't happend\n");
                }
 
                STAILQ_REMOVE_HEAD(&ir->stdma, link);
@@ -2321,17 +2321,17 @@ dump_db(struct fwohci_softc *sc, u_int32_t ch)
 outdb:
        if( curr != NULL){
 #if 0
-               printf("Prev DB %d\n", ch);
+               kprintf("Prev DB %d\n", ch);
                print_db(pp, prev, ch, dbch->ndesc);
 #endif
-               printf("Current DB %d\n", ch);
+               kprintf("Current DB %d\n", ch);
                print_db(cp, curr, ch, dbch->ndesc);
 #if 0
-               printf("Next DB %d\n", ch);
+               kprintf("Next DB %d\n", ch);
                print_db(np, next, ch, dbch->ndesc);
 #endif
        }else{
-               printf("dbdump err ch = %d cmd = 0x%08x\n", ch, cmd);
+               kprintf("dbdump err ch = %d cmd = 0x%08x\n", ch, cmd);
        }
        return;
 }
@@ -2345,11 +2345,11 @@ print_db(struct fwohcidb_tr *db_tr, struct fwohcidb *db,
        u_int32_t cmd, res;
 
        if(db == NULL){
-               printf("No Descriptor is found\n");
+               kprintf("No Descriptor is found\n");
                return;
        }
 
-       printf("ch = %d\n%8s %s %s %s %s %4s %8s %8s %4s:%4s\n",
+       kprintf("ch = %d\n%8s %s %s %s %s %4s %8s %8s %4s:%4s\n",
                ch,
                "Current",
                "OP  ",
@@ -2367,10 +2367,10 @@ print_db(struct fwohcidb_tr *db_tr, struct fwohcidb *db,
                key = cmd & OHCI_KEY_MASK;
                stat = res >> OHCI_STATUS_SHIFT;
 #if defined(__DragonFly__) || __FreeBSD_version < 500000
-               printf("%08x %s %s %s %s %5d %08x %08x %04x:%04x",
+               kprintf("%08x %s %s %s %s %5d %08x %08x %04x:%04x",
                                db_tr->bus_addr,
 #else
-               printf("%08jx %s %s %s %s %5d %08x %08x %04x:%04x",
+               kprintf("%08jx %s %s %s %s %5d %08x %08x %04x:%04x",
                                (uintmax_t)db_tr->bus_addr,
 #endif
                                dbcode[(cmd >> 28) & 0xf],
@@ -2383,7 +2383,7 @@ print_db(struct fwohcidb_tr *db_tr, struct fwohcidb *db,
                                stat,
                                res & OHCI_COUNT_MASK);
                if(stat & 0xff00){
-                       printf(" %s%s%s%s%s%s %s(%x)\n",
+                       kprintf(" %s%s%s%s%s%s %s(%x)\n",
                                stat & OHCI_CNTL_DMA_RUN ? "RUN," : "",
                                stat & OHCI_CNTL_DMA_WAKE ? "WAKE," : "",
                                stat & OHCI_CNTL_DMA_DEAD ? "DEAD," : "",
@@ -2394,10 +2394,10 @@ print_db(struct fwohcidb_tr *db_tr, struct fwohcidb *db,
                                stat & 0x1f
                        );
                }else{
-                       printf(" Nostat\n");
+                       kprintf(" Nostat\n");
                }
                if(key == OHCI_KEY_ST2 ){
-                       printf("0x%08x 0x%08x 0x%08x 0x%08x\n", 
+                       kprintf("0x%08x 0x%08x 0x%08x 0x%08x\n", 
                                FWOHCI_DMA_READ(db[i+1].db.immed[0]),
                                FWOHCI_DMA_READ(db[i+1].db.immed[1]),
                                FWOHCI_DMA_READ(db[i+1].db.immed[2]),
@@ -2609,7 +2609,7 @@ fwohci_arcv_swap(struct fw_pkt *fp, int len)
 
        ld0 = FWOHCI_DMA_READ(fp->mode.ld[0]);
 #if 0
-       printf("ld0: x%08x\n", ld0);
+       kprintf("ld0: x%08x\n", ld0);
 #endif
        fp0 = (struct fw_pkt *)&ld0;
        /* determine length to swap */
@@ -2629,13 +2629,13 @@ fwohci_arcv_swap(struct fw_pkt *fp, int len)
                slen = 16;
                break;
        default:
-               printf("Unknown tcode %d\n", fp0->mode.common.tcode);
+               kprintf("Unknown tcode %d\n", fp0->mode.common.tcode);
                return(0);
        }
        hlen = tinfo[fp0->mode.common.tcode].hdr_len;
        if (hlen > len) {
                if (firewire_debug)
-                       printf("splitted header\n");
+                       kprintf("splitted header\n");
                return(-hlen);
        }
 #if BYTE_ORDER == BIG_ENDIAN
@@ -2713,7 +2713,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
        status = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res) >> OHCI_STATUS_SHIFT;
        resCount = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res) & OHCI_COUNT_MASK;
 #if 0
-       printf("status 0x%04x, resCount 0x%04x\n", status, resCount);
+       kprintf("status 0x%04x, resCount 0x%04x\n", status, resCount);
 #endif
        while (status & OHCI_CNTL_DMA_ACTIVE) {
                len = dbch->xferq.psize - resCount;
@@ -2738,7 +2738,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                                buf = dbch->pdb_tr->buf + offset;
                                rlen = dbch->xferq.psize - offset;
                                if (firewire_debug)
-                                       printf("rlen=%d, offset=%d\n",
+                                       kprintf("rlen=%d, offset=%d\n",
                                                rlen, dbch->buf_offset);
                                if (dbch->buf_offset < 0) {
                                        /* splitted in header, pull up */
@@ -2750,13 +2750,13 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                                        /* this must be too long but harmless */
                                        rlen = sizeof(pktbuf) - rlen;
                                        if (rlen < 0)
-                                               printf("why rlen < 0\n");
+                                               kprintf("why rlen < 0\n");
                                        bcopy(db_tr->buf, p, rlen);
                                        ld += rlen;
                                        len -= rlen;
                                        hlen = fwohci_arcv_swap(&pktbuf, sizeof(pktbuf));
                                        if (hlen < 0) {
-                                               printf("hlen < 0 shouldn't happen");
+                                               kprintf("hlen < 0 shouldn't happen");
                                        }
                                        offset = sizeof(pktbuf);
                                        vec[0].iov_base = (char *)&pktbuf;
@@ -2781,7 +2781,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                                        dbch->buf_offset = - dbch->buf_offset;
                                        /* sanity check */
                                        if (resCount != 0) 
-                                               printf("resCount = %d !?\n",
+                                               kprintf("resCount = %d !?\n",
                                                    resCount);
                                        /* XXX clear pdb_tr */
                                        goto out;
@@ -2793,7 +2793,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                        if (plen < 0) {
                                /* minimum header size + trailer
                                = sizeof(fw_pkt) so this shouldn't happens */
-                               printf("plen(%d) is negative! offset=%d\n",
+                               kprintf("plen(%d) is negative! offset=%d\n",
                                    plen, offset);
                                /* XXX clear pdb_tr */
                                goto out;
@@ -2803,10 +2803,10 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                                if (len < 0) {
                                        dbch->pdb_tr = db_tr;
                                        if (firewire_debug)
-                                               printf("splitted payload\n");
+                                               kprintf("splitted payload\n");
                                        /* sanity check */
                                        if (resCount != 0) 
-                                               printf("resCount = %d !?\n",
+                                               kprintf("resCount = %d !?\n",
                                                    resCount);
                                        /* XXX clear pdb_tr */
                                        goto out;
@@ -2818,7 +2818,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                        }
                        dbch->buf_offset = ld - (u_int8_t *)db_tr->buf;
                        if (nvec == 0)
-                               printf("nvec == 0\n");
+                               kprintf("nvec == 0\n");
 
 /* DMA result-code will be written at the tail of packet */
 #if BYTE_ORDER == BIG_ENDIAN
@@ -2827,7 +2827,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                        stat = ((struct fwohci_trailer *)(ld - sizeof(struct fwohci_trailer)))->stat;
 #endif
 #if 0
-                       printf("plen: %d, stat %x\n",
+                       kprintf("plen: %d, stat %x\n",
                            plen ,stat);
 #endif
                        spd = (stat >> 5) & 0x3;
@@ -2835,7 +2835,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                        switch(stat){
                        case FWOHCIEV_ACKPEND:
 #if 0
-                               printf("fwohci_arcv: ack pending tcode=0x%x..\n", fp->mode.common.tcode);
+                               kprintf("fwohci_arcv: ack pending tcode=0x%x..\n", fp->mode.common.tcode);
 #endif
                                /* fall through */
                        case FWOHCIEV_ACKCOMPL:
@@ -2854,7 +2854,7 @@ fwohci_arcv(struct fwohci_softc *sc, struct fwohci_dbch *dbch, int count)
                        }
                        case FWOHCIEV_BUSRST:
                                if (sc->fc.status != FWBUSRESET) 
-                                       printf("got BUSRST packet!?\n");
+                                       kprintf("got BUSRST packet!?\n");
                                break;
                        default:
                                device_printf(sc->fc.dev, "Async DMA Receive error err = %02x %s\n", stat, fwohcicode[stat]);
@@ -2878,7 +2878,7 @@ out:
                                dbch->buf_offset = 0;
                        } else
                                if (dbch->pdb_tr != db_tr)
-                                       printf("pdb_tr != db_tr\n");
+                                       kprintf("pdb_tr != db_tr\n");
                        db_tr = STAILQ_NEXT(db_tr, link);
                        status = FWOHCI_DMA_READ(db_tr->db[0].db.desc.res)
                                                >> OHCI_STATUS_SHIFT;
@@ -2894,7 +2894,7 @@ out:
        }
 #if 0
        if (pcnt < 1)
-               printf("fwohci_arcv: no packets\n");
+               kprintf("fwohci_arcv: no packets\n");
 #endif
        crit_exit();
 }
index 86cbec8..ad863bb 100644 (file)
@@ -32,7 +32,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  * 
  * $FreeBSD: src/sys/dev/firewire/fwohci_pci.c,v 1.38 2004/01/23 17:37:09 simokawa Exp $
- * $DragonFly: src/sys/bus/firewire/fwohci_pci.c,v 1.22 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/firewire/fwohci_pci.c,v 1.23 2006/12/22 23:12:16 swildner Exp $
  */
 
 #define BOUNCE_BUFFER_TEST     0
@@ -343,7 +343,7 @@ fwohci_pci_attach(device_t self)
 #endif
                                &sc->fc.dmat);
        if (err != 0) {
-               printf("fwohci_pci_attach: Could not allocate DMA tag "
+               kprintf("fwohci_pci_attach: Could not allocate DMA tag "
                        "- error %d\n", err);
                        return (ENOMEM);
        }
index 3a0eea7..9f284e3 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/pcf.c,v 1.14 2000/01/14 00:18:05 nsouch Exp $
- * $DragonFly: src/sys/bus/iicbus/i386/pcf.c,v 1.8 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/iicbus/i386/pcf.c,v 1.9 2006/12/22 23:12:16 swildner Exp $
  *
  */
 #include <sys/param.h>
@@ -214,7 +214,7 @@ pcf_print_child(device_t bus, device_t dev)
        int retval = 0;
 
        retval += bus_print_child_header(bus, dev);
-       retval += printf(" on %s addr 0x%x\n", device_get_nameunit(bus),
+       retval += kprintf(" on %s addr 0x%x\n", device_get_nameunit(bus),
                         (int)pcf->pcf_addr);
 
        return (retval);
@@ -550,7 +550,7 @@ pcf_write(device_t pcfdev, char *buf, int len, int *sent, int timeout /* us */)
        int bytes, error = 0;
 
 #ifdef PCFDEBUG
-       printf("pcf%d: >> writing %d bytes\n", device_get_unit(pcfdev), len);
+       kprintf("pcf%d: >> writing %d bytes\n", device_get_unit(pcfdev), len);
 #endif
 
        bytes = 0;
@@ -576,7 +576,7 @@ error:
        *sent = bytes;
 
 #ifdef PCFDEBUG
-       printf("pcf%d: >> %d bytes written (%d)\n",
+       kprintf("pcf%d: >> %d bytes written (%d)\n",
                device_get_unit(pcfdev), bytes, error);
 #endif
 
@@ -591,7 +591,7 @@ pcf_read(device_t pcfdev, char *buf, int len, int *read, int last,
        int bytes, error = 0;
 
 #ifdef PCFDEBUG
-       printf("pcf%d: << reading %d bytes\n", device_get_unit(pcfdev), len);
+       kprintf("pcf%d: << reading %d bytes\n", device_get_unit(pcfdev), len);
 #endif
 
        /* trig the bus to get the first data byte in S0 */
@@ -634,7 +634,7 @@ error:
        *read = bytes;
 
 #ifdef PCFDEBUG
-       printf("pcf%d: << %d bytes read (%d)\n",
+       kprintf("pcf%d: << %d bytes read (%d)\n",
                device_get_unit(pcfdev), bytes, error);
 #endif
 
index 9c77340..8019799 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/iicbus/iicbb.c,v 1.6.2.2 2002/04/19 05:52:12 nsouch Exp $
- * $DragonFly: src/sys/bus/iicbus/iicbb.c,v 1.4 2006/01/22 14:03:51 swildner Exp $
+ * $DragonFly: src/sys/bus/iicbus/iicbb.c,v 1.5 2006/12/22 23:12:16 swildner Exp $
  *
  */
 
@@ -159,13 +159,13 @@ iicbb_print_child(device_t bus, device_t dev)
        /* retrieve the interface I2C address */
        error = IICBB_RESET(device_get_parent(bus), IIC_FASTEST, 0, &oldaddr);
        if (error == IIC_ENOADDR) {
-               retval += printf(" on %s master-only\n",
+               retval += kprintf(" on %s master-only\n",
                                 device_get_nameunit(bus));
        } else {
                /* restore the address */
                IICBB_RESET(device_get_parent(bus), IIC_FASTEST, oldaddr, NULL);
 
-               retval += printf(" on %s addr 0x%x\n",
+               retval += kprintf(" on %s addr 0x%x\n",
                                 device_get_nameunit(bus), oldaddr & 0xff);
        }
 
@@ -229,7 +229,7 @@ iicbb_ack(device_t dev, int timeout)
        } while (k--);
 
        I2C_SET(dev,0,1);
-       I2C_DEBUG(printf("%c ",noack?'-':'+'));
+       I2C_DEBUG(kprintf("%c ",noack?'-':'+'));
 
        return (noack);
 }
@@ -242,7 +242,7 @@ iicbb_sendbyte(device_t dev, u_char data)
        I2C_SET(dev,0,0);
        for (i=7; i>=0; i--)
                (data&(1<<i)) ? iicbb_one(dev) : iicbb_zero(dev);
-       I2C_DEBUG(printf("w%02x",(int)data));
+       I2C_DEBUG(kprintf("w%02x",(int)data));
        return;
 }
 
@@ -261,7 +261,7 @@ iicbb_readbyte(device_t dev, int last)
                I2C_SET(dev,0,1);
        }
        last ? iicbb_one(dev) : iicbb_zero(dev);
-       I2C_DEBUG(printf("r%02x%c ",(int)data,last?'-':'+'));
+       I2C_DEBUG(kprintf("r%02x%c ",(int)data,last?'-':'+'));
        return data;
 }
 
@@ -282,7 +282,7 @@ iicbb_start(device_t dev, u_char slave, int timeout)
 {
        int error;
 
-       I2C_DEBUG(printf("<"));
+       I2C_DEBUG(kprintf("<"));
 
        I2C_SET(dev,0,1);
        I2C_SET(dev,1,1);
@@ -311,7 +311,7 @@ iicbb_stop(device_t dev)
        I2C_SET(dev,0,0);
        I2C_SET(dev,1,0);
        I2C_SET(dev,1,1);
-       I2C_DEBUG(printf(">"));
+       I2C_DEBUG(kprintf(">"));
        return (0);
 }
 
index 05e4d55..b95178a 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/iicbus/iicbus.c,v 1.13 1999/12/03 08:41:02 mdodd Exp $
- * $DragonFly: src/sys/bus/iicbus/iicbus.c,v 1.4 2005/02/17 13:59:35 joerg Exp $
+ * $DragonFly: src/sys/bus/iicbus/iicbus.c,v 1.5 2006/12/22 23:12:16 swildner Exp $
  *
  */
 
@@ -167,15 +167,15 @@ iicbus_attach(device_t dev)
         * x bytes...
         */
 #if 0
-       printf("Probing for devices on iicbus%d:", device_get_unit(dev));
+       kprintf("Probing for devices on iicbus%d:", device_get_unit(dev));
 
        /* probe any devices */
        for (addr = FIRST_SLAVE_ADDR; addr <= LAST_SLAVE_ADDR; addr++) {
                if (iic_probe_device(dev, (u_char)addr)) {
-                       printf(" <%x>", addr);
+                       kprintf(" <%x>", addr);
                }
        }
-       printf("\n");
+       kprintf("\n");
 #endif
 
        /* attach known devices */
@@ -186,7 +186,7 @@ iicbus_attach(device_t dev)
                        if (devclass_find(iicdev->iicd_name))
                                iicdev->iicd_alive = 1;
                        else if (bootverbose)
-                               printf("iicbus: %s devclass not found\n",
+                               kprintf("iicbus: %s devclass not found\n",
                                        iicdev->iicd_name);
                        break;
 
@@ -195,7 +195,7 @@ iicbus_attach(device_t dev)
                        if (devclass_find(iicdev->iicd_name))
                                iicdev->iicd_alive = 1;
                        else if (bootverbose)
-                               printf("iicbus: %s devclass not found\n",
+                               kprintf("iicbus: %s devclass not found\n",
                                        iicdev->iicd_name);
                        break;
 
@@ -242,7 +242,7 @@ iicbus_print_child(device_t bus, device_t dev)
 
        switch (iicdev->iicd_class) {   
        case IICBUS_DEVICE_CLASS:
-               retval += printf(" on %s addr 0x%x\n",
+               retval += kprintf(" on %s addr 0x%x\n",
                                 device_get_nameunit(bus), iicdev->iicd_addr);
                break;
 
index 35b78d6..8cc9e6a 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/iicbus/iicsmb.c,v 1.5.2.2 2000/08/09 00:59:27 peter Exp $
- * $DragonFly: src/sys/bus/iicbus/iicsmb.c,v 1.4 2005/02/17 13:59:35 joerg Exp $
+ * $DragonFly: src/sys/bus/iicbus/iicsmb.c,v 1.5 2006/12/22 23:12:16 swildner Exp $
  *
  */
 
@@ -184,7 +184,7 @@ iicsmb_intr(device_t dev, int event, char *buf)
                switch (sc->state) {
                case SMB_DONE:
                        /* XXX too much data, discard */
-                       printf("%s: too much data from 0x%x\n", __func__,
+                       kprintf("%s: too much data from 0x%x\n", __func__,
                                sc->devaddr & 0xff);
                        goto end;
 
@@ -217,7 +217,7 @@ end:
                        break;
 
                default:
-                       printf("%s unknown error 0x%x!\n", __func__,
+                       kprintf("%s unknown error 0x%x!\n", __func__,
                                                                (int)*buf);
                        break;
                }
index e50b44f..1e63243 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/isa_compat.c,v 1.18.2.1 2001/05/17 23:05:06 imp Exp $
- * $DragonFly: src/sys/bus/isa/i386/isa_compat.c,v 1.11 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/isa/i386/isa_compat.c,v 1.12 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -78,7 +78,7 @@ isa_compat_alloc_resources(device_t dev, struct isa_compat_resources *res)
                                                &rid, 0ul, ~0ul, 1,
                                                RF_ACTIVE);
                if (res->ports == NULL && bootverbose)
-                       printf("isa_compat: didn't get ports for %s\n",
+                       kprintf("isa_compat: didn't get ports for %s\n",
                               device_get_name(dev));
        } else
                res->ports = 0;
@@ -91,7 +91,7 @@ isa_compat_alloc_resources(device_t dev, struct isa_compat_resources *res)
                                                 &rid, 0ul, ~0ul, 1,
                                                 RF_ACTIVE);
                if (res->memory == NULL && bootverbose)
-                       printf("isa_compat: didn't get memory for %s\n",
+                       kprintf("isa_compat: didn't get memory for %s\n",
                               device_get_name(dev));
        } else
                res->memory = 0;
@@ -103,7 +103,7 @@ isa_compat_alloc_resources(device_t dev, struct isa_compat_resources *res)
                                              &rid, 0ul, ~0ul, 1,
                                              RF_ACTIVE);
                if (res->drq == NULL && bootverbose)
-                       printf("isa_compat: didn't get drq for %s\n",
+                       kprintf("isa_compat: didn't get drq for %s\n",
                               device_get_name(dev));
        } else
                res->drq = 0;
@@ -115,7 +115,7 @@ isa_compat_alloc_resources(device_t dev, struct isa_compat_resources *res)
                                              &rid, 0ul, ~0ul, 1,
                                              RF_SHAREABLE | RF_ACTIVE);
                if (res->irq == NULL && bootverbose)
-                       printf("isa_compat: didn't get irq for %s\n",
+                       kprintf("isa_compat: didn't get irq for %s\n",
                               device_get_name(dev));
        } else
                res->irq = 0;
@@ -260,7 +260,7 @@ isa_compat_attach(device_t dev)
                                       (void *)(uintptr_t)dvp->id_unit,
                                       &ih, NULL);
                if (error)
-                       printf("isa_compat_attach: failed to setup intr: %d\n",
+                       kprintf("isa_compat_attach: failed to setup intr: %d\n",
                               error);
        }
        device_printf(dev, "driver is using old-style compatibility shims\n");
index 2b50556..5252beb 100644 (file)
@@ -35,7 +35,7 @@
  *
  *     from: @(#)isa.c 7.2 (Berkeley) 5/13/91
  * $FreeBSD: src/sys/i386/isa/isa_dma.c,v 1.4.2.1 2000/08/08 19:49:53 peter Exp $
- * $DragonFly: src/sys/bus/isa/i386/isa_dma.c,v 1.11 2006/11/07 06:43:22 dillon Exp $
+ * $DragonFly: src/sys/bus/isa/i386/isa_dma.c,v 1.12 2006/12/22 23:12:16 swildner Exp $
  */
 
 /*
@@ -121,7 +121,7 @@ isa_dmainit(int chan, u_int bouncebufsize)
        buf = contigmalloc(bouncebufsize, M_DEVBUF, M_NOWAIT, 0ul, 0xfffffful,
                           1ul, chan & 4 ? 0x20000ul : 0x10000ul);
        if (buf == NULL)
-               printf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize);
+               kprintf("isa_dmainit(%d, %d) failed\n", chan, bouncebufsize);
        else
                dma_bouncebuf[chan] = buf;
 }
@@ -139,7 +139,7 @@ isa_dma_acquire(int chan)
 #endif
 
        if (dma_inuse & (1 << chan)) {
-               printf("isa_dma_acquire: channel %d already in use\n", chan);
+               kprintf("isa_dma_acquire: channel %d already in use\n", chan);
                return (EBUSY);
        }
        dma_inuse |= (1 << chan);
@@ -160,7 +160,7 @@ isa_dma_release(int chan)
                panic("isa_dma_release: channel out of range");
 
        if ((dma_inuse & (1 << chan)) == 0)
-               printf("isa_dma_release: channel %d not in use\n", chan);
+               kprintf("isa_dma_release: channel %d not in use\n", chan);
 #endif
 
        if (dma_busy & (1 << chan)) {
@@ -219,7 +219,7 @@ isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
                panic("isa_dmastart: impossible request");
 
        if ((dma_inuse & (1 << chan)) == 0)
-               printf("isa_dmastart: channel %d not acquired\n", chan);
+               kprintf("isa_dmastart: channel %d not acquired\n", chan);
 #endif
 
 #if 0
@@ -229,7 +229,7 @@ isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
         * leave this in, drivers that do this will print this continuously.
         */
        if (dma_busy & (1 << chan))
-               printf("isa_dmastart: channel %d busy\n", chan);
+               kprintf("isa_dmastart: channel %d busy\n", chan);
 #endif
 
        dma_busy |= (1 << chan);
@@ -334,12 +334,12 @@ isa_dmadone(int flags, caddr_t addr, int nbytes, int chan)
                panic("isa_dmadone: channel out of range");
 
        if ((dma_inuse & (1 << chan)) == 0)
-               printf("isa_dmadone: channel %d not acquired\n", chan);
+               kprintf("isa_dmadone: channel %d not acquired\n", chan);
 #endif
 
        if (((dma_busy & (1 << chan)) == 0) && 
            (dma_auto_mode & (1 << chan)) == 0 )
-               printf("isa_dmadone: channel %d not busy\n", chan);
+               kprintf("isa_dmadone: channel %d not busy\n", chan);
 
        if ((dma_auto_mode & (1 << chan)) == 0)
                outb(chan & 4 ? DMA2_SMSK : DMA1_SMSK, (chan & 3) | 4);
@@ -429,14 +429,14 @@ isa_dmastatus(int chan)
 
        /* channel active? */
        if ((dma_inuse & (1 << chan)) == 0) {
-               printf("isa_dmastatus: channel %d not active\n", chan);
+               kprintf("isa_dmastatus: channel %d not active\n", chan);
                return(-1);
        }
        /* channel busy? */
 
        if (((dma_busy & (1 << chan)) == 0) &&
            (dma_auto_mode & (1 << chan)) == 0 ) {
-           printf("chan %d not busy\n", chan);
+           kprintf("chan %d not busy\n", chan);
            return -2 ;
        }       
        if (chan < 4) {                 /* low DMA controller */
@@ -479,11 +479,11 @@ int
 isa_dmastop(int chan) 
 {
        if ((dma_inuse & (1 << chan)) == 0)
-               printf("isa_dmastop: channel %d not acquired\n", chan);  
+               kprintf("isa_dmastop: channel %d not acquired\n", chan);  
 
        if (((dma_busy & (1 << chan)) == 0) &&
            ((dma_auto_mode & (1 << chan)) == 0)) {
-               printf("chan %d not busy\n", chan);
+               kprintf("chan %d not busy\n", chan);
                return -2 ;
        }
     
index cb4103e..6ce9e22 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/isa/isa_common.c,v 1.16.2.1 2000/09/16 15:49:52 roger Exp $
- * $DragonFly: src/sys/bus/isa/isa_common.c,v 1.12 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/isa/isa_common.c,v 1.13 2006/12/22 23:12:16 swildner Exp $
  */
 /*
  * Modifications for Intel architecture by Garrett A. Wollman.
@@ -415,7 +415,7 @@ isa_assign_resources(device_t child)
         * Disable the device.
         */
        bus_print_child_header(device_get_parent(child), child);
-       printf(" can't assign resources (%s)\n", reason);
+       kprintf(" can't assign resources (%s)\n", reason);
        if (bootverbose)
            isa_print_child(device_get_parent(child), child);
        bzero(&config, sizeof config);
@@ -451,7 +451,7 @@ isa_probe_children(device_t dev)
         * matched by legacy probes.
         */
        if (bootverbose)
-               printf("isa_probe_children: disabling PnP devices\n");
+               kprintf("isa_probe_children: disabling PnP devices\n");
        for (i = 0; i < nchildren; i++) {
                device_t child = children[i];
                struct isa_device *idev = DEVTOISA(child);
@@ -467,7 +467,7 @@ isa_probe_children(device_t dev)
         * resources first.
         */
        if (bootverbose)
-               printf("isa_probe_children: probing non-PnP devices\n");
+               kprintf("isa_probe_children: probing non-PnP devices\n");
        for (i = 0; i < nchildren; i++) {
                device_t child = children[i];
                struct isa_device *idev = DEVTOISA(child);
@@ -482,7 +482,7 @@ isa_probe_children(device_t dev)
         * Finally assign resource to pnp devices and probe them.
         */
        if (bootverbose)
-               printf("isa_probe_children: probing PnP devices\n");
+               kprintf("isa_probe_children: probing PnP devices\n");
        for (i = 0; i < nchildren; i++) {
                device_t child = children[i];
                struct isa_device* idev = DEVTOISA(child);
@@ -551,14 +551,14 @@ isa_print_resources(struct resource_list *rl, const char *name, int type,
                rle = resource_list_find(rl, type, i);
                if (rle) {
                        if (printed == 0)
-                               retval += printf(" %s ", name);
+                               retval += kprintf(" %s ", name);
                        else if (printed > 0)
-                               retval += printf(",");
+                               retval += kprintf(",");
                        printed++;
-                       retval += printf(format, rle->start);
+                       retval += kprintf(format, rle->start);
                        if (rle->count > 1) {
-                               retval += printf("-");
-                               retval += printf(format,
+                               retval += kprintf("-");
+                               retval += kprintf(format,
                                                 rle->start + rle->count - 1);
                        }
                } else if (i > 3) {
@@ -577,7 +577,7 @@ isa_print_all_resources(device_t dev)
        int retval = 0;
 
        if (SLIST_FIRST(rl) || device_get_flags(dev))
-               retval += printf(" at");
+               retval += kprintf(" at");
        
        retval += isa_print_resources(rl, "port", SYS_RES_IOPORT,
                                      ISA_NPORT, "%#lx");
@@ -588,7 +588,7 @@ isa_print_all_resources(device_t dev)
        retval += isa_print_resources(rl, "drq", SYS_RES_DRQ,
                                      ISA_NDRQ, "%ld");
        if (device_get_flags(dev))
-               retval += printf(" flags %#x", device_get_flags(dev));
+               retval += kprintf(" flags %#x", device_get_flags(dev));
 
        return retval;
 }
@@ -610,7 +610,7 @@ isa_probe_nomatch(device_t dev, device_t child)
 {
        if (bootverbose) {
                bus_print_child_header(dev, child);
-               printf(" failed to probe");
+               kprintf(" failed to probe");
                isa_print_all_resources(child);
                bus_print_child_footer(dev, child);
        }
index 9febff0..6831b2f 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/isa/pnp.c,v 1.5.2.1 2002/10/14 09:31:09 nyan Exp $
- *     $DragonFly: src/sys/bus/isa/pnp.c,v 1.11 2006/09/05 00:55:35 dillon Exp $
+ *     $DragonFly: src/sys/bus/isa/pnp.c,v 1.12 2006/12/22 23:12:16 swildner Exp $
  *      from: pnp.c,v 1.11 1999/05/06 22:11:19 peter Exp
  */
 
@@ -230,7 +230,7 @@ pnp_get_resource_info(u_char *buffer, int len)
                        DELAY(1);
                }
                if (j == 100) {
-                       printf("PnP device failed to report resource data\n");
+                       kprintf("PnP device failed to report resource data\n");
                        return count;
                }
                outb(_PNP_ADDRESS, PNP_RESOURCE_DATA);
@@ -256,7 +256,7 @@ write_pnp_parms(struct pnp_cinfo *d, pnp_id *p, int ldn)
     pnp_write (SET_LDN, ldn );
     i = pnp_read(SET_LDN) ;
     if (i != ldn) {
-       printf("Warning: LDN %d does not exist\n", ldn);
+       kprintf("Warning: LDN %d does not exist\n", ldn);
     }
     for (i = 0; i < 8; i++) {
        pnp_write(IO_CONFIG_BASE + i * 2, d->ic_port[i] >> 8 );
@@ -778,7 +778,7 @@ pnp_identify(driver_t *driver, device_t parent)
 #if 0
        if (pnp_ldn_overrides[0].csn == 0) {
                if (bootverbose)
-                       printf("Initializing PnP override table\n");
+                       kprintf("Initializing PnP override table\n");
                bzero (pnp_ldn_overrides, sizeof(pnp_ldn_overrides));
                pnp_ldn_overrides[0].csn = 255 ;
        }
@@ -787,7 +787,7 @@ pnp_identify(driver_t *driver, device_t parent)
        /* Try various READ_DATA ports from 0x203-0x3ff */
        for (pnp_rd_port = 0x80; (pnp_rd_port < 0xff); pnp_rd_port += 0x10) {
                if (bootverbose)
-                       printf("Trying Read_Port at %x\n", (pnp_rd_port << 2) | 0x3);
+                       kprintf("Trying Read_Port at %x\n", (pnp_rd_port << 2) | 0x3);
 
                num_pnp_devs = pnp_isolation_protocol(parent);
                if (num_pnp_devs)
index f69eb79..c680aa6 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/isa/pnpparse.c,v 1.14 2003/06/11 00:32:45 obrien Exp $
- * $DragonFly: src/sys/bus/isa/pnpparse.c,v 1.9 2006/12/18 20:41:01 dillon Exp $
+ * $DragonFly: src/sys/bus/isa/pnpparse.c,v 1.10 2006/12/22 23:12:16 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -50,7 +50,7 @@ pnp_printf(u_int32_t id, char *fmt, ...)
        __va_list ap;
 
        __va_start(ap, fmt);
-       printf("%s: ", pnp_eisaformat(id));
+       kprintf("%s: ", pnp_eisaformat(id));
        kvprintf(fmt, ap);
        __va_end(ap);
 }
index a3e76af..ca4fde8 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $     */
 /* $FreeBSD: src/sys/dev/pccard/pccard.c,v 1.70 2002/11/14 14:02:32 mux Exp $ */
-/* $DragonFly: src/sys/bus/pccard/pccard.c,v 1.18 2006/12/20 18:14:37 dillon Exp $ */
+/* $DragonFly: src/sys/bus/pccard/pccard.c,v 1.19 2006/12/22 23:12:16 swildner Exp $ */
 
 /*
  * Copyright (c) 1997 Marc Horowitz.  All rights reserved.
@@ -68,14 +68,14 @@ SYSCTL_INT(_hw_pccard, OID_AUTO, cis_debug, CTLFLAG_RW,
     &pccard_cis_debug, 0, "pccard CIS debug");
 
 #ifdef PCCARDDEBUG
-#define        DPRINTF(arg) if (pccard_debug) printf arg
+#define        DPRINTF(arg) if (pccard_debug) kprintf arg
 #define        DEVPRINTF(arg) if (pccard_debug) device_printf arg
-#define PRVERBOSE(arg) printf arg
+#define PRVERBOSE(arg) kprintf arg
 #define DEVPRVERBOSE(arg) device_printf arg
 #else
 #define        DPRINTF(arg)
 #define        DEVPRINTF(arg)
-#define PRVERBOSE(arg) if (bootverbose) printf arg
+#define PRVERBOSE(arg) if (bootverbose) kprintf arg
 #define DEVPRVERBOSE(arg) if (bootverbose) device_printf arg
 #endif
 
@@ -396,7 +396,7 @@ pccard_function_init(struct pccard_function *pf)
        int spaces;
 
        if (pf->pf_flags & PFF_ENABLED) {
-               printf("pccard_function_init: function is enabled");
+               kprintf("pccard_function_init: function is enabled");
                return;
        }
        bus = device_get_parent(pf->dev);
@@ -499,7 +499,7 @@ pccard_function_free(struct pccard_function *pf)
        struct resource_list_entry *rle;
 
        if (pf->pf_flags & PFF_ENABLED) {
-               printf("pccard_function_init: function is enabled");
+               kprintf("pccard_function_init: function is enabled");
                return;
        }
 
@@ -823,14 +823,14 @@ pccard_print_resources(struct resource_list *rl, const char *name, int type,
                rle = resource_list_find(rl, type, i);
                if (rle != NULL) {
                        if (printed == 0)
-                               printf(" %s ", name);
+                               kprintf(" %s ", name);
                        else if (printed > 0)
-                               printf(",");
+                               kprintf(",");
                        printed++;
-                       printf(format, rle->start);
+                       kprintf(format, rle->start);
                        if (rle->count > 1) {
-                               printf("-");
-                               printf(format, rle->start + rle->count - 1);
+                               kprintf("-");
+                               kprintf(format, rle->start + rle->count - 1);
                        }
                } else if (i > 3) {
                        /* check the first few regardless */
@@ -847,7 +847,7 @@ pccard_print_child(device_t dev, device_t child)
        int retval = 0;
 
        retval += bus_print_child_header(dev, child);
-       retval += printf(" at");
+       retval += kprintf(" at");
 
        if (devi != NULL) {
                pccard_print_resources(rl, "port", SYS_RES_IOPORT,
@@ -858,7 +858,7 @@ pccard_print_child(device_t dev, device_t child)
                    "%ld");
                pccard_print_resources(rl, "drq", SYS_RES_DRQ, PCCARD_NDRQ,
                    "%ld");
-               retval += printf(" function %d config %d", devi->fcn->number,
+               retval += kprintf(" function %d config %d", devi->fcn->number,
                    devi->fcn->cfe->number);
        }
 
@@ -949,7 +949,7 @@ pccard_probe_nomatch(device_t bus, device_t child)
        struct pccard_softc *sc = PCCARD_SOFTC(bus);
 
        device_printf(bus, "<unknown card>");
-       printf(" (manufacturer=0x%04x, product=0x%04x) at function %d\n",
+       kprintf(" (manufacturer=0x%04x, product=0x%04x) at function %d\n",
          sc->card.manufacturer, sc->card.product, func->number);
        device_printf(bus, "   CIS info: %s, %s, %s\n", sc->card.cis1_info[0],
          sc->card.cis1_info[1], sc->card.cis1_info[2]);
index 6b4444d..2fdb283 100644 (file)
@@ -1,6 +1,6 @@
 /* $NetBSD: pcmcia_cis.c,v 1.17 2000/02/10 09:01:52 chopps Exp $ */
 /* $FreeBSD: src/sys/dev/pccard/pccard_cis.c,v 1.23 2002/11/14 14:02:32 mux Exp $ */
-/* $DragonFly: src/sys/bus/pccard/pccard_cis.c,v 1.6 2006/10/25 20:55:51 dillon Exp $ */
+/* $DragonFly: src/sys/bus/pccard/pccard_cis.c,v 1.7 2006/12/22 23:12:16 swildner Exp $ */
 
 /*
  * Copyright (c) 1997 Marc Horowitz.  All rights reserved.
@@ -51,7 +51,7 @@ extern int    pccard_cis_debug;
 
 #define PCCARDCISDEBUG
 #ifdef PCCARDCISDEBUG
-#define        DPRINTF(arg) if (pccard_cis_debug) printf arg
+#define        DPRINTF(arg) if (pccard_cis_debug) kprintf arg
 #define        DEVPRINTF(arg) if (pccard_cis_debug) device_printf arg
 #else
 #define        DPRINTF(arg)
@@ -458,13 +458,13 @@ pccard_print_cis(device_t dev)
        device_printf(dev, "CIS version ");
        if (card->cis1_major == 4) {
                if (card->cis1_minor == 0)
-                       printf("PCCARD 1.0\n");
+                       kprintf("PCCARD 1.0\n");
                else if (card->cis1_minor == 1)
-                       printf("PCCARD 2.0 or 2.1\n");
+                       kprintf("PCCARD 2.0 or 2.1\n");
        } else if (card->cis1_major >= 5)
-               printf("PC Card Standard %d.%d\n", card->cis1_major, card->cis1_minor);
+               kprintf("PC Card Standard %d.%d\n", card->cis1_major, card->cis1_minor);
        else
-               printf("unknown (major=%d, minor=%d)\n",
+               kprintf("unknown (major=%d, minor=%d)\n",
                    card->cis1_major, card->cis1_minor);
 
        device_printf(dev, "CIS info: ");
@@ -472,10 +472,10 @@ pccard_print_cis(device_t dev)
                if (card->cis1_info[i] == NULL)
                        break;
                if (i)
-                       printf(", ");
-               printf("%s", card->cis1_info[i]);
+                       kprintf(", ");
+               kprintf("%s", card->cis1_info[i]);
        }
-       printf("\n");
+       kprintf("\n");
 
        device_printf(dev, "Manufacturer code 0x%x, product 0x%x\n",
            card->manufacturer, card->product);
@@ -485,47 +485,47 @@ pccard_print_cis(device_t dev)
 
                switch (pf->function) {
                case PCCARD_FUNCTION_UNSPEC:
-                       printf("unspecified");
+                       kprintf("unspecified");
                        break;
                case PCCARD_FUNCTION_MULTIFUNCTION:
-                       printf("multi-function");
+                       kprintf("multi-function");
                        break;
                case PCCARD_FUNCTION_MEMORY:
-                       printf("memory");
+                       kprintf("memory");
                        break;
                case PCCARD_FUNCTION_SERIAL:
-                       printf("serial port");
+                       kprintf("serial port");
                        break;
                case PCCARD_FUNCTION_PARALLEL:
-                       printf("parallel port");
+                       kprintf("parallel port");
                        break;
                case PCCARD_FUNCTION_DISK:
-                       printf("fixed disk");
+                       kprintf("fixed disk");
                        break;
                case PCCARD_FUNCTION_VIDEO:
-                       printf("video adapter");
+                       kprintf("video adapter");
                        break;
                case PCCARD_FUNCTION_NETWORK:
-                       printf("network adapter");
+                       kprintf("network adapter");
                        break;
                case PCCARD_FUNCTION_AIMS:
-                       printf("auto incrementing mass storage");
+                       kprintf("auto incrementing mass storage");
                        break;
                case PCCARD_FUNCTION_SCSI:
-                       printf("SCSI bridge");
+                       kprintf("SCSI bridge");
                        break;
                case PCCARD_FUNCTION_SECURITY:
-                       printf("Security services");
+                       kprintf("Security services");
                        break;
                case PCCARD_FUNCTION_INSTRUMENT:
-                       printf("Instrument");
+                       kprintf("Instrument");
                        break;
                default:
-                       printf("unknown (%d)", pf->function);
+                       kprintf("unknown (%d)", pf->function);
                        break;
                }
 
-               printf(", ccr addr %x mask %x\n", pf->ccr_base, pf->ccr_mask);
+               kprintf(", ccr addr %x mask %x\n", pf->ccr_base, pf->ccr_mask);
 
                STAILQ_FOREACH(cfe, &pf->cfe_head, cfe_list) {
                        device_printf(dev, "function %d, config table entry "
@@ -533,75 +533,75 @@ pccard_print_cis(device_t dev)
 
                        switch (cfe->iftype) {
                        case PCCARD_IFTYPE_MEMORY:
-                               printf("memory card");
+                               kprintf("memory card");
                                break;
                        case PCCARD_IFTYPE_IO:
-                               printf("I/O card");
+                               kprintf("I/O card");
                                break;
                        default:
-                               printf("card type unknown");
+                               kprintf("card type unknown");
                                break;
                        }
 
-                       printf("; irq mask %x", cfe->irqmask);
+                       kprintf("; irq mask %x", cfe->irqmask);
 
                        if (cfe->num_iospace) {
-                               printf("; iomask %lx, iospace", cfe->iomask);
+                               kprintf("; iomask %lx, iospace", cfe->iomask);
 
                                for (i = 0; i < cfe->num_iospace; i++) {
-                                       printf(" %lx", cfe->iospace[i].start);
+                                       kprintf(" %lx", cfe->iospace[i].start);
                                        if (cfe->iospace[i].length)
-                                               printf("-%lx",
+                                               kprintf("-%lx",
                                                    cfe->iospace[i].start +
                                                    cfe->iospace[i].length - 1);
                                }
                        }
                        if (cfe->num_memspace) {
-                               printf("; memspace");
+                               kprintf("; memspace");
 
                                for (i = 0; i < cfe->num_memspace; i++) {
-                                       printf(" %lx",
+                                       kprintf(" %lx",
                                            cfe->memspace[i].cardaddr);
                                        if (cfe->memspace[i].length)
-                                               printf("-%lx",
+                                               kprintf("-%lx",
                                                    cfe->memspace[i].cardaddr +
                                                    cfe->memspace[i].length - 1);
                                        if (cfe->memspace[i].hostaddr)
-                                               printf("@%lx",
+                                               kprintf("@%lx",
                                                    cfe->memspace[i].hostaddr);
                                }
                        }
                        if (cfe->maxtwins)
-                               printf("; maxtwins %d", cfe->maxtwins);
+                               kprintf("; maxtwins %d", cfe->maxtwins);
 
-                       printf(";");
+                       kprintf(";");
 
                        if (cfe->flags & PCCARD_CFE_MWAIT_REQUIRED)
-                               printf(" mwait_required");
+                               kprintf(" mwait_required");
                        if (cfe->flags & PCCARD_CFE_RDYBSY_ACTIVE)
-                               printf(" rdybsy_active");
+                               kprintf(" rdybsy_active");
                        if (cfe->flags & PCCARD_CFE_WP_ACTIVE)
-                               printf(" wp_active");
+                               kprintf(" wp_active");
                        if (cfe->flags & PCCARD_CFE_BVD_ACTIVE)
-                               printf(" bvd_active");
+                               kprintf(" bvd_active");
                        if (cfe->flags & PCCARD_CFE_IO8)
-                               printf(" io8");
+                               kprintf(" io8");
                        if (cfe->flags & PCCARD_CFE_IO16)
-                               printf(" io16");
+                               kprintf(" io16");
                        if (cfe->flags & PCCARD_CFE_IRQSHARE)
-                               printf(" irqshare");
+                               kprintf(" irqshare");
                        if (cfe->flags & PCCARD_CFE_IRQPULSE)
-                               printf(" irqpulse");
+                               kprintf(" irqpulse");
                        if (cfe->flags & PCCARD_CFE_IRQLEVEL)
-                               printf(" irqlevel");
+                               kprintf(" irqlevel");
                        if (cfe->flags & PCCARD_CFE_POWERDOWN)
-                               printf(" powerdown");
+                               kprintf(" powerdown");
                        if (cfe->flags & PCCARD_CFE_READONLY)
-                               printf(" readonly");
+                               kprintf(" readonly");
                        if (cfe->flags & PCCARD_CFE_AUDIO)
-                               printf(" audio");
+                               kprintf(" audio");
 
-                       printf("\n");
+                       kprintf("\n");
                }
        }
 
index 2dcb600..cd0537a 100644 (file)
@@ -1,6 +1,6 @@
 /*     $NetBSD: pcmcia_cis_quirks.c,v 1.6 2000/04/12 21:07:55 scw Exp $ */
 /* $FreeBSD: src/sys/dev/pccard/pccard_cis_quirks.c,v 1.7 2002/02/09 21:34:06 imp Exp $ */
-/* $DragonFly: src/sys/bus/pccard/pccard_cis_quirks.c,v 1.5 2006/10/25 20:55:51 dillon Exp $ */
+/* $DragonFly: src/sys/bus/pccard/pccard_cis_quirks.c,v 1.6 2006/12/22 23:12:16 swildner Exp $ */
 
 #define        PCCARDDEBUG
 
@@ -237,10 +237,10 @@ pccard_check_cis_quirks(device_t dev)
                                                if (sc->card.cis1_info[j] == NULL)
                                                        break;
                                                if (j)
-                                                       printf(", ");
-                                               printf("%s", sc->card.cis1_info[j]);
+                                                       kprintf(", ");
+                                               kprintf("%s", sc->card.cis1_info[j]);
                                        }
-                                       printf("\n");
+                                       kprintf("\n");
                                }
 
                                for (pf = STAILQ_FIRST(&sc->card.pf_head); pf != NULL;
index 6e24ab8..f3df9ec 100644 (file)
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/pci_cfgreg.c,v 1.1.2.7 2001/11/28 05:47:03 imp Exp $
- * $DragonFly: src/sys/bus/pci/i386/pci_cfgreg.c,v 1.12 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/bus/pci/i386/pci_cfgreg.c,v 1.13 2006/12/22 23:12:17 swildner Exp $
  *
  */
 
@@ -51,7 +51,7 @@
 
 #define PRVERB(a) do {                                                 \
        if (bootverbose)                                                \
-               printf a ;                                              \
+               kprintf a ;                                             \
 } while(0)
 
 static int pci_disable_bios_route = 0;
@@ -134,7 +134,7 @@ pci_cfgregopen(void)
 
        v = pcibios_get_version();
        if (v > 0)
-               printf("pcibios: BIOS version %x.%02x\n", (v & 0xff00) >> 8,
+               kprintf("pcibios: BIOS version %x.%02x\n", (v & 0xff00) >> 8,
                       v & 0xff);
 
        /*
@@ -161,7 +161,7 @@ pci_cfgregopen(void)
                                pci_route_count = (pt->pt_header.ph_length -
                                    sizeof(struct PIR_header)) /
                                    sizeof(struct PIR_entry);
-                               printf("Using $PIR table, %d entries at %p\n",
+                               kprintf("Using $PIR table, %d entries at %p\n",
                                       pci_route_count, pci_route_table);
                                if (bootverbose)
                                        pci_print_route_table(pci_route_table,
@@ -300,7 +300,7 @@ pci_cfgintr(int bus, int device, int pin, int oldirq)
                        continue;
 
                if (pci_cfgintr_valid(pe, pin, oldirq)) {
-                       printf("pci_cfgintr: %d:%d INT%c BIOS irq %d\n", bus,
+                       kprintf("pci_cfgintr: %d:%d INT%c BIOS irq %d\n", bus,
                               device, 'A' + pin - 1, oldirq);
                        return (oldirq);
                }
@@ -356,7 +356,7 @@ pci_cfgintr(int bus, int device, int pin, int oldirq)
                        PRVERB(("pci_cfgintr: ROUTE_INTERRUPT failed.\n"));
                        return (PCI_INVALID_IRQ);
                }
-               printf("pci_cfgintr: %d:%d INT%c routed to irq %d\n", bus,
+               kprintf("pci_cfgintr: %d:%d INT%c routed to irq %d\n", bus,
                       device, 'A' + pin - 1, irq);
                return(irq);
        }
@@ -543,17 +543,17 @@ pci_print_irqmask(u_int16_t irqs)
        int i, first;
 
        if (irqs == 0) {
-               printf("none");
+               kprintf("none");
                return;
        }
        first = 1;
        for (i = 0; i < 16; i++, irqs >>= 1)
                if (irqs & 1) {
                        if (!first)
-                               printf(" ");
+                               kprintf(" ");
                        else
                                first = 0;
-                       printf("%d", i);
+                       kprintf("%d", i);
                }
 }
 
@@ -567,23 +567,23 @@ pci_print_route_table(struct PIR_table *ptr, int size)
        struct PIR_intpin *intpin;
        int i, pin;
 
-       printf("PCI-Only Interrupts: ");
+       kprintf("PCI-Only Interrupts: ");
        pci_print_irqmask(ptr->pt_header.ph_pci_irqs);
-       printf("\nLocation  Bus Device Pin  Link  IRQs\n");
+       kprintf("\nLocation  Bus Device Pin  Link  IRQs\n");
        entry = &ptr->pt_entry[0];
        for (i = 0; i < size; i++, entry++) {
                intpin = &entry->pe_intpin[0];
                for (pin = 0; pin < 4; pin++, intpin++)
                        if (intpin->link != 0) {
                                if (entry->pe_slot == 0)
-                                       printf("embedded ");
+                                       kprintf("embedded ");
                                else
-                                       printf("slot %-3d ", entry->pe_slot);
-                               printf(" %3d  %3d    %c   0x%02x  ",
+                                       kprintf("slot %-3d ", entry->pe_slot);
+                               kprintf(" %3d  %3d    %c   0x%02x  ",
                                       entry->pe_bus, entry->pe_device,
                                       'A' + pin, intpin->link);
                                pci_print_irqmask(intpin->irqs);
-                               printf("\n");
+                               kprintf("\n");
                        }
        }
 }
@@ -712,11 +712,11 @@ pci_cfgcheck(int maxdev)
        int port;
 
        if (bootverbose) 
-               printf("pci_cfgcheck:\tdevice ");
+               kprintf("pci_cfgcheck:\tdevice ");
 
        for (device = 0; device < maxdev; device++) {
                if (bootverbose) 
-                       printf("%d ", device);
+                       kprintf("%d ", device);
 
                port = pci_cfgenable(0, device, 0, 0, 4);
                id = inl(port);
@@ -726,25 +726,25 @@ pci_cfgcheck(int maxdev)
                port = pci_cfgenable(0, device, 0, 8, 4);
                class = inl(port) >> 8;
                if (bootverbose)
-                       printf("[class=%06x] ", class);
+                       kprintf("[class=%06x] ", class);
                if (class == 0 || (class & 0xf870ff) != 0)
                        continue;
 
                port = pci_cfgenable(0, device, 0, 14, 1);
                header = inb(port);
                if (bootverbose)
-                       printf("[hdr=%02x] ", header);
+                       kprintf("[hdr=%02x] ", header);
                if ((header & 0x7e) != 0)
                        continue;
 
                if (bootverbose)
-                       printf("is there (id=%08x)\n", id);
+                       kprintf("is there (id=%08x)\n", id);
 
                pci_cfgdisable();
                return (1);
        }
        if (bootverbose) 
-               printf("-- nothing found\n");
+               kprintf("-- nothing found\n");
 
        pci_cfgdisable();
        return (0);
@@ -759,7 +759,7 @@ pcireg_cfgopen(void)
        oldval1 = inl(CONF1_ADDR_PORT);
 
        if (bootverbose) {
-               printf("pci_open(1):\tmode 1 addr port (0x0cf8) is 0x%08x\n",
+               kprintf("pci_open(1):\tmode 1 addr port (0x0cf8) is 0x%08x\n",
                       oldval1);
        }
 
@@ -774,7 +774,7 @@ pcireg_cfgopen(void)
                outl(CONF1_ADDR_PORT, oldval1);
 
                if (bootverbose)
-                       printf("pci_open(1a):\tmode1res=0x%08x (0x%08lx)\n", 
+                       kprintf("pci_open(1a):\tmode1res=0x%08x (0x%08lx)\n", 
                               mode1res, CONF1_ENABLE_CHK);
 
                if (mode1res) {
@@ -787,7 +787,7 @@ pcireg_cfgopen(void)
                outl(CONF1_ADDR_PORT, oldval1);
 
                if (bootverbose)
-                       printf("pci_open(1b):\tmode1res=0x%08x (0x%08lx)\n", 
+                       kprintf("pci_open(1b):\tmode1res=0x%08x (0x%08lx)\n", 
                               mode1res, CONF1_ENABLE_CHK1);
 
                if ((mode1res & CONF1_ENABLE_MSK1) == CONF1_ENABLE_RES1) {
@@ -799,7 +799,7 @@ pcireg_cfgopen(void)
        oldval2 = inb(CONF2_ENABLE_PORT);
 
        if (bootverbose) {
-               printf("pci_open(2):\tmode 2 enable port (0x0cf8) is 0x%02x\n",
+               kprintf("pci_open(2):\tmode 2 enable port (0x0cf8) is 0x%02x\n",
                       oldval2);
        }
 
@@ -813,12 +813,12 @@ pcireg_cfgopen(void)
                outb(CONF2_ENABLE_PORT, oldval2);
 
                if (bootverbose)
-                       printf("pci_open(2a):\tmode2res=0x%02x (0x%02x)\n", 
+                       kprintf("pci_open(2a):\tmode2res=0x%02x (0x%02x)\n", 
                               mode2res, CONF2_ENABLE_CHK);
 
                if (mode2res == CONF2_ENABLE_RES) {
                        if (bootverbose)
-                               printf("pci_open(2a):\tnow trying mechanism 2\n");
+                               kprintf("pci_open(2a):\tnow trying mechanism 2\n");
 
                        if (pci_cfgcheck(16)) 
                                return (cfgmech);
index 21f1e57..42ec0b2 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/i386/isa/pcibus.c,v 1.57.2.12 2003/08/07 06:19:26 imp Exp $
- * $DragonFly: src/sys/bus/pci/i386/pcibus.c,v 1.15 2006/09/05 00:55:36 dillon Exp $
+ * $DragonFly: src/sys/bus/pci/i386/pcibus.c,v 1.16 2006/12/22 23:12:17 swildner Exp $
  *
  */
 
@@ -151,8 +151,8 @@ nexus_legacypci_is_host_bridge(int bus, int slot, int func,
 #ifdef CPU_ELAN
                init_AMD_Elan_sc520();
 #else
-               printf("*** WARNING: kernel option CPU_ELAN missing");
-               printf("-- timekeeping may be wrong\n");
+               kprintf("*** WARNING: kernel option CPU_ELAN missing");
+               kprintf("-- timekeeping may be wrong\n");
 #endif
                break;
        case 0x70061022:
@@ -367,7 +367,7 @@ nexus_legacypci_probe(device_t dev)
                                        if (strcmp(device_get_name(devs[i]),
                                            "pcib") != 0)
                                                continue;
-                                       printf("compare %d\n", nexus_get_pcibus(devs[i]));
+                                       kprintf("compare %d\n", nexus_get_pcibus(devs[i]));
                                        if (nexus_get_pcibus(devs[i]) == busnum)
                                                s = NULL;
                                }
@@ -410,7 +410,7 @@ nexus_legacypci_probe(device_t dev)
         */
        if (!found) {
                if (bootverbose) {
-                       printf("nexus_pcib_identify: no bridge found, "
+                       kprintf("nexus_pcib_identify: no bridge found, "
                               "adding pcib0 anyway\n");
                }
                child = BUS_ADD_CHILD(dev, dev, 100, "pcib", 0);
index 60b5378..4f76811 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/pci.c,v 1.141.2.15 2002/04/30 17:48:18 tmm Exp $
- * $DragonFly: src/sys/bus/pci/pci.c,v 1.35 2006/12/20 23:29:17 tgen Exp $
+ * $DragonFly: src/sys/bus/pci/pci.c,v 1.36 2006/12/22 23:12:17 swildner Exp $
  *
  */
 
@@ -450,7 +450,7 @@ pci_read_extcap(device_t pcib, pcicfgregs *cfg)
        while (nextptr != 0) {
                /* Sanity check */
                if (nextptr > 255) {
-                       printf("illegal PCI extended capability offset %d\n",
+                       kprintf("illegal PCI extended capability offset %d\n",
                            nextptr);
                        return;
                }
@@ -914,7 +914,7 @@ pci_ioctl(struct dev_ioctl_args *ap)
                            sizeof(struct pci_match_conf)) != cio->pat_buf_len){
                                /* The user made a mistake, return an error*/
                                cio->status = PCI_GETCONF_ERROR;
-                               printf("pci_ioctl: pat_buf_len %d != "
+                               kprintf("pci_ioctl: pat_buf_len %d != "
                                       "num_patterns (%d) * sizeof(struct "
                                       "pci_match_conf) (%d)\npci_ioctl: "
                                       "pat_buf_len should be = %d\n",
@@ -922,7 +922,7 @@ pci_ioctl(struct dev_ioctl_args *ap)
                                       (int)sizeof(struct pci_match_conf),
                                       (int)sizeof(struct pci_match_conf) * 
                                       cio->num_patterns);
-                               printf("pci_ioctl: do your headers match your "
+                               kprintf("pci_ioctl: do your headers match your "
                                       "kernel?\n");
                                cio->num_matches = 0;
                                error = EINVAL;
@@ -934,7 +934,7 @@ pci_ioctl(struct dev_ioctl_args *ap)
                         */
                        if (!useracc((caddr_t)cio->patterns,
                                    cio->pat_buf_len, VM_PROT_READ)) {
-                               printf("pci_ioctl: pattern buffer %p, "
+                               kprintf("pci_ioctl: pattern buffer %p, "
                                       "length %u isn't user accessible for"
                                       " READ\n", cio->patterns,
                                       cio->pat_buf_len);
@@ -959,7 +959,7 @@ pci_ioctl(struct dev_ioctl_args *ap)
                         */
                        cio->status = PCI_GETCONF_ERROR;
                        cio->num_matches = 0;
-                       printf("pci_ioctl: invalid GETCONF arguments\n");
+                       kprintf("pci_ioctl: invalid GETCONF arguments\n");
                        error = EINVAL;
                        break;
                } else
@@ -970,7 +970,7 @@ pci_ioctl(struct dev_ioctl_args *ap)
                 */
                if (!useracc((caddr_t)cio->matches,
                             cio->match_buf_len, VM_PROT_WRITE)) {
-                       printf("pci_ioctl: match buffer %p, length %u "
+                       kprintf("pci_ioctl: match buffer %p, length %u "
                               "isn't user accessible for WRITE\n",
                               cio->matches, cio->match_buf_len);
                        error = EACCES;
@@ -1235,25 +1235,25 @@ pci_print_verbose(struct pci_devinfo *dinfo)
        if (bootverbose) {
                pcicfgregs *cfg = &dinfo->cfg;
 
-               printf("found->\tvendor=0x%04x, dev=0x%04x, revid=0x%02x\n", 
+               kprintf("found->\tvendor=0x%04x, dev=0x%04x, revid=0x%02x\n", 
                       cfg->vendor, cfg->device, cfg->revid);
-               printf("\tbus=%d, slot=%d, func=%d\n",
+               kprintf("\tbus=%d, slot=%d, func=%d\n",
                       cfg->bus, cfg->slot, cfg->func);
-               printf("\tclass=[%s]%02x-%02x-%02x, hdrtype=0x%02x, mfdev=%d\n",
+               kprintf("\tclass=[%s]%02x-%02x-%02x, hdrtype=0x%02x, mfdev=%d\n",
                       pci_class_to_string(cfg->baseclass),
                       cfg->baseclass, cfg->subclass, cfg->progif,
                       cfg->hdrtype, cfg->mfdev);
-               printf("\tsubordinatebus=%x \tsecondarybus=%x\n",
+               kprintf("\tsubordinatebus=%x \tsecondarybus=%x\n",
                       cfg->subordinatebus, cfg->secondarybus);
 #ifdef PCI_DEBUG
-               printf("\tcmdreg=0x%04x, statreg=0x%04x, cachelnsz=%d (dwords)\n", 
+               kprintf("\tcmdreg=0x%04x, statreg=0x%04x, cachelnsz=%d (dwords)\n", 
                       cfg->cmdreg, cfg->statreg, cfg->cachelnsz);
-               printf("\tlattimer=0x%02x (%d ns), mingnt=0x%02x (%d ns), maxlat=0x%02x (%d ns)\n",
+               kprintf("\tlattimer=0x%02x (%d ns), mingnt=0x%02x (%d ns), maxlat=0x%02x (%d ns)\n",
                       cfg->lattimer, cfg->lattimer * 30, 
                       cfg->mingnt, cfg->mingnt * 250, cfg->maxlat, cfg->maxlat * 250);
 #endif /* PCI_DEBUG */
                if (cfg->intpin > 0)
-                       printf("\tintpin=%c, irq=%d\n", cfg->intpin +'a' -1, cfg->intline);
+                       kprintf("\tintpin=%c, irq=%d\n", cfg->intpin +'a' -1, cfg->intline);
        }
 }
 
@@ -1341,7 +1341,7 @@ pci_add_map(device_t pcib, int b, int s, int f, int reg,
                          (1 << ln2size));
 
        if (bootverbose) {
-               printf("\tmap[%02x]: type %x, range %2d, base %08x, size %2d\n",
+               kprintf("\tmap[%02x]: type %x, range %2d, base %08x, size %2d\n",
                       reg, pci_maptype(base), ln2range,
                       (unsigned int) base, ln2size);
        }
@@ -1368,7 +1368,7 @@ pci_ata_maps(device_t pcib, device_t bus, device_t dev, int b, int s, int f,
        if ((progif &0x8a) == 0x8a) {
                if (pci_mapbase(pci_read_config(dev, PCIR_BAR(0), 4)) &&
                    pci_mapbase(pci_read_config(dev, PCIR_BAR(2), 4))) {
-                       printf("Trying ATA native PCI addressing mode\n");
+                       kprintf("Trying ATA native PCI addressing mode\n");
                        pci_write_config(dev, PCIR_PROGIF, progif | 0x05, 1);
                }
        }
@@ -1551,14 +1551,14 @@ pci_print_resources(struct resource_list *rl, const char *name, int type,
        SLIST_FOREACH(rle, rl, link) {
                if (rle->type == type) {
                        if (printed == 0)
-                               retval += printf(" %s ", name);
+                               retval += kprintf(" %s ", name);
                        else if (printed > 0)
-                               retval += printf(",");
+                               retval += kprintf(",");
                        printed++;
-                       retval += printf(format, rle->start);
+                       retval += kprintf(format, rle->start);
                        if (rle->count > 1) {
-                               retval += printf("-");
-                               retval += printf(format, rle->start +
+                               retval += kprintf("-");
+                               retval += kprintf(format, rle->start +
                                                 rle->count - 1);
                        }
                }
@@ -1584,9 +1584,9 @@ pci_print_child(device_t dev, device_t child)
        retval += pci_print_resources(rl, "mem", SYS_RES_MEMORY, "%#lx");
        retval += pci_print_resources(rl, "irq", SYS_RES_IRQ, "%ld");
        if (device_get_flags(dev))
-               retval += printf(" flags %#x", device_get_flags(dev));
+               retval += kprintf(" flags %#x", device_get_flags(dev));
 
-       retval += printf(" at device %d.%d", pci_get_slot(child),
+       retval += kprintf(" at device %d.%d", pci_get_slot(child),
                         pci_get_function(child));
 
        retval += bus_print_child_footer(dev, child);
@@ -1615,17 +1615,17 @@ pci_probe_nomatch(device_t dev, device_t child)
        }
        device_printf(dev, "<%s>", desc);
        if (bootverbose || unknown) {
-               printf(" (vendor=0x%04x, dev=0x%04x)",
+               kprintf(" (vendor=0x%04x, dev=0x%04x)",
                        cfg->vendor,
                        cfg->device);
        }
-       printf(" at %d.%d",
+       kprintf(" at %d.%d",
                pci_get_slot(child),
                pci_get_function(child));
        if (cfg->intpin > 0 && cfg->intline != 255) {
-               printf(" irq %d", cfg->intline);
+               kprintf(" irq %d", cfg->intline);
        }
-       printf("\n");
+       kprintf("\n");
                                       
        return;
 }
@@ -1965,7 +1965,7 @@ pci_get_resource(device_t dev, device_t child, int type, int rid,
 void
 pci_delete_resource(device_t dev, device_t child, int type, int rid)
 {
-       printf("pci_delete_resource: PCI resources can not be deleted\n");
+       kprintf("pci_delete_resource: PCI resources can not be deleted\n");
 }
 
 struct resource_list *
index e194136..dc5ba52 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/pci/pci_compat.c,v 1.35.2.1 2001/10/14 21:14:14 luigi Exp $
- * $DragonFly: src/sys/bus/pci/pci_compat.c,v 1.12 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/pci/pci_compat.c,v 1.13 2006/12/22 23:12:17 swildner Exp $
  *
  */
 
@@ -130,7 +130,7 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, u_int intflags
                res = bus_alloc_resource(cfg->dev, SYS_RES_IRQ, &rid,
                                         irq, irq, 1, resflags);
                if (!res) {
-                       printf("pci_map_int: can't allocate interrupt\n");
+                       kprintf("pci_map_int: can't allocate interrupt\n");
                        return 0;
                }
 
@@ -172,11 +172,11 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, u_int intflags
                        nextpin = next_apic_irq(nextpin);
                }
                if (muxcnt >= 5) {
-                       printf("bogus MP table, more than 4 IO APIC pins connected to the same PCI device or ISA/EISA interrupt\n");
+                       kprintf("bogus MP table, more than 4 IO APIC pins connected to the same PCI device or ISA/EISA interrupt\n");
                        return 0;
                }
                
-               printf("bogus MP table, %d IO APIC pins connected to the same PCI device or ISA/EISA interrupt\n", muxcnt);
+               kprintf("bogus MP table, %d IO APIC pins connected to the same PCI device or ISA/EISA interrupt\n", muxcnt);
 
                nextpin = next_apic_irq(irq);
                while (nextpin >= 0) {
@@ -185,17 +185,17 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, u_int intflags
                                                 nextpin, nextpin, 1,
                                                 resflags);
                        if (!res) {
-                               printf("pci_map_int: can't allocate extra interrupt\n");
+                               kprintf("pci_map_int: can't allocate extra interrupt\n");
                                return 0;
                        }
                        error = BUS_SETUP_INTR(device_get_parent(cfg->dev),
                                               cfg->dev, res, flags,
                                               handler, arg, &ih, NULL);
                        if (error != 0) {
-                               printf("pci_map_int: BUS_SETUP_INTR failed\n");
+                               kprintf("pci_map_int: BUS_SETUP_INTR failed\n");
                                return 0;
                        }
-                       printf("Registered extra interrupt handler for int %d (in addition to int %d)\n", nextpin, irq);
+                       kprintf("Registered extra interrupt handler for int %d (in addition to int %d)\n", nextpin, irq);
                        nextpin = next_apic_irq(nextpin);
                }
 #endif
@@ -303,7 +303,7 @@ compat_pci_handler(module_t mod, int type, void *data)
                devclass_add_driver(pci_devclass, (driver_t *)driver);
                break;
        case MOD_UNLOAD:
-               printf("%s: module unload not supported!\n", dvp->pd_name);
+               kprintf("%s: module unload not supported!\n", dvp->pd_name);
                return EOPNOTSUPP;
        default:
                break;
index 2280ddf..fe763f9 100644 (file)
@@ -26,7 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $DragonFly: src/sys/bus/pci/pci_isab.c,v 1.7 2006/10/25 20:55:51 dillon Exp $
+ * $DragonFly: src/sys/bus/pci/pci_isab.c,v 1.8 2006/12/22 23:12:17 swildner Exp $
  */
 
 #include "opt_pci.h"
@@ -518,7 +518,7 @@ writeconfig (device_t dev, const struct condmsg *tbl)
                text = (v & tbl->mask) ? "disabled" : "enabled";
            }
        }
-       if (text) printf ("%s", text);
+       if (text) kprintf ("%s", text);
        tbl++;
     }
 }
index bf98af4..21eeae9 100644 (file)
@@ -1,7 +1,7 @@
 /**************************************************************************
 **
 ** $FreeBSD: src/sys/pci/pcisupport.c,v 1.154.2.15 2003/04/29 15:55:06 simokawa Exp $
-** $DragonFly: src/sys/bus/pci/pcisupport.c,v 1.19 2006/12/20 18:14:37 dillon Exp $
+** $DragonFly: src/sys/bus/pci/pcisupport.c,v 1.20 2006/12/22 23:12:17 swildner Exp $
 **
 **  Device driver for DEC/INTEL PCI chipsets.
 **
@@ -89,13 +89,13 @@ fixwsc_natoma(device_t dev)
        pmccfg = pci_read_config(dev, 0x50, 2);
 #if defined(SMP)
        if (pmccfg & 0x8000) {
-               printf("Correcting Natoma config for SMP\n");
+               kprintf("Correcting Natoma config for SMP\n");
                pmccfg &= ~0x8000;
                pci_write_config(dev, 0x50, pmccfg, 2);
        }
 #else
        if ((pmccfg & 0x8000) == 0) {
-               printf("Correcting Natoma config for non-SMP\n");
+               kprintf("Correcting Natoma config for non-SMP\n");
                pmccfg |= 0x8000;
                pci_write_config(dev, 0x50, pmccfg, 2);
        }
index efc960b..b708052 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ppbus/ppb_1284.c,v 1.11 2000/01/14 08:03:14 nsouch Exp $
- * $DragonFly: src/sys/bus/ppbus/ppb_1284.c,v 1.4 2005/02/17 13:59:35 joerg Exp $
+ * $DragonFly: src/sys/bus/ppbus/ppb_1284.c,v 1.5 2006/12/22 23:12:17 swildner Exp $
  *
  */
 
@@ -129,7 +129,7 @@ ppb_1284_set_error(device_t bus, int error, int event)
        }
 
 #ifdef DEBUG_1284
-       printf("ppb1284: error=%d status=0x%x event=%d\n", error,
+       kprintf("ppb1284: error=%d status=0x%x event=%d\n", error,
                ppb_rstr(bus) & 0xff, event);
 #endif
 
@@ -226,7 +226,7 @@ ppb_peripheral_negociate(device_t bus, int mode, int options)
 
                if (r == NIBBLE_1284_NORMAL) {
 #ifdef DEBUG_1284
-                       printf("R");
+   &