From e3869ec75233248f8fdcaa538249be098c77be50 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Fri, 22 Dec 2006 23:26:27 +0000 Subject: [PATCH] Rename printf -> kprintf in sys/ and add some defines where necessary (files which are used in userland, too). --- sys/dev/acpica5/Osd/OsdDebug.c | 14 +- sys/dev/acpica5/Osd/OsdHardware.c | 12 +- sys/dev/acpica5/Osd/OsdMemory.c | 8 +- sys/dev/acpica5/Osd/OsdSynch.c | 14 +- sys/dev/acpica5/Osd/OsdTable.c | 6 +- sys/dev/acpica5/acpi.c | 30 +- sys/dev/acpica5/acpi_cpu.c | 6 +- sys/dev/acpica5/acpi_ec.c | 14 +- sys/dev/acpica5/acpi_pci_link.c | 58 +- sys/dev/acpica5/acpi_pcib.c | 6 +- sys/dev/acpica5/acpi_resource.c | 4 +- sys/dev/acpica5/acpi_timer.c | 4 +- sys/dev/acpica5/acpivar.h | 4 +- sys/dev/agp/agp.c | 6 +- sys/dev/agp/agp_i810.c | 8 +- sys/dev/agp/agp_intel.c | 10 +- sys/dev/agp/agppriv.h | 6 +- sys/dev/atm/en/midway.c | 312 +++++------ sys/dev/crypto/hifn/hifn7751.c | 6 +- sys/dev/crypto/ubsec/ubsec.c | 56 +- sys/dev/disk/advansys/adv_eisa.c | 10 +- sys/dev/disk/advansys/adv_isa.c | 6 +- sys/dev/disk/advansys/adv_pci.c | 4 +- sys/dev/disk/advansys/advansys.c | 30 +- sys/dev/disk/advansys/advlib.c | 10 +- sys/dev/disk/advansys/adw_pci.c | 4 +- sys/dev/disk/advansys/adwcam.c | 42 +- sys/dev/disk/advansys/adwlib.c | 30 +- sys/dev/disk/advansys/adwlib.h | 4 +- sys/dev/disk/aha/aha.c | 12 +- sys/dev/disk/aha/aha_isa.c | 6 +- sys/dev/disk/ahb/ahb.c | 42 +- sys/dev/disk/aic/aic.c | 26 +- sys/dev/disk/aic7xxx/ahc_eisa.c | 6 +- sys/dev/disk/aic7xxx/ahc_pci.c | 8 +- sys/dev/disk/aic7xxx/ahd_pci.c | 4 +- sys/dev/disk/aic7xxx/aic7770.c | 12 +- sys/dev/disk/aic7xxx/aic79xx.c | 530 +++++++++--------- sys/dev/disk/aic7xxx/aic79xx_inline.h | 8 +- sys/dev/disk/aic7xxx/aic79xx_osm.c | 48 +- sys/dev/disk/aic7xxx/aic79xx_pci.c | 56 +- sys/dev/disk/aic7xxx/aic7xxx.c | 372 ++++++------- sys/dev/disk/aic7xxx/aic7xxx_93cx6.c | 10 +- sys/dev/disk/aic7xxx/aic7xxx_osm.c | 42 +- sys/dev/disk/aic7xxx/aic7xxx_pci.c | 74 +-- sys/dev/disk/amd/amd.c | 58 +- sys/dev/disk/ata/ata-all.c | 24 +- sys/dev/disk/ata/ata-disk.c | 12 +- sys/dev/disk/ata/ata-pci.c | 6 +- sys/dev/disk/ata/ata-raid.c | 74 +-- sys/dev/disk/ata/atapi-all.c | 12 +- sys/dev/disk/ata/atapi-cam.c | 22 +- sys/dev/disk/ata/atapi-cd.c | 114 ++-- sys/dev/disk/ata/atapi-fd.c | 18 +- sys/dev/disk/ata/atapi-tape.c | 48 +- sys/dev/disk/buslogic/bt.c | 58 +- sys/dev/disk/buslogic/bt_eisa.c | 8 +- sys/dev/disk/buslogic/bt_isa.c | 4 +- sys/dev/disk/ccd/ccd.c | 70 +-- sys/dev/disk/fd/fd.c | 30 +- sys/dev/disk/isp/isp_freebsd.c | 10 +- sys/dev/disk/isp/isp_pci.c | 26 +- sys/dev/disk/mcd/mcd.c | 74 +-- sys/dev/disk/md/md.c | 18 +- sys/dev/disk/mpt/mpt_debug.c | 164 +++--- sys/dev/disk/mpt/mpt_freebsd.c | 26 +- sys/dev/disk/nata/ata-all.c | 12 +- sys/dev/disk/nata/ata-chipset.c | 4 +- sys/dev/disk/nata/ata-lowlevel.c | 6 +- sys/dev/disk/nata/ata-queue.c | 28 +- sys/dev/disk/nata/ata-raid.c | 732 ++++++++++++------------- sys/dev/disk/nata/ata-usb.c | 4 +- sys/dev/disk/nata/atapi-cam.c | 32 +- sys/dev/disk/nata/atapi-cd.c | 104 ++-- sys/dev/disk/nata/atapi-tape.c | 48 +- sys/dev/disk/ncr/ncr.c | 230 ++++---- sys/dev/disk/ncv/ncr53c500.c | 38 +- sys/dev/disk/ncv/ncr53c500_pccard.c | 6 +- sys/dev/disk/nsp/nsp.c | 38 +- sys/dev/disk/nsp/nsp_pccard.c | 8 +- sys/dev/disk/sbp/sbp.c | 246 ++++----- sys/dev/disk/scd/scd.c | 64 +-- sys/dev/disk/simos/simos.c | 4 +- sys/dev/disk/stg/tmc18c30.c | 48 +- sys/dev/disk/stg/tmc18c30_isa.c | 6 +- sys/dev/disk/stg/tmc18c30_pccard.c | 6 +- sys/dev/disk/sym/sym_hipd.c | 218 ++++---- sys/dev/disk/trm/trm.c | 22 +- sys/dev/disk/vn/vn.c | 16 +- sys/dev/disk/vpo/immio.c | 16 +- sys/dev/disk/vpo/vpo.c | 26 +- sys/dev/disk/vpo/vpoio.c | 16 +- sys/dev/disk/wt/wt.c | 14 +- sys/dev/drm/drm_os_freebsd.h | 12 +- sys/dev/misc/atkbdc_layer/atkbdc_isa.c | 6 +- sys/dev/misc/dcons/dcons_crom.c | 6 +- sys/dev/misc/dcons/dcons_os.c | 6 +- sys/dev/misc/gpib/gpib.c | 60 +- sys/dev/misc/kbd/atkbd.c | 20 +- sys/dev/misc/kbd/kbd.c | 12 +- sys/dev/misc/labpc/labpc.c | 36 +- sys/dev/misc/lpt/lpt.c | 8 +- sys/dev/misc/mse/mse.c | 6 +- sys/dev/misc/musycc/musycc.c | 88 +-- sys/dev/misc/pcfclock/pcfclock.c | 8 +- sys/dev/misc/ppc/ppc.c | 148 ++--- sys/dev/misc/ppi/ppi.c | 20 +- sys/dev/misc/psm/psm.c | 42 +- sys/dev/misc/puc/puc.c | 46 +- sys/dev/misc/snp/snp.c | 10 +- sys/dev/misc/spic/spic.c | 12 +- sys/dev/misc/syscons/apm/apm_saver.c | 4 +- sys/dev/misc/syscons/syscons.c | 24 +- sys/dev/misc/syscons/syscons.h | 4 +- sys/dev/misc/xrpu/xrpu.c | 4 +- sys/dev/netif/acx/if_acx.c | 24 +- sys/dev/netif/an/if_an.c | 24 +- sys/dev/netif/ar/if_ar.c | 92 ++-- sys/dev/netif/ar/if_ar_isa.c | 8 +- sys/dev/netif/ar/if_ar_pci.c | 6 +- sys/dev/netif/ath/ath/if_ath.c | 36 +- sys/dev/netif/ath/rate_amrr/amrr.c | 6 +- sys/dev/netif/ath/rate_onoe/onoe.c | 6 +- sys/dev/netif/ath/rate_sample/sample.c | 6 +- sys/dev/netif/ath/rate_sample/sample.h | 6 +- sys/dev/netif/awi/am79c930.c | 8 +- sys/dev/netif/awi/awi.c | 118 ++-- sys/dev/netif/cs/if_cs.c | 10 +- sys/dev/netif/cx/cx.c | 14 +- sys/dev/netif/cx/if_cx.c | 38 +- sys/dev/netif/dc/if_dc.c | 6 +- sys/dev/netif/de/if_de.c | 14 +- sys/dev/netif/de/if_devar.h | 4 +- sys/dev/netif/ed/if_ed.c | 26 +- sys/dev/netif/ed/if_ed_pccard.c | 4 +- sys/dev/netif/el/if_el.c | 6 +- sys/dev/netif/em/if_em.h | 20 +- sys/dev/netif/em/if_em_osdep.h | 14 +- sys/dev/netif/en_pci/if_en_pci.c | 8 +- sys/dev/netif/ep/if_ep.c | 12 +- sys/dev/netif/ex/if_ex.c | 70 +-- sys/dev/netif/ex/if_ex_isa.c | 24 +- sys/dev/netif/ex/if_ex_pccard.c | 8 +- sys/dev/netif/fe/if_fe.c | 48 +- sys/dev/netif/fe/if_fe_isa.c | 10 +- sys/dev/netif/fpa/if_fpa.c | 22 +- sys/dev/netif/gx/if_gx.c | 6 +- sys/dev/netif/ic/if_ic.c | 4 +- sys/dev/netif/ie/if_ie.c | 68 +-- sys/dev/netif/ipw/if_ipw.c | 10 +- sys/dev/netif/iwi/if_iwi.c | 14 +- sys/dev/netif/kue/if_kue.c | 44 +- sys/dev/netif/le/if_le.c | 12 +- sys/dev/netif/lge/if_lge.c | 38 +- sys/dev/netif/lnc/am7990.c | 6 +- sys/dev/netif/lnc/am79900.c | 6 +- sys/dev/netif/mii_layer/acphy.c | 6 +- sys/dev/netif/mii_layer/amphy.c | 6 +- sys/dev/netif/mii_layer/brgphy.c | 6 +- sys/dev/netif/mii_layer/ciphy.c | 6 +- sys/dev/netif/mii_layer/dcphy.c | 6 +- sys/dev/netif/mii_layer/e1000phy.c | 6 +- sys/dev/netif/mii_layer/exphy.c | 6 +- sys/dev/netif/mii_layer/inphy.c | 6 +- sys/dev/netif/mii_layer/ip1000phy.c | 16 +- sys/dev/netif/mii_layer/lxtphy.c | 6 +- sys/dev/netif/mii_layer/mii_physubr.c | 4 +- sys/dev/netif/mii_layer/mlphy.c | 6 +- sys/dev/netif/mii_layer/nsgphy.c | 6 +- sys/dev/netif/mii_layer/nsphy.c | 6 +- sys/dev/netif/mii_layer/pnaphy.c | 6 +- sys/dev/netif/mii_layer/pnphy.c | 6 +- sys/dev/netif/mii_layer/qsphy.c | 6 +- sys/dev/netif/mii_layer/rgephy.c | 6 +- sys/dev/netif/mii_layer/rlphy.c | 6 +- sys/dev/netif/mii_layer/ruephy.c | 6 +- sys/dev/netif/mii_layer/tlphy.c | 8 +- sys/dev/netif/mii_layer/ukphy.c | 6 +- sys/dev/netif/mii_layer/xmphy.c | 6 +- sys/dev/netif/mn/if_mn.c | 98 ++-- sys/dev/netif/my/if_my.c | 106 ++-- sys/dev/netif/nge/if_nge.c | 42 +- sys/dev/netif/nv/if_nv.c | 4 +- sys/dev/netif/nv/if_nvreg.h | 4 +- sys/dev/netif/pcn/if_pcn.c | 20 +- sys/dev/netif/pdq_layer/pdq.c | 34 +- sys/dev/netif/plip/if_plip.c | 6 +- sys/dev/netif/ral/rt2560.c | 6 +- sys/dev/netif/ral/rt2661.c | 10 +- sys/dev/netif/ray/if_ray.c | 40 +- sys/dev/netif/ray/if_raydbg.h | 16 +- sys/dev/netif/rdp/if_rdp.c | 40 +- sys/dev/netif/rtw/rtw.c | 24 +- sys/dev/netif/rtw/rtwphyio.c | 10 +- sys/dev/netif/rtw/rtwvar.h | 4 +- sys/dev/netif/rtw/smc93cx6.c | 10 +- sys/dev/netif/rum/if_rum.c | 62 +-- sys/dev/netif/sbni/if_sbni.c | 12 +- sys/dev/netif/sbni/if_sbni_pci.c | 10 +- sys/dev/netif/sbsh/if_sbsh.c | 8 +- sys/dev/netif/sf/if_sf.c | 30 +- sys/dev/netif/sk/if_sk.c | 26 +- sys/dev/netif/sn/if_sn.c | 28 +- sys/dev/netif/sr/if_sr.c | 142 ++--- sys/dev/netif/sr/if_sr_isa.c | 16 +- sys/dev/netif/sr/if_sr_pci.c | 4 +- sys/dev/netif/tx/if_tx.c | 10 +- sys/dev/netif/txp/if_txp.c | 12 +- sys/dev/netif/ural/if_ural.c | 58 +- sys/dev/netif/vr/if_vr.c | 26 +- sys/dev/netif/vx/if_vx.c | 10 +- sys/dev/netif/vx/if_vx_pci.c | 4 +- sys/dev/netif/wi/if_wi.c | 36 +- sys/dev/netif/wl/if_wl.c | 50 +- sys/dev/netif/xe/if_xe.c | 22 +- sys/dev/netif/xl/if_xl.c | 16 +- sys/dev/pccard/cardbus/cardbus.c | 38 +- sys/dev/pccard/cardbus/cardbus_cis.c | 62 +-- sys/dev/pccard/exca/exca.c | 6 +- sys/dev/pccard/pccbb/pccbb.c | 12 +- sys/dev/powermng/i386/alpm/alpm.c | 44 +- sys/dev/powermng/i386/amdpm/amdpm.c | 28 +- sys/dev/powermng/i386/intpm/intpm.c | 16 +- sys/dev/powermng/i386/viapm/viapm.c | 26 +- sys/dev/raid/aac/aac.c | 14 +- sys/dev/raid/aac/aac_cam.c | 4 +- sys/dev/raid/aac/aac_disk.c | 6 +- sys/dev/raid/aac/aacvar.h | 18 +- sys/dev/raid/amr/amr_pci.c | 6 +- sys/dev/raid/amr/amrvar.h | 8 +- sys/dev/raid/asr/asr.c | 50 +- sys/dev/raid/ciss/ciss.c | 30 +- sys/dev/raid/ciss/cissvar.h | 18 +- sys/dev/raid/dpt/dpt_control.c | 30 +- sys/dev/raid/dpt/dpt_eisa.c | 4 +- sys/dev/raid/dpt/dpt_scsi.c | 98 ++-- sys/dev/raid/ida/ida.c | 4 +- sys/dev/raid/iir/iir.c | 48 +- sys/dev/raid/iir/iir.h | 6 +- sys/dev/raid/iir/iir_pci.c | 10 +- sys/dev/raid/ips/ips.c | 6 +- sys/dev/raid/ips/ips.h | 4 +- sys/dev/raid/ips/ips_commands.c | 16 +- sys/dev/raid/ips/ips_disk.c | 10 +- sys/dev/raid/ips/ips_pci.c | 6 +- sys/dev/raid/mlx/mlx.c | 12 +- sys/dev/raid/mlx/mlxvar.h | 6 +- sys/dev/raid/mly/mly.c | 6 +- sys/dev/raid/mly/mlyvar.h | 12 +- sys/dev/raid/pst/pst-iop.c | 44 +- sys/dev/raid/pst/pst-raid.c | 16 +- sys/dev/raid/twa/twa.h | 4 +- sys/dev/raid/twa/twa_cam.c | 4 +- sys/dev/raid/twa/twa_freebsd.c | 4 +- sys/dev/raid/twa/twa_reg.h | 4 +- sys/dev/raid/twe/twe_freebsd.c | 8 +- sys/dev/raid/twe/twereg.h | 4 +- sys/dev/raid/twe/twevar.h | 6 +- sys/dev/raid/vinum/vinumconfig.c | 10 +- sys/dev/raid/vinum/vinumext.h | 4 +- sys/dev/raid/vinum/vinumio.c | 6 +- sys/dev/raid/vinum/vinumrevive.c | 4 +- sys/dev/serial/cy/cy.c | 64 +-- sys/dev/serial/cy/cy_pci.c | 8 +- sys/dev/serial/dgb/dgm.c | 44 +- sys/dev/serial/dgb/dgmreg.h | 16 +- sys/dev/serial/digi/digi.c | 4 +- sys/dev/serial/rc/rc.c | 48 +- sys/dev/serial/rp/rp.c | 6 +- sys/dev/serial/si/si.c | 26 +- sys/dev/serial/si/si_isa.c | 6 +- sys/dev/serial/sio/sio.c | 70 +-- sys/dev/serial/stl/stallion.c | 188 +++---- sys/dev/serial/stli/istallion.c | 152 ++--- sys/dev/sound/isa/ad1816.c | 18 +- sys/dev/sound/isa/ess.c | 22 +- sys/dev/sound/isa/gusc.c | 6 +- sys/dev/sound/isa/mss.c | 98 ++-- sys/dev/sound/isa/sb16.c | 18 +- sys/dev/sound/isa/sb8.c | 14 +- sys/dev/sound/isa/sbc.c | 10 +- sys/dev/sound/pci/als4000.c | 10 +- sys/dev/sound/pci/aureal.c | 30 +- sys/dev/sound/pci/cmi.c | 26 +- sys/dev/sound/pci/cs4281.c | 8 +- sys/dev/sound/pci/csa.c | 6 +- sys/dev/sound/pci/ds1.c | 18 +- sys/dev/sound/pci/emu10k1.c | 24 +- sys/dev/sound/pci/es137x.c | 26 +- sys/dev/sound/pci/fm801.c | 14 +- sys/dev/sound/pci/ich.c | 8 +- sys/dev/sound/pci/maestro.c | 6 +- sys/dev/sound/pci/maestro3.c | 6 +- sys/dev/sound/pci/solo.c | 34 +- sys/dev/sound/pci/t4dwave.c | 18 +- sys/dev/sound/pci/via8233.c | 8 +- sys/dev/sound/pci/via82c686.c | 20 +- sys/dev/sound/pci/vibes.c | 30 +- sys/dev/sound/pcm/ac97.c | 20 +- sys/dev/sound/pcm/buffer.c | 22 +- sys/dev/sound/pcm/channel.c | 84 +-- sys/dev/sound/pcm/dsp.c | 20 +- sys/dev/sound/pcm/feeder.c | 30 +- sys/dev/sound/pcm/feeder_rate.c | 6 +- sys/dev/sound/pcm/vchan.c | 12 +- sys/dev/sound/usb/uaudio.c | 52 +- sys/dev/usbmisc/ubsa/ubsa.c | 30 +- sys/dev/usbmisc/ucom/ucom.c | 22 +- sys/dev/usbmisc/udbp/udbp.c | 18 +- sys/dev/usbmisc/ufm/ufm.c | 8 +- sys/dev/usbmisc/uftdi/uftdi.c | 16 +- sys/dev/usbmisc/ugen/ugen.c | 24 +- sys/dev/usbmisc/uhid/uhid.c | 10 +- sys/dev/usbmisc/ukbd/ukbd.c | 10 +- sys/dev/usbmisc/ulpt/ulpt.c | 30 +- sys/dev/usbmisc/umass/umass.c | 78 +-- sys/dev/usbmisc/umct/umct.c | 26 +- sys/dev/usbmisc/umodem/umodem.c | 28 +- sys/dev/usbmisc/ums/ums.c | 18 +- sys/dev/usbmisc/uplcom/uplcom.c | 44 +- sys/dev/usbmisc/urio/urio.c | 6 +- sys/dev/usbmisc/uscanner/uscanner.c | 18 +- sys/dev/usbmisc/uvisor/uvisor.c | 28 +- sys/dev/usbmisc/uvscom/uvscom.c | 38 +- sys/dev/video/bktr/bktr_audio.c | 18 +- sys/dev/video/bktr/bktr_card.c | 44 +- sys/dev/video/bktr/bktr_core.c | 52 +- sys/dev/video/bktr/bktr_core.h | 4 +- sys/dev/video/bktr/bktr_i2c.c | 14 +- sys/dev/video/bktr/bktr_mem.c | 16 +- sys/dev/video/bktr/bktr_os.c | 20 +- sys/dev/video/bktr/bktr_tuner.c | 32 +- sys/dev/video/bktr/msp34xx.c | 26 +- sys/dev/video/fb/bmp/splash_bmp.c | 16 +- sys/dev/video/fb/fb.c | 24 +- sys/dev/video/fb/pcx/splash_pcx.c | 10 +- sys/dev/video/fb/splash.c | 6 +- sys/dev/video/fb/vga.c | 32 +- sys/dev/video/gsc/gsc.c | 8 +- sys/dev/video/i386/vesa/vesa.c | 62 +-- sys/dev/video/meteor/meteor.c | 62 +-- 341 files changed, 5288 insertions(+), 5288 deletions(-) diff --git a/sys/dev/acpica5/Osd/OsdDebug.c b/sys/dev/acpica5/Osd/OsdDebug.c index 076cd7bdfc..4329d627b6 100644 --- a/sys/dev/acpica5/Osd/OsdDebug.c +++ b/sys/dev/acpica5/Osd/OsdDebug.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdDebug.c,v 1.9 2004/09/02 04:28:05 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdDebug.c,v 1.4 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/Osd/OsdDebug.c,v 1.5 2006/12/22 23:26:14 swildner Exp $ */ /* @@ -55,7 +55,7 @@ AcpiOsGetLine(char *Buffer) *cp = 0; return (AE_OK); #else - printf("AcpiOsGetLine called but no input support"); + kprintf("AcpiOsGetLine called but no input support"); return (AE_NOT_EXIST); #endif /* DDB */ } @@ -64,8 +64,8 @@ void AcpiOsDbgAssert(void *FailedAssertion, void *FileName, UINT32 LineNumber, char *Message) { - printf("ACPI: %s:%d - %s\n", (char *)FileName, LineNumber, Message); - printf("ACPI: assertion %s\n", (char *)FailedAssertion); + kprintf("ACPI: %s:%d - %s\n", (char *)FileName, LineNumber, Message); + kprintf("ACPI: assertion %s\n", (char *)FailedAssertion); } ACPI_STATUS @@ -76,7 +76,7 @@ AcpiOsSignal(UINT32 Function, void *Info) switch (Function) { case ACPI_SIGNAL_FATAL: fatal = (ACPI_SIGNAL_FATAL_INFO *)Info; - printf("ACPI fatal signal, type 0x%x code 0x%x argument 0x%x", + kprintf("ACPI fatal signal, type 0x%x code 0x%x argument 0x%x", fatal->Type, fatal->Code, fatal->Argument); Debugger("AcpiOsSignal"); break; @@ -101,12 +101,12 @@ acpi_EnterDebugger(void) static int initted = 0; if (!initted) { - printf("Initialising ACPICA debugger...\n"); + kprintf("Initialising ACPICA debugger...\n"); AcpiDbInitialize(); initted = 1; } - printf("Entering ACPICA debugger...\n"); + kprintf("Entering ACPICA debugger...\n"); AcpiDbUserCommands('A', &obj); } #endif /* ACPI_DEBUGGER */ diff --git a/sys/dev/acpica5/Osd/OsdHardware.c b/sys/dev/acpica5/Osd/OsdHardware.c index d455a48b71..5a2d439ccf 100644 --- a/sys/dev/acpica5/Osd/OsdHardware.c +++ b/sys/dev/acpica5/Osd/OsdHardware.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.13 2004/04/14 03:39:08 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdHardware.c,v 1.3 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/Osd/OsdHardware.c,v 1.4 2006/12/22 23:26:14 swildner Exp $ */ /* @@ -174,7 +174,7 @@ acpi_bus_number(ACPI_HANDLE root, ACPI_HANDLE curr, ACPI_PCI_ID *PciId) if (root == curr) { status = acpi_GetInteger(root, "_BBN", &bus); if (ACPI_FAILURE(status) && bootverbose) - printf("acpi_bus_number: root bus has no _BBN, assuming 0\n"); + kprintf("acpi_bus_number: root bus has no _BBN, assuming 0\n"); return (bus); } status = AcpiGetParent(curr, &parent); @@ -186,14 +186,14 @@ acpi_bus_number(ACPI_HANDLE root, ACPI_HANDLE curr, ACPI_PCI_ID *PciId) /* Validate parent bus device type. */ if (ACPI_FAILURE(AcpiGetType(parent, &type)) || type != ACPI_TYPE_DEVICE) { - printf("acpi_bus_number: not a device, type %d\n", type); + kprintf("acpi_bus_number: not a device, type %d\n", type); return (bus); } /* Get the parent's slot and function. */ status = acpi_GetInteger(parent, "_ADR", &adr); if (ACPI_FAILURE(status)) { - printf("acpi_bus_number: can't get _ADR\n"); + kprintf("acpi_bus_number: can't get _ADR\n"); return (bus); } slot = ACPI_HIWORD(adr); @@ -236,7 +236,7 @@ AcpiOsDerivePciId(ACPI_HANDLE rhandle, ACPI_HANDLE chandle, ACPI_PCI_ID **PciId) if (rhandle == chandle) { status = acpi_GetInteger(rhandle, "_BBN", &bus); if (ACPI_FAILURE(status) && bootverbose) - printf("AcpiOsDerivePciId: root bus has no _BBN, assuming 0\n"); + kprintf("AcpiOsDerivePciId: root bus has no _BBN, assuming 0\n"); } /* @@ -249,7 +249,7 @@ AcpiOsDerivePciId(ACPI_HANDLE rhandle, ACPI_HANDLE chandle, ACPI_PCI_ID **PciId) bus = acpi_bus_number(rhandle, parent, *PciId); (*PciId)->Bus = bus; if (bootverbose) { - printf("AcpiOsDerivePciId: bus %d dev %d func %d\n", + kprintf("AcpiOsDerivePciId: bus %d dev %d func %d\n", (*PciId)->Bus, (*PciId)->Device, (*PciId)->Function); } } diff --git a/sys/dev/acpica5/Osd/OsdMemory.c b/sys/dev/acpica5/Osd/OsdMemory.c index 3e2f5cbbe6..ba6a7d8c10 100644 --- a/sys/dev/acpica5/Osd/OsdMemory.c +++ b/sys/dev/acpica5/Osd/OsdMemory.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdMemory.c,v 1.11 2004/04/14 03:39:08 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdMemory.c,v 1.4 2006/09/05 00:55:36 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/Osd/OsdMemory.c,v 1.5 2006/12/22 23:26:14 swildner Exp $ */ /* @@ -108,7 +108,7 @@ again: ) { *ptrack = track->next; pmap_unmapdev((vm_offset_t)track->base, track->size); - printf("AcpiOsUnmapMemory: Warning, deallocation request too" + kprintf("AcpiOsUnmapMemory: Warning, deallocation request too" " large! %p/%08x (actual was %p/%08x)\n", LogicalAddress, Length, track->base, track->size); @@ -122,13 +122,13 @@ again: if ((char *)LogicalAddress + Length >= (char *)track->base && (char *)LogicalAddress < (char *)track->base + track->size ) { - printf("AcpiOsUnmapMemory: Warning, deallocation did not " + kprintf("AcpiOsUnmapMemory: Warning, deallocation did not " "track allocation: %p/%08x (actual was %p/%08x)\n", LogicalAddress, Length, track->base, track->size); } } - printf("AcpiOsUnmapMemory: Warning, broken ACPI, bad unmap: %p/%08x\n", + kprintf("AcpiOsUnmapMemory: Warning, broken ACPI, bad unmap: %p/%08x\n", LogicalAddress, Length); } diff --git a/sys/dev/acpica5/Osd/OsdSynch.c b/sys/dev/acpica5/Osd/OsdSynch.c index 1fa1966e31..f16c006f7a 100644 --- a/sys/dev/acpica5/Osd/OsdSynch.c +++ b/sys/dev/acpica5/Osd/OsdSynch.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.21 2004/05/05 20:07:52 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdSynch.c,v 1.8 2006/09/05 00:55:36 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/Osd/OsdSynch.c,v 1.9 2006/12/22 23:26:14 swildner Exp $ */ /* @@ -167,7 +167,7 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout) #if 0 if (as->as_units < Units && as->as_timeouts > 10) { - printf("%s: semaphore %p too many timeouts, resetting\n", __func__, as); + kprintf("%s: semaphore %p too many timeouts, resetting\n", __func__, as); AS_LOCK(as); as->as_units = as->as_maxunits; if (as->as_pendings) @@ -236,7 +236,7 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout) as->as_pendings++; if (acpi_semaphore_debug) { - printf("%s: Sleep %d, pending %d, semaphore %p, thread %d\n", + kprintf("%s: Sleep %d, pending %d, semaphore %p, thread %d\n", __func__, Timeout, as->as_pendings, as, AcpiOsGetThreadId()); } @@ -279,7 +279,7 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout) tmo = 1; if (acpi_semaphore_debug) { - printf("%s: Wakeup timeleft(%lu, %lu), tmo %u, sem %p, thread %d\n", + kprintf("%s: Wakeup timeleft(%lu, %lu), tmo %u, sem %p, thread %d\n", __func__, timelefttv.tv_sec, timelefttv.tv_usec, tmo, as, AcpiOsGetThreadId()); } @@ -287,11 +287,11 @@ AcpiOsWaitSemaphore(ACPI_HANDLE Handle, UINT32 Units, UINT16 Timeout) if (acpi_semaphore_debug) { if (result == AE_TIME && Timeout > 0) { - printf("%s: Timeout %d, pending %d, semaphore %p\n", + kprintf("%s: Timeout %d, pending %d, semaphore %p\n", __func__, Timeout, as->as_pendings, as); } if (result == AE_OK && (as->as_timeouts > 0 || as->as_pendings > 0)) { - printf("%s: Acquire %d, units %d, pending %d, sem %p, thread %d\n", + kprintf("%s: Acquire %d, units %d, pending %d, sem %p, thread %d\n", __func__, Units, as->as_units, as->as_pendings, as, AcpiOsGetThreadId()); } @@ -332,7 +332,7 @@ AcpiOsSignalSemaphore(ACPI_HANDLE Handle, UINT32 Units) } if (acpi_semaphore_debug && (as->as_timeouts > 0 || as->as_pendings > 0)) { - printf("%s: Release %d, units %d, pending %d, semaphore %p, thread %d\n", + kprintf("%s: Release %d, units %d, pending %d, semaphore %p, thread %d\n", __func__, Units, as->as_units, as->as_pendings, as, AcpiOsGetThreadId()); } diff --git a/sys/dev/acpica5/Osd/OsdTable.c b/sys/dev/acpica5/Osd/OsdTable.c index afd6c02590..e7483c8db1 100644 --- a/sys/dev/acpica5/Osd/OsdTable.c +++ b/sys/dev/acpica5/Osd/OsdTable.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdTable.c,v 1.7 2004/04/20 17:13:08 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdTable.c,v 1.2 2004/06/27 08:52:42 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/Osd/OsdTable.c,v 1.3 2006/12/22 23:26:14 swildner Exp $ */ /* @@ -52,7 +52,7 @@ AcpiOsPredefinedOverride ( *NewVal = NULL; if (strncmp(InitVal->Name, "_OS_", 4) == 0 && strlen(acpi_osname) > 0) { - printf("ACPI: Overriding _OS definition with \"%s\"\n", acpi_osname); + kprintf("ACPI: Overriding _OS definition with \"%s\"\n", acpi_osname); *NewVal = acpi_osname; } @@ -78,6 +78,6 @@ AcpiOsTableOverride ( return(AE_OK); *NewTable = *(void **)p; - printf("ACPI: DSDT was overridden.\n"); + kprintf("ACPI: DSDT was overridden.\n"); return (AE_OK); } diff --git a/sys/dev/acpica5/acpi.c b/sys/dev/acpica5/acpi.c index 8944a28f48..56723cd62a 100644 --- a/sys/dev/acpica5/acpi.c +++ b/sys/dev/acpica5/acpi.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.157 2004/06/05 09:56:04 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.25 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.26 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_acpi.h" @@ -222,7 +222,7 @@ acpi_modevent(struct module *mod, int event, void *junk) switch(event) { case MOD_LOAD: if (!cold) { - printf("The ACPI driver cannot be loaded after boot.\n"); + kprintf("The ACPI driver cannot be loaded after boot.\n"); return (EPERM); } break; @@ -274,7 +274,7 @@ acpi_Startup(void) } #endif if (ACPI_FAILURE(error = AcpiInitializeSubsystem())) { - printf("ACPI: initialisation failed: %s\n", AcpiFormatException(error)); + kprintf("ACPI: initialisation failed: %s\n", AcpiFormatException(error)); return_VALUE (error); } #ifdef ACPI_DEBUGGER @@ -287,7 +287,7 @@ acpi_Startup(void) #endif if (ACPI_FAILURE(error = AcpiLoadTables())) { - printf("ACPI: table load failed: %s\n", AcpiFormatException(error)); + kprintf("ACPI: table load failed: %s\n", AcpiFormatException(error)); return_VALUE(error); } @@ -775,7 +775,7 @@ acpi_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) struct acpi_device *ad; if ((ad = device_get_ivars(child)) == NULL) { - printf("device has no ivars\n"); + kprintf("device has no ivars\n"); return (ENOENT); } @@ -811,7 +811,7 @@ acpi_write_ivar(device_t dev, device_t child, int index, uintptr_t value) struct acpi_device *ad; if ((ad = device_get_ivars(child)) == NULL) { - printf("device has no ivars\n"); + kprintf("device has no ivars\n"); return (ENOENT); } @@ -1207,14 +1207,14 @@ acpi_shutdown_final(void *arg, int howto) if ((howto & RB_POWEROFF) != 0) { status = AcpiEnterSleepStatePrep(ACPI_STATE_S5); if (ACPI_FAILURE(status)) { - printf("AcpiEnterSleepStatePrep failed - %s\n", + kprintf("AcpiEnterSleepStatePrep failed - %s\n", AcpiFormatException(status)); return; } - printf("Powering system off using ACPI\n"); + kprintf("Powering system off using ACPI\n"); acpi_shutdown_poweroff(NULL); } else { - printf("Shutting down ACPI\n"); + kprintf("Shutting down ACPI\n"); AcpiTerminate(); } } @@ -1237,10 +1237,10 @@ acpi_shutdown_poweroff(void *arg) ACPI_DISABLE_IRQS(); status = AcpiEnterSleepState(ACPI_STATE_S5); if (ACPI_FAILURE(status)) { - printf("ACPI power-off failed - %s\n", AcpiFormatException(status)); + kprintf("ACPI power-off failed - %s\n", AcpiFormatException(status)); } else { DELAY(1000000); - printf("ACPI power-off failed - timeout\n"); + kprintf("ACPI power-off failed - timeout\n"); } } @@ -2738,20 +2738,20 @@ acpi_set_debugging(void *junk) if (layer == NULL && level == NULL) return; - printf("ACPI set debug"); + kprintf("ACPI set debug"); if (layer != NULL) { if (strcmp("NONE", layer) != 0) - printf(" layer '%s'", layer); + kprintf(" layer '%s'", layer); acpi_parse_debug(layer, &dbg_layer[0], &AcpiDbgLayer); freeenv(layer); } if (level != NULL) { if (strcmp("NONE", level) != 0) - printf(" level '%s'", level); + kprintf(" level '%s'", level); acpi_parse_debug(level, &dbg_level[0], &AcpiDbgLevel); freeenv(level); } - printf("\n"); + kprintf("\n"); } SYSINIT(acpi_debugging, SI_SUB_TUNABLES, SI_ORDER_ANY, acpi_set_debugging, NULL); diff --git a/sys/dev/acpica5/acpi_cpu.c b/sys/dev/acpica5/acpi_cpu.c index 09109824a9..e5a17ddcc5 100644 --- a/sys/dev/acpica5/acpi_cpu.c +++ b/sys/dev/acpica5/acpi_cpu.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_cpu.c,v 1.41 2004/06/24 00:38:51 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_cpu.c,v 1.16 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_cpu.c,v 1.17 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_acpi.h" @@ -792,7 +792,7 @@ acpi_cpu_startup_throttling(void) acpi_cpu_throttle_set(cpu_throttle_max); ACPI_UNLOCK; - printf("acpi_cpu: throttling enabled, %d steps (100%% to %d.%d%%), " + kprintf("acpi_cpu: throttling enabled, %d steps (100%% to %d.%d%%), " "currently %d.%d%%\n", CPU_MAX_SPEED, CPU_SPEED_PRINTABLE(1), CPU_SPEED_PRINTABLE(cpu_throttle_state)); } @@ -838,7 +838,7 @@ acpi_cpu_startup_cx(void) if (ncpus == 1) cpu_idle_hook = acpi_cpu_idle; else - printf("Warning: ACPI idle hook not yet supported for SMP\n"); + kprintf("Warning: ACPI idle hook not yet supported for SMP\n"); } /* diff --git a/sys/dev/acpica5/acpi_ec.c b/sys/dev/acpica5/acpi_ec.c index 9e03628b1d..7bafe27263 100644 --- a/sys/dev/acpica5/acpi_ec.c +++ b/sys/dev/acpica5/acpi_ec.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.51 2004/05/30 20:08:23 phk Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_ec.c,v 1.10 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_ec.c,v 1.11 2006/12/22 23:26:14 swildner Exp $ */ /****************************************************************************** * @@ -138,7 +138,7 @@ *****************************************************************************/ /* * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.51 2004/05/30 20:08:23 phk Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_ec.c,v 1.10 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_ec.c,v 1.11 2006/12/22 23:26:14 swildner Exp $ * */ @@ -385,7 +385,7 @@ acpi_ec_ecdt_probe(device_t parent) /* Create the child device with the given unit number. */ child = BUS_ADD_CHILD(parent, parent, 0, "acpi_ec", ecdt->uid); if (child == NULL) { - printf("%s: can't add child\n", __func__); + kprintf("%s: can't add child\n", __func__); return; } @@ -393,7 +393,7 @@ acpi_ec_ecdt_probe(device_t parent) status = AcpiGetHandle(NULL, ecdt->ec_id, &h); if (ACPI_FAILURE(status)) { device_delete_child(parent, child); - printf("%s: can't get handle\n", __func__); + kprintf("%s: can't get handle\n", __func__); return; } acpi_set_handle(child, h); @@ -698,7 +698,7 @@ re_enable: /* Re-enable the GPE event so we'll get future requests. */ Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR); if (ACPI_FAILURE(Status)) - printf("EcGpeQueryHandler: AcpiEnableEvent failed\n"); + kprintf("EcGpeQueryHandler: AcpiEnableEvent failed\n"); } /* @@ -721,10 +721,10 @@ EcGpeHandler(void *Context) Status = AcpiOsQueueForExecution(OSD_PRIORITY_GPE, EcGpeQueryHandler, Context); if (ACPI_FAILURE(Status)) { - printf("Queuing GPE query handler failed.\n"); + kprintf("Queuing GPE query handler failed.\n"); Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_NOT_ISR); if (ACPI_FAILURE(Status)) - printf("EcGpeHandler: AcpiEnableEvent failed\n"); + kprintf("EcGpeHandler: AcpiEnableEvent failed\n"); } return (0); diff --git a/sys/dev/acpica5/acpi_pci_link.c b/sys/dev/acpica5/acpi_pci_link.c index 8df87067df..856b9101fb 100644 --- a/sys/dev/acpica5/acpi_pci_link.c +++ b/sys/dev/acpica5/acpi_pci_link.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_pci_link.c,v 1.16 2004/06/14 18:54:14 jhb Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_pci_link.c,v 1.6 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_pci_link.c,v 1.7 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_acpi.h" @@ -88,13 +88,13 @@ acpi_pci_link_dump_polarity(UINT32 ActiveHighLow) switch (ActiveHighLow) { case ACPI_ACTIVE_HIGH: - printf("high,"); + kprintf("high,"); break; case ACPI_ACTIVE_LOW: - printf("low,"); + kprintf("low,"); break; default: - printf("unknown,"); + kprintf("unknown,"); break; } } @@ -105,13 +105,13 @@ acpi_pci_link_dump_trigger(UINT32 EdgeLevel) switch (EdgeLevel) { case ACPI_EDGE_SENSITIVE: - printf("edge,"); + kprintf("edge,"); break; case ACPI_LEVEL_SENSITIVE: - printf("level,"); + kprintf("level,"); break; default: - printf("unknown,"); + kprintf("unknown,"); break; } } @@ -122,13 +122,13 @@ acpi_pci_link_dump_sharemode(UINT32 SharedExclusive) switch (SharedExclusive) { case ACPI_EXCLUSIVE: - printf("exclusive"); + kprintf("exclusive"); break; case ACPI_SHARED: - printf("sharable"); + kprintf("sharable"); break; default: - printf("unknown"); + kprintf("unknown"); break; } } @@ -143,13 +143,13 @@ acpi_pci_link_entry_dump(struct acpi_prt_entry *entry) if (entry == NULL || entry->pci_link == NULL) return; - printf("%s irq %3d: ", acpi_name(entry->pci_link->handle), + kprintf("%s irq %3d: ", acpi_name(entry->pci_link->handle), entry->pci_link->current_irq); - printf("["); + kprintf("["); for (i = 0; i < entry->pci_link->number_of_interrupts; i++) - printf("%3d", entry->pci_link->interrupts[i]); - printf("] "); + kprintf("%3d", entry->pci_link->interrupts[i]); + kprintf("] "); switch (entry->pci_link->possible_resources.Id) { case ACPI_RSTYPE_IRQ: @@ -166,7 +166,7 @@ acpi_pci_link_entry_dump(struct acpi_prt_entry *entry) break; } - printf(" %d.%d.%d\n", entry->busno, + kprintf(" %d.%d.%d\n", entry->busno, (int)((entry->prt.Address & 0xffff0000) >> 16), (int)entry->prt.Pin); } @@ -667,21 +667,21 @@ acpi_pci_link_bootdisabled_dump(void) if (link->current_irq != 0) continue; - printf("%s:\n", acpi_name(link->handle)); - printf(" interrupts: "); + kprintf("%s:\n", acpi_name(link->handle)); + kprintf(" interrupts: "); for (i = 0; i < link->number_of_interrupts; i++) { irq = link->sorted_irq[i]; - printf("%6d", irq); + kprintf("%6d", irq); } - printf("\n"); - printf(" penalty: "); + kprintf("\n"); + kprintf(" penalty: "); for (i = 0; i < link->number_of_interrupts; i++) { irq = link->sorted_irq[i]; - printf("%6d", irq_penalty[irq]); + kprintf("%6d", irq_penalty[irq]); } - printf("\n"); - printf(" references: %d\n", link->references); - printf(" priority: %d\n", link->priority); + kprintf("\n"); + kprintf(" references: %d\n", link->references); + kprintf(" priority: %d\n", link->priority); } } @@ -793,7 +793,7 @@ acpi_pci_link_set_bootdisabled_priority(void) TAILQ_HEAD(, acpi_pci_link_entry) sorted_list; if (bootverbose) { - printf("ACPI PCI link before setting link priority:\n"); + kprintf("ACPI PCI link before setting link priority:\n"); acpi_pci_link_bootdisabled_dump(); } @@ -858,7 +858,7 @@ acpi_pci_link_fixup_bootdisabled_link(void) ACPI_STATUS error; if (bootverbose) { - printf("ACPI PCI link before fixup for boot-disabled links:\n"); + kprintf("ACPI PCI link before fixup for boot-disabled links:\n"); acpi_pci_link_bootdisabled_dump(); } @@ -894,7 +894,7 @@ acpi_pci_link_fixup_bootdisabled_link(void) } if (bootverbose) { - printf("ACPI PCI link after fixup for boot-disabled links:\n"); + kprintf("ACPI PCI link after fixup for boot-disabled links:\n"); acpi_pci_link_bootdisabled_dump(); } } @@ -950,7 +950,7 @@ acpi_pci_link_config(device_t dev, ACPI_BUFFER *prtbuf, int busno) } if (bootverbose) { - printf("ACPI PCI link initial configuration:\n"); + kprintf("ACPI PCI link initial configuration:\n"); TAILQ_FOREACH(entry, &acpi_prt_entries, links) { if (entry->busno != busno) continue; @@ -999,7 +999,7 @@ acpi_pci_link_config(device_t dev, ACPI_BUFFER *prtbuf, int busno) acpi_pci_link_fixup_bootdisabled_link(); if (bootverbose) { - printf("ACPI PCI link arbitrated configuration:\n"); + kprintf("ACPI PCI link arbitrated configuration:\n"); TAILQ_FOREACH(entry, &acpi_prt_entries, links) { if (entry->busno != busno) continue; diff --git a/sys/dev/acpica5/acpi_pcib.c b/sys/dev/acpica5/acpi_pcib.c index 5847a93d9c..37c96a9a9b 100644 --- a/sys/dev/acpica5/acpi_pcib.c +++ b/sys/dev/acpica5/acpi_pcib.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_pcib.c,v 1.43 2004/05/06 02:18:58 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_pcib.c,v 1.2 2004/06/27 08:52:39 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_pcib.c,v 1.3 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_acpi.h" @@ -339,8 +339,8 @@ acpi_pcib_route_interrupt(device_t pcib, device_t dev, int pin, */ device_printf(pcib, "possible interrupts:"); for (i = 0; i < NumberOfInterrupts; i++) - printf(" %d", Interrupts[i]); - printf("\n"); + kprintf(" %d", Interrupts[i]); + kprintf("\n"); /* This should never happen. */ if (crsbuf.Pointer != NULL) diff --git a/sys/dev/acpica5/acpi_resource.c b/sys/dev/acpica5/acpi_resource.c index bbfb40b7cc..cf1fcc4fa3 100644 --- a/sys/dev/acpica5/acpi_resource.c +++ b/sys/dev/acpica5/acpi_resource.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.24 2004/05/30 20:08:23 phk Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_resource.c,v 1.4 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_resource.c,v 1.5 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_acpi.h" @@ -78,7 +78,7 @@ acpi_parse_resources(device_t dev, ACPI_HANDLE handle, buf.Length = ACPI_ALLOCATE_BUFFER; if (ACPI_FAILURE((status = AcpiGetCurrentResources(handle, &buf)))) { if (status != AE_NOT_FOUND) - printf("can't fetch resources for %s - %s\n", + kprintf("can't fetch resources for %s - %s\n", acpi_name(handle), AcpiFormatException(status)); return_ACPI_STATUS (status); } diff --git a/sys/dev/acpica5/acpi_timer.c b/sys/dev/acpica5/acpi_timer.c index 6246fdd8d8..6e036c38e8 100644 --- a/sys/dev/acpica5/acpi_timer.c +++ b/sys/dev/acpica5/acpi_timer.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi_timer.c,v 1.33 2004/05/30 20:08:23 phk Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi_timer.c,v 1.10 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi_timer.c,v 1.11 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_acpi.h" #include @@ -358,7 +358,7 @@ acpi_timer_test(void) else n = 1; if (bootverbose) { - printf("ACPI timer looks %s min = %d, max = %d, width = %d\n", + kprintf("ACPI timer looks %s min = %d, max = %d, width = %d\n", n ? "GOOD" : "BAD ", min, max, max - min); } diff --git a/sys/dev/acpica5/acpivar.h b/sys/dev/acpica5/acpivar.h index aa94b9bcc3..a15a7393f3 100644 --- a/sys/dev/acpica5/acpivar.h +++ b/sys/dev/acpica5/acpivar.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.69 2004/05/28 07:15:55 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpivar.h,v 1.9 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpivar.h,v 1.10 2006/12/22 23:26:14 swildner Exp $ */ #include "bus_if.h" @@ -199,7 +199,7 @@ void acpi_EnterDebugger(void); #ifdef ACPI_DEBUG #include -#define STEP(x) do {printf x, printf("\n"); cngetc();} while (0) +#define STEP(x) do {kprintf x, kprintf("\n"); cngetc();} while (0) #else #define STEP(x) #endif diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 1c8abbcc0e..0de56ad761 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/agp.c,v 1.3.2.4 2002/08/11 19:58:12 alc Exp $ - * $DragonFly: src/sys/dev/agp/agp.c,v 1.25 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/agp/agp.c,v 1.26 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_bus.h" @@ -430,7 +430,7 @@ agp_generic_alloc_memory(device_t dev, int type, vm_size_t size) return 0; if (type != 0) { - printf("agp_generic_alloc_memory: unsupported type %d\n", + kprintf("agp_generic_alloc_memory: unsupported type %d\n", type); return 0; } @@ -487,7 +487,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, device_printf(dev, "binding memory at bad offset %#x,%#x,%#x\n", (int) offset, (int)mem->am_size, (int)AGP_GET_APERTURE(dev)); - printf("Check BIOS's aperature size vs X\n"); + kprintf("Check BIOS's aperature size vs X\n"); lockmgr(&sc->as_lock, LK_RELEASE); return EINVAL; } diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c index fdff12e318..2ef4797c2d 100644 --- a/sys/dev/agp/agp_i810.c +++ b/sys/dev/agp/agp_i810.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/agp_i810.c,v 1.1.2.5 2002/09/15 08:45:41 anholt Exp $ - * $DragonFly: src/sys/dev/agp/agp_i810.c,v 1.10 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/agp/agp_i810.c,v 1.11 2006/12/22 23:26:14 swildner Exp $ */ /* @@ -187,7 +187,7 @@ agp_i810_probe(device_t dev) bdev = agp_i810_find_bridge(dev); if (!bdev) { if (bootverbose) - printf("I810: can't find bridge device\n"); + kprintf("I810: can't find bridge device\n"); return ENXIO; } @@ -204,7 +204,7 @@ agp_i810_probe(device_t dev) if ((smram & AGP_I810_SMRAM_GMS) == AGP_I810_SMRAM_GMS_DISABLED) { if (bootverbose) - printf("I810: disabled, not probing\n"); + kprintf("I810: disabled, not probing\n"); return ENXIO; } break; @@ -216,7 +216,7 @@ agp_i810_probe(device_t dev) gcc1 = pci_read_config(bdev, AGP_I830_GCC1, 1); if ((gcc1 & AGP_I830_GCC1_DEV2) == AGP_I830_GCC1_DEV2_DISABLED) { if (bootverbose) - printf("I830: disabled, not probing\n"); + kprintf("I830: disabled, not probing\n"); return ENXIO; } break; diff --git a/sys/dev/agp/agp_intel.c b/sys/dev/agp/agp_intel.c index 51519ad1e9..0077fba489 100644 --- a/sys/dev/agp/agp_intel.c +++ b/sys/dev/agp/agp_intel.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/agp_intel.c,v 1.1.2.5 2003/06/02 17:38:19 jhb Exp $ - * $DragonFly: src/sys/dev/agp/agp_intel.c,v 1.6 2005/02/17 13:59:35 joerg Exp $ + * $DragonFly: src/sys/dev/agp/agp_intel.c,v 1.7 2006/12/22 23:26:14 swildner Exp $ */ #include "opt_bus.h" @@ -264,7 +264,7 @@ agp_intel_detach(device_t dev) case 0x1a218086: /* i840 */ case 0x25308086: /* i850 */ case 0x25318086: /* i860 */ - printf("%s: set MCHCFG to %x\n", __func__, (unsigned) + kprintf("%s: set MCHCFG to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_MCHCFG, 2) & ~(1 << 9))); pci_write_config(dev, AGP_INTEL_MCHCFG, @@ -273,7 +273,7 @@ agp_intel_detach(device_t dev) case 0x25008086: /* i820 */ case 0x25018086: /* i820 */ - printf("%s: set RDCR to %x\n", __func__, (unsigned) + kprintf("%s: set RDCR to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_I820_RDCR, 1) & ~(1 << 1))); pci_write_config(dev, AGP_INTEL_I820_RDCR, @@ -285,7 +285,7 @@ agp_intel_detach(device_t dev) case 0x33408086: /* i855 */ case 0x25708086: /* i865 */ case 0x25788086: /* i875P */ - printf("%s: set MCHCFG to %x\n", __func__, (unsigned) + kprintf("%s: set MCHCFG to %x\n", __func__, (unsigned) (pci_read_config(dev, AGP_INTEL_I845_MCHCFG, 1) & ~(1 << 1))); pci_write_config(dev, AGP_INTEL_MCHCFG, @@ -293,7 +293,7 @@ agp_intel_detach(device_t dev) & ~(1 << 1)), 1); default: /* Intel Generic (maybe) */ - printf("%s: set NBXCFG to %x\n", __func__, + kprintf("%s: set NBXCFG to %x\n", __func__, (pci_read_config(dev, AGP_INTEL_NBXCFG, 4) & ~(1 << 9))); pci_write_config(dev, AGP_INTEL_NBXCFG, diff --git a/sys/dev/agp/agppriv.h b/sys/dev/agp/agppriv.h index dc9d2a23a6..0e2a1d2909 100644 --- a/sys/dev/agp/agppriv.h +++ b/sys/dev/agp/agppriv.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/agppriv.h,v 1.3.2.1 2000/07/19 09:48:04 ru Exp $ - * $DragonFly: src/sys/dev/agp/agppriv.h,v 1.4 2004/05/19 22:52:40 dillon Exp $ + * $DragonFly: src/sys/dev/agp/agppriv.h,v 1.5 2006/12/22 23:26:15 swildner Exp $ */ #ifndef _PCI_AGPPRIV_H_ @@ -41,8 +41,8 @@ #ifdef AGP_DEBUG #define AGP_DPF(x...) do { \ - printf("agp: "); \ - printf(##x); \ + kprintf("agp: "); \ + kprintf(##x); \ } while (0) #else #define AGP_DPF(x...) do {} while (0) diff --git a/sys/dev/atm/en/midway.c b/sys/dev/atm/en/midway.c index 937e055803..c1ab29ed4c 100644 --- a/sys/dev/atm/en/midway.c +++ b/sys/dev/atm/en/midway.c @@ -33,7 +33,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/en/midway.c,v 1.19.2.1 2003/01/23 21:06:42 sam Exp $ - * $DragonFly: src/sys/dev/atm/en/midway.c,v 1.21 2005/11/28 17:13:37 dillon Exp $ + * $DragonFly: src/sys/dev/atm/en/midway.c,v 1.22 2006/12/22 23:26:15 swildner Exp $ */ /* @@ -668,7 +668,7 @@ done_probe: reg = EN_READ(sc, MID_RESID); - printf("%s: ATM midway v%d, board IDs %d.%d, %s%s%s, %ldKB on-board RAM\n", + kprintf("%s: ATM midway v%d, board IDs %d.%d, %s%s%s, %ldKB on-board RAM\n", sc->sc_dev.dv_xname, MID_VER(reg), MID_MID(reg), MID_DID(reg), (MID_IS_SABRE(reg)) ? "sabre controller, " : "", (MID_IS_SUNI(reg)) ? "SUNI" : "Utopia", @@ -677,12 +677,12 @@ done_probe: if (sc->is_adaptec) { if (sc->bestburstlen == 64 && sc->alburst == 0) - printf("%s: passed 64 byte DMA test\n", sc->sc_dev.dv_xname); + kprintf("%s: passed 64 byte DMA test\n", sc->sc_dev.dv_xname); else - printf("%s: FAILED DMA TEST: burst=%d, alburst=%d\n", + kprintf("%s: FAILED DMA TEST: burst=%d, alburst=%d\n", sc->sc_dev.dv_xname, sc->bestburstlen, sc->alburst); } else { - printf("%s: maximum DMA burst length = %d bytes%s\n", sc->sc_dev.dv_xname, + kprintf("%s: maximum DMA burst length = %d bytes%s\n", sc->sc_dev.dv_xname, sc->bestburstlen, (sc->alburst) ? " (must align)" : ""); } @@ -711,7 +711,7 @@ done_probe: ptr = roundup(ptr, EN_TXSZ * 1024); /* align */ sz = sz - (ptr - sav); if (EN_TXSZ*1024 * EN_NTX > sz) { - printf("%s: EN_NTX/EN_TXSZ too big\n", sc->sc_dev.dv_xname); + kprintf("%s: EN_NTX/EN_TXSZ too big\n", sc->sc_dev.dv_xname); return; } for (lcv = 0 ; lcv < EN_NTX ; lcv++) { @@ -724,7 +724,7 @@ done_probe: bzero(&sc->txslot[lcv].indma, sizeof(sc->txslot[lcv].indma)); bzero(&sc->txslot[lcv].q, sizeof(sc->txslot[lcv].q)); #ifdef EN_DEBUG - printf("%s: tx%d: start 0x%x, stop 0x%x\n", sc->sc_dev.dv_xname, lcv, + kprintf("%s: tx%d: start 0x%x, stop 0x%x\n", sc->sc_dev.dv_xname, lcv, sc->txslot[lcv].start, sc->txslot[lcv].stop); #endif } @@ -734,7 +734,7 @@ done_probe: sz = sz - (ptr - sav); sc->en_nrx = sz / (EN_RXSZ * 1024); if (sc->en_nrx <= 0) { - printf("%s: EN_NTX/EN_TXSZ/EN_RXSZ too big\n", sc->sc_dev.dv_xname); + kprintf("%s: EN_NTX/EN_TXSZ/EN_RXSZ too big\n", sc->sc_dev.dv_xname); return; } @@ -762,7 +762,7 @@ done_probe: (en_k2sz(EN_RXSZ) << MIDV_SZSHIFT) | MIDV_TRASH; #ifdef EN_DEBUG - printf("%s: rx%d: start 0x%x, stop 0x%x, mode 0x%x\n", sc->sc_dev.dv_xname, + kprintf("%s: rx%d: start 0x%x, stop 0x%x, mode 0x%x\n", sc->sc_dev.dv_xname, lcv, sc->rxslot[lcv].start, sc->rxslot[lcv].stop, sc->rxslot[lcv].mode); #endif } @@ -776,10 +776,10 @@ done_probe: #endif sc->need_drqs = sc->need_dtqs = 0; - printf("%s: %d %dKB receive buffers, %d %dKB transmit buffers allocated\n", + kprintf("%s: %d %dKB receive buffers, %d %dKB transmit buffers allocated\n", sc->sc_dev.dv_xname, sc->en_nrx, EN_RXSZ, EN_NTX, EN_TXSZ); - printf("%s: End Station Identifier (mac address) %6D\n", + kprintf("%s: End Station Identifier (mac address) %6D\n", sc->sc_dev.dv_xname, sc->macaddr, ":"); /* @@ -879,10 +879,10 @@ struct en_softc *sc; * exhibit the problem later. so warn it here. */ if (bestalgn != 64 || sc->alburst != 0) { - printf("%s: WARNING: DMA test detects a broken PCI chipset!\n", + kprintf("%s: WARNING: DMA test detects a broken PCI chipset!\n", sc->sc_dev.dv_xname); - printf(" trying to work around the problem... but if this doesn't\n"); - printf(" work for you, you'd better switch to a newer motherboard.\n"); + kprintf(" trying to work around the problem... but if this doesn't\n"); + kprintf(" work for you, you'd better switch to a newer motherboard.\n"); } return; } @@ -945,7 +945,7 @@ int wmtry; for (lcv = 8 ; lcv <= MIDDMA_MAXBURST ; lcv = lcv * 2) { #ifdef EN_DEBUG - printf("DMA test lcv=%d, sp=0x%x, dp=0x%x, wmtry=%d\n", + kprintf("DMA test lcv=%d, sp=0x%x, dp=0x%x, wmtry=%d\n", lcv, sp, dp, wmtry); #endif @@ -981,9 +981,9 @@ int wmtry; DELAY(1); cnt--; if (cnt == 0) { - printf("%s: unexpected timeout in tx DMA test\n", sc->sc_dev.dv_xname); + kprintf("%s: unexpected timeout in tx DMA test\n", sc->sc_dev.dv_xname); /* - printf(" alignment=0x%x, burst size=%d, dma addr reg=0x%x\n", + kprintf(" alignment=0x%x, burst size=%d, dma addr reg=0x%x\n", (u_long)sp & 63, lcv, EN_READ(sc, MID_DMA_ADDR)); */ return(retval); /* timeout, give up */ @@ -1001,7 +1001,7 @@ int wmtry; DELAY(1); cnt--; if (cnt == 0) { - printf("%s: unexpected timeout in tx DMA test\n", sc->sc_dev.dv_xname); + kprintf("%s: unexpected timeout in tx DMA test\n", sc->sc_dev.dv_xname); return(retval); /* timeout, give up */ } } @@ -1009,7 +1009,7 @@ int wmtry; #endif /* !NBURSTS */ reg = EN_READ(sc, MID_INTACK); if ((reg & MID_INT_DMA_TX) != MID_INT_DMA_TX) { - printf("%s: unexpected status in tx DMA test: 0x%x\n", + kprintf("%s: unexpected status in tx DMA test: 0x%x\n", sc->sc_dev.dv_xname, reg); return(retval); } @@ -1031,7 +1031,7 @@ int wmtry; DELAY(1); cnt--; if (cnt == 0) { - printf("%s: unexpected timeout in rx DMA test\n", sc->sc_dev.dv_xname); + kprintf("%s: unexpected timeout in rx DMA test\n", sc->sc_dev.dv_xname); return(retval); /* timeout, give up */ } } @@ -1047,7 +1047,7 @@ int wmtry; DELAY(1); cnt--; if (cnt == 0) { - printf("%s: unexpected timeout in rx DMA test\n", sc->sc_dev.dv_xname); + kprintf("%s: unexpected timeout in rx DMA test\n", sc->sc_dev.dv_xname); return(retval); /* timeout, give up */ } } @@ -1055,7 +1055,7 @@ int wmtry; #endif /* !NBURSTS */ reg = EN_READ(sc, MID_INTACK); if ((reg & MID_INT_DMA_RX) != MID_INT_DMA_RX) { - printf("%s: unexpected status in rx DMA test: 0x%x\n", + kprintf("%s: unexpected status in rx DMA test: 0x%x\n", sc->sc_dev.dv_xname, reg); return(retval); } @@ -1067,7 +1067,7 @@ int wmtry; #ifdef NBURSTS if (bcmp(sp, dp, lcv * NBURSTS)) { -/* printf("DMA test failed! lcv=%d, sp=0x%x, dp=0x%x\n", lcv, sp, dp); */ +/* kprintf("DMA test failed! lcv=%d, sp=0x%x, dp=0x%x\n", lcv, sp, dp); */ return(retval); /* failed, use last value */ } #else @@ -1138,7 +1138,7 @@ struct ucred *cr; sc->rxslot[slot].raw_threshold = 0; } #ifdef EN_DEBUG - printf("%s: rxvci%d: turn %s raw (boodi) mode\n", + kprintf("%s: rxvci%d: turn %s raw (boodi) mode\n", sc->sc_dev.dv_xname, ario->npcb->npcb_vci, (ario->rawvalue) ? "on" : "off"); #endif @@ -1216,7 +1216,7 @@ int on; flags = ATM_PH_FLAGS(&pi->aph); #ifdef EN_DEBUG - printf("%s: %s vpi=%d, vci=%d, flags=%d\n", sc->sc_dev.dv_xname, + kprintf("%s: %s vpi=%d, vci=%d, flags=%d\n", sc->sc_dev.dv_xname, (on) ? "enable" : "disable", ATM_PH_VPI(&pi->aph), vci, flags); #endif @@ -1249,7 +1249,7 @@ int on; sc->txspeed[vci] = 0; /* full speed to start */ sc->txvc2slot[vci] = 0; /* init value */ sc->txslot[0].nref++; /* bump reference count */ - en_loadvc(sc, vci); /* does debug printf for us */ + en_loadvc(sc, vci); /* does debug kprintf for us */ return(0); } @@ -1287,7 +1287,7 @@ int on; } crit_exit(); /* enable enintr() */ #ifdef EN_DEBUG - printf("%s: rx%d: VCI %d is now %s\n", sc->sc_dev.dv_xname, slot, vci, + kprintf("%s: rx%d: VCI %d is now %s\n", sc->sc_dev.dv_xname, slot, vci, (sc->rxslot[slot].oth_flags & ENOTHER_DRAIN) ? "draining" : "free"); #endif return(0); @@ -1309,7 +1309,7 @@ struct en_softc *sc; int lcv, slot; #ifdef EN_DEBUG - printf("%s: reset\n", sc->sc_dev.dv_xname); + kprintf("%s: reset\n", sc->sc_dev.dv_xname); #endif if (sc->en_busreset) @@ -1342,7 +1342,7 @@ struct en_softc *sc; sc->rxslot[slot].oth_flags = ENOTHER_FREE; sc->rxvc2slot[lcv] = RX_NONE; #ifdef EN_DEBUG - printf("%s: rx%d: VCI %d is now free\n", sc->sc_dev.dv_xname, slot, lcv); + kprintf("%s: rx%d: VCI %d is now free\n", sc->sc_dev.dv_xname, slot, lcv); #endif } } @@ -1386,7 +1386,7 @@ struct en_softc *sc; if ((sc->enif.if_flags & IFF_UP) == 0) { #ifdef EN_DEBUG - printf("%s: going down\n", sc->sc_dev.dv_xname); + kprintf("%s: going down\n", sc->sc_dev.dv_xname); #endif en_reset(sc); /* to be safe */ sc->enif.if_flags &= ~IFF_RUNNING; /* disable */ @@ -1394,7 +1394,7 @@ struct en_softc *sc; } #ifdef EN_DEBUG - printf("%s: going up\n", sc->sc_dev.dv_xname); + kprintf("%s: going up\n", sc->sc_dev.dv_xname); #endif sc->enif.if_flags |= IFF_RUNNING; /* enable */ @@ -1437,7 +1437,7 @@ struct en_softc *sc; sc->swsl_size = sc->swsl_head = sc->swsl_tail = 0; #ifdef EN_DEBUG - printf("%s: drq free/chip: %d/0x%x, dtq free/chip: %d/0x%x, hwslist: 0x%x\n", + kprintf("%s: drq free/chip: %d/0x%x, dtq free/chip: %d/0x%x, hwslist: 0x%x\n", sc->sc_dev.dv_xname, sc->drq_free, sc->drq_chip, sc->dtq_free, sc->dtq_chip, sc->hwslistp); #endif @@ -1452,7 +1452,7 @@ struct en_softc *sc; loc = loc >> MIDV_LOCTOPSHFT; /* top 11 bits */ EN_WRITE(sc, MIDX_PLACE(slot), MIDX_MKPLACE(en_k2sz(EN_TXSZ), loc)); #ifdef EN_DEBUG - printf("%s: tx%d: place 0x%x\n", sc->sc_dev.dv_xname, slot, + kprintf("%s: tx%d: place 0x%x\n", sc->sc_dev.dv_xname, slot, EN_READ(sc, MIDX_PLACE(slot))); #endif } @@ -1497,7 +1497,7 @@ int vc; sc->rxslot[slot].cur = sc->rxslot[slot].start; #ifdef EN_DEBUG - printf("%s: rx%d: assigned to VCI %d\n", sc->sc_dev.dv_xname, slot, vc); + kprintf("%s: rx%d: assigned to VCI %d\n", sc->sc_dev.dv_xname, slot, vc); #endif } @@ -1585,7 +1585,7 @@ struct ifnet *ifp; */ if (atm_vpi || atm_vci > MID_N_VC) { - printf("%s: output vpi=%d, vci=%d out of card range, dropping...\n", + kprintf("%s: output vpi=%d, vci=%d out of card range, dropping...\n", sc->sc_dev.dv_xname, atm_vpi, atm_vci); m_freem(m); continue; @@ -1611,9 +1611,9 @@ struct ifnet *ifp; toadd = need - got; /* recompute, including zero padding */ #ifdef EN_DEBUG - printf("%s: txvci%d: mlen=%d, got=%d, need=%d, toadd=%d, cell#=%d\n", + kprintf("%s: txvci%d: mlen=%d, got=%d, need=%d, toadd=%d, cell#=%d\n", sc->sc_dev.dv_xname, atm_vci, mlen, got, need, toadd, cellcnt); - printf(" leading_space=%d, trailing_space=%d\n", + kprintf(" leading_space=%d, trailing_space=%d\n", M_LEADINGSPACE(m), M_TRAILINGSPACE(lastm)); #endif @@ -1668,7 +1668,7 @@ struct ifnet *ifp; EN_COUNT(sc->txmbovr); m_freem(m); #ifdef EN_DEBUG - printf("%s: tx%d: buffer space shortage\n", sc->sc_dev.dv_xname, + kprintf("%s: tx%d: buffer space shortage\n", sc->sc_dev.dv_xname, txchan); #endif continue; @@ -1677,10 +1677,10 @@ struct ifnet *ifp; sc->txslot[txchan].mbsize += mlen; #ifdef EN_DEBUG - printf("%s: tx%d: VPI=%d, VCI=%d, FLAGS=0x%x, speed=0x%x\n", + kprintf("%s: tx%d: VPI=%d, VCI=%d, FLAGS=0x%x, speed=0x%x\n", sc->sc_dev.dv_xname, txchan, atm_vpi, atm_vci, atm_flags, sc->txspeed[atm_vci]); - printf(" adjusted mlen=%d, mbsize=%d\n", mlen, + kprintf(" adjusted mlen=%d, mbsize=%d\n", mlen, sc->txslot[txchan].mbsize); #endif @@ -1710,7 +1710,7 @@ STATIC int en_makeexclusive(sc, mm, prev) if (m->m_flags & M_EXT) { if (!(m->m_flags & M_EXT_CLUSTER)) { /* external buffer isn't an ordinary mbuf cluster! */ - printf("%s: mfix: special buffer! can't make a copy!\n", + kprintf("%s: mfix: special buffer! can't make a copy!\n", sc->sc_dev.dv_xname); return (0); } @@ -1763,7 +1763,7 @@ struct mbuf **mm, *prev; EN_COUNT(sc->mfix); /* count # of calls */ #ifdef EN_DEBUG - printf("%s: mfix mbuf m_data=0x%x, m_len=%d\n", sc->sc_dev.dv_xname, + kprintf("%s: mfix mbuf m_data=0x%x, m_len=%d\n", sc->sc_dev.dv_xname, m->m_data, m->m_len); #endif @@ -1837,7 +1837,7 @@ int chan; struct ifnet *ifp; #ifdef EN_DEBUG - printf("%s: tx%d: starting...\n", sc->sc_dev.dv_xname, chan); + kprintf("%s: tx%d: starting...\n", sc->sc_dev.dv_xname, chan); #endif /* @@ -1858,7 +1858,7 @@ again: if (launch.t == NULL) { #ifdef EN_DEBUG - printf("%s: tx%d: ...done!\n", sc->sc_dev.dv_xname, chan); + kprintf("%s: tx%d: ...done!\n", sc->sc_dev.dv_xname, chan); #endif return; /* >>> exit here if no data waiting for DMA <<< */ } @@ -1930,7 +1930,7 @@ again: launch.need += MID_TBD_SIZE; if (launch.need > EN_TXSZ * 1024) { - printf("%s: tx%d: packet larger than xmit buffer (%d > %d)\n", + kprintf("%s: tx%d: packet larger than xmit buffer (%d > %d)\n", sc->sc_dev.dv_xname, chan, launch.need, EN_TXSZ * 1024); goto dequeue_drop; } @@ -1942,7 +1942,7 @@ again: if (launch.need >= sc->txslot[chan].bfree) { EN_COUNT(sc->txoutspace); #ifdef EN_DEBUG - printf("%s: tx%d: out of transmit space\n", sc->sc_dev.dv_xname, chan); + kprintf("%s: tx%d: out of transmit space\n", sc->sc_dev.dv_xname, chan); #endif return; /* >>> exit here if out of obmem buffer space <<< */ } @@ -1958,7 +1958,7 @@ again: sc->need_dtqs = 1; EN_COUNT(sc->txdtqout); #ifdef EN_DEBUG - printf("%s: tx%d: out of transmit DTQs\n", sc->sc_dev.dv_xname, chan); + kprintf("%s: tx%d: out of transmit DTQs\n", sc->sc_dev.dv_xname, chan); #endif return; /* >>> exit here if out of dtqs <<< */ } @@ -2082,14 +2082,14 @@ struct en_launch *l; #ifdef EN_DIAG if ((need - MID_TBD_SIZE) % MID_ATMDATASZ) - printf("%s: tx%d: bogus trasmit needs (%d)\n", sc->sc_dev.dv_xname, chan, + kprintf("%s: tx%d: bogus trasmit needs (%d)\n", sc->sc_dev.dv_xname, chan, need); #endif #ifdef EN_DEBUG - printf("%s: tx%d: launch mbuf %p! cur=0x%x[%d], need=%d, addtail=%d\n", + kprintf("%s: tx%d: launch mbuf %p! cur=0x%x[%d], need=%d, addtail=%d\n", sc->sc_dev.dv_xname, chan, l->t, cur, (cur-start)/4, need, addtail); count = EN_READ(sc, MIDX_PLACE(chan)); - printf(" HW: base_address=0x%x, size=%d, read=%d, descstart=%d\n", + kprintf(" HW: base_address=0x%x, size=%d, read=%d, descstart=%d\n", MIDX_BASE(count), MIDX_SZ(count), EN_READ(sc, MIDX_READPTR(chan)), EN_READ(sc, MIDX_DESCSTART(chan))); #endif @@ -2101,7 +2101,7 @@ struct en_launch *l; if ((l->atm_flags & EN_OBHDR) == 0) { #ifdef EN_DEBUG - printf("%s: tx%d: insert header 0x%x 0x%x\n", sc->sc_dev.dv_xname, + kprintf("%s: tx%d: insert header 0x%x 0x%x\n", sc->sc_dev.dv_xname, chan, l->tbd1, l->tbd2); #endif EN_WRITE(sc, cur, l->tbd1); @@ -2148,7 +2148,7 @@ struct en_launch *l; } need -= len; #ifdef EN_DEBUG - printf("%s: tx%d: copied %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: copied %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, len, need, cur); #endif continue; /* continue on to next mbuf */ @@ -2158,7 +2158,7 @@ struct en_launch *l; if (dma != cur) { EN_DTQADD(sc, WORD_IDX(start,cur), chan, MIDDMA_JK, 0, 0, 0); #ifdef EN_DEBUG - printf("%s: tx%d: dtq_sync: advance pointer to %d\n", + kprintf("%s: tx%d: dtq_sync: advance pointer to %d\n", sc->sc_dev.dv_xname, chan, cur); #endif } @@ -2186,7 +2186,7 @@ struct en_launch *l; need -= len; EN_WRAPADD(start, stop, cur, len); #ifdef EN_DEBUG - printf("%s: tx%d: adp_dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: adp_dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, len, need, cur); #endif end = (need == 0) ? MID_DMA_END : 0; @@ -2220,7 +2220,7 @@ struct en_launch *l; need -= cnt; EN_WRAPADD(start, stop, cur, cnt); #ifdef EN_DEBUG - printf("%s: tx%d: small al_dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: small al_dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, cnt, need, cur); #endif len -= cnt; @@ -2249,7 +2249,7 @@ struct en_launch *l; need -= cnt; EN_WRAPADD(start, stop, cur, cnt); #ifdef EN_DEBUG - printf("%s: tx%d: al_dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: al_dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, cnt, need, cur); #endif len -= cnt; @@ -2268,7 +2268,7 @@ struct en_launch *l; need -= cnt; EN_WRAPADD(start, stop, cur, cnt); #ifdef EN_DEBUG - printf("%s: tx%d: best_dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: best_dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, cnt, need, cur); #endif len -= cnt; @@ -2288,7 +2288,7 @@ struct en_launch *l; need -= cnt; EN_WRAPADD(start, stop, cur, cnt); #ifdef EN_DEBUG - printf("%s: tx%d: cleanup_dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: cleanup_dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, cnt, need, cur); #endif len -= cnt; @@ -2312,7 +2312,7 @@ struct en_launch *l; need -= len; EN_WRAPADD(start, stop, cur, len); #ifdef EN_DEBUG - printf("%s: tx%d: byte cleanup_dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: byte cleanup_dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, len, need, cur); #endif end = (need == 0) ? MID_DMA_END : 0; @@ -2354,7 +2354,7 @@ struct en_launch *l; EN_DTQADD(sc, pad, chan, bcode, vtophys(l->t->m_data), 0, 0); need -= pad; #ifdef EN_DEBUG - printf("%s: tx%d: pad/FLUSH dma %d bytes (%d left, cur now 0x%x)\n", + kprintf("%s: tx%d: pad/FLUSH dma %d bytes (%d left, cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, pad, need, cur); #endif } @@ -2364,7 +2364,7 @@ struct en_launch *l; if (l->aal == MID_TBD_AAL5) pad -= 2; #ifdef EN_DEBUG - printf("%s: tx%d: padding %d bytes (cur now 0x%x)\n", + kprintf("%s: tx%d: padding %d bytes (cur now 0x%x)\n", sc->sc_dev.dv_xname, chan, pad * sizeof(u_int32_t), cur); #endif while (pad--) { @@ -2388,7 +2388,7 @@ done: /* update current pointer */ sc->txslot[chan].cur = cur; #ifdef EN_DEBUG - printf("%s: tx%d: DONE! cur now = 0x%x\n", + kprintf("%s: tx%d: DONE! cur now = 0x%x\n", sc->sc_dev.dv_xname, chan, cur); #endif @@ -2418,7 +2418,7 @@ void *arg; EN_INTR_RET(0); /* not us */ #ifdef EN_DEBUG - printf("%s: interrupt=0x%b\n", sc->sc_dev.dv_xname, reg, MID_INTBITS); + kprintf("%s: interrupt=0x%b\n", sc->sc_dev.dv_xname, reg, MID_INTBITS); #endif /* @@ -2426,7 +2426,7 @@ void *arg; */ if ((reg & (MID_INT_IDENT|MID_INT_LERR|MID_INT_DMA_ERR|MID_INT_SUNI)) != 0) { - printf("%s: unexpected interrupt=0x%b, resetting card\n", + kprintf("%s: unexpected interrupt=0x%b, resetting card\n", sc->sc_dev.dv_xname, reg, MID_INTBITS); #ifdef EN_DEBUG #ifdef DDB @@ -2463,7 +2463,7 @@ void *arg; else sc->txslot[lcv].bfree = (val + (EN_TXSZ*1024)) - sc->txslot[lcv].cur; #ifdef EN_DEBUG - printf("%s: tx%d: trasmit done. %d bytes now free in buffer\n", + kprintf("%s: tx%d: trasmit done. %d bytes now free in buffer\n", sc->sc_dev.dv_xname, lcv, sc->txslot[lcv].bfree); #endif } @@ -2483,7 +2483,7 @@ void *arg; kick = MID_NTX_CH - 1; /* assume power of 2, kick all! */ sc->need_dtqs = 0; /* recalculated in "kick" loop below */ #ifdef EN_DEBUG - printf("%s: cleared need DTQ condition\n", sc->sc_dev.dv_xname); + kprintf("%s: cleared need DTQ condition\n", sc->sc_dev.dv_xname); #endif } while (idx != val) { @@ -2495,7 +2495,7 @@ void *arg; if (!m) panic("enintr: dtqsync"); sc->txslot[slot].mbsize -= EN_DQ_LEN(dtq); #ifdef EN_DEBUG - printf("%s: tx%d: free %d dma bytes, mbsize now %d\n", + kprintf("%s: tx%d: free %d dma bytes, mbsize now %d\n", sc->sc_dev.dv_xname, slot, EN_DQ_LEN(dtq), sc->txslot[slot].mbsize); #endif @@ -2513,7 +2513,7 @@ void *arg; if (kick) { #ifdef EN_DEBUG - printf("%s: tx kick mask = 0x%x\n", sc->sc_dev.dv_xname, kick); + kprintf("%s: tx kick mask = 0x%x\n", sc->sc_dev.dv_xname, kick); #endif for (mask = 1, lcv = 0 ; lcv < EN_NTX ; lcv++, mask = mask * 2) { if ((kick & mask) && sc->txslot[lcv].q.ifq_head) { @@ -2560,7 +2560,7 @@ void *arg; sc->rxslot[slot].atm_vci = RX_NONE; sc->rxvc2slot[vci] = RX_NONE; #ifdef EN_DEBUG - printf("%s: rx%d: VCI %d now free\n", sc->sc_dev.dv_xname, + kprintf("%s: rx%d: VCI %d now free\n", sc->sc_dev.dv_xname, slot, vci); #endif } @@ -2569,7 +2569,7 @@ void *arg; ATM_PH_VPI(&ah) = 0; ATM_PH_SETVCI(&ah, sc->rxslot[slot].atm_vci); #ifdef EN_DEBUG - printf("%s: rx%d: rxvci%d: atm_input, mbuf %p, len %d, hand %p\n", + kprintf("%s: rx%d: rxvci%d: atm_input, mbuf %p, len %d, hand %p\n", sc->sc_dev.dv_xname, slot, sc->rxslot[slot].atm_vci, m, EN_DQ_LEN(drq), sc->rxslot[slot].rxhand); #endif @@ -2591,7 +2591,7 @@ void *arg; need_softserv = 1; sc->need_drqs = 0; #ifdef EN_DEBUG - printf("%s: cleared need DRQ condition\n", sc->sc_dev.dv_xname); + kprintf("%s: cleared need DRQ condition\n", sc->sc_dev.dv_xname); #endif } } @@ -2611,7 +2611,7 @@ void *arg; slot = sc->rxvc2slot[vci]; if (slot == RX_NONE) { #ifdef EN_DEBUG - printf("%s: unexpected rx interrupt on VCI %d\n", + kprintf("%s: unexpected rx interrupt on VCI %d\n", sc->sc_dev.dv_xname, vci); #endif EN_WRITE(sc, MID_VC(vci), MIDV_TRASH); /* rx off, damn it! */ @@ -2621,7 +2621,7 @@ void *arg; EN_COUNT(sc->hwpull); #ifdef EN_DEBUG - printf("%s: pulled VCI %d off hwslist\n", sc->sc_dev.dv_xname, vci); + kprintf("%s: pulled VCI %d off hwslist\n", sc->sc_dev.dv_xname, vci); #endif /* add it to the software service list (if needed) */ @@ -2633,7 +2633,7 @@ void *arg; EN_WRAPADD(0, MID_SL_N, sc->swsl_tail, 1); sc->swsl_size++; #ifdef EN_DEBUG - printf("%s: added VCI %d to swslist\n", sc->sc_dev.dv_xname, vci); + kprintf("%s: added VCI %d to swslist\n", sc->sc_dev.dv_xname, vci); #endif } }; @@ -2653,7 +2653,7 @@ void *arg; if (reg & MID_INT_DMA_OVR) { EN_COUNT(sc->dmaovr); #ifdef EN_DEBUG - printf("%s: MID_INT_DMA_OVR\n", sc->sc_dev.dv_xname); + kprintf("%s: MID_INT_DMA_OVR\n", sc->sc_dev.dv_xname); #endif } reg = EN_READ(sc, MID_STAT); @@ -2698,7 +2698,7 @@ struct en_softc *sc; next_vci: if (sc->swsl_size == 0) { #ifdef EN_DEBUG - printf("%s: en_service done\n", sc->sc_dev.dv_xname); + kprintf("%s: en_service done\n", sc->sc_dev.dv_xname); #endif return; /* >>> exit here if swsl now empty <<< */ } @@ -2723,7 +2723,7 @@ next_vci: cur = sc->rxslot[slot].cur; #ifdef EN_DEBUG - printf("%s: rx%d: service vci=%d raw=%d start/stop/cur=0x%x 0x%x 0x%x\n", + kprintf("%s: rx%d: service vci=%d raw=%d start/stop/cur=0x%x 0x%x 0x%x\n", sc->sc_dev.dv_xname, slot, vci, raw, start, stop, cur); #endif @@ -2739,7 +2739,7 @@ defer: /* defer processing */ sc->swsl_size--; /* >>> remove from swslist <<< */ #ifdef EN_DEBUG - printf("%s: rx%d: remove vci %d from swslist\n", + kprintf("%s: rx%d: remove vci %d from swslist\n", sc->sc_dev.dv_xname, slot, vci); #endif goto next_vci; @@ -2776,7 +2776,7 @@ defer: /* defer processing */ fill = MID_RBD_SIZE; EN_COUNT(sc->ttrash); #ifdef EN_DEBUG - printf("RX overflow lost %d cells!\n", MID_RBD_CNT(rbd)); + kprintf("RX overflow lost %d cells!\n", MID_RBD_CNT(rbd)); #endif } else if (!aal5) { mlen = MID_RBD_SIZE + MID_CHDR_SIZE + MID_ATMDATASZ; /* 1 cell (ick!) */ @@ -2794,14 +2794,14 @@ defer: /* defer processing */ static int first = 1; if (first) { - printf("%s: %s, dropping frame\n", sc->sc_dev.dv_xname, + kprintf("%s: %s, dropping frame\n", sc->sc_dev.dv_xname, (rbd & MID_RBD_CRCERR) ? "CRC error" : "invalid AAL5 PDU length"); - printf("%s: got %d cells (%d bytes), AAL5 len is %d bytes (pdu=0x%x)\n", + kprintf("%s: got %d cells (%d bytes), AAL5 len is %d bytes (pdu=0x%x)\n", sc->sc_dev.dv_xname, MID_RBD_CNT(rbd), tlen - MID_RBD_SIZE, MID_PDU_LEN(pdu), pdu); #ifndef EN_DEBUG - printf("CRC error report disabled from now on!\n"); + kprintf("CRC error report disabled from now on!\n"); first = 0; #endif } @@ -2835,7 +2835,7 @@ defer: /* defer processing */ sav = mtod(m, u_int32_t *); if (sav[0] != cur) { #ifdef EN_DEBUG - printf("%s: rx%d: q'ed mbuf %p not ours\n", + kprintf("%s: rx%d: q'ed mbuf %p not ours\n", sc->sc_dev.dv_xname, slot, m); #endif m = NULL; /* wasn't ours */ @@ -2845,7 +2845,7 @@ defer: /* defer processing */ IF_DEQUEUE(&sc->rxslot[slot].q, m); drqneed = sav[1]; #ifdef EN_DEBUG - printf("%s: rx%d: recovered q'ed mbuf %p (drqneed=%d)\n", + kprintf("%s: rx%d: recovered q'ed mbuf %p (drqneed=%d)\n", sc->sc_dev.dv_xname, slot, m, drqneed); #endif } @@ -2858,17 +2858,17 @@ defer: /* defer processing */ mlen = 0; EN_COUNT(sc->rxmbufout); #ifdef EN_DEBUG - printf("%s: rx%d: out of mbufs\n", sc->sc_dev.dv_xname, slot); + kprintf("%s: rx%d: out of mbufs\n", sc->sc_dev.dv_xname, slot); #endif } #ifdef EN_DEBUG - printf("%s: rx%d: allocate mbuf %p, mlen=%d, drqneed=%d\n", + kprintf("%s: rx%d: allocate mbuf %p, mlen=%d, drqneed=%d\n", sc->sc_dev.dv_xname, slot, m, mlen, drqneed); #endif } #ifdef EN_DEBUG - printf("%s: rx%d: VCI %d, mbuf_chain %p, mlen %d, fill %d\n", + kprintf("%s: rx%d: VCI %d, mbuf_chain %p, mlen %d, fill %d\n", sc->sc_dev.dv_xname, slot, vci, m, mlen, fill); #endif @@ -2883,7 +2883,7 @@ defer: /* defer processing */ if (m == NULL) { EN_COUNT(sc->rxoutboth); #ifdef EN_DEBUG - printf("%s: rx%d: out of DRQs *and* mbufs!\n", sc->sc_dev.dv_xname, slot); + kprintf("%s: rx%d: out of DRQs *and* mbufs!\n", sc->sc_dev.dv_xname, slot); #endif return; /* >>> exit here if out of both mbufs and DRQs <<< */ } @@ -2893,7 +2893,7 @@ defer: /* defer processing */ IF_ENQUEUE(&sc->rxslot[slot].q, m); EN_COUNT(sc->rxdrqout); #ifdef EN_DEBUG - printf("%s: rx%d: out of DRQs\n", sc->sc_dev.dv_xname, slot); + kprintf("%s: rx%d: out of DRQs\n", sc->sc_dev.dv_xname, slot); #endif return; /* >>> exit here if out of DRQs <<< */ } @@ -2922,7 +2922,7 @@ defer: /* defer processing */ data = mtod(tmp, u_int32_t *); #ifdef EN_DEBUG - printf("%s: rx%d: load mbuf %p, m_len=%d, m_data=%p, tlen=%d\n", + kprintf("%s: rx%d: load mbuf %p, m_len=%d, m_data=%p, tlen=%d\n", sc->sc_dev.dv_xname, slot, tmp, tmp->m_len, tmp->m_data, tlen); #endif @@ -2937,7 +2937,7 @@ defer: /* defer processing */ } need -= tlen; #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: copied %d bytes (%d left)\n", + kprintf("%s: rx%d: vci%d: copied %d bytes (%d left)\n", sc->sc_dev.dv_xname, slot, vci, tlen, need); #endif continue; @@ -2947,7 +2947,7 @@ defer: /* defer processing */ if (dma != cur) { EN_DRQADD(sc, WORD_IDX(start,cur), vci, MIDDMA_JK, 0, 0, 0, 0); #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: drq_sync: advance pointer to %d\n", + kprintf("%s: rx%d: vci%d: drq_sync: advance pointer to %d\n", sc->sc_dev.dv_xname, slot, vci, cur); #endif } @@ -2962,7 +2962,7 @@ defer: /* defer processing */ need -= tlen; EN_WRAPADD(start, stop, cur, tlen); #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: adp_dma %d bytes (%d left)\n", + kprintf("%s: rx%d: vci%d: adp_dma %d bytes (%d left)\n", sc->sc_dev.dv_xname, slot, vci, tlen, need); #endif end = (need == 0 && !fill) ? MID_DMA_END : 0; @@ -2997,7 +2997,7 @@ defer: /* defer processing */ need -= cnt; EN_WRAPADD(start, stop, cur, cnt); #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: al_dma %d bytes (%d left)\n", + kprintf("%s: rx%d: vci%d: al_dma %d bytes (%d left)\n", sc->sc_dev.dv_xname, slot, vci, cnt, need); #endif tlen -= cnt; @@ -3016,7 +3016,7 @@ defer: /* defer processing */ need -= cnt; EN_WRAPADD(start, stop, cur, cnt); #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: best_dma %d bytes (%d left)\n", + kprintf("%s: rx%d: vci%d: best_dma %d bytes (%d left)\n", sc->sc_dev.dv_xname, slot, vci, cnt, need); #endif tlen -= cnt; @@ -3035,7 +3035,7 @@ defer: /* defer processing */ need -= tlen; EN_WRAPADD(start, stop, cur, tlen); #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: cleanup_dma %d bytes (%d left)\n", + kprintf("%s: rx%d: vci%d: cleanup_dma %d bytes (%d left)\n", sc->sc_dev.dv_xname, slot, vci, tlen, need); #endif end = (need == 0 && !fill) ? MID_DMA_END : 0; @@ -3054,10 +3054,10 @@ defer: /* defer processing */ if (fill || dma != cur) { #ifdef EN_DEBUG if (fill) - printf("%s: rx%d: vci%d: skipping %d bytes of fill\n", + kprintf("%s: rx%d: vci%d: skipping %d bytes of fill\n", sc->sc_dev.dv_xname, slot, vci, fill); else - printf("%s: rx%d: vci%d: syncing chip from 0x%x to 0x%x [cur]\n", + kprintf("%s: rx%d: vci%d: syncing chip from 0x%x to 0x%x [cur]\n", sc->sc_dev.dv_xname, slot, vci, dma, cur); #endif EN_WRAPADD(start, stop, cur, fill); @@ -3087,7 +3087,7 @@ done: sc->rxslot[slot].cur = cur; /* update master copy of 'cur' */ #ifdef EN_DEBUG - printf("%s: rx%d: vci%d: DONE! cur now =0x%x\n", + kprintf("%s: rx%d: vci%d: DONE! cur now =0x%x\n", sc->sc_dev.dv_xname, slot, vci, cur); #endif @@ -3130,89 +3130,89 @@ int unit, level; if (unit != -1 && unit != lcv) continue; - printf("dumping device %s at level 0x%b\n", sc->sc_dev.dv_xname, level, + kprintf("dumping device %s at level 0x%b\n", sc->sc_dev.dv_xname, level, END_BITS); if (sc->dtq_us == 0) { - printf("\n"); + kprintf("\n"); continue; } if (level & END_STATS) { - printf(" en_stats:\n"); - printf(" %d mfix (%d failed); %d/%d head/tail byte DMAs, %d flushes\n", + kprintf(" en_stats:\n"); + kprintf(" %d mfix (%d failed); %d/%d head/tail byte DMAs, %d flushes\n", sc->mfix, sc->mfixfail, sc->headbyte, sc->tailbyte, sc->tailflush); - printf(" %d rx dma overflow interrupts\n", sc->dmaovr); - printf(" %d times we ran out of TX space and stalled\n", + kprintf(" %d rx dma overflow interrupts\n", sc->dmaovr); + kprintf(" %d times we ran out of TX space and stalled\n", sc->txoutspace); - printf(" %d times we ran out of DTQs\n", sc->txdtqout); - printf(" %d times we launched a packet\n", sc->launch); - printf(" %d times we launched without on-board header\n", sc->lheader); - printf(" %d times we launched without on-board tail\n", sc->ltail); - printf(" %d times we pulled the hw service list\n", sc->hwpull); - printf(" %d times we pushed a vci on the sw service list\n", + kprintf(" %d times we ran out of DTQs\n", sc->txdtqout); + kprintf(" %d times we launched a packet\n", sc->launch); + kprintf(" %d times we launched without on-board header\n", sc->lheader); + kprintf(" %d times we launched without on-board tail\n", sc->ltail); + kprintf(" %d times we pulled the hw service list\n", sc->hwpull); + kprintf(" %d times we pushed a vci on the sw service list\n", sc->swadd); - printf(" %d times RX pulled an mbuf from Q that wasn't ours\n", + kprintf(" %d times RX pulled an mbuf from Q that wasn't ours\n", sc->rxqnotus); - printf(" %d times RX pulled a good mbuf from Q\n", sc->rxqus); - printf(" %d times we ran out of mbufs *and* DRQs\n", sc->rxoutboth); - printf(" %d times we ran out of DRQs\n", sc->rxdrqout); - - printf(" %d trasmit packets dropped due to mbsize\n", sc->txmbovr); - printf(" %d cells trashed due to turned off rxvc\n", sc->vtrash); - printf(" %d cells trashed due to totally full buffer\n", sc->otrash); - printf(" %d cells trashed due almost full buffer\n", sc->ttrash); - printf(" %d rx mbuf allocation failures\n", sc->rxmbufout); + kprintf(" %d times RX pulled a good mbuf from Q\n", sc->rxqus); + kprintf(" %d times we ran out of mbufs *and* DRQs\n", sc->rxoutboth); + kprintf(" %d times we ran out of DRQs\n", sc->rxdrqout); + + kprintf(" %d trasmit packets dropped due to mbsize\n", sc->txmbovr); + kprintf(" %d cells trashed due to turned off rxvc\n", sc->vtrash); + kprintf(" %d cells trashed due to totally full buffer\n", sc->otrash); + kprintf(" %d cells trashed due almost full buffer\n", sc->ttrash); + kprintf(" %d rx mbuf allocation failures\n", sc->rxmbufout); #if defined(NATM) && defined(NATM_STAT) - printf(" natmintr so_rcv: ok/drop cnt: %d/%d, ok/drop bytes: %d/%d\n", + kprintf(" natmintr so_rcv: ok/drop cnt: %d/%d, ok/drop bytes: %d/%d\n", natm_sookcnt, natm_sodropcnt, natm_sookbytes, natm_sodropbytes); #endif } if (level & END_MREGS) { - printf("mregs:\n"); - printf("resid = 0x%lx\n", (u_long)EN_READ(sc, MID_RESID)); - printf("interrupt status = 0x%b\n", + kprintf("mregs:\n"); + kprintf("resid = 0x%lx\n", (u_long)EN_READ(sc, MID_RESID)); + kprintf("interrupt status = 0x%b\n", (int)EN_READ(sc, MID_INTSTAT), MID_INTBITS); - printf("interrupt enable = 0x%b\n", + kprintf("interrupt enable = 0x%b\n", (int)EN_READ(sc, MID_INTENA), MID_INTBITS); - printf("mcsr = 0x%b\n", (int)EN_READ(sc, MID_MAST_CSR), MID_MCSRBITS); - printf("serv_write = [chip=%ld] [us=%d]\n", + kprintf("mcsr = 0x%b\n", (int)EN_READ(sc, MID_MAST_CSR), MID_MCSRBITS); + kprintf("serv_write = [chip=%ld] [us=%d]\n", (long)EN_READ(sc, MID_SERV_WRITE), MID_SL_A2REG(sc->hwslistp)); - printf("dma addr = 0x%lx\n", (u_long)EN_READ(sc, MID_DMA_ADDR)); - printf("DRQ: chip[rd=0x%lx,wr=0x%lx], sc[chip=0x%x,us=0x%x]\n", + kprintf("dma addr = 0x%lx\n", (u_long)EN_READ(sc, MID_DMA_ADDR)); + kprintf("DRQ: chip[rd=0x%lx,wr=0x%lx], sc[chip=0x%x,us=0x%x]\n", (u_long)MID_DRQ_REG2A(EN_READ(sc, MID_DMA_RDRX)), (u_long)MID_DRQ_REG2A(EN_READ(sc, MID_DMA_WRRX)), sc->drq_chip, sc->drq_us); - printf("DTQ: chip[rd=0x%lx,wr=0x%lx], sc[chip=0x%x,us=0x%x]\n", + kprintf("DTQ: chip[rd=0x%lx,wr=0x%lx], sc[chip=0x%x,us=0x%x]\n", (u_long)MID_DTQ_REG2A(EN_READ(sc, MID_DMA_RDTX)), (u_long)MID_DTQ_REG2A(EN_READ(sc, MID_DMA_WRTX)), sc->dtq_chip, sc->dtq_us); - printf(" unusal txspeeds: "); + kprintf(" unusal txspeeds: "); for (cnt = 0 ; cnt < MID_N_VC ; cnt++) if (sc->txspeed[cnt]) - printf(" vci%d=0x%x", cnt, sc->txspeed[cnt]); - printf("\n"); + kprintf(" vci%d=0x%x", cnt, sc->txspeed[cnt]); + kprintf("\n"); - printf(" rxvc slot mappings: "); + kprintf(" rxvc slot mappings: "); for (cnt = 0 ; cnt < MID_N_VC ; cnt++) if (sc->rxvc2slot[cnt] != RX_NONE) - printf(" %d->%d", cnt, sc->rxvc2slot[cnt]); - printf("\n"); + kprintf(" %d->%d", cnt, sc->rxvc2slot[cnt]); + kprintf("\n"); } if (level & END_TX) { - printf("tx:\n"); + kprintf("tx:\n"); for (slot = 0 ; slot < EN_NTX; slot++) { - printf("tx%d: start/stop/cur=0x%x/0x%x/0x%x [%d] ", slot, + kprintf("tx%d: start/stop/cur=0x%x/0x%x/0x%x [%d] ", slot, sc->txslot[slot].start, sc->txslot[slot].stop, sc->txslot[slot].cur, (sc->txslot[slot].cur - sc->txslot[slot].start)/4); - printf("mbsize=%d, bfree=%d\n", sc->txslot[slot].mbsize, + kprintf("mbsize=%d, bfree=%d\n", sc->txslot[slot].mbsize, sc->txslot[slot].bfree); - printf("txhw: base_address=0x%lx, size=%ld, read=%ld, descstart=%ld\n", + kprintf("txhw: base_address=0x%lx, size=%ld, read=%ld, descstart=%ld\n", (u_long)MIDX_BASE(EN_READ(sc, MIDX_PLACE(slot))), (u_long)MIDX_SZ(EN_READ(sc, MIDX_PLACE(slot))), (long)EN_READ(sc, MIDX_READPTR(slot)), @@ -3221,15 +3221,15 @@ int unit, level; } if (level & END_RX) { - printf(" recv slots:\n"); + kprintf(" recv slots:\n"); for (slot = 0 ; slot < sc->en_nrx; slot++) { - printf("rx%d: vci=%d: start/stop/cur=0x%x/0x%x/0x%x ", slot, + kprintf("rx%d: vci=%d: start/stop/cur=0x%x/0x%x/0x%x ", slot, sc->rxslot[slot].atm_vci, sc->rxslot[slot].start, sc->rxslot[slot].stop, sc->rxslot[slot].cur); - printf("mode=0x%x, atm_flags=0x%x, oth_flags=0x%x\n", + kprintf("mode=0x%x, atm_flags=0x%x, oth_flags=0x%x\n", sc->rxslot[slot].mode, sc->rxslot[slot].atm_flags, sc->rxslot[slot].oth_flags); - printf("RXHW: mode=0x%lx, DST_RP=0x%lx, WP_ST_CNT=0x%lx\n", + kprintf("RXHW: mode=0x%lx, DST_RP=0x%lx, WP_ST_CNT=0x%lx\n", (u_long)EN_READ(sc, MID_VC(sc->rxslot[slot].atm_vci)), (u_long)EN_READ(sc, MID_DST_RP(sc->rxslot[slot].atm_vci)), (u_long)EN_READ(sc, MID_WP_ST_CNT(sc->rxslot[slot].atm_vci))); @@ -3237,12 +3237,12 @@ int unit, level; } if (level & END_DTQ) { - printf(" dtq [need_dtqs=%d,dtq_free=%d]:\n", + kprintf(" dtq [need_dtqs=%d,dtq_free=%d]:\n", sc->need_dtqs, sc->dtq_free); ptr = sc->dtq_chip; while (ptr != sc->dtq_us) { reg = EN_READ(sc, ptr); - printf("\t0x%x=[cnt=%d, chan=%d, end=%d, type=%d @ 0x%lx]\n", + kprintf("\t0x%x=[cnt=%d, chan=%d, end=%d, type=%d @ 0x%lx]\n", sc->dtq[MID_DTQ_A2REG(ptr)], MID_DMA_CNT(reg), MID_DMA_TXCHAN(reg), (reg & MID_DMA_END) != 0, MID_DMA_TYPE(reg), (u_long)EN_READ(sc, ptr+4)); @@ -3251,12 +3251,12 @@ int unit, level; } if (level & END_DRQ) { - printf(" drq [need_drqs=%d,drq_free=%d]:\n", + kprintf(" drq [need_drqs=%d,drq_free=%d]:\n", sc->need_drqs, sc->drq_free); ptr = sc->drq_chip; while (ptr != sc->drq_us) { reg = EN_READ(sc, ptr); - printf("\t0x%x=[cnt=%d, chan=%d, end=%d, type=%d @ 0x%lx]\n", + kprintf("\t0x%x=[cnt=%d, chan=%d, end=%d, type=%d @ 0x%lx]\n", sc->drq[MID_DRQ_A2REG(ptr)], MID_DMA_CNT(reg), MID_DMA_RXVCI(reg), (reg & MID_DMA_END) != 0, MID_DMA_TYPE(reg), (u_long)EN_READ(sc, ptr+4)); @@ -3265,11 +3265,11 @@ int unit, level; } if (level & END_SWSL) { - printf(" swslist [size=%d]: ", sc->swsl_size); + kprintf(" swslist [size=%d]: ", sc->swsl_size); for (cnt = sc->swsl_head ; cnt != sc->swsl_tail ; cnt = (cnt + 1) % MID_SL_N) - printf("0x%x ", sc->swslist[cnt]); - printf("\n"); + kprintf("0x%x ", sc->swslist[cnt]); + kprintf("\n"); } } return(0); @@ -3290,18 +3290,18 @@ int unit, addr, len; if (unit < 0 || unit > en_cd.cd_ndevs || (sc = (struct en_softc *) en_cd.cd_devs[unit]) == NULL) { - printf("invalid unit number: %d\n", unit); + kprintf("invalid unit number: %d\n", unit); return(0); } addr = addr & ~3; if (addr < MID_RAMOFF || addr + len*4 > MID_MAXOFF || len <= 0) { - printf("invalid addr/len number: %d, %d\n", addr, len); + kprintf("invalid addr/len number: %d, %d\n", addr, len); return(0); } - printf("dumping %d words starting at offset 0x%x\n", len, addr); + kprintf("dumping %d words starting at offset 0x%x\n", len, addr); while (len--) { reg = EN_READ(sc, addr); - printf("mem[0x%x] = 0x%x\n", addr, reg); + kprintf("mem[0x%x] = 0x%x\n", addr, reg); addr += 4; } return(0); diff --git a/sys/dev/crypto/hifn/hifn7751.c b/sys/dev/crypto/hifn/hifn7751.c index cf00925dcb..0a032876ad 100644 --- a/sys/dev/crypto/hifn/hifn7751.c +++ b/sys/dev/crypto/hifn/hifn7751.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/hifn/hifn7751.c,v 1.5.2.5 2003/06/04 17:56:59 sam Exp $ */ -/* $DragonFly: src/sys/dev/crypto/hifn/hifn7751.c,v 1.12 2006/10/25 20:55:52 dillon Exp $ */ +/* $DragonFly: src/sys/dev/crypto/hifn/hifn7751.c,v 1.13 2006/12/22 23:26:15 swildner Exp $ */ /* $OpenBSD: hifn7751.c,v 1.120 2002/05/17 00:33:34 deraadt Exp $ */ /* @@ -837,7 +837,7 @@ hifn_reset_board(struct hifn_softc *sc, int full) DELAY(1000); } if (reg == 1000) - printf(": cram init timeout\n"); + kprintf(": cram init timeout\n"); } } @@ -1864,7 +1864,7 @@ hifn_crypto( */ #ifdef HIFN_DEBUG if (hifn_debug) - printf("load res\n"); + kprintf("load res\n"); #endif if (dma->resi == HIFN_D_RES_RSIZE) { dma->resi = 0; diff --git a/sys/dev/crypto/ubsec/ubsec.c b/sys/dev/crypto/ubsec/ubsec.c index 6ffea027cf..f26d7b7750 100644 --- a/sys/dev/crypto/ubsec/ubsec.c +++ b/sys/dev/crypto/ubsec/ubsec.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ubsec/ubsec.c,v 1.6.2.12 2003/06/04 17:56:59 sam Exp $ */ -/* $DragonFly: src/sys/dev/crypto/ubsec/ubsec.c,v 1.12 2006/10/25 20:55:52 dillon Exp $ */ +/* $DragonFly: src/sys/dev/crypto/ubsec/ubsec.c,v 1.13 2006/12/22 23:26:15 swildner Exp $ */ /* $OpenBSD: ubsec.c,v 1.115 2002/09/24 18:33:26 jason Exp $ */ /* @@ -675,7 +675,7 @@ ubsec_intr(void *arg) if (ubsec_debug) { volatile u_int32_t a = READ_REG(sc, BS_ERR); - printf("dmaerr %s@%08x\n", + kprintf("dmaerr %s@%08x\n", (a & BS_ERR_READ) ? "read" : "write", a & BS_ERR_ADDR); } @@ -750,7 +750,7 @@ ubsec_feed(struct ubsec_softc *sc) ubsecstats.hst_totbatch += npkts-1; #ifdef UBSEC_DEBUG if (ubsec_debug) - printf("merging %d records\n", npkts); + kprintf("merging %d records\n", npkts); #endif /* UBSEC_DEBUG */ q = SIMPLEQ_FIRST(&sc->sc_queue); @@ -802,7 +802,7 @@ feed1: offsetof(struct ubsec_dmachunk, d_mcr)); #ifdef UBSEC_DEBUG if (ubsec_debug) - printf("feed1: q->chip %p %08x stat %08x\n", + kprintf("feed1: q->chip %p %08x stat %08x\n", q, (u_int32_t)vtophys(&q->q_dma->d_dma->d_mcr), stat); #endif /* UBSEC_DEBUG */ @@ -984,7 +984,7 @@ ubsec_op_cb(void *arg, bus_dma_segment_t *seg, int nsegs, bus_size_t mapsize, in ("Too many DMA segments returned when mapping operand")); #ifdef UBSEC_DEBUG if (ubsec_debug) - printf("ubsec_op_cb: mapsize %u nsegs %d\n", + kprintf("ubsec_op_cb: mapsize %u nsegs %d\n", (u_int) mapsize, nsegs); #endif op->mapsize = mapsize; @@ -1190,13 +1190,13 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) cpoffset = cpskip + dtheend; #ifdef UBSEC_DEBUG if (ubsec_debug) { - printf("mac: skip %d, len %d, inject %d\n", + kprintf("mac: skip %d, len %d, inject %d\n", maccrd->crd_skip, maccrd->crd_len, maccrd->crd_inject); - printf("enc: skip %d, len %d, inject %d\n", + kprintf("enc: skip %d, len %d, inject %d\n", enccrd->crd_skip, enccrd->crd_len, enccrd->crd_inject); - printf("src: skip %d, len %d\n", sskip, stheend); - printf("dst: skip %d, len %d\n", dskip, dtheend); - printf("ubs: coffset %d, pktlen %d, cpskip %d, cpoffset %d\n", + kprintf("src: skip %d, len %d\n", sskip, stheend); + kprintf("dst: skip %d, len %d\n", dskip, dtheend); + kprintf("ubs: coffset %d, pktlen %d, cpskip %d, cpoffset %d\n", coffset, stheend, cpskip, cpoffset); } #endif @@ -1238,7 +1238,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) #ifdef UBSEC_DEBUG if (ubsec_debug) - printf("src skip: %d nicealign: %u\n", sskip, nicealign); + kprintf("src skip: %d nicealign: %u\n", sskip, nicealign); #endif for (i = j = 0; i < q->q_src_nsegs; i++) { struct ubsec_pktbuf *pb; @@ -1292,7 +1292,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) offsetof(struct ubsec_dmachunk, d_macbuf[0])); #ifdef UBSEC_DEBUG if (ubsec_debug) - printf("opkt: %x %x %x\n", + kprintf("opkt: %x %x %x\n", dmap->d_dma->d_mcr.mcr_opktbuf.pb_addr, dmap->d_dma->d_mcr.mcr_opktbuf.pb_len, dmap->d_dma->d_mcr.mcr_opktbuf.pb_next); @@ -1413,7 +1413,7 @@ ubsec_process(void *arg, struct cryptop *crp, int hint) #ifdef UBSEC_DEBUG if (ubsec_debug) - printf("dst skip: %d\n", dskip); + kprintf("dst skip: %d\n", dskip); #endif for (i = j = 0; i < q->q_dst_nsegs; i++) { struct ubsec_pktbuf *pb; @@ -2222,7 +2222,7 @@ ubsec_kprocess_modexp_sw(struct ubsec_softc *sc, struct cryptkop *krp, int hint) #ifdef UBSEC_DEBUG if (ubsec_debug) { - printf("Epb "); + kprintf("Epb "); ubsec_dump_pb(epb); } #endif @@ -2420,7 +2420,7 @@ ubsec_kprocess_modexp_hw(struct ubsec_softc *sc, struct cryptkop *krp, int hint) #ifdef UBSEC_DEBUG if (ubsec_debug) { - printf("Epb "); + kprintf("Epb "); ubsec_dump_pb(epb); } #endif @@ -2698,14 +2698,14 @@ errout: static void ubsec_dump_pb(volatile struct ubsec_pktbuf *pb) { - printf("addr 0x%x (0x%x) next 0x%x\n", + kprintf("addr 0x%x (0x%x) next 0x%x\n", pb->pb_addr, pb->pb_len, pb->pb_next); } static void ubsec_dump_ctx2(struct ubsec_ctx_keyop *c) { - printf("CTX (0x%x):\n", c->ctx_len); + kprintf("CTX (0x%x):\n", c->ctx_len); switch (letoh16(c->ctx_op)) { case UBS_CTXOP_RNGBYPASS: case UBS_CTXOP_RNGSHA1: @@ -2715,18 +2715,18 @@ ubsec_dump_ctx2(struct ubsec_ctx_keyop *c) struct ubsec_ctx_modexp *cx = (void *)c; int i, len; - printf(" Elen %u, Nlen %u\n", + kprintf(" Elen %u, Nlen %u\n", letoh16(cx->me_E_len), letoh16(cx->me_N_len)); len = (cx->me_N_len + 7)/8; for (i = 0; i < len; i++) - printf("%s%02x", (i == 0) ? " N: " : ":", cx->me_N[i]); - printf("\n"); + kprintf("%s%02x", (i == 0) ? " N: " : ":", cx->me_N[i]); + kprintf("\n"); break; } default: - printf("unknown context: %x\n", c->ctx_op); + kprintf("unknown context: %x\n", c->ctx_op); } - printf("END CTX\n"); + kprintf("END CTX\n"); } static void @@ -2735,21 +2735,21 @@ ubsec_dump_mcr(struct ubsec_mcr *mcr) volatile struct ubsec_mcr_add *ma; int i; - printf("MCR:\n"); - printf(" pkts: %u, flags 0x%x\n", + kprintf("MCR:\n"); + kprintf(" pkts: %u, flags 0x%x\n", letoh16(mcr->mcr_pkts), letoh16(mcr->mcr_flags)); ma = (volatile struct ubsec_mcr_add *)&mcr->mcr_cmdctxp; for (i = 0; i < letoh16(mcr->mcr_pkts); i++) { - printf(" %d: ctx 0x%x len 0x%x rsvd 0x%x\n", i, + kprintf(" %d: ctx 0x%x len 0x%x rsvd 0x%x\n", i, letoh32(ma->mcr_cmdctxp), letoh16(ma->mcr_pktlen), letoh16(ma->mcr_reserved)); - printf(" %d: ipkt ", i); + kprintf(" %d: ipkt ", i); ubsec_dump_pb(&ma->mcr_ipktbuf); - printf(" %d: opkt ", i); + kprintf(" %d: opkt ", i); ubsec_dump_pb(&ma->mcr_opktbuf); ma++; } - printf("END MCR\n"); + kprintf("END MCR\n"); } #endif /* UBSEC_DEBUG */ diff --git a/sys/dev/disk/advansys/adv_eisa.c b/sys/dev/disk/advansys/adv_eisa.c index ccf97d3835..6c47a9c19e 100644 --- a/sys/dev/disk/advansys/adv_eisa.c +++ b/sys/dev/disk/advansys/adv_eisa.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adv_eisa.c,v 1.9.2.1 2000/04/14 13:32:44 nyan Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adv_eisa.c,v 1.6 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adv_eisa.c,v 1.7 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -116,7 +116,7 @@ adv_eisa_probe(device_t dev) case 5: break; default: - printf("adv at slot %d: illegal " + kprintf("adv at slot %d: illegal " "irq setting %d\n", eisa_get_slot(dev), irq); return ENXIO; @@ -180,7 +180,7 @@ adv_eisa_attach(device_t dev) &adv_b->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", + kprintf("%s: Could not allocate DMA tag - error %d\n", adv_name(adv_b), error); adv_free(adv_b); goto bad; @@ -215,7 +215,7 @@ adv_eisa_attach(device_t dev) &adv->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", + kprintf("%s: Could not allocate DMA tag - error %d\n", adv_name(adv), error); adv_free(adv); goto bad; @@ -224,7 +224,7 @@ adv_eisa_attach(device_t dev) adv->init_level++; break; default: - printf("adveisaattach: Unknown device type!\n"); + kprintf("adveisaattach: Unknown device type!\n"); goto bad; break; } diff --git a/sys/dev/disk/advansys/adv_isa.c b/sys/dev/disk/advansys/adv_isa.c index a0f3c23086..d457c77004 100644 --- a/sys/dev/disk/advansys/adv_isa.c +++ b/sys/dev/disk/advansys/adv_isa.c @@ -45,7 +45,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adv_isa.c,v 1.14.2.5 2002/01/06 21:21:42 dwmalone Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adv_isa.c,v 1.6 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adv_isa.c,v 1.7 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -123,7 +123,7 @@ adv_isa_probe(device_t dev) if ((port_index > max_port_index) || (iobase != adv_isa_ioports[port_index])) { if (bootverbose) - printf("adv%d: Invalid baseport of 0x%lx specified. " + kprintf("adv%d: Invalid baseport of 0x%lx specified. " "Nearest valid baseport is 0x%x. Failing " "probe.\n", device_get_unit(dev), iobase, (port_index <= max_port_index) ? @@ -229,7 +229,7 @@ adv_isa_probe(device_t dev) &adv->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", + kprintf("%s: Could not allocate DMA tag - error %d\n", adv_name(adv), error); adv_free(adv); bus_release_resource(dev, SYS_RES_IOPORT, 0, iores); diff --git a/sys/dev/disk/advansys/adv_pci.c b/sys/dev/disk/advansys/adv_pci.c index a784debb1b..6e748e6c4b 100644 --- a/sys/dev/disk/advansys/adv_pci.c +++ b/sys/dev/disk/advansys/adv_pci.c @@ -58,7 +58,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adv_pci.c,v 1.11.2.3 2001/06/02 04:38:10 nyan Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adv_pci.c,v 1.6 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adv_pci.c,v 1.7 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -194,7 +194,7 @@ adv_pci_attach(device_t dev) &adv->parent_dmat); if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", + kprintf("%s: Could not allocate DMA tag - error %d\n", adv_name(adv), error); adv_free(adv); bus_release_resource(dev, SYS_RES_IOPORT, rid, iores); diff --git a/sys/dev/disk/advansys/advansys.c b/sys/dev/disk/advansys/advansys.c index a004f4b0af..4f638e3f41 100644 --- a/sys/dev/disk/advansys/advansys.c +++ b/sys/dev/disk/advansys/advansys.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/advansys.c,v 1.14.2.4 2002/01/06 21:21:42 dwmalone Exp $ - * $DragonFly: src/sys/dev/disk/advansys/advansys.c,v 1.10 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/advansys.c,v 1.11 2006/12/22 23:26:15 swildner Exp $ */ /* * Ported from: @@ -163,7 +163,7 @@ adv_clear_state_really(struct adv_softc *adv, union ccb* ccb) ccb_h = LIST_NEXT(ccb_h, sim_links.le); } adv->state &= ~ADV_IN_TIMEOUT; - printf("%s: No longer in timeout\n", adv_name(adv)); + kprintf("%s: No longer in timeout\n", adv_name(adv)); } } if (adv->state == 0) @@ -630,7 +630,7 @@ adv_alloc_ccb_info(struct adv_softc *adv) error = bus_dmamap_create(adv->buffer_dmat, /*flags*/0, &cinfo->dmamap); if (error != 0) { - printf("%s: Unable to allocate CCB info " + kprintf("%s: Unable to allocate CCB info " "dmamap - error %d\n", adv_name(adv), error); return (NULL); } @@ -656,7 +656,7 @@ adv_timeout(void *arg) cinfo = (struct adv_ccb_info *)ccb->ccb_h.ccb_cinfo_ptr; xpt_print_path(ccb->ccb_h.path); - printf("Timed out\n"); + kprintf("Timed out\n"); crit_enter(); /* Have we been taken care of already?? */ @@ -694,7 +694,7 @@ adv_timeout(void *arg) /* XXX Should send a BDR */ /* Attempt an abort as our first tact */ xpt_print_path(ccb->ccb_h.path); - printf("Attempting abort\n"); + kprintf("Attempting abort\n"); adv_abort_ccb(adv, ccb->ccb_h.target_id, ccb->ccb_h.target_lun, ccb, CAM_CMD_TIMEOUT, /*queued_only*/FALSE); @@ -702,7 +702,7 @@ adv_timeout(void *arg) } else { /* Our attempt to perform an abort failed, go for a reset */ xpt_print_path(ccb->ccb_h.path); - printf("Resetting bus\n"); + kprintf("Resetting bus\n"); ccb->ccb_h.status &= ~CAM_STATUS_MASK; ccb->ccb_h.status |= CAM_CMD_TIMEOUT; adv_reset_bus(adv, /*initiate_reset*/TRUE); @@ -778,13 +778,13 @@ adv_init(struct adv_softc *adv) adv_write_lram_16(adv, ADV_HALTCODE_W, 0x00FE); adv_stop_execution(adv); if (adv_stop_chip(adv) == 0 || adv_is_chip_halted(adv) == 0) { - printf("adv%d: Unable to halt adapter. Initialization" + kprintf("adv%d: Unable to halt adapter. Initialization" "failed\n", adv->unit); return (1); } ADV_OUTW(adv, ADV_REG_PROG_COUNTER, ADV_MCODE_START_ADDR); if (ADV_INW(adv, ADV_REG_PROG_COUNTER) != ADV_MCODE_START_ADDR) { - printf("adv%d: Unable to set program counter. Initialization" + kprintf("adv%d: Unable to set program counter. Initialization" "failed\n", adv->unit); return (1); } @@ -860,7 +860,7 @@ adv_init(struct adv_softc *adv) } else { u_int8_t sync_data; - printf("adv%d: Warning EEPROM Checksum mismatch. " + kprintf("adv%d: Warning EEPROM Checksum mismatch. " "Using default device parameters\n", adv->unit); /* Set reasonable defaults since we can't read the EEPROM */ @@ -924,7 +924,7 @@ adv_init(struct adv_softc *adv) * to be 100% correct. */ if (adv_set_eeprom_config(adv, &eeprom_config) != 0) - printf("%s: WARNING! Failure writing to EEPROM.\n", + kprintf("%s: WARNING! Failure writing to EEPROM.\n", adv_name(adv)); #endif @@ -953,7 +953,7 @@ adv_init(struct adv_softc *adv) } adv_write_lram_8(adv, ADVV_USE_TAGGED_QNG_B, TARGET_BIT_VECTOR_SET); adv_write_lram_8(adv, ADVV_CAN_TAGGED_QNG_B, TARGET_BIT_VECTOR_SET); - printf("adv%d: AdvanSys %s Host Adapter, SCSI ID %d, queue depth %d\n", + kprintf("adv%d: AdvanSys %s Host Adapter, SCSI ID %d, queue depth %d\n", adv->unit, (adv->type & ADV_ULTRA) && (max_sync == 0) ? "Ultra SCSI" : "SCSI", adv->scsi_id, adv->max_openings); @@ -984,7 +984,7 @@ adv_intr(void *arg) ADV_CC_TEST)); if ((chipstat & (ADV_CSW_SCSI_RESET_LATCH|ADV_CSW_SCSI_RESET_ACTIVE))) { - printf("Detected Bus Reset\n"); + kprintf("Detected Bus Reset\n"); adv_reset_bus(adv, /*initiate_reset*/FALSE); return; } @@ -1133,7 +1133,7 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat, break; } xpt_print_path(ccb->ccb_h.path); - printf("adv_done - queue done without error, " + kprintf("adv_done - queue done without error, " "but host status non-zero(%x)\n", host_stat); /*FALLTHROUGH*/ case QD_WITH_ERROR: @@ -1236,7 +1236,7 @@ adv_done(struct adv_softc *adv, union ccb *ccb, u_int done_stat, default: xpt_print_path(ccb->ccb_h.path); - printf("adv_done - queue done with unknown status %x:%x\n", + kprintf("adv_done - queue done with unknown status %x:%x\n", done_stat, host_stat); ccb->ccb_h.status = CAM_REQ_CMP_ERR; break; @@ -1363,7 +1363,7 @@ adv_attach(adv) * Fire up the chip */ if (adv_start_chip(adv) != 1) { - printf("adv%d: Unable to start on board processor. Aborting.\n", + kprintf("adv%d: Unable to start on board processor. Aborting.\n", adv->unit); return (ENXIO); } diff --git a/sys/dev/disk/advansys/advlib.c b/sys/dev/disk/advansys/advlib.c index 4a32140d23..7b5ddecb62 100644 --- a/sys/dev/disk/advansys/advlib.c +++ b/sys/dev/disk/advansys/advlib.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/advlib.c,v 1.15.2.1 2000/04/14 13:32:49 nyan Exp $ - * $DragonFly: src/sys/dev/disk/advansys/advlib.c,v 1.7 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/advlib.c,v 1.8 2006/12/22 23:26:15 swildner Exp $ */ /* * Ported from: @@ -511,7 +511,7 @@ adv_get_eeprom_config(struct adv_softc *adv, struct *wbuf = adv_read_eeprom_16(adv, s_addr); sum += *wbuf; #if ADV_DEBUG_EEPROM - printf("Addr 0x%x: 0x%04x\n", s_addr, *wbuf); + kprintf("Addr 0x%x: 0x%04x\n", s_addr, *wbuf); #endif } *wbuf = adv_read_eeprom_16(adv, s_addr); @@ -590,7 +590,7 @@ adv_init_lram_and_mcode(struct adv_softc *adv) retval = adv_load_microcode(adv, 0, (u_int16_t *)adv_mcode, adv_mcode_size); if (retval != adv_mcode_chksum) { - printf("adv%d: Microcode download failed checksum!\n", + kprintf("adv%d: Microcode download failed checksum!\n", adv->unit); return (1); } @@ -1056,7 +1056,7 @@ adv_isr_chip_halted(struct adv_softc *adv) scsi_busy &= ~target_mask; adv_write_lram_8(adv, ADVV_SCSIBUSY_B, scsi_busy); } else { - printf("Unhandled Halt Code %x\n", int_halt_code); + kprintf("Unhandled Halt Code %x\n", int_halt_code); } adv_write_lram_16(adv, ADVV_HALTCODE_W, 0); } @@ -1492,7 +1492,7 @@ adv_init_microcode_var(struct adv_softc *adv) ADV_OUTW(adv, ADV_REG_PROG_COUNTER, ADV_MCODE_START_ADDR); if (ADV_INW(adv, ADV_REG_PROG_COUNTER) != ADV_MCODE_START_ADDR) { - printf("adv%d: Unable to set program counter. Aborting.\n", + kprintf("adv%d: Unable to set program counter. Aborting.\n", adv->unit); return (1); } diff --git a/sys/dev/disk/advansys/adw_pci.c b/sys/dev/disk/advansys/adw_pci.c index 20dece6c24..0400423ca4 100644 --- a/sys/dev/disk/advansys/adw_pci.c +++ b/sys/dev/disk/advansys/adw_pci.c @@ -33,7 +33,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adw_pci.c,v 1.12.2.1 2000/08/02 22:22:40 peter Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adw_pci.c,v 1.4 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adw_pci.c,v 1.5 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -266,7 +266,7 @@ adw_pci_attach(device_t dev) adw->init_level++; if (error != 0) { - printf("%s: Could not allocate DMA tag - error %d\n", + kprintf("%s: Could not allocate DMA tag - error %d\n", adw_name(adw), error); adw_free(adw); return (error); diff --git a/sys/dev/disk/advansys/adwcam.c b/sys/dev/disk/advansys/adwcam.c index 59511707bf..875a93652f 100644 --- a/sys/dev/disk/advansys/adwcam.c +++ b/sys/dev/disk/advansys/adwcam.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adwcam.c,v 1.7.2.2 2001/03/05 13:08:55 obrien Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adwcam.c,v 1.14 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adwcam.c,v 1.15 2006/12/22 23:26:15 swildner Exp $ */ /* * Ported from: @@ -115,7 +115,7 @@ adwgetacb(struct adw_softc *adw) adwallocacbs(adw); acb = SLIST_FIRST(&adw->free_acb_list); if (acb == NULL) - printf("%s: Can't malloc ACB\n", adw_name(adw)); + kprintf("%s: Can't malloc ACB\n", adw_name(adw)); else { SLIST_REMOVE_HEAD(&adw->free_acb_list, links); } @@ -235,7 +235,7 @@ adwexecuteacb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) if (error != 0) { if (error != EFBIG) - printf("%s: Unexepected error 0x%x returned from " + kprintf("%s: Unexepected error 0x%x returned from " "bus_dmamap_load\n", adw_name(adw), error); if (ccb->ccb_h.status == CAM_REQ_INPROG) { xpt_freeze_devq(ccb->ccb_h.path, /*count*/1); @@ -498,7 +498,7 @@ adw_action(struct cam_sim *sim, union ccb *ccb) ccb->ccb_h.status = CAM_REQ_CMP; if (bootverbose) { xpt_print_path(ccb->ccb_h.path); - printf("BDR Delivered\n"); + kprintf("BDR Delivered\n"); } } else ccb->ccb_h.status = CAM_REQ_CMP_ERR; @@ -748,7 +748,7 @@ adw_action(struct cam_sim *sim, union ccb *ccb) } else { if (bootverbose) { xpt_print_path(adw->path); - printf("Bus Reset Delivered\n"); + kprintf("Bus Reset Delivered\n"); } ccb->ccb_h.status = CAM_REQ_CMP; } @@ -887,7 +887,7 @@ adw_init(struct adw_softc *adw) u_int16_t serial_number[3]; adw->flags |= ADW_EEPROM_FAILED; - printf("%s: EEPROM checksum failed. Restoring Defaults\n", + kprintf("%s: EEPROM checksum failed. Restoring Defaults\n", adw_name(adw)); /* @@ -967,9 +967,9 @@ adw_init(struct adw_softc *adw) if ((adw->features & ADW_ULTRA2) != 0) { switch (eep_config.termination_lvd) { default: - printf("%s: Invalid EEPROM LVD Termination Settings.\n", + kprintf("%s: Invalid EEPROM LVD Termination Settings.\n", adw_name(adw)); - printf("%s: Reverting to Automatic LVD Termination\n", + kprintf("%s: Reverting to Automatic LVD Termination\n", adw_name(adw)); /* FALLTHROUGH */ case ADW_EEPROM_TERM_AUTO: @@ -988,9 +988,9 @@ adw_init(struct adw_softc *adw) switch (eep_config.termination_se) { default: - printf("%s: Invalid SE EEPROM Termination Settings.\n", + kprintf("%s: Invalid SE EEPROM Termination Settings.\n", adw_name(adw)); - printf("%s: Reverting to Automatic SE Termination\n", + kprintf("%s: Reverting to Automatic SE Termination\n", adw_name(adw)); /* FALLTHROUGH */ case ADW_EEPROM_TERM_AUTO: @@ -1005,7 +1005,7 @@ adw_init(struct adw_softc *adw) scsicfg1 |= ADW_SCSI_CFG1_TERM_CTL_MANUAL; break; } - printf("%s: SCSI ID %d, ", adw_name(adw), adw->initiator_id); + kprintf("%s: SCSI ID %d, ", adw_name(adw), adw->initiator_id); /* DMA tag for mapping buffers into device visible space. */ if (bus_dma_tag_create(adw->parent_dmat, /*alignment*/1, /*boundary*/0, @@ -1127,7 +1127,7 @@ adw_init(struct adw_softc *adw) if (adw_init_chip(adw, scsicfg1) != 0) return (ENXIO); - printf("Queue Depth %d\n", adw->max_acbs); + kprintf("Queue Depth %d\n", adw->max_acbs); return (0); } @@ -1220,7 +1220,7 @@ adw_intr(void *arg) /* * The firmware detected a SCSI Bus reset. */ - printf("Someone Reset the Bus\n"); + kprintf("Someone Reset the Bus\n"); adw_handle_bus_reset(adw, /*initiated*/FALSE); break; case ADW_ASYNC_RDMA_FAILURE: @@ -1240,7 +1240,7 @@ adw_intr(void *arg) adw_handle_bus_reset(adw, /*initiated*/TRUE); break; default: - printf("adw_intr: unknown async code 0x%x\n", + kprintf("adw_intr: unknown async code 0x%x\n", intrb_code); break; } @@ -1255,7 +1255,7 @@ adw_intr(void *arg) union ccb *ccb; #if 0 - printf("0x%x, 0x%x, 0x%x, 0x%x\n", + kprintf("0x%x, 0x%x, 0x%x, 0x%x\n", adw->responseq->carr_offset, adw->responseq->carr_ba, adw->responseq->areq_ba, @@ -1357,7 +1357,7 @@ adwprocesserror(struct adw_softc *adw, struct acb *acb) break; case QHSTA_M_QUEUE_ABORTED: /* BDR or Bus Reset */ - printf("Saw Queue Aborted\n"); + kprintf("Saw Queue Aborted\n"); ccb->ccb_h.status = adw->last_reset; break; case QHSTA_M_SXFR_SDMA_ERR: @@ -1370,7 +1370,7 @@ adwprocesserror(struct adw_softc *adw, struct acb *acb) { /* The SCSI bus hung in a phase */ xpt_print_path(adw->path); - printf("Watch Dog timer expired. Reseting bus\n"); + kprintf("Watch Dog timer expired. Reseting bus\n"); adw_reset_bus(adw); break; } @@ -1429,13 +1429,13 @@ adwtimeout(void *arg) ccb = acb->ccb; adw = (struct adw_softc *)ccb->ccb_h.ccb_adw_ptr; xpt_print_path(ccb->ccb_h.path); - printf("ACB %p - timed out\n", (void *)acb); + kprintf("ACB %p - timed out\n", (void *)acb); crit_enter(); if ((acb->state & ACB_ACTIVE) == 0) { xpt_print_path(ccb->ccb_h.path); - printf("ACB %p - timed out CCB already completed\n", + kprintf("ACB %p - timed out CCB already completed\n", (void *)acb); crit_exit(); return; @@ -1449,13 +1449,13 @@ adwtimeout(void *arg) ccb->ccb_h.target_id); crit_exit(); if (status == ADW_IDLE_CMD_SUCCESS) { - printf("%s: BDR Delivered. No longer in timeout\n", + kprintf("%s: BDR Delivered. No longer in timeout\n", adw_name(adw)); adw_handle_device_reset(adw, target_id); } else { adw_reset_bus(adw); xpt_print_path(adw->path); - printf("Bus Reset Delivered. No longer in timeout\n"); + kprintf("Bus Reset Delivered. No longer in timeout\n"); } } diff --git a/sys/dev/disk/advansys/adwlib.c b/sys/dev/disk/advansys/adwlib.c index 46341179a0..aa93d29f45 100644 --- a/sys/dev/disk/advansys/adwlib.c +++ b/sys/dev/disk/advansys/adwlib.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adwlib.c,v 1.6.2.1 2000/04/14 13:32:50 nyan Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adwlib.c,v 1.5 2006/10/25 20:55:52 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adwlib.c,v 1.6 2006/12/22 23:26:15 swildner Exp $ */ /* * Ported from: @@ -203,7 +203,7 @@ adw_reset_bus(struct adw_softc *adw) adw_idle_cmd_send(adw, ADW_IDLE_CMD_SCSI_RESET_START, /*param*/0); if (status != ADW_IDLE_CMD_SUCCESS) { xpt_print_path(adw->path); - printf("Bus Reset start attempt failed\n"); + kprintf("Bus Reset start attempt failed\n"); return (1); } DELAY(ADW_BUS_RESET_HOLD_DELAY_US); @@ -211,7 +211,7 @@ adw_reset_bus(struct adw_softc *adw) adw_idle_cmd_send(adw, ADW_IDLE_CMD_SCSI_RESET_END, /*param*/0); if (status != ADW_IDLE_CMD_SUCCESS) { xpt_print_path(adw->path); - printf("Bus Reset end attempt failed\n"); + kprintf("Bus Reset end attempt failed\n"); return (1); } return (0); @@ -474,7 +474,7 @@ adw_init_chip(struct adw_softc *adw, u_int term_scsicfg1) checksum += adw_inw(adw, ADW_RAM_DATA); if (checksum != adw->mcode_data->mcode_chksum) { - printf("%s: Firmware load failed!\n", adw_name(adw)); + kprintf("%s: Firmware load failed!\n", adw_name(adw)); return (EIO); } @@ -551,8 +551,8 @@ adw_init_chip(struct adw_softc *adw, u_int term_scsicfg1) * this condition is found. */ if ((adw_inw(adw, ADW_SCSI_CTRL) & 0x3F07) == 0x3F07) { - printf("%s: Illegal Cable Config!\n", adw_name(adw)); - printf("%s: Internal cable is reversed!\n", adw_name(adw)); + kprintf("%s: Illegal Cable Config!\n", adw_name(adw)); + kprintf("%s: Internal cable is reversed!\n", adw_name(adw)); return (EIO); } @@ -563,16 +563,16 @@ adw_init_chip(struct adw_softc *adw, u_int term_scsicfg1) if ((adw->features & ADW_ULTRA) != 0) { if ((scsicfg1 & ADW_SCSI_CFG1_DIFF_MODE) != 0 && (scsicfg1 & ADW_SCSI_CFG1_DIFF_SENSE) == 0) { - printf("%s: A Single Ended Device is attached to our " + kprintf("%s: A Single Ended Device is attached to our " "differential bus!\n", adw_name(adw)); return (EIO); } } else { if ((scsicfg1 & ADW2_SCSI_CFG1_DEV_DETECT_HVD) != 0) { - printf("%s: A High Voltage Differential Device " + kprintf("%s: A High Voltage Differential Device " "is attached to this controller.\n", adw_name(adw)); - printf("%s: HVD devices are not supported.\n", + kprintf("%s: HVD devices are not supported.\n", adw_name(adw)); return (EIO); } @@ -648,9 +648,9 @@ adw_init_chip(struct adw_softc *adw, u_int term_scsicfg1) cable_count++; if (cable_count == 3) { - printf("%s: Illegal Cable Config!\n", + kprintf("%s: Illegal Cable Config!\n", adw_name(adw)); - printf("%s: Only Two Ports may be used at " + kprintf("%s: Only Two Ports may be used at " "a time!\n", adw_name(adw)); } else if (cable_count <= 1) { /* @@ -669,13 +669,13 @@ adw_init_chip(struct adw_softc *adw, u_int term_scsicfg1) /* Tell the user about our decission */ switch (term_scsicfg1 & ADW_SCSI_CFG1_TERM_CTL_MASK) { case ADW_SCSI_CFG1_TERM_CTL_MASK: - printf("High & Low SE Term Enabled, "); + kprintf("High & Low SE Term Enabled, "); break; case ADW_SCSI_CFG1_TERM_CTL_H: - printf("High SE Termination Enabled, "); + kprintf("High SE Termination Enabled, "); break; case ADW_SCSI_CFG1_TERM_CTL_L: - printf("Low SE Term Enabled, "); + kprintf("Low SE Term Enabled, "); break; default: break; @@ -683,7 +683,7 @@ adw_init_chip(struct adw_softc *adw, u_int term_scsicfg1) if ((adw->features & ADW_ULTRA2) != 0 && (term_scsicfg1 & ADW2_SCSI_CFG1_TERM_CTL_LVD) != 0) - printf("LVD Term Enabled, "); + kprintf("LVD Term Enabled, "); /* * Invert the TERM_CTL_H and TERM_CTL_L bits and then diff --git a/sys/dev/disk/advansys/adwlib.h b/sys/dev/disk/advansys/adwlib.h index 287dd9cce4..ac7e0ca584 100644 --- a/sys/dev/disk/advansys/adwlib.h +++ b/sys/dev/disk/advansys/adwlib.h @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/advansys/adwlib.h,v 1.4 2000/03/02 00:08:35 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/advansys/adwlib.h,v 1.3 2003/08/07 21:16:50 dillon Exp $ + * $DragonFly: src/sys/dev/disk/advansys/adwlib.h,v 1.4 2006/12/22 23:26:15 swildner Exp $ */ /* * Ported from: @@ -863,7 +863,7 @@ adw_send_acb(struct adw_softc *adw, struct acb *acb, u_int32_t acb_baddr) adw->commandq->areq_ba = acbvtob(adw, acb); adw->commandq->next_ba = new_cq->carr_ba; #if 0 - printf("EnQ 0x%x 0x%x 0x%x 0x%x\n", + kprintf("EnQ 0x%x 0x%x 0x%x 0x%x\n", adw->commandq->carr_offset, adw->commandq->carr_ba, adw->commandq->areq_ba, diff --git a/sys/dev/disk/aha/aha.c b/sys/dev/disk/aha/aha.c index 4bd3c0d5a3..380874f31d 100644 --- a/sys/dev/disk/aha/aha.c +++ b/sys/dev/disk/aha/aha.c @@ -56,7 +56,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aha/aha.c,v 1.34.2.1 2000/08/02 22:24:39 peter Exp $ - * $DragonFly: src/sys/dev/disk/aha/aha.c,v 1.15 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aha/aha.c,v 1.16 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -499,8 +499,8 @@ aha_init(struct aha_softc* aha) aha->model, aha->fw_major, aha->fw_minor, aha->boardid); if (aha->diff_bus != 0) - printf("Diff "); - printf("SCSI Host Adapter, SCSI ID %d, %d CCBs\n", aha->scsi_id, + kprintf("Diff "); + kprintf("SCSI Host Adapter, SCSI ID %d, %d CCBs\n", aha->scsi_id, aha->max_ccbs); /* @@ -681,7 +681,7 @@ aha_find_probe_range(int ioport, int *port_index, int *max_port_index) break; if ((i >= AHA_NUM_ISAPORTS) || (ioport != aha_isa_ports[i].addr)) { - printf("\n" + kprintf("\n" "aha_isa_probe: Invalid baseport of 0x%x specified.\n" "aha_isa_probe: Nearest valid baseport is 0x%x.\n" "aha_isa_probe: Failing probe.\n", @@ -1853,13 +1853,13 @@ ahatimeout(void *arg) ccb = accb->ccb; aha = (struct aha_softc *)ccb->ccb_h.ccb_aha_ptr; xpt_print_path(ccb->ccb_h.path); - printf("CCB %p - timed out\n", (void *)accb); + kprintf("CCB %p - timed out\n", (void *)accb); crit_enter(); if ((accb->flags & ACCB_ACTIVE) == 0) { xpt_print_path(ccb->ccb_h.path); - printf("CCB %p - timed out CCB already completed\n", + kprintf("CCB %p - timed out CCB already completed\n", (void *)accb); crit_exit(); return; diff --git a/sys/dev/disk/aha/aha_isa.c b/sys/dev/disk/aha/aha_isa.c index 32dead1b6a..7eb88441ef 100644 --- a/sys/dev/disk/aha/aha_isa.c +++ b/sys/dev/disk/aha/aha_isa.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aha/aha_isa.c,v 1.17.2.1 2000/08/02 22:24:40 peter Exp $ - * $DragonFly: src/sys/dev/disk/aha/aha_isa.c,v 1.9 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aha/aha_isa.c,v 1.10 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -143,7 +143,7 @@ aha_isa_probe(device_t dev) DEFAULT_CMD_TIMEOUT); if (error != 0) { - printf("aha_isa_probe: Could not determine IRQ or DMA " + kprintf("aha_isa_probe: Could not determine IRQ or DMA " "settings for adapter at 0x%x. Failing probe\n", ioport); aha_free(aha); @@ -165,7 +165,7 @@ aha_isa_probe(device_t dev) drq = 7; break; default: - printf("aha_isa_probe: Invalid DMA setting " + kprintf("aha_isa_probe: Invalid DMA setting " "detected for adapter at 0x%x. " "Failing probe\n", ioport); return (ENXIO); diff --git a/sys/dev/disk/ahb/ahb.c b/sys/dev/disk/ahb/ahb.c index 9df5635a1f..113692c1ad 100644 --- a/sys/dev/disk/ahb/ahb.c +++ b/sys/dev/disk/ahb/ahb.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ahb/ahb.c,v 1.18.2.3 2001/03/05 13:08:55 obrien Exp $ - * $DragonFly: src/sys/dev/disk/ahb/ahb.c,v 1.13 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ahb/ahb.c,v 1.14 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -229,7 +229,7 @@ ahbprobe(device_t dev) irq = 15; break; default: - printf("Adaptec 174X at slot %d: illegal " + kprintf("Adaptec 174X at slot %d: illegal " "irq setting %d\n", eisa_get_slot(dev), (intdef & 0x7)); irq = 0; @@ -435,7 +435,7 @@ ahbreset(struct ahb_softc *ahb) int test; if ((ahb_inb(ahb, PORTADDR) & PORTADDR_ENHANCED) == 0) { - printf("ahb_reset: Controller not in enhanced mode\n"); + kprintf("ahb_reset: Controller not in enhanced mode\n"); return (-1); } @@ -449,11 +449,11 @@ ahbreset(struct ahb_softc *ahb) } if (wait == 0) { - printf("ahbreset: No answer from aha1742 board\n"); + kprintf("ahbreset: No answer from aha1742 board\n"); return (-1); } if ((test = ahb_inb(ahb, MBOXIN0)) != 0) { - printf("ahb_reset: self test failed, val = 0x%x\n", test); + kprintf("ahb_reset: self test failed, val = 0x%x\n", test); return (-1); } while (ahb_inb(ahb, HOSTSTAT) & HOSTSTAT_INTPEND) { @@ -510,7 +510,7 @@ ahbxptattach(struct ahb_softc *ahb) ahb->num_ecbs = MIN(ahb->num_ecbs, ahb->ha_inq_data->scsi_data.reserved[1]); - printf("ahb%ld: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n", + kprintf("ahb%ld: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n", ahb->unit, ahb->ha_inq_data->scsi_data.product, (ahb->ha_inq_data->scsi_data.flags & 0x4) ? "Differential" : "Single Ended", @@ -558,7 +558,7 @@ ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat) u_int target_id; if (ahb->immed_cmd == 0) { - printf("ahb%ld: Immediate Command complete with no " + kprintf("ahb%ld: Immediate Command complete with no " " pending command\n", ahb->unit); return; } @@ -599,11 +599,11 @@ ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat) if (ahb->immed_ecb != NULL) { ahb->immed_ecb = NULL; - printf("ahb%ld: No longer in timeout\n", ahb->unit); + kprintf("ahb%ld: No longer in timeout\n", ahb->unit); } else if (target_id == ahb->scsi_id) - printf("ahb%ld: SCSI Bus Reset Delivered\n", ahb->unit); + kprintf("ahb%ld: SCSI Bus Reset Delivered\n", ahb->unit); else - printf("ahb%ld: Bus Device Reset Delibered to target %d\n", + kprintf("ahb%ld: Bus Device Reset Delibered to target %d\n", ahb->unit, target_id); ahb->immed_cmd = 0; @@ -703,7 +703,7 @@ ahbprocesserror(struct ahb_softc *ahb, struct ecb *ecb, union ccb *ccb) struct ccb_trans_settings neg; xpt_print_path(ccb->ccb_h.path); - printf("refuses tagged commands. Performing " + kprintf("refuses tagged commands. Performing " "non-tagged I/O\n"); neg.flags = 0; neg.valid = CCB_TRANS_TQ_VALID; @@ -729,7 +729,7 @@ ahbprocesserror(struct ahb_softc *ahb, struct ecb *ecb, union ccb *ccb) ccb->ccb_h.status = CAM_SCSI_BUS_RESET; break; case HS_INVALID_ECB_PARAM: - printf("ahb%ld: opcode 0x%02x, flag_word1 0x%02x, flag_word2 0x%02x\n", + kprintf("ahb%ld: opcode 0x%02x, flag_word1 0x%02x, flag_word2 0x%02x\n", ahb->unit, hecb->opcode, hecb->flag_word1, hecb->flag_word2); ccb->ccb_h.status = CAM_SCSI_BUS_RESET; break; @@ -786,7 +786,7 @@ ahbdone(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat) } else { /* Non CCB Command */ if ((intstat & INTSTAT_MASK) != INTSTAT_ECB_OK) { - printf("ahb%ld: Command 0%x Failed %x:%x:%x\n", + kprintf("ahb%ld: Command 0%x Failed %x:%x:%x\n", ahb->unit, ecb->hecb.opcode, *((u_int16_t*)&ecb->status), ecb->status.ha_status, ecb->status.resid_count); @@ -834,11 +834,11 @@ ahbintr(void *arg) xpt_print_path(ahb->path); switch (mbox) { case HS_SCSI_RESET_ADAPTER: - printf("Host Adapter Initiated " + kprintf("Host Adapter Initiated " "Bus Reset occurred\n"); break; case HS_SCSI_RESET_INCOMING: - printf("Bus Reset Initiated " + kprintf("Bus Reset Initiated " "by another device occurred\n"); break; } @@ -846,7 +846,7 @@ ahbintr(void *arg) xpt_async(AC_BUS_RESET, ahb->path, NULL); break; } - printf("Unsupported initiator selection AEN occured\n"); + kprintf("Unsupported initiator selection AEN occured\n"); break; case INTSTAT_IMMED_OK: case INTSTAT_IMMED_ERR: @@ -872,7 +872,7 @@ ahbexecuteecb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) if (error != 0) { if (error != EFBIG) - printf("ahb%ld: Unexepected error 0x%x returned from " + kprintf("ahb%ld: Unexepected error 0x%x returned from " "bus_dmamap_load\n", ahb->unit, error); if (ccb->ccb_h.status == CAM_REQ_INPROG) { xpt_freeze_devq(ccb->ccb_h.path, /*count*/1); @@ -1235,13 +1235,13 @@ ahbtimeout(void *arg) ccb = ecb->ccb; ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr; xpt_print_path(ccb->ccb_h.path); - printf("ECB %p - timed out\n", (void *)ecb); + kprintf("ECB %p - timed out\n", (void *)ecb); crit_enter(); if ((ecb->state & ECB_ACTIVE) == 0) { xpt_print_path(ccb->ccb_h.path); - printf("ECB %p - timed out ECB already completed\n", + kprintf("ECB %p - timed out ECB already completed\n", (void *)ecb); crit_exit(); return; @@ -1288,7 +1288,7 @@ ahbtimeout(void *arg) * later which will attempt a bus reset. */ xpt_print_path(ccb->ccb_h.path); - printf("Queuing BDR\n"); + kprintf("Queuing BDR\n"); ecb->state |= ECB_DEVICE_RESET; callout_reset(&ccb->ccb_h.timeout_ch, 2 * hz, ahbtimeout, ecb); @@ -1300,7 +1300,7 @@ ahbtimeout(void *arg) * have already attempted to clear the condition with a BDR. */ xpt_print_path(ccb->ccb_h.path); - printf("Attempting SCSI Bus reset\n"); + kprintf("Attempting SCSI Bus reset\n"); ecb->state |= ECB_SCSIBUS_RESET; callout_reset(&ccb->ccb_h.timeout_ch, 2 * hz, ahbtimeout, ecb); ahb->immed_cmd = IMMED_RESET; diff --git a/sys/dev/disk/aic/aic.c b/sys/dev/disk/aic/aic.c index 8f6b3b15e2..8428541ec2 100644 --- a/sys/dev/disk/aic/aic.c +++ b/sys/dev/disk/aic/aic.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aic/aic.c,v 1.8 2000/01/14 23:42:35 imp Exp $ - * $DragonFly: src/sys/dev/disk/aic/aic.c,v 1.8 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic/aic.c,v 1.9 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -450,7 +450,7 @@ aic_reselected(struct aic_softc *aic) selid = aic_inb(aic, SELID) & ~(1 << aic->initiator); if (selid & (selid - 1)) { /* this should never have happened */ - printf("aic_reselected: invalid selid %x\n", selid); + kprintf("aic_reselected: invalid selid %x\n", selid); aic_reset(aic, /*initiate_reset*/TRUE); return; } @@ -651,7 +651,7 @@ aic_handle_msgin(struct aic_softc *aic) /*scsi_sense_print(csio);*/ } else { ccb_h->status |= CAM_AUTOSENSE_FAIL; - printf("ccb %p sense failed %x\n", + kprintf("ccb %p sense failed %x\n", ccb_h, scb->status); } } else { @@ -1124,17 +1124,17 @@ aic_timeout(void *arg) struct aic_softc *aic = (struct aic_softc *)ccb->ccb_h.ccb_aic_ptr; xpt_print_path(ccb->ccb_h.path); - printf("ccb %p - timed out", ccb); + kprintf("ccb %p - timed out", ccb); if (aic->nexus && aic->nexus != scb) - printf(", nexus %p", aic->nexus->ccb); - printf(", phase 0x%x, state %d\n", aic_inb(aic, SCSISIGI), aic->state); + kprintf(", nexus %p", aic->nexus->ccb); + kprintf(", phase 0x%x, state %d\n", aic_inb(aic, SCSISIGI), aic->state); crit_enter(); if ((scb->flags & SCB_ACTIVE) == 0) { crit_exit(); xpt_print_path(ccb->ccb_h.path); - printf("ccb %p - timed out already completed\n", ccb); + kprintf("ccb %p - timed out already completed\n", ccb); return; } @@ -1296,7 +1296,7 @@ aic_intr(void *arg) return; } - printf("aic_intr: unexpected intr sstat0 %x sstat1 %x\n", + kprintf("aic_intr: unexpected intr sstat0 %x sstat1 %x\n", sstat0, sstat1); aic_outb(aic, DMACNTRL0, INTEN); } @@ -1497,15 +1497,15 @@ aic_attach(struct aic_softc *aic) aic_init(aic); - printf("aic%d: %s", aic->unit, + kprintf("aic%d: %s", aic->unit, aic_inb(aic, REV) > 0 ? "aic6360" : "aic6260"); if (aic->flags & AIC_DMA_ENABLE) - printf(", dma"); + kprintf(", dma"); if (aic->flags & AIC_DISC_ENABLE) - printf(", disconnection"); + kprintf(", disconnection"); if (aic->flags & AIC_PARITY_ENABLE) - printf(", parity check"); - printf("\n"); + kprintf(", parity check"); + kprintf("\n"); return (0); } diff --git a/sys/dev/disk/aic7xxx/ahc_eisa.c b/sys/dev/disk/aic7xxx/ahc_eisa.c index 9f133e09bc..a098cb247c 100644 --- a/sys/dev/disk/aic7xxx/ahc_eisa.c +++ b/sys/dev/disk/aic7xxx/ahc_eisa.c @@ -29,7 +29,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_eisa.c#11 $ * * $FreeBSD: src/sys/dev/aic7xxx/ahc_eisa.c,v 1.15.2.11 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_eisa.c,v 1.5 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_eisa.c,v 1.6 2006/12/22 23:26:15 swildner Exp $ */ #include "aic7xxx_osm.h" @@ -91,7 +91,7 @@ aic7770_probe(device_t dev) case 15: break; default: - printf("aic7770 at slot %d: illegal irq setting %d\n", + kprintf("aic7770 at slot %d: illegal irq setting %d\n", eisa_get_slot(dev), intdef); error = ENXIO; } @@ -142,7 +142,7 @@ aic7770_attach(device_t dev) &ahc->parent_dmat); if (error != 0) { - printf("ahc_eisa_attach: Could not allocate DMA tag " + kprintf("ahc_eisa_attach: Could not allocate DMA tag " "- error %d\n", error); ahc_free(ahc); return (ENOMEM); diff --git a/sys/dev/disk/aic7xxx/ahc_pci.c b/sys/dev/disk/aic7xxx/ahc_pci.c index b54bdc7709..feee138087 100644 --- a/sys/dev/disk/aic7xxx/ahc_pci.c +++ b/sys/dev/disk/aic7xxx/ahc_pci.c @@ -31,7 +31,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_pci.c#13 $ * * $FreeBSD: src/sys/dev/aic7xxx/ahc_pci.c,v 1.29.2.14 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_pci.c,v 1.7 2006/09/05 16:50:50 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_pci.c,v 1.8 2006/12/22 23:26:15 swildner Exp $ */ #include "aic7xxx_osm.h" @@ -124,7 +124,7 @@ ahc_pci_attach(device_t dev) &ahc->parent_dmat); if (error != 0) { - printf("ahc_pci_attach: Could not allocate DMA tag " + kprintf("ahc_pci_attach: Could not allocate DMA tag " "- error %d\n", error); ahc_free(ahc); return (ENOMEM); @@ -162,11 +162,11 @@ ahc_pci_map_registers(struct ahc_softc *ahc) device_printf(ahc->dev_softc, "Defaulting to MEMIO "); #ifdef AHC_ALLOW_MEMIO if (bootverbose) - printf("on\n"); + kprintf("on\n"); allow_memio = 1; #else if (bootverbose) - printf("off\n"); + kprintf("off\n"); allow_memio = 0; #endif } diff --git a/sys/dev/disk/aic7xxx/ahd_pci.c b/sys/dev/disk/aic7xxx/ahd_pci.c index 0084197810..8a38d2c55b 100644 --- a/sys/dev/disk/aic7xxx/ahd_pci.c +++ b/sys/dev/disk/aic7xxx/ahd_pci.c @@ -31,7 +31,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#13 $ * * $FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.2.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.6 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.7 2006/12/22 23:26:15 swildner Exp $ */ #include "aic79xx_osm.h" @@ -125,7 +125,7 @@ ahd_pci_attach(device_t dev) &ahd->parent_dmat); if (error != 0) { - printf("ahd_pci_attach: Could not allocate DMA tag " + kprintf("ahd_pci_attach: Could not allocate DMA tag " "- error %d\n", error); ahd_free(ahd); return (ENOMEM); diff --git a/sys/dev/disk/aic7xxx/aic7770.c b/sys/dev/disk/aic7xxx/aic7770.c index 746eefc845..62ff1715d5 100644 --- a/sys/dev/disk/aic7xxx/aic7770.c +++ b/sys/dev/disk/aic7xxx/aic7770.c @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7770.c#32 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7770.c,v 1.1.2.9 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7770.c,v 1.5 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7770.c,v 1.6 2006/12/22 23:26:15 swildner Exp $ */ #ifdef __linux__ @@ -176,7 +176,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io) case 15: break; default: - printf("aic7770_config: illegal irq setting %d\n", intdef); + kprintf("aic7770_config: illegal irq setting %d\n", intdef); return (ENXIO); } @@ -318,7 +318,7 @@ aha2840_load_seeprom(struct ahc_softc *ahc) sc = ahc->seep_config; if (bootverbose) - printf("%s: Reading SEEPROM...", ahc_name(ahc)); + kprintf("%s: Reading SEEPROM...", ahc_name(ahc)); have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc, /*start_addr*/0, sizeof(*sc)/2); @@ -326,16 +326,16 @@ aha2840_load_seeprom(struct ahc_softc *ahc) if (ahc_verify_cksum(sc) == 0) { if(bootverbose) - printf ("checksum error\n"); + kprintf ("checksum error\n"); have_seeprom = 0; } else if (bootverbose) { - printf("done.\n"); + kprintf("done.\n"); } } if (!have_seeprom) { if (bootverbose) - printf("%s: No SEEPROM available\n", ahc_name(ahc)); + kprintf("%s: No SEEPROM available\n", ahc_name(ahc)); ahc->flags |= AHC_USEDEFAULTS; } else { /* diff --git a/sys/dev/disk/aic7xxx/aic79xx.c b/sys/dev/disk/aic7xxx/aic79xx.c index 4c2d1b2e35..5aa7bbafe6 100644 --- a/sys/dev/disk/aic7xxx/aic79xx.c +++ b/sys/dev/disk/aic7xxx/aic79xx.c @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#198 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.3.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.11 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.12 2006/12/22 23:26:15 swildner Exp $ */ #include "aic79xx_osm.h" @@ -338,7 +338,7 @@ ahd_clear_fifo(struct ahd_softc *ahd, u_int fifo) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_FIFOS) != 0) - printf("%s: Clearing FIFO %d\n", ahd_name(ahd), fifo); + kprintf("%s: Clearing FIFO %d\n", ahd_name(ahd), fifo); #endif saved_modes = ahd_save_modes(ahd); ahd_set_modes(ahd, fifo, fifo); @@ -404,7 +404,7 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd) next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: Warning - DMA-up and complete " + kprintf("%s: Warning - DMA-up and complete " "SCB %d invalid\n", ahd_name(ahd), scbid); continue; } @@ -424,7 +424,7 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd) next_scbid = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: Warning - Complete SCB %d invalid\n", + kprintf("%s: Warning - Complete SCB %d invalid\n", ahd_name(ahd), scbid); continue; } @@ -444,7 +444,7 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd) | ahd_inb(ahd, GSFIFO); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: Warning - GSFIFO SCB %d invalid\n", + kprintf("%s: Warning - GSFIFO SCB %d invalid\n", ahd_name(ahd), scbid); continue; } @@ -475,7 +475,7 @@ ahd_run_qoutfifo(struct ahd_softc *ahd) & ~QOUTFIFO_ENTRY_VALID_LE); scb = ahd_lookup_scb(ahd, scb_index); if (scb == NULL) { - printf("%s: WARNING no command for scb %d " + kprintf("%s: WARNING no command for scb %d " "(cmdcmplt)\nQOUTPOS = %d\n", ahd_name(ahd), scb_index, ahd->qoutfifonext); @@ -504,7 +504,7 @@ ahd_handle_hwerrint(struct ahd_softc *ahd) error = ahd_inb(ahd, ERROR); for (i = 0; i < num_errors; i++) { if ((error & ahd_hard_errors[i].error) != 0) - printf("%s: hwerrint, %s\n", + kprintf("%s: hwerrint, %s\n", ahd_name(ahd), ahd_hard_errors[i].errmesg); } @@ -547,7 +547,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) ahd_update_modes(ahd); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("%s: Handle Seqint Called for code %d\n", + kprintf("%s: Handle Seqint Called for code %d\n", ahd_name(ahd), seqintcode); #endif switch (seqintcode) { @@ -562,7 +562,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) if (scb != NULL) { ahd_complete_scb(ahd, scb); } else { - printf("%s: WARNING no command for scb %d " + kprintf("%s: WARNING no command for scb %d " "(bad status)\n", ahd_name(ahd), scbid); ahd_dump_card_state(ahd); } @@ -601,18 +601,18 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) */ #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) - printf("%s: Assuming LQIPHASE_NLQ with " + kprintf("%s: Assuming LQIPHASE_NLQ with " "P0 assertion\n", ahd_name(ahd)); #endif } #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) - printf("%s: Entering NONPACK\n", ahd_name(ahd)); + kprintf("%s: Entering NONPACK\n", ahd_name(ahd)); #endif break; } case INVALID_SEQINT: - printf("%s: Invalid Sequencer interrupt occurred.\n", + kprintf("%s: Invalid Sequencer interrupt occurred.\n", ahd_name(ahd)); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); @@ -627,8 +627,8 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) if (scb != NULL) ahd_print_path(ahd, scb); else - printf("%s: ", ahd_name(ahd)); - printf("SCB %d Packetized Status Overrun", scbid); + kprintf("%s: ", ahd_name(ahd)); + kprintf("SCB %d Packetized Status Overrun", scbid); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); break; @@ -642,7 +642,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { ahd_dump_card_state(ahd); - printf("CFG4ISTAT: Free SCB %d referenced", scbid); + kprintf("CFG4ISTAT: Free SCB %d referenced", scbid); panic("For safety"); } ahd_outq(ahd, HADDR, scb->sense_busaddr); @@ -657,7 +657,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) u_int bus_phase; bus_phase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK; - printf("%s: ILLEGAL_PHASE 0x%x\n", + kprintf("%s: ILLEGAL_PHASE 0x%x\n", ahd_name(ahd), bus_phase); switch (bus_phase) { @@ -669,7 +669,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) case P_STATUS: case P_MESGIN: ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); - printf("%s: Issued Bus Reset.\n", ahd_name(ahd)); + kprintf("%s: Issued Bus Reset.\n", ahd_name(ahd)); break; case P_COMMAND: { @@ -694,7 +694,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) scbid = ahd_get_scbptr(ahd); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("Invalid phase with no valid SCB. " + kprintf("Invalid phase with no valid SCB. " "Resetting bus.\n"); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); @@ -753,7 +753,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) { ahd_print_path(ahd, scb); - printf("Unexpected command phase from " + kprintf("Unexpected command phase from " "packetized target\n"); } #endif @@ -769,7 +769,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) { - printf("%s: CFG4OVERRUN mode = %x\n", ahd_name(ahd), + kprintf("%s: CFG4OVERRUN mode = %x\n", ahd_name(ahd), ahd_inb(ahd, MODE_PTR)); } #endif @@ -804,7 +804,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) { #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) { - printf("%s: PDATA_REINIT - DFCNTRL = 0x%x " + kprintf("%s: PDATA_REINIT - DFCNTRL = 0x%x " "SG_CACHE_SHADOW = 0x%x\n", ahd_name(ahd), ahd_inb(ahd, DFCNTRL), ahd_inb(ahd, SG_CACHE_SHADOW)); @@ -837,7 +837,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) bus_phase = ahd_inb(ahd, SCSISIGI) & PHASE_MASK; if (bus_phase != P_MESGIN && bus_phase != P_MESGOUT) { - printf("ahd_intr: HOST_MSG_LOOP bad " + kprintf("ahd_intr: HOST_MSG_LOOP bad " "phase 0x%x\n", bus_phase); /* * Probably transitioned to bus free before @@ -886,29 +886,29 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK); ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO); - printf("%s:%c:%d: no active SCB for reconnecting " + kprintf("%s:%c:%d: no active SCB for reconnecting " "target - issuing BUS DEVICE RESET\n", ahd_name(ahd), 'A', ahd_inb(ahd, SELID) >> 4); - printf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, " + kprintf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, " "REG0 == 0x%x ACCUM = 0x%x\n", ahd_inb(ahd, SAVED_SCSIID), ahd_inb(ahd, SAVED_LUN), ahd_inw(ahd, REG0), ahd_inb(ahd, ACCUM)); - printf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, " + kprintf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, " "SINDEX == 0x%x\n", ahd_inb(ahd, SEQ_FLAGS), ahd_get_scbptr(ahd), ahd_find_busy_tcl(ahd, BUILD_TCL(ahd_inb(ahd, SAVED_SCSIID), ahd_inb(ahd, SAVED_LUN))), ahd_inw(ahd, SINDEX)); - printf("SELID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, " + kprintf("SELID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, " "SCB_CONTROL == 0x%x\n", ahd_inb(ahd, SELID), ahd_inb_scbram(ahd, SCB_SCSIID), ahd_inb_scbram(ahd, SCB_LUN), ahd_inb_scbram(ahd, SCB_CONTROL)); - printf("SCSIBUS[0] == 0x%x, SCSISIGI == 0x%x\n", + kprintf("SCSIBUS[0] == 0x%x, SCSISIGI == 0x%x\n", ahd_inb(ahd, SCSIBUS), ahd_inb(ahd, SCSISIGI)); - printf("SXFRCTL0 == 0x%x\n", ahd_inb(ahd, SXFRCTL0)); - printf("SEQCTL0 == 0x%x\n", ahd_inb(ahd, SEQCTL0)); + kprintf("SXFRCTL0 == 0x%x\n", ahd_inb(ahd, SXFRCTL0)); + kprintf("SEQCTL0 == 0x%x\n", ahd_inb(ahd, SEQCTL0)); ahd_dump_card_state(ahd); ahd->msgout_buf[0] = MSG_BUS_DEV_RESET; ahd->msgout_len = 1; @@ -936,7 +936,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) u_int lastphase; lastphase = ahd_inb(ahd, LASTPHASE); - printf("%s:%c:%d: unknown scsi bus phase %x, " + kprintf("%s:%c:%d: unknown scsi bus phase %x, " "lastphase = 0x%x. Attempting to continue\n", ahd_name(ahd), 'A', SCSIID_TARGET(ahd, ahd_inb(ahd, SAVED_SCSIID)), @@ -948,7 +948,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) u_int lastphase; lastphase = ahd_inb(ahd, LASTPHASE); - printf("%s:%c:%d: Missed busfree. " + kprintf("%s:%c:%d: Missed busfree. " "Lastphase = 0x%x, Curphase = 0x%x\n", ahd_name(ahd), 'A', SCSIID_TARGET(ahd, ahd_inb(ahd, SAVED_SCSIID)), @@ -978,11 +978,11 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) lastphase = ahd_inb(ahd, LASTPHASE); if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) { ahd_print_path(ahd, scb); - printf("data overrun detected %s. Tag == 0x%x.\n", + kprintf("data overrun detected %s. Tag == 0x%x.\n", ahd_lookup_phase_entry(lastphase)->phasemsg, SCB_GET_TAG(scb)); ahd_print_path(ahd, scb); - printf("%s seen Data Phase. Length = %ld. " + kprintf("%s seen Data Phase. Length = %ld. " "NumSGs = %d.\n", ahd_inb(ahd, SEQ_FLAGS) & DPHASE ? "Have" : "Haven't", @@ -1007,7 +1007,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) u_int scbid; ahd_fetch_devinfo(ahd, &devinfo); - printf("%s:%c:%d:%d: Attempt to issue message failed\n", + kprintf("%s:%c:%d:%d: Attempt to issue message failed\n", ahd_name(ahd), devinfo.channel, devinfo.target, devinfo.lun); scbid = ahd_get_scbptr(ahd); @@ -1040,7 +1040,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) cam_status error; ahd_print_path(ahd, scb); - printf("Task Management Func 0x%x Complete\n", + kprintf("Task Management Func 0x%x Complete\n", scb->hscb->task_management); lun = CAM_LUN_WILDCARD; tag = SCB_LIST_NULL; @@ -1096,7 +1096,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) * the QINFIFO if it is still there. */ ahd_print_path(ahd, scb); - printf("SCB completes before TMF\n"); + kprintf("SCB completes before TMF\n"); /* * Handle losing the race. Wait until any * current selection completes. We will then @@ -1121,7 +1121,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) case TRACEPOINT1: case TRACEPOINT2: case TRACEPOINT3: - printf("%s: Tracepoint %d\n", ahd_name(ahd), + kprintf("%s: Tracepoint %d\n", ahd_name(ahd), seqintcode - TRACEPOINT0); break; case NO_SEQINT: @@ -1130,7 +1130,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat) ahd_handle_hwerrint(ahd); break; default: - printf("%s: Unexpected SEQINTCODE %d\n", ahd_name(ahd), + kprintf("%s: Unexpected SEQINTCODE %d\n", ahd_name(ahd), seqintcode); break; } @@ -1184,7 +1184,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) u_int now_lvd; now_lvd = ahd_inb(ahd, SBLKCTL) & ENAB40; - printf("%s: Transceiver State Has Changed to %s mode\n", + kprintf("%s: Transceiver State Has Changed to %s mode\n", ahd_name(ahd), now_lvd ? "LVD" : "SE"); ahd_outb(ahd, CLRSINT0, CLRIOERR); /* @@ -1195,16 +1195,16 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) ahd_setup_iocell_workaround(ahd); ahd_unpause(ahd); } else if ((status0 & OVERRUN) != 0) { - printf("%s: SCSI offset overrun detected. Resetting bus.\n", + kprintf("%s: SCSI offset overrun detected. Resetting bus.\n", ahd_name(ahd)); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); } else if ((status & SCSIRSTI) != 0) { - printf("%s: Someone reset channel A\n", ahd_name(ahd)); + kprintf("%s: Someone reset channel A\n", ahd_name(ahd)); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/FALSE); } else if ((status & SCSIPERR) != 0) { ahd_handle_transmission_error(ahd); } else if (lqostat0 != 0) { - printf("%s: lqostat0 == 0x%x!\n", ahd_name(ahd), lqostat0); + kprintf("%s: lqostat0 == 0x%x!\n", ahd_name(ahd), lqostat0); ahd_outb(ahd, CLRLQOINT0, lqostat0); if ((ahd->bugs & AHD_CLRLQO_AUTOCLR_BUG) != 0) { ahd_outb(ahd, CLRLQOINT1, 0); @@ -1234,7 +1234,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) scbid = ahd_inw(ahd, WAITING_TID_HEAD); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: ahd_intr - referenced scb not " + kprintf("%s: ahd_intr - referenced scb not " "valid during SELTO scb(0x%x)\n", ahd_name(ahd), scbid); ahd_dump_card_state(ahd); @@ -1243,7 +1243,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_SELTO) != 0) { ahd_print_path(ahd, scb); - printf("Saw Selection Timeout for SCB 0x%x\n", + kprintf("Saw Selection Timeout for SCB 0x%x\n", scbid); } #endif @@ -1268,7 +1268,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) ahd_iocell_first_selection(ahd); ahd_unpause(ahd); } else if (status3 != 0) { - printf("%s: SCSI Cell parity error SSTAT3 == 0x%x\n", + kprintf("%s: SCSI Cell parity error SSTAT3 == 0x%x\n", ahd_name(ahd), status3); ahd_outb(ahd, CLRSINT3, status3); } else if ((lqistat1 & (LQIPHASE_LQ|LQIPHASE_NLQ)) != 0) { @@ -1316,7 +1316,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) scbid = ahd_get_scbptr(ahd); scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: Invalid SCB %d in DFF%d " + kprintf("%s: Invalid SCB %d in DFF%d " "during unexpected busfree\n", ahd_name(ahd), scbid, mode); packetized = 0; @@ -1340,7 +1340,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("Saw Busfree. Busfreetime = 0x%x.\n", + kprintf("Saw Busfree. Busfreetime = 0x%x.\n", busfreetime); #endif /* @@ -1381,7 +1381,7 @@ ahd_handle_scsiint(struct ahd_softc *ahd, u_int intstat) ahd_unpause(ahd); } } else { - printf("%s: Missing case in ahd_handle_scsiint. status = %x\n", + kprintf("%s: Missing case in ahd_handle_scsiint. status = %x\n", ahd_name(ahd), status); ahd_dump_card_state(ahd); ahd_clear_intstat(ahd); @@ -1417,7 +1417,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) || (lqistate == 0x29)) { #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_RECOVERY) != 0) { - printf("%s: NLQCRC found via LQISTATE\n", + kprintf("%s: NLQCRC found via LQISTATE\n", ahd_name(ahd)); } #endif @@ -1449,18 +1449,18 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) cur_col = 0; if (silent == FALSE) { - printf("%s: Transmission error detected\n", ahd_name(ahd)); + kprintf("%s: Transmission error detected\n", ahd_name(ahd)); ahd_lqistat1_print(lqistat1, &cur_col, 50); ahd_lastphase_print(lastphase, &cur_col, 50); ahd_scsisigi_print(curphase, &cur_col, 50); ahd_perrdiag_print(perrdiag, &cur_col, 50); - printf("\n"); + kprintf("\n"); ahd_dump_card_state(ahd); } if ((lqistat1 & (LQIOVERI_LQ|LQIOVERI_NLQ)) != 0) { if (silent == FALSE) { - printf("%s: Gross protocol error during incoming " + kprintf("%s: Gross protocol error during incoming " "packet. lqistat1 == 0x%x. Resetting bus.\n", ahd_name(ahd), lqistat1); } @@ -1489,7 +1489,7 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) * (SPI4R09 10.7.3.3.3) */ ahd_outb(ahd, LQCTL2, LQIRETRY); - printf("LQIRetry for LQICRCI_LQ to release ACK\n"); + kprintf("LQIRetry for LQICRCI_LQ to release ACK\n"); } else if ((lqistat1 & LQICRCI_NLQ) != 0) { /* * We detected a CRC error in a NON-LQ packet. @@ -1537,22 +1537,22 @@ ahd_handle_transmission_error(struct ahd_softc *ahd) * Busfree detection is enabled. */ if (silent == FALSE) - printf("LQICRC_NLQ\n"); + kprintf("LQICRC_NLQ\n"); if (scb == NULL) { - printf("%s: No SCB valid for LQICRC_NLQ. " + kprintf("%s: No SCB valid for LQICRC_NLQ. " "Resetting bus\n", ahd_name(ahd)); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); return; } } else if ((lqistat1 & LQIBADLQI) != 0) { - printf("Need to handle BADLQI!\n"); + kprintf("Need to handle BADLQI!\n"); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); return; } else if ((perrdiag & (PARITYERR|PREVPHASE)) == PARITYERR) { if ((curphase & ~P_DATAIN_DT) != 0) { /* Ack the byte. So we can continue. */ if (silent == FALSE) - printf("Acking %s to clear perror\n", + kprintf("Acking %s to clear perror\n", ahd_lookup_phase_entry(curphase)->phasemsg); ahd_inb(ahd, SCSIDAT); } @@ -1597,10 +1597,10 @@ ahd_handle_lqiphase_error(struct ahd_softc *ahd, u_int lqistat1) if ((ahd_inb(ahd, SCSISIGO) & ATNO) != 0 && (ahd_inb(ahd, MDFFSTAT) & DLZERO) != 0) { if ((lqistat1 & LQIPHASE_LQ) != 0) { - printf("LQIRETRY for LQIPHASE_LQ\n"); + kprintf("LQIRETRY for LQIPHASE_LQ\n"); ahd_outb(ahd, LQCTL2, LQIRETRY); } else if ((lqistat1 & LQIPHASE_NLQ) != 0) { - printf("LQIRETRY for LQIPHASE_NLQ\n"); + kprintf("LQIRETRY for LQIPHASE_NLQ\n"); ahd_outb(ahd, LQCTL2, LQIRETRY); } else panic("ahd_handle_lqiphase_error: No phase errors\n"); @@ -1608,7 +1608,7 @@ ahd_handle_lqiphase_error(struct ahd_softc *ahd, u_int lqistat1) ahd_outb(ahd, CLRINT, CLRSCSIINT); ahd_unpause(ahd); } else { - printf("Reseting Channel for LQI Phase error\n"); + kprintf("Reseting Channel for LQI Phase error\n"); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, 'A', /*Initiate Reset*/TRUE); } @@ -1635,7 +1635,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) u_int next; if ((busfreetime & BUSFREE_LQO) == 0) - printf("%s: Warning, BUSFREE time is 0x%x. " + kprintf("%s: Warning, BUSFREE time is 0x%x. " "Expected BUSFREE_LQO.\n", ahd_name(ahd), busfreetime); /* @@ -1700,7 +1700,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) if (scb->crc_retry_count < AHD_MAX_LQ_CRC_ERRORS) { if (SCB_IS_SILENT(scb) == FALSE) { ahd_print_path(ahd, scb); - printf("Probable outgoing LQ CRC error. " + kprintf("Probable outgoing LQ CRC error. " "Retrying command\n"); } scb->crc_retry_count++; @@ -1722,7 +1722,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) ahd_outb(ahd, CLRSINT1, CLRSCSIPERR|CLRBUSFREE); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MASKED_ERRORS) != 0) - printf("%s: Parity on last REQ detected " + kprintf("%s: Parity on last REQ detected " "during busfree phase.\n", ahd_name(ahd)); #endif @@ -1736,7 +1736,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) scbid = ahd_get_scbptr(ahd); scb = ahd_lookup_scb(ahd, scbid); ahd_print_path(ahd, scb); - printf("Unexpected PKT busfree condition\n"); + kprintf("Unexpected PKT busfree condition\n"); ahd_dump_card_state(ahd); ahd_abort_scbs(ahd, SCB_GET_TARGET(ahd, scb), 'A', SCB_GET_LUN(scb), SCB_GET_TAG(scb), @@ -1745,7 +1745,7 @@ ahd_handle_pkt_busfree(struct ahd_softc *ahd, u_int busfreetime) /* Return restarting the sequencer. */ return (1); } - printf("%s: Unexpected PKT busfree condition\n", ahd_name(ahd)); + kprintf("%s: Unexpected PKT busfree condition\n", ahd_name(ahd)); ahd_dump_card_state(ahd); /* Restart the sequencer. */ return (1); @@ -1800,14 +1800,14 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) if (scb == NULL) { ahd_print_devinfo(ahd, &devinfo); - printf("Abort for unidentified " + kprintf("Abort for unidentified " "connection completed.\n"); /* restart the sequencer. */ return (1); } sent_msg = ahd->msgout_buf[ahd->msgout_index - 1]; ahd_print_path(ahd, scb); - printf("SCB %d - Abort%s Completed.\n", + kprintf("SCB %d - Abort%s Completed.\n", SCB_GET_TAG(scb), sent_msg == MSG_ABORT_TAG ? "" : " Tag"); @@ -1833,7 +1833,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) found = ahd_abort_scbs(ahd, target, 'A', saved_lun, tag, ROLE_INITIATOR, CAM_REQ_ABORTED); - printf("found == 0x%x\n", found); + kprintf("found == 0x%x\n", found); printerror = 0; } else if (ahd_sent_msg(ahd, AHDMSG_1B, MSG_BUS_DEV_RESET, TRUE)) { @@ -1865,7 +1865,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) */ #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("PPR negotiation rejected busfree.\n"); + kprintf("PPR negotiation rejected busfree.\n"); #endif tinfo = ahd_fetch_transinfo(ahd, devinfo.channel, devinfo.our_scsiid, @@ -1883,7 +1883,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) */ #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("WDTR negotiation rejected busfree.\n"); + kprintf("WDTR negotiation rejected busfree.\n"); #endif ahd_set_width(ahd, &devinfo, MSG_EXT_WDTR_BUS_8_BIT, @@ -1899,7 +1899,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) */ #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("SDTR negotiation rejected busfree.\n"); + kprintf("SDTR negotiation rejected busfree.\n"); #endif ahd_set_syncrate(ahd, &devinfo, /*period*/0, /*offset*/0, @@ -1914,7 +1914,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("Expected IDE Busfree\n"); + kprintf("Expected IDE Busfree\n"); #endif printerror = 0; } else if ((ahd->msg_flags & MSG_FLAG_EXPECT_QASREJ_BUSFREE) @@ -1923,7 +1923,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("Expected QAS Reject Busfree\n"); + kprintf("Expected QAS Reject Busfree\n"); #endif printerror = 0; } @@ -1949,7 +1949,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) } else { #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("PPR Negotiation Busfree.\n"); + kprintf("PPR Negotiation Busfree.\n"); #endif ahd_done(ahd, scb); } @@ -1976,11 +1976,11 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) * We had not fully identified this connection, * so we cannot abort anything. */ - printf("%s: ", ahd_name(ahd)); + kprintf("%s: ", ahd_name(ahd)); } if (lastphase != P_BUSFREE) ahd_force_renegotiation(ahd, &devinfo); - printf("Unexpected busfree %s, %d SCBs aborted, " + kprintf("Unexpected busfree %s, %d SCBs aborted, " "PRGMCNT == 0x%x\n", ahd_lookup_phase_entry(lastphase)->phasemsg, aborted, @@ -2017,7 +2017,7 @@ ahd_handle_proto_violation(struct ahd_softc *ahd) * to match. */ ahd_print_devinfo(ahd, &devinfo); - printf("Target did not send an IDENTIFY message. " + kprintf("Target did not send an IDENTIFY message. " "LASTPHASE = 0x%x.\n", lastphase); scb = NULL; } else if (scb == NULL) { @@ -2026,13 +2026,13 @@ ahd_handle_proto_violation(struct ahd_softc *ahd) * transaction. Print an error and reset the bus. */ ahd_print_devinfo(ahd, &devinfo); - printf("No SCB found during protocol violation\n"); + kprintf("No SCB found during protocol violation\n"); goto proto_violation_reset; } else { ahd_set_transaction_status(scb, CAM_SEQUENCE_FAIL); if ((seq_flags & NO_CDB_SENT) != 0) { ahd_print_path(ahd, scb); - printf("No or incomplete CDB sent to device.\n"); + kprintf("No or incomplete CDB sent to device.\n"); } else if ((ahd_inb_scbram(ahd, SCB_CONTROL) & STATUS_RCVD) == 0) { /* @@ -2043,10 +2043,10 @@ ahd_handle_proto_violation(struct ahd_softc *ahd) * message. */ ahd_print_path(ahd, scb); - printf("Completed command without status.\n"); + kprintf("Completed command without status.\n"); } else { ahd_print_path(ahd, scb); - printf("Unknown protocol violation.\n"); + kprintf("Unknown protocol violation.\n"); ahd_dump_card_state(ahd); } } @@ -2060,7 +2060,7 @@ proto_violation_reset: * it away with a bus reset. */ found = ahd_reset_channel(ahd, 'A', TRUE); - printf("%s: Issued Channel %c Bus Reset. " + kprintf("%s: Issued Channel %c Bus Reset. " "%d SCBs aborted\n", ahd_name(ahd), 'A', found); } else { /* @@ -2082,7 +2082,7 @@ proto_violation_reset: ahd_print_path(ahd, scb); scb->flags |= SCB_ABORT; } - printf("Protocol violation %s. Attempting to abort.\n", + kprintf("Protocol violation %s. Attempting to abort.\n", ahd_lookup_phase_entry(curphase)->phasemsg); } } @@ -2100,7 +2100,7 @@ ahd_force_renegotiation(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { ahd_print_devinfo(ahd, devinfo); - printf("Forcing renegotiation\n"); + kprintf("Forcing renegotiation\n"); } #endif targ_info = ahd_fetch_transinfo(ahd, @@ -2162,7 +2162,7 @@ ahd_clear_critical_section(struct ahd_softc *ahd) break; if (steps > AHD_MAX_STEPS) { - printf("%s: Infinite loop in critical section\n" + kprintf("%s: Infinite loop in critical section\n" "%s: First Instruction 0x%x now 0x%x\n", ahd_name(ahd), ahd_name(ahd), first_instr, seqaddr); @@ -2173,7 +2173,7 @@ ahd_clear_critical_section(struct ahd_softc *ahd) steps++; #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("%s: Single stepping at 0x%x\n", ahd_name(ahd), + kprintf("%s: Single stepping at 0x%x\n", ahd_name(ahd), seqaddr); #endif if (stepping == FALSE) { @@ -2270,16 +2270,16 @@ ahd_print_scb(struct scb *scb) int i; hscb = scb->hscb; - printf("scb:%p control:0x%x scsiid:0x%x lun:%d cdb_len:%d\n", + kprintf("scb:%p control:0x%x scsiid:0x%x lun:%d cdb_len:%d\n", (void *)scb, hscb->control, hscb->scsiid, hscb->lun, hscb->cdb_len); - printf("Shared Data: "); + kprintf("Shared Data: "); for (i = 0; i < sizeof(hscb->shared_data.idata.cdb); i++) - printf("%#02x", hscb->shared_data.idata.cdb[i]); - printf(" dataptr:%#x%x datacnt:%#x sgptr:%#x tag:%#x\n", + kprintf("%#02x", hscb->shared_data.idata.cdb[i]); + kprintf(" dataptr:%#x%x datacnt:%#x sgptr:%#x tag:%#x\n", (uint32_t)((ahd_le64toh(hscb->dataptr) >> 32) & 0xFFFFFFFF), (uint32_t)(ahd_le64toh(hscb->dataptr) & 0xFFFFFFFF), ahd_le32toh(hscb->datacnt), @@ -2304,7 +2304,7 @@ ahd_dump_sglist(struct scb *scb) addr = ahd_le64toh(sg_list[i].addr); len = ahd_le32toh(sg_list[i].len); - printf("sg[%d] - Addr 0x%x%x : Length %d%s\n", + kprintf("sg[%d] - Addr 0x%x%x : Length %d%s\n", i, (uint32_t)((addr >> 32) & 0xFFFFFFFF), (uint32_t)(addr & 0xFFFFFFFF), @@ -2320,7 +2320,7 @@ ahd_dump_sglist(struct scb *scb) uint32_t len; len = ahd_le32toh(sg_list[i].len); - printf("sg[%d] - Addr 0x%x%x : Length %d%s\n", + kprintf("sg[%d] - Addr 0x%x%x : Length %d%s\n", i, (len >> 24) & SG_HIGH_ADDR_BITS, ahd_le32toh(sg_list[i].addr), @@ -2651,37 +2651,37 @@ ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, if (offset != 0) { int options; - printf("%s: target %d synchronous with " + kprintf("%s: target %d synchronous with " "period = 0x%x, offset = 0x%x", ahd_name(ahd), devinfo->target, period, offset); options = 0; if ((ppr_options & MSG_EXT_PPR_RD_STRM) != 0) { - printf("(RDSTRM"); + kprintf("(RDSTRM"); options++; } if ((ppr_options & MSG_EXT_PPR_DT_REQ) != 0) { - printf("%s", options ? "|DT" : "(DT"); + kprintf("%s", options ? "|DT" : "(DT"); options++; } if ((ppr_options & MSG_EXT_PPR_IU_REQ) != 0) { - printf("%s", options ? "|IU" : "(IU"); + kprintf("%s", options ? "|IU" : "(IU"); options++; } if ((ppr_options & MSG_EXT_PPR_RTI) != 0) { - printf("%s", options ? "|RTI" : "(RTI"); + kprintf("%s", options ? "|RTI" : "(RTI"); options++; } if ((ppr_options & MSG_EXT_PPR_QAS_REQ) != 0) { - printf("%s", options ? "|QAS" : "(QAS"); + kprintf("%s", options ? "|QAS" : "(QAS"); options++; } if (options != 0) - printf(")\n"); + kprintf(")\n"); else - printf("\n"); + kprintf("\n"); } else { - printf("%s: target %d using " + kprintf("%s: target %d using " "asynchronous transfers%s\n", ahd_name(ahd), devinfo->target, (ppr_options & MSG_EXT_PPR_QAS_REQ) != 0 @@ -2709,7 +2709,7 @@ ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { ahd_print_devinfo(ahd, devinfo); - printf("Expecting IU Change busfree\n"); + kprintf("Expecting IU Change busfree\n"); } #endif ahd->msg_flags |= MSG_FLAG_EXPECT_PPR_BUSFREE @@ -2718,7 +2718,7 @@ ahd_set_syncrate(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, if ((old_ppr & MSG_EXT_PPR_IU_REQ) != 0) { #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("PPR with IU_REQ outstanding\n"); + kprintf("PPR with IU_REQ outstanding\n"); #endif ahd->msg_flags |= MSG_FLAG_EXPECT_PPR_BUSFREE; } @@ -2770,7 +2770,7 @@ ahd_set_width(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd_send_async(ahd, devinfo->channel, devinfo->target, CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL); if (bootverbose) { - printf("%s: target %d using %dbit transfers\n", + kprintf("%s: target %d using %dbit transfers\n", ahd_name(ahd), devinfo->target, 8 * (0x01 << width)); } @@ -3029,7 +3029,7 @@ ahd_fetch_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) void ahd_print_devinfo(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) { - printf("%s:%c:%d:%d: ", ahd_name(ahd), 'A', + kprintf("%s:%c:%d:%d: ", ahd_name(ahd), 'A', devinfo->target, devinfo->lun); } @@ -3111,11 +3111,11 @@ ahd_setup_initiator_msgout(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd->msg_type = MSG_TYPE_INITIATOR_MSGOUT; #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("Setting up for Parity Error delivery\n"); + kprintf("Setting up for Parity Error delivery\n"); #endif return; } else if (scb == NULL) { - printf("%s: WARNING. No pending message for " + kprintf("%s: WARNING. No pending message for " "I_T msgin. Issuing NO-OP\n", ahd_name(ahd)); ahd->msgout_buf[ahd->msgout_index++] = MSG_NOOP; ahd->msgout_len++; @@ -3146,7 +3146,7 @@ ahd_setup_initiator_msgout(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd->msgout_buf[ahd->msgout_index++] = MSG_BUS_DEV_RESET; ahd->msgout_len++; ahd_print_path(ahd, scb); - printf("Bus Device Reset Message Sent\n"); + kprintf("Bus Device Reset Message Sent\n"); /* * Clear our selection hardware in advance of * the busfree. We may have an entry in the waiting @@ -3164,7 +3164,7 @@ ahd_setup_initiator_msgout(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, } ahd->msgout_len++; ahd_print_path(ahd, scb); - printf("Abort%s Message Sent\n", + kprintf("Abort%s Message Sent\n", (scb->hscb->control & TAG_ENB) != 0 ? " Tag" : ""); /* * Clear our selection hardware in advance of @@ -3185,9 +3185,9 @@ ahd_setup_initiator_msgout(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, */ ahd_outb(ahd, SCSISEQ0, 0); } else { - printf("ahd_intr: AWAITING_MSG for an SCB that " + kprintf("ahd_intr: AWAITING_MSG for an SCB that " "does not have a waiting message\n"); - printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid, + kprintf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid, devinfo->target_mask); panic("SCB = %d, SCB Control = %x:%x, MSG_OUT = %x " "SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control, @@ -3269,7 +3269,7 @@ ahd_build_transfer_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) if (bootverbose) { ahd_print_devinfo(ahd, devinfo); - printf("Ensuring async\n"); + kprintf("Ensuring async\n"); } } /* Target initiated PPR is not allowed in the SCSI spec */ @@ -3319,7 +3319,7 @@ ahd_construct_sdtr(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd->msgout_buf[ahd->msgout_index++] = offset; ahd->msgout_len += 5; if (bootverbose) { - printf("(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n", + kprintf("(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, period, offset); } @@ -3339,7 +3339,7 @@ ahd_construct_wdtr(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd->msgout_buf[ahd->msgout_index++] = bus_width; ahd->msgout_len += 4; if (bootverbose) { - printf("(%s:%c:%d:%d): Sending WDTR %x\n", + kprintf("(%s:%c:%d:%d): Sending WDTR %x\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, bus_width); } @@ -3373,7 +3373,7 @@ ahd_construct_ppr(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, ahd->msgout_buf[ahd->msgout_index++] = ppr_options; ahd->msgout_len += 8; if (bootverbose) { - printf("(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, " + kprintf("(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, " "offset %x, ppr_options %x\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, bus_width, period, offset, ppr_options); @@ -3423,7 +3423,7 @@ ahd_handle_message_phase(struct ahd_softc *ahd) bus_phase = ahd_inb(ahd, LASTPHASE); if ((ahd_inb(ahd, LQISTAT2) & LQIPHASE_OUTPKT) != 0) { - printf("LQIRETRY for LQIPHASE_OUTPKT\n"); + kprintf("LQIRETRY for LQIPHASE_OUTPKT\n"); ahd_outb(ahd, LQCTL2, LQIRETRY); } reswitch: @@ -3440,14 +3440,14 @@ reswitch: #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { ahd_print_devinfo(ahd, &devinfo); - printf("INITIATOR_MSG_OUT"); + kprintf("INITIATOR_MSG_OUT"); } #endif phasemis = bus_phase != P_MESGOUT; if (phasemis) { #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { - printf(" PHASEMIS %s\n", + kprintf(" PHASEMIS %s\n", ahd_lookup_phase_entry(bus_phase) ->phasemsg); } @@ -3474,7 +3474,7 @@ reswitch: ahd_outb(ahd, CLRSINT1, CLRREQINIT); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf(" byte 0x%x\n", ahd->send_msg_perror); + kprintf(" byte 0x%x\n", ahd->send_msg_perror); #endif /* * If we are notifying the target of a CRC error @@ -3515,7 +3515,7 @@ reswitch: ahd_outb(ahd, CLRSINT1, CLRREQINIT); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf(" byte 0x%x\n", + kprintf(" byte 0x%x\n", ahd->msgout_buf[ahd->msgout_index]); #endif ahd_outb(ahd, RETURN_2, ahd->msgout_buf[ahd->msgout_index++]); @@ -3530,14 +3530,14 @@ reswitch: #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { ahd_print_devinfo(ahd, &devinfo); - printf("INITIATOR_MSG_IN"); + kprintf("INITIATOR_MSG_IN"); } #endif phasemis = bus_phase != P_MESGIN; if (phasemis) { #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { - printf(" PHASEMIS %s\n", + kprintf(" PHASEMIS %s\n", ahd_lookup_phase_entry(bus_phase) ->phasemsg); } @@ -3558,7 +3558,7 @@ reswitch: ahd->msgin_buf[ahd->msgin_index] = ahd_inb(ahd, SCSIBUS); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf(" byte 0x%x\n", + kprintf(" byte 0x%x\n", ahd->msgin_buf[ahd->msgin_index]); #endif @@ -3580,7 +3580,7 @@ reswitch: #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) { ahd_print_devinfo(ahd, &devinfo); - printf("Asserting ATN for response\n"); + kprintf("Asserting ATN for response\n"); } #endif ahd_assert_atn(ahd); @@ -3728,7 +3728,7 @@ reswitch: if (end_session) { if ((ahd->msg_flags & MSG_FLAG_PACKETIZED) != 0) { - printf("%s: Returning to Idle Loop\n", + kprintf("%s: Returning to Idle Loop\n", ahd_name(ahd)); ahd_outb(ahd, LASTPHASE, P_BUSFREE); ahd_clear_msg_state(ahd); @@ -3875,7 +3875,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) ahd_validate_offset(ahd, tinfo, period, &offset, tinfo->curr.width, devinfo->role); if (bootverbose) { - printf("(%s:%c:%d:%d): Received " + kprintf("(%s:%c:%d:%d): Received " "SDTR period %x, offset %x\n\t" "Filtered to period %x, offset %x\n", ahd_name(ahd), devinfo->channel, @@ -3905,7 +3905,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) */ if (bootverbose && devinfo->role == ROLE_INITIATOR) { - printf("(%s:%c:%d:%d): Target " + kprintf("(%s:%c:%d:%d): Target " "Initiated SDTR\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); @@ -3947,7 +3947,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) ahd_validate_width(ahd, tinfo, &bus_width, devinfo->role); if (bootverbose) { - printf("(%s:%c:%d:%d): Received WDTR " + kprintf("(%s:%c:%d:%d): Received WDTR " "%x filtered to %x\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, @@ -3963,7 +3963,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) */ if (saved_width > bus_width) { reject = TRUE; - printf("(%s:%c:%d:%d): requested %dBit " + kprintf("(%s:%c:%d:%d): requested %dBit " "transfers. Rejecting...\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, @@ -3976,7 +3976,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) */ if (bootverbose && devinfo->role == ROLE_INITIATOR) { - printf("(%s:%c:%d:%d): Target " + kprintf("(%s:%c:%d:%d): Target " "Initiated WDTR\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); @@ -4088,12 +4088,12 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) } } else { if (devinfo->role != ROLE_TARGET) - printf("(%s:%c:%d:%d): Target " + kprintf("(%s:%c:%d:%d): Target " "Initiated PPR\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); else - printf("(%s:%c:%d:%d): Initiator " + kprintf("(%s:%c:%d:%d): Initiator " "Initiated PPR\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); @@ -4105,7 +4105,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) response = TRUE; } if (bootverbose) { - printf("(%s:%c:%d:%d): Received PPR width %x, " + kprintf("(%s:%c:%d:%d): Received PPR width %x, " "period %x, offset %x,options %x\n" "\tFiltered to width %x, period %x, " "offset %x, options %x\n", @@ -4181,7 +4181,7 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) case MSG_QAS_REQUEST: #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MESSAGES) != 0) - printf("%s: QAS request. SCSISIGI == 0x%x\n", + kprintf("%s: QAS request. SCSISIGI == 0x%x\n", ahd_name(ahd), ahd_inb(ahd, SCSISIGI)); #endif ahd->msg_flags |= MSG_FLAG_EXPECT_QASREJ_BUSFREE; @@ -4246,7 +4246,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) * off these options. */ if (bootverbose) { - printf("(%s:%c:%d:%d): PPR Rejected. " + kprintf("(%s:%c:%d:%d): PPR Rejected. " "Trying simple U160 PPR\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); @@ -4261,7 +4261,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) * Attempt to negotiate SPI-2 style. */ if (bootverbose) { - printf("(%s:%c:%d:%d): PPR Rejected. " + kprintf("(%s:%c:%d:%d): PPR Rejected. " "Trying WDTR/SDTR\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); @@ -4278,7 +4278,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) } else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, /*full*/FALSE)) { /* note 8bit xfers */ - printf("(%s:%c:%d:%d): refuses WIDE negotiation. Using " + kprintf("(%s:%c:%d:%d): refuses WIDE negotiation. Using " "8bit transfers\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); ahd_set_width(ahd, devinfo, MSG_EXT_WDTR_BUS_8_BIT, @@ -4306,7 +4306,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) /*offset*/0, /*ppr_options*/0, AHD_TRANS_ACTIVE|AHD_TRANS_GOAL, /*paused*/TRUE); - printf("(%s:%c:%d:%d): refuses synchronous negotiation. " + kprintf("(%s:%c:%d:%d): refuses synchronous negotiation. " "Using asynchronous transfers\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); @@ -4317,13 +4317,13 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) tag_type = (scb->hscb->control & MSG_SIMPLE_TASK); if (tag_type == MSG_SIMPLE_TASK) { - printf("(%s:%c:%d:%d): refuses tagged commands. " + kprintf("(%s:%c:%d:%d): refuses tagged commands. " "Performing non-tagged I/O\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun); ahd_set_tags(ahd, devinfo, AHD_QUEUE_NONE); mask = ~0x23; } else { - printf("(%s:%c:%d:%d): refuses %s tagged commands. " + kprintf("(%s:%c:%d:%d): refuses %s tagged commands. " "Performing simple queue tagged I/O only\n", ahd_name(ahd), devinfo->channel, devinfo->target, devinfo->lun, tag_type == MSG_ORDERED_TASK @@ -4374,7 +4374,7 @@ ahd_handle_msg_reject(struct ahd_softc *ahd, struct ahd_devinfo *devinfo) /* * Otherwise, we ignore it. */ - printf("%s:%c:%d: Message reject for %x -- ignored\n", + kprintf("%s:%c:%d: Message reject for %x -- ignored\n", ahd_name(ahd), devinfo->channel, devinfo->target, last_msg); } @@ -4560,7 +4560,7 @@ ahd_reinitialize_dataptrs(struct ahd_softc *ahd) } while (--wait && !(ahd_inb(ahd, MDFFSTAT) & FIFOFREE)); if (wait == 0) { ahd_print_path(ahd, scb); - printf("ahd_reinitialize_dataptrs: Forcing FIFO free.\n"); + kprintf("ahd_reinitialize_dataptrs: Forcing FIFO free.\n"); ahd_outb(ahd, DFFSXFRCTL, RSTCHN|CLRSHCNT); } saved_modes = ahd_save_modes(ahd); @@ -4682,7 +4682,7 @@ ahd_handle_devreset(struct ahd_softc *ahd, struct ahd_devinfo *devinfo, if (message != NULL && (verbose_level <= bootverbose)) - printf("%s: %s on %c:%d. %d SCBs aborted\n", ahd_name(ahd), + kprintf("%s: %s on %c:%d. %d SCBs aborted\n", ahd_name(ahd), message, devinfo->channel, devinfo->target, found); } @@ -4811,7 +4811,7 @@ ahd_alloc(void *platform_arg, char *name) } #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MEMORY) != 0) { - printf("%s: scb size = 0x%x, hscb size = 0x%x\n", + kprintf("%s: scb size = 0x%x, hscb size = 0x%x\n", ahd_name(ahd), (u_int)sizeof(struct scb), (u_int)sizeof(struct hardware_scb)); } @@ -5060,7 +5060,7 @@ ahd_reset(struct ahd_softc *ahd, int reinit) } while (--wait && !(ahd_inb(ahd, HCNTRL) & CHIPRSTACK)); if (wait == 0) { - printf("%s: WARNING - Failed chip reset! " + kprintf("%s: WARNING - Failed chip reset! " "Trying to initialize anyway.\n", ahd_name(ahd)); } ahd_outb(ahd, HCNTRL, ahd->pause); @@ -5182,7 +5182,7 @@ ahd_init_scbdata(struct ahd_softc *ahd) /* Determine the number of hardware SCBs and initialize them */ scb_data->maxhscbs = ahd_probe_scbs(ahd); if (scb_data->maxhscbs == 0) { - printf("%s: No SCB space found\n", ahd_name(ahd)); + kprintf("%s: No SCB space found\n", ahd_name(ahd)); return (ENXIO); } @@ -5225,7 +5225,7 @@ ahd_init_scbdata(struct ahd_softc *ahd) } #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MEMORY) != 0) - printf("%s: ahd_sglist_allocsize = 0x%x\n", ahd_name(ahd), + kprintf("%s: ahd_sglist_allocsize = 0x%x\n", ahd_name(ahd), ahd_sglist_allocsize(ahd)); #endif @@ -5249,7 +5249,7 @@ ahd_init_scbdata(struct ahd_softc *ahd) ahd_alloc_scbs(ahd); if (scb_data->numscbs == 0) { - printf("%s: ahd_init_scbdata - " + kprintf("%s: ahd_init_scbdata - " "Unable to allocate initial scbs\n", ahd_name(ahd)); goto error_exit; @@ -5384,7 +5384,7 @@ ahd_setup_iocell_workaround(struct ahd_softc *ahd) ahd_outb(ahd, SIMODE0, ahd_inb(ahd, SIMODE0) | (ENSELDO|ENSELDI)); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("%s: Setting up iocell workaround\n", ahd_name(ahd)); + kprintf("%s: Setting up iocell workaround\n", ahd_name(ahd)); #endif ahd_restore_modes(ahd, saved_modes); } @@ -5401,14 +5401,14 @@ ahd_iocell_first_selection(struct ahd_softc *ahd) ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("%s: iocell first selection\n", ahd_name(ahd)); + kprintf("%s: iocell first selection\n", ahd_name(ahd)); #endif if ((sblkctl & ENAB40) != 0) { ahd_outb(ahd, DSPDATACTL, ahd_inb(ahd, DSPDATACTL) & ~BYPASSENAB); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("%s: BYPASS now disabled\n", ahd_name(ahd)); + kprintf("%s: BYPASS now disabled\n", ahd_name(ahd)); #endif } ahd_outb(ahd, SIMODE0, ahd_inb(ahd, SIMODE0) & ~(ENSELDO|ENSELDI)); @@ -5642,7 +5642,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) ahd_sglist_allocsize(ahd) / ahd_sglist_size(ahd); #ifdef AHD_DEBUG if (ahd_debug & AHD_SHOW_MEMORY) - printf("Mapped SG data\n"); + kprintf("Mapped SG data\n"); #endif } @@ -5675,7 +5675,7 @@ ahd_alloc_scbs(struct ahd_softc *ahd) scb_data->sense_left = PAGE_SIZE / AHD_SENSE_BUFSIZE; #ifdef AHD_DEBUG if (ahd_debug & AHD_SHOW_MEMORY) - printf("Mapped sense data\n"); + kprintf("Mapped sense data\n"); #endif } @@ -5941,20 +5941,20 @@ ahd_init(struct ahd_softc *ahd) error = ahd_write_flexport(ahd, FLXADDR_ROMSTAT_CURSENSECTL, CURSENSE_ENB); if (error != 0) { - printf("%s: current sensing timeout 1\n", ahd_name(ahd)); + kprintf("%s: current sensing timeout 1\n", ahd_name(ahd)); goto init_done; } for (i = 20, fstat = FLX_FSTAT_BUSY; (fstat & FLX_FSTAT_BUSY) != 0 && i; i--) { error = ahd_read_flexport(ahd, FLXADDR_FLEXSTAT, &fstat); if (error != 0) { - printf("%s: current sensing timeout 2\n", + kprintf("%s: current sensing timeout 2\n", ahd_name(ahd)); goto init_done; } } if (i == 0) { - printf("%s: Timedout during current-sensing test\n", + kprintf("%s: Timedout during current-sensing test\n", ahd_name(ahd)); goto init_done; } @@ -5962,7 +5962,7 @@ ahd_init(struct ahd_softc *ahd) /* Latch Current Sensing status. */ error = ahd_read_flexport(ahd, FLXADDR_CURRENT_STAT, ¤t_sensing); if (error != 0) { - printf("%s: current sensing timeout 3\n", ahd_name(ahd)); + kprintf("%s: current sensing timeout 3\n", ahd_name(ahd)); goto init_done; } @@ -5971,7 +5971,7 @@ ahd_init(struct ahd_softc *ahd) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_TERMCTL) != 0) { - printf("%s: current_sensing == 0x%x\n", + kprintf("%s: current_sensing == 0x%x\n", ahd_name(ahd), current_sensing); } #endif @@ -5988,13 +5988,13 @@ ahd_init(struct ahd_softc *ahd) case FLX_CSTAT_OKAY: if (warn_user == 0 && bootverbose == 0) break; - printf("%s: %s Channel %s\n", ahd_name(ahd), + kprintf("%s: %s Channel %s\n", ahd_name(ahd), channel_strings[i], termstat_strings[term_stat]); break; } } if (warn_user) { - printf("%s: WARNING. Termination is not configured correctly.\n" + kprintf("%s: WARNING. Termination is not configured correctly.\n" "%s: WARNING. SCSI bus operations may FAIL.\n", ahd_name(ahd), ahd_name(ahd)); } @@ -6110,7 +6110,7 @@ ahd_chip_init(struct ahd_softc *ahd) } #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("%s: WRTBIASCTL now 0x%x\n", ahd_name(ahd), + kprintf("%s: WRTBIASCTL now 0x%x\n", ahd_name(ahd), WRTBIASCTL_HP_DEFAULT); #endif } @@ -6351,7 +6351,7 @@ ahd_default_config(struct ahd_softc *ahd) * data for any target mode initiator. */ if (ahd_alloc_tstate(ahd, ahd->our_id, 'A') == NULL) { - printf("%s: unable to allocate ahd_tmode_tstate. " + kprintf("%s: unable to allocate ahd_tmode_tstate. " "Failing attach\n", ahd_name(ahd)); return (ENOMEM); } @@ -6430,7 +6430,7 @@ ahd_parse_cfgdata(struct ahd_softc *ahd, struct seeprom_config *sc) * data for any target mode initiator. */ if (ahd_alloc_tstate(ahd, ahd->our_id, 'A') == NULL) { - printf("%s: unable to allocate ahd_tmode_tstate. " + kprintf("%s: unable to allocate ahd_tmode_tstate. " "Failing attach\n", ahd_name(ahd)); return (ENOMEM); } @@ -6500,7 +6500,7 @@ ahd_parse_cfgdata(struct ahd_softc *ahd, struct seeprom_config *sc) user_tinfo->width = MSG_EXT_WDTR_BUS_8_BIT; #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) - printf("(%d): %x:%x:%x:%x\n", targ, user_tinfo->width, + kprintf("(%d): %x:%x:%x:%x\n", targ, user_tinfo->width, user_tinfo->period, user_tinfo->offset, user_tinfo->ppr_options); #endif @@ -6665,12 +6665,12 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd) || (ahd_inb(ahd, SSTAT0) & (SELDO|SELINGO)) != 0)); if (maxloops == 0) { - printf("Infinite interrupt loop, INTSTAT = %x", + kprintf("Infinite interrupt loop, INTSTAT = %x", ahd_inb(ahd, INTSTAT)); } qfreeze_cnt = ahd_inw(ahd, QFREEZE_COUNT); if (qfreeze_cnt == 0) { - printf("%s: ahd_pause_and_flushwork with 0 qfreeze count!\n", + kprintf("%s: ahd_pause_and_flushwork with 0 qfreeze count!\n", ahd_name(ahd)); } else { qfreeze_cnt--; @@ -6950,7 +6950,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, prev_scb = NULL; if (action == SEARCH_PRINT) { - printf("qinstart = %d qinfifonext = %d\nQINFIFO:", + kprintf("qinstart = %d qinfifonext = %d\nQINFIFO:", qinstart, ahd->qinfifonext); } @@ -6968,7 +6968,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, while (qinpos != qintail) { scb = ahd_lookup_scb(ahd, ahd->qinfifo[qinpos]); if (scb == NULL) { - printf("qinpos = %d, SCB index = %d\n", + kprintf("qinpos = %d, SCB index = %d\n", qinpos, ahd->qinfifo[qinpos]); panic("Loop 1\n"); } @@ -6992,7 +6992,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, if (cstat != CAM_REQ_CMP) ahd_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB in qinfifo\n"); + kprintf("Inactive SCB in qinfifo\n"); ahd_done(ahd, scb); /* FALLTHROUGH */ @@ -7000,7 +7000,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, case SEARCH_REMOVE: break; case SEARCH_PRINT: - printf(" 0x%x", ahd->qinfifo[qinpos]); + kprintf(" 0x%x", ahd->qinfifo[qinpos]); /* FALLTHROUGH */ case SEARCH_COUNT: ahd_qinfifo_requeue(ahd, prev_scb, scb); @@ -7017,7 +7017,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, ahd_set_hnscb_qoff(ahd, ahd->qinfifonext); if (action == SEARCH_PRINT) - printf("\nWAITING_TID_QUEUES:\n"); + kprintf("\nWAITING_TID_QUEUES:\n"); /* * Search waiting for selection lists. We traverse the @@ -7041,7 +7041,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, panic("TID LIST LOOP"); } if (scbid >= ahd->scb_data.numscbs) { - printf("%s: Waiting TID List inconsistency. " + kprintf("%s: Waiting TID List inconsistency. " "SCB index == 0x%x, yet numscbs == 0x%x.", ahd_name(ahd), scbid, ahd->scb_data.numscbs); ahd_dump_card_state(ahd); @@ -7049,7 +7049,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, } scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: SCB = 0x%x Not Active!\n", + kprintf("%s: SCB = 0x%x Not Active!\n", ahd_name(ahd), scbid); panic("Waiting TID List traversal\n"); } @@ -7065,7 +7065,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, * We found a list of scbs that needs to be searched. */ if (action == SEARCH_PRINT) - printf(" %d ( ", SCB_GET_TARGET(ahd, scb)); + kprintf(" %d ( ", SCB_GET_TARGET(ahd, scb)); tid_head = scbid; found += ahd_search_scb_list(ahd, target, channel, lun, tag, role, status, @@ -7076,7 +7076,7 @@ ahd_search_qinfifo(struct ahd_softc *ahd, int target, char channel, if (!SCBID_IS_NULL(tid_head)) tid_prev = tid_head; if (action == SEARCH_PRINT) - printf(")\n"); + kprintf(")\n"); } ahd_set_scbptr(ahd, savedscbptr); ahd_restore_modes(ahd, saved_modes); @@ -7100,7 +7100,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, next = *list_head; for (scbid = next; !SCBID_IS_NULL(scbid); scbid = next) { if (scbid >= ahd->scb_data.numscbs) { - printf("%s:SCB List inconsistency. " + kprintf("%s:SCB List inconsistency. " "SCB == 0x%x, yet numscbs == 0x%x.", ahd_name(ahd), scbid, ahd->scb_data.numscbs); ahd_dump_card_state(ahd); @@ -7108,7 +7108,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, } scb = ahd_lookup_scb(ahd, scbid); if (scb == NULL) { - printf("%s: SCB = %d Not Active!\n", + kprintf("%s: SCB = %d Not Active!\n", ahd_name(ahd), scbid); panic("Waiting List traversal\n"); } @@ -7133,7 +7133,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, if (cstat != CAM_REQ_CMP) ahd_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB in Waiting List\n"); + kprintf("Inactive SCB in Waiting List\n"); ahd_done(ahd, scb); /* FALLTHROUGH */ } @@ -7143,7 +7143,7 @@ ahd_search_scb_list(struct ahd_softc *ahd, int target, char channel, *list_head = next; break; case SEARCH_PRINT: - printf("0x%x ", scbid); + kprintf("0x%x ", scbid); case SEARCH_COUNT: prev = scbid; break; @@ -7328,7 +7328,7 @@ ahd_abort_scbs(struct ahd_softc *ahd, int target, char channel, if (ahd_get_transaction_status(scbp) != CAM_REQ_CMP) ahd_freeze_scb(scbp); if ((scbp->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB on pending list\n"); + kprintf("Inactive SCB on pending list\n"); ahd_done(ahd, scbp); found++; } @@ -7533,7 +7533,7 @@ ahd_reset_poll(void *arg) ahd_list_lock(&l); ahd = ahd_find_softc((struct ahd_softc *)arg); if (ahd == NULL) { - printf("ahd_reset_poll: Instance %p no longer exists\n", arg); + kprintf("ahd_reset_poll: Instance %p no longer exists\n", arg); ahd_list_unlock(&l); return; } @@ -7574,7 +7574,7 @@ ahd_stat_timer(void *arg) ahd_list_lock(&l); ahd = ahd_find_softc((struct ahd_softc *)arg); if (ahd == NULL) { - printf("ahd_stat_timer: Instance %p no longer exists\n", arg); + kprintf("ahd_stat_timer: Instance %p no longer exists\n", arg); ahd_list_unlock(&l); return; } @@ -7590,7 +7590,7 @@ ahd_stat_timer(void *arg) ahd_enable_coalescing(ahd, enint_coal); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_INT_COALESCING) != 0) - printf("%s: Interrupt coalescing " + kprintf("%s: Interrupt coalescing " "now %sabled. Cmds %d\n", ahd_name(ahd), (enint_coal & ENINT_COALESCE) ? "en" : "dis", @@ -7638,7 +7638,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) ahd_freeze_scb(scb); qfreeze_cnt = ahd_inw(ahd, QFREEZE_COUNT); if (qfreeze_cnt == 0) { - printf("%s: Bad status with 0 qfreeze count!\n", ahd_name(ahd)); + kprintf("%s: Bad status with 0 qfreeze count!\n", ahd_name(ahd)); } else { qfreeze_cnt--; ahd_outw(ahd, QFREEZE_COUNT, qfreeze_cnt); @@ -7671,9 +7671,9 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_SENSE) != 0) { ahd_print_path(ahd, scb); - printf("SCB 0x%x Received PKT Status of 0x%x\n", + kprintf("SCB 0x%x Received PKT Status of 0x%x\n", SCB_GET_TAG(scb), siu->status); - printf("\tflags = 0x%x, sense len = 0x%x, " + kprintf("\tflags = 0x%x, sense len = 0x%x, " "pktfail = 0x%x\n", siu->flags, scsi_4btoul(siu->sense_length), scsi_4btoul(siu->pkt_failures_length)); @@ -7682,27 +7682,27 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) if ((siu->flags & SIU_RSPVALID) != 0) { ahd_print_path(ahd, scb); if (scsi_4btoul(siu->pkt_failures_length) < 4) { - printf("Unable to parse pkt_failures\n"); + kprintf("Unable to parse pkt_failures\n"); } else { switch (SIU_PKTFAIL_CODE(siu)) { case SIU_PFC_NONE: - printf("No packet failure found\n"); + kprintf("No packet failure found\n"); break; case SIU_PFC_CIU_FIELDS_INVALID: - printf("Invalid Command IU Field\n"); + kprintf("Invalid Command IU Field\n"); break; case SIU_PFC_TMF_NOT_SUPPORTED: - printf("TMF not supportd\n"); + kprintf("TMF not supportd\n"); break; case SIU_PFC_TMF_FAILED: - printf("TMF failed\n"); + kprintf("TMF failed\n"); break; case SIU_PFC_INVALID_TYPE_CODE: - printf("Invalid L_Q Type code\n"); + kprintf("Invalid L_Q Type code\n"); break; case SIU_PFC_ILLEGAL_REQUEST: - printf("Illegal request\n"); + kprintf("Illegal request\n"); default: break; } @@ -7715,7 +7715,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) scb->flags |= SCB_PKT_SENSE; #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_SENSE) != 0) - printf("Sense data available\n"); + kprintf("Sense data available\n"); #endif } ahd_done(ahd, scb); @@ -7733,7 +7733,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) #ifdef AHD_DEBUG if (ahd_debug & AHD_SHOW_SENSE) { ahd_print_path(ahd, scb); - printf("SCB %d: requests Check Status\n", + kprintf("SCB %d: requests Check Status\n", SCB_GET_TAG(scb)); } #endif @@ -7761,7 +7761,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) #ifdef AHD_DEBUG if (ahd_debug & AHD_SHOW_SENSE) { ahd_print_path(ahd, scb); - printf("Sending Sense\n"); + kprintf("Sending Sense\n"); } #endif scb->sg_count = 0; @@ -7818,7 +7818,7 @@ ahd_handle_scsi_status(struct ahd_softc *ahd, struct scb *scb) break; } case SCSI_STATUS_OK: - printf("%s: Interrupted for staus of 0???\n", + kprintf("%s: Interrupted for staus of 0???\n", ahd_name(ahd)); /* FALLTHROUGH */ default: @@ -7882,7 +7882,7 @@ ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb) return; } else if ((resid_sgptr & SG_OVERRUN_RESID) != 0) { ahd_print_path(ahd, scb); - printf("data overrun detected Tag == 0x%x.\n", + kprintf("data overrun detected Tag == 0x%x.\n", SCB_GET_TAG(scb)); ahd_freeze_devq(ahd, scb); ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR); @@ -7922,7 +7922,7 @@ ahd_calc_residual(struct ahd_softc *ahd, struct scb *scb) #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MISC) != 0) { ahd_print_path(ahd, scb); - printf("Handled %sResidual of %d bytes\n", + kprintf("Handled %sResidual of %d bytes\n", (scb->flags & SCB_SENSE) ? "Sense " : "", resid); } #endif @@ -7962,7 +7962,7 @@ ahd_queue_lstate_event(struct ahd_softc *ahd, struct ahd_tmode_lstate *lstate, if (pending == AHD_TMODE_EVENT_BUFFER_SIZE) { xpt_print_path(lstate->path); - printf("immediate event %x:%x lost\n", + kprintf("immediate event %x:%x lost\n", lstate->event_buffer[lstate->event_r_idx].event_type, lstate->event_buffer[lstate->event_r_idx].event_arg); lstate->event_r_idx++; @@ -8035,7 +8035,7 @@ ahd_dumpseq(struct ahd_softc* ahd) uint8_t ins_bytes[4]; ahd_insb(ahd, SEQRAM, ins_bytes, 4); - printf("0x%08x\n", ins_bytes[0] << 24 + kprintf("0x%08x\n", ins_bytes[0] << 24 | ins_bytes[1] << 16 | ins_bytes[2] << 8 | ins_bytes[3]); @@ -8062,7 +8062,7 @@ ahd_loadseq(struct ahd_softc *ahd) uint8_t download_consts[DOWNLOAD_CONST_COUNT]; if (bootverbose) - printf("%s: Downloading Sequencer Program...", + kprintf("%s: Downloading Sequencer Program...", ahd_name(ahd)); #if DOWNLOAD_CONST_COUNT != 7 @@ -8190,8 +8190,8 @@ ahd_loadseq(struct ahd_softc *ahd) ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS|FASTMODE); if (bootverbose) { - printf(" %d instructions downloaded\n", downloaded); - printf("%s: Features 0x%x, Bugs 0x%x, Flags 0x%x\n", + kprintf(" %d instructions downloaded\n", downloaded); + kprintf("%s: Features 0x%x, Bugs 0x%x, Flags 0x%x\n", ahd_name(ahd), ahd->features, ahd->bugs, ahd->flags); } } @@ -8384,12 +8384,12 @@ ahd_print_register(ahd_reg_parse_entry_t *table, u_int num_entries, u_int printed_mask; if (cur_column != NULL && *cur_column >= wrap_point) { - printf("\n"); + kprintf("\n"); *cur_column = 0; } - printed = printf("%s[0x%x]", name, value); + printed = kprintf("%s[0x%x]", name, value); if (table == NULL) { - printed += printf(" "); + printed += kprintf(" "); *cur_column += printed; return (printed); } @@ -8404,7 +8404,7 @@ ahd_print_register(ahd_reg_parse_entry_t *table, u_int num_entries, == table[entry].mask)) continue; - printed += printf("%s%s", + printed += kprintf("%s%s", printed_mask == 0 ? ":(" : "|", table[entry].name); printed_mask |= table[entry].mask; @@ -8415,9 +8415,9 @@ ahd_print_register(ahd_reg_parse_entry_t *table, u_int num_entries, break; } if (printed_mask != 0) - printed += printf(") "); + printed += kprintf(") "); else - printed += printf(" "); + printed += kprintf(" "); if (cur_column != NULL) *cur_column += printed; return (printed); @@ -8443,14 +8443,14 @@ ahd_dump_card_state(struct ahd_softc *ahd) } saved_modes = ahd_save_modes(ahd); ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); - printf(">>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<\n" + kprintf(">>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<\n" "%s: Dumping Card State at program address 0x%x Mode 0x%x\n", ahd_name(ahd), ahd_inb(ahd, CURADDR) | (ahd_inb(ahd, CURADDR+1) << 8), ahd_build_mode_state(ahd, ahd->saved_src_mode, ahd->saved_dst_mode)); if (paused) - printf("Card was paused\n"); + kprintf("Card was paused\n"); /* * Mode independent registers. */ @@ -8482,8 +8482,8 @@ ahd_dump_card_state(struct ahd_softc *ahd) ahd_lqostat0_print(ahd_inb(ahd, LQOSTAT0), &cur_col, 50); ahd_lqostat1_print(ahd_inb(ahd, LQOSTAT1), &cur_col, 50); ahd_lqostat2_print(ahd_inb(ahd, LQOSTAT2), &cur_col, 50); - printf("\n"); - printf("\nSCB Count = %d CMDS_PENDING = %d LASTSCB 0x%x " + kprintf("\n"); + kprintf("\nSCB Count = %d CMDS_PENDING = %d LASTSCB 0x%x " "CURRSCB 0x%x NEXTSCB 0x%x\n", ahd->scb_data.numscbs, ahd_inw(ahd, CMDS_PENDING), ahd_inw(ahd, LASTSCB), ahd_inw(ahd, CURRSCB), @@ -8494,27 +8494,27 @@ ahd_dump_card_state(struct ahd_softc *ahd) CAM_LUN_WILDCARD, SCB_LIST_NULL, ROLE_UNKNOWN, /*status*/0, SEARCH_PRINT); saved_scb_index = ahd_get_scbptr(ahd); - printf("Pending list:"); + kprintf("Pending list:"); i = 0; LIST_FOREACH(scb, &ahd->pending_scbs, pending_links) { if (i++ > AHD_SCB_MAX) break; - cur_col = printf("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb), + cur_col = kprintf("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb), ahd_inb(ahd, SCB_FIFO_USE_COUNT)); ahd_set_scbptr(ahd, SCB_GET_TAG(scb)); ahd_scb_control_print(ahd_inb(ahd, SCB_CONTROL), &cur_col, 60); ahd_scb_scsiid_print(ahd_inb(ahd, SCB_SCSIID), &cur_col, 60); } - printf("\nTotal %d\n", i); + kprintf("\nTotal %d\n", i); - printf("Kernel Free SCB list: "); + kprintf("Kernel Free SCB list: "); i = 0; TAILQ_FOREACH(scb, &ahd->scb_data.free_scbs, links.tqe) { struct scb *list_scb; list_scb = scb; do { - printf("%d ", SCB_GET_TAG(list_scb)); + kprintf("%d ", SCB_GET_TAG(list_scb)); list_scb = LIST_NEXT(list_scb, collision_links); } while (list_scb && i++ < AHD_SCB_MAX); } @@ -8522,40 +8522,40 @@ ahd_dump_card_state(struct ahd_softc *ahd) LIST_FOREACH(scb, &ahd->scb_data.any_dev_free_scb_list, links.le) { if (i++ > AHD_SCB_MAX) break; - printf("%d ", SCB_GET_TAG(scb)); + kprintf("%d ", SCB_GET_TAG(scb)); } - printf("\n"); + kprintf("\n"); - printf("Sequencer Complete DMA-inprog list: "); + kprintf("Sequencer Complete DMA-inprog list: "); scb_index = ahd_inw(ahd, COMPLETE_SCB_DMAINPROG_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printf("%d ", scb_index); + kprintf("%d ", scb_index); scb_index = ahd_inw(ahd, SCB_NEXT_COMPLETE); } - printf("\n"); + kprintf("\n"); - printf("Sequencer Complete list: "); + kprintf("Sequencer Complete list: "); scb_index = ahd_inw(ahd, COMPLETE_SCB_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printf("%d ", scb_index); + kprintf("%d ", scb_index); scb_index = ahd_inw(ahd, SCB_NEXT_COMPLETE); } - printf("\n"); + kprintf("\n"); - printf("Sequencer DMA-Up and Complete list: "); + kprintf("Sequencer DMA-Up and Complete list: "); scb_index = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD); i = 0; while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) { ahd_set_scbptr(ahd, scb_index); - printf("%d ", scb_index); + kprintf("%d ", scb_index); scb_index = ahd_inw(ahd, SCB_NEXT_COMPLETE); } - printf("\n"); + kprintf("\n"); ahd_set_scbptr(ahd, saved_scb_index); dffstat = ahd_inb(ahd, DFFSTAT); for (i = 0; i < 2; i++) { @@ -8566,7 +8566,7 @@ ahd_dump_card_state(struct ahd_softc *ahd) ahd_set_modes(ahd, AHD_MODE_DFF0 + i, AHD_MODE_DFF0 + i); fifo_scbptr = ahd_get_scbptr(ahd); - printf("\n%s: FIFO%d %s, LONGJMP == 0x%x, SCB 0x%x\n", + kprintf("\n%s: FIFO%d %s, LONGJMP == 0x%x, SCB 0x%x\n", ahd_name(ahd), i, (dffstat & (FIFO0FREE << i)) ? "Free" : "Active", ahd_inw(ahd, LONGJMP_ADDR), fifo_scbptr); @@ -8582,20 +8582,20 @@ ahd_dump_card_state(struct ahd_softc *ahd) ahd_soffcnt_print(ahd_inb(ahd, SOFFCNT), &cur_col, 50); ahd_mdffstat_print(ahd_inb(ahd, MDFFSTAT), &cur_col, 50); if (cur_col > 50) { - printf("\n"); + kprintf("\n"); cur_col = 0; } - cur_col += printf("SHADDR = 0x%x%x, SHCNT = 0x%x ", + cur_col += kprintf("SHADDR = 0x%x%x, SHCNT = 0x%x ", ahd_inl(ahd, SHADDR+4), ahd_inl(ahd, SHADDR), (ahd_inb(ahd, SHCNT) | (ahd_inb(ahd, SHCNT + 1) << 8) | (ahd_inb(ahd, SHCNT + 2) << 16))); if (cur_col > 50) { - printf("\n"); + kprintf("\n"); cur_col = 0; } - cur_col += printf("HADDR = 0x%x%x, HCNT = 0x%x ", + cur_col += kprintf("HADDR = 0x%x%x, HCNT = 0x%x ", ahd_inl(ahd, HADDR+4), ahd_inl(ahd, HADDR), (ahd_inb(ahd, HCNT) @@ -8610,48 +8610,48 @@ ahd_dump_card_state(struct ahd_softc *ahd) } #endif } - printf("\nLQIN: "); + kprintf("\nLQIN: "); for (i = 0; i < 20; i++) - printf("0x%x ", ahd_inb(ahd, LQIN + i)); - printf("\n"); + kprintf("0x%x ", ahd_inb(ahd, LQIN + i)); + kprintf("\n"); ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG); - printf("%s: LQISTATE = 0x%x, LQOSTATE = 0x%x, OPTIONMODE = 0x%x\n", + kprintf("%s: LQISTATE = 0x%x, LQOSTATE = 0x%x, OPTIONMODE = 0x%x\n", ahd_name(ahd), ahd_inb(ahd, LQISTATE), ahd_inb(ahd, LQOSTATE), ahd_inb(ahd, OPTIONMODE)); - printf("%s: OS_SPACE_CNT = 0x%x MAXCMDCNT = 0x%x\n", + kprintf("%s: OS_SPACE_CNT = 0x%x MAXCMDCNT = 0x%x\n", ahd_name(ahd), ahd_inb(ahd, OS_SPACE_CNT), ahd_inb(ahd, MAXCMDCNT)); ahd_simode0_print(ahd_inb(ahd, SIMODE0), &cur_col, 50); - printf("\n"); + kprintf("\n"); ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN); cur_col = 0; ahd_ccscbctl_print(ahd_inb(ahd, CCSCBCTL), &cur_col, 50); - printf("\n"); + kprintf("\n"); ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode); - printf("%s: REG0 == 0x%x, SINDEX = 0x%x, DINDEX = 0x%x\n", + kprintf("%s: REG0 == 0x%x, SINDEX = 0x%x, DINDEX = 0x%x\n", ahd_name(ahd), ahd_inw(ahd, REG0), ahd_inw(ahd, SINDEX), ahd_inw(ahd, DINDEX)); - printf("%s: SCBPTR == 0x%x, SCB_NEXT == 0x%x, SCB_NEXT2 == 0x%x\n", + kprintf("%s: SCBPTR == 0x%x, SCB_NEXT == 0x%x, SCB_NEXT2 == 0x%x\n", ahd_name(ahd), ahd_get_scbptr(ahd), ahd_inw(ahd, SCB_NEXT), ahd_inw(ahd, SCB_NEXT2)); - printf("CDB %x %x %x %x %x %x\n", + kprintf("CDB %x %x %x %x %x %x\n", ahd_inb(ahd, SCB_CDB_STORE), ahd_inb(ahd, SCB_CDB_STORE+1), ahd_inb(ahd, SCB_CDB_STORE+2), ahd_inb(ahd, SCB_CDB_STORE+3), ahd_inb(ahd, SCB_CDB_STORE+4), ahd_inb(ahd, SCB_CDB_STORE+5)); - printf("STACK:"); + kprintf("STACK:"); for (i = 0; i < ahd->stack_size; i++) { ahd->saved_stack[i] = ahd_inb(ahd, STACK)|(ahd_inb(ahd, STACK) << 8); - printf(" 0x%x", ahd->saved_stack[i]); + kprintf(" 0x%x", ahd->saved_stack[i]); } for (i = ahd->stack_size-1; i >= 0; i--) { ahd_outb(ahd, STACK, ahd->saved_stack[i] & 0xFF); ahd_outb(ahd, STACK, (ahd->saved_stack[i] >> 8) & 0xFF); } - printf("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n"); + kprintf("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n"); ahd_platform_dump_card_state(ahd); ahd_restore_modes(ahd, saved_modes); if (paused == 0) @@ -8670,14 +8670,14 @@ ahd_dump_scbs(struct ahd_softc *ahd) saved_scb_index = ahd_get_scbptr(ahd); for (i = 0; i < AHD_SCB_MAX; i++) { ahd_set_scbptr(ahd, i); - printf("%3d", i); - printf("(CTRL 0x%x ID 0x%x N 0x%x N2 0x%x SG 0x%x, RSG 0x%x)\n", + kprintf("%3d", i); + kprintf("(CTRL 0x%x ID 0x%x N 0x%x N2 0x%x SG 0x%x, RSG 0x%x)\n", ahd_inb(ahd, SCB_CONTROL), ahd_inb(ahd, SCB_SCSIID), ahd_inw(ahd, SCB_NEXT), ahd_inw(ahd, SCB_NEXT2), ahd_inl(ahd, SCB_SGPTR), ahd_inl(ahd, SCB_RESIDUAL_SGPTR)); } - printf("\n"); + kprintf("\n"); ahd_set_scbptr(ahd, saved_scb_index); ahd_restore_modes(ahd, saved_modes); } @@ -9046,7 +9046,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) { u_long s; - printf("Configuring Target Mode\n"); + kprintf("Configuring Target Mode\n"); ahd_lock(ahd, &s); if (LIST_FIRST(&ahd->pending_scbs) != NULL) { ccb->ccb_h.status = CAM_BUSY; @@ -9075,7 +9075,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) /* Are we already enabled?? */ if (lstate != NULL) { xpt_print_path(ccb->ccb_h.path); - printf("Lun already enabled\n"); + kprintf("Lun already enabled\n"); ccb->ccb_h.status = CAM_LUN_ALRDY_ENA; return; } @@ -9087,7 +9087,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) * specific commands. */ ccb->ccb_h.status = CAM_REQ_INVALID; - printf("Non-zero Group Codes\n"); + kprintf("Non-zero Group Codes\n"); return; } @@ -9099,7 +9099,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) tstate = ahd_alloc_tstate(ahd, target, channel); if (tstate == NULL) { xpt_print_path(ccb->ccb_h.path); - printf("Couldn't allocate tstate\n"); + kprintf("Couldn't allocate tstate\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; return; } @@ -9112,7 +9112,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) if (status != CAM_REQ_CMP) { kfree(lstate, M_DEVBUF); xpt_print_path(ccb->ccb_h.path); - printf("Couldn't allocate path\n"); + kprintf("Couldn't allocate path\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; return; } @@ -9184,7 +9184,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) ahd_unlock(ahd, &s); ccb->ccb_h.status = CAM_REQ_CMP; xpt_print_path(ccb->ccb_h.path); - printf("Lun now enabled for target mode\n"); + kprintf("Lun now enabled for target mode\n"); } else { struct scb *scb; int i, empty; @@ -9203,7 +9203,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) ccbh = &scb->io_ctx->ccb_h; if (ccbh->func_code == XPT_CONT_TARGET_IO && !xpt_path_comp(ccbh->path, ccb->ccb_h.path)){ - printf("CTIO pending\n"); + kprintf("CTIO pending\n"); ccb->ccb_h.status = CAM_REQ_INVALID; ahd_unlock(ahd, &s); return; @@ -9211,12 +9211,12 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) } if (SLIST_FIRST(&lstate->accept_tios) != NULL) { - printf("ATIOs pending\n"); + kprintf("ATIOs pending\n"); ccb->ccb_h.status = CAM_REQ_INVALID; } if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { - printf("INOTs pending\n"); + kprintf("INOTs pending\n"); ccb->ccb_h.status = CAM_REQ_INVALID; } @@ -9226,7 +9226,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) } xpt_print_path(ccb->ccb_h.path); - printf("Target mode disabled\n"); + kprintf("Target mode disabled\n"); xpt_free_path(lstate->path); kfree(lstate, M_DEVBUF); @@ -9280,7 +9280,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) ahd_outb(ahd, SCSISEQ1, scsiseq1); if ((ahd->features & AHD_MULTIROLE) == 0) { - printf("Configuring Initiator Mode\n"); + kprintf("Configuring Initiator Mode\n"); ahd->flags &= ~AHD_TARGETROLE; ahd->flags |= AHD_INITIATORROLE; ahd_pause(ahd); @@ -9414,7 +9414,7 @@ ahd_handle_target_cmd(struct ahd_softc *ahd, struct target_cmd *cmd) ahd->flags &= ~AHD_TQINFIFO_BLOCKED; #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_TQIN) != 0) - printf("Incoming command from %d for %d:%d%s\n", + kprintf("Incoming command from %d for %d:%d%s\n", initiator, target, lun, lstate == ahd->black_hole ? "(Black Holed)" : ""); #endif @@ -9461,7 +9461,7 @@ ahd_handle_target_cmd(struct ahd_softc *ahd, struct target_cmd *cmd) default: /* Only copy the opcode. */ atio->cdb_len = 1; - printf("Reserved or VU command code type encountered\n"); + kprintf("Reserved or VU command code type encountered\n"); break; } @@ -9478,7 +9478,7 @@ ahd_handle_target_cmd(struct ahd_softc *ahd, struct target_cmd *cmd) */ #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_TQIN) != 0) - printf("Received Immediate Command %d:%d:%d - %p\n", + kprintf("Received Immediate Command %d:%d:%d - %p\n", initiator, target, lun, ahd->pending_device); #endif ahd->pending_device = lstate; diff --git a/sys/dev/disk/aic7xxx/aic79xx_inline.h b/sys/dev/disk/aic7xxx/aic79xx_inline.h index 5e1effce15..4dfbc6ec0f 100644 --- a/sys/dev/disk/aic7xxx/aic79xx_inline.h +++ b/sys/dev/disk/aic7xxx/aic79xx_inline.h @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#50 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_inline.h,v 1.3.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_inline.h,v 1.2 2003/06/17 04:28:21 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_inline.h,v 1.3 2006/12/22 23:26:15 swildner Exp $ */ #ifndef _AIC79XX_INLINE_H_ @@ -110,7 +110,7 @@ ahd_set_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst) || ahd->dst_mode == AHD_MODE_UNKNOWN) panic("Setting mode prior to saving it.\n"); if ((ahd_debug & AHD_SHOW_MODEPTR) != 0) - printf("%s: Setting mode 0x%x\n", ahd_name(ahd), + kprintf("%s: Setting mode 0x%x\n", ahd_name(ahd), ahd_build_mode_state(ahd, src, dst)); #endif ahd_outb(ahd, MODE_PTR, ahd_build_mode_state(ahd, src, dst)); @@ -128,7 +128,7 @@ ahd_update_modes(struct ahd_softc *ahd) mode_ptr = ahd_inb(ahd, MODE_PTR); #ifdef AHD_DEBUG if ((ahd_debug & AHD_SHOW_MODEPTR) != 0) - printf("Reading mode 0x%x\n", mode_ptr); + kprintf("Reading mode 0x%x\n", mode_ptr); #endif ahd_extract_mode_state(ahd, mode_ptr, &src, &dst); ahd_known_modes(ahd, src, dst); @@ -785,7 +785,7 @@ ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb) uint64_t host_dataptr; host_dataptr = ahd_le64toh(scb->hscb->dataptr); - printf("%s: Queueing SCB 0x%x bus addr 0x%x - 0x%x%x/0x%x\n", + kprintf("%s: Queueing SCB 0x%x bus addr 0x%x - 0x%x%x/0x%x\n", ahd_name(ahd), SCB_GET_TAG(scb), ahd_le32toh(scb->hscb->hscb_busaddr), (u_int)((host_dataptr >> 32) & 0xFFFFFFFF), diff --git a/sys/dev/disk/aic7xxx/aic79xx_osm.c b/sys/dev/disk/aic7xxx/aic79xx_osm.c index de89281d73..3f1c7c884c 100644 --- a/sys/dev/disk/aic7xxx/aic79xx_osm.c +++ b/sys/dev/disk/aic7xxx/aic79xx_osm.c @@ -32,7 +32,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.c#27 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.c,v 1.3.2.4 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_osm.c,v 1.10 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_osm.c,v 1.11 2006/12/22 23:26:15 swildner Exp $ */ #include "aic79xx_osm.h" @@ -124,7 +124,7 @@ ahd_attach(struct ahd_softc *ahd) sim = NULL; ahd_controller_info(ahd, ahd_info); - printf("%s\n", ahd_info); + kprintf("%s\n", ahd_info); ahd_lock(ahd, &s); /* @@ -234,7 +234,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) ahd->pending_device = NULL; } else { xpt_print_path(ccb->ccb_h.path); - printf("Still disconnected\n"); + kprintf("Still disconnected\n"); ahd_freeze_ccb(ccb); } } @@ -279,7 +279,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) || ahd_get_transaction_status(scb) == CAM_REQ_ABORTED) ahd_set_transaction_status(scb, CAM_CMD_TIMEOUT); ahd_print_path(ahd, scb); - printf("no longer in timeout, status = %x\n", + kprintf("no longer in timeout, status = %x\n", ccb->ccb_h.status); } @@ -319,11 +319,11 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb) memcpy(&ccb->csio.sense_data, ahd_get_sense_buf(ahd, scb) + SIU_SENSE_OFFSET(siu), sense_len); - printf("Copied %d bytes of sense data offset %d:", sense_len, + kprintf("Copied %d bytes of sense data offset %d:", sense_len, SIU_SENSE_OFFSET(siu)); for (i = 0; i < sense_len; i++) - printf(" 0x%x", ((uint8_t *)&ccb->csio.sense_data)[i]); - printf("\n"); + kprintf(" 0x%x", ((uint8_t *)&ccb->csio.sense_data)[i]); + kprintf("\n"); scb->io_ctx->ccb_h.status |= CAM_AUTOSNS_VALID; } ccb->ccb_h.status &= ~CAM_SIM_QUEUED; @@ -574,7 +574,7 @@ ahd_action(struct cam_sim *sim, union ccb *ccb) ahd_unlock(ahd, &s); if (bootverbose) { xpt_print_path(SIM_PATH(ahd, sim)); - printf("SCSI bus reset delivered. " + kprintf("SCSI bus reset delivered. " "%d SCBs aborted.\n", found); } ccb->ccb_h.status = CAM_REQ_CMP; @@ -1341,14 +1341,14 @@ ahd_timeout(void *arg) #if 0 ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI); ahd_outb(ahd, SCSISIGO, ACKO); - printf("set ACK\n"); + kprintf("set ACK\n"); ahd_outb(ahd, SCSISIGO, 0); - printf("clearing Ack\n"); + kprintf("clearing Ack\n"); ahd_restore_modes(ahd, saved_modes); #endif if ((scb->flags & SCB_ACTIVE) == 0) { /* Previous timeout took care of me already */ - printf("%s: Timedout SCB already complete. " + kprintf("%s: Timedout SCB already complete. " "Interrupts may not be functioning.\n", ahd_name(ahd)); ahd_unpause(ahd); ahd_unlock(ahd, &s); @@ -1360,7 +1360,7 @@ ahd_timeout(void *arg) lun = SCB_GET_LUN(scb); ahd_print_path(ahd, scb); - printf("SCB 0x%x - timed out\n", SCB_GET_TAG(scb)); + kprintf("SCB 0x%x - timed out\n", SCB_GET_TAG(scb)); ahd_dump_card_state(ahd); ahd_reset_channel(ahd, SIM_CHANNEL(ahd, sim), /*initiate reset*/TRUE); @@ -1370,7 +1370,7 @@ ahd_timeout(void *arg) last_phase = ahd_inb(ahd, LASTPHASE); if (scb->sg_count > 0) { for (i = 0; i < scb->sg_count; i++) { - printf("sg[%d] - Addr 0x%x : Length %d\n", + kprintf("sg[%d] - Addr 0x%x : Length %d\n", i, ((struct ahd_dma_seg *)scb->sg_list)[i].addr, ((struct ahd_dma_seg *)scb->sg_list)[i].len @@ -1385,7 +1385,7 @@ ahd_timeout(void *arg) bus_reset: ahd_set_transaction_status(scb, CAM_CMD_TIMEOUT); found = ahd_reset_channel(ahd, channel, /*Initiate Reset*/TRUE); - printf("%s: Issued Channel %c Bus Reset. " + kprintf("%s: Issued Channel %c Bus Reset. " "%d SCBs aborted\n", ahd_name(ahd), channel, found); } else { /* @@ -1433,7 +1433,7 @@ bus_reset: uint64_t newtimeout; ahd_print_path(ahd, scb); - printf("Other SCB Timeout%s", + kprintf("Other SCB Timeout%s", (scb->flags & SCB_OTHERTCL_TIMEOUT) != 0 ? " again\n" : "\n"); scb->flags |= SCB_OTHERTCL_TIMEOUT; @@ -1474,7 +1474,7 @@ bus_reset: ahd_outb(ahd, MSG_OUT, HOST_MSG); ahd_outb(ahd, SCSISIGO, last_phase|ATNO); ahd_print_path(ahd, active_scb); - printf("BDR message in message buffer\n"); + kprintf("BDR message in message buffer\n"); active_scb->flags |= SCB_DEVICE_RESET; callout_reset(&active_scb->io_ctx->ccb_h.timeout_ch, 2 * hz, ahd_timeout, active_scb); @@ -1490,7 +1490,7 @@ bus_reset: && (ahd_inb(ahd, SSTAT0) & TARGET) != 0) { /* XXX What happened to the SCB? */ /* Hung target selection. Goto busfree */ - printf("%s: Hung target selection\n", + kprintf("%s: Hung target selection\n", ahd_name(ahd)); ahd_restart(ahd); ahd_unlock(ahd, &s); @@ -1550,7 +1550,7 @@ bus_reset: CAM_REQUEUE_REQ, SEARCH_COMPLETE); ahd_print_path(ahd, scb); - printf("Queuing a BDR SCB\n"); + kprintf("Queuing a BDR SCB\n"); ahd_qinfifo_requeue_tail(ahd, scb); ahd_set_scbptr(ahd, saved_scbptr); callout_reset(&scb->io_ctx->ccb_h.timeout_ch, @@ -1561,7 +1561,7 @@ bus_reset: /* This shouldn't happen */ ahd_set_recoveryscb(ahd, scb); ahd_print_path(ahd, scb); - printf("SCB %d: Immediate reset. " + kprintf("SCB %d: Immediate reset. " "Flags = 0x%x\n", SCB_GET_TAG(scb), scb->flags); goto bus_reset; @@ -1638,7 +1638,7 @@ ahd_abort_ccb(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb) ccb->ccb_h.status = CAM_REQ_CMP; } else { xpt_print_path(abort_ccb->ccb_h.path); - printf("Not found\n"); + kprintf("Not found\n"); ccb->ccb_h.status = CAM_PATH_INVALID; } break; @@ -1820,14 +1820,14 @@ ahd_dump_targcmd(struct target_cmd *cmd) i = 0; while (byte < last_byte) { if (i == 0) - printf("\t"); - printf("%#x", *byte++); + kprintf("\t"); + kprintf("%#x", *byte++); i++; if (i == 8) { - printf("\n"); + kprintf("\n"); i = 0; } else { - printf(", "); + kprintf(", "); } } } diff --git a/sys/dev/disk/aic7xxx/aic79xx_pci.c b/sys/dev/disk/aic7xxx/aic79xx_pci.c index 8bdfde0485..0d65615ec4 100644 --- a/sys/dev/disk/aic7xxx/aic79xx_pci.c +++ b/sys/dev/disk/aic7xxx/aic79xx_pci.c @@ -41,7 +41,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#75 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_pci.c,v 1.3.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_pci.c,v 1.4 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_pci.c,v 1.5 2006/12/22 23:26:15 swildner Exp $ */ #ifdef __linux__ @@ -356,7 +356,7 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry) uint32_t devconfig; if (bootverbose) - printf("%s: Enabling 39Bit Addressing\n", + kprintf("%s: Enabling 39Bit Addressing\n", ahd_name(ahd)); devconfig = ahd_pci_read_config(ahd->dev_softc, DEVCONFIG, /*bytes*/4); @@ -526,7 +526,7 @@ ahd_check_extport(struct ahd_softc *ahd) * Fetch VPD for this function and parse it. */ if (bootverbose) - printf("%s: Reading VPD from SEEPROM...", + kprintf("%s: Reading VPD from SEEPROM...", ahd_name(ahd)); /* Address is always in units of 16bit words */ @@ -539,12 +539,12 @@ ahd_check_extport(struct ahd_softc *ahd) if (error == 0) error = ahd_parse_vpddata(ahd, &vpd); if (bootverbose) - printf("%s: VPD parsing %s\n", + kprintf("%s: VPD parsing %s\n", ahd_name(ahd), error == 0 ? "successful" : "failed"); if (bootverbose) - printf("%s: Reading SEEPROM...", ahd_name(ahd)); + kprintf("%s: Reading SEEPROM...", ahd_name(ahd)); /* Address is always in units of 16bit words */ start_addr = (sizeof(*sc) / 2) * (ahd->channel - 'A'); @@ -554,16 +554,16 @@ ahd_check_extport(struct ahd_softc *ahd) /*bytestream*/FALSE); if (error != 0) { - printf("Unable to read SEEPROM\n"); + kprintf("Unable to read SEEPROM\n"); have_seeprom = 0; } else { have_seeprom = ahd_verify_cksum(sc); if (bootverbose) { if (have_seeprom == 0) - printf ("checksum error\n"); + kprintf ("checksum error\n"); else - printf ("done.\n"); + kprintf ("done.\n"); } } ahd_release_seeprom(ahd); @@ -613,17 +613,17 @@ ahd_check_extport(struct ahd_softc *ahd) uint16_t *sc_data; int i; - printf("%s: Seeprom Contents:", ahd_name(ahd)); + kprintf("%s: Seeprom Contents:", ahd_name(ahd)); sc_data = (uint16_t *)sc; for (i = 0; i < (sizeof(*sc)); i += 2) - printf("\n\t0x%.4x", sc_data[i]); - printf("\n"); + kprintf("\n\t0x%.4x", sc_data[i]); + kprintf("\n"); } #endif if (!have_seeprom) { if (bootverbose) - printf("%s: No SEEPROM available.\n", ahd_name(ahd)); + kprintf("%s: No SEEPROM available.\n", ahd_name(ahd)); ahd->flags |= AHD_USEDEFAULTS; error = ahd_default_config(ahd); adapter_control = CFAUTOTERM|CFSEAUTOTERM; @@ -654,7 +654,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control) if ((ahd->flags & AHD_STPWLEVEL_A) != 0) devconfig |= STPWLEVEL; if (bootverbose) - printf("%s: STPWLEVEL is %s\n", + kprintf("%s: STPWLEVEL is %s\n", ahd_name(ahd), (devconfig & STPWLEVEL) ? "on" : "off"); ahd_pci_write_config(ahd->dev_softc, DEVCONFIG, devconfig, /*bytes*/4); @@ -669,7 +669,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control) error = ahd_read_flexport(ahd, FLXADDR_TERMCTL, &termctl); if ((adapter_control & CFAUTOTERM) == 0) { if (bootverbose) - printf("%s: Manual Primary Termination\n", + kprintf("%s: Manual Primary Termination\n", ahd_name(ahd)); termctl &= ~(FLX_TERMCTL_ENPRILOW|FLX_TERMCTL_ENPRIHIGH); if ((adapter_control & CFSTERM) != 0) @@ -677,14 +677,14 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control) if ((adapter_control & CFWSTERM) != 0) termctl |= FLX_TERMCTL_ENPRIHIGH; } else if (error != 0) { - printf("%s: Primary Auto-Term Sensing failed! " + kprintf("%s: Primary Auto-Term Sensing failed! " "Using Defaults.\n", ahd_name(ahd)); termctl = FLX_TERMCTL_ENPRILOW|FLX_TERMCTL_ENPRIHIGH; } if ((adapter_control & CFSEAUTOTERM) == 0) { if (bootverbose) - printf("%s: Manual Secondary Termination\n", + kprintf("%s: Manual Secondary Termination\n", ahd_name(ahd)); termctl &= ~(FLX_TERMCTL_ENSECLOW|FLX_TERMCTL_ENSECHIGH); if ((adapter_control & CFSELOWTERM) != 0) @@ -692,7 +692,7 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control) if ((adapter_control & CFSEHIGHTERM) != 0) termctl |= FLX_TERMCTL_ENSECHIGH; } else if (error != 0) { - printf("%s: Secondary Auto-Term Sensing failed! " + kprintf("%s: Secondary Auto-Term Sensing failed! " "Using Defaults.\n", ahd_name(ahd)); termctl |= FLX_TERMCTL_ENSECLOW|FLX_TERMCTL_ENSECHIGH; } @@ -711,22 +711,22 @@ ahd_configure_termination(struct ahd_softc *ahd, u_int adapter_control) error = ahd_write_flexport(ahd, FLXADDR_TERMCTL, termctl); if (error != 0) { - printf("%s: Unable to set termination settings!\n", + kprintf("%s: Unable to set termination settings!\n", ahd_name(ahd)); } else if (bootverbose) { - printf("%s: Primary High byte termination %sabled\n", + kprintf("%s: Primary High byte termination %sabled\n", ahd_name(ahd), (termctl & FLX_TERMCTL_ENPRIHIGH) ? "En" : "Dis"); - printf("%s: Primary Low byte termination %sabled\n", + kprintf("%s: Primary Low byte termination %sabled\n", ahd_name(ahd), (termctl & FLX_TERMCTL_ENPRILOW) ? "En" : "Dis"); - printf("%s: Secondary High byte termination %sabled\n", + kprintf("%s: Secondary High byte termination %sabled\n", ahd_name(ahd), (termctl & FLX_TERMCTL_ENSECHIGH) ? "En" : "Dis"); - printf("%s: Secondary Low byte termination %sabled\n", + kprintf("%s: Secondary Low byte termination %sabled\n", ahd_name(ahd), (termctl & FLX_TERMCTL_ENSECLOW) ? "En" : "Dis"); } @@ -802,7 +802,7 @@ ahd_pci_intr(struct ahd_softc *ahd) if ((intstat & PCIINT) == 0) return; - printf("%s: PCI error Interrupt\n", ahd_name(ahd)); + kprintf("%s: PCI error Interrupt\n", ahd_name(ahd)); saved_modes = ahd_save_modes(ahd); ahd_dump_card_state(ahd); ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG); @@ -829,7 +829,7 @@ ahd_pci_intr(struct ahd_softc *ahd) s = pci_status_strings[bit]; if (i == 7/*TARG*/ && bit == 3) s = "%s: Signaled Target Abort\n"; - printf(s, ahd_name(ahd), pci_status_source[i]); + kprintf(s, ahd_name(ahd), pci_status_source[i]); } } } @@ -859,7 +859,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat) */ pcix_status = ahd_pci_read_config(ahd->dev_softc, PCIXR_STATUS, /*bytes*/2); - printf("%s: PCI Split Interrupt - PCI-X status = 0x%x\n", + kprintf("%s: PCI Split Interrupt - PCI-X status = 0x%x\n", ahd_name(ahd), pcix_status); saved_modes = ahd_save_modes(ahd); for (i = 0; i < 4; i++) { @@ -888,7 +888,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat) static const char *s; s = split_status_strings[bit]; - printf(s, ahd_name(ahd), + kprintf(s, ahd_name(ahd), split_status_source[i]); } @@ -899,7 +899,7 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat) static const char *s; s = split_status_strings[bit]; - printf(s, ahd_name(ahd), "SG"); + kprintf(s, ahd_name(ahd), "SG"); } } } @@ -945,7 +945,7 @@ ahd_aic7902_setup(struct ahd_softc *ahd) pci = ahd->dev_softc; rev = ahd_pci_read_config(pci, PCIR_REVID, /*bytes*/1); if (rev < ID_AIC7902_PCI_REV_A4) { - printf("%s: Unable to attach to unsupported chip revision %d\n", + kprintf("%s: Unable to attach to unsupported chip revision %d\n", ahd_name(ahd), rev); ahd_pci_write_config(pci, PCIR_COMMAND, 0, /*bytes*/2); return (ENXIO); diff --git a/sys/dev/disk/aic7xxx/aic7xxx.c b/sys/dev/disk/aic7xxx/aic7xxx.c index fec35efbae..78243f9dcb 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx.c +++ b/sys/dev/disk/aic7xxx/aic7xxx.c @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#134 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.41.2.27 2003/06/10 03:26:08 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx.c,v 1.10 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx.c,v 1.11 2006/12/22 23:26:15 swildner Exp $ */ #include "aic7xxx_osm.h" @@ -324,7 +324,7 @@ ahc_run_qoutfifo(struct ahc_softc *ahc) scb = ahc_lookup_scb(ahc, scb_index); if (scb == NULL) { - printf("%s: WARNING no command for scb %d " + kprintf("%s: WARNING no command for scb %d " "(cmdcmplt)\nQOUTPOS = %d\n", ahc_name(ahc), scb_index, (ahc->qoutfifonext - 1) & 0xFF); @@ -378,7 +378,7 @@ ahc_handle_brkadrint(struct ahc_softc *ahc) error = ahc_inb(ahc, ERROR); for (i = 0; error != 1 && i < num_errors; i++) error >>= 1; - printf("%s: brkadrint, %s at seqaddr = 0x%x\n", + kprintf("%s: brkadrint, %s at seqaddr = 0x%x\n", ahc_name(ahc), ahc_hard_errors[i].errmesg, ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8)); @@ -435,7 +435,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) scb = ahc_lookup_scb(ahc, scb_index); if (scb == NULL) { ahc_print_devinfo(ahc, &devinfo); - printf("ahc_intr - referenced scb " + kprintf("ahc_intr - referenced scb " "not valid during seqint 0x%x scb(%d)\n", intstat, scb_index); ahc_dump_card_state(ahc); @@ -463,7 +463,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) ahc_set_scsi_status(scb, hscb->shared_data.status.scsi_status); switch (hscb->shared_data.status.scsi_status) { case SCSI_STATUS_OK: - printf("%s: Interrupted for staus of 0???\n", + kprintf("%s: Interrupted for staus of 0???\n", ahc_name(ahc)); break; case SCSI_STATUS_CMD_TERMINATED: @@ -477,7 +477,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) #ifdef AHC_DEBUG if (ahc_debug & AHC_SHOW_SENSE) { ahc_print_path(ahc, scb); - printf("SCB %d: requests Check Status\n", + kprintf("SCB %d: requests Check Status\n", scb->hscb->tag); } #endif @@ -500,7 +500,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) #ifdef AHC_DEBUG if (ahc_debug & AHC_SHOW_SENSE) { ahc_print_path(ahc, scb); - printf("Sending Sense\n"); + kprintf("Sending Sense\n"); } #endif sg->addr = ahc_get_sense_bufaddr(ahc, scb); @@ -576,29 +576,29 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) ahc_outb(ahc, SCSISEQ, ahc_inb(ahc, SCSISEQ) & (ENSELI|ENRSELI|ENAUTOATNP)); - printf("%s:%c:%d: no active SCB for reconnecting " + kprintf("%s:%c:%d: no active SCB for reconnecting " "target - issuing BUS DEVICE RESET\n", ahc_name(ahc), devinfo.channel, devinfo.target); - printf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, " + kprintf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, " "ARG_1 == 0x%x ACCUM = 0x%x\n", ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN), ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM)); - printf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, " + kprintf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, " "SINDEX == 0x%x\n", ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR), ahc_index_busy_tcl(ahc, BUILD_TCL(ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN))), ahc_inb(ahc, SINDEX)); - printf("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, " + kprintf("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, " "SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n", ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID), ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG), ahc_inb(ahc, SCB_CONTROL)); - printf("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n", + kprintf("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n", ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI)); - printf("SXFRCTL0 == 0x%x\n", ahc_inb(ahc, SXFRCTL0)); - printf("SEQCTL == 0x%x\n", ahc_inb(ahc, SEQCTL)); + kprintf("SXFRCTL0 == 0x%x\n", ahc_inb(ahc, SXFRCTL0)); + kprintf("SEQCTL == 0x%x\n", ahc_inb(ahc, SEQCTL)); ahc_dump_card_state(ahc); ahc->msgout_buf[0] = MSG_BUS_DEV_RESET; ahc->msgout_len = 1; @@ -611,7 +611,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) case SEND_REJECT: { u_int rejbyte = ahc_inb(ahc, ACCUM); - printf("%s:%c:%d: Warning - unknown message received from " + kprintf("%s:%c:%d: Warning - unknown message received from " "target (0x%x). Rejecting\n", ahc_name(ahc), devinfo.channel, devinfo.target, rejbyte); break; @@ -632,7 +632,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) u_int lastphase; lastphase = ahc_inb(ahc, LASTPHASE); - printf("%s:%c:%d: unknown scsi bus phase %x, " + kprintf("%s:%c:%d: unknown scsi bus phase %x, " "lastphase = 0x%x. Attempting to continue\n", ahc_name(ahc), devinfo.channel, devinfo.target, lastphase, ahc_inb(ahc, SCSISIGI)); @@ -643,7 +643,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) u_int lastphase; lastphase = ahc_inb(ahc, LASTPHASE); - printf("%s:%c:%d: Missed busfree. " + kprintf("%s:%c:%d: Missed busfree. " "Lastphase = 0x%x, Curphase = 0x%x\n", ahc_name(ahc), devinfo.channel, devinfo.target, lastphase, ahc_inb(ahc, SCSISIGI)); @@ -671,7 +671,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) bus_phase = ahc_inb(ahc, SCSISIGI) & PHASE_MASK; if (bus_phase != P_MESGIN && bus_phase != P_MESGOUT) { - printf("ahc_intr: HOST_MSG_LOOP bad " + kprintf("ahc_intr: HOST_MSG_LOOP bad " "phase 0x%x\n", bus_phase); /* @@ -772,7 +772,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) u_int scb_index; ahc_print_devinfo(ahc, &devinfo); - printf("Unable to clear parity error. " + kprintf("Unable to clear parity error. " "Resetting bus.\n"); scb_index = ahc_inb(ahc, SCB_TAG); scb = ahc_lookup_scb(ahc, scb_index); @@ -808,18 +808,18 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) break; } ahc_print_path(ahc, scb); - printf("data overrun detected %s." + kprintf("data overrun detected %s." " Tag == 0x%x.\n", ahc_phase_table[i].phasemsg, scb->hscb->tag); ahc_print_path(ahc, scb); - printf("%s seen Data Phase. Length = %ld. NumSGs = %d.\n", + kprintf("%s seen Data Phase. Length = %ld. NumSGs = %d.\n", ahc_inb(ahc, SEQ_FLAGS) & DPHASE ? "Have" : "Haven't", ahc_get_transfer_length(scb), scb->sg_count); if (scb->sg_count > 0) { for (i = 0; i < scb->sg_count; i++) { - printf("sg[%d] - Addr 0x%x%x : Length %d\n", + kprintf("sg[%d] - Addr 0x%x%x : Length %d\n", i, (ahc_le32toh(scb->sg_list[i].len) >> 24 & SG_HIGH_ADDR_BITS), @@ -866,7 +866,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) { u_int scbindex; - printf("%s:%c:%d:%d: Attempt to issue message failed\n", + kprintf("%s:%c:%d:%d: Attempt to issue message failed\n", ahc_name(ahc), devinfo.channel, devinfo.target, devinfo.lun); scbindex = ahc_inb(ahc, SCB_TAG); @@ -886,7 +886,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) } case NO_FREE_SCB: { - printf("%s: No free or disconnected SCBs\n", ahc_name(ahc)); + kprintf("%s: No free or disconnected SCBs\n", ahc_name(ahc)); ahc_dump_card_state(ahc); panic("for safety"); break; @@ -896,7 +896,7 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) u_int scbptr; scbptr = ahc_inb(ahc, SCBPTR); - printf("Bogus TAG after DMA. SCBPTR %d, tag %d, our tag %d\n", + kprintf("Bogus TAG after DMA. SCBPTR %d, tag %d, our tag %d\n", scbptr, ahc_inb(ahc, ARG_1), ahc->scb_data->hscbs[scbptr].tag); ahc_dump_card_state(ahc); @@ -905,12 +905,12 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) } case OUT_OF_RANGE: { - printf("%s: BTT calculation out of range\n", ahc_name(ahc)); - printf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, " + kprintf("%s: BTT calculation out of range\n", ahc_name(ahc)); + kprintf("SAVED_SCSIID == 0x%x, SAVED_LUN == 0x%x, " "ARG_1 == 0x%x ACCUM = 0x%x\n", ahc_inb(ahc, SAVED_SCSIID), ahc_inb(ahc, SAVED_LUN), ahc_inb(ahc, ARG_1), ahc_inb(ahc, ACCUM)); - printf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, " + kprintf("SEQ_FLAGS == 0x%x, SCBPTR == 0x%x, BTT == 0x%x, " "SINDEX == 0x%x\n, A == 0x%x\n", ahc_inb(ahc, SEQ_FLAGS), ahc_inb(ahc, SCBPTR), ahc_index_busy_tcl(ahc, @@ -918,19 +918,19 @@ ahc_handle_seqint(struct ahc_softc *ahc, u_int intstat) ahc_inb(ahc, SAVED_LUN))), ahc_inb(ahc, SINDEX), ahc_inb(ahc, ACCUM)); - printf("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, " + kprintf("SCSIID == 0x%x, SCB_SCSIID == 0x%x, SCB_LUN == 0x%x, " "SCB_TAG == 0x%x, SCB_CONTROL == 0x%x\n", ahc_inb(ahc, SCSIID), ahc_inb(ahc, SCB_SCSIID), ahc_inb(ahc, SCB_LUN), ahc_inb(ahc, SCB_TAG), ahc_inb(ahc, SCB_CONTROL)); - printf("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n", + kprintf("SCSIBUSL == 0x%x, SCSISIGI == 0x%x\n", ahc_inb(ahc, SCSIBUSL), ahc_inb(ahc, SCSISIGI)); ahc_dump_card_state(ahc); panic("for safety"); break; } default: - printf("ahc_intr: seqint, " + kprintf("ahc_intr: seqint, " "intstat == 0x%x, scsisigi = 0x%x\n", intstat, ahc_inb(ahc, SCSISIGI)); break; @@ -975,7 +975,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) intr_channel = (cur_channel == 'A') ? 'B' : 'A'; } if (status == 0) { - printf("%s: Spurious SCSI interrupt\n", ahc_name(ahc)); + kprintf("%s: Spurious SCSI interrupt\n", ahc_name(ahc)); ahc_outb(ahc, CLRINT, CLRSCSIINT); ahc_unpause(ahc); return; @@ -996,7 +996,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) int now_lvd; now_lvd = ahc_inb(ahc, SBLKCTL) & ENAB40; - printf("%s: Transceiver State Has Changed to %s mode\n", + kprintf("%s: Transceiver State Has Changed to %s mode\n", ahc_name(ahc), now_lvd ? "LVD" : "SE"); ahc_outb(ahc, CLRSINT0, CLRIOERR); /* @@ -1012,7 +1012,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) ahc_reset_channel(ahc, intr_channel, /*Initiate Reset*/now_lvd == 0); } else if ((status & SCSIRSTI) != 0) { - printf("%s: Someone reset channel %c\n", + kprintf("%s: Someone reset channel %c\n", ahc_name(ahc), intr_channel); if (intr_channel != cur_channel) ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) ^ SELBUSB); @@ -1072,26 +1072,26 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) ahc_print_path(ahc, scb); scb->flags |= SCB_TRANSMISSION_ERROR; } else - printf("%s:%c:%d: ", ahc_name(ahc), intr_channel, + kprintf("%s:%c:%d: ", ahc_name(ahc), intr_channel, SCSIID_TARGET(ahc, ahc_inb(ahc, SAVED_SCSIID))); scsirate = ahc_inb(ahc, SCSIRATE); if (silent == FALSE) { - printf("parity error detected %s. " + kprintf("parity error detected %s. " "SEQADDR(0x%x) SCSIRATE(0x%x)\n", ahc_phase_table[i].phasemsg, ahc_inw(ahc, SEQADDR0), scsirate); if ((ahc->features & AHC_DT) != 0) { if ((sstat2 & CRCVALERR) != 0) - printf("\tCRC Value Mismatch\n"); + kprintf("\tCRC Value Mismatch\n"); if ((sstat2 & CRCENDERR) != 0) - printf("\tNo terminal CRC packet " + kprintf("\tNo terminal CRC packet " "recevied\n"); if ((sstat2 & CRCREQERR) != 0) - printf("\tIllegal CRC packet " + kprintf("\tIllegal CRC packet " "request\n"); if ((sstat2 & DUAL_EDGE_ERR) != 0) - printf("\tUnexpected %sDT Data Phase\n", + kprintf("\tUnexpected %sDT Data Phase\n", (scsirate & SINGLE_EDGE) ? "" : "non-"); } @@ -1159,7 +1159,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) scb = ahc_lookup_scb(ahc, scb_index); if (scb == NULL) { - printf("%s: ahc_intr - referenced scb not " + kprintf("%s: ahc_intr - referenced scb not " "valid during SELTO scb(%d, %d)\n", ahc_name(ahc), scbptr, scb_index); ahc_dump_card_state(ahc); @@ -1168,7 +1168,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_SELTO) != 0) { ahc_print_path(ahc, scb); - printf("Saw Selection Timeout for SCB 0x%x\n", + kprintf("Saw Selection Timeout for SCB 0x%x\n", scb_index); } #endif @@ -1243,7 +1243,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) == MSG_ABORT_TAG) tag = scb->hscb->tag; ahc_print_path(ahc, scb); - printf("SCB %d - Abort%s Completed.\n", + kprintf("SCB %d - Abort%s Completed.\n", scb->hscb->tag, tag == SCB_LIST_NULL ? "" : " Tag"); ahc_abort_scbs(ahc, target, channel, @@ -1346,7 +1346,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) * We had not fully identified this connection, * so we cannot abort anything. */ - printf("%s: ", ahc_name(ahc)); + kprintf("%s: ", ahc_name(ahc)); } for (i = 0; i < num_phases; i++) { if (lastphase == ahc_phase_table[i].phase) @@ -1361,7 +1361,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) */ ahc_force_renegotiation(ahc, &devinfo); } - printf("Unexpected busfree %s\n" + kprintf("Unexpected busfree %s\n" "SEQADDR == 0x%x\n", ahc_phase_table[i].phasemsg, ahc_inb(ahc, SEQADDR0) @@ -1370,7 +1370,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) ahc_outb(ahc, CLRINT, CLRSCSIINT); ahc_restart(ahc); } else { - printf("%s: Missing case in ahc_handle_scsiint. status = %x\n", + kprintf("%s: Missing case in ahc_handle_scsiint. status = %x\n", ahc_name(ahc), status); ahc_outb(ahc, CLRINT, CLRSCSIINT); } @@ -1437,7 +1437,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc) break; if (steps > AHC_MAX_STEPS) { - printf("%s: Infinite loop in critical section\n", + kprintf("%s: Infinite loop in critical section\n", ahc_name(ahc)); ahc_dump_card_state(ahc); panic("critical section loop"); @@ -1515,23 +1515,23 @@ ahc_print_scb(struct scb *scb) struct hardware_scb *hscb = scb->hscb; - printf("scb:%p control:0x%x scsiid:0x%x lun:%d cdb_len:%d\n", + kprintf("scb:%p control:0x%x scsiid:0x%x lun:%d cdb_len:%d\n", (void *)scb, hscb->control, hscb->scsiid, hscb->lun, hscb->cdb_len); - printf("Shared Data: "); + kprintf("Shared Data: "); for (i = 0; i < sizeof(hscb->shared_data.cdb); i++) - printf("%#02x", hscb->shared_data.cdb[i]); - printf(" dataptr:%#x datacnt:%#x sgptr:%#x tag:%#x\n", + kprintf("%#02x", hscb->shared_data.cdb[i]); + kprintf(" dataptr:%#x datacnt:%#x sgptr:%#x tag:%#x\n", ahc_le32toh(hscb->dataptr), ahc_le32toh(hscb->datacnt), ahc_le32toh(hscb->sgptr), hscb->tag); if (scb->sg_count > 0) { for (i = 0; i < scb->sg_count; i++) { - printf("sg[%d] - Addr 0x%x%x : Length %d\n", + kprintf("sg[%d] - Addr 0x%x%x : Length %d\n", i, (ahc_le32toh(scb->sg_list[i].len) >> 24 & SG_HIGH_ADDR_BITS), @@ -1976,13 +1976,13 @@ ahc_set_syncrate(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL); if (bootverbose) { if (offset != 0) { - printf("%s: target %d synchronous at %sMHz%s, " + kprintf("%s: target %d synchronous at %sMHz%s, " "offset = 0x%x\n", ahc_name(ahc), devinfo->target, syncrate->rate, (ppr_options & MSG_EXT_PPR_DT_REQ) ? " DT" : "", offset); } else { - printf("%s: target %d using " + kprintf("%s: target %d using " "asynchronous transfers\n", ahc_name(ahc), devinfo->target); } @@ -2045,7 +2045,7 @@ ahc_set_width(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, ahc_send_async(ahc, devinfo->channel, devinfo->target, CAM_LUN_WILDCARD, AC_TRANSFER_NEG, NULL); if (bootverbose) { - printf("%s: target %d using %dbit transfers\n", + kprintf("%s: target %d using %dbit transfers\n", ahc_name(ahc), devinfo->target, 8 * (0x01 << width)); } @@ -2220,7 +2220,7 @@ ahc_compile_devinfo(struct ahc_devinfo *devinfo, u_int our_id, u_int target, void ahc_print_devinfo(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) { - printf("%s:%c:%d:%d: ", ahc_name(ahc), devinfo->channel, + kprintf("%s:%c:%d:%d: ", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); } @@ -2292,7 +2292,7 @@ ahc_setup_initiator_msgout(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, ahc->msgout_buf[ahc->msgout_index++] = MSG_BUS_DEV_RESET; ahc->msgout_len++; ahc_print_path(ahc, scb); - printf("Bus Device Reset Message Sent\n"); + kprintf("Bus Device Reset Message Sent\n"); /* * Clear our selection hardware in advance of * the busfree. We may have an entry in the waiting @@ -2308,7 +2308,7 @@ ahc_setup_initiator_msgout(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, ahc->msgout_buf[ahc->msgout_index++] = MSG_ABORT; ahc->msgout_len++; ahc_print_path(ahc, scb); - printf("Abort%s Message Sent\n", + kprintf("Abort%s Message Sent\n", (scb->hscb->control & TAG_ENB) != 0 ? " Tag" : ""); /* * Clear our selection hardware in advance of @@ -2321,9 +2321,9 @@ ahc_setup_initiator_msgout(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, } else if ((scb->flags & (SCB_AUTO_NEGOTIATE|SCB_NEGOTIATE)) != 0) { ahc_build_transfer_msg(ahc, devinfo); } else { - printf("ahc_intr: AWAITING_MSG for an SCB that " + kprintf("ahc_intr: AWAITING_MSG for an SCB that " "does not have a waiting message\n"); - printf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid, + kprintf("SCSIID = %x, target_mask = %x\n", scb->hscb->scsiid, devinfo->target_mask); panic("SCB = %d, SCB Control = %x, MSG_OUT = %x " "SCB flags = %x", scb->hscb->tag, scb->hscb->control, @@ -2404,7 +2404,7 @@ ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) if (bootverbose) { ahc_print_devinfo(ahc, devinfo); - printf("Ensuring async\n"); + kprintf("Ensuring async\n"); } } @@ -2455,7 +2455,7 @@ ahc_construct_sdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, ahc->msgout_buf[ahc->msgout_index++] = offset; ahc->msgout_len += 5; if (bootverbose) { - printf("(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n", + kprintf("(%s:%c:%d:%d): Sending SDTR period %x, offset %x\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun, period, offset); } @@ -2475,7 +2475,7 @@ ahc_construct_wdtr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, ahc->msgout_buf[ahc->msgout_index++] = bus_width; ahc->msgout_len += 4; if (bootverbose) { - printf("(%s:%c:%d:%d): Sending WDTR %x\n", + kprintf("(%s:%c:%d:%d): Sending WDTR %x\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun, bus_width); } @@ -2502,7 +2502,7 @@ ahc_construct_ppr(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, ahc->msgout_buf[ahc->msgout_index++] = ppr_options; ahc->msgout_len += 8; if (bootverbose) { - printf("(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, " + kprintf("(%s:%c:%d:%d): Sending PPR bus_width %x, period %x, " "offset %x, ppr_options %x\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun, bus_width, period, offset, ppr_options); @@ -2555,7 +2555,7 @@ ahc_handle_proto_violation(struct ahc_softc *ahc) * to match. */ ahc_print_devinfo(ahc, &devinfo); - printf("Target did not send an IDENTIFY message. " + kprintf("Target did not send an IDENTIFY message. " "LASTPHASE = 0x%x.\n", lastphase); scb = NULL; } else if (scb == NULL) { @@ -2564,13 +2564,13 @@ ahc_handle_proto_violation(struct ahc_softc *ahc) * transaction. Print an error and reset the bus. */ ahc_print_devinfo(ahc, &devinfo); - printf("No SCB found during protocol violation\n"); + kprintf("No SCB found during protocol violation\n"); goto proto_violation_reset; } else { ahc_set_transaction_status(scb, CAM_SEQUENCE_FAIL); if ((seq_flags & NO_CDB_SENT) != 0) { ahc_print_path(ahc, scb); - printf("No or incomplete CDB sent to device.\n"); + kprintf("No or incomplete CDB sent to device.\n"); } else if ((ahc_inb(ahc, SCB_CONTROL) & STATUS_RCVD) == 0) { /* * The target never bothered to provide status to @@ -2580,10 +2580,10 @@ ahc_handle_proto_violation(struct ahc_softc *ahc) * message. */ ahc_print_path(ahc, scb); - printf("Completed command without status.\n"); + kprintf("Completed command without status.\n"); } else { ahc_print_path(ahc, scb); - printf("Unknown protocol violation.\n"); + kprintf("Unknown protocol violation.\n"); ahc_dump_card_state(ahc); } } @@ -2597,7 +2597,7 @@ proto_violation_reset: * it away with a bus reset. */ found = ahc_reset_channel(ahc, 'A', TRUE); - printf("%s: Issued Channel %c Bus Reset. " + kprintf("%s: Issued Channel %c Bus Reset. " "%d SCBs aborted\n", ahc_name(ahc), 'A', found); } else { /* @@ -2619,7 +2619,7 @@ proto_violation_reset: ahc_print_path(ahc, scb); scb->flags |= SCB_ABORT; } - printf("Protocol violation %s. Attempting to abort.\n", + kprintf("Protocol violation %s. Attempting to abort.\n", ahc_lookup_phase_entry(curphase)->phasemsg); } } @@ -2652,14 +2652,14 @@ reswitch: #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { ahc_print_devinfo(ahc, &devinfo); - printf("INITIATOR_MSG_OUT"); + kprintf("INITIATOR_MSG_OUT"); } #endif phasemis = bus_phase != P_MESGOUT; if (phasemis) { #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { - printf(" PHASEMIS %s\n", + kprintf(" PHASEMIS %s\n", ahc_lookup_phase_entry(bus_phase) ->phasemsg); } @@ -2686,7 +2686,7 @@ reswitch: ahc_outb(ahc, CLRSINT1, CLRREQINIT); #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) - printf(" byte 0x%x\n", ahc->send_msg_perror); + kprintf(" byte 0x%x\n", ahc->send_msg_perror); #endif ahc_outb(ahc, SCSIDATL, MSG_PARITY_ERROR); break; @@ -2716,7 +2716,7 @@ reswitch: ahc_outb(ahc, CLRSINT1, CLRREQINIT); #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) - printf(" byte 0x%x\n", + kprintf(" byte 0x%x\n", ahc->msgout_buf[ahc->msgout_index]); #endif ahc_outb(ahc, SCSIDATL, ahc->msgout_buf[ahc->msgout_index++]); @@ -2730,14 +2730,14 @@ reswitch: #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { ahc_print_devinfo(ahc, &devinfo); - printf("INITIATOR_MSG_IN"); + kprintf("INITIATOR_MSG_IN"); } #endif phasemis = bus_phase != P_MESGIN; if (phasemis) { #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { - printf(" PHASEMIS %s\n", + kprintf(" PHASEMIS %s\n", ahc_lookup_phase_entry(bus_phase) ->phasemsg); } @@ -2758,7 +2758,7 @@ reswitch: ahc->msgin_buf[ahc->msgin_index] = ahc_inb(ahc, SCSIBUSL); #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) - printf(" byte 0x%x\n", + kprintf(" byte 0x%x\n", ahc->msgin_buf[ahc->msgin_index]); #endif @@ -2780,7 +2780,7 @@ reswitch: #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MESSAGES) != 0) { ahc_print_devinfo(ahc, &devinfo); - printf("Asserting ATN for response\n"); + kprintf("Asserting ATN for response\n"); } #endif ahc_assert_atn(ahc); @@ -3061,7 +3061,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) targ_scsirate & WIDEXFER, devinfo->role); if (bootverbose) { - printf("(%s:%c:%d:%d): Received " + kprintf("(%s:%c:%d:%d): Received " "SDTR period %x, offset %x\n\t" "Filtered to period %x, offset %x\n", ahc_name(ahc), devinfo->channel, @@ -3092,7 +3092,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) */ if (bootverbose && devinfo->role == ROLE_INITIATOR) { - printf("(%s:%c:%d:%d): Target " + kprintf("(%s:%c:%d:%d): Target " "Initiated SDTR\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); @@ -3134,7 +3134,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) ahc_validate_width(ahc, tinfo, &bus_width, devinfo->role); if (bootverbose) { - printf("(%s:%c:%d:%d): Received WDTR " + kprintf("(%s:%c:%d:%d): Received WDTR " "%x filtered to %x\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun, @@ -3150,7 +3150,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) */ if (saved_width > bus_width) { reject = TRUE; - printf("(%s:%c:%d:%d): requested %dBit " + kprintf("(%s:%c:%d:%d): requested %dBit " "transfers. Rejecting...\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun, @@ -3163,7 +3163,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) */ if (bootverbose && devinfo->role == ROLE_INITIATOR) { - printf("(%s:%c:%d:%d): Target " + kprintf("(%s:%c:%d:%d): Target " "Initiated WDTR\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); @@ -3281,12 +3281,12 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) } } else { if (devinfo->role != ROLE_TARGET) - printf("(%s:%c:%d:%d): Target " + kprintf("(%s:%c:%d:%d): Target " "Initiated PPR\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); else - printf("(%s:%c:%d:%d): Initiator " + kprintf("(%s:%c:%d:%d): Initiator " "Initiated PPR\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); @@ -3298,7 +3298,7 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) response = TRUE; } if (bootverbose) { - printf("(%s:%c:%d:%d): Received PPR width %x, " + kprintf("(%s:%c:%d:%d): Received PPR width %x, " "period %x, offset %x,options %x\n" "\tFiltered to width %x, period %x, " "offset %x, options %x\n", @@ -3428,7 +3428,7 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) * Attempt to negotiate SPI-2 style. */ if (bootverbose) { - printf("(%s:%c:%d:%d): PPR Rejected. " + kprintf("(%s:%c:%d:%d): PPR Rejected. " "Trying WDTR/SDTR\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); @@ -3444,7 +3444,7 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) } else if (ahc_sent_msg(ahc, AHCMSG_EXT, MSG_EXT_WDTR, /*full*/FALSE)) { /* note 8bit xfers */ - printf("(%s:%c:%d:%d): refuses WIDE negotiation. Using " + kprintf("(%s:%c:%d:%d): refuses WIDE negotiation. Using " "8bit transfers\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); ahc_set_width(ahc, devinfo, MSG_EXT_WDTR_BUS_8_BIT, @@ -3472,7 +3472,7 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) /*offset*/0, /*ppr_options*/0, AHC_TRANS_ACTIVE|AHC_TRANS_GOAL, /*paused*/TRUE); - printf("(%s:%c:%d:%d): refuses synchronous negotiation. " + kprintf("(%s:%c:%d:%d): refuses synchronous negotiation. " "Using asynchronous transfers\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); @@ -3483,13 +3483,13 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) tag_type = (scb->hscb->control & MSG_SIMPLE_TASK); if (tag_type == MSG_SIMPLE_TASK) { - printf("(%s:%c:%d:%d): refuses tagged commands. " + kprintf("(%s:%c:%d:%d): refuses tagged commands. " "Performing non-tagged I/O\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun); ahc_set_tags(ahc, devinfo, AHC_QUEUE_NONE); mask = ~0x23; } else { - printf("(%s:%c:%d:%d): refuses %s tagged commands. " + kprintf("(%s:%c:%d:%d): refuses %s tagged commands. " "Performing simple queue tagged I/O only\n", ahc_name(ahc), devinfo->channel, devinfo->target, devinfo->lun, tag_type == MSG_ORDERED_TASK @@ -3539,7 +3539,7 @@ ahc_handle_msg_reject(struct ahc_softc *ahc, struct ahc_devinfo *devinfo) /* * Otherwise, we ignore it. */ - printf("%s:%c:%d: Message reject for %x -- ignored\n", + kprintf("%s:%c:%d: Message reject for %x -- ignored\n", ahc_name(ahc), devinfo->channel, devinfo->target, last_msg); } @@ -3763,7 +3763,7 @@ ahc_handle_devreset(struct ahc_softc *ahc, struct ahc_devinfo *devinfo, if (message != NULL && (verbose_level <= bootverbose)) - printf("%s: %s on %c:%d. %d SCBs aborted\n", ahc_name(ahc), + kprintf("%s: %s on %c:%d. %d SCBs aborted\n", ahc_name(ahc), message, devinfo->channel, devinfo->target, found); } @@ -4093,7 +4093,7 @@ ahc_reset(struct ahc_softc *ahc, int reinit) } while (--wait && !(ahc_inb(ahc, HCNTRL) & CHIPRSTACK)); if (wait == 0) { - printf("%s: WARNING - Failed chip reset! " + kprintf("%s: WARNING - Failed chip reset! " "Trying to initialize anyway.\n", ahc_name(ahc)); } ahc_outb(ahc, HCNTRL, ahc->pause); @@ -4116,7 +4116,7 @@ ahc_reset(struct ahc_softc *ahc, int reinit) ahc->features |= AHC_TWIN; break; default: - printf(" Unsupported adapter type. Ignoring\n"); + kprintf(" Unsupported adapter type. Ignoring\n"); return(-1); } @@ -4250,7 +4250,7 @@ ahc_init_scbdata(struct ahc_softc *ahc) scb_data->maxhscbs = ahc_probe_scbs(ahc); if (ahc->scb_data->maxhscbs == 0) { - printf("%s: No SCB space found\n", ahc_name(ahc)); + kprintf("%s: No SCB space found\n", ahc_name(ahc)); return (ENXIO); } @@ -4348,7 +4348,7 @@ ahc_init_scbdata(struct ahc_softc *ahc) ahc_alloc_scbs(ahc); if (scb_data->numscbs == 0) { - printf("%s: ahc_init_scbdata - " + kprintf("%s: ahc_init_scbdata - " "Unable to allocate initial scbs\n", ahc_name(ahc)); goto error_exit; @@ -4695,7 +4695,7 @@ ahc_chip_init(struct ahc_softc *ahc) * in "fast" mode. */ if (bootverbose) - printf("%s: Downloading Sequencer Program...", + kprintf("%s: Downloading Sequencer Program...", ahc_name(ahc)); error = ahc_loadseq(ahc); @@ -4741,22 +4741,22 @@ ahc_init(struct ahc_softc *ahc) #endif #ifdef AHC_PRINT_SRAM - printf("Scratch Ram:"); + kprintf("Scratch Ram:"); for (i = 0x20; i < 0x5f; i++) { if (((i % 8) == 0) && (i != 0)) { - printf ("\n "); + kprintf ("\n "); } - printf (" 0x%x", ahc_inb(ahc, i)); + kprintf (" 0x%x", ahc_inb(ahc, i)); } if ((ahc->features & AHC_MORE_SRAM) != 0) { for (i = 0x70; i < 0x7f; i++) { if (((i % 8) == 0) && (i != 0)) { - printf ("\n "); + kprintf ("\n "); } - printf (" 0x%x", ahc_inb(ahc, i)); + kprintf (" 0x%x", ahc_inb(ahc, i)); } } - printf ("\n"); + kprintf ("\n"); /* * Reading uninitialized scratch ram may * generate parity errors. @@ -4870,14 +4870,14 @@ ahc_init(struct ahc_softc *ahc) * data for any target mode initiator. */ if (ahc_alloc_tstate(ahc, ahc->our_id, 'A') == NULL) { - printf("%s: unable to allocate ahc_tmode_tstate. " + kprintf("%s: unable to allocate ahc_tmode_tstate. " "Failing attach\n", ahc_name(ahc)); return (ENOMEM); } if ((ahc->features & AHC_TWIN) != 0) { if (ahc_alloc_tstate(ahc, ahc->our_id_b, 'B') == NULL) { - printf("%s: unable to allocate ahc_tmode_tstate. " + kprintf("%s: unable to allocate ahc_tmode_tstate. " "Failing attach\n", ahc_name(ahc)); return (ENOMEM); } @@ -4891,7 +4891,7 @@ ahc_init(struct ahc_softc *ahc) #ifdef AHC_DEBUG if (ahc_debug & AHC_SHOW_MISC) { - printf("%s: hardware scb %u bytes; kernel scb %u bytes; " + kprintf("%s: hardware scb %u bytes; kernel scb %u bytes; " "ahc_dma %u bytes\n", ahc_name(ahc), (u_int)sizeof(struct hardware_scb), @@ -4921,7 +4921,7 @@ ahc_init(struct ahc_softc *ahc) /* Grab the disconnection disable table and invert it for our needs */ if ((ahc->flags & AHC_USEDEFAULTS) != 0) { - printf("%s: Host Adapter Bios disabled. Using default SCSI " + kprintf("%s: Host Adapter Bios disabled. Using default SCSI " "device parameters\n", ahc_name(ahc)); ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B| AHC_TERM_ENB_A|AHC_TERM_ENB_B; @@ -5093,7 +5093,7 @@ ahc_pause_and_flushwork(struct ahc_softc *ahc) && ((intstat & INT_PEND) != 0 || (ahc_inb(ahc, SSTAT0) & (SELDO|SELINGO)) != 0)); if (maxloops == 0) { - printf("Infinite interrupt loop, INTSTAT = %x", + kprintf("Infinite interrupt loop, INTSTAT = %x", ahc_inb(ahc, INTSTAT)); } ahc_platform_flushwork(ahc); @@ -5351,7 +5351,7 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, while (qinpos != qintail) { scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinpos]); if (scb == NULL) { - printf("qinpos = %d, SCB index = %d\n", + kprintf("qinpos = %d, SCB index = %d\n", qinpos, ahc->qinfifo[qinpos]); panic("Loop 1\n"); } @@ -5374,7 +5374,7 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, if (cstat != CAM_REQ_CMP) ahc_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB in qinfifo\n"); + kprintf("Inactive SCB in qinfifo\n"); ahc_done(ahc, scb); /* FALLTHROUGH */ @@ -5417,7 +5417,7 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, scb = ahc_lookup_scb(ahc, ahc->qinfifo[qinstart]); if (scb == NULL) { - printf("found = %d, qinstart = %d, qinfifionext = %d\n", + kprintf("found = %d, qinstart = %d, qinfifionext = %d\n", found, qinstart, ahc->qinfifonext); panic("First/Second Qinfifo fixup\n"); } @@ -5455,7 +5455,7 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, ahc_outb(ahc, SCBPTR, next); scb_index = ahc_inb(ahc, SCB_TAG); if (scb_index >= ahc->scb_data->numscbs) { - printf("Waiting List inconsistency. " + kprintf("Waiting List inconsistency. " "SCB index == %d, yet numscbs == %d.", scb_index, ahc->scb_data->numscbs); ahc_dump_card_state(ahc); @@ -5463,7 +5463,7 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, } scb = ahc_lookup_scb(ahc, scb_index); if (scb == NULL) { - printf("scb_index = %d, next = %d\n", + kprintf("scb_index = %d, next = %d\n", scb_index, next); panic("Waiting List traversal\n"); } @@ -5487,7 +5487,7 @@ ahc_search_qinfifo(struct ahc_softc *ahc, int target, char channel, if (cstat != CAM_REQ_CMP) ahc_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB in Waiting List\n"); + kprintf("Inactive SCB in Waiting List\n"); ahc_done(ahc, scb); /* FALLTHROUGH */ } @@ -5594,7 +5594,7 @@ ahc_search_untagged_queues(struct ahc_softc *ahc, ahc_io_ctx_t ctx, if (cstat != CAM_REQ_CMP) ahc_freeze_scb(scb); if ((scb->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB in untaggedQ\n"); + kprintf("Inactive SCB in untaggedQ\n"); ahc_done(ahc, scb); break; } @@ -5641,7 +5641,7 @@ ahc_search_disc_list(struct ahc_softc *ahc, int target, char channel, ahc_outb(ahc, SCBPTR, next); scb_index = ahc_inb(ahc, SCB_TAG); if (scb_index >= ahc->scb_data->numscbs) { - printf("Disconnected List inconsistency. " + kprintf("Disconnected List inconsistency. " "SCB index == %d, yet numscbs == %d.", scb_index, ahc->scb_data->numscbs); ahc_dump_card_state(ahc); @@ -5897,7 +5897,7 @@ ahc_abort_scbs(struct ahc_softc *ahc, int target, char channel, if (ahc_get_transaction_status(scbp) != CAM_REQ_CMP) ahc_freeze_scb(scbp); if ((scbp->flags & SCB_ACTIVE) == 0) - printf("Inactive SCB on pending list\n"); + kprintf("Inactive SCB on pending list\n"); ahc_done(ahc, scbp); found++; } @@ -6175,7 +6175,7 @@ ahc_calc_residual(struct ahc_softc *ahc, struct scb *scb) #ifdef AHC_DEBUG if ((ahc_debug & AHC_SHOW_MISC) != 0) { ahc_print_path(ahc, scb); - printf("Handled %sResidual of %d bytes\n", + kprintf("Handled %sResidual of %d bytes\n", (scb->flags & SCB_SENSE) ? "Sense " : "", resid); } #endif @@ -6215,7 +6215,7 @@ ahc_queue_lstate_event(struct ahc_softc *ahc, struct ahc_tmode_lstate *lstate, if (pending == AHC_TMODE_EVENT_BUFFER_SIZE) { xpt_print_path(lstate->path); - printf("immediate event %x:%x lost\n", + kprintf("immediate event %x:%x lost\n", lstate->event_buffer[lstate->event_r_idx].event_type, lstate->event_buffer[lstate->event_r_idx].event_arg); lstate->event_r_idx++; @@ -6285,7 +6285,7 @@ ahc_dumpseq(struct ahc_softc* ahc) uint8_t ins_bytes[4]; ahc_insb(ahc, SEQRAM, ins_bytes, 4); - printf("0x%08x\n", ins_bytes[0] << 24 + kprintf("0x%08x\n", ins_bytes[0] << 24 | ins_bytes[1] << 16 | ins_bytes[2] << 8 | ins_bytes[3]); @@ -6353,7 +6353,7 @@ ahc_loadseq(struct ahc_softc *ahc) * storage capacity for this chip. Fail * the load. */ - printf("\n%s: Program too large for instruction memory " + kprintf("\n%s: Program too large for instruction memory " "size of %d!\n", ahc_name(ahc), ahc->instruction_ram_size); return (ENOMEM); @@ -6393,8 +6393,8 @@ ahc_loadseq(struct ahc_softc *ahc) ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS|FASTMODE); if (bootverbose) { - printf(" %d instructions downloaded\n", downloaded); - printf("%s: Features 0x%x, Bugs 0x%x, Flags 0x%x\n", + kprintf(" %d instructions downloaded\n", downloaded); + kprintf("%s: Features 0x%x, Bugs 0x%x, Flags 0x%x\n", ahc_name(ahc), ahc->features, ahc->bugs, ahc->flags); } return (0); @@ -6570,12 +6570,12 @@ ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries, u_int printed_mask; if (cur_column != NULL && *cur_column >= wrap_point) { - printf("\n"); + kprintf("\n"); *cur_column = 0; } - printed = printf("%s[0x%x]", name, value); + printed = kprintf("%s[0x%x]", name, value); if (table == NULL) { - printed += printf(" "); + printed += kprintf(" "); *cur_column += printed; return (printed); } @@ -6590,7 +6590,7 @@ ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries, == table[entry].mask)) continue; - printed += printf("%s%s", + printed += kprintf("%s%s", printed_mask == 0 ? ":(" : "|", table[entry].name); printed_mask |= table[entry].mask; @@ -6601,9 +6601,9 @@ ahc_print_register(ahc_reg_parse_entry_t *table, u_int num_entries, break; } if (printed_mask != 0) - printed += printf(") "); + printed += kprintf(") "); else - printed += printf(" "); + printed += kprintf(" "); if (cur_column != NULL) *cur_column += printed; return (printed); @@ -6635,16 +6635,16 @@ ahc_dump_card_state(struct ahc_softc *ahc) saved_scbptr = ahc_inb(ahc, SCBPTR); last_phase = ahc_inb(ahc, LASTPHASE); - printf(">>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<\n" + kprintf(">>>>>>>>>>>>>>>>>> Dump Card State Begins <<<<<<<<<<<<<<<<<\n" "%s: Dumping Card State %s, at SEQADDR 0x%x\n", ahc_name(ahc), ahc_lookup_phase_entry(last_phase)->phasemsg, ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8)); if (paused) - printf("Card was paused\n"); - printf("ACCUM = 0x%x, SINDEX = 0x%x, DINDEX = 0x%x, ARG_2 = 0x%x\n", + kprintf("Card was paused\n"); + kprintf("ACCUM = 0x%x, SINDEX = 0x%x, DINDEX = 0x%x, ARG_2 = 0x%x\n", ahc_inb(ahc, ACCUM), ahc_inb(ahc, SINDEX), ahc_inb(ahc, DINDEX), ahc_inb(ahc, ARG_2)); - printf("HCNT = 0x%x SCBPTR = 0x%x\n", ahc_inb(ahc, HCNT), + kprintf("HCNT = 0x%x SCBPTR = 0x%x\n", ahc_inb(ahc, HCNT), ahc_inb(ahc, SCBPTR)); cur_col = 0; if ((ahc->features & AHC_DT) != 0) @@ -6668,15 +6668,15 @@ ahc_dump_card_state(struct ahc_softc *ahc) ahc_dfcntrl_print(ahc_inb(ahc, DFCNTRL), &cur_col, 50); ahc_dfstatus_print(ahc_inb(ahc, DFSTATUS), &cur_col, 50); if (cur_col != 0) - printf("\n"); - printf("STACK:"); + kprintf("\n"); + kprintf("STACK:"); for (i = 0; i < STACK_SIZE; i++) - printf(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8)); - printf("\nSCB count = %d\n", ahc->scb_data->numscbs); - printf("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag); - printf("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB)); + kprintf(" 0x%x", ahc_inb(ahc, STACK)|(ahc_inb(ahc, STACK) << 8)); + kprintf("\nSCB count = %d\n", ahc->scb_data->numscbs); + kprintf("Kernel NEXTQSCB = %d\n", ahc->next_queued_scb->hscb->tag); + kprintf("Card NEXTQSCB = %d\n", ahc_inb(ahc, NEXT_QUEUED_SCB)); /* QINFIFO */ - printf("QINFIFO entries: "); + kprintf("QINFIFO entries: "); if ((ahc->features & AHC_QUEUE_REGS) != 0) { qinpos = ahc_inb(ahc, SNSCB_QOFF); ahc_outb(ahc, SNSCB_QOFF, qinpos); @@ -6684,109 +6684,109 @@ ahc_dump_card_state(struct ahc_softc *ahc) qinpos = ahc_inb(ahc, QINPOS); qintail = ahc->qinfifonext; while (qinpos != qintail) { - printf("%d ", ahc->qinfifo[qinpos]); + kprintf("%d ", ahc->qinfifo[qinpos]); qinpos++; } - printf("\n"); + kprintf("\n"); - printf("Waiting Queue entries: "); + kprintf("Waiting Queue entries: "); scb_index = ahc_inb(ahc, WAITING_SCBH); i = 0; while (scb_index != SCB_LIST_NULL && i++ < 256) { ahc_outb(ahc, SCBPTR, scb_index); - printf("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); + kprintf("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); scb_index = ahc_inb(ahc, SCB_NEXT); } - printf("\n"); + kprintf("\n"); - printf("Disconnected Queue entries: "); + kprintf("Disconnected Queue entries: "); scb_index = ahc_inb(ahc, DISCONNECTED_SCBH); i = 0; while (scb_index != SCB_LIST_NULL && i++ < 256) { ahc_outb(ahc, SCBPTR, scb_index); - printf("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); + kprintf("%d:%d ", scb_index, ahc_inb(ahc, SCB_TAG)); scb_index = ahc_inb(ahc, SCB_NEXT); } - printf("\n"); + kprintf("\n"); ahc_sync_qoutfifo(ahc, BUS_DMASYNC_POSTREAD); - printf("QOUTFIFO entries: "); + kprintf("QOUTFIFO entries: "); qoutpos = ahc->qoutfifonext; i = 0; while (ahc->qoutfifo[qoutpos] != SCB_LIST_NULL && i++ < 256) { - printf("%d ", ahc->qoutfifo[qoutpos]); + kprintf("%d ", ahc->qoutfifo[qoutpos]); qoutpos++; } - printf("\n"); + kprintf("\n"); - printf("Sequencer Free SCB List: "); + kprintf("Sequencer Free SCB List: "); scb_index = ahc_inb(ahc, FREE_SCBH); i = 0; while (scb_index != SCB_LIST_NULL && i++ < 256) { ahc_outb(ahc, SCBPTR, scb_index); - printf("%d ", scb_index); + kprintf("%d ", scb_index); scb_index = ahc_inb(ahc, SCB_NEXT); } - printf("\n"); + kprintf("\n"); - printf("Sequencer SCB Info: "); + kprintf("Sequencer SCB Info: "); for (i = 0; i < ahc->scb_data->maxhscbs; i++) { ahc_outb(ahc, SCBPTR, i); - cur_col = printf("\n%3d ", i); + cur_col = kprintf("\n%3d ", i); ahc_scb_control_print(ahc_inb(ahc, SCB_CONTROL), &cur_col, 60); ahc_scb_scsiid_print(ahc_inb(ahc, SCB_SCSIID), &cur_col, 60); ahc_scb_lun_print(ahc_inb(ahc, SCB_LUN), &cur_col, 60); ahc_scb_tag_print(ahc_inb(ahc, SCB_TAG), &cur_col, 60); } - printf("\n"); + kprintf("\n"); - printf("Pending list: "); + kprintf("Pending list: "); i = 0; LIST_FOREACH(scb, &ahc->pending_scbs, pending_links) { if (i++ > 256) break; - cur_col = printf("\n%3d ", scb->hscb->tag); + cur_col = kprintf("\n%3d ", scb->hscb->tag); ahc_scb_control_print(scb->hscb->control, &cur_col, 60); ahc_scb_scsiid_print(scb->hscb->scsiid, &cur_col, 60); ahc_scb_lun_print(scb->hscb->lun, &cur_col, 60); if ((ahc->flags & AHC_PAGESCBS) == 0) { ahc_outb(ahc, SCBPTR, scb->hscb->tag); - printf("("); + kprintf("("); ahc_scb_control_print(ahc_inb(ahc, SCB_CONTROL), &cur_col, 60); ahc_scb_tag_print(ahc_inb(ahc, SCB_TAG), &cur_col, 60); - printf(")"); + kprintf(")"); } } - printf("\n"); + kprintf("\n"); - printf("Kernel Free SCB list: "); + kprintf("Kernel Free SCB list: "); i = 0; SLIST_FOREACH(scb, &ahc->scb_data->free_scbs, links.sle) { if (i++ > 256) break; - printf("%d ", scb->hscb->tag); + kprintf("%d ", scb->hscb->tag); } - printf("\n"); + kprintf("\n"); maxtarget = (ahc->features & (AHC_WIDE|AHC_TWIN)) ? 15 : 7; for (target = 0; target <= maxtarget; target++) { untagged_q = &ahc->untagged_queues[target]; if (TAILQ_FIRST(untagged_q) == NULL) continue; - printf("Untagged Q(%d): ", target); + kprintf("Untagged Q(%d): ", target); i = 0; TAILQ_FOREACH(scb, untagged_q, links.tqe) { if (i++ > 256) break; - printf("%d ", scb->hscb->tag); + kprintf("%d ", scb->hscb->tag); } - printf("\n"); + kprintf("\n"); } ahc_platform_dump_card_state(ahc); - printf("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n"); + kprintf("\n<<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>\n"); ahc_outb(ahc, SCBPTR, saved_scbptr); if (paused == 0) ahc_unpause(ahc); @@ -6927,7 +6927,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) u_long s; ahc_flag saved_flags; - printf("Configuring Target Mode\n"); + kprintf("Configuring Target Mode\n"); ahc_lock(ahc, &s); if (LIST_FIRST(&ahc->pending_scbs) != NULL) { ccb->ccb_h.status = CAM_BUSY; @@ -6973,7 +6973,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) /* Are we already enabled?? */ if (lstate != NULL) { xpt_print_path(ccb->ccb_h.path); - printf("Lun already enabled\n"); + kprintf("Lun already enabled\n"); ccb->ccb_h.status = CAM_LUN_ALRDY_ENA; return; } @@ -6985,7 +6985,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) * specific commands. */ ccb->ccb_h.status = CAM_REQ_INVALID; - printf("Non-zero Group Codes\n"); + kprintf("Non-zero Group Codes\n"); return; } @@ -6997,7 +6997,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) tstate = ahc_alloc_tstate(ahc, target, channel); if (tstate == NULL) { xpt_print_path(ccb->ccb_h.path); - printf("Couldn't allocate tstate\n"); + kprintf("Couldn't allocate tstate\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; return; } @@ -7010,7 +7010,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) if (status != CAM_REQ_CMP) { kfree(lstate, M_DEVBUF); xpt_print_path(ccb->ccb_h.path); - printf("Couldn't allocate path\n"); + kprintf("Couldn't allocate path\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; return; } @@ -7085,7 +7085,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) ahc_unlock(ahc, &s); ccb->ccb_h.status = CAM_REQ_CMP; xpt_print_path(ccb->ccb_h.path); - printf("Lun now enabled for target mode\n"); + kprintf("Lun now enabled for target mode\n"); } else { struct scb *scb; int i, empty; @@ -7104,7 +7104,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) ccbh = &scb->io_ctx->ccb_h; if (ccbh->func_code == XPT_CONT_TARGET_IO && !xpt_path_comp(ccbh->path, ccb->ccb_h.path)){ - printf("CTIO pending\n"); + kprintf("CTIO pending\n"); ccb->ccb_h.status = CAM_REQ_INVALID; ahc_unlock(ahc, &s); return; @@ -7112,12 +7112,12 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) } if (SLIST_FIRST(&lstate->accept_tios) != NULL) { - printf("ATIOs pending\n"); + kprintf("ATIOs pending\n"); ccb->ccb_h.status = CAM_REQ_INVALID; } if (SLIST_FIRST(&lstate->immed_notifies) != NULL) { - printf("INOTs pending\n"); + kprintf("INOTs pending\n"); ccb->ccb_h.status = CAM_REQ_INVALID; } @@ -7127,7 +7127,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) } xpt_print_path(ccb->ccb_h.path); - printf("Target mode disabled\n"); + kprintf("Target mode disabled\n"); xpt_free_path(lstate->path); kfree(lstate, M_DEVBUF); @@ -7181,7 +7181,7 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) ahc_outb(ahc, SCSISEQ, scsiseq); if ((ahc->features & AHC_MULTIROLE) == 0) { - printf("Configuring Initiator Mode\n"); + kprintf("Configuring Initiator Mode\n"); ahc->flags &= ~AHC_TARGETROLE; ahc->flags |= AHC_INITIATORROLE; /* @@ -7328,12 +7328,12 @@ ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd) * Wait for more ATIOs from the peripheral driver for this lun. */ if (bootverbose) - printf("%s: ATIOs exhausted\n", ahc_name(ahc)); + kprintf("%s: ATIOs exhausted\n", ahc_name(ahc)); return (1); } else ahc->flags &= ~AHC_TQINFIFO_BLOCKED; #if 0 - printf("Incoming command from %d for %d:%d%s\n", + kprintf("Incoming command from %d for %d:%d%s\n", initiator, target, lun, lstate == ahc->black_hole ? "(Black Holed)" : ""); #endif @@ -7380,7 +7380,7 @@ ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd) default: /* Only copy the opcode. */ atio->cdb_len = 1; - printf("Reserved or VU command code type encountered\n"); + kprintf("Reserved or VU command code type encountered\n"); break; } @@ -7396,7 +7396,7 @@ ahc_handle_target_cmd(struct ahc_softc *ahc, struct target_cmd *cmd) * to this accept tio. */ #if 0 - printf("Received Immediate Command %d:%d:%d - %p\n", + kprintf("Received Immediate Command %d:%d:%d - %p\n", initiator, target, lun, ahc->pending_device); #endif ahc->pending_device = lstate; diff --git a/sys/dev/disk/aic7xxx/aic7xxx_93cx6.c b/sys/dev/disk/aic7xxx/aic7xxx_93cx6.c index 6978e30e58..79de8ae646 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx_93cx6.c +++ b/sys/dev/disk/aic7xxx/aic7xxx_93cx6.c @@ -31,7 +31,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_93cx6.c#17 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_93cx6.c,v 1.8.2.6 2002/08/31 07:25:53 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_93cx6.c,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_93cx6.c,v 1.4 2006/12/22 23:26:15 swildner Exp $ */ /* @@ -203,14 +203,14 @@ ahc_read_seeprom(struct seeprom_descriptor *sd, uint16_t *buf, reset_seeprom(sd); } #ifdef AHC_DUMP_EEPROM - printf("\nSerial EEPROM:\n\t"); + kprintf("\nSerial EEPROM:\n\t"); for (k = 0; k < count; k = k + 1) { if (((k % 8) == 0) && (k != 0)) { - printf ("\n\t"); + kprintf ("\n\t"); } - printf (" 0x%x", buf[k]); + kprintf (" 0x%x", buf[k]); } - printf ("\n"); + kprintf ("\n"); #endif return (1); } diff --git a/sys/dev/disk/aic7xxx/aic7xxx_osm.c b/sys/dev/disk/aic7xxx/aic7xxx_osm.c index 156b435928..477d420950 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx_osm.c +++ b/sys/dev/disk/aic7xxx/aic7xxx_osm.c @@ -31,7 +31,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.c#13 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.c,v 1.27.2.6 2003/06/10 03:26:09 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_osm.c,v 1.10 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_osm.c,v 1.11 2006/12/22 23:26:15 swildner Exp $ */ #include "aic7xxx_osm.h" @@ -121,7 +121,7 @@ ahc_attach(struct ahc_softc *ahc) sim2 = NULL; ahc_controller_info(ahc, ahc_info); - printf("%s\n", ahc_info); + kprintf("%s\n", ahc_info); ahc_lock(ahc, &s); /* * Attach secondary channel first if the user has @@ -174,13 +174,13 @@ ahc_attach(struct ahc_softc *ahc) AHC_MAX_QUEUE, NULL); if (sim2 == NULL) { - printf("ahc_attach: Unable to attach second " + kprintf("ahc_attach: Unable to attach second " "bus due to resource shortage"); goto fail; } if (xpt_bus_register(sim2, bus_id2) != CAM_SUCCESS) { - printf("ahc_attach: Unable to attach second " + kprintf("ahc_attach: Unable to attach second " "bus due to resource shortage"); /* * We do not want to destroy the device queue @@ -303,7 +303,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) } else { if (bootverbose) { xpt_print_path(ccb->ccb_h.path); - printf("Still connected\n"); + kprintf("Still connected\n"); } ahc_freeze_ccb(ccb); } @@ -348,7 +348,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb) || ahc_get_transaction_status(scb) == CAM_REQ_ABORTED) ahc_set_transaction_status(scb, CAM_CMD_TIMEOUT); ahc_print_path(ahc, scb); - printf("no longer in timeout, status = %x\n", + kprintf("no longer in timeout, status = %x\n", ccb->ccb_h.status); } @@ -845,7 +845,7 @@ ahc_action(struct cam_sim *sim, union ccb *ccb) ahc_unlock(ahc, &s); if (bootverbose) { xpt_print_path(SIM_PATH(ahc, sim)); - printf("SCSI bus reset delivered. " + kprintf("SCSI bus reset delivered. " "%d SCBs aborted.\n", found); } ccb->ccb_h.status = CAM_REQ_CMP; @@ -1454,7 +1454,7 @@ ahc_timeout(void *arg) if ((scb->flags & SCB_ACTIVE) == 0) { /* Previous timeout took care of me already */ - printf("%s: Timedout SCB already complete. " + kprintf("%s: Timedout SCB already complete. " "Interrupts may not be functioning.\n", ahc_name(ahc)); ahc_unpause(ahc); ahc_unlock(ahc, &s); @@ -1466,12 +1466,12 @@ ahc_timeout(void *arg) lun = SCB_GET_LUN(scb); ahc_print_path(ahc, scb); - printf("SCB 0x%x - timed out\n", scb->hscb->tag); + kprintf("SCB 0x%x - timed out\n", scb->hscb->tag); ahc_dump_card_state(ahc); last_phase = ahc_inb(ahc, LASTPHASE); if (scb->sg_count > 0) { for (i = 0; i < scb->sg_count; i++) { - printf("sg[%d] - Addr 0x%x : Length %d\n", + kprintf("sg[%d] - Addr 0x%x : Length %d\n", i, scb->sg_list[i].addr, scb->sg_list[i].len & AHC_SG_LEN_MASK); @@ -1485,7 +1485,7 @@ ahc_timeout(void *arg) bus_reset: ahc_set_transaction_status(scb, CAM_CMD_TIMEOUT); found = ahc_reset_channel(ahc, channel, /*Initiate Reset*/TRUE); - printf("%s: Issued Channel %c Bus Reset. " + kprintf("%s: Issued Channel %c Bus Reset. " "%d SCBs aborted\n", ahc_name(ahc), channel, found); } else { /* @@ -1532,7 +1532,7 @@ bus_reset: uint64_t newtimeout; ahc_print_path(ahc, scb); - printf("Other SCB Timeout%s", + kprintf("Other SCB Timeout%s", (scb->flags & SCB_OTHERTCL_TIMEOUT) != 0 ? " again\n" : "\n"); scb->flags |= SCB_OTHERTCL_TIMEOUT; @@ -1573,7 +1573,7 @@ bus_reset: ahc_outb(ahc, MSG_OUT, HOST_MSG); ahc_outb(ahc, SCSISIGO, last_phase|ATNO); ahc_print_path(ahc, active_scb); - printf("BDR message in message buffer\n"); + kprintf("BDR message in message buffer\n"); active_scb->flags |= SCB_DEVICE_RESET; callout_reset(&active_scb->io_ctx->ccb_h.timeout_ch, 2 * hz, ahc_timeout, active_scb); @@ -1589,7 +1589,7 @@ bus_reset: && (ahc_inb(ahc, SSTAT0) & TARGET) != 0) { /* XXX What happened to the SCB? */ /* Hung target selection. Goto busfree */ - printf("%s: Hung target selection\n", + kprintf("%s: Hung target selection\n", ahc_name(ahc)); ahc_restart(ahc); ahc_unlock(ahc, &s); @@ -1666,7 +1666,7 @@ bus_reset: CAM_REQUEUE_REQ, SEARCH_COMPLETE); ahc_print_path(ahc, scb); - printf("Queuing a BDR SCB\n"); + kprintf("Queuing a BDR SCB\n"); ahc_qinfifo_requeue_tail(ahc, scb); ahc_outb(ahc, SCBPTR, saved_scbptr); callout_reset(&scb->io_ctx->ccb_h.timeout_ch, @@ -1677,7 +1677,7 @@ bus_reset: /* This shouldn't happen */ ahc_set_recoveryscb(ahc, scb); ahc_print_path(ahc, scb); - printf("SCB %d: Immediate reset. " + kprintf("SCB %d: Immediate reset. " "Flags = 0x%x\n", scb->hscb->tag, scb->flags); goto bus_reset; @@ -1752,7 +1752,7 @@ ahc_abort_ccb(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb) ccb->ccb_h.status = CAM_REQ_CMP; } else { xpt_print_path(abort_ccb->ccb_h.path); - printf("Not found\n"); + kprintf("Not found\n"); ccb->ccb_h.status = CAM_PATH_INVALID; } break; @@ -1929,14 +1929,14 @@ ahc_dump_targcmd(struct target_cmd *cmd) i = 0; while (byte < last_byte) { if (i == 0) - printf("\t"); - printf("%#x", *byte++); + kprintf("\t"); + kprintf("%#x", *byte++); i++; if (i == 8) { - printf("\n"); + kprintf("\n"); i = 0; } else { - printf(", "); + kprintf(", "); } } } diff --git a/sys/dev/disk/aic7xxx/aic7xxx_pci.c b/sys/dev/disk/aic7xxx/aic7xxx_pci.c index 49fb1f0f3b..59d23b9d96 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx_pci.c +++ b/sys/dev/disk/aic7xxx/aic7xxx_pci.c @@ -42,7 +42,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#69 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.2.2.17 2003/06/10 03:26:09 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_pci.c,v 1.5 2006/09/05 16:50:50 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_pci.c,v 1.6 2006/12/22 23:26:15 swildner Exp $ */ #ifdef __linux__ @@ -826,7 +826,7 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) if ((ahc->flags & AHC_39BIT_ADDRESSING) != 0) { if (bootverbose) - printf("%s: Enabling 39Bit Addressing\n", + kprintf("%s: Enabling 39Bit Addressing\n", ahc_name(ahc)); devconfig |= DACEN; } @@ -972,7 +972,7 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry) /* See if someone else set us up already */ if ((ahc->flags & AHC_NO_BIOS_INIT) == 0 && scsiseq != 0) { - printf("%s: Using left over BIOS settings\n", + kprintf("%s: Using left over BIOS settings\n", ahc_name(ahc)); ahc->flags &= ~AHC_USEDEFAULTS; ahc->flags |= AHC_BIOS_ENABLED; @@ -1240,7 +1240,7 @@ done: ahc_outb(ahc, CLRINT, CLRPARERR); ahc_outb(ahc, CLRINT, CLRBRKADRINT); if (bootverbose && enable) { - printf("%s: External SRAM, %s access%s, %dbytes/SCB\n", + kprintf("%s: External SRAM, %s access%s, %dbytes/SCB\n", ahc_name(ahc), fast ? "fast" : "slow", pcheck ? ", parity checking enabled" : "", large ? 64 : 32); @@ -1365,7 +1365,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) if (have_seeprom) { if (bootverbose) - printf("%s: Reading SEEPROM...", ahc_name(ahc)); + kprintf("%s: Reading SEEPROM...", ahc_name(ahc)); for (;;) { u_int start_addr; @@ -1382,9 +1382,9 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) if (have_seeprom != 0 || sd.sd_chip == C56_66) { if (bootverbose) { if (have_seeprom == 0) - printf ("checksum error\n"); + kprintf ("checksum error\n"); else - printf ("done.\n"); + kprintf ("done.\n"); } break; } @@ -1431,7 +1431,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) if (!have_seeprom) { if (bootverbose) - printf("%s: No SEEPROM available.\n", ahc_name(ahc)); + kprintf("%s: No SEEPROM available.\n", ahc_name(ahc)); ahc->flags |= AHC_USEDEFAULTS; kfree(ahc->seep_config, M_DEVBUF); ahc->seep_config = NULL; @@ -1468,7 +1468,7 @@ check_extport(struct ahc_softc *ahc, u_int *sxfrctl1) if ((sc->adapter_control & CFSTERM) != 0) *sxfrctl1 |= STPWEN; if (bootverbose) - printf("%s: Low byte termination %sabled\n", + kprintf("%s: Low byte termination %sabled\n", ahc_name(ahc), (*sxfrctl1 & STPWEN) ? "en" : "dis"); } @@ -1638,7 +1638,7 @@ configure_termination(struct ahc_softc *ahc, &eeprom_present); if ((adapter_control & CFSEAUTOTERM) == 0) { if (bootverbose) - printf("%s: Manual SE Termination\n", + kprintf("%s: Manual SE Termination\n", ahc_name(ahc)); enableSEC_low = (adapter_control & CFSELOWTERM); enableSEC_high = @@ -1646,7 +1646,7 @@ configure_termination(struct ahc_softc *ahc, } if ((adapter_control & CFAUTOTERM) == 0) { if (bootverbose) - printf("%s: Manual LVD Termination\n", + kprintf("%s: Manual LVD Termination\n", ahc_name(ahc)); enablePRI_low = (adapter_control & CFSTERM); enablePRI_high = (adapter_control & CFWSTERM); @@ -1673,19 +1673,19 @@ configure_termination(struct ahc_softc *ahc, if (bootverbose && (ahc->features & AHC_ULTRA2) == 0) { - printf("%s: internal 50 cable %s present", + kprintf("%s: internal 50 cable %s present", ahc_name(ahc), internal50_present ? "is":"not"); if ((ahc->features & AHC_WIDE) != 0) - printf(", internal 68 cable %s present", + kprintf(", internal 68 cable %s present", internal68_present ? "is":"not"); - printf("\n%s: external cable %s present\n", + kprintf("\n%s: external cable %s present\n", ahc_name(ahc), externalcable_present ? "is":"not"); } if (bootverbose) - printf("%s: BIOS eeprom %s present\n", + kprintf("%s: BIOS eeprom %s present\n", ahc_name(ahc), eeprom_present ? "is" : "not"); if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) { @@ -1711,7 +1711,7 @@ configure_termination(struct ahc_softc *ahc, && (internal50_present != 0) && (internal68_present != 0) && (externalcable_present != 0)) { - printf("%s: Illegal cable configuration!!. " + kprintf("%s: Illegal cable configuration!!. " "Only two connectors on the " "adapter may be used at a " "time!\n", ahc_name(ahc)); @@ -1733,10 +1733,10 @@ configure_termination(struct ahc_softc *ahc, brddat |= BRDDAT6; if (bootverbose) { if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) - printf("%s: 68 pin termination " + kprintf("%s: 68 pin termination " "Enabled\n", ahc_name(ahc)); else - printf("%s: %sHigh byte termination " + kprintf("%s: %sHigh byte termination " "Enabled\n", ahc_name(ahc), enableSEC_high ? "Secondary " : ""); @@ -1752,10 +1752,10 @@ configure_termination(struct ahc_softc *ahc, *sxfrctl1 |= STPWEN; if (bootverbose) { if ((ahc->flags & AHC_INT50_SPEEDFLEX) != 0) - printf("%s: 50 pin termination " + kprintf("%s: 50 pin termination " "Enabled\n", ahc_name(ahc)); else - printf("%s: %sLow byte termination " + kprintf("%s: %sLow byte termination " "Enabled\n", ahc_name(ahc), enableSEC_low ? "Secondary " : ""); @@ -1765,7 +1765,7 @@ configure_termination(struct ahc_softc *ahc, if (enablePRI_low != 0) { *sxfrctl1 |= STPWEN; if (bootverbose) - printf("%s: Primary Low Byte termination " + kprintf("%s: Primary Low Byte termination " "Enabled\n", ahc_name(ahc)); } @@ -1778,7 +1778,7 @@ configure_termination(struct ahc_softc *ahc, if (enablePRI_high != 0) { brddat |= BRDDAT4; if (bootverbose) - printf("%s: Primary High Byte " + kprintf("%s: Primary High Byte " "termination Enabled\n", ahc_name(ahc)); } @@ -1790,7 +1790,7 @@ configure_termination(struct ahc_softc *ahc, *sxfrctl1 |= STPWEN; if (bootverbose) - printf("%s: %sLow byte termination Enabled\n", + kprintf("%s: %sLow byte termination Enabled\n", ahc_name(ahc), (ahc->features & AHC_ULTRA2) ? "Primary " : ""); @@ -1800,7 +1800,7 @@ configure_termination(struct ahc_softc *ahc, && (ahc->features & AHC_WIDE) != 0) { brddat |= BRDDAT6; if (bootverbose) - printf("%s: %sHigh byte termination Enabled\n", + kprintf("%s: %sHigh byte termination Enabled\n", ahc_name(ahc), (ahc->features & AHC_ULTRA2) ? "Secondary " : ""); @@ -2006,29 +2006,29 @@ ahc_pci_intr(struct ahc_softc *ahc) status1 = ahc_pci_read_config(ahc->dev_softc, PCIR_STATUS + 1, /*bytes*/1); - printf("%s: PCI error Interrupt at seqaddr = 0x%x\n", + kprintf("%s: PCI error Interrupt at seqaddr = 0x%x\n", ahc_name(ahc), ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8)); if (status1 & DPE) { ahc->pci_target_perr_count++; - printf("%s: Data Parity Error Detected during address " + kprintf("%s: Data Parity Error Detected during address " "or write data phase\n", ahc_name(ahc)); } if (status1 & SSE) { - printf("%s: Signal System Error Detected\n", ahc_name(ahc)); + kprintf("%s: Signal System Error Detected\n", ahc_name(ahc)); } if (status1 & RMA) { - printf("%s: Received a Master Abort\n", ahc_name(ahc)); + kprintf("%s: Received a Master Abort\n", ahc_name(ahc)); } if (status1 & RTA) { - printf("%s: Received a Target Abort\n", ahc_name(ahc)); + kprintf("%s: Received a Target Abort\n", ahc_name(ahc)); } if (status1 & STA) { - printf("%s: Signaled a Target Abort\n", ahc_name(ahc)); + kprintf("%s: Signaled a Target Abort\n", ahc_name(ahc)); } if (status1 & DPR) { - printf("%s: Data Parity Error has been reported via PERR#\n", + kprintf("%s: Data Parity Error has been reported via PERR#\n", ahc_name(ahc)); } @@ -2037,14 +2037,14 @@ ahc_pci_intr(struct ahc_softc *ahc) status1, /*bytes*/1); if ((status1 & (DPE|SSE|RMA|RTA|STA|DPR)) == 0) { - printf("%s: Latched PCIERR interrupt with " + kprintf("%s: Latched PCIERR interrupt with " "no status bits set\n", ahc_name(ahc)); } else { ahc_outb(ahc, CLRINT, CLRPARERR); } if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH) { - printf( + kprintf( "%s: WARNING WARNING WARNING WARNING\n" "%s: Too many PCI parity errors observed as a target.\n" "%s: Some device on this bus is generating bad parity.\n" @@ -2402,7 +2402,7 @@ ahc_aha29160C_setup(struct ahc_softc *ahc) static int ahc_raid_setup(struct ahc_softc *ahc) { - printf("RAID functionality unsupported\n"); + kprintf("RAID functionality unsupported\n"); return (ENXIO); } @@ -2420,7 +2420,7 @@ ahc_aha394XX_setup(struct ahc_softc *ahc) ahc->channel = 'B'; break; default: - printf("adapter at unexpected slot %d\n" + kprintf("adapter at unexpected slot %d\n" "unable to map to a channel\n", ahc_get_pci_slot(pci)); ahc->channel = 'A'; @@ -2445,7 +2445,7 @@ ahc_aha398XX_setup(struct ahc_softc *ahc) ahc->channel = 'C'; break; default: - printf("adapter at unexpected slot %d\n" + kprintf("adapter at unexpected slot %d\n" "unable to map to a channel\n", ahc_get_pci_slot(pci)); ahc->channel = 'A'; @@ -2475,7 +2475,7 @@ ahc_aha494XX_setup(struct ahc_softc *ahc) ahc->channel = 'D'; break; default: - printf("adapter at unexpected slot %d\n" + kprintf("adapter at unexpected slot %d\n" "unable to map to a channel\n", ahc_get_pci_slot(pci)); ahc->channel = 'A'; diff --git a/sys/dev/disk/amd/amd.c b/sys/dev/disk/amd/amd.c index cfa2c3d35e..a0a7dae85a 100644 --- a/sys/dev/disk/amd/amd.c +++ b/sys/dev/disk/amd/amd.c @@ -31,7 +31,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************* * $FreeBSD: src/sys/pci/amd.c,v 1.3.2.2 2001/06/02 04:32:50 nyan Exp $ - * $DragonFly: src/sys/dev/disk/amd/amd.c,v 1.11 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/amd/amd.c,v 1.12 2006/12/22 23:26:15 swildner Exp $ */ /* @@ -289,7 +289,7 @@ amdexecutesrb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) if (error != 0) { if (error != EFBIG) - printf("amd%d: Unexepected error 0x%x returned from " + kprintf("amd%d: Unexepected error 0x%x returned from " "bus_dmamap_load\n", amd->unit, error); if (ccb->ccb_h.status == CAM_REQ_INPROG) { xpt_freeze_devq(ccb->ccb_h.path, /*count*/1); @@ -836,7 +836,7 @@ amd_reset(struct amd_softc * amd) #ifdef AMD_DEBUG0 - printf("DC390: RESET"); + kprintf("DC390: RESET"); #endif crit_enter(); @@ -965,7 +965,7 @@ amd_intr(void *arg) if (amd == NULL) { #ifdef AMD_DEBUG0 - printf("amd_intr: amd NULL return......"); + kprintf("amd_intr: amd NULL return......"); #endif return; } @@ -973,19 +973,19 @@ amd_intr(void *arg) scsistat = amd_read8(amd, SCSISTATREG); if (!(scsistat & INTERRUPT)) { #ifdef AMD_DEBUG0 - printf("amd_intr: scsistat = NULL ,return......"); + kprintf("amd_intr: scsistat = NULL ,return......"); #endif return; } #ifdef AMD_DEBUG_SCSI_PHASE - printf("scsistat=%2x,", scsistat); + kprintf("scsistat=%2x,", scsistat); #endif internstat = amd_read8(amd, INTERNSTATREG); intstat = amd_read8(amd, INTSTATREG); #ifdef AMD_DEBUG_SCSI_PHASE - printf("intstat=%2x,", intstat); + kprintf("intstat=%2x,", intstat); #endif if (intstat & DISCONNECTED) { @@ -1209,7 +1209,7 @@ amdparsemsg(struct amd_softc *amd) || disc_srb->SRBState != SRB_DISCONNECT || disc_srb->pccb->ccb_h.target_id != amd->cur_target || disc_srb->pccb->ccb_h.target_lun != amd->cur_lun) { - printf("amd%d: Unexpected tagged reselection " + kprintf("amd%d: Unexpected tagged reselection " "for target %d, Issuing Abort\n", amd->unit, amd->cur_target); amd->msgout_buf[0] = MSG_ABORT; @@ -1293,7 +1293,7 @@ amdparsemsg(struct amd_softc *amd) * Send our own SDTR in reply */ if (bootverbose) - printf("Sending SDTR!\n"); + kprintf("Sending SDTR!\n"); amd->msgout_index = 0; amd->msgout_len = 0; amdconstructsdtr(amd, period, offset); @@ -1448,14 +1448,14 @@ amdhandlemsgreject(struct amd_softc *amd) amdsetsync(amd, amd->cur_target, /*clockrate*/0, /*period*/0, /*offset*/0, AMD_TRANS_ACTIVE|AMD_TRANS_GOAL); - printf("amd%d:%d: refuses synchronous negotiation. " + kprintf("amd%d:%d: refuses synchronous negotiation. " "Using asynchronous transfers\n", amd->unit, amd->cur_target); } else if ((srb != NULL) && (srb->pccb->ccb_h.flags & CAM_TAG_ACTION_VALID) != 0) { struct ccb_trans_settings neg; - printf("amd%d:%d: refuses tagged commands. Performing " + kprintf("amd%d:%d: refuses tagged commands. Performing " "non-tagged I/O\n", amd->unit, amd->cur_target); amdsettags(amd, amd->cur_target, FALSE); @@ -1492,7 +1492,7 @@ amdhandlemsgreject(struct amd_softc *amd) /* * Otherwise, we ignore it. */ - printf("amd%d:%d: Message reject received -- ignored\n", + kprintf("amd%d:%d: Message reject received -- ignored\n", amd->unit, amd->cur_target); } return (response); @@ -1808,7 +1808,7 @@ amd_Reselect(struct amd_softc *amd) amd->active_srb = amd->untagged_srbs[amd->cur_target][amd->cur_lun]; disc_count = amd->disc_count[amd->cur_target][amd->cur_lun]; if (disc_count == 0) { - printf("amd%d: Unexpected reselection for target %d, " + kprintf("amd%d: Unexpected reselection for target %d, " "Issuing Abort\n", amd->unit, amd->cur_target); amd->msgout_buf[0] = MSG_ABORT; amd->msgout_len = 1; @@ -1904,13 +1904,13 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB) pcsio->resid = (u_int32_t) swlval; #ifdef AMD_DEBUG0 - printf("XferredLen=%8x,NotYetXferLen=%8x,", + kprintf("XferredLen=%8x,NotYetXferLen=%8x,", pSRB->TotalXferredLen, swlval); #endif } if ((pcsio->ccb_h.flags & CAM_DIS_AUTOSENSE) == 0) { #ifdef AMD_DEBUG0 - printf("RequestSense..................\n"); + kprintf("RequestSense..................\n"); #endif RequestSense(amd, pSRB); return; @@ -1932,14 +1932,14 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB) pccb->ccb_h.status = CAM_SEL_TIMEOUT; } else if (status == SCSI_STATUS_BUSY) { #ifdef AMD_DEBUG0 - printf("DC390: target busy at %s %d\n", + kprintf("DC390: target busy at %s %d\n", __FILE__, __LINE__); #endif pcsio->scsi_status = SCSI_STATUS_BUSY; pccb->ccb_h.status = CAM_SCSI_BUSY; } else if (status == SCSI_STATUS_RESERV_CONFLICT) { #ifdef AMD_DEBUG0 - printf("DC390: target reserved at %s %d\n", + kprintf("DC390: target reserved at %s %d\n", __FILE__, __LINE__); #endif pcsio->scsi_status = SCSI_STATUS_RESERV_CONFLICT; @@ -1947,7 +1947,7 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB) } else { pSRB->AdaptStatus = 0; #ifdef AMD_DEBUG0 - printf("DC390: driver stuffup at %s %d\n", + kprintf("DC390: driver stuffup at %s %d\n", __FILE__, __LINE__); #endif pccb->ccb_h.status = CAM_SCSI_STATUS_ERROR; @@ -1960,7 +1960,7 @@ SRBdone(struct amd_softc *amd, struct amd_srb *pSRB) pccb->ccb_h.status = CAM_DATA_RUN_ERR; } else if (pSRB->SRBStatus & PARITY_ERROR) { #ifdef AMD_DEBUG0 - printf("DC390: driver stuffup %s %d\n", + kprintf("DC390: driver stuffup %s %d\n", __FILE__, __LINE__); #endif /* Driver failed to perform operation */ @@ -2004,7 +2004,7 @@ amd_ScsiRstDetect(struct amd_softc * amd) u_int32_t wlval; #ifdef AMD_DEBUG0 - printf("amd_ScsiRstDetect \n"); + kprintf("amd_ScsiRstDetect \n"); #endif wlval = 1000; @@ -2234,7 +2234,7 @@ amd_load_eeprom_or_defaults(struct amd_softc *amd) if (wval != EE_CHECKSUM) { if (bootverbose) - printf("amd%d: SEEPROM data unavailable. " + kprintf("amd%d: SEEPROM data unavailable. " "Using default device parameters.\n", amd->unit); amd_load_defaults(amd); @@ -2261,7 +2261,7 @@ amd_init(device_t dev) RF_ACTIVE); if (iores == NULL) { if (bootverbose) - printf("amd_init: bus_alloc_resource failure!\n"); + kprintf("amd_init: bus_alloc_resource failure!\n"); return ENXIO; } amd->tag = rman_get_bustag(iores); @@ -2278,7 +2278,7 @@ amd_init(device_t dev) /*flags*/BUS_DMA_ALLOCNOW, &amd->buffer_dmat) != 0) { if (bootverbose) - printf("amd_init: bus_dma_tag_create failure!\n"); + kprintf("amd_init: bus_dma_tag_create failure!\n"); return ENXIO; } TAILQ_INIT(&amd->free_srbs); @@ -2365,7 +2365,7 @@ amd_attach(device_t dev) if (amd_init(dev)) { if (bootverbose) - printf("amd_attach: amd_init failure!\n"); + kprintf("amd_attach: amd_init failure!\n"); return ENXIO; } @@ -2380,7 +2380,7 @@ amd_attach(device_t dev) bus_setup_intr(dev, irqres, 0, amd_intr, amd, &ih, NULL) ) { if (bootverbose) - printf("amd%d: unable to register interrupt handler!\n", + kprintf("amd%d: unable to register interrupt handler!\n", unit); return ENXIO; } @@ -2394,7 +2394,7 @@ amd_attach(device_t dev) devq = cam_simq_alloc(MAX_START_JOB); if (devq == NULL) { if (bootverbose) - printf("amd_attach: cam_simq_alloc failure!\n"); + kprintf("amd_attach: cam_simq_alloc failure!\n"); return ENXIO; } @@ -2404,14 +2404,14 @@ amd_attach(device_t dev) cam_simq_release(devq); if (amd->psim == NULL) { if (bootverbose) - printf("amd_attach: cam_sim_alloc failure!\n"); + kprintf("amd_attach: cam_sim_alloc failure!\n"); return ENXIO; } if (xpt_bus_register(amd->psim, 0) != CAM_SUCCESS) { cam_sim_free(amd->psim); if (bootverbose) - printf("amd_attach: xpt_bus_register failure!\n"); + kprintf("amd_attach: xpt_bus_register failure!\n"); return ENXIO; } @@ -2421,7 +2421,7 @@ amd_attach(device_t dev) xpt_bus_deregister(cam_sim_path(amd->psim)); cam_sim_free(amd->psim); if (bootverbose) - printf("amd_attach: xpt_create_path failure!\n"); + kprintf("amd_attach: xpt_create_path failure!\n"); return ENXIO; } diff --git a/sys/dev/disk/ata/ata-all.c b/sys/dev/disk/ata/ata-all.c index 448ef2dd33..3bea274ee0 100644 --- a/sys/dev/disk/ata/ata-all.c +++ b/sys/dev/disk/ata/ata-all.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-all.c,v 1.50.2.45 2003/03/12 14:47:12 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-all.c,v 1.34 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-all.c,v 1.35 2006/12/22 23:26:15 swildner Exp $ */ #include "opt_ata.h" @@ -899,7 +899,7 @@ ata_reinit(struct ata_channel *ch) if ((misdev = devices & ~ch->devices)) { if (misdev) - printf("\n"); + kprintf("\n"); #if NATADISK > 0 if (misdev & ATA_ATA_MASTER && ch->device[MASTER].driver) ad_detach(&ch->device[MASTER], 0); @@ -939,7 +939,7 @@ ata_reinit(struct ata_channel *ch) } newdev = ~devices & ch->devices; if (!misdev && newdev) - printf("\n"); + kprintf("\n"); #if NATADISK > 0 if (newdev & ATA_ATA_MASTER && !ch->device[MASTER].driver) ad_attach(&ch->device[MASTER], 1); @@ -972,7 +972,7 @@ ata_reinit(struct ata_channel *ch) if (ch->devices & (ATA_ATAPI_MASTER | ATA_ATAPI_SLAVE)) atapi_cam_reinit_bus(ch); #endif - printf("done\n"); + kprintf("done\n"); ATA_UNLOCK_CH(ch); ata_start(ch); return 0; @@ -1348,9 +1348,9 @@ ata_enclosure_print(struct ata_device *atadev) atadev->flags |= ATA_D_ENC_PRESENT; if (ata_enclosure_status(atadev, &fan, &temp, &v05, &v12)) - printf(" detected\n"); + kprintf(" detected\n"); else - printf(" [FAN:%drpm TEMP:%d.%01dC %d.%03dV %d.%03dV]\n", + kprintf(" [FAN:%drpm TEMP:%d.%01dC %d.%03dV %d.%03dV]\n", fan, temp/10, temp%10, v05/1000, v05%1000, v12/1000, v12%1000); } @@ -1411,12 +1411,12 @@ ata_printf(struct ata_channel *ch, int device, const char * fmt, ...) int ret; if (device == -1) - ret = printf("ata%d: ", device_get_unit(ch->dev)); + ret = kprintf("ata%d: ", device_get_unit(ch->dev)); else { if (ch->device[ATA_DEV(device)].name) - ret = printf("%s: ", ch->device[ATA_DEV(device)].name); + ret = kprintf("%s: ", ch->device[ATA_DEV(device)].name); else - ret = printf("ata%d-%s: ", device_get_unit(ch->dev), + ret = kprintf("ata%d-%s: ", device_get_unit(ch->dev), (device == ATA_MASTER) ? "master" : "slave"); } __va_start(ap, fmt); @@ -1432,9 +1432,9 @@ ata_prtdev(struct ata_device *atadev, const char * fmt, ...) int ret; if (atadev->name) - ret = printf("%s: ", atadev->name); + ret = kprintf("%s: ", atadev->name); else - ret = printf("ata%d-%s: ", device_get_unit(atadev->channel->dev), + ret = kprintf("ata%d-%s: ", device_get_unit(atadev->channel->dev), (atadev->unit == ATA_MASTER) ? "master" : "slave"); __va_start(ap, fmt); ret += kvprintf(fmt, ap); @@ -1608,7 +1608,7 @@ ata_init(void) ata_delayed_attach->ich_func = (void*)ata_boot_attach; ata_delayed_attach->ich_desc = "ata"; if (config_intrhook_establish(ata_delayed_attach) != 0) { - printf("ata: config_intrhook_establish failed\n"); + kprintf("ata: config_intrhook_establish failed\n"); kfree(ata_delayed_attach, M_TEMP); } } diff --git a/sys/dev/disk/ata/ata-disk.c b/sys/dev/disk/ata/ata-disk.c index 0d7df6e0b2..cf80b1a168 100644 --- a/sys/dev/disk/ata/ata-disk.c +++ b/sys/dev/disk/ata/ata-disk.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.60.2.24 2003/01/30 07:19:59 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-disk.c,v 1.32 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-disk.c,v 1.33 2006/12/22 23:26:15 swildner Exp $ */ #include "opt_ata.h" @@ -609,7 +609,7 @@ ad_transfer(struct ad_request *request) transfer_failed: callout_stop(&request->callout); ad_invalidatequeue(adp, request); - printf(" - resetting\n"); + kprintf(" - resetting\n"); /* if retries still permit, reinject this request */ if (request->retries++ < AD_MAX_RETRIES) @@ -662,10 +662,10 @@ ad_interrupt(struct ad_request *request) ad_invalidatequeue(adp, request); if (request->retries++ < AD_MAX_RETRIES) - printf(" retrying\n"); + kprintf(" retrying\n"); else { ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1); - printf(" falling back to PIO mode\n"); + kprintf(" falling back to PIO mode\n"); } ad_requeue(adp->device->channel, request); return ATA_OP_FINISHED; @@ -677,13 +677,13 @@ ad_interrupt(struct ad_request *request) ad_invalidatequeue(adp, request); ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1); request->flags |= ADR_F_FORCE_PIO; - printf(" trying PIO mode\n"); + kprintf(" trying PIO mode\n"); ad_requeue(adp->device->channel, request); return ATA_OP_FINISHED; } request->flags |= ADR_F_ERROR; - printf(" status=%02x error=%02x\n", + kprintf(" status=%02x error=%02x\n", adp->device->channel->status, adp->device->channel->error); } diff --git a/sys/dev/disk/ata/ata-pci.c b/sys/dev/disk/ata/ata-pci.c index f7eb9e7bbd..b9815d22e5 100644 --- a/sys/dev/disk/ata/ata-pci.c +++ b/sys/dev/disk/ata/ata-pci.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.32.2.15 2003/06/06 13:27:05 fjoe Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-pci.c,v 1.27 2006/12/12 19:01:31 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-pci.c,v 1.28 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -732,10 +732,10 @@ ata_pci_print_child(device_t dev, device_t child) int retval = 0; retval += bus_print_child_header(dev, child); - retval += printf(": at 0x%lx", rman_get_start(ch->r_io)); + retval += kprintf(": at 0x%lx", rman_get_start(ch->r_io)); if (ATA_MASTERDEV(dev)) - retval += printf(" irq %d", 14 + ch->unit); + retval += kprintf(" irq %d", 14 + ch->unit); retval += bus_print_child_footer(dev, child); diff --git a/sys/dev/disk/ata/ata-raid.c b/sys/dev/disk/ata/ata-raid.c index 8ed684deb0..4e2a636c42 100644 --- a/sys/dev/disk/ata/ata-raid.c +++ b/sys/dev/disk/ata/ata-raid.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.3.2.19 2003/01/30 07:19:59 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-raid.c,v 1.24 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-raid.c,v 1.25 2006/12/22 23:26:15 swildner Exp $ */ #include "opt_ata.h" @@ -181,51 +181,51 @@ ar_attach_raid(struct ar_softc *rdp, int update) dev->si_iosize_max = 256 * DEV_BSIZE; rdp->dev = dev; - printf("ar%d: %lluMB lun, (unsigned long long) + kprintf("ar%d: %lluMB lun, (unsigned long long) (rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE))); switch (rdp->flags & (AR_F_RAID0 | AR_F_RAID1 | AR_F_SPAN)) { case AR_F_RAID0: - printf("RAID0 "); break; + kprintf("RAID0 "); break; case AR_F_RAID1: - printf("RAID1 "); break; + kprintf("RAID1 "); break; case AR_F_SPAN: - printf("SPAN "); break; + kprintf("SPAN "); break; case (AR_F_RAID0 | AR_F_RAID1): - printf("RAID0+1 "); break; + kprintf("RAID0+1 "); break; default: - printf("unknown 0x%x> ", rdp->flags); + kprintf("unknown 0x%x> ", rdp->flags); return; } - printf("array> [%d/%d/%d] status: ", + kprintf("array> [%d/%d/%d] status: ", rdp->cylinders, rdp->heads, rdp->sectors); switch (rdp->flags & (AR_F_DEGRADED | AR_F_READY)) { case AR_F_READY: - printf("READY"); + kprintf("READY"); break; case (AR_F_DEGRADED | AR_F_READY): - printf("DEGRADED"); + kprintf("DEGRADED"); break; default: - printf("BROKEN"); + kprintf("BROKEN"); break; } - printf(" subdisks:\n"); + kprintf(" subdisks:\n"); for (disk = 0; disk < rdp->total_disks; disk++) { if (rdp->disks[disk].flags & AR_DF_PRESENT) { if (rdp->disks[disk].flags & AR_DF_ONLINE) - printf(" %d READY ", disk); + kprintf(" %d READY ", disk); else if (rdp->disks[disk].flags & AR_DF_SPARE) - printf(" %d SPARE ", disk); + kprintf(" %d SPARE ", disk); else - printf(" %d FREE ", disk); + kprintf(" %d FREE ", disk); ad_print(AD_SOFTC(rdp->disks[disk])); - printf(" "); + kprintf(" "); ata_enclosure_print(AD_SOFTC(rdp->disks[disk])->device); } else if (rdp->disks[disk].flags & AR_DF_ASSIGNED) - printf(" %d DOWN\n", disk); + kprintf(" %d DOWN\n", disk); else - printf(" %d INVALID no RAID config info on this disk\n", disk); + kprintf(" %d INVALID no RAID config info on this disk\n", disk); } } @@ -372,7 +372,7 @@ ata_raid_delete(int array) int disk; if (!ar_table) { - printf("ar: no memory for ATA raid array\n"); + kprintf("ar: no memory for ATA raid array\n"); return 0; } if (!(rdp = ar_table[array])) @@ -534,7 +534,7 @@ arstrategy(struct dev_strategy_args *ap) break; default: - printf("ar%d: unknown array type in arstrategy\n", rdp->lun); + kprintf("ar%d: unknown array type in arstrategy\n", rdp->lun); bp->b_flags |= B_ERROR; bp->b_error = EIO; biodone(bio); @@ -647,7 +647,7 @@ arstrategy(struct dev_strategy_args *ap) break; default: - printf("ar%d: unknown array type in arstrategy\n", rdp->lun); + kprintf("ar%d: unknown array type in arstrategy\n", rdp->lun); } } return(0); @@ -723,7 +723,7 @@ ar_done(struct bio *bio) break; default: - printf("ar%d: unknown array type in ar_done\n", rdp->lun); + kprintf("ar%d: unknown array type in ar_done\n", rdp->lun); } kfree(buf, M_AR); } @@ -754,7 +754,7 @@ ar_config_changed(struct ar_softc *rdp, int writeback) case AR_F_RAID0: if (!(rdp->disks[disk].flags & AR_DF_ONLINE)) { rdp->flags &= ~AR_F_READY; - printf("ar%d: ERROR - array broken\n", rdp->lun); + kprintf("ar%d: ERROR - array broken\n", rdp->lun); } break; @@ -764,7 +764,7 @@ ar_config_changed(struct ar_softc *rdp, int writeback) if (!(rdp->disks[disk].flags & AR_DF_ONLINE) && !(rdp->disks[disk + rdp->width].flags & AR_DF_ONLINE)) { rdp->flags &= ~AR_F_READY; - printf("ar%d: ERROR - array broken\n", rdp->lun); + kprintf("ar%d: ERROR - array broken\n", rdp->lun); } else if (((rdp->disks[disk].flags & AR_DF_ONLINE) && !(rdp->disks @@ -774,7 +774,7 @@ ar_config_changed(struct ar_softc *rdp, int writeback) [disk + rdp->width].flags & AR_DF_ONLINE))) { rdp->flags |= AR_F_DEGRADED; if (!(flags & AR_F_DEGRADED)) - printf("ar%d: WARNING - mirror lost\n", rdp->lun); + kprintf("ar%d: WARNING - mirror lost\n", rdp->lun); } } break; @@ -902,21 +902,21 @@ ar_highpoint_read_conf(struct ad_softc *adp, struct ar_softc **raidp) if (ar_rw(adp, HPT_LBA, sizeof(struct highpoint_raid_conf), (caddr_t)info, AR_READ | AR_WAIT)) { if (bootverbose) - printf("ar: HighPoint read conf failed\n"); + kprintf("ar: HighPoint read conf failed\n"); goto highpoint_out; } /* check if this is a HighPoint RAID struct */ if (info->magic != HPT_MAGIC_OK && info->magic != HPT_MAGIC_BAD) { if (bootverbose) - printf("ar: HighPoint check1 failed\n"); + kprintf("ar: HighPoint check1 failed\n"); goto highpoint_out; } /* is this disk defined, or an old leftover/spare ? */ if (!info->magic_0) { if (bootverbose) - printf("ar: HighPoint check2 failed\n"); + kprintf("ar: HighPoint check2 failed\n"); goto highpoint_out; } @@ -988,7 +988,7 @@ highpoint_raid01: break; default: - printf("ar%d: HighPoint unknown RAID type 0x%02x\n", + kprintf("ar%d: HighPoint unknown RAID type 0x%02x\n", array, info->type); goto highpoint_out; } @@ -1099,7 +1099,7 @@ ar_highpoint_write_conf(struct ar_softc *rdp) if (ar_rw(AD_SOFTC(rdp->disks[disk]), HPT_LBA, sizeof(struct highpoint_raid_conf), (caddr_t)config, AR_WRITE)) { - printf("ar%d: Highpoint write conf failed\n", rdp->lun); + kprintf("ar%d: Highpoint write conf failed\n", rdp->lun); return -1; } } @@ -1120,7 +1120,7 @@ ar_promise_read_conf(struct ad_softc *adp, struct ar_softc **raidp, int local) if (ar_rw(adp, PR_LBA(adp), sizeof(struct promise_raid_conf), (caddr_t)info, AR_READ | AR_WAIT)) { if (bootverbose) - printf("ar: %s read conf failed\n", local ? "FreeBSD" : "Promise"); + kprintf("ar: %s read conf failed\n", local ? "FreeBSD" : "Promise"); goto promise_out; } @@ -1128,14 +1128,14 @@ ar_promise_read_conf(struct ad_softc *adp, struct ar_softc **raidp, int local) if (local) { if (strncmp(info->promise_id, ATA_MAGIC, sizeof(ATA_MAGIC))) { if (bootverbose) - printf("ar: FreeBSD check1 failed\n"); + kprintf("ar: FreeBSD check1 failed\n"); goto promise_out; } } else { if (strncmp(info->promise_id, PR_MAGIC, sizeof(PR_MAGIC))) { if (bootverbose) - printf("ar: Promise check1 failed\n"); + kprintf("ar: Promise check1 failed\n"); goto promise_out; } } @@ -1145,14 +1145,14 @@ ar_promise_read_conf(struct ad_softc *adp, struct ar_softc **raidp, int local) cksum += *ckptr++; if (cksum != *ckptr) { if (bootverbose) - printf("ar: %s check2 failed\n", local ? "FreeBSD" : "Promise"); + kprintf("ar: %s check2 failed\n", local ? "FreeBSD" : "Promise"); goto promise_out; } /* now convert Promise config info into our generic form */ if (info->raid.integrity != PR_I_VALID) { if (bootverbose) - printf("ar: %s check3 failed\n", local ? "FreeBSD" : "Promise"); + kprintf("ar: %s check3 failed\n", local ? "FreeBSD" : "Promise"); goto promise_out; } @@ -1205,7 +1205,7 @@ ar_promise_read_conf(struct ad_softc *adp, struct ar_softc **raidp, int local) break; default: - printf("ar%d: %s unknown RAID type 0x%02x\n", + kprintf("ar%d: %s unknown RAID type 0x%02x\n", array, local ? "FreeBSD" : "Promise", info->raid.type); goto promise_out; } @@ -1368,7 +1368,7 @@ ar_promise_write_conf(struct ar_softc *rdp) PR_LBA(AD_SOFTC(rdp->disks[disk])), sizeof(struct promise_raid_conf), (caddr_t)config, AR_WRITE)) { - printf("ar%d: %s write conf failed\n", + kprintf("ar%d: %s write conf failed\n", rdp->lun, local ? "FreeBSD" : "Promise"); return -1; } diff --git a/sys/dev/disk/ata/atapi-all.c b/sys/dev/disk/ata/atapi-all.c index 936998c29c..a3e6258936 100644 --- a/sys/dev/disk/ata/atapi-all.c +++ b/sys/dev/disk/ata/atapi-all.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-all.c,v 1.46.2.18 2002/10/31 23:10:33 thomas Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-all.c,v 1.19 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-all.c,v 1.20 2006/12/22 23:26:15 swildner Exp $ */ #include "opt_ata.h" @@ -479,11 +479,11 @@ atapi_interrupt(struct atapi_request *request) atapi_skey2str(request->sense.sense_key), request->sense.asc, request->sense.ascq); if (request->sense.sksv) - printf("sks=0x%02x 0x%02x 0x%02x ", + kprintf("sks=0x%02x 0x%02x 0x%02x ", request->sense.sk_specific, request->sense.sk_specific1, request->sense.sk_specific2); - printf("error=0x%02x\n", request->result & ATAPI_E_MASK); + kprintf("error=0x%02x\n", request->result & ATAPI_E_MASK); } } else @@ -542,10 +542,10 @@ atapi_dump(char *label, void *data, int len) { u_int8_t *p = data; - printf("%s %02x", label, *p++); + kprintf("%s %02x", label, *p++); while (--len > 0) - printf ("-%02x", *p++); - printf("\n"); + kprintf ("-%02x", *p++); + kprintf("\n"); } static void diff --git a/sys/dev/disk/ata/atapi-cam.c b/sys/dev/disk/ata/atapi-cam.c index a2db5ca10c..f8d0c53273 100644 --- a/sys/dev/disk/ata/atapi-cam.c +++ b/sys/dev/disk/ata/atapi-cam.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.10.2.3 2003/05/21 09:24:55 thomas Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-cam.c,v 1.10 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-cam.c,v 1.11 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -366,7 +366,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) /* check that this request was not aborted already */ if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) { - printf("XPT_SCSI_IO received but already in progress?\n"); + kprintf("XPT_SCSI_IO received but already in progress?\n"); xpt_done(ccb); return; } @@ -387,7 +387,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) if ((ccb_h->flags & CAM_SCATTER_VALID)) { /* scatter-gather not supported */ xpt_print_path(ccb_h->path); - printf("ATAPI-CAM does not support scatter-gather yet!\n"); + kprintf("ATAPI-CAM does not support scatter-gather yet!\n"); break; } if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) @@ -402,7 +402,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) if (CAM_DEBUGGED(ccb_h->path, CAM_DEBUG_CDB)) { char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; - printf("atapi_action: hcb@%p: %s\n", hcb, + kprintf("atapi_action: hcb@%p: %s\n", hcb, scsi_cdb_string(hcb->cmd, cdb_str, sizeof(cdb_str))); } #endif @@ -509,7 +509,7 @@ action_oom: if (hcb != NULL) free_hcb(hcb); xpt_print_path(ccb_h->path); - printf("out of memory, freezing queue.\n"); + kprintf("out of memory, freezing queue.\n"); softc->flags |= RESOURCE_SHORTAGE; xpt_freeze_simq(sim, /*count*/ 1); ccb_h->status = CAM_REQUEUE_REQ; @@ -520,7 +520,7 @@ static void atapi_poll(struct cam_sim *sim) { /* do nothing - we do not actually service any interrupts */ - printf("atapi_poll called!\n"); + kprintf("atapi_poll called!\n"); } static int @@ -533,12 +533,12 @@ atapi_cb(struct atapi_request *req) crit_enter(); #ifdef CAMDEBUG if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { - printf("atapi_cb: hcb@%p status = %02x: (sk = %02x%s%s%s)\n", + kprintf("atapi_cb: hcb@%p status = %02x: (sk = %02x%s%s%s)\n", hcb, hcb_status, hcb_status >> 4, (hcb_status & 4) ? " ABRT" : "", (hcb_status & 2) ? " EOM" : "", (hcb_status & 1) ? " ILI" : ""); - printf(" %s: cmd %02x - sk=%02x asc=%02x ascq=%02x\n", + kprintf(" %s: cmd %02x - sk=%02x asc=%02x ascq=%02x\n", req->device->name, req->ccb[0], req->sense.sense_key, req->sense.asc, req->sense.ascq); } @@ -606,9 +606,9 @@ atapi_async1(void *callback_arg, u_int32_t code, targ = xpt_path_target_id(path); xpt_print_path(path); if (targ == -1) - printf("Lost host adapter\n"); + kprintf("Lost host adapter\n"); else - printf("Lost target %d???\n", targ); + kprintf("Lost target %d???\n", targ); break; default: @@ -695,7 +695,7 @@ free_softc(struct atapi_xpt_softc *scp) if ((scp->flags & BUS_REGISTERED) == 0) cam_sim_free(scp->sim); else - printf("Can't free %s SIM (still registered)\n", + kprintf("Can't free %s SIM (still registered)\n", cam_sim_name(scp->sim)); } LIST_REMOVE(scp, chain); diff --git a/sys/dev/disk/ata/atapi-cd.c b/sys/dev/disk/ata/atapi-cd.c index ef0234cbcc..a1bf3c291f 100644 --- a/sys/dev/disk/ata/atapi-cd.c +++ b/sys/dev/disk/ata/atapi-cd.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.48.2.20 2002/11/25 05:30:31 njl Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-cd.c,v 1.27 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-cd.c,v 1.28 2006/12/22 23:26:15 swildner Exp $ */ #include "opt_ata.h" @@ -286,82 +286,82 @@ acd_describe(struct acd_softc *cdp) ata_prtdev(cdp->device, "%s", ""); if (cdp->cap.cur_read_speed) { - printf("read %dKB/s", cdp->cap.cur_read_speed * 1000 / 1024); + kprintf("read %dKB/s", cdp->cap.cur_read_speed * 1000 / 1024); if (cdp->cap.max_read_speed) - printf(" (%dKB/s)", cdp->cap.max_read_speed * 1000 / 1024); + kprintf(" (%dKB/s)", cdp->cap.max_read_speed * 1000 / 1024); if ((cdp->cap.cur_write_speed) && (cdp->cap.write_cdr || cdp->cap.write_cdrw || cdp->cap.write_dvdr || cdp->cap.write_dvdram)) { - printf(" write %dKB/s", cdp->cap.cur_write_speed * 1000 / 1024); + kprintf(" write %dKB/s", cdp->cap.cur_write_speed * 1000 / 1024); if (cdp->cap.max_write_speed) - printf(" (%dKB/s)", cdp->cap.max_write_speed * 1000 / 1024); + kprintf(" (%dKB/s)", cdp->cap.max_write_speed * 1000 / 1024); } comma = 1; } if (cdp->cap.buf_size) { - printf("%s %dKB buffer", comma ? "," : "", cdp->cap.buf_size); + kprintf("%s %dKB buffer", comma ? "," : "", cdp->cap.buf_size); comma = 1; } - printf("%s %s\n", comma ? "," : "", ata_mode2str(cdp->device->mode)); + kprintf("%s %s\n", comma ? "," : "", ata_mode2str(cdp->device->mode)); ata_prtdev(cdp->device, "Reads:"); comma = 0; if (cdp->cap.read_cdr) { - printf(" CD-R"); comma = 1; + kprintf(" CD-R"); comma = 1; } if (cdp->cap.read_cdrw) { - printf("%s CD-RW", comma ? "," : ""); comma = 1; + kprintf("%s CD-RW", comma ? "," : ""); comma = 1; } if (cdp->cap.cd_da) { if (cdp->cap.cd_da_stream) - printf("%s CD-DA stream", comma ? "," : ""); + kprintf("%s CD-DA stream", comma ? "," : ""); else - printf("%s CD-DA", comma ? "," : ""); + kprintf("%s CD-DA", comma ? "," : ""); comma = 1; } if (cdp->cap.read_dvdrom) { - printf("%s DVD-ROM", comma ? "," : ""); comma = 1; + kprintf("%s DVD-ROM", comma ? "," : ""); comma = 1; } if (cdp->cap.read_dvdr) { - printf("%s DVD-R", comma ? "," : ""); comma = 1; + kprintf("%s DVD-R", comma ? "," : ""); comma = 1; } if (cdp->cap.read_dvdram) { - printf("%s DVD-RAM", comma ? "," : ""); comma = 1; + kprintf("%s DVD-RAM", comma ? "," : ""); comma = 1; } if (cdp->cap.read_packet) - printf("%s packet", comma ? "," : ""); + kprintf("%s packet", comma ? "," : ""); - printf("\n"); + kprintf("\n"); ata_prtdev(cdp->device, "Writes:"); if (cdp->cap.write_cdr || cdp->cap.write_cdrw || cdp->cap.write_dvdr || cdp->cap.write_dvdram) { comma = 0; if (cdp->cap.write_cdr) { - printf(" CD-R" ); comma = 1; + kprintf(" CD-R" ); comma = 1; } if (cdp->cap.write_cdrw) { - printf("%s CD-RW", comma ? "," : ""); comma = 1; + kprintf("%s CD-RW", comma ? "," : ""); comma = 1; } if (cdp->cap.write_dvdr) { - printf("%s DVD-R", comma ? "," : ""); comma = 1; + kprintf("%s DVD-R", comma ? "," : ""); comma = 1; } if (cdp->cap.write_dvdram) { - printf("%s DVD-RAM", comma ? "," : ""); comma = 1; + kprintf("%s DVD-RAM", comma ? "," : ""); comma = 1; } if (cdp->cap.test_write) { - printf("%s test write", comma ? "," : ""); comma = 1; + kprintf("%s test write", comma ? "," : ""); comma = 1; } if (cdp->cap.burnproof) - printf("%s burnproof", comma ? "," : ""); + kprintf("%s burnproof", comma ? "," : ""); } - printf("\n"); + kprintf("\n"); if (cdp->cap.audio_play) { ata_prtdev(cdp->device, "Audio: "); if (cdp->cap.audio_play) - printf("play"); + kprintf("play"); if (cdp->cap.max_vol_levels) - printf(", %d volume levels", cdp->cap.max_vol_levels); - printf("\n"); + kprintf(", %d volume levels", cdp->cap.max_vol_levels); + kprintf("\n"); } ata_prtdev(cdp->device, "Mechanism: "); switch (cdp->cap.mech) { @@ -379,64 +379,64 @@ acd_describe(struct acd_softc *cdp) mechanism = 0; break; } if (mechanism) - printf("%s%s", cdp->cap.eject ? "ejectable " : "", mechanism); + kprintf("%s%s", cdp->cap.eject ? "ejectable " : "", mechanism); else if (cdp->cap.eject) - printf("ejectable"); + kprintf("ejectable"); if (cdp->cap.lock) - printf(cdp->cap.locked ? ", locked" : ", unlocked"); + kprintf(cdp->cap.locked ? ", locked" : ", unlocked"); if (cdp->cap.prevent) - printf(", lock protected"); - printf("\n"); + kprintf(", lock protected"); + kprintf("\n"); if (cdp->cap.mech != MST_MECH_CHANGER) { ata_prtdev(cdp->device, "Medium: "); switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { case MST_CDROM: - printf("CD-ROM "); break; + kprintf("CD-ROM "); break; case MST_CDR: - printf("CD-R "); break; + kprintf("CD-R "); break; case MST_CDRW: - printf("CD-RW "); break; + kprintf("CD-RW "); break; case MST_DOOR_OPEN: - printf("door open"); break; + kprintf("door open"); break; case MST_NO_DISC: - printf("no/blank disc"); break; + kprintf("no/blank disc"); break; case MST_FMT_ERROR: - printf("medium format error"); break; + kprintf("medium format error"); break; } if ((cdp->cap.medium_type & MST_TYPE_MASK_HIGH)cap.medium_type & MST_TYPE_MASK_LOW) { case MST_DATA_120: - printf("120mm data disc"); break; + kprintf("120mm data disc"); break; case MST_AUDIO_120: - printf("120mm audio disc"); break; + kprintf("120mm audio disc"); break; case MST_COMB_120: - printf("120mm data/audio disc"); break; + kprintf("120mm data/audio disc"); break; case MST_PHOTO_120: - printf("120mm photo disc"); break; + kprintf("120mm photo disc"); break; case MST_DATA_80: - printf("80mm data disc"); break; + kprintf("80mm data disc"); break; case MST_AUDIO_80: - printf("80mm audio disc"); break; + kprintf("80mm audio disc"); break; case MST_COMB_80: - printf("80mm data/audio disc"); break; + kprintf("80mm data/audio disc"); break; case MST_PHOTO_80: - printf("80mm photo disc"); break; + kprintf("80mm photo disc"); break; case MST_FMT_NONE: switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { case MST_CDROM: - printf("unknown"); break; + kprintf("unknown"); break; case MST_CDR: case MST_CDRW: - printf("blank"); break; + kprintf("blank"); break; } break; default: - printf("unknown (0x%x)", cdp->cap.medium_type); break; + kprintf("unknown (0x%x)", cdp->cap.medium_type); break; } } - printf("\n"); + kprintf("\n"); } } else { @@ -448,9 +448,9 @@ acd_describe(struct acd_softc *cdp) (cdp->cap.read_dvdrom) ? "DVD-ROM" : "CDROM"); if (cdp->changer_info) - printf("with %d CD changer ", cdp->changer_info->slots); + kprintf("with %d CD changer ", cdp->changer_info->slots); - printf("<%.40s> at ata%d-%s %s\n", cdp->device->param->model, + kprintf("<%.40s> at ata%d-%s %s\n", cdp->device->param->model, device_get_unit(cdp->device->channel->dev), (cdp->device->unit == ATA_MASTER) ? "master" : "slave", ata_mode2str(cdp->device->mode) ); @@ -1343,9 +1343,9 @@ acd_read_toc(struct acd_softc *cdp) cdp->disk_size, cdp->block_size, cdp->toc.hdr.ending_track - cdp->toc.hdr.starting_track + 1); if (cdp->toc.tab[0].control & 4) - printf("%dMB\n", cdp->disk_size / 512); + kprintf("%dMB\n", cdp->disk_size / 512); else - printf("%d:%d audio\n", + kprintf("%d:%d audio\n", cdp->disk_size / 75 / 60, cdp->disk_size / 75 % 60); } #endif @@ -1645,13 +1645,13 @@ acd_send_cue(struct acd_softc *cdp, struct cdr_cuesheet *cuesheet) if ((error = copyin(cuesheet->entries, buffer, cuesheet->len))) return error; #ifdef ACD_DEBUG - printf("acd: cuesheet lenght = %d\n", cuesheet->len); + kprintf("acd: cuesheet lenght = %d\n", cuesheet->len); for (i=0; ilen; i++) if (i%8) - printf(" %02x", buffer[i]); + kprintf(" %02x", buffer[i]); else - printf("\n%02x", buffer[i]); - printf("\n"); + kprintf("\n%02x", buffer[i]); + kprintf("\n"); #endif error = atapi_queue_cmd(cdp->device, ccb, buffer, cuesheet->len, 0, 30, NULL, NULL); diff --git a/sys/dev/disk/ata/atapi-fd.c b/sys/dev/disk/ata/atapi-fd.c index 79ca89dc60..78b44ff050 100644 --- a/sys/dev/disk/ata/atapi-fd.c +++ b/sys/dev/disk/ata/atapi-fd.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.44.2.9 2002/07/31 11:19:26 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.19 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.20 2006/12/22 23:26:15 swildner Exp $ */ #include @@ -192,28 +192,28 @@ afd_describe(struct afd_softc *fdp) fdp->cap.cylinders, fdp->cap.heads, fdp->cap.sectors, fdp->cap.sector_size); ata_prtdev(fdp->device, "%dKB/s,", fdp->cap.transfer_rate / 8); - printf(" %s\n", ata_mode2str(fdp->device->mode)); + kprintf(" %s\n", ata_mode2str(fdp->device->mode)); if (fdp->cap.medium_type) { ata_prtdev(fdp->device, "Medium: "); switch (fdp->cap.medium_type) { case MFD_2DD: - printf("720KB DD disk"); break; + kprintf("720KB DD disk"); break; case MFD_HD_12: - printf("1.2MB HD disk"); break; + kprintf("1.2MB HD disk"); break; case MFD_HD_144: - printf("1.44MB HD disk"); break; + kprintf("1.44MB HD disk"); break; case MFD_UHD: - printf("120MB UHD disk"); break; + kprintf("120MB UHD disk"); break; default: - printf("Unknown (0x%x)", fdp->cap.medium_type); + kprintf("Unknown (0x%x)", fdp->cap.medium_type); } - if (fdp->cap.wp) printf(", writeprotected"); + if (fdp->cap.wp) kprintf(", writeprotected"); } - printf("\n"); + kprintf("\n"); } else { ata_prtdev(fdp->device, "%luMB <%.40s> [%d/%d/%d] at ata%d-%s %s\n", diff --git a/sys/dev/disk/ata/atapi-tape.c b/sys/dev/disk/ata/atapi-tape.c index 2fb6a138c6..a78cc82b73 100644 --- a/sys/dev/disk/ata/atapi-tape.c +++ b/sys/dev/disk/ata/atapi-tape.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.36.2.12 2002/07/31 11:19:26 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-tape.c,v 1.19 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-tape.c,v 1.20 2006/12/22 23:26:15 swildner Exp $ */ #include "opt_ata.h" @@ -202,38 +202,38 @@ ast_describe(struct ast_softc *stp) device_get_unit(stp->device->channel->dev), (stp->device->unit == ATA_MASTER) ? "master" : "slave"); ata_prtdev(stp->device, "%dKB/s, ", stp->cap.max_speed); - printf("transfer limit %d blk%s, ", + kprintf("transfer limit %d blk%s, ", stp->cap.ctl, (stp->cap.ctl > 1) ? "s" : ""); - printf("%dKB buffer, ", (stp->cap.buffer_size * DEV_BSIZE) / 1024); - printf("%s\n", ata_mode2str(stp->device->mode)); + kprintf("%dKB buffer, ", (stp->cap.buffer_size * DEV_BSIZE) / 1024); + kprintf("%s\n", ata_mode2str(stp->device->mode)); ata_prtdev(stp->device, "Medium: "); switch (stp->cap.medium_type) { case 0x00: - printf("none"); break; + kprintf("none"); break; case 0x17: - printf("Travan 1 (400 Mbyte)"); break; + kprintf("Travan 1 (400 Mbyte)"); break; case 0xb6: - printf("Travan 4 (4 Gbyte)"); break; + kprintf("Travan 4 (4 Gbyte)"); break; case 0xda: - printf("OnStream ADR (15Gyte)"); break; + kprintf("OnStream ADR (15Gyte)"); break; default: - printf("unknown (0x%x)", stp->cap.medium_type); + kprintf("unknown (0x%x)", stp->cap.medium_type); } - if (stp->cap.readonly) printf(", readonly"); - if (stp->cap.reverse) printf(", reverse"); - if (stp->cap.eformat) printf(", eformat"); - if (stp->cap.qfa) printf(", qfa"); - if (stp->cap.lock) printf(", lock"); - if (stp->cap.locked) printf(", locked"); - if (stp->cap.prevent) printf(", prevent"); - if (stp->cap.eject) printf(", eject"); - if (stp->cap.disconnect) printf(", disconnect"); - if (stp->cap.ecc) printf(", ecc"); - if (stp->cap.compress) printf(", compress"); - if (stp->cap.blk512) printf(", 512b"); - if (stp->cap.blk1024) printf(", 1024b"); - if (stp->cap.blk32k) printf(", 32kb"); - printf("\n"); + if (stp->cap.readonly) kprintf(", readonly"); + if (stp->cap.reverse) kprintf(", reverse"); + if (stp->cap.eformat) kprintf(", eformat"); + if (stp->cap.qfa) kprintf(", qfa"); + if (stp->cap.lock) kprintf(", lock"); + if (stp->cap.locked) kprintf(", locked"); + if (stp->cap.prevent) kprintf(", prevent"); + if (stp->cap.eject) kprintf(", eject"); + if (stp->cap.disconnect) kprintf(", disconnect"); + if (stp->cap.ecc) kprintf(", ecc"); + if (stp->cap.compress) kprintf(", compress"); + if (stp->cap.blk512) kprintf(", 512b"); + if (stp->cap.blk1024) kprintf(", 1024b"); + if (stp->cap.blk32k) kprintf(", 32kb"); + kprintf("\n"); } else { ata_prtdev(stp->device, "TAPE <%.40s> at ata%d-%s %s\n", diff --git a/sys/dev/disk/buslogic/bt.c b/sys/dev/disk/buslogic/bt.c index 043b2cbcd2..3f92aa3fbc 100644 --- a/sys/dev/disk/buslogic/bt.c +++ b/sys/dev/disk/buslogic/bt.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/buslogic/bt.c,v 1.25.2.1 2000/08/02 22:32:26 peter Exp $ - * $DragonFly: src/sys/dev/disk/buslogic/bt.c,v 1.14 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/buslogic/bt.c,v 1.15 2006/12/22 23:26:16 swildner Exp $ */ /* @@ -281,7 +281,7 @@ bt_port_probe(device_t dev, struct bt_probe_info *info) (u_int8_t*)&config_data, sizeof(config_data), DEFAULT_CMD_TIMEOUT); if (error != 0) { - printf("bt_port_probe: Could not determine IRQ or DMA " + kprintf("bt_port_probe: Could not determine IRQ or DMA " "settings for adapter.\n"); return (1); } @@ -299,7 +299,7 @@ bt_port_probe(device_t dev, struct bt_probe_info *info) info->drq = 7; break; default: - printf("bt_port_probe: Invalid DMA setting " + kprintf("bt_port_probe: Invalid DMA setting " "detected for adapter.\n"); return (1); } @@ -317,7 +317,7 @@ bt_port_probe(device_t dev, struct bt_probe_info *info) info->irq = ffs(config_data.irq) + 8; break; default: - printf("bt_port_probe: Invalid IRQ setting %x" + kprintf("bt_port_probe: Invalid IRQ setting %x" "detected for adapter.\n", config_data.irq); return (1); } @@ -668,17 +668,17 @@ bt_init(device_t dev) device_printf(dev, "BT-%s FW Rev. %s ", bt->model, bt->firmware_ver); if (bt->ultra_scsi != 0) - printf("Ultra "); + kprintf("Ultra "); if (bt->wide_bus != 0) - printf("Wide "); + kprintf("Wide "); else - printf("Narrow "); + kprintf("Narrow "); if (bt->diff_bus != 0) - printf("Diff "); + kprintf("Diff "); - printf("SCSI Host Adapter, SCSI ID %d, %d CCBs\n", bt->scsi_id, + kprintf("SCSI Host Adapter, SCSI ID %d, %d CCBs\n", bt->scsi_id, bt->max_ccbs); /* @@ -910,7 +910,7 @@ bt_find_probe_range(int ioport, int *port_index, int *max_port_index) break; if ((i >= BT_NUM_ISAPORTS) || (ioport != bt_isa_ports[i].addr)) { - printf("\nbt_isa_probe: Invalid baseport of 0x%x specified.\n" + kprintf("\nbt_isa_probe: Invalid baseport of 0x%x specified.\n" "bt_isa_probe: Nearest valid baseport is 0x%x.\n" "bt_isa_probe: Failing probe.\n", ioport, @@ -1576,7 +1576,7 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code) case BMBI_ABORT: case BMBI_ERROR: if (bootverbose) { - printf("bt: ccb %p - error %x occured. " + kprintf("bt: ccb %p - error %x occured. " "btstat = %x, sdstat = %x\n", (void *)bccb, comp_code, bccb->hccb.btstat, bccb->hccb.sdstat); @@ -1650,7 +1650,7 @@ btdone(struct bt_softc *bt, struct bt_ccb *bccb, bt_mbi_comp_code_t comp_code) struct ccb_trans_settings neg; xpt_print_path(csio->ccb_h.path); - printf("refuses tagged commands. Performing " + kprintf("refuses tagged commands. Performing " "non-tagged I/O\n"); neg.flags = 0; neg.valid = CCB_TRANS_TQ_VALID; @@ -1739,7 +1739,7 @@ btreset(struct bt_softc* bt, int hard_reset) } if (timeout == 0) { if (bootverbose) - printf("%s: btreset - Diagnostic Active failed to " + kprintf("%s: btreset - Diagnostic Active failed to " "assert. status = 0x%x\n", bt_name(bt), status); return (ETIMEDOUT); } @@ -1767,7 +1767,7 @@ btreset(struct bt_softc* bt, int hard_reset) DELAY(100); } if (timeout == 0) { - printf("%s: btreset - Host adapter failed to come ready. " + kprintf("%s: btreset - Host adapter failed to come ready. " "status = 0x%x\n", bt_name(bt), status); return (ETIMEDOUT); } @@ -1775,11 +1775,11 @@ btreset(struct bt_softc* bt, int hard_reset) /* If the diagnostics failed, tell the user */ if ((status & DIAG_FAIL) != 0 || (status & HA_READY) == 0) { - printf("%s: btreset - Adapter failed diagnostics\n", + kprintf("%s: btreset - Adapter failed diagnostics\n", bt_name(bt)); if ((status & DATAIN_REG_READY) != 0) - printf("%s: btreset - Host Adapter Error code = 0x%x\n", + kprintf("%s: btreset - Host Adapter Error code = 0x%x\n", bt_name(bt), bt_inb(bt, DATAIN_REG)); return (ENXIO); } @@ -1850,7 +1850,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opcode, u_int8_t *params, u_int param_len, DELAY(100); } if (timeout == 0) { - printf("%s: bt_cmd: Timeout waiting for adapter ready, " + kprintf("%s: bt_cmd: Timeout waiting for adapter ready, " "status = 0x%x\n", bt_name(bt), status); return (ETIMEDOUT); } @@ -1892,7 +1892,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opcode, u_int8_t *params, u_int param_len, } } if (timeout == 0) { - printf("%s: bt_cmd: Timeout sending parameters, " + kprintf("%s: bt_cmd: Timeout sending parameters, " "status = 0x%x\n", bt_name(bt), status); cmd_complete = 1; saved_status = status; @@ -1951,7 +1951,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opcode, u_int8_t *params, u_int param_len, if (reply_len < reply_buf_size) { *reply_data++ = data; } else { - printf("%s: bt_cmd - Discarded reply data byte " + kprintf("%s: bt_cmd - Discarded reply data byte " "for opcode 0x%x\n", bt_name(bt), opcode); } @@ -1970,7 +1970,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opcode, u_int8_t *params, u_int param_len, DELAY(100); } if (cmd_timeout == 0) { - printf("%s: bt_cmd: Timeout waiting for command (%x) " + kprintf("%s: bt_cmd: Timeout waiting for command (%x) " "to complete.\n%s: status = 0x%x, intstat = 0x%x, " "rlen %d\n", bt_name(bt), opcode, bt_name(bt), status, intstat, reply_len); @@ -1999,7 +1999,7 @@ bt_cmd(struct bt_softc *bt, bt_op_t opcode, u_int8_t *params, u_int param_len, * reset above), perform a soft reset. */ if (bootverbose) - printf("%s: Invalid Command 0x%x\n", bt_name(bt), + kprintf("%s: Invalid Command 0x%x\n", bt_name(bt), opcode); DELAY(1000); status = bt_inb(bt, STATUS_REG); @@ -2049,7 +2049,7 @@ btinitmboxes(struct bt_softc *bt) { /*reply_len*/0, DEFAULT_CMD_TIMEOUT); if (error != 0) - printf("btinitmboxes: Initialization command failed\n"); + kprintf("btinitmboxes: Initialization command failed\n"); else if (bt->strict_rr != 0) { /* * If the controller supports @@ -2064,10 +2064,10 @@ btinitmboxes(struct bt_softc *bt) { DEFAULT_CMD_TIMEOUT); if (error != 0) { - printf("btinitmboxes: Unable to enable strict RR\n"); + kprintf("btinitmboxes: Unable to enable strict RR\n"); error = 0; } else if (bootverbose) { - printf("%s: Using Strict Round Robin Mailbox Mode\n", + kprintf("%s: Using Strict Round Robin Mailbox Mode\n", bt_name(bt)); } } @@ -2106,7 +2106,7 @@ btfetchtransinfo(struct bt_softc *bt, struct ccb_trans_settings* cts) DEFAULT_CMD_TIMEOUT); if (error != 0) { - printf("%s: btfetchtransinfo - Inquire Setup Info Failed %x\n", + kprintf("%s: btfetchtransinfo - Inquire Setup Info Failed %x\n", bt_name(bt), error); cts->valid = 0; return; @@ -2161,7 +2161,7 @@ btfetchtransinfo(struct bt_softc *bt, struct ccb_trans_settings* cts) DEFAULT_CMD_TIMEOUT); if (error != 0) { - printf("%s: btfetchtransinfo - Inquire Sync " + kprintf("%s: btfetchtransinfo - Inquire Sync " "Info Failed 0x%x\n", bt_name(bt), error); cts->valid = 0; return; @@ -2228,13 +2228,13 @@ bttimeout(void *arg) ccb = bccb->ccb; bt = (struct bt_softc *)ccb->ccb_h.ccb_bt_ptr; xpt_print_path(ccb->ccb_h.path); - printf("CCB %p - timed out\n", (void *)bccb); + kprintf("CCB %p - timed out\n", (void *)bccb); crit_enter(); if ((bccb->flags & BCCB_ACTIVE) == 0) { xpt_print_path(ccb->ccb_h.path); - printf("CCB %p - timed out CCB already completed\n", + kprintf("CCB %p - timed out CCB already completed\n", (void *)bccb); crit_exit(); return; @@ -2286,7 +2286,7 @@ bttimeout(void *arg) */ ccb->ccb_h.status = CAM_CMD_TIMEOUT; btreset(bt, /*hardreset*/TRUE); - printf("%s: No longer in timeout\n", bt_name(bt)); + kprintf("%s: No longer in timeout\n", bt_name(bt)); } else { /* * Send a Bus Device Reset message: diff --git a/sys/dev/disk/buslogic/bt_eisa.c b/sys/dev/disk/buslogic/bt_eisa.c index 3c153c6f84..9c551910db 100644 --- a/sys/dev/disk/buslogic/bt_eisa.c +++ b/sys/dev/disk/buslogic/bt_eisa.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/buslogic/bt_eisa.c,v 1.12 2000/01/29 14:27:26 peter Exp $ - * $DragonFly: src/sys/dev/disk/buslogic/bt_eisa.c,v 1.4 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/buslogic/bt_eisa.c,v 1.5 2006/12/22 23:26:16 swildner Exp $ */ #include @@ -218,7 +218,7 @@ bt_eisa_probe(device_t dev) break; default: /* Disabled */ - printf("bt: AMI EISA Adapter at " + kprintf("bt: AMI EISA Adapter at " "slot %d has a disabled I/O " "port. Cannot attach.\n", eisa_get_slot(dev)); @@ -253,7 +253,7 @@ bt_eisa_probe(device_t dev) break; default: /* Disabled */ - printf("bt: Buslogic EISA Adapter at " + kprintf("bt: Buslogic EISA Adapter at " "slot %d has a disabled I/O " "port. Cannot attach.\n", eisa_get_slot(dev)); @@ -272,7 +272,7 @@ bt_eisa_probe(device_t dev) bt_eisa_alloc_resources(dev); if (bt_port_probe(dev, &info) != 0) { - printf("bt_eisa_probe: Probe failed for " + kprintf("bt_eisa_probe: Probe failed for " "card at slot 0x%x\n", eisa_get_slot(dev)); result = ENXIO; } else { diff --git a/sys/dev/disk/buslogic/bt_isa.c b/sys/dev/disk/buslogic/bt_isa.c index 8941faeb82..f6a284844f 100644 --- a/sys/dev/disk/buslogic/bt_isa.c +++ b/sys/dev/disk/buslogic/bt_isa.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/buslogic/bt_isa.c,v 1.18 1999/10/12 21:35:43 dfr Exp $ - * $DragonFly: src/sys/dev/disk/buslogic/bt_isa.c,v 1.4 2006/10/25 20:55:53 dillon Exp $ + * $DragonFly: src/sys/dev/disk/buslogic/bt_isa.c,v 1.5 2006/12/22 23:26:16 swildner Exp $ */ #include @@ -161,7 +161,7 @@ bt_isa_probe(device_t dev) if (bt_port_probe(dev, &info) != 0) { if (bootverbose) - printf("bt_isa_probe: Probe failed at 0x%x\n", + kprintf("bt_isa_probe: Probe failed at 0x%x\n", ioport); bt_isa_release_resources(dev); continue; diff --git a/sys/dev/disk/ccd/ccd.c b/sys/dev/disk/ccd/ccd.c index 8d1b614363..402835d636 100644 --- a/sys/dev/disk/ccd/ccd.c +++ b/sys/dev/disk/ccd/ccd.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ccd/ccd.c,v 1.73.2.1 2001/09/11 09:49:52 kris Exp $ */ -/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.37 2006/09/10 01:26:33 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.38 2006/12/22 23:26:16 swildner Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -298,9 +298,9 @@ ccdattach(void) int num = NCCD; if (num > 1) - printf("ccd0-%d: Concatenated disk drivers\n", num-1); + kprintf("ccd0-%d: Concatenated disk drivers\n", num-1); else - printf("ccd0: Concatenated disk driver\n"); + kprintf("ccd0: Concatenated disk driver\n"); ccd_softc = kmalloc(num * sizeof(struct ccd_softc), M_DEVBUF, M_WAITOK | M_ZERO); @@ -325,7 +325,7 @@ ccd_modevent(module_t mod, int type, void *data) break; case MOD_UNLOAD: - printf("ccd0: Unload not supported!\n"); + kprintf("ccd0: Unload not supported!\n"); error = EOPNOTSUPP; break; @@ -354,7 +354,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) - printf("ccdinit: unit %d\n", ccd->ccd_unit); + kprintf("ccdinit: unit %d\n", ccd->ccd_unit); #endif cs->sc_size = 0; @@ -384,7 +384,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) MAXPATHLEN, &ci->ci_pathlen)) != 0) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) - printf("ccd%d: can't copy path, error = %d\n", + kprintf("ccd%d: can't copy path, error = %d\n", ccd->ccd_unit, error); #endif goto fail; @@ -401,7 +401,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) FREAD, cred)) != 0) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) - printf("ccd%d: %s: ioctl failed, error = %d\n", + kprintf("ccd%d: %s: ioctl failed, error = %d\n", ccd->ccd_unit, ci->ci_path, error); #endif goto fail; @@ -414,7 +414,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) } else { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) - printf("ccd%d: %s: incorrect partition type\n", + kprintf("ccd%d: %s: incorrect partition type\n", ccd->ccd_unit, ci->ci_path); #endif error = EFTYPE; @@ -432,7 +432,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) if (size == 0) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) - printf("ccd%d: %s: size == 0\n", + kprintf("ccd%d: %s: size == 0\n", ccd->ccd_unit, ci->ci_path); #endif error = ENODEV; @@ -453,7 +453,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) (cs->sc_ileave < (maxsecsize / DEV_BSIZE))) { #ifdef DEBUG if (ccddebug & (CCDB_FOLLOW|CCDB_INIT)) - printf("ccd%d: interleave must be at least %d\n", + kprintf("ccd%d: interleave must be at least %d\n", ccd->ccd_unit, (maxsecsize / DEV_BSIZE)); #endif error = EINVAL; @@ -482,12 +482,12 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) * guarentee the topology. */ if (cs->sc_nccdisks % 2) { - printf("ccd%d: mirroring requires an even number of disks\n", ccd->ccd_unit ); + kprintf("ccd%d: mirroring requires an even number of disks\n", ccd->ccd_unit ); error = EINVAL; goto fail; } if (cs->sc_ileave == 0) { - printf("ccd%d: an interleave must be specified when mirroring\n", ccd->ccd_unit); + kprintf("ccd%d: an interleave must be specified when mirroring\n", ccd->ccd_unit); error = EINVAL; goto fail; } @@ -496,7 +496,7 @@ ccdinit(struct ccddevice *ccd, char **cpaths, struct ucred *cred) cs->sc_size = (cs->sc_nccdisks-1) * minsize; } else { if (cs->sc_ileave == 0) { - printf("ccd%d: an interleave must be specified when using parity\n", ccd->ccd_unit); + kprintf("ccd%d: an interleave must be specified when using parity\n", ccd->ccd_unit); error = EINVAL; goto fail; } @@ -550,7 +550,7 @@ ccdinterleave(struct ccd_softc *cs, int unit) #ifdef DEBUG if (ccddebug & CCDB_INIT) - printf("ccdinterleave(%x): ileave %d\n", cs, cs->sc_ileave); + kprintf("ccdinterleave(%x): ileave %d\n", cs, cs->sc_ileave); #endif /* @@ -672,7 +672,7 @@ ccdopen(struct dev_open_args *ap) #ifdef DEBUG if (ccddebug & CCDB_FOLLOW) - printf("ccdopen(%x, %x)\n", dev, flags); + kprintf("ccdopen(%x, %x)\n", dev, flags); #endif if (unit >= numccd) return (ENXIO); @@ -718,7 +718,7 @@ ccdclose(struct dev_close_args *ap) #ifdef DEBUG if (ccddebug & CCDB_FOLLOW) - printf("ccdclose(%x, %x)\n", dev, flags); + kprintf("ccdclose(%x, %x)\n", dev, flags); #endif if (unit >= numccd) @@ -750,7 +750,7 @@ ccdstrategy(struct dev_strategy_args *ap) #ifdef DEBUG if (ccddebug & CCDB_FOLLOW) - printf("ccdstrategy(%x): unit %d\n", bp, unit); + kprintf("ccdstrategy(%x): unit %d\n", bp, unit); #endif if ((cs->sc_flags & CCDF_INITED) == 0) { bp->b_error = ENXIO; @@ -844,7 +844,7 @@ ccdstart(struct ccd_softc *cs, struct bio *bio) #ifdef DEBUG if (ccddebug & CCDB_FOLLOW) - printf("ccdstart(%x, %x)\n", cs, bp); + kprintf("ccdstart(%x, %x)\n", cs, bp); #endif /* Record the transaction start */ @@ -921,7 +921,7 @@ ccdbuffer(struct ccdbuf **cb, struct ccd_softc *cs, struct bio *bio, #ifdef DEBUG if (ccddebug & CCDB_IO) - printf("ccdbuffer(%x, %x, %d, %x, %d)\n", + kprintf("ccdbuffer(%x, %x, %d, %x, %d)\n", cs, bp, bn, addr, bcount); #endif /* @@ -1061,7 +1061,7 @@ ccdbuffer(struct ccdbuf **cb, struct ccd_softc *cs, struct bio *bio, #ifdef DEBUG if (ccddebug & CCDB_IO) - printf(" dev %x(u%d): cbp %x off %lld addr %x bcnt %d\n", + kprintf(" dev %x(u%d): cbp %x off %lld addr %x bcnt %d\n", ci->ci_dev, ci-cs->sc_cinfo, cbp, cbp->cb_buf.b_bio1.bio_offset, cbp->cb_buf.b_data, cbp->cb_buf.b_bcount); @@ -1113,7 +1113,7 @@ ccdintr(struct ccd_softc *cs, struct bio *bio) #ifdef DEBUG if (ccddebug & CCDB_FOLLOW) - printf("ccdintr(%x, %x)\n", cs, bp); + kprintf("ccdintr(%x, %x)\n", cs, bp); #endif /* * Request is done for better or worse, wakeup the top half. @@ -1147,11 +1147,11 @@ ccdiodone(struct bio *bio) crit_enter(); #ifdef DEBUG if (ccddebug & CCDB_FOLLOW) - printf("ccdiodone(%x)\n", cbp); + kprintf("ccdiodone(%x)\n", cbp); if (ccddebug & CCDB_IO) { - printf("ccdiodone: bp %x bcount %d resid %d\n", + kprintf("ccdiodone: bp %x bcount %d resid %d\n", obp, obp->b_bcount, obp->b_resid); - printf(" dev %x(u%d), cbp %x off %lld addr %x bcnt %d\n", + kprintf(" dev %x(u%d), cbp %x off %lld addr %x bcnt %d\n", cbp->cb_buf.b_dev, cbp->cb_comp, cbp, cbp->cb_buf.b_loffset, cbp->cb_buf.b_data, cbp->cb_buf.b_bcount); @@ -1186,7 +1186,7 @@ ccdiodone(struct bio *bio) obp->b_error = cbp->cb_buf.b_error ? cbp->cb_buf.b_error : EIO; } - printf("ccd%d: error %d on component %d offset %lld (ccd offset %lld)%s\n", + kprintf("ccd%d: error %d on component %d offset %lld (ccd offset %lld)%s\n", unit, obp->b_error, cbp->cb_comp, cbp->cb_buf.b_bio2.bio_offset, obio->bio_offset, msg); @@ -1295,17 +1295,17 @@ ccdioctl(struct dev_ioctl_args *ap) if (ccd.ccd_interleave == 0 && ((ccio->ccio_flags & CCDF_MIRROR) || (ccio->ccio_flags & CCDF_PARITY))) { - printf("ccd%d: disabling mirror/parity, interleave is 0\n", unit); + kprintf("ccd%d: disabling mirror/parity, interleave is 0\n", unit); ccio->ccio_flags &= ~(CCDF_MIRROR | CCDF_PARITY); } if ((ccio->ccio_flags & CCDF_MIRROR) && (ccio->ccio_flags & CCDF_PARITY)) { - printf("ccd%d: can't specify both mirror and parity, using mirror\n", unit); + kprintf("ccd%d: can't specify both mirror and parity, using mirror\n", unit); ccio->ccio_flags &= ~CCDF_PARITY; } if ((ccio->ccio_flags & (CCDF_MIRROR | CCDF_PARITY)) && !(ccio->ccio_flags & CCDF_UNIFORM)) { - printf("ccd%d: mirror/parity forces uniform flag\n", + kprintf("ccd%d: mirror/parity forces uniform flag\n", unit); ccio->ccio_flags |= CCDF_UNIFORM; } @@ -1332,14 +1332,14 @@ ccdioctl(struct dev_ioctl_args *ap) #ifdef DEBUG if (ccddebug & CCDB_INIT) for (i = 0; i < ccio->ccio_ndisks; ++i) - printf("ccdioctl: component %d: 0x%x\n", + kprintf("ccdioctl: component %d: 0x%x\n", i, cpp[i]); #endif for (i = 0; i < ccio->ccio_ndisks; ++i) { #ifdef DEBUG if (ccddebug & CCDB_INIT) - printf("ccdioctl: lookedup = %d\n", lookedup); + kprintf("ccdioctl: lookedup = %d\n", lookedup); #endif if ((error = ccdlookup(cpp[i], &vpp[i])) != 0) { for (j = 0; j < lookedup; ++j) @@ -1569,7 +1569,7 @@ ccdlookup(char *path, struct vnode **vpp) if ((error = vn_open(&nd, NULL, FREAD|FWRITE, 0)) != 0) { #ifdef DEBUG if (ccddebug & CCDB_FOLLOW|CCDB_INIT) - printf("ccdlookup: vn_open error = %d\n", error); + kprintf("ccdlookup: vn_open error = %d\n", error); #endif goto done; } @@ -1652,7 +1652,7 @@ ccdgetdisklabel(cdev_t dev) /* It's actually extremely common to have unlabeled ccds. */ if (ccddebug & CCDB_LABEL) if (errstring != NULL) - printf("ccd%d: %s\n", unit, errstring); + kprintf("ccd%d: %s\n", unit, errstring); #endif } @@ -1715,11 +1715,11 @@ printiinfo(struct ccdiinfo *ii) int ix, i; for (ix = 0; ii->ii_ndisk; ix++, ii++) { - printf(" itab[%d]: #dk %d sblk %d soff %d", + kprintf(" itab[%d]: #dk %d sblk %d soff %d", ix, ii->ii_ndisk, ii->ii_startblk, ii->ii_startoff); for (i = 0; i < ii->ii_ndisk; i++) - printf(" %d", ii->ii_index[i]); - printf("\n"); + kprintf(" %d", ii->ii_index[i]); + kprintf("\n"); } } #endif diff --git a/sys/dev/disk/fd/fd.c b/sys/dev/disk/fd/fd.c index 18af9c97b4..b1f10593ea 100644 --- a/sys/dev/disk/fd/fd.c +++ b/sys/dev/disk/fd/fd.c @@ -51,7 +51,7 @@ * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 * $FreeBSD: src/sys/isa/fd.c,v 1.176.2.8 2002/05/15 21:56:14 joerg Exp $ - * $DragonFly: src/sys/dev/disk/fd/fd.c,v 1.35 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/fd/fd.c,v 1.36 2006/12/22 23:26:16 swildner Exp $ * */ @@ -273,8 +273,8 @@ static char const * const fdstates[] = /* CAUTION: fd_debug causes huge amounts of logging output */ static int volatile fd_debug = 0; -#define TRACE0(arg) if(fd_debug) printf(arg) -#define TRACE1(arg1, arg2) if(fd_debug) printf(arg1, arg2) +#define TRACE0(arg) if(fd_debug) kprintf(arg) +#define TRACE1(arg1, arg2) if(fd_debug) kprintf(arg1, arg2) #else /* FDC_DEBUG */ #define TRACE0(arg) #define TRACE1(arg1, arg2) @@ -822,7 +822,7 @@ fdc_print_child(device_t me, device_t child) int retval = 0; retval += bus_print_child_header(me, child); - retval += printf(" on %s drive %d\n", device_get_nameunit(me), + retval += kprintf(" on %s drive %d\n", device_get_nameunit(me), fdc_get_fdunit(child)); return (retval); @@ -991,7 +991,7 @@ fd_probe(device_t dev) fd->type = FD_360; break; case RTCFDT_720K: - printf("720-KB 3.5\" drive"); + kprintf("720-KB 3.5\" drive"); fd->type = FD_720; break; default: @@ -1393,7 +1393,7 @@ fdstrategy(struct dev_strategy_args *ap) fdblk = 128 << (fd->ft->secsize); if (bp->b_cmd != BUF_CMD_FORMAT) { if (bio->bio_offset < 0) { - printf( + kprintf( "fd%d: fdstrat: bad request offset = %lld, bcount = %d\n", fdu, bio->bio_offset, bp->b_bcount); bp->b_error = EINVAL; @@ -1724,7 +1724,7 @@ fdstate(fdc_p fdc) if (fd_sense_drive_status(fdc, &st3)) failed = 1; if ((st3 & NE7_ST3_T0) == 0) { - printf( + kprintf( "fd%d: Seek to cyl 0, but not really there (ST3 = %b)\n", fdu, st3, NE7_ST3BITS); failed = 1; @@ -1738,7 +1738,7 @@ fdstate(fdc_p fdc) } if (cyl != descyl) { - printf( + kprintf( "fd%d: Seek to cyl %d failed; am at cyl %d (ST0 = 0x%x)\n", fdu, descyl, cyl, st0); if (fdc->retry < 3) @@ -2017,7 +2017,7 @@ fdstate(fdc_p fdc) * this one if it seems to be the first * time in a line */ - printf("fd%d: recal failed ST0 %b cyl %d\n", + kprintf("fd%d: recal failed ST0 %b cyl %d\n", fdu, st0, NE7_ST0BITS, cyl); if(fdc->retry < 3) fdc->retry = 3; return (retrier(fdc)); @@ -2047,7 +2047,7 @@ fdstate(fdc_p fdc) default: device_printf(fdc->fdc_dev, "unexpected FD int->"); if (fd_read_status(fdc, fd->fdsu) == 0) - printf("FDC status :%x %x %x %x %x %x %x ", + kprintf("FDC status :%x %x %x %x %x %x %x ", fdc->status[0], fdc->status[1], fdc->status[2], @@ -2056,13 +2056,13 @@ fdstate(fdc_p fdc) fdc->status[5], fdc->status[6] ); else - printf("No status available "); + kprintf("No status available "); if (fd_sense_int(fdc, &st0, &cyl) != 0) { - printf("[controller is dead now]\n"); + kprintf("[controller is dead now]\n"); return (0); } - printf("ST0 = %x, PCN = %x\n", st0, cyl); + kprintf("ST0 = %x, PCN = %x\n", st0, cyl); return (0); } /*XXX confusing: some branches return immediately, others end up here*/ @@ -2120,7 +2120,7 @@ retrier(struct fdc_data *fdc) } if (printerror) { if (fdc->flags & FDC_STAT_VALID) - printf( + kprintf( " (ST0 %b ST1 %b ST2 %b cyl %u hd %u sec %u)\n", fdc->status[0], NE7_ST0BITS, fdc->status[1], NE7_ST1BITS, @@ -2128,7 +2128,7 @@ retrier(struct fdc_data *fdc) fdc->status[3], fdc->status[4], fdc->status[5]); else - printf(" (No status)\n"); + kprintf(" (No status)\n"); } } bp->b_flags |= B_ERROR; diff --git a/sys/dev/disk/isp/isp_freebsd.c b/sys/dev/disk/isp/isp_freebsd.c index 8ed32de88a..aa16e8cc2e 100644 --- a/sys/dev/disk/isp/isp_freebsd.c +++ b/sys/dev/disk/isp/isp_freebsd.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.32.2.20 2002/10/11 18:49:25 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/isp/isp_freebsd.c,v 1.17 2006/12/18 20:41:01 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/isp/isp_freebsd.c,v 1.18 2006/12/22 23:26:16 swildner Exp $ */ /* * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. * @@ -1100,7 +1100,7 @@ isp_target_start_ctio(struct ispsoftc *isp, union ccb *ccb) if (isp_getrqentry(isp, &nxti, &optr, &qe)) { xpt_print_path(ccb->ccb_h.path); - printf("Request Queue Overflow in isp_target_start_ctio\n"); + kprintf("Request Queue Overflow in isp_target_start_ctio\n"); return (CAM_RESRC_UNAVAIL); } bzero(local, QENTRY_LEN); @@ -1232,7 +1232,7 @@ isp_target_start_ctio(struct ispsoftc *isp, union ccb *ccb) if (isp_save_xs(isp, (XS_T *)ccb, hp)) { xpt_print_path(ccb->ccb_h.path); - printf("No XFLIST pointers for isp_target_start_ctio\n"); + kprintf("No XFLIST pointers for isp_target_start_ctio\n"); return (CAM_RESRC_UNAVAIL); } @@ -2866,9 +2866,9 @@ isp_prt(struct ispsoftc *isp, int level, const char *fmt, ...) if (level != ISP_LOGALL && (level & isp->isp_dblev) == 0) { return; } - printf("%s: ", device_get_nameunit(isp->isp_dev)); + kprintf("%s: ", device_get_nameunit(isp->isp_dev)); __va_start(ap, fmt); kvprintf(fmt, ap); __va_end(ap); - printf("\n"); + kprintf("\n"); } diff --git a/sys/dev/disk/isp/isp_pci.c b/sys/dev/disk/isp/isp_pci.c index 17dca27916..610ab6def1 100644 --- a/sys/dev/disk/isp/isp_pci.c +++ b/sys/dev/disk/isp/isp_pci.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.78.2.4 2002/10/11 18:50:53 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/isp/isp_pci.c,v 1.11 2006/10/25 20:55:53 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/isp/isp_pci.c,v 1.12 2006/12/22 23:26:16 swildner Exp $ */ /* * PCI specific probe and attach routines for Qlogic ISP SCSI adapters. * FreeBSD Version. @@ -323,7 +323,7 @@ isp_pci_probe(device_t dev) return (ENXIO); } if (device_get_unit(dev) == 0 && bootverbose) { - printf("Qlogic ISP Driver, FreeBSD Version %d.%d, " + kprintf("Qlogic ISP Driver, FreeBSD Version %d.%d, " "Core Version %d.%d\n", ISP_PLATFORM_VERSION_MAJOR, ISP_PLATFORM_VERSION_MINOR, ISP_CORE_VERSION_MAJOR, ISP_CORE_VERSION_MINOR); @@ -1817,36 +1817,36 @@ isp_pci_dumpregs(struct ispsoftc *isp, const char *msg) { struct isp_pcisoftc *pcs = (struct isp_pcisoftc *)isp; if (msg) - printf("%s: %s\n", device_get_nameunit(isp->isp_dev), msg); + kprintf("%s: %s\n", device_get_nameunit(isp->isp_dev), msg); else - printf("%s:\n", device_get_nameunit(isp->isp_dev)); + kprintf("%s:\n", device_get_nameunit(isp->isp_dev)); if (IS_SCSI(isp)) - printf(" biu_conf1=%x", ISP_READ(isp, BIU_CONF1)); + kprintf(" biu_conf1=%x", ISP_READ(isp, BIU_CONF1)); else - printf(" biu_csr=%x", ISP_READ(isp, BIU2100_CSR)); - printf(" biu_icr=%x biu_isr=%x biu_sema=%x ", ISP_READ(isp, BIU_ICR), + kprintf(" biu_csr=%x", ISP_READ(isp, BIU2100_CSR)); + kprintf(" biu_icr=%x biu_isr=%x biu_sema=%x ", ISP_READ(isp, BIU_ICR), ISP_READ(isp, BIU_ISR), ISP_READ(isp, BIU_SEMA)); - printf("risc_hccr=%x\n", ISP_READ(isp, HCCR)); + kprintf("risc_hccr=%x\n", ISP_READ(isp, HCCR)); if (IS_SCSI(isp)) { ISP_WRITE(isp, HCCR, HCCR_CMD_PAUSE); - printf(" cdma_conf=%x cdma_sts=%x cdma_fifostat=%x\n", + kprintf(" cdma_conf=%x cdma_sts=%x cdma_fifostat=%x\n", ISP_READ(isp, CDMA_CONF), ISP_READ(isp, CDMA_STATUS), ISP_READ(isp, CDMA_FIFO_STS)); - printf(" ddma_conf=%x ddma_sts=%x ddma_fifostat=%x\n", + kprintf(" ddma_conf=%x ddma_sts=%x ddma_fifostat=%x\n", ISP_READ(isp, DDMA_CONF), ISP_READ(isp, DDMA_STATUS), ISP_READ(isp, DDMA_FIFO_STS)); - printf(" sxp_int=%x sxp_gross=%x sxp(scsi_ctrl)=%x\n", + kprintf(" sxp_int=%x sxp_gross=%x sxp(scsi_ctrl)=%x\n", ISP_READ(isp, SXP_INTERRUPT), ISP_READ(isp, SXP_GROSS_ERR), ISP_READ(isp, SXP_PINS_CTRL)); ISP_WRITE(isp, HCCR, HCCR_CMD_RELEASE); } - printf(" mbox regs: %x %x %x %x %x\n", + kprintf(" mbox regs: %x %x %x %x %x\n", ISP_READ(isp, OUTMAILBOX0), ISP_READ(isp, OUTMAILBOX1), ISP_READ(isp, OUTMAILBOX2), ISP_READ(isp, OUTMAILBOX3), ISP_READ(isp, OUTMAILBOX4)); - printf(" PCI Status Command/Status=%x\n", + kprintf(" PCI Status Command/Status=%x\n", pci_read_config(pcs->pci_dev, PCIR_COMMAND, 1)); } diff --git a/sys/dev/disk/mcd/mcd.c b/sys/dev/disk/mcd/mcd.c index 6702b00c12..39c7a75e72 100644 --- a/sys/dev/disk/mcd/mcd.c +++ b/sys/dev/disk/mcd/mcd.c @@ -41,7 +41,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/mcd.c,v 1.115 2000/01/29 16:17:34 peter Exp $ - * $DragonFly: src/sys/dev/disk/mcd/Attic/mcd.c,v 1.20 2006/09/10 01:26:34 dillon Exp $ + * $DragonFly: src/sys/dev/disk/mcd/Attic/mcd.c,v 1.21 2006/12/22 23:26:16 swildner Exp $ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -66,9 +66,9 @@ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; #define MCD_TRACE(format, args...) \ { \ if (mcd_data[unit].debug) { \ - printf("mcd%d: status=0x%02x: ", \ + kprintf("mcd%d: status=0x%02x: ", \ unit, mcd_data[unit].status); \ - printf(format, ## args); \ + kprintf(format, ## args); \ } \ } @@ -310,15 +310,15 @@ mcdopen(struct dev_open_args *ap) return 0; } if (cd->status & MCDDOOROPEN) { - printf("mcd%d: door is open\n", unit); + kprintf("mcd%d: door is open\n", unit); return ENXIO; } if (!(cd->status & MCDDSKIN)) { - printf("mcd%d: no CD inside\n", unit); + kprintf("mcd%d: no CD inside\n", unit); return ENXIO; } if (cd->status & MCDDSKCHNG) { - printf("mcd%d: CD not sensed\n", unit); + kprintf("mcd%d: CD not sensed\n", unit); return ENXIO; } @@ -329,7 +329,7 @@ mcdopen(struct dev_open_args *ap) cd->partflags[part] |= MCDREADRAW; return 0; } - printf("mcd%d: failed to get disk size\n",unit); + kprintf("mcd%d: failed to get disk size\n",unit); return ENXIO; } else cd->flags |= MCDVALID; @@ -399,9 +399,9 @@ mcdstrategy(struct dev_strategy_args *ap) /*MCD_TRACE("strategy: buf=0x%lx, unit=%ld, offset=%lld bcount=%ld\n", bp,unit,bio->bio_offset,bp->b_bcount);*/ if (unit >= NMCD || bio->bio_offset < 0) { - printf("mcdstrategy: unit = %d, offset = %lld, bcount = %d\n", + kprintf("mcdstrategy: unit = %d, offset = %lld, bcount = %d\n", unit, bio->bio_offset, bp->b_bcount); - printf("mcd: mcdstratregy failure"); + kprintf("mcd: mcdstratregy failure"); bp->b_error = EINVAL; bp->b_flags |= B_ERROR; goto bad; @@ -726,7 +726,7 @@ twiddle_thumbs(int port, int unit, int count, char *whine) return 1; } if (bootverbose) - printf("mcd%d: timeout %s\n", unit, whine); + kprintf("mcd%d: timeout %s\n", unit, whine); return 0; } @@ -804,7 +804,7 @@ mcd_probe(struct isa_device *dev) mcd_data[unit].name = "Mitsumi ???"; break; } - printf("mcd%d: type %s, version info: %c %x\n", unit, mcd_data[unit].name, + kprintf("mcd%d: type %s, version info: %c %x\n", unit, mcd_data[unit].name, stbytes[1], stbytes[2]); return 4; @@ -833,7 +833,7 @@ mcd_getreply(int unit,int dly) /* wait data to become ready */ if (mcd_waitrdy(port,dly)<0) { - printf("mcd%d: timeout getreply\n",unit); + kprintf("mcd%d: timeout getreply\n",unit); return -1; } @@ -890,7 +890,7 @@ mcd_get(int unit, char *buf, int nmax) for (i=0; ivolinfo,sizeof(struct mcd_volinfo)) < 0) { - printf("mcd%d: mcd_volinfo: error read data\n",unit); + kprintf("mcd%d: mcd_volinfo: error read data\n",unit); return EIO; } @@ -1039,7 +1039,7 @@ retry_status: RDELAY_WAITSTAT-mbx->count); /* reject, if audio active */ if (cd->status & MCDAUDIOBSY) { - printf("mcd%d: audio is active\n",unit); + kprintf("mcd%d: audio is active\n",unit); goto readerr; } @@ -1067,14 +1067,14 @@ retry_mode: mcd_timeout, (void *)MCD_S_WAITMODE); return; } else { - printf("mcd%d: timeout getstatus\n",unit); + kprintf("mcd%d: timeout getstatus\n",unit); goto readerr; } case MCD_S_WAITMODE: callout_stop(&cd->callout); if (mbx->count-- < 0) { - printf("mcd%d: timeout set mode\n",unit); + kprintf("mcd%d: timeout set mode\n",unit); goto readerr; } if (inb(port+MCD_FLAGS) & MFL_STATUS_NOT_AVAIL) { @@ -1179,14 +1179,14 @@ retry_read: mcd_timeout, (void *)MCD_S_WAITREAD); return; } else { - printf("mcd%d: timeout read data\n",unit); + kprintf("mcd%d: timeout read data\n",unit); goto readerr; } } readerr: if (mbx->retry-- > 0) { - printf("mcd%d: retrying\n",unit); + kprintf("mcd%d: retrying\n",unit); state = MCD_S_BEGIN1; goto loop; } @@ -1201,11 +1201,11 @@ harderr: return; changed: - printf("mcd%d: media changed\n", unit); + kprintf("mcd%d: media changed\n", unit); goto harderr; #ifdef NOTDEF - printf("mcd%d: unit timeout, resetting\n",mbx->unit); + kprintf("mcd%d: unit timeout, resetting\n",mbx->unit); outb(mbx->port+mcd_reset,MCD_CMDRESET); DELAY(300000); (void)mcd_getstat(mbx->unit,1); @@ -1319,7 +1319,7 @@ mcd_setmode(int unit, int mode) if (cd->curr_mode == mode) return 0; if (cd->debug) - printf("mcd%d: setting mode to %d\n", unit, mode); + kprintf("mcd%d: setting mode to %d\n", unit, mode); for(retry=0; retrycurr_mode = MCD_MD_UNKNOWN; @@ -1330,7 +1330,7 @@ mcd_setmode(int unit, int mode) return 0; } if (st == -2) { - printf("mcd%d: media changed\n", unit); + kprintf("mcd%d: media changed\n", unit); break; } } @@ -1369,7 +1369,7 @@ mcd_read_toc(int unit) return 0; if (cd->debug) - printf("mcd%d: reading toc header\n", unit); + kprintf("mcd%d: reading toc header\n", unit); if ((rc = mcd_toc_header(unit, &th)) != 0) return rc; @@ -1381,7 +1381,7 @@ mcd_read_toc(int unit) return EIO; if (cd->debug) - printf("mcd%d: get_toc reading qchannel info\n",unit); + kprintf("mcd%d: get_toc reading qchannel info\n",unit); for(trk=th.starting_track; trk<=th.ending_track; trk++) cd->toc[trk].idx_no = 0; @@ -1417,7 +1417,7 @@ mcd_read_toc(int unit) if (cd->debug) { int i; for (i = th.starting_track; i <= idx; i++) - printf("mcd%d: trk %d idx %d pos %d %d %d\n", + kprintf("mcd%d: trk %d idx %d pos %d %d %d\n", unit, i, cd->toc[i].idx_no > 0x99 ? cd->toc[i].idx_no : bcd2bin(cd->toc[i].idx_no), @@ -1561,7 +1561,7 @@ mcd_stop(int unit) cd->audio_status != CD_AS_PLAY_PAUSED && cd->audio_status != CD_AS_PLAY_COMPLETED) { if (cd->debug) - printf("mcd%d: stop attempted when not playing, audio status %d\n", + kprintf("mcd%d: stop attempted when not playing, audio status %d\n", unit, cd->audio_status); return EINVAL; } @@ -1582,7 +1582,7 @@ mcd_getqchan(int unit, struct mcd_qchninfo *q) if (mcd_get(unit, (char *) q, sizeof(struct mcd_qchninfo)) < 0) return -1; if (cd->debug) { - printf("mcd%d: getqchan control=0x%x addr_type=0x%x trk=%d ind=%d ttm=%d:%d.%d dtm=%d:%d.%d\n", + kprintf("mcd%d: getqchan control=0x%x addr_type=0x%x trk=%d ind=%d ttm=%d:%d.%d dtm=%d:%d.%d\n", unit, q->control, q->addr_type, bcd2bin(q->trk_no), bcd2bin(q->idx_no), @@ -1603,7 +1603,7 @@ mcd_subchan(int unit, struct ioc_read_subchannel *sc) int lba; if (cd->debug) - printf("mcd%d: subchan af=%d, df=%d\n", unit, + kprintf("mcd%d: subchan af=%d, df=%d\n", unit, sc->address_format, sc->data_format); @@ -1672,7 +1672,7 @@ mcd_playmsf(int unit, struct ioc_play_msf *p) struct mcd_read2 pb; if (cd->debug) - printf("mcd%d: playmsf: from %d:%d.%d to %d:%d.%d\n", + kprintf("mcd%d: playmsf: from %d:%d.%d to %d:%d.%d\n", unit, p->start_m, p->start_s, p->start_f, p->end_m, p->end_s, p->end_f); @@ -1711,7 +1711,7 @@ mcd_playtracks(int unit, struct ioc_play_track *pt) return rc; if (cd->debug) - printf("mcd%d: playtracks from %d:%d to %d:%d\n", unit, + kprintf("mcd%d: playtracks from %d:%d to %d:%d\n", unit, a, pt->start_index, z, pt->end_index); if ( a < bcd2bin(cd->volinfo.trk_low) @@ -1739,7 +1739,7 @@ mcd_playblocks(int unit, struct ioc_play_blocks *p) struct mcd_read2 pb; if (cd->debug) - printf("mcd%d: playblocks: blkno %d length %d\n", + kprintf("mcd%d: playblocks: blkno %d length %d\n", unit, p->blk, p->len); if (p->blk > cd->disksize || p->len > cd->disksize || @@ -1785,11 +1785,11 @@ mcd_play(int unit, struct mcd_read2 *pb) } if (status == -2) { - printf("mcd%d: media changed\n", unit); + kprintf("mcd%d: media changed\n", unit); return ENXIO; } if (cd->debug) - printf("mcd%d: mcd_play retry=%d, status=0x%02x\n", unit, retry, status); + kprintf("mcd%d: mcd_play retry=%d, status=0x%02x\n", unit, retry, status); if (st < 0) return ENXIO; cd->audio_status = CD_AS_PLAY_IN_PROGRESS; @@ -1807,7 +1807,7 @@ mcd_pause(int unit) if (cd->audio_status != CD_AS_PLAY_IN_PROGRESS && cd->audio_status != CD_AS_PLAY_PAUSED) { if (cd->debug) - printf("mcd%d: pause attempted when not playing, audio status %d\n", + kprintf("mcd%d: pause attempted when not playing, audio status %d\n", unit, cd->audio_status); return EINVAL; } diff --git a/sys/dev/disk/md/md.c b/sys/dev/disk/md/md.c index 9572eb2e29..504afd50a1 100644 --- a/sys/dev/disk/md/md.c +++ b/sys/dev/disk/md/md.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/dev/md/md.c,v 1.8.2.2 2002/08/19 17:43:34 jdp Exp $ - * $DragonFly: src/sys/dev/disk/md/md.c,v 1.14 2006/09/10 01:26:34 dillon Exp $ + * $DragonFly: src/sys/dev/disk/md/md.c,v 1.15 2006/12/22 23:26:16 swildner Exp $ * */ @@ -94,7 +94,7 @@ mdopen(struct dev_open_args *ap) struct disklabel *dl; if (md_debug) - printf("mdopen(%s %x %x)\n", + kprintf("mdopen(%s %x %x)\n", devtoname(dev), ap->a_oflags, ap->a_devtype); sc = dev->si_drv1; @@ -118,7 +118,7 @@ mdioctl(struct dev_ioctl_args *ap) cdev_t dev = ap->a_head.a_dev; if (md_debug) - printf("mdioctl(%s %lx %p %x)\n", + kprintf("mdioctl(%s %lx %p %x)\n", devtoname(dev), ap->a_cmd, ap->a_data, ap->a_fflag); return (ENOIOCTL); @@ -133,7 +133,7 @@ mdstrategy(struct dev_strategy_args *ap) struct md_s *sc; if (md_debug > 1) { - printf("mdstrategy(%p) %s %08x, %lld, %d, %p)\n", + kprintf("mdstrategy(%p) %s %08x, %lld, %d, %p)\n", bp, devtoname(dev), bp->b_flags, bio->bio_offset, bp->b_bcount, bp->b_data); } @@ -161,7 +161,7 @@ mdstrategy_malloc(struct dev_strategy_args *ap) int i; if (md_debug > 1) - printf("mdstrategy_malloc(%p) %s %08xx, %lld, %d, %p)\n", + kprintf("mdstrategy_malloc(%p) %s %08xx, %lld, %d, %p)\n", bp, devtoname(dev), bp->b_flags, bio->bio_offset, bp->b_bcount, bp->b_data); @@ -221,7 +221,7 @@ mdstrategy_malloc(struct dev_strategy_args *ap) secval = 0; } if (md_debug > 2) - printf("%08x %p %p %d\n", bp->b_flags, secpp, secp, secval); + kprintf("%08x %p %p %d\n", bp->b_flags, secpp, secp, secval); switch(bp->b_cmd) { case BUF_CMD_FREEBLKS: @@ -301,7 +301,7 @@ mdstrategy_preload(struct dev_strategy_args *ap) struct md_s *sc; if (md_debug > 1) - printf("mdstrategy_preload(%p) %s %08x, %lld, %d, %p)\n", + kprintf("mdstrategy_preload(%p) %s %08x, %lld, %d, %p)\n", bp, devtoname(dev), bp->b_flags, bio->bio_offset, bp->b_bcount, bp->b_data); @@ -399,7 +399,7 @@ mdcreate_malloc(void) MALLOC(sc->secp, u_char **, sizeof(u_char *), M_MD, M_WAITOK); bzero(sc->secp, sizeof(u_char *)); sc->nsecp = 1; - printf("md%d: Malloc disk\n", sc->unit); + kprintf("md%d: Malloc disk\n", sc->unit); } static void @@ -428,7 +428,7 @@ md_drvinit(void *unused) ptr = *(u_char **)c; c = preload_search_info(mod, MODINFO_SIZE); len = *(unsigned *)c; - printf("md%d: Preloaded image <%s> %d bytes at %p\n", + kprintf("md%d: Preloaded image <%s> %d bytes at %p\n", mdunits, name, len, ptr); mdcreate_preload(ptr, len); } diff --git a/sys/dev/disk/mpt/mpt_debug.c b/sys/dev/disk/mpt/mpt_debug.c index 0d186f2cdf..94e103b440 100644 --- a/sys/dev/disk/mpt/mpt_debug.c +++ b/sys/dev/disk/mpt/mpt_debug.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/mpt/mpt_debug.c,v 1.2.2.1 2002/08/23 06:59:05 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/mpt/mpt_debug.c,v 1.4 2006/12/20 18:14:38 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/mpt/mpt_debug.c,v 1.5 2006/12/22 23:26:16 swildner Exp $ */ /* * Debug routines for LSI '909 FC adapters. * FreeBSD Version. @@ -287,7 +287,7 @@ mpt_state(u_int32_t mb) void mpt_print_db(u_int32_t mb) { - printf("mpt mailbox: (0x%x) State %s WhoInit %s\n", + kprintf("mpt mailbox: (0x%x) State %s WhoInit %s\n", mb, mpt_state(mb), mpt_who(MPT_WHO(mb))); } @@ -297,67 +297,67 @@ mpt_print_db(u_int32_t mb) static void mpt_print_reply_hdr(MSG_DEFAULT_REPLY *msg) { - printf("%s Reply @ %p\n", mpt_ioc_function(msg->Function), msg); - printf("\tIOC Status %s\n", mpt_ioc_status(msg->IOCStatus)); - printf("\tIOCLogInfo 0x%08x\n", msg->IOCLogInfo); - printf("\tMsgLength 0x%02x\n", msg->MsgLength); - printf("\tMsgFlags 0x%02x\n", msg->MsgFlags); - printf("\tMsgContext 0x%08x\n", msg->MsgContext); + kprintf("%s Reply @ %p\n", mpt_ioc_function(msg->Function), msg); + kprintf("\tIOC Status %s\n", mpt_ioc_status(msg->IOCStatus)); + kprintf("\tIOCLogInfo 0x%08x\n", msg->IOCLogInfo); + kprintf("\tMsgLength 0x%02x\n", msg->MsgLength); + kprintf("\tMsgFlags 0x%02x\n", msg->MsgFlags); + kprintf("\tMsgContext 0x%08x\n", msg->MsgContext); } static void mpt_print_init_reply(MSG_IOC_INIT_REPLY *msg) { mpt_print_reply_hdr((MSG_DEFAULT_REPLY *)msg); - printf("\tWhoInit %s\n", mpt_who(msg->WhoInit)); - printf("\tMaxDevices 0x%02x\n", msg->MaxDevices); - printf("\tMaxBuses 0x%02x\n", msg->MaxBuses); + kprintf("\tWhoInit %s\n", mpt_who(msg->WhoInit)); + kprintf("\tMaxDevices 0x%02x\n", msg->MaxDevices); + kprintf("\tMaxBuses 0x%02x\n", msg->MaxBuses); } static void mpt_print_ioc_facts(MSG_IOC_FACTS_REPLY *msg) { mpt_print_reply_hdr((MSG_DEFAULT_REPLY *)msg); - printf("\tIOCNumber %d\n", msg->IOCNumber); - printf("\tMaxChainDepth %d\n", msg->MaxChainDepth); - printf("\tWhoInit %s\n", mpt_who(msg->WhoInit)); - printf("\tBlockSize %d\n", msg->BlockSize); - printf("\tFlags %d\n", msg->Flags); - printf("\tReplyQueueDepth %d\n", msg->ReplyQueueDepth); - printf("\tReqFrameSize 0x%04x\n", msg->RequestFrameSize); - printf("\tFW Version 0x%08x\n", msg->FWVersion.Word); - printf("\tProduct ID 0x%04x\n", msg->ProductID); - printf("\tCredits 0x%04x\n", msg->GlobalCredits); - printf("\tPorts %d\n", msg->NumberOfPorts); - printf("\tEventState 0x%02x\n", msg->EventState); - printf("\tHostMFA_HA 0x%08x\n", msg->CurrentHostMfaHighAddr); - printf("\tSenseBuf_HA 0x%08x\n", + kprintf("\tIOCNumber %d\n", msg->IOCNumber); + kprintf("\tMaxChainDepth %d\n", msg->MaxChainDepth); + kprintf("\tWhoInit %s\n", mpt_who(msg->WhoInit)); + kprintf("\tBlockSize %d\n", msg->BlockSize); + kprintf("\tFlags %d\n", msg->Flags); + kprintf("\tReplyQueueDepth %d\n", msg->ReplyQueueDepth); + kprintf("\tReqFrameSize 0x%04x\n", msg->RequestFrameSize); + kprintf("\tFW Version 0x%08x\n", msg->FWVersion.Word); + kprintf("\tProduct ID 0x%04x\n", msg->ProductID); + kprintf("\tCredits 0x%04x\n", msg->GlobalCredits); + kprintf("\tPorts %d\n", msg->NumberOfPorts); + kprintf("\tEventState 0x%02x\n", msg->EventState); + kprintf("\tHostMFA_HA 0x%08x\n", msg->CurrentHostMfaHighAddr); + kprintf("\tSenseBuf_HA 0x%08x\n", msg->CurrentSenseBufferHighAddr); - printf("\tRepFrameSize 0x%04x\n", msg->CurReplyFrameSize); - printf("\tMaxDevices 0x%02x\n", msg->MaxDevices); - printf("\tMaxBuses 0x%02x\n", msg->MaxBuses); - printf("\tFWImageSize 0x%04x\n", msg->FWImageSize); + kprintf("\tRepFrameSize 0x%04x\n", msg->CurReplyFrameSize); + kprintf("\tMaxDevices 0x%02x\n", msg->MaxDevices); + kprintf("\tMaxBuses 0x%02x\n", msg->MaxBuses); + kprintf("\tFWImageSize 0x%04x\n", msg->FWImageSize); } static void mpt_print_enable_reply(MSG_PORT_ENABLE_REPLY *msg) { mpt_print_reply_hdr((MSG_DEFAULT_REPLY *)msg); - printf("\tPort: %d\n", msg->PortNumber); + kprintf("\tPort: %d\n", msg->PortNumber); } static void mpt_print_scsi_io_reply(MSG_SCSI_IO_REPLY *msg) { mpt_print_reply_hdr((MSG_DEFAULT_REPLY *)msg); - printf("\tBus: %d\n", msg->Bus); - printf("\tTargetID %d\n", msg->TargetID); - printf("\tCDBLength %d\n", msg->CDBLength); - printf("\tSCSI Status: %s\n", mpt_scsi_status(msg->SCSIStatus)); - printf("\tSCSI State: %s\n", mpt_scsi_state(msg->SCSIState)); - printf("\tTransferCnt 0x%04x\n", msg->TransferCount); - printf("\tSenseCnt 0x%04x\n", msg->SenseCount); - printf("\tResponseInfo 0x%08x\n", msg->ResponseInfo); + kprintf("\tBus: %d\n", msg->Bus); + kprintf("\tTargetID %d\n", msg->TargetID); + kprintf("\tCDBLength %d\n", msg->CDBLength); + kprintf("\tSCSI Status: %s\n", mpt_scsi_status(msg->SCSIStatus)); + kprintf("\tSCSI State: %s\n", mpt_scsi_state(msg->SCSIState)); + kprintf("\tTransferCnt 0x%04x\n", msg->TransferCount); + kprintf("\tSenseCnt 0x%04x\n", msg->SenseCount); + kprintf("\tResponseInfo 0x%08x\n", msg->ResponseInfo); } @@ -366,51 +366,51 @@ static void mpt_print_event_notice(MSG_EVENT_NOTIFY_REPLY *msg) { mpt_print_reply_hdr((MSG_DEFAULT_REPLY *)msg); - printf("\tEvent: %s\n", mpt_ioc_event(msg->Event)); - printf("\tEventContext 0x%04x\n", msg->EventContext); - printf("\tAckRequired %d\n", msg->AckRequired); - printf("\tEventDataLength %d\n", msg->EventDataLength); - printf("\tContinuation %d\n", msg->MsgFlags & 0x80); + kprintf("\tEvent: %s\n", mpt_ioc_event(msg->Event)); + kprintf("\tEventContext 0x%04x\n", msg->EventContext); + kprintf("\tAckRequired %d\n", msg->AckRequired); + kprintf("\tEventDataLength %d\n", msg->EventDataLength); + kprintf("\tContinuation %d\n", msg->MsgFlags & 0x80); switch(msg->Event) { case MPI_EVENT_LOG_DATA: - printf("\tEvtLogData: 0x%04x\n", msg->Data[0]); + kprintf("\tEvtLogData: 0x%04x\n", msg->Data[0]); break; case MPI_EVENT_UNIT_ATTENTION: - printf("\tTargetID: 0x%04x\n", + kprintf("\tTargetID: 0x%04x\n", msg->Data[0] & 0xff); - printf("\tBus: 0x%04x\n", + kprintf("\tBus: 0x%04x\n", (msg->Data[0] >> 8) & 0xff); break; case MPI_EVENT_IOC_BUS_RESET: case MPI_EVENT_EXT_BUS_RESET: case MPI_EVENT_RESCAN: - printf("\tPort: %d\n", + kprintf("\tPort: %d\n", (msg->Data[0] >> 8) & 0xff); break; case MPI_EVENT_LINK_STATUS_CHANGE: - printf("\tLinkState: %d\n", + kprintf("\tLinkState: %d\n", msg->Data[0] & 0xff); - printf("\tPort: %d\n", + kprintf("\tPort: %d\n", (msg->Data[1] >> 8) & 0xff); break; case MPI_EVENT_LOOP_STATE_CHANGE: - printf("\tType: %d\n", + kprintf("\tType: %d\n", (msg->Data[0] >> 16) & 0xff); - printf("\tChar3: 0x%02x\n", + kprintf("\tChar3: 0x%02x\n", (msg->Data[0] >> 8) & 0xff); - printf("\tChar4: 0x%02x\n", + kprintf("\tChar4: 0x%02x\n", (msg->Data[0] ) & 0xff); - printf("\tPort: %d\n", + kprintf("\tPort: %d\n", (msg->Data[1] >> 8) & 0xff); break; case MPI_EVENT_LOGOUT: - printf("\tN_PortId: 0x%04x\n", msg->Data[0]); - printf("\tPort: %d\n", + kprintf("\tN_PortId: 0x%04x\n", msg->Data[0]); + kprintf("\tPort: %d\n", (msg->Data[1] >> 8) & 0xff); break; } @@ -450,10 +450,10 @@ mpt_print_reply(void *vmsg) static void mpt_print_request_hdr(MSG_REQUEST_HEADER *req) { - printf("%s @ %p\n", mpt_ioc_function(req->Function), req); - printf("\tChain Offset 0x%02x\n", req->ChainOffset); - printf("\tMsgFlags 0x%02x\n", req->MsgFlags); - printf("\tMsgContext 0x%08x\n", req->MsgContext); + kprintf("%s @ %p\n", mpt_ioc_function(req->Function), req); + kprintf("\tChain Offset 0x%02x\n", req->ChainOffset); + kprintf("\tMsgFlags 0x%02x\n", req->MsgFlags); + kprintf("\tMsgContext 0x%08x\n", req->MsgContext); } void @@ -464,14 +464,14 @@ mpt_print_scsi_io_request(MSG_SCSI_IO_REQUEST *orig_msg) bcopy(orig_msg, msg, sizeof (MSG_SCSI_IO_REQUEST)); mpt_print_request_hdr((MSG_REQUEST_HEADER *)msg); - printf("\tBus: %d\n", msg->Bus); - printf("\tTargetID %d\n", msg->TargetID); - printf("\tSenseBufferLength %d\n", msg->SenseBufferLength); - printf("\tLUN: 0x%0x\n", msg->LUN[1]); - printf("\tControl 0x%08x ", msg->Control); + kprintf("\tBus: %d\n", msg->Bus); + kprintf("\tTargetID %d\n", msg->TargetID); + kprintf("\tSenseBufferLength %d\n", msg->SenseBufferLength); + kprintf("\tLUN: 0x%0x\n", msg->LUN[1]); + kprintf("\tControl 0x%08x ", msg->Control); #define MPI_PRINT_FIELD(x) \ case MPI_SCSIIO_CONTROL_ ## x : \ - printf(" " #x " "); \ + kprintf(" " #x " "); \ break switch (msg->Control & MPI_SCSIIO_CONTROL_DATADIRECTION_MASK) { @@ -479,7 +479,7 @@ mpt_print_scsi_io_request(MSG_SCSI_IO_REQUEST *orig_msg) MPI_PRINT_FIELD(WRITE); MPI_PRINT_FIELD(READ); default: - printf(" Invalid DIR! "); + kprintf(" Invalid DIR! "); break; } switch (msg->Control & MPI_SCSIIO_CONTROL_TASKATTRIBUTE_MASK) { @@ -490,19 +490,19 @@ mpt_print_scsi_io_request(MSG_SCSI_IO_REQUEST *orig_msg) MPI_PRINT_FIELD(UNTAGGED); MPI_PRINT_FIELD(NO_DISCONNECT); default: - printf(" Unknown attribute! "); + kprintf(" Unknown attribute! "); break; } - printf("\n"); + kprintf("\n"); #undef MPI_PRINT_FIELD - printf("\tDataLength\t0x%08x\n", msg->DataLength); - printf("\tSenseBufAddr\t0x%08x\n", msg->SenseBufferLowAddr); - printf("\tCDB[0:%d]\t", msg->CDBLength); + kprintf("\tDataLength\t0x%08x\n", msg->DataLength); + kprintf("\tSenseBufAddr\t0x%08x\n", msg->SenseBufferLowAddr); + kprintf("\tCDB[0:%d]\t", msg->CDBLength); for (i = 0; i < msg->CDBLength; i++) - printf("%02x ", msg->CDB[i]); - printf("\n"); + kprintf("%02x ", msg->CDB[i]); + kprintf("\n"); mpt_dump_sgl(&orig_msg->SGL); } @@ -546,27 +546,27 @@ mpt_dump_sgl(SGE_IO_UNION *su) do { int iprt; - printf("\t"); + kprintf("\t"); flags = MPI_SGE_GET_FLAGS(se->FlagsLength); switch (flags & MPI_SGE_FLAGS_ELEMENT_MASK) { case MPI_SGE_FLAGS_SIMPLE_ELEMENT: { - printf("SE32 %p: Addr=0x%0x FlagsLength=0x%0x\n", + kprintf("SE32 %p: Addr=0x%0x FlagsLength=0x%0x\n", se, se->Address, se->FlagsLength); - printf(" "); + kprintf(" "); break; } case MPI_SGE_FLAGS_CHAIN_ELEMENT: { SGE_CHAIN32 *ce = (SGE_CHAIN32 *) se; - printf("CE32 %p: Addr=0x%0x NxtChnO=0x%x Flgs=0x%x " + kprintf("CE32 %p: Addr=0x%0x NxtChnO=0x%x Flgs=0x%x " "Len=0x%0x\n", ce, ce->Address, ce->NextChainOffset, ce->Flags, ce->Length); flags = 0; break; } case MPI_SGE_FLAGS_TRANSACTION_ELEMENT: - printf("TE32 @ %p\n", se); + kprintf("TE32 @ %p\n", se); flags = 0; break; } @@ -574,10 +574,10 @@ mpt_dump_sgl(SGE_IO_UNION *su) #define MPT_PRINT_FLAG(x) \ if (flags & MPI_SGE_FLAGS_ ## x ) { \ if (iprt == 0) { \ - printf("\t"); \ + kprintf("\t"); \ } \ - printf(" "); \ - printf( #x ); \ + kprintf(" "); \ + kprintf( #x ); \ iprt++; \ } MPT_PRINT_FLAG(LOCAL_ADDRESS); @@ -588,7 +588,7 @@ mpt_dump_sgl(SGE_IO_UNION *su) MPT_PRINT_FLAG(END_OF_LIST); #undef MPT_PRINT_FLAG if (iprt) - printf("\n"); + kprintf("\n"); se++; iCount -= 1; } while ((flags & MPI_SGE_FLAGS_END_OF_LIST) == 0 && iCount != 0); diff --git a/sys/dev/disk/mpt/mpt_freebsd.c b/sys/dev/disk/mpt/mpt_freebsd.c index bbfbced57c..4fe6296aef 100644 --- a/sys/dev/disk/mpt/mpt_freebsd.c +++ b/sys/dev/disk/mpt/mpt_freebsd.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/mpt/mpt_freebsd.c,v 1.3.2.3 2002/09/24 21:37:25 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/mpt/mpt_freebsd.c,v 1.8 2005/06/16 15:48:59 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/mpt/mpt_freebsd.c,v 1.9 2006/12/22 23:26:16 swildner Exp $ */ /* * FreeBSD/CAM specific routines for LSI '909 FC adapters. * FreeBSD Version. @@ -133,9 +133,9 @@ mpttimeout(void *arg) mpt_read(mpt, MPT_OFFSET_INTR_STATUS), mpt_read(mpt, MPT_OFFSET_INTR_MASK), mpt_read(mpt, MPT_OFFSET_DOORBELL) ); - printf("request state %s\n", mpt_req_state(req->debug)); + kprintf("request state %s\n", mpt_req_state(req->debug)); if (ccb != req->ccb) { - printf("time out: ccb %p != req->ccb %p\n", + kprintf("time out: ccb %p != req->ccb %p\n", ccb,req->ccb); } mpt_print_scsi_io_request((MSG_SCSI_IO_REQUEST *)req->req_vbuf); @@ -690,22 +690,22 @@ mpt_event_notify_reply(mpt_softc_t *mpt, MSG_EVENT_NOTIFY_REPLY *msg) switch ((msg->Data[0] >> 8) & 0xff) { case 0xF7: if ((msg->Data[0] & 0xff) == 0xF7) { - printf("Device needs AL_PA\n"); + kprintf("Device needs AL_PA\n"); } else { - printf("Device %02X doesn't like FC performance\n", + kprintf("Device %02X doesn't like FC performance\n", msg->Data[0] & 0xFF); } break; case 0xF8: if ((msg->Data[0] & 0xff) == 0xF7) { - printf("Device had loop failure at its receiver prior to acquiring AL_PA\n"); + kprintf("Device had loop failure at its receiver prior to acquiring AL_PA\n"); } else { - printf("Device %02X detected loop failure at its receiver\n", + kprintf("Device %02X detected loop failure at its receiver\n", msg->Data[0] & 0xFF); } break; default: - printf("Device %02X requests that device %02X reset itself\n", + kprintf("Device %02X requests that device %02X reset itself\n", msg->Data[0] & 0xFF, (msg->Data[0] >> 8) & 0xFF); break; @@ -817,7 +817,7 @@ mpt_done(mpt_softc_t *mpt, u_int32_t reply) /* Did we end up with a valid index into the table? */ if (index < 0 || index >= MPT_MAX_REQUESTS(mpt)) { - printf("mpt_done: invalid index (%x) in reply\n", index); + kprintf("mpt_done: invalid index (%x) in reply\n", index); return; } @@ -825,7 +825,7 @@ mpt_done(mpt_softc_t *mpt, u_int32_t reply) /* Make sure memory hasn't been trashed */ if (req->index != index) { - printf("mpt_done: corrupted request struct"); + kprintf("mpt_done: corrupted request struct"); return; } @@ -858,15 +858,15 @@ mpt_done(mpt_softc_t *mpt, u_int32_t reply) device_printf(mpt->dev, "mpt_done: corrupted ccb, index = 0x%02x seq = 0x%08x", req->index, req->sequence); - printf(" request state %s\nmpt_request:\n", + kprintf(" request state %s\nmpt_request:\n", mpt_req_state(req->debug)); mpt_print_scsi_io_request((MSG_SCSI_IO_REQUEST *)req->req_vbuf); if (mpt_reply != NULL) { - printf("\nmpt_done: reply:\n"); + kprintf("\nmpt_done: reply:\n"); mpt_print_reply(MPT_REPLY_PTOV(mpt, reply)); } else { - printf("\nmpt_done: context reply: 0x%08x\n", reply); + kprintf("\nmpt_done: context reply: 0x%08x\n", reply); } goto done; } diff --git a/sys/dev/disk/nata/ata-all.c b/sys/dev/disk/nata/ata-all.c index 8e03c3d4a3..e58ee62acf 100644 --- a/sys/dev/disk/nata/ata-all.c +++ b/sys/dev/disk/nata/ata-all.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-all.c,v 1.273 2006/05/12 05:04:40 jhb Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-all.c,v 1.5 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/nata/ata-all.c,v 1.6 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -249,8 +249,8 @@ ata_reinit(device_t dev) "WARNING - %s requeued due to channel reset", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); + kprintf(" LBA=%ju", request->u.ata.lba); + kprintf("\n"); request->flags |= ATA_R_REQUEUE; ata_queue_request(request); } @@ -628,7 +628,7 @@ ata_getparam(struct ata_device *atadev, int init) bpack(atacap->serial, atacap->serial, sizeof(atacap->serial)); if (bootverbose) - printf("ata%d-%s: pio=%s wdma=%s udma=%s cable=%s wire\n", + kprintf("ata%d-%s: pio=%s wdma=%s udma=%s cable=%s wire\n", device_get_unit(ch->dev), atadev->unit == ATA_MASTER ? "master" : "slave", ata_mode2str(ata_pmode(atacap)), @@ -1007,12 +1007,12 @@ ata_module_event_handler(module_t mod, int what, void *arg) if (!(ata_delayed_attach = (struct intr_config_hook *) kmalloc(sizeof(struct intr_config_hook), M_TEMP, M_NOWAIT | M_ZERO))) { - printf("ata: kmalloc of delayed attach hook failed\n"); + kprintf("ata: kmalloc of delayed attach hook failed\n"); return EIO; } ata_delayed_attach->ich_func = (void*)ata_boot_attach; if (config_intrhook_establish(ata_delayed_attach) != 0) { - printf("ata: config_intrhook_establish failed\n"); + kprintf("ata: config_intrhook_establish failed\n"); kfree(ata_delayed_attach, M_TEMP); } } diff --git a/sys/dev/disk/nata/ata-chipset.c b/sys/dev/disk/nata/ata-chipset.c index 4be2eaad92..7657ea55be 100644 --- a/sys/dev/disk/nata/ata-chipset.c +++ b/sys/dev/disk/nata/ata-chipset.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-chipset.c,v 1.166 2006/07/24 10:44:50 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-chipset.c,v 1.2 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/nata/ata-chipset.c,v 1.3 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -542,7 +542,7 @@ ata_ahci_status(device_t dev) /* do we have cold connect surprise */ if (istatus & ATA_AHCI_P_IX_CPD) { - printf("ata_ahci_status status=%08x sstatus=%08x error=%08x\n", + kprintf("ata_ahci_status status=%08x sstatus=%08x error=%08x\n", istatus, sstatus, error); } diff --git a/sys/dev/disk/nata/ata-lowlevel.c b/sys/dev/disk/nata/ata-lowlevel.c index 99e619968b..cc9938528d 100644 --- a/sys/dev/disk/nata/ata-lowlevel.c +++ b/sys/dev/disk/nata/ata-lowlevel.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-lowlevel.c,v 1.77 2006/07/04 20:36:03 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-lowlevel.c,v 1.1 2006/12/04 14:40:37 tgen Exp $ + * $DragonFly: src/sys/dev/disk/nata/ata-lowlevel.c,v 1.2 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -200,7 +200,7 @@ ata_begin_transaction(struct ata_request *request) goto begin_continue; } /* NOT REACHED */ - printf("ata_begin_transaction OOPS!!!\n"); + kprintf("ata_begin_transaction OOPS!!!\n"); begin_finished: if (ch->dma && ch->dma->flags & ATA_DMA_LOADED) @@ -455,7 +455,7 @@ ata_end_transaction(struct ata_request *request) goto end_finished; } /* NOT REACHED */ - printf("ata_end_transaction OOPS!!\n"); + kprintf("ata_end_transaction OOPS!!\n"); end_finished: callout_stop(&request->callout); diff --git a/sys/dev/disk/nata/ata-queue.c b/sys/dev/disk/nata/ata-queue.c index 5463f31609..769913109b 100644 --- a/sys/dev/disk/nata/ata-queue.c +++ b/sys/dev/disk/nata/ata-queue.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.65 2006/07/21 19:13:05 imp Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-queue.c,v 1.3 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/nata/ata-queue.c,v 1.4 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -291,8 +291,8 @@ ata_completed(void *context, int dummy) ata_cmd2str(request), request->retries, request->retries == 1 ? "y" : "ies"); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); + kprintf(" LBA=%ju", request->u.ata.lba); + kprintf("\n"); } request->flags &= ~(ATA_R_TIMEOUT | ATA_R_DEBUG); request->flags |= (ATA_R_AT_HEAD | ATA_R_REQUEUE); @@ -308,8 +308,8 @@ ata_completed(void *context, int dummy) device_printf(request->dev, "FAILURE - %s timed out", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); + kprintf(" LBA=%ju", request->u.ata.lba); + kprintf("\n"); } } request->result = EIO; @@ -323,8 +323,8 @@ ata_completed(void *context, int dummy) "WARNING - %s soft error (ECC corrected)", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); + kprintf(" LBA=%ju", request->u.ata.lba); + kprintf("\n"); } /* if this is a UDMA CRC error we reinject if there are retries left */ @@ -334,8 +334,8 @@ ata_completed(void *context, int dummy) "WARNING - %s UDMA ICRC error (retrying request)", ata_cmd2str(request)); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); + kprintf(" LBA=%ju", request->u.ata.lba); + kprintf("\n"); request->flags |= (ATA_R_AT_HEAD | ATA_R_REQUEUE); ata_queue_request(request); return; @@ -360,10 +360,10 @@ ata_completed(void *context, int dummy) "\3ABORTED\2NO_MEDIA\1ILLEGAL_LENGTH"); if ((request->flags & ATA_R_DMA) && (request->dmastat & ATA_BMSTAT_ERROR)) - printf(" dma=0x%02x", request->dmastat); + kprintf(" dma=0x%02x", request->dmastat); if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); + kprintf(" LBA=%ju", request->u.ata.lba); + kprintf("\n"); } request->result = EIO; } @@ -427,12 +427,12 @@ ata_completed(void *context, int dummy) request->u.atapi.sense.asc, request->u.atapi.sense.ascq); if (request->u.atapi.sense.specific & ATA_SENSE_SPEC_VALID) - printf("sks=0x%02x 0x%02x 0x%02x\n", + kprintf("sks=0x%02x 0x%02x 0x%02x\n", request->u.atapi.sense.specific & ATA_SENSE_SPEC_MASK, request->u.atapi.sense.specific1, request->u.atapi.sense.specific2); else - printf("\n"); + kprintf("\n"); } if ((request->u.atapi.sense.key & ATA_SENSE_KEY_MASK ? diff --git a/sys/dev/disk/nata/ata-raid.c b/sys/dev/disk/nata/ata-raid.c index d24e23eef5..e2b6264d40 100644 --- a/sys/dev/disk/nata/ata-raid.c +++ b/sys/dev/disk/nata/ata-raid.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.120 2006/04/15 10:27:41 maxim Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-raid.c,v 1.2 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/nata/ata-raid.c,v 1.3 2006/12/22 23:26:16 swildner Exp $ */ #include @@ -158,40 +158,40 @@ ata_raid_attach(struct ar_softc *rdp, int writeback) rdp->disk.d_label.d_secpercyl = rdp->sectors * rdp->heads; rdp->disk.d_label.d_secperunit = rdp->total_secs; - printf("ar%d: %juMB <%s %s%s> status: %s\n", rdp->lun, + kprintf("ar%d: %juMB <%s %s%s> status: %s\n", rdp->lun, rdp->total_sectors / ((1024L * 1024L) / DEV_BSIZE), ata_raid_format(rdp), ata_raid_type(rdp), buffer, ata_raid_flags(rdp)); if (testing || bootverbose) - printf("ar%d: %ju sectors [%dC/%dH/%dS] <%s> subdisks defined as:\n", + kprintf("ar%d: %ju sectors [%dC/%dH/%dS] <%s> subdisks defined as:\n", rdp->lun, rdp->total_sectors, rdp->cylinders, rdp->heads, rdp->sectors, rdp->name); for (disk = 0; disk < rdp->total_disks; disk++) { - printf("ar%d: disk%d ", rdp->lun, disk); + kprintf("ar%d: disk%d ", rdp->lun, disk); if (rdp->disks[disk].dev) { if (rdp->disks[disk].flags & AR_DF_PRESENT) { /* status of this disk in the array */ if (rdp->disks[disk].flags & AR_DF_ONLINE) - printf("READY "); + kprintf("READY "); else if (rdp->disks[disk].flags & AR_DF_SPARE) - printf("SPARE "); + kprintf("SPARE "); else - printf("FREE "); + kprintf("FREE "); /* what type of disk is this in the array */ switch (rdp->type) { case AR_T_RAID1: case AR_T_RAID01: if (disk < rdp->width) - printf("(master) "); + kprintf("(master) "); else - printf("(mirror) "); + kprintf("(mirror) "); } /* which physical disk is used */ - printf("using %s at ata%d-%s\n", + kprintf("using %s at ata%d-%s\n", device_get_nameunit(rdp->disks[disk].dev), device_get_unit(device_get_parent(rdp->disks[disk].dev)), (((struct ata_device *) @@ -199,12 +199,12 @@ ata_raid_attach(struct ar_softc *rdp, int writeback) ATA_MASTER) ? "master" : "slave"); } else if (rdp->disks[disk].flags & AR_DF_ASSIGNED) - printf("DOWN\n"); + kprintf("DOWN\n"); else - printf("INVALID no RAID config on this subdisk\n"); + kprintf("INVALID no RAID config on this subdisk\n"); } else - printf("DOWN no device found for this subdisk\n"); + kprintf("DOWN no device found for this subdisk\n"); } } @@ -310,7 +310,7 @@ ata_raid_strategy(struct dev_strategy_args *ap) break; default: - printf("ar%d: unknown array type in ata_raid_strategy\n", rdp->lun); + kprintf("ar%d: unknown array type in ata_raid_strategy\n", rdp->lun); bbp->b_flags |= B_ERROR; bbp->b_error = EIO; biodone(bp); @@ -452,11 +452,11 @@ ata_raid_strategy(struct dev_strategy_args *ap) } else { ata_free_composite(composite); - printf("DOH! ata_alloc_request failed!\n"); + kprintf("DOH! ata_alloc_request failed!\n"); } } else { - printf("DOH! ata_alloc_composite failed!\n"); + kprintf("DOH! ata_alloc_composite failed!\n"); } } else if (rdp->disks[this].flags & AR_DF_ONLINE) { @@ -469,7 +469,7 @@ ata_raid_strategy(struct dev_strategy_args *ap) rdp->rebuild_lba = blk + chunk; } else - printf("DOH! we didn't find the rebuild part\n"); + kprintf("DOH! we didn't find the rebuild part\n"); } } if (bbp->b_cmd == BUF_CMD_WRITE) { @@ -513,11 +513,11 @@ ata_raid_strategy(struct dev_strategy_args *ap) } else { ata_free_composite(composite); - printf("DOH! ata_alloc_request failed!\n"); + kprintf("DOH! ata_alloc_request failed!\n"); } } else { - printf("DOH! ata_alloc_composite failed!\n"); + kprintf("DOH! ata_alloc_composite failed!\n"); } } else @@ -573,7 +573,7 @@ ata_raid_strategy(struct dev_strategy_args *ap) break; default: - printf("ar%d: unknown array type in ata_raid_strategy\n", rdp->lun); + kprintf("ar%d: unknown array type in ata_raid_strategy\n", rdp->lun); } } } @@ -656,7 +656,7 @@ ata_raid_done(struct ata_request *request) else if (request->flags & ATA_R_WRITE) { if (composite->rd_done & (1 << mirror)) { if (request->result) { - printf("DOH! rebuild failed\n"); /* XXX SOS */ + kprintf("DOH! rebuild failed\n"); /* XXX SOS */ rdp->rebuild_lba = blk; } if (!composite->residual) @@ -688,12 +688,12 @@ ata_raid_done(struct ata_request *request) if (composite->wr_done & (1 << mirror)) { if (request->result) { if (composite->request[mirror]->result) { - printf("DOH! all disks failed and got here\n"); + kprintf("DOH! all disks failed and got here\n"); bbp->b_error = EIO; } if (rdp->status & AR_S_REBUILDING) { rdp->rebuild_lba = blk; - printf("DOH! rebuild failed\n"); /* XXX SOS */ + kprintf("DOH! rebuild failed\n"); /* XXX SOS */ } bbp->b_resid -= composite->request[mirror]->donecount; @@ -753,7 +753,7 @@ ata_raid_done(struct ata_request *request) break; default: - printf("ar%d: unknown array type in ata_raid_done\n", rdp->lun); + kprintf("ar%d: unknown array type in ata_raid_done\n", rdp->lun); } if (finished) { @@ -929,15 +929,15 @@ ata_raid_config_changed(struct ar_softc *rdp, int writeback) if (rdp->status != status) { if (!(rdp->status & AR_S_READY)) { - printf("ar%d: FAILURE - %s array broken\n", + kprintf("ar%d: FAILURE - %s array broken\n", rdp->lun, ata_raid_type(rdp)); } else if (rdp->status & AR_S_DEGRADED) { if (rdp->type & (AR_T_RAID1 | AR_T_RAID01)) - printf("ar%d: WARNING - mirror", rdp->lun); + kprintf("ar%d: WARNING - mirror", rdp->lun); else - printf("ar%d: WARNING - parity", rdp->lun); - printf(" protection lost. %s array in DEGRADED mode\n", + kprintf("ar%d: WARNING - parity", rdp->lun); + kprintf(" protection lost. %s array in DEGRADED mode\n", ata_raid_type(rdp)); } } @@ -987,7 +987,7 @@ ata_raid_create(struct ata_ioc_raid_config *config) if (!(rdp = (struct ar_softc*)malloc(sizeof(struct ar_softc), M_AR, M_NOWAIT | M_ZERO))) { - printf("ar%d: no memory for metadata storage\n", array); + kprintf("ar%d: no memory for metadata storage\n", array); return ENOMEM; } @@ -1058,7 +1058,7 @@ ata_raid_create(struct ata_ioc_raid_config *config) * setup the RAID from there, in that case we pickup the * metadata format from the disks (if we support it). */ - printf("WARNING!! - not able to determine metadata format\n" + kprintf("WARNING!! - not able to determine metadata format\n" "WARNING!! - Using FreeBSD PseudoRAID metadata\n" "If that is not what you want, use the BIOS to " "create the array\n"); @@ -1473,7 +1473,7 @@ ata_raid_write_metadata(struct ar_softc *rdp) #endif default: - printf("ar%d: writing of %s metadata is NOT supported yet\n", + kprintf("ar%d: writing of %s metadata is NOT supported yet\n", rdp->lun, ata_raid_format(rdp)); } return -1; @@ -1557,7 +1557,7 @@ ata_raid_wipe_metadata(struct ar_softc *rdp) break; default: - printf("ar%d: wiping of %s metadata is NOT supported yet\n", + kprintf("ar%d: wiping of %s metadata is NOT supported yet\n", rdp->lun, ata_raid_format(rdp)); return ENXIO; } @@ -1854,7 +1854,7 @@ ata_raid_hptv2_write_meta(struct ar_softc *rdp) if (!(meta = (struct hptv2_raid_conf *) malloc(sizeof(struct hptv2_raid_conf), M_AR, M_NOWAIT | M_ZERO))) { - printf("ar%d: failed to allocate metadata storage\n", rdp->lun); + kprintf("ar%d: failed to allocate metadata storage\n", rdp->lun); return ENOMEM; } @@ -2278,7 +2278,7 @@ ata_raid_intel_write_meta(struct ar_softc *rdp) if (!(meta = (struct intel_raid_conf *) malloc(1536, M_AR, M_NOWAIT | M_ZERO))) { - printf("ar%d: failed to allocate metadata storage\n", rdp->lun); + kprintf("ar%d: failed to allocate metadata storage\n", rdp->lun); return ENOMEM; } @@ -2652,7 +2652,7 @@ ata_raid_jmicron_write_meta(struct ar_softc *rdp) if (!(meta = (struct jmicron_raid_conf *) malloc(sizeof(struct jmicron_raid_conf), M_AR, M_NOWAIT | M_ZERO))) { - printf("ar%d: failed to allocate metadata storage\n", rdp->lun); + kprintf("ar%d: failed to allocate metadata storage\n", rdp->lun); return ENOMEM; } @@ -3307,7 +3307,7 @@ ata_raid_promise_write_meta(struct ar_softc *rdp) if (!(meta = (struct promise_raid_conf *) malloc(sizeof(struct promise_raid_conf), M_AR, M_NOWAIT))) { - printf("ar%d: failed to allocate metadata storage\n", rdp->lun); + kprintf("ar%d: failed to allocate metadata storage\n", rdp->lun); return ENOMEM; } @@ -3726,7 +3726,7 @@ ata_raid_sis_write_meta(struct ar_softc *rdp) if (!(meta = (struct sis_raid_conf *) malloc(sizeof(struct sis_raid_conf), M_AR, M_NOWAIT | M_ZERO))) { - printf("ar%d: failed to allocate metadata storage\n", rdp->lun); + kprintf("ar%d: failed to allocate metadata storage\n", rdp->lun); return ENOMEM; } @@ -3944,7 +3944,7 @@ ata_raid_via_write_meta(struct ar_softc *rdp) if (!(meta = (struct via_raid_conf *) malloc(sizeof(struct via_raid_conf), M_AR, M_NOWAIT | M_ZERO))) { - printf("ar%d: failed to allocate metadata storage\n", rdp->lun); + kprintf("ar%d: failed to allocate metadata storage\n", rdp->lun); return ENOMEM; } @@ -4027,7 +4027,7 @@ ata_raid_init_request(struct ar_softc *rdp, struct bio *bio) struct ata_request *request; if (!(request = ata_alloc_request())) { - printf("FAILURE - out of memory in ata_raid_init_request\n"); + kprintf("FAILURE - out of memory in ata_raid_init_request\n"); return NULL; } request->timeout = 5; @@ -4204,13 +4204,13 @@ ata_raid_module_event_handler(module_t mod, int what, void *arg) switch (what) { case MOD_LOAD: if (testing || bootverbose) - printf("ATA PseudoRAID loaded\n"); + kprintf("ATA PseudoRAID loaded\n"); #if 0 /* setup table to hold metadata for all ATA PseudoRAID arrays */ ata_raid_arrays = malloc(sizeof(struct ar_soft *) * MAX_ARRAYS, M_AR, M_NOWAIT | M_ZERO); if (!ata_raid_arrays) { - printf("ataraid: no memory for metadata storage\n"); + kprintf("ataraid: no memory for metadata storage\n"); return ENOMEM; } #endif @@ -4238,7 +4238,7 @@ ata_raid_module_event_handler(module_t mod, int what, void *arg) disk_destroy(rdp->disk); } if (testing || bootverbose) - printf("ATA PseudoRAID unloaded\n"); + kprintf("ATA PseudoRAID unloaded\n"); #if 0 free(ata_raid_arrays, M_AR); #endif @@ -4313,33 +4313,33 @@ ata_raid_print_meta(struct ar_softc *raid) { int i; - printf("********** ATA PseudoRAID ar%d Metadata **********\n", raid->lun); - printf("=================================================\n"); - printf("format %s\n", ata_raid_format(raid)); - printf("type %s\n", ata_raid_type(raid)); - printf("flags 0x%02x %b\n", raid->status, raid->status, + kprintf("********** ATA PseudoRAID ar%d Metadata **********\n", raid->lun); + kprintf("=================================================\n"); + kprintf("format %s\n", ata_raid_format(raid)); + kprintf("type %s\n", ata_raid_type(raid)); + kprintf("flags 0x%02x %b\n", raid->status, raid->status, "\20\3REBUILDING\2DEGRADED\1READY\n"); - printf("magic_0 0x%016jx\n", raid->magic_0); - printf("magic_1 0x%016jx\n",raid->magic_1); - printf("generation %u\n", raid->generation); - printf("total_sectors %ju\n", raid->total_sectors); - printf("offset_sectors %ju\n", raid->offset_sectors); - printf("heads %u\n", raid->heads); - printf("sectors %u\n", raid->sectors); - printf("cylinders %u\n", raid->cylinders); - printf("width %u\n", raid->width); - printf("interleave %u\n", raid->interleave); - printf("total_disks %u\n", raid->total_disks); + kprintf("magic_0 0x%016jx\n", raid->magic_0); + kprintf("magic_1 0x%016jx\n",raid->magic_1); + kprintf("generation %u\n", raid->generation); + kprintf("total_sectors %ju\n", raid->total_sectors); + kprintf("offset_sectors %ju\n", raid->offset_sectors); + kprintf("heads %u\n", raid->heads); + kprintf("sectors %u\n", raid->sectors); + kprintf("cylinders %u\n", raid->cylinders); + kprintf("width %u\n", raid->width); + kprintf("interleave %u\n", raid->interleave); + kprintf("total_disks %u\n", raid->total_disks); for (i = 0; i < raid->total_disks; i++) { - printf(" disk %d: flags = 0x%02x %b\n", i, raid->disks[i].flags, + kprintf(" disk %d: flags = 0x%02x %b\n", i, raid->disks[i].flags, raid->disks[i].flags, "\20\4ONLINE\3SPARE\2ASSIGNED\1PRESENT\n"); if (raid->disks[i].dev) { - printf(" "); + kprintf(" "); device_printf(raid->disks[i].dev, " sectors %jd\n", raid->disks[i].sectors); } } - printf("=================================================\n"); + kprintf("=================================================\n"); } static char * @@ -4360,63 +4360,63 @@ ata_raid_adaptec_print_meta(struct adaptec_raid_conf *meta) { int i; - printf("********* ATA Adaptec HostRAID Metadata *********\n"); - printf("magic_0 <0x%08x>\n", be32toh(meta->magic_0)); - printf("generation 0x%08x\n", be32toh(meta->generation)); - printf("dummy_0 0x%04x\n", be16toh(meta->dummy_0)); - printf("total_configs %u\n", be16toh(meta->total_configs)); - printf("dummy_1 0x%04x\n", be16toh(meta->dummy_1)); - printf("checksum 0x%04x\n", be16toh(meta->checksum)); - printf("dummy_2 0x%08x\n", be32toh(meta->dummy_2)); - printf("dummy_3 0x%08x\n", be32toh(meta->dummy_3)); - printf("flags 0x%08x\n", be32toh(meta->flags)); - printf("timestamp 0x%08x\n", be32toh(meta->timestamp)); - printf("dummy_4 0x%08x 0x%08x 0x%08x 0x%08x\n", + kprintf("********* ATA Adaptec HostRAID Metadata *********\n"); + kprintf("magic_0 <0x%08x>\n", be32toh(meta->magic_0)); + kprintf("generation 0x%08x\n", be32toh(meta->generation)); + kprintf("dummy_0 0x%04x\n", be16toh(meta->dummy_0)); + kprintf("total_configs %u\n", be16toh(meta->total_configs)); + kprintf("dummy_1 0x%04x\n", be16toh(meta->dummy_1)); + kprintf("checksum 0x%04x\n", be16toh(meta->checksum)); + kprintf("dummy_2 0x%08x\n", be32toh(meta->dummy_2)); + kprintf("dummy_3 0x%08x\n", be32toh(meta->dummy_3)); + kprintf("flags 0x%08x\n", be32toh(meta->flags)); + kprintf("timestamp 0x%08x\n", be32toh(meta->timestamp)); + kprintf("dummy_4 0x%08x 0x%08x 0x%08x 0x%08x\n", be32toh(meta->dummy_4[0]), be32toh(meta->dummy_4[1]), be32toh(meta->dummy_4[2]), be32toh(meta->dummy_4[3])); - printf("dummy_5 0x%08x 0x%08x 0x%08x 0x%08x\n", + kprintf("dummy_5 0x%08x 0x%08x 0x%08x 0x%08x\n", be32toh(meta->dummy_5[0]), be32toh(meta->dummy_5[1]), be32toh(meta->dummy_5[2]), be32toh(meta->dummy_5[3])); for (i = 0; i < be16toh(meta->total_configs); i++) { - printf(" %d total_disks %u\n", i, + kprintf(" %d total_disks %u\n", i, be16toh(meta->configs[i].disk_number)); - printf(" %d generation %u\n", i, + kprintf(" %d generation %u\n", i, be16toh(meta->configs[i].generation)); - printf(" %d magic_0 0x%08x\n", i, + kprintf(" %d magic_0 0x%08x\n", i, be32toh(meta->configs[i].magic_0)); - printf(" %d dummy_0 0x%02x\n", i, meta->configs[i].dummy_0); - printf(" %d type %s\n", i, + kprintf(" %d dummy_0 0x%02x\n", i, meta->configs[i].dummy_0); + kprintf(" %d type %s\n", i, ata_raid_adaptec_type(meta->configs[i].type)); - printf(" %d dummy_1 0x%02x\n", i, meta->configs[i].dummy_1); - printf(" %d flags %d\n", i, + kprintf(" %d dummy_1 0x%02x\n", i, meta->configs[i].dummy_1); + kprintf(" %d flags %d\n", i, be32toh(meta->configs[i].flags)); - printf(" %d dummy_2 0x%02x\n", i, meta->configs[i].dummy_2); - printf(" %d dummy_3 0x%02x\n", i, meta->configs[i].dummy_3); - printf(" %d dummy_4 0x%02x\n", i, meta->configs[i].dummy_4); - printf(" %d dummy_5 0x%02x\n", i, meta->configs[i].dummy_5); - printf(" %d disk_number %u\n", i, + kprintf(" %d dummy_2 0x%02x\n", i, meta->configs[i].dummy_2); + kprintf(" %d dummy_3 0x%02x\n", i, meta->configs[i].dummy_3); + kprintf(" %d dummy_4 0x%02x\n", i, meta->configs[i].dummy_4); + kprintf(" %d dummy_5 0x%02x\n", i, meta->configs[i].dummy_5); + kprintf(" %d disk_number %u\n", i, be32toh(meta->configs[i].disk_number)); - printf(" %d dummy_6 0x%08x\n", i, + kprintf(" %d dummy_6 0x%08x\n", i, be32toh(meta->configs[i].dummy_6)); - printf(" %d sectors %u\n", i, + kprintf(" %d sectors %u\n", i, be32toh(meta->configs[i].sectors)); - printf(" %d stripe_shift %u\n", i, + kprintf(" %d stripe_shift %u\n", i, be16toh(meta->configs[i].stripe_shift)); - printf(" %d dummy_7 0x%08x\n", i, + kprintf(" %d dummy_7 0x%08x\n", i, be32toh(meta->configs[i].dummy_7)); - printf(" %d dummy_8 0x%08x 0x%08x 0x%08x 0x%08x\n", i, + kprintf(" %d dummy_8 0x%08x 0x%08x 0x%08x 0x%08x\n", i, be32toh(meta->configs[i].dummy_8[0]), be32toh(meta->configs[i].dummy_8[1]), be32toh(meta->configs[i].dummy_8[2]), be32toh(meta->configs[i].dummy_8[3])); - printf(" %d name <%s>\n", i, meta->configs[i].name); + kprintf(" %d name <%s>\n", i, meta->configs[i].name); } - printf("magic_1 <0x%08x>\n", be32toh(meta->magic_1)); - printf("magic_2 <0x%08x>\n", be32toh(meta->magic_2)); - printf("magic_3 <0x%08x>\n", be32toh(meta->magic_3)); - printf("magic_4 <0x%08x>\n", be32toh(meta->magic_4)); - printf("=================================================\n"); + kprintf("magic_1 <0x%08x>\n", be32toh(meta->magic_1)); + kprintf("magic_2 <0x%08x>\n", be32toh(meta->magic_2)); + kprintf("magic_3 <0x%08x>\n", be32toh(meta->magic_3)); + kprintf("magic_4 <0x%08x>\n", be32toh(meta->magic_4)); + kprintf("=================================================\n"); } static char * @@ -4443,38 +4443,38 @@ ata_raid_hptv2_print_meta(struct hptv2_raid_conf *meta) { int i; - printf("****** ATA Highpoint V2 RocketRAID Metadata *****\n"); - printf("magic 0x%08x\n", meta->magic); - printf("magic_0 0x%08x\n", meta->magic_0); - printf("magic_1 0x%08x\n", meta->magic_1); - printf("order 0x%08x\n", meta->order); - printf("array_width %u\n", meta->array_width); - printf("stripe_shift %u\n", meta->stripe_shift); - printf("type %s\n", ata_raid_hptv2_type(meta->type)); - printf("disk_number %u\n", meta->disk_number); - printf("total_sectors %u\n", meta->total_sectors); - printf("disk_mode 0x%08x\n", meta->disk_mode); - printf("boot_mode 0x%08x\n", meta->boot_mode); - printf("boot_disk 0x%02x\n", meta->boot_disk); - printf("boot_protect 0x%02x\n", meta->boot_protect); - printf("log_entries 0x%02x\n", meta->error_log_entries); - printf("log_index 0x%02x\n", meta->error_log_index); + kprintf("****** ATA Highpoint V2 RocketRAID Metadata *****\n"); + kprintf("magic 0x%08x\n", meta->magic); + kprintf("magic_0 0x%08x\n", meta->magic_0); + kprintf("magic_1 0x%08x\n", meta->magic_1); + kprintf("order 0x%08x\n", meta->order); + kprintf("array_width %u\n", meta->array_width); + kprintf("stripe_shift %u\n", meta->stripe_shift); + kprintf("type %s\n", ata_raid_hptv2_type(meta->type)); + kprintf("disk_number %u\n", meta->disk_number); + kprintf("total_sectors %u\n", meta->total_sectors); + kprintf("disk_mode 0x%08x\n", meta->disk_mode); + kprintf("boot_mode 0x%08x\n", meta->boot_mode); + kprintf("boot_disk 0x%02x\n", meta->boot_disk); + kprintf("boot_protect 0x%02x\n", meta->boot_protect); + kprintf("log_entries 0x%02x\n", meta->error_log_entries); + kprintf("log_index 0x%02x\n", meta->error_log_index); if (meta->error_log_entries) { - printf(" timestamp reason disk status sectors lba\n"); + kprintf(" timestamp reason disk status sectors lba\n"); for (i = meta->error_log_index; i < meta->error_log_index + meta->error_log_entries; i++) - printf(" 0x%08x 0x%02x 0x%02x 0x%02x 0x%02x 0x%08x\n", + kprintf(" 0x%08x 0x%02x 0x%02x 0x%02x 0x%02x 0x%08x\n", meta->errorlog[i%32].timestamp, meta->errorlog[i%32].reason, meta->errorlog[i%32].disk, meta->errorlog[i%32].status, meta->errorlog[i%32].sectors, meta->errorlog[i%32].lba); } - printf("rebuild_lba 0x%08x\n", meta->rebuild_lba); - printf("dummy_1 0x%02x\n", meta->dummy_1); - printf("name_1 <%.15s>\n", meta->name_1); - printf("dummy_2 0x%02x\n", meta->dummy_2); - printf("name_2 <%.15s>\n", meta->name_2); - printf("=================================================\n"); + kprintf("rebuild_lba 0x%08x\n", meta->rebuild_lba); + kprintf("dummy_1 0x%02x\n", meta->dummy_1); + kprintf("name_1 <%.15s>\n", meta->name_1); + kprintf("dummy_2 0x%02x\n", meta->dummy_2); + kprintf("name_2 <%.15s>\n", meta->name_2); + kprintf("=================================================\n"); } static char * @@ -4500,40 +4500,40 @@ ata_raid_hptv3_print_meta(struct hptv3_raid_conf *meta) { int i; - printf("****** ATA Highpoint V3 RocketRAID Metadata *****\n"); - printf("magic 0x%08x\n", meta->magic); - printf("magic_0 0x%08x\n", meta->magic_0); - printf("checksum_0 0x%02x\n", meta->checksum_0); - printf("mode 0x%02x\n", meta->mode); - printf("user_mode 0x%02x\n", meta->user_mode); - printf("config_entries 0x%02x\n", meta->config_entries); + kprintf("****** ATA Highpoint V3 RocketRAID Metadata *****\n"); + kprintf("magic 0x%08x\n", meta->magic); + kprintf("magic_0 0x%08x\n", meta->magic_0); + kprintf("checksum_0 0x%02x\n", meta->checksum_0); + kprintf("mode 0x%02x\n", meta->mode); + kprintf("user_mode 0x%02x\n", meta->user_mode); + kprintf("config_entries 0x%02x\n", meta->config_entries); for (i = 0; i < meta->config_entries; i++) { - printf("config %d:\n", i); - printf(" total_sectors %ju\n", + kprintf("config %d:\n", i); + kprintf(" total_sectors %ju\n", meta->configs[0].total_sectors + ((u_int64_t)meta->configs_high[0].total_sectors << 32)); - printf(" type %s\n", + kprintf(" type %s\n", ata_raid_hptv3_type(meta->configs[i].type)); - printf(" total_disks %u\n", meta->configs[i].total_disks); - printf(" disk_number %u\n", meta->configs[i].disk_number); - printf(" stripe_shift %u\n", meta->configs[i].stripe_shift); - printf(" status %b\n", meta->configs[i].status, + kprintf(" total_disks %u\n", meta->configs[i].total_disks); + kprintf(" disk_number %u\n", meta->configs[i].disk_number); + kprintf(" stripe_shift %u\n", meta->configs[i].stripe_shift); + kprintf(" status %b\n", meta->configs[i].status, "\20\2RAID5\1NEED_REBUILD\n"); - printf(" critical_disks %u\n", meta->configs[i].critical_disks); - printf(" rebuild_lba %ju\n", + kprintf(" critical_disks %u\n", meta->configs[i].critical_disks); + kprintf(" rebuild_lba %ju\n", meta->configs_high[0].rebuild_lba + ((u_int64_t)meta->configs_high[0].rebuild_lba << 32)); } - printf("name <%.16s>\n", meta->name); - printf("timestamp 0x%08x\n", meta->timestamp); - printf("description <%.16s>\n", meta->description); - printf("creator <%.16s>\n", meta->creator); - printf("checksum_1 0x%02x\n", meta->checksum_1); - printf("dummy_0 0x%02x\n", meta->dummy_0); - printf("dummy_1 0x%02x\n", meta->dummy_1); - printf("flags %b\n", meta->flags, + kprintf("name <%.16s>\n", meta->name); + kprintf("timestamp 0x%08x\n", meta->timestamp); + kprintf("description <%.16s>\n", meta->description); + kprintf("creator <%.16s>\n", meta->creator); + kprintf("checksum_1 0x%02x\n", meta->checksum_1); + kprintf("dummy_0 0x%02x\n", meta->dummy_0); + kprintf("dummy_1 0x%02x\n", meta->dummy_1); + kprintf("flags %b\n", meta->flags, "\20\4RCACHE\3WCACHE\2NCQ\1TCQ\n"); - printf("=================================================\n"); + kprintf("=================================================\n"); } static char * @@ -4556,43 +4556,43 @@ ata_raid_intel_print_meta(struct intel_raid_conf *meta) struct intel_raid_mapping *map; int i, j; - printf("********* ATA Intel MatrixRAID Metadata *********\n"); - printf("intel_id <%.24s>\n", meta->intel_id); - printf("version <%.6s>\n", meta->version); - printf("checksum 0x%08x\n", meta->checksum); - printf("config_size 0x%08x\n", meta->config_size); - printf("config_id 0x%08x\n", meta->config_id); - printf("generation 0x%08x\n", meta->generation); - printf("total_disks %u\n", meta->total_disks); - printf("total_volumes %u\n", meta->total_volumes); - printf("DISK# serial disk_sectors disk_id flags\n"); + kprintf("********* ATA Intel MatrixRAID Metadata *********\n"); + kprintf("intel_id <%.24s>\n", meta->intel_id); + kprintf("version <%.6s>\n", meta->version); + kprintf("checksum 0x%08x\n", meta->checksum); + kprintf("config_size 0x%08x\n", meta->config_size); + kprintf("config_id 0x%08x\n", meta->config_id); + kprintf("generation 0x%08x\n", meta->generation); + kprintf("total_disks %u\n", meta->total_disks); + kprintf("total_volumes %u\n", meta->total_volumes); + kprintf("DISK# serial disk_sectors disk_id flags\n"); for (i = 0; i < meta->total_disks; i++ ) { - printf(" %d <%.16s> %u 0x%08x 0x%08x\n", i, + kprintf(" %d <%.16s> %u 0x%08x 0x%08x\n", i, meta->disk[i].serial, meta->disk[i].sectors, meta->disk[i].id, meta->disk[i].flags); } map = (struct intel_raid_mapping *)&meta->disk[meta->total_disks]; for (j = 0; j < meta->total_volumes; j++) { - printf("name %.16s\n", map->name); - printf("total_sectors %ju\n", map->total_sectors); - printf("state %u\n", map->state); - printf("reserved %u\n", map->reserved); - printf("offset %u\n", map->offset); - printf("disk_sectors %u\n", map->disk_sectors); - printf("stripe_count %u\n", map->stripe_count); - printf("stripe_sectors %u\n", map->stripe_sectors); - printf("status %u\n", map->status); - printf("type %s\n", ata_raid_intel_type(map->type)); - printf("total_disks %u\n", map->total_disks); - printf("magic[0] 0x%02x\n", map->magic[0]); - printf("magic[1] 0x%02x\n", map->magic[1]); - printf("magic[2] 0x%02x\n", map->magic[2]); + kprintf("name %.16s\n", map->name); + kprintf("total_sectors %ju\n", map->total_sectors); + kprintf("state %u\n", map->state); + kprintf("reserved %u\n", map->reserved); + kprintf("offset %u\n", map->offset); + kprintf("disk_sectors %u\n", map->disk_sectors); + kprintf("stripe_count %u\n", map->stripe_count); + kprintf("stripe_sectors %u\n", map->stripe_sectors); + kprintf("status %u\n", map->status); + kprintf("type %s\n", ata_raid_intel_type(map->type)); + kprintf("total_disks %u\n", map->total_disks); + kprintf("magic[0] 0x%02x\n", map->magic[0]); + kprintf("magic[1] 0x%02x\n", map->magic[1]); + kprintf("magic[2] 0x%02x\n", map->magic[2]); for (i = 0; i < map->total_disks; i++ ) { - printf(" disk %d at disk_idx 0x%08x\n", i, map->disk_idx[i]); + kprintf(" disk %d at disk_idx 0x%08x\n", i, map->disk_idx[i]); } map = (struct intel_raid_mapping *)&map->disk_idx[map->total_disks]; } - printf("=================================================\n"); + kprintf("=================================================\n"); } static char * @@ -4613,24 +4613,24 @@ ata_raid_ite_type(int type) static void ata_raid_ite_print_meta(struct ite_raid_conf *meta) { - printf("*** ATA Integrated Technology Express Metadata **\n"); - printf("ite_id <%.40s>\n", meta->ite_id); - printf("timestamp_0 %04x/%02x/%02x %02x:%02x:%02x.%02x\n", + kprintf("*** ATA Integrated Technology Express Metadata **\n"); + kprintf("ite_id <%.40s>\n", meta->ite_id); + kprintf("timestamp_0 %04x/%02x/%02x %02x:%02x:%02x.%02x\n", *((u_int16_t *)meta->timestamp_0), meta->timestamp_0[2], meta->timestamp_0[3], meta->timestamp_0[5], meta->timestamp_0[4], meta->timestamp_0[7], meta->timestamp_0[6]); - printf("total_sectors %jd\n", meta->total_sectors); - printf("type %s\n", ata_raid_ite_type(meta->type)); - printf("stripe_1kblocks %u\n", meta->stripe_1kblocks); - printf("timestamp_1 %04x/%02x/%02x %02x:%02x:%02x.%02x\n", + kprintf("total_sectors %jd\n", meta->total_sectors); + kprintf("type %s\n", ata_raid_ite_type(meta->type)); + kprintf("stripe_1kblocks %u\n", meta->stripe_1kblocks); + kprintf("timestamp_1 %04x/%02x/%02x %02x:%02x:%02x.%02x\n", *((u_int16_t *)meta->timestamp_1), meta->timestamp_1[2], meta->timestamp_1[3], meta->timestamp_1[5], meta->timestamp_1[4], meta->timestamp_1[7], meta->timestamp_1[6]); - printf("stripe_sectors %u\n", meta->stripe_sectors); - printf("array_width %u\n", meta->array_width); - printf("disk_number %u\n", meta->disk_number); - printf("disk_sectors %u\n", meta->disk_sectors); - printf("=================================================\n"); + kprintf("stripe_sectors %u\n", meta->stripe_sectors); + kprintf("array_width %u\n", meta->array_width); + kprintf("disk_number %u\n", meta->disk_number); + kprintf("disk_sectors %u\n", meta->disk_sectors); + kprintf("=================================================\n"); } static char * @@ -4654,25 +4654,25 @@ ata_raid_jmicron_print_meta(struct jmicron_raid_conf *meta) { int i; - printf("***** ATA JMicron Technology Corp Metadata ******\n"); - printf("signature %.2s\n", meta->signature); - printf("version 0x%04x\n", meta->version); - printf("checksum 0x%04x\n", meta->checksum); - printf("disk_id 0x%08x\n", meta->disk_id); - printf("offset 0x%08x\n", meta->offset); - printf("disk_sectors_low 0x%08x\n", meta->disk_sectors_low); - printf("disk_sectors_high 0x%08x\n", meta->disk_sectors_high); - printf("name %.16s\n", meta->name); - printf("type %s\n", ata_raid_jmicron_type(meta->type)); - printf("stripe_shift %d\n", meta->stripe_shift); - printf("flags 0x%04x\n", meta->flags); - printf("spare:\n"); + kprintf("***** ATA JMicron Technology Corp Metadata ******\n"); + kprintf("signature %.2s\n", meta->signature); + kprintf("version 0x%04x\n", meta->version); + kprintf("checksum 0x%04x\n", meta->checksum); + kprintf("disk_id 0x%08x\n", meta->disk_id); + kprintf("offset 0x%08x\n", meta->offset); + kprintf("disk_sectors_low 0x%08x\n", meta->disk_sectors_low); + kprintf("disk_sectors_high 0x%08x\n", meta->disk_sectors_high); + kprintf("name %.16s\n", meta->name); + kprintf("type %s\n", ata_raid_jmicron_type(meta->type)); + kprintf("stripe_shift %d\n", meta->stripe_shift); + kprintf("flags 0x%04x\n", meta->flags); + kprintf("spare:\n"); for (i=0; i < 2 && meta->spare[i]; i++) - printf(" %d 0x%08x\n", i, meta->spare[i]); - printf("disks:\n"); + kprintf(" %d 0x%08x\n", i, meta->spare[i]); + kprintf("disks:\n"); for (i=0; i < 8 && meta->disks[i]; i++) - printf(" %d 0x%08x\n", i, meta->disks[i]); - printf("=================================================\n"); + kprintf(" %d 0x%08x\n", i, meta->disks[i]); + kprintf("=================================================\n"); } static char * @@ -4694,36 +4694,36 @@ ata_raid_lsiv2_print_meta(struct lsiv2_raid_conf *meta) { int i; - printf("******* ATA LSILogic V2 MegaRAID Metadata *******\n"); - printf("lsi_id <%s>\n", meta->lsi_id); - printf("dummy_0 0x%02x\n", meta->dummy_0); - printf("flags 0x%02x\n", meta->flags); - printf("version 0x%04x\n", meta->version); - printf("config_entries 0x%02x\n", meta->config_entries); - printf("raid_count 0x%02x\n", meta->raid_count); - printf("total_disks 0x%02x\n", meta->total_disks); - printf("dummy_1 0x%02x\n", meta->dummy_1); - printf("dummy_2 0x%04x\n", meta->dummy_2); + kprintf("******* ATA LSILogic V2 MegaRAID Metadata *******\n"); + kprintf("lsi_id <%s>\n", meta->lsi_id); + kprintf("dummy_0 0x%02x\n", meta->dummy_0); + kprintf("flags 0x%02x\n", meta->flags); + kprintf("version 0x%04x\n", meta->version); + kprintf("config_entries 0x%02x\n", meta->config_entries); + kprintf("raid_count 0x%02x\n", meta->raid_count); + kprintf("total_disks 0x%02x\n", meta->total_disks); + kprintf("dummy_1 0x%02x\n", meta->dummy_1); + kprintf("dummy_2 0x%04x\n", meta->dummy_2); for (i = 0; i < meta->config_entries; i++) { - printf(" type %s\n", + kprintf(" type %s\n", ata_raid_lsiv2_type(meta->configs[i].raid.type)); - printf(" dummy_0 %02x\n", meta->configs[i].raid.dummy_0); - printf(" stripe_sectors %u\n", + kprintf(" dummy_0 %02x\n", meta->configs[i].raid.dummy_0); + kprintf(" stripe_sectors %u\n", meta->configs[i].raid.stripe_sectors); - printf(" array_width %u\n", + kprintf(" array_width %u\n", meta->configs[i].raid.array_width); - printf(" disk_count %u\n", meta->configs[i].raid.disk_count); - printf(" config_offset %u\n", + kprintf(" disk_count %u\n", meta->configs[i].raid.disk_count); + kprintf(" config_offset %u\n", meta->configs[i].raid.config_offset); - printf(" dummy_1 %u\n", meta->configs[i].raid.dummy_1); - printf(" flags %02x\n", meta->configs[i].raid.flags); - printf(" total_sectors %u\n", + kprintf(" dummy_1 %u\n", meta->configs[i].raid.dummy_1); + kprintf(" flags %02x\n", meta->configs[i].raid.flags); + kprintf(" total_sectors %u\n", meta->configs[i].raid.total_sectors); } - printf("disk_number 0x%02x\n", meta->disk_number); - printf("raid_number 0x%02x\n", meta->raid_number); - printf("timestamp 0x%08x\n", meta->timestamp); - printf("=================================================\n"); + kprintf("disk_number 0x%02x\n", meta->disk_number); + kprintf("raid_number 0x%02x\n", meta->raid_number); + kprintf("timestamp 0x%08x\n", meta->timestamp); + kprintf("=================================================\n"); } static char * @@ -4744,40 +4744,40 @@ ata_raid_lsiv3_print_meta(struct lsiv3_raid_conf *meta) { int i; - printf("******* ATA LSILogic V3 MegaRAID Metadata *******\n"); - printf("lsi_id <%.6s>\n", meta->lsi_id); - printf("dummy_0 0x%04x\n", meta->dummy_0); - printf("version 0x%04x\n", meta->version); - printf("dummy_0 0x%04x\n", meta->dummy_1); - printf("RAID configs:\n"); + kprintf("******* ATA LSILogic V3 MegaRAID Metadata *******\n"); + kprintf("lsi_id <%.6s>\n", meta->lsi_id); + kprintf("dummy_0 0x%04x\n", meta->dummy_0); + kprintf("version 0x%04x\n", meta->version); + kprintf("dummy_0 0x%04x\n", meta->dummy_1); + kprintf("RAID configs:\n"); for (i = 0; i < 8; i++) { if (meta->raid[i].total_disks) { - printf("%02d stripe_pages %u\n", i, + kprintf("%02d stripe_pages %u\n", i, meta->raid[i].stripe_pages); - printf("%02d type %s\n", i, + kprintf("%02d type %s\n", i, ata_raid_lsiv3_type(meta->raid[i].type)); - printf("%02d total_disks %u\n", i, + kprintf("%02d total_disks %u\n", i, meta->raid[i].total_disks); - printf("%02d array_width %u\n", i, + kprintf("%02d array_width %u\n", i, meta->raid[i].array_width); - printf("%02d sectors %u\n", i, meta->raid[i].sectors); - printf("%02d offset %u\n", i, meta->raid[i].offset); - printf("%02d device 0x%02x\n", i, + kprintf("%02d sectors %u\n", i, meta->raid[i].sectors); + kprintf("%02d offset %u\n", i, meta->raid[i].offset); + kprintf("%02d device 0x%02x\n", i, meta->raid[i].device); } } - printf("DISK configs:\n"); + kprintf("DISK configs:\n"); for (i = 0; i < 6; i++) { if (meta->disk[i].disk_sectors) { - printf("%02d disk_sectors %u\n", i, + kprintf("%02d disk_sectors %u\n", i, meta->disk[i].disk_sectors); - printf("%02d flags 0x%02x\n", i, meta->disk[i].flags); + kprintf("%02d flags 0x%02x\n", i, meta->disk[i].flags); } } - printf("device 0x%02x\n", meta->device); - printf("timestamp 0x%08x\n", meta->timestamp); - printf("checksum_1 0x%02x\n", meta->checksum_1); - printf("=================================================\n"); + kprintf("device 0x%02x\n", meta->device); + kprintf("timestamp 0x%08x\n", meta->timestamp); + kprintf("checksum_1 0x%02x\n", meta->checksum_1); + kprintf("=================================================\n"); } static char * @@ -4800,38 +4800,38 @@ ata_raid_nvidia_type(int type) static void ata_raid_nvidia_print_meta(struct nvidia_raid_conf *meta) { - printf("******** ATA nVidia MediaShield Metadata ********\n"); - printf("nvidia_id <%.8s>\n", meta->nvidia_id); - printf("config_size %d\n", meta->config_size); - printf("checksum 0x%08x\n", meta->checksum); - printf("version 0x%04x\n", meta->version); - printf("disk_number %d\n", meta->disk_number); - printf("dummy_0 0x%02x\n", meta->dummy_0); - printf("total_sectors %d\n", meta->total_sectors); - printf("sectors_size %d\n", meta->sector_size); - printf("serial %.16s\n", meta->serial); - printf("revision %.4s\n", meta->revision); - printf("dummy_1 0x%08x\n", meta->dummy_1); - printf("magic_0 0x%08x\n", meta->magic_0); - printf("magic_1 0x%016jx\n", meta->magic_1); - printf("magic_2 0x%016jx\n", meta->magic_2); - printf("flags 0x%02x\n", meta->flags); - printf("array_width %d\n", meta->array_width); - printf("total_disks %d\n", meta->total_disks); - printf("dummy_2 0x%02x\n", meta->dummy_2); - printf("type %s\n", ata_raid_nvidia_type(meta->type)); - printf("dummy_3 0x%04x\n", meta->dummy_3); - printf("stripe_sectors %d\n", meta->stripe_sectors); - printf("stripe_bytes %d\n", meta->stripe_bytes); - printf("stripe_shift %d\n", meta->stripe_shift); - printf("stripe_mask 0x%08x\n", meta->stripe_mask); - printf("stripe_sizesectors %d\n", meta->stripe_sizesectors); - printf("stripe_sizebytes %d\n", meta->stripe_sizebytes); - printf("rebuild_lba %d\n", meta->rebuild_lba); - printf("dummy_4 0x%08x\n", meta->dummy_4); - printf("dummy_5 0x%08x\n", meta->dummy_5); - printf("status 0x%08x\n", meta->status); - printf("=================================================\n"); + kprintf("******** ATA nVidia MediaShield Metadata ********\n"); + kprintf("nvidia_id <%.8s>\n", meta->nvidia_id); + kprintf("config_size %d\n", meta->config_size); + kprintf("checksum 0x%08x\n", meta->checksum); + kprintf("version 0x%04x\n", meta->version); + kprintf("disk_number %d\n", meta->disk_number); + kprintf("dummy_0 0x%02x\n", meta->dummy_0); + kprintf("total_sectors %d\n", meta->total_sectors); + kprintf("sectors_size %d\n", meta->sector_size); + kprintf("serial %.16s\n", meta->serial); + kprintf("revision %.4s\n", meta->revision); + kprintf("dummy_1 0x%08x\n", meta->dummy_1); + kprintf("magic_0 0x%08x\n", meta->magic_0); + kprintf("magic_1 0x%016jx\n", meta->magic_1); + kprintf("magic_2 0x%016jx\n", meta->magic_2); + kprintf("flags 0x%02x\n", meta->flags); + kprintf("array_width %d\n", meta->array_width); + kprintf("total_disks %d\n", meta->total_disks); + kprintf("dummy_2 0x%02x\n", meta->dummy_2); + kprintf("type %s\n", ata_raid_nvidia_type(meta->type)); + kprintf("dummy_3 0x%04x\n", meta->dummy_3); + kprintf("stripe_sectors %d\n", meta->stripe_sectors); + kprintf("stripe_bytes %d\n", meta->stripe_bytes); + kprintf("stripe_shift %d\n", meta->stripe_shift); + kprintf("stripe_mask 0x%08x\n", meta->stripe_mask); + kprintf("stripe_sizesectors %d\n", meta->stripe_sizesectors); + kprintf("stripe_sizebytes %d\n", meta->stripe_sizebytes); + kprintf("rebuild_lba %d\n", meta->rebuild_lba); + kprintf("dummy_4 0x%08x\n", meta->dummy_4); + kprintf("dummy_5 0x%08x\n", meta->dummy_5); + kprintf("status 0x%08x\n", meta->status); + kprintf("=================================================\n"); } static char * @@ -4855,50 +4855,50 @@ ata_raid_promise_print_meta(struct promise_raid_conf *meta) { int i; - printf("********* ATA Promise FastTrak Metadata *********\n"); - printf("promise_id <%s>\n", meta->promise_id); - printf("dummy_0 0x%08x\n", meta->dummy_0); - printf("magic_0 0x%016jx\n", meta->magic_0); - printf("magic_1 0x%04x\n", meta->magic_1); - printf("magic_2 0x%08x\n", meta->magic_2); - printf("integrity 0x%08x %b\n", meta->raid.integrity, + kprintf("********* ATA Promise FastTrak Metadata *********\n"); + kprintf("promise_id <%s>\n", meta->promise_id); + kprintf("dummy_0 0x%08x\n", meta->dummy_0); + kprintf("magic_0 0x%016jx\n", meta->magic_0); + kprintf("magic_1 0x%04x\n", meta->magic_1); + kprintf("magic_2 0x%08x\n", meta->magic_2); + kprintf("integrity 0x%08x %b\n", meta->raid.integrity, meta->raid.integrity, "\20\10VALID\n" ); - printf("flags 0x%02x %b\n", + kprintf("flags 0x%02x %b\n", meta->raid.flags, meta->raid.flags, "\20\10READY\7DOWN\6REDIR\5DUPLICATE\4SPARE" "\3ASSIGNED\2ONLINE\1VALID\n"); - printf("disk_number %d\n", meta->raid.disk_number); - printf("channel 0x%02x\n", meta->raid.channel); - printf("device 0x%02x\n", meta->raid.device); - printf("magic_0 0x%016jx\n", meta->raid.magic_0); - printf("disk_offset %u\n", meta->raid.disk_offset); - printf("disk_sectors %u\n", meta->raid.disk_sectors); - printf("rebuild_lba 0x%08x\n", meta->raid.rebuild_lba); - printf("generation 0x%04x\n", meta->raid.generation); - printf("status 0x%02x %b\n", + kprintf("disk_number %d\n", meta->raid.disk_number); + kprintf("channel 0x%02x\n", meta->raid.channel); + kprintf("device 0x%02x\n", meta->raid.device); + kprintf("magic_0 0x%016jx\n", meta->raid.magic_0); + kprintf("disk_offset %u\n", meta->raid.disk_offset); + kprintf("disk_sectors %u\n", meta->raid.disk_sectors); + kprintf("rebuild_lba 0x%08x\n", meta->raid.rebuild_lba); + kprintf("generation 0x%04x\n", meta->raid.generation); + kprintf("status 0x%02x %b\n", meta->raid.status, meta->raid.status, "\20\6MARKED\5DEGRADED\4READY\3INITED\2ONLINE\1VALID\n"); - printf("type %s\n", ata_raid_promise_type(meta->raid.type)); - printf("total_disks %u\n", meta->raid.total_disks); - printf("stripe_shift %u\n", meta->raid.stripe_shift); - printf("array_width %u\n", meta->raid.array_width); - printf("array_number %u\n", meta->raid.array_number); - printf("total_sectors %u\n", meta->raid.total_sectors); - printf("cylinders %u\n", meta->raid.cylinders); - printf("heads %u\n", meta->raid.heads); - printf("sectors %u\n", meta->raid.sectors); - printf("magic_1 0x%016jx\n", meta->raid.magic_1); - printf("DISK# flags dummy_0 channel device magic_0\n"); + kprintf("type %s\n", ata_raid_promise_type(meta->raid.type)); + kprintf("total_disks %u\n", meta->raid.total_disks); + kprintf("stripe_shift %u\n", meta->raid.stripe_shift); + kprintf("array_width %u\n", meta->raid.array_width); + kprintf("array_number %u\n", meta->raid.array_number); + kprintf("total_sectors %u\n", meta->raid.total_sectors); + kprintf("cylinders %u\n", meta->raid.cylinders); + kprintf("heads %u\n", meta->raid.heads); + kprintf("sectors %u\n", meta->raid.sectors); + kprintf("magic_1 0x%016jx\n", meta->raid.magic_1); + kprintf("DISK# flags dummy_0 channel device magic_0\n"); for (i = 0; i < 8; i++) { - printf(" %d %b 0x%02x 0x%02x 0x%02x ", + kprintf(" %d %b 0x%02x 0x%02x 0x%02x ", i, meta->raid.disk[i].flags, "\20\10READY\7DOWN\6REDIR\5DUPLICATE\4SPARE" "\3ASSIGNED\2ONLINE\1VALID\n", meta->raid.disk[i].dummy_0, meta->raid.disk[i].channel, meta->raid.disk[i].device); - printf("0x%016jx\n", meta->raid.disk[i].magic_0); + kprintf("0x%016jx\n", meta->raid.disk[i].magic_0); } - printf("checksum 0x%08x\n", meta->checksum); - printf("=================================================\n"); + kprintf("checksum 0x%08x\n", meta->checksum); + kprintf("=================================================\n"); } static char * @@ -4919,37 +4919,37 @@ ata_raid_sii_type(int type) static void ata_raid_sii_print_meta(struct sii_raid_conf *meta) { - printf("******* ATA Silicon Image Medley Metadata *******\n"); - printf("total_sectors %ju\n", meta->total_sectors); - printf("dummy_0 0x%04x\n", meta->dummy_0); - printf("dummy_1 0x%04x\n", meta->dummy_1); - printf("controller_pci_id 0x%08x\n", meta->controller_pci_id); - printf("version_minor 0x%04x\n", meta->version_minor); - printf("version_major 0x%04x\n", meta->version_major); - printf("timestamp 20%02x/%02x/%02x %02x:%02x:%02x\n", + kprintf("******* ATA Silicon Image Medley Metadata *******\n"); + kprintf("total_sectors %ju\n", meta->total_sectors); + kprintf("dummy_0 0x%04x\n", meta->dummy_0); + kprintf("dummy_1 0x%04x\n", meta->dummy_1); + kprintf("controller_pci_id 0x%08x\n", meta->controller_pci_id); + kprintf("version_minor 0x%04x\n", meta->version_minor); + kprintf("version_major 0x%04x\n", meta->version_major); + kprintf("timestamp 20%02x/%02x/%02x %02x:%02x:%02x\n", meta->timestamp[5], meta->timestamp[4], meta->timestamp[3], meta->timestamp[2], meta->timestamp[1], meta->timestamp[0]); - printf("stripe_sectors %u\n", meta->stripe_sectors); - printf("dummy_2 0x%04x\n", meta->dummy_2); - printf("disk_number %u\n", meta->disk_number); - printf("type %s\n", ata_raid_sii_type(meta->type)); - printf("raid0_disks %u\n", meta->raid0_disks); - printf("raid0_ident %u\n", meta->raid0_ident); - printf("raid1_disks %u\n", meta->raid1_disks); - printf("raid1_ident %u\n", meta->raid1_ident); - printf("rebuild_lba %ju\n", meta->rebuild_lba); - printf("generation 0x%08x\n", meta->generation); - printf("status 0x%02x %b\n", + kprintf("stripe_sectors %u\n", meta->stripe_sectors); + kprintf("dummy_2 0x%04x\n", meta->dummy_2); + kprintf("disk_number %u\n", meta->disk_number); + kprintf("type %s\n", ata_raid_sii_type(meta->type)); + kprintf("raid0_disks %u\n", meta->raid0_disks); + kprintf("raid0_ident %u\n", meta->raid0_ident); + kprintf("raid1_disks %u\n", meta->raid1_disks); + kprintf("raid1_ident %u\n", meta->raid1_ident); + kprintf("rebuild_lba %ju\n", meta->rebuild_lba); + kprintf("generation 0x%08x\n", meta->generation); + kprintf("status 0x%02x %b\n", meta->status, meta->status, "\20\1READY\n"); - printf("base_raid1_position %02x\n", meta->base_raid1_position); - printf("base_raid0_position %02x\n", meta->base_raid0_position); - printf("position %02x\n", meta->position); - printf("dummy_3 %04x\n", meta->dummy_3); - printf("name <%.16s>\n", meta->name); - printf("checksum_0 0x%04x\n", meta->checksum_0); - printf("checksum_1 0x%04x\n", meta->checksum_1); - printf("=================================================\n"); + kprintf("base_raid1_position %02x\n", meta->base_raid1_position); + kprintf("base_raid0_position %02x\n", meta->base_raid0_position); + kprintf("position %02x\n", meta->position); + kprintf("dummy_3 %04x\n", meta->dummy_3); + kprintf("name <%.16s>\n", meta->name); + kprintf("checksum_0 0x%04x\n", meta->checksum_0); + kprintf("checksum_1 0x%04x\n", meta->checksum_1); + kprintf("=================================================\n"); } static char * @@ -4969,22 +4969,22 @@ ata_raid_sis_type(int type) static void ata_raid_sis_print_meta(struct sis_raid_conf *meta) { - printf("**** ATA Silicon Integrated Systems Metadata ****\n"); - printf("magic 0x%04x\n", meta->magic); - printf("disks 0x%02x\n", meta->disks); - printf("type %s\n", + kprintf("**** ATA Silicon Integrated Systems Metadata ****\n"); + kprintf("magic 0x%04x\n", meta->magic); + kprintf("disks 0x%02x\n", meta->disks); + kprintf("type %s\n", ata_raid_sis_type(meta->type_total_disks & SIS_T_MASK)); - printf("total_disks %u\n", meta->type_total_disks & SIS_D_MASK); - printf("dummy_0 0x%08x\n", meta->dummy_0); - printf("controller_pci_id 0x%08x\n", meta->controller_pci_id); - printf("stripe_sectors %u\n", meta->stripe_sectors); - printf("dummy_1 0x%04x\n", meta->dummy_1); - printf("timestamp 0x%08x\n", meta->timestamp); - printf("model %.40s\n", meta->model); - printf("disk_number %u\n", meta->disk_number); - printf("dummy_2 0x%02x 0x%02x 0x%02x\n", + kprintf("total_disks %u\n", meta->type_total_disks & SIS_D_MASK); + kprintf("dummy_0 0x%08x\n", meta->dummy_0); + kprintf("controller_pci_id 0x%08x\n", meta->controller_pci_id); + kprintf("stripe_sectors %u\n", meta->stripe_sectors); + kprintf("dummy_1 0x%04x\n", meta->dummy_1); + kprintf("timestamp 0x%08x\n", meta->timestamp); + kprintf("model %.40s\n", meta->model); + kprintf("disk_number %u\n", meta->disk_number); + kprintf("dummy_2 0x%02x 0x%02x 0x%02x\n", meta->dummy_2[0], meta->dummy_2[1], meta->dummy_2[2]); - printf("=================================================\n"); + kprintf("=================================================\n"); } static char * @@ -5008,25 +5008,25 @@ ata_raid_via_print_meta(struct via_raid_conf *meta) { int i; - printf("*************** ATA VIA Metadata ****************\n"); - printf("magic 0x%02x\n", meta->magic); - printf("dummy_0 0x%02x\n", meta->dummy_0); - printf("type %s\n", + kprintf("*************** ATA VIA Metadata ****************\n"); + kprintf("magic 0x%02x\n", meta->magic); + kprintf("dummy_0 0x%02x\n", meta->dummy_0); + kprintf("type %s\n", ata_raid_via_type(meta->type & VIA_T_MASK)); - printf("bootable %d\n", meta->type & VIA_T_BOOTABLE); - printf("unknown %d\n", meta->type & VIA_T_UNKNOWN); - printf("disk_index 0x%02x\n", meta->disk_index); - printf("stripe_layout 0x%02x\n", meta->stripe_layout); - printf(" stripe_disks %d\n", meta->stripe_layout & VIA_L_DISKS); - printf(" stripe_sectors %d\n", + kprintf("bootable %d\n", meta->type & VIA_T_BOOTABLE); + kprintf("unknown %d\n", meta->type & VIA_T_UNKNOWN); + kprintf("disk_index 0x%02x\n", meta->disk_index); + kprintf("stripe_layout 0x%02x\n", meta->stripe_layout); + kprintf(" stripe_disks %d\n", meta->stripe_layout & VIA_L_DISKS); + kprintf(" stripe_sectors %d\n", 0x08 << ((meta->stripe_layout & VIA_L_MASK) >> VIA_L_SHIFT)); - printf("disk_sectors %ju\n", meta->disk_sectors); - printf("disk_id 0x%08x\n", meta->disk_id); - printf("DISK# disk_id\n"); + kprintf("disk_sectors %ju\n", meta->disk_sectors); + kprintf("disk_id 0x%08x\n", meta->disk_id); + kprintf("DISK# disk_id\n"); for (i = 0; i < 8; i++) { if (meta->disks[i]) - printf(" %d 0x%08x\n", i, meta->disks[i]); + kprintf(" %d 0x%08x\n", i, meta->disks[i]); } - printf("checksum 0x%02x\n", meta->checksum); - printf("=================================================\n"); + kprintf("checksum 0x%02x\n", meta->checksum); + kprintf("=================================================\n"); } diff --git a/sys/dev/disk/nata/ata-usb.c b/sys/dev/disk/nata/ata-usb.c index 90aa2fa763..ffe1856f1c 100644 --- a/sys/dev/disk/nata/ata-usb.c +++ b/sys/dev/disk/nata/ata-usb.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-usb.c,v 1.4 2006/03/31 08:09:05 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/ata-usb.c,v 1.3 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/nata/ata-usb.c,v 1.4 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -765,7 +765,7 @@ ata_usbchannel_begin_transaction(struct ata_request *request) /* sanity just in case */ if (sc->state != ATAUSB_S_IDLE) { - printf("begin is busy (%d)\n", sc->state); + kprintf("begin is busy (%d)\n", sc->state); request->result = EBUSY; return ATA_OP_FINISHED; } diff --git a/sys/dev/disk/nata/atapi-cam.c b/sys/dev/disk/nata/atapi-cam.c index c9800dafac..4007627f6a 100644 --- a/sys/dev/disk/nata/atapi-cam.c +++ b/sys/dev/disk/nata/atapi-cam.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-cam.c,v 1.44 2006/03/31 08:09:05 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/atapi-cam.c,v 1.3 2006/12/14 16:06:40 tgen Exp $ + * $DragonFly: src/sys/dev/disk/nata/atapi-cam.c,v 1.4 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -153,7 +153,7 @@ atapi_cam_identify(device_t *dev, device_t parent) if (scp == NULL) { /* XXX TGEN Use device_printf()? */ - printf("atapi_cam_identify: out of memory"); + kprintf("atapi_cam_identify: out of memory"); return; } @@ -161,7 +161,7 @@ atapi_cam_identify(device_t *dev, device_t parent) child = device_add_child(parent, "atapicam", -1); if (child == NULL) { /* XXX TGEN Use device_printf()? */ - printf("atapi_cam_identify: out of memory, can't add child"); + kprintf("atapi_cam_identify: out of memory, can't add child"); kfree(scp, M_ATACAM); return; } @@ -485,7 +485,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) /* check that this request was not aborted already */ if ((ccb_h->status & CAM_STATUS_MASK) != CAM_REQ_INPROG) { - printf("XPT_SCSI_IO received but already in progress?\n"); + kprintf("XPT_SCSI_IO received but already in progress?\n"); xpt_done(ccb); spin_unlock_wr(&softc->state_lock); return; @@ -503,7 +503,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) if ((ccb_h->flags & CAM_SCATTER_VALID)) { /* scatter-gather not supported */ xpt_print_path(ccb_h->path); - printf("ATAPI/CAM does not support scatter-gather yet!\n"); + kprintf("ATAPI/CAM does not support scatter-gather yet!\n"); goto action_invalid; } @@ -525,11 +525,11 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) request_flags &= ~ATA_R_DMA; if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) { - printf("cannot allocate ATAPI/CAM hcb\n"); + kprintf("cannot allocate ATAPI/CAM hcb\n"); goto action_oom; } if ((request = ata_alloc_request()) == NULL) { - printf("cannot allocate ATAPI/CAM request\n"); + kprintf("cannot allocate ATAPI/CAM request\n"); goto action_oom; } @@ -540,7 +540,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) if (CAM_DEBUGGED(ccb_h->path, CAM_DEBUG_CDB)) { char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; - printf("atapi_action: hcb@%p: %s\n", hcb, + kprintf("atapi_action: hcb@%p: %s\n", hcb, scsi_cdb_string(request->u.atapi.ccb, cdb_str, sizeof(cdb_str))); } #endif @@ -591,7 +591,7 @@ atapi_action(struct cam_sim *sim, union ccb *ccb) /* ATA always transfers an even number of bytes */ if ((buf = hcb->dxfer_alloc = kmalloc(++len, M_ATACAM, M_NOWAIT | M_ZERO)) == NULL) { - printf("cannot allocate ATAPI/CAM buffer\n"); + kprintf("cannot allocate ATAPI/CAM buffer\n"); goto action_oom; } } @@ -630,7 +630,7 @@ action_oom: spin_unlock_wr(&softc->state_lock); get_mplock(); xpt_print_path(ccb_h->path); - printf("out of memory, freezing queue.\n"); + kprintf("out of memory, freezing queue.\n"); softc->flags |= RESOURCE_SHORTAGE; xpt_freeze_simq(sim, /*count*/ 1); rel_mplock(); @@ -649,7 +649,7 @@ static void atapi_poll(struct cam_sim *sim) { /* do nothing - we do not actually service any interrupts */ - printf("atapi_poll called!\n"); + kprintf("atapi_poll called!\n"); } static void @@ -667,12 +667,12 @@ atapi_cb(struct ata_request *request) #ifdef CAMDEBUG # define err (request->u.atapi.sense.key) if (CAM_DEBUGGED(csio->ccb_h.path, CAM_DEBUG_CDB)) { - printf("atapi_cb: hcb@%p error = %02x: (sk = %02x%s%s%s)\n", + kprintf("atapi_cb: hcb@%p error = %02x: (sk = %02x%s%s%s)\n", hcb, err, err >> 4, (err & 4) ? " ABRT" : "", (err & 2) ? " EOM" : "", (err & 1) ? " ILI" : ""); - printf("dev %s: cmd %02x status %02x result %02x\n", + kprintf("dev %s: cmd %02x status %02x result %02x\n", device_get_nameunit(request->dev), request->u.atapi.ccb[0], request->status, request->result); } @@ -770,9 +770,9 @@ atapi_async(void *callback_arg, u_int32_t code, targ = xpt_path_target_id(path); xpt_print_path(path); if (targ == -1) - printf("Lost host adapter\n"); + kprintf("Lost host adapter\n"); else - printf("Lost target %d???\n", targ); + kprintf("Lost target %d???\n", targ); break; default: @@ -869,7 +869,7 @@ free_softc(struct atapi_xpt_softc *scp) if ((scp->flags & BUS_REGISTERED) == 0) cam_sim_free(scp->sim); else - printf("Can't free %s SIM (still registered)\n", + kprintf("Can't free %s SIM (still registered)\n", cam_sim_name(scp->sim)); } rel_mplock(); diff --git a/sys/dev/disk/nata/atapi-cd.c b/sys/dev/disk/nata/atapi-cd.c index 429ccffa6b..4c64485e15 100644 --- a/sys/dev/disk/nata/atapi-cd.c +++ b/sys/dev/disk/nata/atapi-cd.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.189 2006/06/28 15:04:10 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/atapi-cd.c,v 1.2 2006/12/20 18:14:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/nata/atapi-cd.c,v 1.3 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -1024,9 +1024,9 @@ acd_read_toc(device_t dev) cdp->disk_size, cdp->block_size, cdp->toc.hdr.ending_track-cdp->toc.hdr.starting_track+1); if (cdp->toc.tab[0].control & 4) - printf("%dMB\n", cdp->disk_size * cdp->block_size / 1048576); + kprintf("%dMB\n", cdp->disk_size * cdp->block_size / 1048576); else - printf("%d:%d audio\n", + kprintf("%d:%d audio\n", cdp->disk_size / 75 / 60, cdp->disk_size / 75 % 60); } #endif @@ -1769,82 +1769,82 @@ acd_describe(device_t dev) device_printf(dev, "%s", ""); if (cdp->cap.cur_read_speed) { - printf("read %dKB/s", cdp->cap.cur_read_speed * 1000 / 1024); + kprintf("read %dKB/s", cdp->cap.cur_read_speed * 1000 / 1024); if (cdp->cap.max_read_speed) - printf(" (%dKB/s)", cdp->cap.max_read_speed * 1000 / 1024); + kprintf(" (%dKB/s)", cdp->cap.max_read_speed * 1000 / 1024); if ((cdp->cap.cur_write_speed) && (cdp->cap.media & (MST_WRITE_CDR | MST_WRITE_CDRW | MST_WRITE_DVDR | MST_WRITE_DVDRAM))) { - printf(" write %dKB/s", cdp->cap.cur_write_speed * 1000 / 1024); + kprintf(" write %dKB/s", cdp->cap.cur_write_speed * 1000 / 1024); if (cdp->cap.max_write_speed) - printf(" (%dKB/s)", cdp->cap.max_write_speed * 1000 / 1024); + kprintf(" (%dKB/s)", cdp->cap.max_write_speed * 1000 / 1024); } comma = 1; } if (cdp->cap.buf_size) { - printf("%s %dKB buffer", comma ? "," : "", cdp->cap.buf_size); + kprintf("%s %dKB buffer", comma ? "," : "", cdp->cap.buf_size); comma = 1; } - printf("%s %s\n", comma ? "," : "", ata_mode2str(atadev->mode)); + kprintf("%s %s\n", comma ? "," : "", ata_mode2str(atadev->mode)); device_printf(dev, "Reads:"); comma = 0; if (cdp->cap.media & MST_READ_CDR) { - printf(" CDR"); comma = 1; + kprintf(" CDR"); comma = 1; } if (cdp->cap.media & MST_READ_CDRW) { - printf("%s CDRW", comma ? "," : ""); comma = 1; + kprintf("%s CDRW", comma ? "," : ""); comma = 1; } if (cdp->cap.capabilities & MST_READ_CDDA) { if (cdp->cap.capabilities & MST_CDDA_STREAM) - printf("%s CDDA stream", comma ? "," : ""); + kprintf("%s CDDA stream", comma ? "," : ""); else - printf("%s CDDA", comma ? "," : ""); + kprintf("%s CDDA", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_READ_DVDROM) { - printf("%s DVDROM", comma ? "," : ""); comma = 1; + kprintf("%s DVDROM", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_READ_DVDR) { - printf("%s DVDR", comma ? "," : ""); comma = 1; + kprintf("%s DVDR", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_READ_DVDRAM) { - printf("%s DVDRAM", comma ? "," : ""); comma = 1; + kprintf("%s DVDRAM", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_READ_PACKET) - printf("%s packet", comma ? "," : ""); + kprintf("%s packet", comma ? "," : ""); - printf("\n"); + kprintf("\n"); device_printf(dev, "Writes:"); if (cdp->cap.media & (MST_WRITE_CDR | MST_WRITE_CDRW | MST_WRITE_DVDR | MST_WRITE_DVDRAM)) { comma = 0; if (cdp->cap.media & MST_WRITE_CDR) { - printf(" CDR" ); comma = 1; + kprintf(" CDR" ); comma = 1; } if (cdp->cap.media & MST_WRITE_CDRW) { - printf("%s CDRW", comma ? "," : ""); comma = 1; + kprintf("%s CDRW", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_WRITE_DVDR) { - printf("%s DVDR", comma ? "," : ""); comma = 1; + kprintf("%s DVDR", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_WRITE_DVDRAM) { - printf("%s DVDRAM", comma ? "," : ""); comma = 1; + kprintf("%s DVDRAM", comma ? "," : ""); comma = 1; } if (cdp->cap.media & MST_WRITE_TEST) { - printf("%s test write", comma ? "," : ""); comma = 1; + kprintf("%s test write", comma ? "," : ""); comma = 1; } if (cdp->cap.capabilities & MST_BURNPROOF) - printf("%s burnproof", comma ? "," : ""); + kprintf("%s burnproof", comma ? "," : ""); } - printf("\n"); + kprintf("\n"); if (cdp->cap.capabilities & MST_AUDIO_PLAY) { device_printf(dev, "Audio: "); if (cdp->cap.capabilities & MST_AUDIO_PLAY) - printf("play"); + kprintf("play"); if (cdp->cap.max_vol_levels) - printf(", %d volume levels", cdp->cap.max_vol_levels); - printf("\n"); + kprintf(", %d volume levels", cdp->cap.max_vol_levels); + kprintf("\n"); } device_printf(dev, "Mechanism: "); switch (cdp->cap.mechanism & MST_MECH_MASK) { @@ -1862,65 +1862,65 @@ acd_describe(device_t dev) mechanism = 0; break; } if (mechanism) - printf("%s%s", (cdp->cap.mechanism & MST_EJECT) ? + kprintf("%s%s", (cdp->cap.mechanism & MST_EJECT) ? "ejectable " : "", mechanism); else if (cdp->cap.mechanism & MST_EJECT) - printf("ejectable"); + kprintf("ejectable"); if (cdp->cap.mechanism & MST_LOCKABLE) - printf((cdp->cap.mechanism & MST_LOCKED) ? ", locked":", unlocked"); + kprintf((cdp->cap.mechanism & MST_LOCKED) ? ", locked":", unlocked"); if (cdp->cap.mechanism & MST_PREVENT) - printf(", lock protected"); - printf("\n"); + kprintf(", lock protected"); + kprintf("\n"); if ((cdp->cap.mechanism & MST_MECH_MASK) != MST_MECH_CHANGER) { device_printf(dev, "Medium: "); switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { case MST_CDROM: - printf("CD-ROM "); break; + kprintf("CD-ROM "); break; case MST_CDR: - printf("CD-R "); break; + kprintf("CD-R "); break; case MST_CDRW: - printf("CD-RW "); break; + kprintf("CD-RW "); break; case MST_DOOR_OPEN: - printf("door open"); break; + kprintf("door open"); break; case MST_NO_DISC: - printf("no/blank disc"); break; + kprintf("no/blank disc"); break; case MST_FMT_ERROR: - printf("medium format error"); break; + kprintf("medium format error"); break; } if ((cdp->cap.medium_type & MST_TYPE_MASK_HIGH)cap.medium_type & MST_TYPE_MASK_LOW) { case MST_DATA_120: - printf("120mm data disc"); break; + kprintf("120mm data disc"); break; case MST_AUDIO_120: - printf("120mm audio disc"); break; + kprintf("120mm audio disc"); break; case MST_COMB_120: - printf("120mm data/audio disc"); break; + kprintf("120mm data/audio disc"); break; case MST_PHOTO_120: - printf("120mm photo disc"); break; + kprintf("120mm photo disc"); break; case MST_DATA_80: - printf("80mm data disc"); break; + kprintf("80mm data disc"); break; case MST_AUDIO_80: - printf("80mm audio disc"); break; + kprintf("80mm audio disc"); break; case MST_COMB_80: - printf("80mm data/audio disc"); break; + kprintf("80mm data/audio disc"); break; case MST_PHOTO_80: - printf("80mm photo disc"); break; + kprintf("80mm photo disc"); break; case MST_FMT_NONE: switch (cdp->cap.medium_type & MST_TYPE_MASK_HIGH) { case MST_CDROM: - printf("unknown"); break; + kprintf("unknown"); break; case MST_CDR: case MST_CDRW: - printf("blank"); break; + kprintf("blank"); break; } break; default: - printf("unknown (0x%x)", cdp->cap.medium_type); break; + kprintf("unknown (0x%x)", cdp->cap.medium_type); break; } } - printf("\n"); + kprintf("\n"); } } else { @@ -1931,7 +1931,7 @@ acd_describe(device_t dev) (cdp->cap.media & MST_WRITE_CDR) ? "CDR" : (cdp->cap.media & MST_READ_DVDROM) ? "DVDROM" : "CDROM"); - printf("<%.40s/%.8s> at ata%d-%s %s\n", + kprintf("<%.40s/%.8s> at ata%d-%s %s\n", atadev->param.model, atadev->param.revision, device_get_unit(ch->dev), (atadev->unit == ATA_MASTER) ? "master" : "slave", diff --git a/sys/dev/disk/nata/atapi-tape.c b/sys/dev/disk/nata/atapi-tape.c index fd1b87363a..dbb61f465d 100644 --- a/sys/dev/disk/nata/atapi-tape.c +++ b/sys/dev/disk/nata/atapi-tape.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.101 2006/01/05 21:27:19 sos Exp $ - * $DragonFly: src/sys/dev/disk/nata/atapi-tape.c,v 1.1 2006/12/04 14:40:37 tgen Exp $ + * $DragonFly: src/sys/dev/disk/nata/atapi-tape.c,v 1.2 2006/12/22 23:26:16 swildner Exp $ */ #include "opt_ata.h" @@ -703,38 +703,38 @@ ast_describe(device_t dev) device_get_unit(ch->dev), (atadev->unit == ATA_MASTER) ? "master" : "slave"); device_printf(dev, "%dKB/s, ", stp->cap.max_speed); - printf("transfer limit %d blk%s, ", + kprintf("transfer limit %d blk%s, ", stp->cap.ctl, (stp->cap.ctl > 1) ? "s" : ""); - printf("%dKB buffer, ", (stp->cap.buffer_size * DEV_BSIZE) / 1024); - printf("%s\n", ata_mode2str(atadev->mode)); + kprintf("%dKB buffer, ", (stp->cap.buffer_size * DEV_BSIZE) / 1024); + kprintf("%s\n", ata_mode2str(atadev->mode)); device_printf(dev, "Medium: "); switch (stp->cap.medium_type) { case 0x00: - printf("none"); break; + kprintf("none"); break; case 0x17: - printf("Travan 1 (400 Mbyte)"); break; + kprintf("Travan 1 (400 Mbyte)"); break; case 0xb6: - printf("Travan 4 (4 Gbyte)"); break; + kprintf("Travan 4 (4 Gbyte)"); break; case 0xda: - printf("OnStream ADR (15Gyte)"); break; + kprintf("OnStream ADR (15Gyte)"); break; default: - printf("unknown (0x%x)", stp->cap.medium_type); + kprintf("unknown (0x%x)", stp->cap.medium_type); } - if (stp->cap.readonly) printf(", readonly"); - if (stp->cap.reverse) printf(", reverse"); - if (stp->cap.eformat) printf(", eformat"); - if (stp->cap.qfa) printf(", qfa"); - if (stp->cap.lock) printf(", lock"); - if (stp->cap.locked) printf(", locked"); - if (stp->cap.prevent) printf(", prevent"); - if (stp->cap.eject) printf(", eject"); - if (stp->cap.disconnect) printf(", disconnect"); - if (stp->cap.ecc) printf(", ecc"); - if (stp->cap.compress) printf(", compress"); - if (stp->cap.blk512) printf(", 512b"); - if (stp->cap.blk1024) printf(", 1024b"); - if (stp->cap.blk32k) printf(", 32kb"); - printf("\n"); + if (stp->cap.readonly) kprintf(", readonly"); + if (stp->cap.reverse) kprintf(", reverse"); + if (stp->cap.eformat) kprintf(", eformat"); + if (stp->cap.qfa) kprintf(", qfa"); + if (stp->cap.lock) kprintf(", lock"); + if (stp->cap.locked) kprintf(", locked"); + if (stp->cap.prevent) kprintf(", prevent"); + if (stp->cap.eject) kprintf(", eject"); + if (stp->cap.disconnect) kprintf(", disconnect"); + if (stp->cap.ecc) kprintf(", ecc"); + if (stp->cap.compress) kprintf(", compress"); + if (stp->cap.blk512) kprintf(", 512b"); + if (stp->cap.blk1024) kprintf(", 1024b"); + if (stp->cap.blk32k) kprintf(", 32kb"); + kprintf("\n"); } else { device_printf(dev, "TAPE <%.40s/%.8s> at ata%d-%s %s\n", diff --git a/sys/dev/disk/ncr/ncr.c b/sys/dev/disk/ncr/ncr.c index 642c0afa43..f19c0dfef7 100644 --- a/sys/dev/disk/ncr/ncr.c +++ b/sys/dev/disk/ncr/ncr.c @@ -1,7 +1,7 @@ /************************************************************************** ** ** $FreeBSD: src/sys/pci/ncr.c,v 1.155.2.3 2001/03/05 13:09:10 obrien Exp $ -** $DragonFly: src/sys/dev/disk/ncr/ncr.c,v 1.16 2006/12/20 18:14:39 dillon Exp $ +** $DragonFly: src/sys/dev/disk/ncr/ncr.c,v 1.17 2006/12/22 23:26:16 swildner Exp $ ** ** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. ** @@ -251,7 +251,7 @@ #ifdef DIAGNOSTIC #define assert(expression) { \ if (!(expression)) { \ - (void)printf("assertion \"%s\" failed: " \ + (void)kprintf("assertion \"%s\" failed: " \ "file \"%s\", line %d\n", \ #expression, __FILE__, __LINE__); \ Debugger(""); \ @@ -260,7 +260,7 @@ #else #define assert(expression) { \ if (!(expression)) { \ - (void)printf("assertion \"%s\" failed: " \ + (void)kprintf("assertion \"%s\" failed: " \ "file \"%s\", line %d\n", \ #expression, __FILE__, __LINE__); \ } \ @@ -3021,13 +3021,13 @@ static void ncr_script_copy_and_bind (ncb_p np, ncrcmd *src, ncrcmd *dst, int le */ if (opcode == 0) { - printf ("%s: ERROR0 IN SCRIPT at %d.\n", + kprintf ("%s: ERROR0 IN SCRIPT at %d.\n", ncr_name(np), (int) (src-start-1)); DELAY (1000000); }; if (DEBUG_FLAGS & DEBUG_SCRIPT) - printf ("%p: <%x>\n", + kprintf ("%p: <%x>\n", (src-1), (unsigned)opcode); /* @@ -3047,7 +3047,7 @@ static void ncr_script_copy_and_bind (ncb_p np, ncrcmd *src, ncrcmd *dst, int le if ((tmp2 & RELOC_MASK) == RELOC_KVAR) tmp2 = 0; if ((tmp1 ^ tmp2) & 3) { - printf ("%s: ERROR1 IN SCRIPT at %d.\n", + kprintf ("%s: ERROR1 IN SCRIPT at %d.\n", ncr_name(np), (int) (src-start-1)); DELAY (1000000); } @@ -3421,9 +3421,9 @@ ncr_attach (device_t dev) np->rv_stest2 = INB(nc_stest2) & 0x20; if (bootverbose >= 2) { - printf ("\tBIOS values: SCNTL3:%02x DMODE:%02x DCNTL:%02x\n", + kprintf ("\tBIOS values: SCNTL3:%02x DMODE:%02x DCNTL:%02x\n", np->rv_scntl3, np->rv_dmode, np->rv_dcntl); - printf ("\t CTEST3:%02x CTEST4:%02x CTEST5:%02x\n", + kprintf ("\t CTEST3:%02x CTEST4:%02x CTEST5:%02x\n", np->rv_ctest3, np->rv_ctest4, np->rv_ctest5); } @@ -3467,7 +3467,7 @@ ncr_attach (device_t dev) #ifdef NCR_TEKRAM_EEPROM if (bootverbose) { - printf ("%s: Tekram EEPROM read %s\n", + kprintf ("%s: Tekram EEPROM read %s\n", ncr_name(np), read_tekram_eeprom (np, NULL) ? "succeeded" : "failed"); @@ -3622,14 +3622,14 @@ ncr_attach (device_t dev) if (!cachelnsz) { cachelnsz = 8; - printf("%s: setting PCI cache line size register to %d.\n", + kprintf("%s: setting PCI cache line size register to %d.\n", ncr_name(np), (int)cachelnsz); pci_write_config(dev, PCIR_CACHELNSZ, cachelnsz, 1); } if (!(command & (1<<4))) { command |= (1<<4); - printf("%s: setting PCI command write and invalidate.\n", + kprintf("%s: setting PCI command write and invalidate.\n", ncr_name(np)); pci_write_config(dev, PCIR_COMMAND, command, 2); } @@ -3667,7 +3667,7 @@ ncr_attach (device_t dev) ** Bells and whistles ;-) */ if (bootverbose) - printf("%s: minsync=%d, maxsync=%d, maxoffs=%d, %d dwords burst, %s dma fifo\n", + kprintf("%s: minsync=%d, maxsync=%d, maxoffs=%d, %d dwords burst, %s dma fifo\n", ncr_name(np), np->minsync, np->maxsync, np->maxoffs, burst_length(np->maxburst), (np->rv_ctest5 & DFS) ? "large" : "normal"); @@ -3676,7 +3676,7 @@ ncr_attach (device_t dev) ** Print some complementary information that can be helpfull. */ if (bootverbose) - printf("%s: %s, %s IRQ driver%s\n", + kprintf("%s: %s, %s IRQ driver%s\n", ncr_name(np), np->rv_stest2 & 0x20 ? "differential" : "single-ended", np->rv_dcntl & IRQM ? "totem pole" : "open drain", @@ -3728,9 +3728,9 @@ ncr_attach (device_t dev) { int reg; for (reg=0; reg<256; reg+=4) { - if (reg%16==0) printf ("reg[%2x]", reg); - printf (" %08x", (int)pci_conf_read (config_id, reg)); - if (reg%16==12) printf ("\n"); + if (reg%16==0) kprintf ("reg[%2x]", reg); + kprintf (" %08x", (int)pci_conf_read (config_id, reg)); + if (reg%16==12) kprintf ("\n"); } } #endif /* NCR_DUMP_REG */ @@ -3749,7 +3749,7 @@ ncr_attach (device_t dev) */ if (ncr_snooptest (np)) { - printf ("CACHE INCORRECTLY CONFIGURED.\n"); + kprintf ("CACHE INCORRECTLY CONFIGURED.\n"); return EINVAL; }; @@ -3827,7 +3827,7 @@ ncr_intr(vnp) ncb_p np = vnp; crit_enter(); - if (DEBUG_FLAGS & DEBUG_TINY) printf ("["); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("["); if (INB(nc_istat) & (INTF|SIP|DIP)) { /* @@ -3840,7 +3840,7 @@ ncr_intr(vnp) np->ticks = 100; }; - if (DEBUG_FLAGS & DEBUG_TINY) printf ("]\n"); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("]\n"); crit_exit(); } @@ -3964,7 +3964,7 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) cp->tag=lp->lasttag; if (DEBUG_FLAGS & DEBUG_TAGS) { PRINT_ADDR(ccb); - printf ("using tag #%d.\n", cp->tag); + kprintf ("using tag #%d.\n", cp->tag); }; }; } else { @@ -3999,9 +3999,9 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) msgptr[msglen++] = tp->tinfo.goal.offset; if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(ccb); - printf ("sync msgout: "); + kprintf ("sync msgout: "); ncr_show_msg (&cp->scsi_smsg [msglen-5]); - printf (".\n"); + kprintf (".\n"); }; break; case NS_WIDE: @@ -4011,9 +4011,9 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) msgptr[msglen++] = tp->tinfo.goal.width; if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(ccb); - printf ("wide msgout: "); + kprintf ("wide msgout: "); ncr_show_msg (&cp->scsi_smsg [msglen-4]); - printf (".\n"); + kprintf (".\n"); }; break; }; @@ -4157,7 +4157,7 @@ ncr_action (struct cam_sim *sim, union ccb *ccb) np->squeueput = qidx; if(DEBUG_FLAGS & DEBUG_QUEUE) - printf("%s: queuepos=%d tryoffset=%d.\n", + kprintf("%s: queuepos=%d tryoffset=%d.\n", ncr_name (np), np->squeueput, (unsigned)(READSCRIPT(startpos[0]) - (NCB_SCRIPTH_PHYS (np, tryloop)))); @@ -4441,7 +4441,7 @@ ncr_complete (ncb_p np, nccb_p cp) ncb_profile (np, cp); if (DEBUG_FLAGS & DEBUG_TINY) - printf ("CCB=%x STAT=%x/%x\n", (int)(intptr_t)cp & 0xfff, + kprintf ("CCB=%x STAT=%x/%x\n", (int)(intptr_t)cp & 0xfff, cp->host_status,cp->s_status); ccb = cp->ccb; @@ -4465,7 +4465,7 @@ ncr_complete (ncb_p np, nccb_p cp) if (cp->parity_status) { PRINT_ADDR(ccb); - printf ("%d parity error(s), fallback.\n", cp->parity_status); + kprintf ("%d parity error(s), fallback.\n", cp->parity_status); /* ** fallback to asynch transfer. */ @@ -4481,13 +4481,13 @@ ncr_complete (ncb_p np, nccb_p cp) PRINT_ADDR(ccb); switch (cp->xerr_status) { case XE_EXTRA_DATA: - printf ("extraneous data discarded.\n"); + kprintf ("extraneous data discarded.\n"); break; case XE_BAD_PHASE: - printf ("illegal scsi phase (4/5).\n"); + kprintf ("illegal scsi phase (4/5).\n"); break; default: - printf ("extended error %d.\n", cp->xerr_status); + kprintf ("extended error %d.\n", cp->xerr_status); break; }; if (cp->host_status==HS_COMPLETE) @@ -4551,7 +4551,7 @@ ncr_complete (ncb_p np, nccb_p cp) ** Other protocol messes */ PRINT_ADDR(ccb); - printf ("COMMAND FAILED (%x %x) @%p.\n", + kprintf ("COMMAND FAILED (%x %x) @%p.\n", cp->host_status, cp->s_status, cp); ccb->ccb_h.status = CAM_CMD_TIMEOUT; @@ -4602,7 +4602,7 @@ ncr_wakeup (ncb_p np, u_long code) break; case HS_DISCONNECT: - if(DEBUG_FLAGS & DEBUG_TINY) printf ("D"); + if(DEBUG_FLAGS & DEBUG_TINY) kprintf ("D"); /* fall through */ case HS_BUSY: @@ -4729,7 +4729,7 @@ ncr_init(ncb_p np, char * msg, u_long code) ** Message. */ - if (msg) printf ("%s: restart (%s).\n", ncr_name (np), msg); + if (msg) kprintf ("%s: restart (%s).\n", ncr_name (np), msg); /* ** Clear Start Queue @@ -4773,9 +4773,9 @@ ncr_init(ncb_p np, char * msg, u_long code) OUTB (nc_stime0, 0x0b ); /* HTH = disabled, STO = 0.1 sec. */ if (bootverbose >= 2) { - printf ("\tACTUAL values:SCNTL3:%02x DMODE:%02x DCNTL:%02x\n", + kprintf ("\tACTUAL values:SCNTL3:%02x DMODE:%02x DCNTL:%02x\n", np->rv_scntl3, np->rv_dmode, np->rv_dcntl); - printf ("\t CTEST3:%02x CTEST4:%02x CTEST5:%02x\n", + kprintf ("\t CTEST3:%02x CTEST4:%02x CTEST5:%02x\n", np->rv_ctest3, np->rv_ctest4, np->rv_ctest5); } @@ -5145,7 +5145,7 @@ ncr_timeout (void *arg) cp->jump_nccb.l_cmd = (SCR_JUMP); if (cp->phys.header.launch.l_paddr == NCB_SCRIPT_PHYS (np, select)) { - printf ("%s: timeout nccb=%p (skip)\n", + kprintf ("%s: timeout nccb=%p (skip)\n", ncr_name (np), cp); cp->phys.header.launch.l_paddr = NCB_SCRIPT_PHYS (np, skip); @@ -5178,9 +5178,9 @@ ncr_timeout (void *arg) */ crit_enter(); - if (DEBUG_FLAGS & DEBUG_TINY) printf ("{"); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("{"); ncr_exception (np); - if (DEBUG_FLAGS & DEBUG_TINY) printf ("}"); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("}"); crit_exit(); }; } @@ -5246,7 +5246,7 @@ static void ncr_log_hard_error(ncb_p np, u_short sist, u_char dstat) script_name = "mem"; } - printf ("%s:%d: ERROR (%x:%x) (%x-%x-%x) (%x/%x) @ (%s %x:%08x).\n", + kprintf ("%s:%d: ERROR (%x:%x) (%x-%x-%x) (%x/%x) @ (%s %x:%08x).\n", ncr_name (np), (unsigned)INB (nc_sdid)&0x0f, dstat, sist, (unsigned)INB (nc_socl), (unsigned)INB (nc_sbcl), (unsigned)INB (nc_sbdl), (unsigned)INB (nc_sxfer),(unsigned)INB (nc_scntl3), script_name, script_ofs, @@ -5254,14 +5254,14 @@ static void ncr_log_hard_error(ncb_p np, u_short sist, u_char dstat) if (((script_ofs & 3) == 0) && (unsigned)script_ofs < script_size) { - printf ("%s: script cmd = %08x\n", ncr_name(np), + kprintf ("%s: script cmd = %08x\n", ncr_name(np), (int)READSCRIPT_OFF(script_base, script_ofs)); } - printf ("%s: regdump:", ncr_name(np)); + kprintf ("%s: regdump:", ncr_name(np)); for (i=0; i<16;i++) - printf (" %02x", (unsigned)INB_OFF(i)); - printf (".\n"); + kprintf (" %02x", (unsigned)INB_OFF(i)); + kprintf (".\n"); } /*========================================================== @@ -5282,7 +5282,7 @@ void ncr_exception (ncb_p np) ** interrupt on the fly ? */ while ((istat = INB (nc_istat)) & INTF) { - if (DEBUG_FLAGS & DEBUG_TINY) printf ("F "); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("F "); OUTB (nc_istat, INTF); np->profile.num_fly++; ncr_wakeup (np, 0); @@ -5301,7 +5301,7 @@ void ncr_exception (ncb_p np) np->profile.num_int++; if (DEBUG_FLAGS & DEBUG_TINY) - printf ("<%d|%x:%x|%x:%x>", + kprintf ("<%d|%x:%x|%x:%x>", INB(nc_scr0), dstat,sist, (unsigned)INL(nc_dsp), @@ -5412,7 +5412,7 @@ void ncr_exception (ncb_p np) (INB(nc_sstat1) & (FF3210) ) || (INB(nc_sstat2) & (ILF1|ORF1|OLF1)) || /* wide .. */ !(dstat & DFE)) { - printf ("%s: have to clear fifos.\n", ncr_name (np)); + kprintf ("%s: have to clear fifos.\n", ncr_name (np)); OUTB (nc_stest3, TE|CSF); /* clear scsi fifo */ OUTB (nc_ctest3, np->rv_ctest3 | CLF); /* clear dma fifo */ @@ -5424,7 +5424,7 @@ void ncr_exception (ncb_p np) */ if (sist & HTH) { - printf ("%s: handshake timeout\n", ncr_name(np)); + kprintf ("%s: handshake timeout\n", ncr_name(np)); OUTB (nc_scntl1, CRST); DELAY (1000); OUTB (nc_scntl1, 0x00); @@ -5467,11 +5467,11 @@ void ncr_exception (ncb_p np) /* ** info message */ - printf ("%s: INFO: LDSC while IID.\n", + kprintf ("%s: INFO: LDSC while IID.\n", ncr_name (np)); return; }; - printf ("%s: target %d doesn't release the bus.\n", + kprintf ("%s: target %d doesn't release the bus.\n", ncr_name (np), INB (nc_sdid)&0x0f); /* ** return without restarting the NCR. @@ -5516,23 +5516,23 @@ void ncr_exception (ncb_p np) switch (i%16) { case 0: - printf ("%s: reg[%d0]: ", + kprintf ("%s: reg[%d0]: ", ncr_name(np),i/16); break; case 4: case 8: case 12: - printf (" "); + kprintf (" "); break; }; val = bus_space_read_1(np->bst, np->bsh, i); - printf (" %x%x", val/16, val%16); - if (i%16==15) printf (".\n"); + kprintf (" %x%x", val/16, val%16); + if (i%16==15) kprintf (".\n"); }; callout_stop(&np->timeout_ch); - printf ("%s: halted!\n", ncr_name(np)); + kprintf ("%s: halted!\n", ncr_name(np)); /* ** don't restart controller ... */ @@ -5544,7 +5544,7 @@ void ncr_exception (ncb_p np) /* ** Freeze system to be able to read the messages. */ - printf ("ncr: fatal error: system halted - press reset to reboot ..."); + kprintf ("ncr: fatal error: system halted - press reset to reboot ..."); crit_enter(); for (;;); #endif @@ -5576,7 +5576,7 @@ void ncr_int_sto (ncb_p np) { u_long dsa, scratcha, diff; nccb_p cp; - if (DEBUG_FLAGS & DEBUG_TINY) printf ("T"); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("T"); /* ** look for nccb and set the status. @@ -5680,12 +5680,12 @@ static void ncr_int_ma (ncb_p np, u_char dstat) cp = cp->link_nccb; if (!cp) { - printf ("%s: SCSI phase error fixup: CCB already dequeued (%p)\n", + kprintf ("%s: SCSI phase error fixup: CCB already dequeued (%p)\n", ncr_name (np), (void *) np->header.cp); return; } if (cp != np->header.cp) { - printf ("%s: SCSI phase error fixup: CCB address mismatch " + kprintf ("%s: SCSI phase error fixup: CCB address mismatch " "(%p != %p) np->nccb = %p\n", ncr_name (np), (void *)cp, (void *)np->header.cp, (void *)np->link_nccb); @@ -5720,12 +5720,12 @@ static void ncr_int_ma (ncb_p np, u_char dstat) ** log the information */ if (DEBUG_FLAGS & (DEBUG_TINY|DEBUG_PHASE)) { - printf ("P%x%x ",cmd&7, sbcl&7); - printf ("RL=%d D=%d SS0=%x ", + kprintf ("P%x%x ",cmd&7, sbcl&7); + kprintf ("RL=%d D=%d SS0=%x ", (unsigned) rest, (unsigned) delta, ss0); }; if (DEBUG_FLAGS & DEBUG_PHASE) { - printf ("\nCP=%p CP2=%p DSP=%x NXT=%x VDSP=%p CMD=%x ", + kprintf ("\nCP=%p CP2=%p DSP=%x NXT=%x VDSP=%p CMD=%x ", cp, np->header.cp, dsp, nxtdsp, (volatile char*)vdsp_base+vdsp_off, cmd); @@ -5747,7 +5747,7 @@ static void ncr_int_ma (ncb_p np, u_char dstat) }; if (DEBUG_FLAGS & DEBUG_PHASE) { - printf ("OCMD=%x\nTBLP=%p OLEN=%lx OADR=%lx\n", + kprintf ("OCMD=%x\nTBLP=%p OLEN=%lx OADR=%lx\n", (unsigned) (READSCRIPT_OFF(vdsp_base, vdsp_off) >> 24), (void *) tblp, (u_long) olen, @@ -5760,7 +5760,7 @@ static void ncr_int_ma (ncb_p np, u_char dstat) if (cmd != (READSCRIPT_OFF(vdsp_base, vdsp_off) >> 24)) { PRINT_ADDR(cp->ccb); - printf ("internal error: cmd=%02x != %02x=(vdsp[0] >> 24)\n", + kprintf ("internal error: cmd=%02x != %02x=(vdsp[0] >> 24)\n", (unsigned)cmd, (unsigned)READSCRIPT_OFF(vdsp_base, vdsp_off) >> 24); @@ -5768,7 +5768,7 @@ static void ncr_int_ma (ncb_p np, u_char dstat) } if (cmd & 0x06) { PRINT_ADDR(cp->ccb); - printf ("phase change %x-%x %d@%08x resid=%d.\n", + kprintf ("phase change %x-%x %d@%08x resid=%d.\n", cmd&7, sbcl&7, (unsigned)olen, (unsigned)oadr, (unsigned)rest); @@ -5795,7 +5795,7 @@ static void ncr_int_ma (ncb_p np, u_char dstat) if (DEBUG_FLAGS & DEBUG_PHASE) { PRINT_ADDR(cp->ccb); - printf ("newcmd[%d] %x %x %x %x.\n", + kprintf ("newcmd[%d] %x %x %x %x.\n", (int)(newcmd - cp->patch), (unsigned)newcmd[0], (unsigned)newcmd[1], @@ -5826,15 +5826,15 @@ static void ncr_int_ma (ncb_p np, u_char dstat) static int ncr_show_msg (u_char * msg) { u_char i; - printf ("%x",*msg); + kprintf ("%x",*msg); if (*msg==MSG_EXTENDED) { for (i=1;i<8;i++) { if (i-1>msg[1]) break; - printf ("-%x",msg[i]); + kprintf ("-%x",msg[i]); }; return (i+1); } else if ((*msg & 0xf0) == 0x20) { - printf ("-%x",msg[1]); + kprintf ("-%x",msg[1]); return (2); }; return (1); @@ -5850,7 +5850,7 @@ void ncr_int_sir (ncb_p np) u_int target = INB (nc_sdid) & 0x0f; tcb_p tp = &np->target[target]; int i; - if (DEBUG_FLAGS & DEBUG_TINY) printf ("I#%d", num); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("I#%d", num); switch (num) { case SIR_SENSE_RESTART: @@ -5891,25 +5891,25 @@ void ncr_int_sir (ncb_p np) */ if (DEBUG_FLAGS & DEBUG_RESTART) - printf ("%s: int#%d",ncr_name (np),num); + kprintf ("%s: int#%d",ncr_name (np),num); cp = (nccb_p) 0; for (i=0; itarget[i]; - if (DEBUG_FLAGS & DEBUG_RESTART) printf ("+"); + if (DEBUG_FLAGS & DEBUG_RESTART) kprintf ("+"); cp = tp->hold_cp; if (!cp) continue; - if (DEBUG_FLAGS & DEBUG_RESTART) printf ("+"); + if (DEBUG_FLAGS & DEBUG_RESTART) kprintf ("+"); if ((cp->host_status==HS_BUSY) && (cp->s_status==SCSI_STATUS_CHECK_COND)) break; - if (DEBUG_FLAGS & DEBUG_RESTART) printf ("- (remove)"); + if (DEBUG_FLAGS & DEBUG_RESTART) kprintf ("- (remove)"); tp->hold_cp = cp = (nccb_p) 0; }; if (cp) { if (DEBUG_FLAGS & DEBUG_RESTART) - printf ("+ restart job ..\n"); + kprintf ("+ restart job ..\n"); OUTL (nc_dsa, CCB_PHYS (cp, phys)); OUTL (nc_dsp, NCB_SCRIPTH_PHYS (np, getcc)); return; @@ -5918,7 +5918,7 @@ void ncr_int_sir (ncb_p np) /* ** no job, resume normal processing */ - if (DEBUG_FLAGS & DEBUG_RESTART) printf (" -- remove trap\n"); + if (DEBUG_FLAGS & DEBUG_RESTART) kprintf (" -- remove trap\n"); WRITESCRIPT(start0[0], SCR_INT ^ IFFALSE (0)); break; @@ -5931,7 +5931,7 @@ void ncr_int_sir (ncb_p np) */ if (DEBUG_FLAGS & DEBUG_RESTART) { PRINT_ADDR(cp->ccb); - printf ("in getcc reselect by t%d.\n", + kprintf ("in getcc reselect by t%d.\n", INB(nc_ssid) & 0x0f); } @@ -6031,7 +6031,7 @@ void ncr_int_sir (ncb_p np) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("negotiation failed sir=%x status=%x.\n", + kprintf ("negotiation failed sir=%x status=%x.\n", num, cp->nego_status); }; @@ -6063,9 +6063,9 @@ void ncr_int_sir (ncb_p np) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("sync msgin: "); + kprintf ("sync msgin: "); (void) ncr_show_msg (np->msgin); - printf (".\n"); + kprintf (".\n"); }; /* @@ -6108,7 +6108,7 @@ void ncr_int_sir (ncb_p np) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("sync: per=%d scntl3=0x%x ofs=%d fak=%d chg=%d.\n", + kprintf ("sync: per=%d scntl3=0x%x ofs=%d fak=%d chg=%d.\n", per, scntl3, ofs, fak, chg); } @@ -6158,9 +6158,9 @@ void ncr_int_sir (ncb_p np) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("sync msgout: "); + kprintf ("sync msgout: "); (void) ncr_show_msg (np->msgout); - printf (".\n"); + kprintf (".\n"); } if (!ofs) { @@ -6177,9 +6177,9 @@ void ncr_int_sir (ncb_p np) */ if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("wide msgin: "); + kprintf ("wide msgin: "); (void) ncr_show_msg (np->msgin); - printf (".\n"); + kprintf (".\n"); }; /* @@ -6198,7 +6198,7 @@ void ncr_int_sir (ncb_p np) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("wide: wide=%d chg=%d.\n", wide, chg); + kprintf ("wide: wide=%d chg=%d.\n", wide, chg); } if (INB (HS_PRT) == HS_NEGOTIATE) { @@ -6248,9 +6248,9 @@ void ncr_int_sir (ncb_p np) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp->ccb); - printf ("wide msgout: "); + kprintf ("wide msgout: "); (void) ncr_show_msg (np->msgout); - printf (".\n"); + kprintf (".\n"); } break; @@ -6270,7 +6270,7 @@ void ncr_int_sir (ncb_p np) */ PRINT_ADDR(cp->ccb); - printf ("MSG_MESSAGE_REJECT received (%x:%x).\n", + kprintf ("MSG_MESSAGE_REJECT received (%x:%x).\n", (unsigned)np->lastmsg, np->msgout[0]); break; @@ -6283,9 +6283,9 @@ void ncr_int_sir (ncb_p np) */ PRINT_ADDR(cp->ccb); - printf ("MSG_MESSAGE_REJECT sent for "); + kprintf ("MSG_MESSAGE_REJECT sent for "); (void) ncr_show_msg (np->msgin); - printf (".\n"); + kprintf (".\n"); break; /*-------------------------------------------------------------------- @@ -6305,7 +6305,7 @@ void ncr_int_sir (ncb_p np) */ PRINT_ADDR(cp->ccb); - printf ("MSG_IGN_WIDE_RESIDUE received, but not yet implemented.\n"); + kprintf ("MSG_IGN_WIDE_RESIDUE received, but not yet implemented.\n"); break; case SIR_MISSING_SAVE: @@ -6318,7 +6318,7 @@ void ncr_int_sir (ncb_p np) */ PRINT_ADDR(cp->ccb); - printf ("MSG_DISCONNECT received, but datapointer not saved:\n" + kprintf ("MSG_DISCONNECT received, but datapointer not saved:\n" "\tdata=%x save=%x goal=%x.\n", (unsigned) INL (nc_temp), (unsigned) np->header.savep, @@ -6376,7 +6376,7 @@ void ncr_int_sir (ncb_p np) ** else remove the interrupt. */ - printf ("%s: queue empty.\n", ncr_name (np)); + kprintf ("%s: queue empty.\n", ncr_name (np)); WRITESCRIPT(start1[0], SCR_INT ^ IFFALSE (0)); break; }; @@ -6429,7 +6429,7 @@ static nccb_p ncr_get_nccb if (cp != NULL) { if (cp->magic) { - printf("%s: Bogus free cp found\n", ncr_name(np)); + kprintf("%s: Bogus free cp found\n", ncr_name(np)); crit_exit(); return (NULL); } @@ -6553,7 +6553,7 @@ ncr_alloc_nccb (ncb_p np, u_long target, u_long lun) cp = kmalloc (sizeof (struct nccb), M_DEVBUF, M_WAITOK | M_ZERO); if (DEBUG_FLAGS & DEBUG_ALLOC) { - printf ("new nccb @%p.\n", cp); + kprintf ("new nccb @%p.\n", cp); } /* @@ -6638,7 +6638,7 @@ static int ncr_scatter chunk /= 2; if(DEBUG_FLAGS & DEBUG_SCATTER) - printf("ncr?:\tscattering virtual=%p size=%d chunk=%d.\n", + kprintf("ncr?:\tscattering virtual=%p size=%d chunk=%d.\n", (void *) vaddr, (unsigned) datalen, (unsigned) chunk); /* @@ -6678,7 +6678,7 @@ static int ncr_scatter }; if(DEBUG_FLAGS & DEBUG_SCATTER) - printf ("\tseg #%d addr=%x size=%d (rest=%d).\n", + kprintf ("\tseg #%d addr=%x size=%d (rest=%d).\n", segment, (unsigned) segaddr, (unsigned) segsize, @@ -6690,7 +6690,7 @@ static int ncr_scatter } if (datalen) { - printf("ncr?: scatter/gather failed (residue=%d).\n", + kprintf("ncr?: scatter/gather failed (residue=%d).\n", (unsigned) datalen); return (-1); }; @@ -6726,7 +6726,7 @@ static int ncr_regtest (struct ncb* np) #else if ((data & 0xe2f0fffd) != 0x02000080) { #endif - printf ("CACHE TEST FAILED: reg dstat-sstat2 readback %x.\n", + kprintf ("CACHE TEST FAILED: reg dstat-sstat2 readback %x.\n", (unsigned) data); return (0x10); }; @@ -6783,15 +6783,15 @@ static int ncr_snooptest (struct ncb* np) ** check for timeout */ if (i>=NCR_SNOOP_TIMEOUT) { - printf ("CACHE TEST FAILED: timeout.\n"); + kprintf ("CACHE TEST FAILED: timeout.\n"); return (0x20); }; /* ** Check termination position. */ if (pc != NCB_SCRIPTH_PHYS (np, snoopend)+8) { - printf ("CACHE TEST FAILED: script execution failed.\n"); - printf ("start=%08lx, pc=%08lx, end=%08lx\n", + kprintf ("CACHE TEST FAILED: script execution failed.\n"); + kprintf ("start=%08lx, pc=%08lx, end=%08lx\n", (u_long) NCB_SCRIPTH_PHYS (np, snooptest), (u_long) pc, (u_long) NCB_SCRIPTH_PHYS (np, snoopend) +8); return (0x40); @@ -6800,17 +6800,17 @@ static int ncr_snooptest (struct ncb* np) ** Show results. */ if (host_wr != ncr_rd) { - printf ("CACHE TEST FAILED: host wrote %d, ncr read %d.\n", + kprintf ("CACHE TEST FAILED: host wrote %d, ncr read %d.\n", (int) host_wr, (int) ncr_rd); err |= 1; }; if (host_rd != ncr_wr) { - printf ("CACHE TEST FAILED: ncr wrote %d, host read %d.\n", + kprintf ("CACHE TEST FAILED: ncr wrote %d, host read %d.\n", (int) ncr_wr, (int) host_rd); err |= 2; }; if (ncr_bk != ncr_wr) { - printf ("CACHE TEST FAILED: ncr wrote %d, read back %d.\n", + kprintf ("CACHE TEST FAILED: ncr wrote %d, read back %d.\n", (int) ncr_wr, (int) ncr_bk); err |= 4; }; @@ -6915,7 +6915,7 @@ static void ncr_selectclock(ncb_p np, u_char scntl3) } if (bootverbose >= 2) - printf ("%s: enabling clock multiplier\n", ncr_name(np)); + kprintf ("%s: enabling clock multiplier\n", ncr_name(np)); OUTB(nc_stest1, DBLEN); /* Enable clock multiplier */ if (np->multiplier > 2) { /* Poll bit 5 of stest4 for quadrupler */ @@ -6923,7 +6923,7 @@ static void ncr_selectclock(ncb_p np, u_char scntl3) while (!(INB(nc_stest4) & LCKFRQ) && --i > 0) DELAY(20); if (!i) - printf("%s: the chip cannot lock the frequency\n", ncr_name(np)); + kprintf("%s: the chip cannot lock the frequency\n", ncr_name(np)); } else /* Wait 20 micro-seconds for doubler */ DELAY(20); OUTB(nc_stest3, HSC); /* Halt the scsi clock */ @@ -6974,7 +6974,7 @@ ncrgetfreq (ncb_p np, int gen) OUTB (nc_scntl3, 0); if (bootverbose >= 2) - printf ("\tDelay (GEN=%d): %u msec\n", gen, ms); + kprintf ("\tDelay (GEN=%d): %u msec\n", gen, ms); /* * adjust for prescaler, and convert into KHz */ @@ -7002,7 +7002,7 @@ static void ncr_getclock (ncb_p np, u_char multiplier) f2 = ncrgetfreq (np, 11); if (bootverbose >= 2) - printf ("\tNCR clock is %uKHz, %uKHz\n", f1, f2); + kprintf ("\tNCR clock is %uKHz, %uKHz\n", f1, f2); if (f1 > f2) f1 = f2; /* trust lower result */ if (f1 > 45000) { scntl3 = 5; /* >45Mhz: assume 80MHz */ @@ -7112,16 +7112,16 @@ read_tekram_eeprom(ncb_p np, struct tekram_eeprom *buffer) for (i = 0; i < 64; i++) { u_short val; -if((i&0x0f) == 0) printf ("%02x:", i*2); +if((i&0x0f) == 0) kprintf ("%02x:", i*2); val = read_tekram_eeprom_reg (np, i); if (p) *p++ = val; sum += val; -if((i&0x01) == 0x00) printf (" "); - printf ("%02x%02x", val & 0xff, (val >> 8) & 0xff); -if((i&0x0f) == 0x0f) printf ("\n"); +if((i&0x01) == 0x00) kprintf (" "); + kprintf ("%02x%02x", val & 0xff, (val >> 8) & 0xff); +if((i&0x0f) == 0x0f) kprintf ("\n"); } -printf ("Sum = %04x\n", sum); +kprintf ("Sum = %04x\n", sum); return sum == 0x1234; } #endif /* NCR_TEKRAM_EEPROM */ diff --git a/sys/dev/disk/ncv/ncr53c500.c b/sys/dev/disk/ncv/ncr53c500.c index 99a5c4eb89..fd5235523d 100644 --- a/sys/dev/disk/ncv/ncr53c500.c +++ b/sys/dev/disk/ncv/ncr53c500.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ncv/ncr53c500.c,v 1.1.2.4 2001/12/17 13:30:18 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/ncv/ncr53c500.c,v 1.11 2006/11/07 19:56:22 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/ncv/ncr53c500.c,v 1.12 2006/12/22 23:26:16 swildner Exp $ */ /* $NecBSD: ncr53c500.c,v 1.30.12.3 2001/06/26 07:31:41 honda Exp $ */ /* $NetBSD$ */ @@ -211,7 +211,7 @@ ncvhw_check(bus_space_tag_t iot, bus_space_handle_t ioh, struct ncv_hw *hw) if (bus_space_read_1(iot, ioh, cr0_cmd) != (CMD_NOP | CMD_DMA)) { #ifdef NCV_DEBUG - printf("ncv: cr0_cmd CMD_NOP|CMD_DMA failed\n"); + kprintf("ncv: cr0_cmd CMD_NOP|CMD_DMA failed\n"); #endif /* NCV_DEBUG */ return ENODEV; } @@ -220,7 +220,7 @@ ncvhw_check(bus_space_tag_t iot, bus_space_handle_t ioh, struct ncv_hw *hw) if (bus_space_read_1(iot, ioh, cr0_cmd) != CMD_NOP) { #ifdef NCV_DEBUG - printf("ncv: cr0_cmd CMD_NOP failed\n"); + kprintf("ncv: cr0_cmd CMD_NOP failed\n"); #endif /* NCV_DEBUG */ return ENODEV; } @@ -245,7 +245,7 @@ ncvhw_check(bus_space_tag_t iot, bus_space_handle_t ioh, struct ncv_hw *hw) (bus_space_read_1(iot, ioh, cr0_istat) & INTR_SBR)) { #ifdef NCV_DEBUG - printf("ncv: cr0_istat SCSI BUS RESET failed\n"); + kprintf("ncv: cr0_istat SCSI BUS RESET failed\n"); #endif /* NCV_DEBUG */ return ENODEV; } @@ -306,7 +306,7 @@ ncvhw_power(struct ncv_softc *sc, u_int flags) if (flags == SCSI_LOW_POWDOWN) { - printf("%s power down\n", slp->sl_xname); + kprintf("%s power down\n", slp->sl_xname); ncvhw_select_register_1(iot, ioh, &sc->sc_hw); bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_POWDOWN); } @@ -315,13 +315,13 @@ ncvhw_power(struct ncv_softc *sc, u_int flags) switch (sc->sc_rstep) { case 0: - printf("%s resume step O\n", slp->sl_xname); + kprintf("%s resume step O\n", slp->sl_xname); ncvhw_select_register_1(iot, ioh, &sc->sc_hw); bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_ENGAGE); break; case 1: - printf("%s resume step I\n", slp->sl_xname); + kprintf("%s resume step I\n", slp->sl_xname); ncvhw_reset(iot, ioh, &sc->sc_hw); ncvhw_init(iot, ioh, &sc->sc_hw); break; @@ -520,7 +520,7 @@ ncv_setup_img(struct ncv_hw *hw, u_int dvcfg, int hostid) if (NCV_CLKFACTOR(dvcfg) > CLK_35M_F) { - printf("ncv: invalid dvcfg flags\n"); + kprintf("ncv: invalid dvcfg flags\n"); return EINVAL; } @@ -574,7 +574,7 @@ ncvprint(void *aux, const char *name) { if (name != NULL) - printf("%s: scsibus ", name); + kprintf("%s: scsibus ", name); return UNCONF; } @@ -583,7 +583,7 @@ ncvattachsubr(struct ncv_softc *sc) { struct scsi_low_softc *slp = &sc->sc_sclow; - printf("\n"); + kprintf("\n"); sc->sc_hw = ncv_template; ncv_setup_img(&sc->sc_hw, slp->sl_cfgflags, slp->sl_hostid); slp->sl_funcs = &ncv_funcs; @@ -651,7 +651,7 @@ ncv_pdma_end(struct ncv_softc *sc, struct targ_info *ti) bad: if ((slp->sl_error & PDMAERR) == 0) { - printf("%s: stragne cnt hw 0x%x soft 0x%x\n", + kprintf("%s: stragne cnt hw 0x%x soft 0x%x\n", slp->sl_xname, len, slp->sl_scp.scp_datalen); } @@ -661,7 +661,7 @@ bad: } else { - printf("%s: data phase miss\n", slp->sl_xname); + kprintf("%s: data phase miss\n", slp->sl_xname); slp->sl_error |= PDMAERR; } @@ -807,7 +807,7 @@ ncv_reselected(struct ncv_softc *sc) if ((bus_space_read_1(iot, ioh, cr0_sffl) & CR0_SFFLR_BMASK) != 2) { - printf("%s illegal fifo bytes\n", slp->sl_xname); + kprintf("%s illegal fifo bytes\n", slp->sl_xname); scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, "chip confused"); return EJUSTRETURN; } @@ -946,7 +946,7 @@ again: if (ncv_debug) { scsi_low_print(slp, NULL); - printf("%s st %x ist %x\n\n", slp->sl_xname, + kprintf("%s st %x ist %x\n\n", slp->sl_xname, status, ireason); #ifdef DDB if (ncv_debug > 1) @@ -1028,7 +1028,7 @@ again: ncv_target_nexus_establish(sc); if ((status & PHASE_MASK) != MESSAGE_IN_PHASE) { - printf("%s: unexpected phase after reselect\n", + kprintf("%s: unexpected phase after reselect\n", slp->sl_xname); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1); @@ -1063,7 +1063,7 @@ again: break; if ((slp->sl_error & PDMAERR) == 0) - printf("%s: data underrun\n", slp->sl_xname); + kprintf("%s: data underrun\n", slp->sl_xname); slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_WRITE_PADDING) != 0) @@ -1075,7 +1075,7 @@ again: } else { - printf("%s: write padding required\n", + kprintf("%s: write padding required\n", slp->sl_xname); } } @@ -1106,7 +1106,7 @@ again: break; if ((slp->sl_error & PDMAERR) == 0) - printf("%s: data overrun\n", slp->sl_xname); + kprintf("%s: data overrun\n", slp->sl_xname); slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_READ_PADDING) != 0) @@ -1117,7 +1117,7 @@ again: } else { - printf("%s: read padding required\n", + kprintf("%s: read padding required\n", slp->sl_xname); break; } diff --git a/sys/dev/disk/ncv/ncr53c500_pccard.c b/sys/dev/disk/ncv/ncr53c500_pccard.c index fef61af205..229183445a 100644 --- a/sys/dev/disk/ncv/ncr53c500_pccard.c +++ b/sys/dev/disk/ncv/ncr53c500_pccard.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ncv/ncr53c500_pccard.c,v 1.2.2.5 2001/12/17 13:30:18 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/ncv/ncr53c500_pccard.c,v 1.12 2006/11/07 19:56:22 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/ncv/ncr53c500_pccard.c,v 1.13 2006/12/22 23:26:16 swildner Exp $ */ /* $NecBSD: ncr53c500_pisa.c,v 1.28 1998/11/26 01:59:11 honda Exp $ */ /* $NetBSD$ */ @@ -168,7 +168,7 @@ ncv_alloc_resource(DEVPORT_PDEVICE dev) ioaddr, ioaddr+offset, offset, RF_ACTIVE); if (sc->port_res_dmy == NULL) { - printf("Warning: cannot allocate IOPORT partially.\n"); + kprintf("Warning: cannot allocate IOPORT partially.\n"); } } else { sc->port_rid_dmy = 0; @@ -316,7 +316,7 @@ ncv_card_unload(DEVPORT_PDEVICE devi) { struct ncv_softc *sc = DEVPORT_PDEVGET_SOFTC(devi); - printf("%s: unload\n", sc->sc_sclow.sl_xname); + kprintf("%s: unload\n", sc->sc_sclow.sl_xname); crit_enter(); scsi_low_deactivate((struct scsi_low_softc *)sc); scsi_low_dettach(&sc->sc_sclow); diff --git a/sys/dev/disk/nsp/nsp.c b/sys/dev/disk/nsp/nsp.c index 504fd480f8..9bc9a41156 100644 --- a/sys/dev/disk/nsp/nsp.c +++ b/sys/dev/disk/nsp/nsp.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/nsp/nsp.c,v 1.1.2.6 2001/12/17 13:30:18 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/nsp/nsp.c,v 1.10 2006/11/07 19:56:23 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/nsp/nsp.c,v 1.11 2006/12/22 23:26:16 swildner Exp $ */ /* $NecBSD: nsp.c,v 1.21.12.6 2001/06/29 06:27:52 honda Exp $ */ /* $NetBSD$ */ @@ -225,7 +225,7 @@ nsp_expect_signal(struct nsp_softc *sc, u_int8_t curphase, u_int8_t mask) SCSI_LOW_DELAY(NSP_DELAY_INTERVAL); } - printf("%s: nsp_expect_signal timeout\n", slp->sl_xname); + kprintf("%s: nsp_expect_signal timeout\n", slp->sl_xname); return -1; } @@ -583,7 +583,7 @@ nspprint(void *aux, const char *name) { if (name != NULL) - printf("%s: scsibus ", name); + kprintf("%s: scsibus ", name); return UNCONF; } @@ -592,7 +592,7 @@ nspattachsubr(struct nsp_softc *sc) { struct scsi_low_softc *slp = &sc->sc_sclow; - printf("\n"); + kprintf("\n"); sc->sc_idbit = (1 << slp->sl_hostid); slp->sl_flags |= HW_READ_PADDING; @@ -727,7 +727,7 @@ nsp_pdma_end(struct nsp_softc *sc, struct targ_info *ti) else { slp->sl_error |= PDMAERR; - printf("%s len %x >= datalen %x\n", + kprintf("%s len %x >= datalen %x\n", slp->sl_xname, len, slp->sl_scp.scp_datalen); } @@ -738,7 +738,7 @@ nsp_pdma_end(struct nsp_softc *sc, struct targ_info *ti) sc->sc_cnt > cb->ccb_scp.scp_datalen) { slp->sl_error |= PDMAERR; - printf("%s: data read count error %x != %x (%x)\n", + kprintf("%s: data read count error %x != %x (%x)\n", slp->sl_xname, sc->sc_cnt, cnt, cb->ccb_scp.scp_datalen); } @@ -749,7 +749,7 @@ nsp_pdma_end(struct nsp_softc *sc, struct targ_info *ti) else { - printf("%s data phase miss\n", slp->sl_xname); + kprintf("%s data phase miss\n", slp->sl_xname); slp->sl_error |= PDMAERR; } } @@ -795,7 +795,7 @@ nsp_read_fifo(struct nsp_softc *sc, int suspendio) #ifdef NSP_DEBUG if (res < sc->sc_cnt || res == (u_int) -1) { - printf("%s: strange fifo ack count 0x%x < 0x%x\n", + kprintf("%s: strange fifo ack count 0x%x < 0x%x\n", slp->sl_xname, res, sc->sc_cnt); return 0; } @@ -806,7 +806,7 @@ nsp_read_fifo(struct nsp_softc *sc, int suspendio) { if ((slp->sl_error & PDMAERR) == 0) { - printf("%s: data overrun 0x%x > 0x%x\n", + kprintf("%s: data overrun 0x%x > 0x%x\n", slp->sl_xname, res, slp->sl_scp.scp_datalen); } @@ -815,7 +815,7 @@ nsp_read_fifo(struct nsp_softc *sc, int suspendio) if ((slp->sl_flags & HW_READ_PADDING) == 0) { - printf("%s: read padding required\n", slp->sl_xname); + kprintf("%s: read padding required\n", slp->sl_xname); return 0; } @@ -883,7 +883,7 @@ nsp_write_fifo(struct nsp_softc *sc, int suspendio) #ifdef NSP_DEBUG if ((slp->sl_scp.scp_datalen % WFIFO_CRIT) != 0) { - printf("%s: strange write length 0x%x\n", + kprintf("%s: strange write length 0x%x\n", slp->sl_xname, slp->sl_scp.scp_datalen); } #endif /* NSP_DEBUG */ @@ -1027,7 +1027,7 @@ ReadLoop: if ((-- tout) <= 0) { - printf("%s: nsp_pio_read: timeout\n", slp->sl_xname); + kprintf("%s: nsp_pio_read: timeout\n", slp->sl_xname); return; } } @@ -1137,7 +1137,7 @@ WriteLoop: if ((-- tout) <= 0) { - printf("%s: nsp_pio_write: timeout\n", slp->sl_xname); + kprintf("%s: nsp_pio_write: timeout\n", slp->sl_xname); return; } } @@ -1169,7 +1169,7 @@ nsp_negate_signal(struct nsp_softc *sc, u_int8_t mask, u_char *s) SCSI_LOW_DELAY(NSP_DELAY_INTERVAL); } - printf("%s: %s nsp_negate_signal timeout\n", slp->sl_xname, s); + kprintf("%s: %s nsp_negate_signal timeout\n", slp->sl_xname, s); return -1; } @@ -1276,8 +1276,8 @@ nsp_error(struct nsp_softc *sc, u_char *s, u_int8_t isrc, u_int8_t ph, { struct scsi_low_softc *slp = &sc->sc_sclow; - printf("%s: %s\n", slp->sl_xname, s); - printf("%s: isrc 0x%x scmon 0x%x irqphs 0x%x\n", + kprintf("%s: %s\n", slp->sl_xname, s); + kprintf("%s: isrc 0x%x scmon 0x%x irqphs 0x%x\n", slp->sl_xname, (u_int) isrc, (u_int) ph, (u_int) irqphs); } @@ -1348,7 +1348,7 @@ nsp_phase_match(struct nsp_softc *sc, u_int8_t phase, u_int8_t stat) if ((stat & SCBUSMON_PHMASK) != phase) { - printf("%s: phase mismatch 0x%x != 0x%x\n", + kprintf("%s: phase mismatch 0x%x != 0x%x\n", slp->sl_xname, (u_int) phase, (u_int) stat); return EINVAL; } @@ -1515,7 +1515,7 @@ nspintr(void *arg) nsp_target_nexus_establish(sc); if ((ph & SCBUSMON_PHMASK) != PHASE_MSGIN) { - printf("%s: unexpected phase after reselect\n", + kprintf("%s: unexpected phase after reselect\n", slp->sl_xname); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1); @@ -1806,7 +1806,7 @@ nsp_timeout(struct nsp_softc *sc) slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_WRITE_PADDING) == 0) { - printf("%s: write padding required\n", slp->sl_xname); + kprintf("%s: write padding required\n", slp->sl_xname); break; } diff --git a/sys/dev/disk/nsp/nsp_pccard.c b/sys/dev/disk/nsp/nsp_pccard.c index 3cc92c5eb4..6a0b74d1f1 100644 --- a/sys/dev/disk/nsp/nsp_pccard.c +++ b/sys/dev/disk/nsp/nsp_pccard.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/nsp/nsp_pccard.c,v 1.2.2.6 2001/12/17 13:30:19 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/nsp/nsp_pccard.c,v 1.10 2006/11/07 19:56:23 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/nsp/nsp_pccard.c,v 1.11 2006/12/22 23:26:16 swildner Exp $ */ /* $NecBSD: nsp_pisa.c,v 1.4 1999/04/15 01:35:54 kmatsuda Exp $ */ /* $NetBSD$ */ @@ -154,7 +154,7 @@ nsp_alloc_resource(DEVPORT_PDEVICE dev) /* No need to allocate memory if not configured and it's in PIO mode */ if (maddr == 0 || msize == 0) { if ((DEVPORT_PDEVFLAGS(dev) & PIO_MODE) == 0) { - printf("Memory window was not configured. Configure or use in PIO mode."); + kprintf("Memory window was not configured. Configure or use in PIO mode."); nsp_release_resource(dev); return(ENOMEM); } @@ -272,7 +272,7 @@ nsp_card_unload(DEVPORT_PDEVICE devi) { struct nsp_softc *sc = DEVPORT_PDEVGET_SOFTC(devi); - printf("%s: unload\n",sc->sc_sclow.sl_xname); + kprintf("%s: unload\n",sc->sc_sclow.sl_xname); crit_enter(); scsi_low_deactivate((struct scsi_low_softc *)sc); scsi_low_dettach(&sc->sc_sclow); @@ -305,7 +305,7 @@ nspattach(DEVPORT_PDEVICE devi) if (iobase == 0) { - printf("%s: no ioaddr is given\n", dvname); + kprintf("%s: no ioaddr is given\n", dvname); return (0); } diff --git a/sys/dev/disk/sbp/sbp.c b/sys/dev/disk/sbp/sbp.c index dd84c9f142..af2ebdb502 100644 --- a/sys/dev/disk/sbp/sbp.c +++ b/sys/dev/disk/sbp/sbp.c @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.74 2004/01/08 14:58:09 simokawa Exp $ - * $DragonFly: src/sys/dev/disk/sbp/sbp.c,v 1.21 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/disk/sbp/sbp.c,v 1.22 2006/12/22 23:26:16 swildner Exp $ * */ @@ -302,7 +302,7 @@ sbp_probe(device_t dev) device_t pa; SBP_DEBUG(0) - printf("sbp_probe\n"); + kprintf("sbp_probe\n"); END_DEBUG pa = device_get_parent(dev); @@ -322,7 +322,7 @@ sbp_show_sdev_info(struct sbp_dev *sdev, int new) { struct fw_device *fwdev; - printf("%s:%d:%d ", + kprintf("%s:%d:%d ", device_get_nameunit(sdev->target->sbp->fd.dev), sdev->target->target_id, sdev->lun_id @@ -331,7 +331,7 @@ sbp_show_sdev_info(struct sbp_dev *sdev, int new) return; } fwdev = sdev->target->fwdev; - printf("ordered:%d type:%d EUI:%08x%08x node:%d " + kprintf("ordered:%d type:%d EUI:%08x%08x node:%d " "speed:%d maxrec:%d", (sdev->type & 0x40) >> 6, (sdev->type & 0x1f), @@ -342,11 +342,11 @@ sbp_show_sdev_info(struct sbp_dev *sdev, int new) fwdev->maxrec ); if (new) - printf(" new!\n"); + kprintf(" new!\n"); else - printf("\n"); + kprintf("\n"); sbp_show_sdev_info(sdev, 2); - printf("'%s' '%s' '%s'\n", sdev->vendor, sdev->product, sdev->revision); + kprintf("'%s' '%s' '%s'\n", sdev->vendor, sdev->product, sdev->revision); } static struct { @@ -420,14 +420,14 @@ sbp_alloc_lun(struct sbp_target *target) break; lun = reg->val & 0xffff; SBP_DEBUG(0) - printf("target %d lun %d found\n", target->target_id, lun); + kprintf("target %d lun %d found\n", target->target_id, lun); END_DEBUG if (maxlun < lun) maxlun = lun; crom_next(&cc); } if (maxlun < 0) - printf("%s:%d no LUN found\n", + kprintf("%s:%d no LUN found\n", device_get_nameunit(target->sbp->fd.dev), target->target_id); @@ -476,7 +476,7 @@ END_DEBUG break; lun = reg->val & 0xffff; if (lun >= SBP_NUM_LUNS) { - printf("too large lun %d\n", lun); + kprintf("too large lun %d\n", lun); goto next; } @@ -502,7 +502,7 @@ END_DEBUG /* alignment */ sizeof(u_int32_t), SBP_DMA_SIZE, &sdev->dma, BUS_DMA_NOWAIT); if (sdev->dma.v_addr == NULL) { - printf("%s: dma space allocation failed\n", + kprintf("%s: dma space allocation failed\n", __func__); kfree(sdev, M_SBP); target->luns[lun] = NULL; @@ -523,7 +523,7 @@ END_DEBUG + sizeof(struct sbp_ocb) * i + offsetof(struct sbp_ocb, orb[0]); if (bus_dmamap_create(sbp->dmat, 0, &ocb->dmamap)) { - printf("sbp_attach: cannot create dmamap\n"); + kprintf("sbp_attach: cannot create dmamap\n"); /* XXX */ goto next; } @@ -552,7 +552,7 @@ sbp_alloc_target(struct sbp_softc *sbp, struct fw_device *fwdev) struct csrreg *reg; SBP_DEBUG(1) - printf("sbp_alloc_target\n"); + kprintf("sbp_alloc_target\n"); END_DEBUG i = sbp_new_target(sbp, fwdev); if (i < 0) { @@ -569,7 +569,7 @@ END_DEBUG crom_init_context(&cc, target->fwdev->csrrom); reg = crom_search_key(&cc, CROM_MGM); if (reg == NULL || reg->val == 0) { - printf("NULL management address\n"); + kprintf("NULL management address\n"); target->fwdev = NULL; return NULL; } @@ -577,7 +577,7 @@ END_DEBUG target->mgm_lo = 0xf0000000 | (reg->val << 2); target->mgm_ocb_cur = NULL; SBP_DEBUG(1) - printf("target:%d mgm_port: %x\n", i, target->mgm_lo); + kprintf("target:%d mgm_port: %x\n", i, target->mgm_lo); END_DEBUG STAILQ_INIT(&target->xferlist); target->n_xfer = 0; @@ -645,7 +645,7 @@ sbp_login(struct sbp_dev *sdev) if (t.tv_sec >= 0 && t.tv_usec > 0) ticks = (t.tv_sec * 1000 + t.tv_usec / 1000) * hz / 1000; SBP_DEBUG(0) - printf("%s: sec = %ld usec = %ld ticks = %d\n", __func__, + kprintf("%s: sec = %ld usec = %ld ticks = %d\n", __func__, t.tv_sec, t.tv_usec, ticks); END_DEBUG callout_reset(&sdev->login_callout, ticks, @@ -666,9 +666,9 @@ sbp_probe_target(void *arg) alive = SBP_FWDEV_ALIVE(target->fwdev); SBP_DEBUG(1) - printf("sbp_probe_target %d\n", target->target_id); + kprintf("sbp_probe_target %d\n", target->target_id); if (!alive) - printf("not alive\n"); + kprintf("not alive\n"); END_DEBUG sbp = target->sbp; @@ -712,7 +712,7 @@ END_DEBUG SBP_DEBUG(0) /* the device has gone */ sbp_show_sdev_info(sdev, 2); - printf("lost target\n"); + kprintf("lost target\n"); END_DEBUG if (sdev->path) { xpt_freeze_devq(sdev->path, 1); @@ -741,7 +741,7 @@ sbp_post_busreset(void *arg) sbp = (struct sbp_softc *)arg; SBP_DEBUG(0) - printf("sbp_post_busreset\n"); + kprintf("sbp_post_busreset\n"); END_DEBUG if ((sbp->sim->flags & SIMQ_FREEZED) == 0) { xpt_freeze_simq(sbp->sim, /*count*/1); @@ -759,7 +759,7 @@ sbp_post_explore(void *arg) int i, alive; SBP_DEBUG(0) - printf("sbp_post_explore (sbp_cold=%d)\n", sbp_cold); + kprintf("sbp_post_explore (sbp_cold=%d)\n", sbp_cold); END_DEBUG if (sbp_cold > 0) sbp_cold --; @@ -787,12 +787,12 @@ END_DEBUG /* traverse device list */ STAILQ_FOREACH(fwdev, &sbp->fd.fc->devices, link) { SBP_DEBUG(0) - printf("sbp_post_explore: EUI:%08x%08x ", + kprintf("sbp_post_explore: EUI:%08x%08x ", fwdev->eui.hi, fwdev->eui.lo); if (fwdev->status != FWDEVATTACHED) - printf("not attached, state=%d.\n", fwdev->status); + kprintf("not attached, state=%d.\n", fwdev->status); else - printf("attached\n"); + kprintf("attached\n"); END_DEBUG alive = SBP_FWDEV_ALIVE(fwdev); for(i = 0 ; i < SBP_NUM_TARGETS ; i ++){ @@ -827,7 +827,7 @@ sbp_loginres_callback(struct fw_xfer *xfer){ sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("sbp_loginres_callback\n"); + kprintf("sbp_loginres_callback\n"); END_DEBUG /* recycle */ crit_enter(); @@ -858,7 +858,7 @@ sbp_reset_start_callback(struct fw_xfer *xfer) if (xfer->resp != 0) { sbp_show_sdev_info(sdev, 2); - printf("sbp_reset_start failed: resp=%d\n", xfer->resp); + kprintf("sbp_reset_start failed: resp=%d\n", xfer->resp); } for (i = 0; i < target->num_lun; i++) { @@ -876,7 +876,7 @@ sbp_reset_start(struct sbp_dev *sdev) SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("sbp_reset_start\n"); + kprintf("sbp_reset_start\n"); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); @@ -898,14 +898,14 @@ sbp_mgm_callback(struct fw_xfer *xfer) SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("sbp_mgm_callback\n"); + kprintf("sbp_mgm_callback\n"); END_DEBUG resp = xfer->resp; sbp_xfer_free(xfer); #if 0 if (resp != 0) { sbp_show_sdev_info(sdev, 2); - printf("management ORB failed(%d) ... RESET_START\n", resp); + kprintf("management ORB failed(%d) ... RESET_START\n", resp); sbp_reset_start(sdev); } #endif @@ -936,13 +936,13 @@ sbp_cam_scan_lun(struct cam_periph *periph, union ccb *ccb) target = sdev->target; SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("sbp_cam_scan_lun\n"); + kprintf("sbp_cam_scan_lun\n"); END_DEBUG if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { sdev->status = SBP_DEV_ATTACHED; } else { sbp_show_sdev_info(sdev, 2); - printf("scan failed\n"); + kprintf("scan failed\n"); } sdev = sbp_next_dev(target, sdev->lun_id + 1); if (sdev == NULL) { @@ -966,13 +966,13 @@ sbp_cam_scan_target(void *arg) sdev = sbp_next_dev(target, 0); if (sdev == NULL) { - printf("sbp_cam_scan_target: nothing to do for target%d\n", + kprintf("sbp_cam_scan_target: nothing to do for target%d\n", target->target_id); return; } SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("sbp_cam_scan_target\n"); + kprintf("sbp_cam_scan_target\n"); END_DEBUG ccb = kmalloc(sizeof(union ccb), M_SBP, M_WAITOK | M_ZERO); xpt_setup_ccb(&ccb->ccb_h, sdev->path, SCAN_PRI); @@ -1008,7 +1008,7 @@ sbp_do_attach(struct fw_xfer *xfer) sbp = target->sbp; SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("sbp_do_attach\n"); + kprintf("sbp_do_attach\n"); END_DEBUG sbp_xfer_free(xfer); @@ -1039,11 +1039,11 @@ sbp_agent_reset_callback(struct fw_xfer *xfer) sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("%s\n", __func__); + kprintf("%s\n", __func__); END_DEBUG if (xfer->resp != 0) { sbp_show_sdev_info(sdev, 2); - printf("%s: resp=%d\n", __func__, xfer->resp); + kprintf("%s: resp=%d\n", __func__, xfer->resp); } sbp_xfer_free(xfer); @@ -1061,7 +1061,7 @@ sbp_agent_reset(struct sbp_dev *sdev) SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("sbp_agent_reset\n"); + kprintf("sbp_agent_reset\n"); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0x04); if (xfer == NULL) @@ -1084,7 +1084,7 @@ sbp_busy_timeout_callback(struct fw_xfer *xfer) sdev = (struct sbp_dev *)xfer->sc; SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("sbp_busy_timeout_callback\n"); + kprintf("sbp_busy_timeout_callback\n"); END_DEBUG sbp_xfer_free(xfer); sbp_agent_reset(sdev); @@ -1097,7 +1097,7 @@ sbp_busy_timeout(struct sbp_dev *sdev) struct fw_xfer *xfer; SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("sbp_busy_timeout\n"); + kprintf("sbp_busy_timeout\n"); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0); @@ -1117,11 +1117,11 @@ sbp_orb_pointer_callback(struct fw_xfer *xfer) SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("%s\n", __func__); + kprintf("%s\n", __func__); END_DEBUG if (xfer->resp != 0) { /* XXX */ - printf("%s: xfer->resp = %d\n", __func__, xfer->resp); + kprintf("%s: xfer->resp = %d\n", __func__, xfer->resp); } sbp_xfer_free(xfer); sdev->flags &= ~ORB_POINTER_ACTIVE; @@ -1144,12 +1144,12 @@ sbp_orb_pointer(struct sbp_dev *sdev, struct sbp_ocb *ocb) struct fw_pkt *fp; SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("%s: 0x%08x\n", __func__, (u_int32_t)ocb->bus_addr); + kprintf("%s: 0x%08x\n", __func__, (u_int32_t)ocb->bus_addr); END_DEBUG if ((sdev->flags & ORB_POINTER_ACTIVE) != 0) { SBP_DEBUG(0) - printf("%s: orb pointer active\n", __func__); + kprintf("%s: orb pointer active\n", __func__); END_DEBUG sdev->flags |= ORB_POINTER_NEED; return; @@ -1183,11 +1183,11 @@ SBP_DEBUG(1) struct sbp_dev *sdev; sdev = (struct sbp_dev *)xfer->sc; sbp_show_sdev_info(sdev, 2); - printf("sbp_cmd_callback\n"); + kprintf("sbp_cmd_callback\n"); END_DEBUG if (xfer->resp != 0) { /* XXX */ - printf("%s: xfer->resp = %d\n", __func__, xfer->resp); + kprintf("%s: xfer->resp = %d\n", __func__, xfer->resp); } sbp_xfer_free(xfer); return; @@ -1200,7 +1200,7 @@ sbp_doorbell(struct sbp_dev *sdev) struct fw_pkt *fp; SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("sbp_doorbell\n"); + kprintf("sbp_doorbell\n"); END_DEBUG xfer = sbp_write_cmd(sdev, FWTCODE_WREQQ, 0x10); @@ -1226,19 +1226,19 @@ sbp_write_cmd(struct sbp_dev *sdev, int tcode, int offset) xfer = STAILQ_FIRST(&target->xferlist); if (xfer == NULL) { if (target->n_xfer > 5 /* XXX */) { - printf("sbp: no more xfer for this target\n"); + kprintf("sbp: no more xfer for this target\n"); crit_exit(); return(NULL); } xfer = fw_xfer_alloc_buf(M_SBP, 8, 0); if(xfer == NULL){ - printf("sbp: fw_xfer_alloc_buf failed\n"); + kprintf("sbp: fw_xfer_alloc_buf failed\n"); crit_exit(); return NULL; } target->n_xfer ++; if (debug) - printf("sbp: alloc %d xfer\n", target->n_xfer); + kprintf("sbp: alloc %d xfer\n", target->n_xfer); new = 1; } else { STAILQ_REMOVE_HEAD(&target->xferlist, link); @@ -1308,7 +1308,7 @@ sbp_mgm_orb(struct sbp_dev *sdev, int func, struct sbp_ocb *aocb) SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("%s\n", orb_fun_name[(func>>16)&0xf]); + kprintf("%s\n", orb_fun_name[(func>>16)&0xf]); END_DEBUG switch (func) { case ORB_FUN_LGI: @@ -1361,7 +1361,7 @@ start: xfer->send.payload[1] = htonl(ocb->bus_addr & 0xffffffff); SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("mgm orb: %08x\n", (u_int32_t)ocb->bus_addr); + kprintf("mgm orb: %08x\n", (u_int32_t)ocb->bus_addr); END_DEBUG fw_asyreq(xfer->fc, -1, xfer); @@ -1373,7 +1373,7 @@ sbp_print_scsi_cmd(struct sbp_ocb *ocb) struct ccb_scsiio *csio; csio = &ocb->ccb->csio; - printf("%s:%d:%d XPT_SCSI_IO: " + kprintf("%s:%d:%d XPT_SCSI_IO: " "cmd: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x" ", flags: 0x%02x, " "%db cmd/%db data/%db sense\n", @@ -1407,7 +1407,7 @@ SBP_DEBUG(0) sbp_print_scsi_cmd(ocb); /* XXX need decode status */ sbp_show_sdev_info(ocb->sdev, 2); - printf("SCSI status %x sfmt %x valid %x key %x code %x qlfr %x len %d\n", + kprintf("SCSI status %x sfmt %x valid %x key %x code %x qlfr %x len %d\n", sbp_cmd_status->status, sbp_cmd_status->sfmt, sbp_cmd_status->valid, @@ -1466,7 +1466,7 @@ END_DEBUG u_int8_t j, *tmp; tmp = sense; for( j = 0 ; j < 32 ; j+=8){ - printf("sense %02x%02x %02x%02x %02x%02x %02x%02x\n", + kprintf("sense %02x%02x %02x%02x %02x%02x %02x%02x\n", tmp[j], tmp[j+1], tmp[j+2], tmp[j+3], tmp[j+4], tmp[j+5], tmp[j+6], tmp[j+7]); } @@ -1476,7 +1476,7 @@ END_DEBUG break; default: sbp_show_sdev_info(ocb->sdev, 2); - printf("sbp_scsi_status: unknown scsi status 0x%x\n", + kprintf("sbp_scsi_status: unknown scsi status 0x%x\n", sbp_cmd_status->status); } } @@ -1495,7 +1495,7 @@ sbp_fix_inq_data(struct sbp_ocb *ocb) return; SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("sbp_fix_inq_data\n"); + kprintf("sbp_fix_inq_data\n"); END_DEBUG inq = (struct scsi_inquiry_data *) ccb->csio.data_ptr; switch (SID_TYPE(inq)) { @@ -1546,29 +1546,29 @@ sbp_recv1(struct fw_xfer *xfer) /* u_int32_t *ld; ld = xfer->recv.buf; -printf("sbp %x %d %d %08x %08x %08x %08x\n", +kprintf("sbp %x %d %d %08x %08x %08x %08x\n", xfer->resp, xfer->recv.len, xfer->recv.off, ntohl(ld[0]), ntohl(ld[1]), ntohl(ld[2]), ntohl(ld[3])); -printf("sbp %08x %08x %08x %08x\n", ntohl(ld[4]), ntohl(ld[5]), ntohl(ld[6]), ntohl(ld[7])); -printf("sbp %08x %08x %08x %08x\n", ntohl(ld[8]), ntohl(ld[9]), ntohl(ld[10]), ntohl(ld[11])); +kprintf("sbp %08x %08x %08x %08x\n", ntohl(ld[4]), ntohl(ld[5]), ntohl(ld[6]), ntohl(ld[7])); +kprintf("sbp %08x %08x %08x %08x\n", ntohl(ld[8]), ntohl(ld[9]), ntohl(ld[10]), ntohl(ld[11])); */ sbp = (struct sbp_softc *)xfer->sc; if (xfer->resp != 0){ - printf("sbp_recv: xfer->resp = %d\n", xfer->resp); + kprintf("sbp_recv: xfer->resp = %d\n", xfer->resp); goto done0; } if (xfer->recv.payload == NULL){ - printf("sbp_recv: xfer->recv.payload == NULL\n"); + kprintf("sbp_recv: xfer->recv.payload == NULL\n"); goto done0; } rfp = &xfer->recv.hdr; if(rfp->mode.wreqb.tcode != FWTCODE_WREQB){ - printf("sbp_recv: tcode = %d\n", rfp->mode.wreqb.tcode); + kprintf("sbp_recv: tcode = %d\n", rfp->mode.wreqb.tcode); goto done0; } sbp_status = (struct sbp_status *)xfer->recv.payload; addr = rfp->mode.wreqb.dest_lo; SBP_DEBUG(2) - printf("received address 0x%x\n", addr); + kprintf("received address 0x%x\n", addr); END_DEBUG t = SBP_ADDR2TRG(addr); if (t >= SBP_NUM_TARGETS) { @@ -1601,18 +1601,18 @@ END_DEBUG ocb = sbp_dequeue_ocb(sdev, sbp_status); if (ocb == NULL) { sbp_show_sdev_info(sdev, 2); - printf("No ocb(%x) on the queue\n", + kprintf("No ocb(%x) on the queue\n", ntohl(sbp_status->orb_lo)); } break; case 2: /* unsolicit */ sbp_show_sdev_info(sdev, 2); - printf("unsolicit status received\n"); + kprintf("unsolicit status received\n"); break; default: sbp_show_sdev_info(sdev, 2); - printf("unknown sbp_status->src\n"); + kprintf("unknown sbp_status->src\n"); } status_valid0 = (sbp_status->src < 2 @@ -1624,7 +1624,7 @@ END_DEBUG int status; SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("ORB status src:%x resp:%x dead:%x" + kprintf("ORB status src:%x resp:%x dead:%x" " len:%x stat:%x orb:%x%08x\n", sbp_status->src, sbp_status->resp, sbp_status->dead, sbp_status->len, sbp_status->status, @@ -1635,23 +1635,23 @@ END_DEBUG switch(sbp_status->resp) { case 0: if (status > MAX_ORB_STATUS0) - printf("%s\n", orb_status0[MAX_ORB_STATUS0]); + kprintf("%s\n", orb_status0[MAX_ORB_STATUS0]); else - printf("%s\n", orb_status0[status]); + kprintf("%s\n", orb_status0[status]); break; case 1: - printf("Obj: %s, Error: %s\n", + kprintf("Obj: %s, Error: %s\n", orb_status1_object[(status>>6) & 3], orb_status1_serial_bus_error[status & 0xf]); break; case 2: - printf("Illegal request\n"); + kprintf("Illegal request\n"); break; case 3: - printf("Vendor dependent\n"); + kprintf("Vendor dependent\n"); break; default: - printf("unknown respose code %d\n", sbp_status->resp); + kprintf("unknown respose code %d\n", sbp_status->resp); } } @@ -1688,13 +1688,13 @@ END_DEBUG if (status_valid) { SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); -printf("login: len %d, ID %d, cmd %08x%08x, recon_hold %d\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo, ntohs(login_res->recon_hold)); +kprintf("login: len %d, ID %d, cmd %08x%08x, recon_hold %d\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo, ntohs(login_res->recon_hold)); END_DEBUG sbp_busy_timeout(sdev); } else { /* forgot logout? */ sbp_show_sdev_info(sdev, 2); - printf("login failed\n"); + kprintf("login failed\n"); sdev->status = SBP_DEV_RESET; } break; @@ -1703,7 +1703,7 @@ END_DEBUG if (status_valid) { SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); -printf("reconnect: len %d, ID %d, cmd %08x%08x\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo); +kprintf("reconnect: len %d, ID %d, cmd %08x%08x\n", login_res->len, login_res->id, login_res->cmd_hi, login_res->cmd_lo); END_DEBUG #if 1 if (sdev->status == SBP_DEV_ATTACHED) @@ -1718,7 +1718,7 @@ END_DEBUG /* reconnection hold time exceed? */ SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); - printf("reconnect failed\n"); + kprintf("reconnect failed\n"); END_DEBUG sbp_login(sdev); } @@ -1736,7 +1736,7 @@ END_DEBUG break; default: sbp_show_sdev_info(sdev, 2); - printf("unknown function %d\n", orb_fun); + kprintf("unknown function %d\n", orb_fun); break; } sbp_mgm_orb(sdev, ORB_FUN_RUNQUEUE, NULL); @@ -1749,10 +1749,10 @@ END_DEBUG u_int32_t *ld; ld = ocb->ccb->csio.data_ptr; if(ld != NULL && ocb->ccb->csio.dxfer_len != 0) - printf("ptr %08x %08x %08x %08x\n", ld[0], ld[1], ld[2], ld[3]); + kprintf("ptr %08x %08x %08x %08x\n", ld[0], ld[1], ld[2], ld[3]); else - printf("ptr NULL\n"); -printf("len %d\n", sbp_status->len); + kprintf("ptr NULL\n"); +kprintf("len %d\n", sbp_status->len); */ ccb = ocb->ccb; if(sbp_status->len > 1){ @@ -1832,7 +1832,7 @@ sbp_attach(device_t dev) int i, error; SBP_DEBUG(0) - printf("sbp_attach (cold=%d)\n", cold); + kprintf("sbp_attach (cold=%d)\n", cold); END_DEBUG if (cold) @@ -1861,7 +1861,7 @@ END_DEBUG #endif &sbp->dmat); if (error != 0) { - printf("sbp_attach: Could not allocate DMA tag " + kprintf("sbp_attach: Could not allocate DMA tag " "- error %d\n", error); return (ENOMEM); } @@ -1937,7 +1937,7 @@ sbp_logout_all(struct sbp_softc *sbp) int i, j; SBP_DEBUG(0) - printf("sbp_logout_all\n"); + kprintf("sbp_logout_all\n"); END_DEBUG for (i = 0 ; i < SBP_NUM_TARGETS ; i ++) { target = &sbp->targets[i]; @@ -2015,7 +2015,7 @@ sbp_detach(device_t dev) int i; SBP_DEBUG(0) - printf("sbp_detach\n"); + kprintf("sbp_detach\n"); END_DEBUG for (i = 0; i < SBP_NUM_TARGETS; i ++) @@ -2073,7 +2073,7 @@ sbp_cam_detach_target(struct sbp_target *target) if (target->luns != NULL) { SBP_DEBUG(0) - printf("sbp_detach_target %d\n", target->target_id); + kprintf("sbp_detach_target %d\n", target->target_id); END_DEBUG callout_stop(&target->scan_callout); for (i = 0; i < target->num_lun; i++) @@ -2104,11 +2104,11 @@ sbp_target_reset(struct sbp_dev *sdev, int method) } switch(method) { case 1: - printf("target reset\n"); + kprintf("target reset\n"); sbp_mgm_orb(sdev, ORB_FUN_RST, NULL); break; case 2: - printf("reset start\n"); + kprintf("reset start\n"); sbp_reset_start(sdev); break; } @@ -2123,17 +2123,17 @@ sbp_mgm_timeout(void *arg) struct sbp_target *target = sdev->target; sbp_show_sdev_info(sdev, 2); - printf("request timeout(mgm orb:0x%08x) ... ", + kprintf("request timeout(mgm orb:0x%08x) ... ", (u_int32_t)ocb->bus_addr); target->mgm_ocb_cur = NULL; sbp_free_ocb(sdev, ocb); #if 0 /* XXX */ - printf("run next request\n"); + kprintf("run next request\n"); sbp_mgm_orb(sdev, ORB_FUN_RUNQUEUE, NULL); #endif #if 1 - printf("reset start\n"); + kprintf("reset start\n"); sbp_reset_start(sdev); #endif } @@ -2145,13 +2145,13 @@ sbp_timeout(void *arg) struct sbp_dev *sdev = ocb->sdev; sbp_show_sdev_info(sdev, 2); - printf("request timeout(cmd orb:0x%08x) ... ", + kprintf("request timeout(cmd orb:0x%08x) ... ", (u_int32_t)ocb->bus_addr); sdev->timeout ++; switch(sdev->timeout) { case 1: - printf("agent reset\n"); + kprintf("agent reset\n"); xpt_freeze_devq(sdev->path, 1); sdev->freeze ++; sbp_abort_all_ocbs(sdev, CAM_CMD_TIMEOUT); @@ -2199,7 +2199,7 @@ sbp_action1(struct cam_sim *sim, union ccb *ccb) SBP_DEBUG(1) if (sdev == NULL) - printf("invalid target %d lun %d\n", + kprintf("invalid target %d lun %d\n", ccb->ccb_h.target_id, ccb->ccb_h.target_lun); END_DEBUG @@ -2211,7 +2211,7 @@ END_DEBUG case XPT_CALC_GEOMETRY: if (sdev == NULL) { SBP_DEBUG(1) - printf("%s:%d:%d:func_code 0x%04x: " + kprintf("%s:%d:%d:func_code 0x%04x: " "Invalid target (target needed)\n", device_get_nameunit(sbp->fd.dev), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, @@ -2232,7 +2232,7 @@ END_DEBUG if (sbp == NULL && ccb->ccb_h.target_id != CAM_TARGET_WILDCARD) { SBP_DEBUG(0) - printf("%s:%d:%d func_code 0x%04x: " + kprintf("%s:%d:%d func_code 0x%04x: " "Invalid target (no wildcard)\n", device_get_nameunit(sbp->fd.dev), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, @@ -2259,7 +2259,7 @@ END_DEBUG csio = &ccb->csio; SBP_DEBUG(2) - printf("%s:%d:%d XPT_SCSI_IO: " + kprintf("%s:%d:%d XPT_SCSI_IO: " "cmd: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x" ", flags: 0x%02x, " "%db cmd/%db data/%db sense\n", @@ -2289,7 +2289,7 @@ END_DEBUG if (sdev->status == SBP_DEV_PROBE) { char *name; name = xpt_path_periph(ccb->ccb_h.path)->periph_name; - printf("probe stage, periph name: %s\n", name); + kprintf("probe stage, periph name: %s\n", name); if (strcmp(name, "probe") != 0) { ccb->ccb_h.status = CAM_REQUEUE_REQ; xpt_done(ccb); @@ -2319,9 +2319,9 @@ END_DEBUG } if (csio->ccb_h.flags & CAM_SCATTER_VALID) - printf("sbp: CAM_SCATTER_VALID\n"); + kprintf("sbp: CAM_SCATTER_VALID\n"); if (csio->ccb_h.flags & CAM_DATA_PHYS) - printf("sbp: CAM_DATA_PHYS\n"); + kprintf("sbp: CAM_DATA_PHYS\n"); if (csio->ccb_h.flags & CAM_CDB_POINTER) cdb = (void *)csio->cdb_io.cdb_ptr; @@ -2329,8 +2329,8 @@ END_DEBUG cdb = (void *)&csio->cdb_io.cdb_bytes; bcopy(cdb, (void *)&ocb->orb[5], csio->cdb_len); /* -printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[0]), ntohl(ocb->orb[1]), ntohl(ocb->orb[2]), ntohl(ocb->orb[3])); -printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntohl(ocb->orb[6]), ntohl(ocb->orb[7])); +kprintf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[0]), ntohl(ocb->orb[1]), ntohl(ocb->orb[2]), ntohl(ocb->orb[3])); +kprintf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntohl(ocb->orb[6]), ntohl(ocb->orb[7])); */ if (ccb->csio.dxfer_len > 0) { int error; @@ -2345,7 +2345,7 @@ printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntoh /*flags*/0); crit_exit(); if (error) - printf("sbp: bus_dmamap_load error %d\n", error); + kprintf("sbp: bus_dmamap_load error %d\n", error); } else sbp_execute_ocb(ocb, NULL, 0, 0); break; @@ -2361,13 +2361,13 @@ printf("ORB %08x %08x %08x %08x\n", ntohl(ocb->orb[4]), ntohl(ocb->orb[5]), ntoh ccg = &ccb->ccg; if (ccg->block_size == 0) { - printf("sbp_action1: block_size is 0.\n"); + kprintf("sbp_action1: block_size is 0.\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); break; } SBP_DEBUG(1) - printf("%s:%d:%d:%d:XPT_CALC_GEOMETRY: " + kprintf("%s:%d:%d:%d:XPT_CALC_GEOMETRY: " #if defined(__DragonFly__) || __FreeBSD_version < 500000 "Volume size = %d\n", #else @@ -2406,7 +2406,7 @@ END_DEBUG { SBP_DEBUG(1) - printf("%s:%d:XPT_RESET_BUS: \n", + kprintf("%s:%d:XPT_RESET_BUS: \n", device_get_nameunit(sbp->fd.dev), cam_sim_path(sbp->sim)); END_DEBUG @@ -2419,7 +2419,7 @@ END_DEBUG struct ccb_pathinq *cpi = &ccb->cpi; SBP_DEBUG(1) - printf("%s:%d:%d XPT_PATH_INQ:.\n", + kprintf("%s:%d:%d XPT_PATH_INQ:.\n", device_get_nameunit(sbp->fd.dev), ccb->ccb_h.target_id, ccb->ccb_h.target_lun); END_DEBUG @@ -2446,7 +2446,7 @@ END_DEBUG { struct ccb_trans_settings *cts = &ccb->cts; SBP_DEBUG(1) - printf("%s:%d:%d XPT_GET_TRAN_SETTINGS:.\n", + kprintf("%s:%d:%d XPT_GET_TRAN_SETTINGS:.\n", device_get_nameunit(sbp->fd.dev), ccb->ccb_h.target_id, ccb->ccb_h.target_lun); END_DEBUG @@ -2489,20 +2489,20 @@ sbp_execute_ocb(void *arg, bus_dma_segment_t *segments, int seg, int error) bus_dma_segment_t *s; if (error) - printf("sbp_execute_ocb: error=%d\n", error); + kprintf("sbp_execute_ocb: error=%d\n", error); ocb = (struct sbp_ocb *)arg; SBP_DEBUG(2) - printf("sbp_execute_ocb: seg %d", seg); + kprintf("sbp_execute_ocb: seg %d", seg); for (i = 0; i < seg; i++) #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf(", %x:%d", segments[i].ds_addr, segments[i].ds_len); + kprintf(", %x:%d", segments[i].ds_addr, segments[i].ds_len); #else - printf(", %jx:%jd", (uintmax_t)segments[i].ds_addr, + kprintf(", %jx:%jd", (uintmax_t)segments[i].ds_addr, (uintmax_t)segments[i].ds_len); #endif - printf("\n"); + kprintf("\n"); END_DEBUG if (seg == 1) { @@ -2519,7 +2519,7 @@ END_DEBUG SBP_DEBUG(0) /* XXX LSI Logic "< 16 byte" bug might be hit */ if (s->ds_len < 16) - printf("sbp_execute_ocb: warning, " + kprintf("sbp_execute_ocb: warning, " #if defined(__DragonFly__) || __FreeBSD_version < 500000 "segment length(%d) is less than 16." #else @@ -2573,7 +2573,7 @@ sbp_dequeue_ocb(struct sbp_dev *sdev, struct sbp_status *sbp_status) SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); - printf("%s: 0x%08x src %d\n", + kprintf("%s: 0x%08x src %d\n", __func__, ntohl(sbp_status->orb_lo), sbp_status->src); END_DEBUG for (ocb = STAILQ_FIRST(&sdev->ocbs); ocb != NULL; ocb = next) { @@ -2613,7 +2613,7 @@ END_DEBUG SBP_DEBUG(0) if (ocb && order > 0) { sbp_show_sdev_info(sdev, 2); - printf("unordered execution order:%d\n", order); + kprintf("unordered execution order:%d\n", order); } END_DEBUG return (ocb); @@ -2629,9 +2629,9 @@ sbp_enqueue_ocb(struct sbp_dev *sdev, struct sbp_ocb *ocb) SBP_DEBUG(1) sbp_show_sdev_info(sdev, 2); #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("%s: 0x%08x\n", __func__, ocb->bus_addr); + kprintf("%s: 0x%08x\n", __func__, ocb->bus_addr); #else - printf("%s: 0x%08jx\n", __func__, (uintmax_t)ocb->bus_addr); + kprintf("%s: 0x%08jx\n", __func__, (uintmax_t)ocb->bus_addr); #endif END_DEBUG prev = STAILQ_LAST(&sdev->ocbs, sbp_ocb, ocb); @@ -2644,10 +2644,10 @@ END_DEBUG if (prev != NULL) { SBP_DEBUG(2) #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("linking chain 0x%x -> 0x%x\n", + kprintf("linking chain 0x%x -> 0x%x\n", prev->bus_addr, ocb->bus_addr); #else - printf("linking chain 0x%jx -> 0x%jx\n", + kprintf("linking chain 0x%jx -> 0x%jx\n", (uintmax_t)prev->bus_addr, (uintmax_t)ocb->bus_addr); #endif END_DEBUG @@ -2667,7 +2667,7 @@ sbp_get_ocb(struct sbp_dev *sdev) crit_enter(); ocb = STAILQ_FIRST(&sdev->free_ocbs); if (ocb == NULL) { - printf("ocb shortage!!!\n"); + kprintf("ocb shortage!!!\n"); return NULL; } STAILQ_REMOVE_HEAD(&sdev->free_ocbs, ocb); @@ -2693,9 +2693,9 @@ sbp_abort_ocb(struct sbp_ocb *ocb, int status) SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); #if defined(__DragonFly__) || __FreeBSD_version < 500000 - printf("sbp_abort_ocb 0x%x\n", ocb->bus_addr); + kprintf("sbp_abort_ocb 0x%x\n", ocb->bus_addr); #else - printf("sbp_abort_ocb 0x%jx\n", (uintmax_t)ocb->bus_addr); + kprintf("sbp_abort_ocb 0x%jx\n", (uintmax_t)ocb->bus_addr); #endif END_DEBUG SBP_DEBUG(1) diff --git a/sys/dev/disk/scd/scd.c b/sys/dev/disk/scd/scd.c index b799abfcbc..4e43bf4e04 100644 --- a/sys/dev/disk/scd/scd.c +++ b/sys/dev/disk/scd/scd.c @@ -42,7 +42,7 @@ /* $FreeBSD: src/sys/i386/isa/scd.c,v 1.54 2000/01/29 16:00:30 peter Exp $ */ -/* $DragonFly: src/sys/dev/disk/scd/Attic/scd.c,v 1.19 2006/09/10 01:26:34 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/scd/Attic/scd.c,v 1.20 2006/12/22 23:26:17 swildner Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -95,7 +95,7 @@ #ifdef SCD_DEBUG static int scd_debuglevel = SCD_DEBUG; -# define XDEBUG(level, data) {if (scd_debuglevel >= level) printf data;} +# define XDEBUG(level, data) {if (scd_debuglevel >= level) kprintf data;} #else # define XDEBUG(level, data) #endif @@ -201,7 +201,7 @@ scd_attach(struct isa_device *dev) cd->iobase = dev->id_iobase; /* Already set by probe, but ... */ /* name filled in probe */ - printf("scd%d: <%s>\n", dev->id_unit, scd_data[dev->id_unit].name); + kprintf("scd%d: <%s>\n", dev->id_unit, scd_data[dev->id_unit].name); init_drive(dev->id_unit); @@ -263,7 +263,7 @@ scdopen(struct dev_open_args *ap) } continue; } - printf("scd%d: TOC read error 0x%x\n", unit, rc); + kprintf("scd%d: TOC read error 0x%x\n", unit, rc); return EIO; } } @@ -322,7 +322,7 @@ scdstrategy(struct dev_strategy_args *ap) unit, bio->bio_offset, bp->b_bcount)); if (unit >= NSCD || bio->bio_offset < 0 || (bp->b_bcount % SCDBLKSIZE)) { - printf("scd%d: strategy failure: offset = %lld, bcount = %d\n", + kprintf("scd%d: strategy failure: offset = %lld, bcount = %d\n", unit, bio->bio_offset, bp->b_bcount); bp->b_error = EINVAL; bp->b_flags |= B_ERROR; @@ -331,7 +331,7 @@ scdstrategy(struct dev_strategy_args *ap) /* if device invalidated (e.g. media change, door open), error */ if (!(cd->flags & SCDVALID)) { - printf("scd%d: media changed\n", unit); + kprintf("scd%d: media changed\n", unit); bp->b_error = EIO; goto bad; } @@ -486,7 +486,7 @@ scdioctl(struct dev_ioctl_args *ap) #endif return 0; default: - printf("scd%d: unsupported ioctl (cmd=0x%lx)\n", + kprintf("scd%d: unsupported ioctl (cmd=0x%lx)\n", unit, ap->a_cmd); return ENOTTY; } @@ -816,7 +816,7 @@ loop: case SCD_S_WAITSTAT: callout_stop(&cd->callout); if (mbx->count-- <= 0) { - printf("scd%d: timeout. drive busy.\n",unit); + kprintf("scd%d: timeout. drive busy.\n",unit); goto harderr; } @@ -831,7 +831,7 @@ trystat: /* reject, if audio active */ if (cd->audio_status & CD_AS_PLAY_IN_PROGRESS) { - printf("scd%d: audio is active\n",unit); + kprintf("scd%d: audio is active\n",unit); goto harderr; } @@ -868,7 +868,7 @@ nextblock: case SCD_S_WAITSPIN: callout_stop(&cd->callout); if (mbx->count-- <= 0) { - printf("scd%d: timeout waiting for drive to spin up.\n", unit); + kprintf("scd%d: timeout waiting for drive to spin up.\n", unit); goto harderr; } if (!STATUS_BIT(port, SBIT_RESULT_READY)) { @@ -895,7 +895,7 @@ nextblock: case SCD_S_WAITFIFO: callout_stop(&cd->callout); if (mbx->count-- <= 0) { - printf("scd%d: timeout. write param not ready.\n",unit); + kprintf("scd%d: timeout. write param not ready.\n",unit); goto harderr; } if (!FSTATUS_BIT(port, FBIT_WPARAM_READY)) { @@ -945,7 +945,7 @@ writeparam: if (mbx->count-- <= 0) { if (STATUS_BIT(port, SBIT_RESULT_READY)) goto got_param; - printf("scd%d: timeout while reading data\n",unit); + kprintf("scd%d: timeout while reading data\n",unit); goto readerr; } if (!STATUS_BIT(port, SBIT_DATA_READY)) { @@ -975,7 +975,7 @@ got_data: case SCD_S_WAITPARAM: callout_stop(&cd->callout); if (mbx->count-- <= 0) { - printf("scd%d: timeout waiting for params\n",unit); + kprintf("scd%d: timeout waiting for params\n",unit); goto readerr; } @@ -987,7 +987,7 @@ waitfor_param: } #if SCD_DEBUG if (mbx->count < 100 && scd_debuglevel > 0) - printf("scd%d: mbx->count (paramwait) = %d(%d)\n", unit, mbx->count, 100); + kprintf("scd%d: mbx->count (paramwait) = %d(%d)\n", unit, mbx->count, 100); #endif got_param: @@ -997,7 +997,7 @@ got_param: switch (i) { case ERR_FATAL_READ_ERROR1: case ERR_FATAL_READ_ERROR2: - printf("scd%d: unrecoverable read error 0x%x\n", unit, i); + kprintf("scd%d: unrecoverable read error 0x%x\n", unit, i); goto harderr; } break; @@ -1037,7 +1037,7 @@ got_param: readerr: if (mbx->retry-- > 0) { - printf("scd%d: retrying ...\n",unit); + kprintf("scd%d: retrying ...\n",unit); state = SCD_S_BEGIN1; goto loop; } @@ -1053,7 +1053,7 @@ harderr: return; changed: - printf("scd%d: media changed\n", unit); + kprintf("scd%d: media changed\n", unit); goto harderr; } @@ -1089,9 +1089,9 @@ process_attention(unsigned unit) #if SCD_DEBUG if (scd_debuglevel > 0) { if (count == 1) - printf("scd%d: DEBUG: ATTENTIONS = 0x%x", unit, code); + kprintf("scd%d: DEBUG: ATTENTIONS = 0x%x", unit, code); else - printf(",0x%x", code); + kprintf(",0x%x", code); } #endif @@ -1121,7 +1121,7 @@ process_attention(unsigned unit) } #if SCD_DEBUG if (scd_debuglevel > 0 && count > 0) - printf("\n"); + kprintf("\n"); #endif } @@ -1190,7 +1190,7 @@ read_toc(unsigned unit) if (rc < 0) return rc; if (rc > sizeof(toc)) { - printf("scd%d: program error: toc too large (%d)\n", unit, rc); + kprintf("scd%d: program error: toc too large (%d)\n", unit, rc); return EIO; } if (get_result(unit, rc, (u_char *)&toc) != 0) @@ -1218,8 +1218,8 @@ read_toc(unsigned unit) #ifdef SCD_DEBUG if (scd_debuglevel > 0) { if ((j % 3) == 0) - printf("\nscd%d: tracks ", unit); - printf("[%03d: %2d %2d %2d] ", i, + kprintf("\nscd%d: tracks ", unit); + kprintf("[%03d: %2d %2d %2d] ", i, bcd2bin(cd->toc[i].start_msf[0]), bcd2bin(cd->toc[i].start_msf[1]), bcd2bin(cd->toc[i].start_msf[2])); @@ -1230,7 +1230,7 @@ read_toc(unsigned unit) #ifdef SCD_DEBUG if (scd_debuglevel > 0) { i = cd->last_track+1; - printf("[END: %2d %2d %2d]\n", + kprintf("[END: %2d %2d %2d]\n", bcd2bin(cd->toc[i].start_msf[0]), bcd2bin(cd->toc[i].start_msf[1]), bcd2bin(cd->toc[i].start_msf[2])); @@ -1275,7 +1275,7 @@ init_drive(unsigned unit) rc = send_cmd(unit, CMD_SET_DRIVE_PARAM, 2, 0x05, 0x03 | ((scd_data[unit].double_speed) ? 0x04: 0)); if (rc != 0) - printf("scd%d: Unable to set parameters. Errcode = 0x%x\n", unit, rc); + kprintf("scd%d: Unable to set parameters. Errcode = 0x%x\n", unit, rc); } /* Returns 0 or errno */ @@ -1315,7 +1315,7 @@ send_cmd(u_int unit, u_char cmd, u_int nargs, ...) int i; if (waitfor_status_bits(unit, 0, SBIT_BUSY)) { - printf("scd%d: drive busy\n", unit); + kprintf("scd%d: drive busy\n", unit); return -0x100; } @@ -1370,16 +1370,16 @@ print_error(int unit, int errcode) { switch (errcode) { case -ERR_CD_NOT_LOADED: - printf("scd%d: door is open\n", unit); + kprintf("scd%d: door is open\n", unit); break; case -ERR_NO_CD_INSIDE: - printf("scd%d: no cd inside\n", unit); + kprintf("scd%d: no cd inside\n", unit); break; default: if (errcode == -0x100 || errcode > 0) - printf("scd%d: device timeout\n", unit); + kprintf("scd%d: device timeout\n", unit); else - printf("scd%d: unexpected error 0x%x\n", unit, -errcode); + kprintf("scd%d: unexpected error 0x%x\n", unit, -errcode); break; } } @@ -1434,10 +1434,10 @@ waitfor_status_bits(int unit, int bits_set, int bits_clear) } #ifdef SCD_DEBUG if (scd_debuglevel > 0) - printf("scd%d: DEBUG: waitfor: TIMEOUT (0x%x,(0x%x,0x%x))\n", unit, c, bits_set, bits_clear); + kprintf("scd%d: DEBUG: waitfor: TIMEOUT (0x%x,(0x%x,0x%x))\n", unit, c, bits_set, bits_clear); else #endif - printf("scd%d: timeout.\n", unit); + kprintf("scd%d: timeout.\n", unit); return EIO; } diff --git a/sys/dev/disk/simos/simos.c b/sys/dev/disk/simos/simos.c index 23f6523ad4..7703ed8496 100644 --- a/sys/dev/disk/simos/simos.c +++ b/sys/dev/disk/simos/simos.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/simos.c,v 1.7 1999/08/28 00:51:06 peter Exp $ - * $DragonFly: src/sys/dev/disk/simos/Attic/simos.c,v 1.7 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/simos/Attic/simos.c,v 1.8 2006/12/22 23:26:17 swildner Exp $ */ #include @@ -172,7 +172,7 @@ simos_start(struct simos_softc* sc, struct ccb_scsiio *csio) /* * Don't think this can happen. */ - printf("simos_start: can't start command while one is pending\n"); + kprintf("simos_start: can't start command while one is pending\n"); csio->ccb_h.status = CAM_BUSY; xpt_done((union ccb *) csio); return; diff --git a/sys/dev/disk/stg/tmc18c30.c b/sys/dev/disk/stg/tmc18c30.c index b322806ee0..06d9988486 100644 --- a/sys/dev/disk/stg/tmc18c30.c +++ b/sys/dev/disk/stg/tmc18c30.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/stg/tmc18c30.c,v 1.1.2.5 2001/12/17 13:30:19 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/stg/tmc18c30.c,v 1.12 2006/11/07 19:56:24 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/stg/tmc18c30.c,v 1.13 2006/12/22 23:26:17 swildner Exp $ */ /* $NecBSD: tmc18c30.c,v 1.28.12.3 2001/06/19 04:35:48 honda Exp $ */ /* $NetBSD$ */ @@ -411,7 +411,7 @@ stgprint(void *aux, const char *name) { if (name != NULL) - printf("%s: scsibus ", name); + kprintf("%s: scsibus ", name); return UNCONF; } @@ -420,7 +420,7 @@ stgattachsubr(struct stg_softc *sc) { struct scsi_low_softc *slp = &sc->sc_sclow; - printf("\n"); + kprintf("\n"); sc->sc_idbit = (1 << slp->sl_hostid); slp->sl_funcs = &stgfuncs; @@ -471,7 +471,7 @@ stg_pdma_end(struct stg_softc *sc, struct targ_info *ti) else { slp->sl_error |= PDMAERR; - printf("%s len %x >= datalen %x\n", + kprintf("%s len %x >= datalen %x\n", slp->sl_xname, len, slp->sl_scp.scp_datalen); } @@ -482,7 +482,7 @@ stg_pdma_end(struct stg_softc *sc, struct targ_info *ti) if (len != 0) { slp->sl_error |= PDMAERR; - printf("%s: len %x left in fifo\n", + kprintf("%s: len %x left in fifo\n", slp->sl_xname, len); } } @@ -491,7 +491,7 @@ stg_pdma_end(struct stg_softc *sc, struct targ_info *ti) else { - printf("%s data phase miss\n", slp->sl_xname); + kprintf("%s data phase miss\n", slp->sl_xname); slp->sl_error |= PDMAERR; } @@ -557,7 +557,7 @@ stg_pio_read(struct stg_softc *sc, struct targ_info *ti, u_int thold) slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_READ_PADDING) == 0) { - printf("%s: read padding required\n", + kprintf("%s: read padding required\n", slp->sl_xname); break; } @@ -586,7 +586,7 @@ stg_pio_read(struct stg_softc *sc, struct targ_info *ti, u_int thold) } if (tout <= 0) - printf("%s: pio read timeout\n", slp->sl_xname); + kprintf("%s: pio read timeout\n", slp->sl_xname); } static void @@ -665,7 +665,7 @@ stg_pio_write(struct stg_softc *sc, struct targ_info *ti, u_int thold) } if (tout <= 0) - printf("%s: pio write timeout\n", slp->sl_xname); + kprintf("%s: pio write timeout\n", slp->sl_xname); } static int @@ -688,7 +688,7 @@ stg_negate_signal(struct stg_softc *sc, u_int8_t mask, u_char *s) SCSI_LOW_DELAY(STG_DELAY_INTERVAL); } - printf("%s: %s stg_negate_signal timeout\n", slp->sl_xname, s); + kprintf("%s: %s stg_negate_signal timeout\n", slp->sl_xname, s); return -1; } @@ -715,7 +715,7 @@ stg_expect_signal(struct stg_softc *sc, u_int8_t phase, u_int8_t mask) SCSI_LOW_DELAY(STG_DELAY_INTERVAL); } - printf("%s: stg_expect_signal timeout\n", slp->sl_xname); + kprintf("%s: stg_expect_signal timeout\n", slp->sl_xname); return -1; } @@ -785,7 +785,7 @@ stg_reselected(struct stg_softc *sc) } else if (slp->sl_Tnexus != NULL) { - printf("%s: unexpected termination\n", slp->sl_xname); + kprintf("%s: unexpected termination\n", slp->sl_xname); stg_disconnected(sc, slp->sl_Tnexus); } @@ -809,7 +809,7 @@ stg_reselected(struct stg_softc *sc) } SCSI_LOW_DELAY(1); } - printf("%s: reselction timeout I\n", slp->sl_xname); + kprintf("%s: reselction timeout I\n", slp->sl_xname); return EJUSTRETURN; reselect_start: @@ -832,7 +832,7 @@ reselect_start: goto reselected; SCSI_LOW_DELAY(1); } - printf("%s: reselction timeout II\n", slp->sl_xname); + kprintf("%s: reselction timeout II\n", slp->sl_xname); return EJUSTRETURN; reselected: @@ -991,7 +991,7 @@ stgintr(void *arg) if (stg_debug) { scsi_low_print(slp, NULL); - printf("%s: st %x ist %x\n\n", slp->sl_xname, + kprintf("%s: st %x ist %x\n\n", slp->sl_xname, status, astatus); #ifdef DDB if (stg_debug > 1) @@ -1108,7 +1108,7 @@ arb_fail: stg_target_nexus_establish(sc); if ((status & PHASE_MASK) != MESSAGE_IN_PHASE) { - printf("%s: unexpected phase after reselect\n", + kprintf("%s: unexpected phase after reselect\n", slp->sl_xname); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1); @@ -1146,7 +1146,7 @@ arb_fail: if (stg_xfer(sc, slp->sl_scp.scp_cmd, slp->sl_scp.scp_cmdlen, COMMAND_PHASE, 0) != 0) { - printf("%s: CMDOUT short\n", slp->sl_xname); + kprintf("%s: CMDOUT short\n", slp->sl_xname); } break; @@ -1193,7 +1193,7 @@ arb_fail: } if (regv != bus_space_read_1(iot, ioh, tmc_rdata)) { - printf("%s: STATIN: data mismatch\n", slp->sl_xname); + kprintf("%s: STATIN: data mismatch\n", slp->sl_xname); } stg_negate_signal(sc, BSTAT_ACK, "statin"); break; @@ -1215,7 +1215,7 @@ arb_fail: if (stg_xfer(sc, ti->ti_msgoutstr, len, MESSAGE_OUT_PHASE, slp->sl_clear_atten) != 0) { - printf("%s: MSGOUT short\n", slp->sl_xname); + kprintf("%s: MSGOUT short\n", slp->sl_xname); } else { @@ -1247,7 +1247,7 @@ arb_fail: /* read data with ACK */ if (regv != bus_space_read_1(iot, ioh, tmc_rdata)) { - printf("%s: MSGIN: data mismatch\n", slp->sl_xname); + kprintf("%s: MSGIN: data mismatch\n", slp->sl_xname); } /* wait for the ack negated */ @@ -1260,13 +1260,13 @@ arb_fail: break; case BUSFREE_PHASE: - printf("%s: unexpected disconnect\n", slp->sl_xname); + kprintf("%s: unexpected disconnect\n", slp->sl_xname); stg_disconnected(sc, ti); break; default: slp->sl_error |= FATALIO; - printf("%s: unknown phase bus %x intr %x\n", + kprintf("%s: unknown phase bus %x intr %x\n", slp->sl_xname, status, astatus); break; } @@ -1294,7 +1294,7 @@ stg_timeout(struct stg_softc *sc) if (sc->sc_ubf_timeout ++ == 0) return 0; - printf("%s: unexpected bus free detected\n", slp->sl_xname); + kprintf("%s: unexpected bus free detected\n", slp->sl_xname); slp->sl_error |= FATALIO; scsi_low_print(slp, slp->sl_Tnexus); stg_disconnected(sc, slp->sl_Tnexus); @@ -1316,7 +1316,7 @@ stg_timeout(struct stg_softc *sc) slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_WRITE_PADDING) == 0) { - printf("%s: write padding required\n", + kprintf("%s: write padding required\n", slp->sl_xname); break; } diff --git a/sys/dev/disk/stg/tmc18c30_isa.c b/sys/dev/disk/stg/tmc18c30_isa.c index f617161b8b..bc073cab1c 100644 --- a/sys/dev/disk/stg/tmc18c30_isa.c +++ b/sys/dev/disk/stg/tmc18c30_isa.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/stg/tmc18c30_isa.c,v 1.2.2.4 2001/09/04 04:45:23 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/stg/tmc18c30_isa.c,v 1.10 2006/11/07 19:56:24 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/stg/tmc18c30_isa.c,v 1.11 2006/12/22 23:26:17 swildner Exp $ */ /* $NecBSD: tmc18c30_pisa.c,v 1.22 1998/11/26 01:59:21 honda Exp $ */ /* $NetBSD$ */ @@ -231,7 +231,7 @@ stg_isa_unload(device_t devi) { struct stg_softc *sc = device_get_softc(devi); - printf("%s: unload\n",sc->sc_sclow.sl_xname); + kprintf("%s: unload\n",sc->sc_sclow.sl_xname); crit_enter(); scsi_low_deactivate((struct scsi_low_softc *)sc); scsi_low_dettach(&sc->sc_sclow); @@ -265,7 +265,7 @@ stgattach(device_t devi) if (iobase == 0) { - printf("%s: no ioaddr is given\n", dvname); + kprintf("%s: no ioaddr is given\n", dvname); return (0); } diff --git a/sys/dev/disk/stg/tmc18c30_pccard.c b/sys/dev/disk/stg/tmc18c30_pccard.c index 699a633d83..377e8c6d7f 100644 --- a/sys/dev/disk/stg/tmc18c30_pccard.c +++ b/sys/dev/disk/stg/tmc18c30_pccard.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/stg/tmc18c30_pccard.c,v 1.2.2.6 2001/12/17 13:30:19 non Exp $ */ -/* $DragonFly: src/sys/dev/disk/stg/tmc18c30_pccard.c,v 1.11 2006/11/07 19:56:24 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/stg/tmc18c30_pccard.c,v 1.12 2006/12/22 23:26:17 swildner Exp $ */ /* $NecBSD: tmc18c30_pisa.c,v 1.22 1998/11/26 01:59:21 honda Exp $ */ /* $NetBSD$ */ @@ -268,7 +268,7 @@ stg_card_unload(DEVPORT_PDEVICE devi) { struct stg_softc *sc = DEVPORT_PDEVGET_SOFTC(devi); - printf("%s: unload\n",sc->sc_sclow.sl_xname); + kprintf("%s: unload\n",sc->sc_sclow.sl_xname); crit_enter(); scsi_low_deactivate((struct scsi_low_softc *)sc); scsi_low_dettach(&sc->sc_sclow); @@ -301,7 +301,7 @@ stgattach(DEVPORT_PDEVICE devi) if (iobase == 0) { - printf("%s: no ioaddr is given\n", dvname); + kprintf("%s: no ioaddr is given\n", dvname); return (0); } diff --git a/sys/dev/disk/sym/sym_hipd.c b/sys/dev/disk/sym/sym_hipd.c index ef7ba62544..697c70e2f2 100644 --- a/sys/dev/disk/sym/sym_hipd.c +++ b/sys/dev/disk/sym/sym_hipd.c @@ -56,7 +56,7 @@ */ /* $FreeBSD: src/sys/dev/sym/sym_hipd.c,v 1.6.2.12 2001/12/02 19:01:10 groudier Exp $ */ -/* $DragonFly: src/sys/dev/disk/sym/sym_hipd.c,v 1.19 2006/12/20 18:14:39 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/sym/sym_hipd.c,v 1.20 2006/12/22 23:26:17 swildner Exp $ */ #define SYM_DRIVER_NAME "sym-1.6.5-20000902" @@ -524,7 +524,7 @@ static void *___sym_malloc(m_pool_s *mp, int size) } } #ifdef DEBUG - printf("___sym_malloc(%d) = %p\n", size, (void *) a); + kprintf("___sym_malloc(%d) = %p\n", size, (void *) a); #endif return (void *) a; } @@ -538,7 +538,7 @@ static void ___sym_mfree(m_pool_s *mp, void *ptr, int size) m_link_s *h = mp->h; #ifdef DEBUG - printf("___sym_mfree(%p, %d)\n", ptr, size); + kprintf("___sym_mfree(%p, %d)\n", ptr, size); #endif if (size > MEMO_CLUSTER_SIZE) @@ -582,12 +582,12 @@ static void *__sym_calloc2(m_pool_s *mp, int size, char *name, int uflags) p = ___sym_malloc(mp, size); if (DEBUG_FLAGS & DEBUG_ALLOC) - printf ("new %-10s[%4d] @%p.\n", name, size, p); + kprintf ("new %-10s[%4d] @%p.\n", name, size, p); if (p) bzero(p, size); else if (uflags & MEMO_WARN) - printf ("__sym_calloc2: failed to allocate %s[%d]\n", name, size); + kprintf ("__sym_calloc2: failed to allocate %s[%d]\n", name, size); return p; } @@ -597,7 +597,7 @@ static void *__sym_calloc2(m_pool_s *mp, int size, char *name, int uflags) static void __sym_mfree(m_pool_s *mp, void *ptr, int size, char *name) { if (DEBUG_FLAGS & DEBUG_ALLOC) - printf ("freeing %-10s[%4d] @%p.\n", name, size, ptr); + kprintf ("freeing %-10s[%4d] @%p.\n", name, size, ptr); ___sym_mfree(mp, ptr, size); @@ -873,7 +873,7 @@ static m_addr_t __vtobus(bus_dma_tag_t dev_dmat, void *m) static void sym_printb_hex (u_char *p, int n) { while (n-- > 0) - printf (" %x", *p++); + kprintf (" %x", *p++); } /* @@ -881,9 +881,9 @@ static void sym_printb_hex (u_char *p, int n) */ static void sym_printl_hex (char *label, u_char *p, int n) { - printf ("%s", label); + kprintf ("%s", label); sym_printb_hex (p, n); - printf (".\n"); + kprintf (".\n"); } /* @@ -2208,7 +2208,7 @@ static void sym_fw_bind_script (hcb_p np, u32 *start, int len) * command. */ if (opcode == 0) { - printf ("%s: ERROR0 IN SCRIPT at %d.\n", + kprintf ("%s: ERROR0 IN SCRIPT at %d.\n", sym_name(np), (int) (cur-start)); MDELAY (10000); ++cur; @@ -2225,7 +2225,7 @@ static void sym_fw_bind_script (hcb_p np, u32 *start, int len) } if (DEBUG_FLAGS & DEBUG_SCRIPT) - printf ("%d: <%x>\n", (int) (cur-start), + kprintf ("%d: <%x>\n", (int) (cur-start), (unsigned)opcode); /* @@ -2252,7 +2252,7 @@ static void sym_fw_bind_script (hcb_p np, u32 *start, int len) tmp1 = cur[1]; tmp2 = cur[2]; if ((tmp1 ^ tmp2) & 3) { - printf ("%s: ERROR1 IN SCRIPT at %d.\n", + kprintf ("%s: ERROR1 IN SCRIPT at %d.\n", sym_name(np), (int) (cur-start)); MDELAY (10000); } @@ -2478,12 +2478,12 @@ static int sym_read_nvram (hcb_p np, struct sym_nvram *nvp); */ static void PRINT_TARGET (hcb_p np, int target) { - printf ("%s:%d:", sym_name(np), target); + kprintf ("%s:%d:", sym_name(np), target); } static void PRINT_LUN(hcb_p np, int target, int lun) { - printf ("%s:%d:%d:", sym_name(np), target, lun); + kprintf ("%s:%d:%d:", sym_name(np), target, lun); } static void PRINT_ADDR (ccb_p cp) @@ -2628,13 +2628,13 @@ static void sym_print_targets_flag(hcb_p np, int mask, char *msg) continue; if (np->target[i].usrflags & mask) { if (!cnt++) - printf("%s: %s disabled for targets", + kprintf("%s: %s disabled for targets", sym_name(np), msg); - printf(" %d", i); + kprintf(" %d", i); } } if (cnt) - printf(".\n"); + kprintf(".\n"); } /* @@ -2954,7 +2954,7 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram) * Let user know about the settings. */ i = nvram->type; - printf("%s: %s NVRAM, ID %d, Fast-%d, %s, %s\n", sym_name(np), + kprintf("%s: %s NVRAM, ID %d, Fast-%d, %s, %s\n", sym_name(np), i == SYM_SYMBIOS_NVRAM ? "Symbios" : (i == SYM_TEKRAM_NVRAM ? "Tekram" : "No"), np->myaddr, @@ -2967,25 +2967,25 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram) * Tell him more on demand. */ if (sym_verbose) { - printf("%s: %s IRQ line driver%s\n", + kprintf("%s: %s IRQ line driver%s\n", sym_name(np), np->rv_dcntl & IRQM ? "totem pole" : "open drain", np->ram_ba ? ", using on-chip SRAM" : ""); - printf("%s: using %s firmware.\n", sym_name(np), np->fw_name); + kprintf("%s: using %s firmware.\n", sym_name(np), np->fw_name); if (np->features & FE_NOPM) - printf("%s: handling phase mismatch from SCRIPTS.\n", + kprintf("%s: handling phase mismatch from SCRIPTS.\n", sym_name(np)); } /* * And still more. */ if (sym_verbose > 1) { - printf ("%s: initial SCNTL3/DMODE/DCNTL/CTEST3/4/5 = " + kprintf ("%s: initial SCNTL3/DMODE/DCNTL/CTEST3/4/5 = " "(hex) %02x/%02x/%02x/%02x/%02x/%02x\n", sym_name(np), np->sv_scntl3, np->sv_dmode, np->sv_dcntl, np->sv_ctest3, np->sv_ctest4, np->sv_ctest5); - printf ("%s: final SCNTL3/DMODE/DCNTL/CTEST3/4/5 = " + kprintf ("%s: final SCNTL3/DMODE/DCNTL/CTEST3/4/5 = " "(hex) %02x/%02x/%02x/%02x/%02x/%02x\n", sym_name(np), np->rv_scntl3, np->rv_dmode, np->rv_dcntl, np->rv_ctest3, np->rv_ctest4, np->rv_ctest5); @@ -3116,7 +3116,7 @@ static void sym_put_start_queue(hcb_p np, ccb_p cp) np->squeueput = qidx; if (DEBUG_FLAGS & DEBUG_QUEUE) - printf ("%s: queuepos=%d.\n", sym_name (np), np->squeueput); + kprintf ("%s: queuepos=%d.\n", sym_name (np), np->squeueput); /* * Script processor may be waiting for reselect. @@ -3171,7 +3171,7 @@ static void sym_soft_reset (hcb_p np) } } if (!i) - printf("%s: unable to abort current chip operation.\n", + kprintf("%s: unable to abort current chip operation.\n", sym_name(np)); sym_chip_reset (np); } @@ -3222,9 +3222,9 @@ static int sym_reset_scsi_bus(hcb_p np, int enab_int) term &= 0x3ffff; if (term != (2<<7)) { - printf("%s: suspicious SCSI data while resetting the BUS.\n", + kprintf("%s: suspicious SCSI data while resetting the BUS.\n", sym_name(np)); - printf("%s: %sdp0,d7-0,rst,req,ack,bsy,sel,atn,msg,c/d,i/o = " + kprintf("%s: %sdp0,d7-0,rst,req,ack,bsy,sel,atn,msg,c/d,i/o = " "0x%lx, expecting 0x%lx\n", sym_name(np), (np->features & FE_WIDE) ? "dp1,d15-8," : "", @@ -3268,7 +3268,7 @@ static int sym_wakeup_done (hcb_p np) ++n; } else - printf ("%s: bad DSA (%x) in done queue.\n", + kprintf ("%s: bad DSA (%x) in done queue.\n", sym_name(np), (u_int) dsa); } np->dqueueget = i; @@ -3488,7 +3488,7 @@ static void sym_init (hcb_p np, int reason) */ if (np->ram_ba) { if (sym_verbose > 1) - printf ("%s: Downloading SCSI SCRIPTS.\n", + kprintf ("%s: Downloading SCSI SCRIPTS.\n", sym_name(np)); if (np->ram_ws == 8192) { OUTRAM_OFF(4096, np->scriptb0, np->scriptb_sz); @@ -3781,7 +3781,7 @@ static void sym_settrans(hcb_p np, ccb_p cp, u_char dt, u_char ofs, uval = tp->head.uval; #if 0 - printf("XXXX sval=%x wval=%x uval=%x (%x)\n", + kprintf("XXXX sval=%x wval=%x uval=%x (%x)\n", sval, wval, uval, np->rv_scntl3); #endif /* @@ -3928,7 +3928,7 @@ static void sym_log_hard_error(hcb_p np, u_short sist, u_char dstat) script_name = "mem"; } - printf ("%s:%d: ERROR (%x:%x) (%x-%x-%x) (%x/%x) @ (%s %x:%08x).\n", + kprintf ("%s:%d: ERROR (%x:%x) (%x-%x-%x) (%x/%x) @ (%s %x:%08x).\n", sym_name (np), (unsigned)INB (nc_sdid)&0x0f, dstat, sist, (unsigned)INB (nc_socl), (unsigned)INB (nc_sbcl), (unsigned)INB (nc_sbdl), (unsigned)INB (nc_sxfer), @@ -3937,14 +3937,14 @@ static void sym_log_hard_error(hcb_p np, u_short sist, u_char dstat) if (((script_ofs & 3) == 0) && (unsigned)script_ofs < script_size) { - printf ("%s: script cmd = %08x\n", sym_name(np), + kprintf ("%s: script cmd = %08x\n", sym_name(np), scr_to_cpu((int) *(u32 *)(script_base + script_ofs))); } - printf ("%s: regdump:", sym_name(np)); + kprintf ("%s: regdump:", sym_name(np)); for (i=0; i<24;i++) - printf (" %02x", (unsigned)INB_OFF(i)); - printf (".\n"); + kprintf (" %02x", (unsigned)INB_OFF(i)); + kprintf (".\n"); /* * PCI BUS error, read the PCI ststus register. @@ -3962,7 +3962,7 @@ static void sym_log_hard_error(hcb_p np, u_short sist, u_char dstat) #else pci_cfgwrite(np->pci_tag, PCIR_STATUS, pci_sts, 2); #endif - printf("%s: PCI STATUS = 0x%04x\n", + kprintf("%s: PCI STATUS = 0x%04x\n", sym_name(np), pci_sts & 0xf900); } } @@ -4048,7 +4048,7 @@ static void sym_intr1 (hcb_p np) if (istat & INTF) { OUTB (nc_istat, (istat & SIGP) | INTF | np->istat_sem); istat = INB (nc_istat); /* DUMMY READ */ - if (DEBUG_FLAGS & DEBUG_TINY) printf ("F "); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("F "); (void)sym_wakeup_done (np); }; @@ -4083,7 +4083,7 @@ static void sym_intr1 (hcb_p np) } while (istatc & (SIP|DIP)); if (DEBUG_FLAGS & DEBUG_TINY) - printf ("<%d|%x:%x|%x:%x>", + kprintf ("<%d|%x:%x|%x:%x>", (int)INB(nc_scr0), dstat,sist, (unsigned)INL(nc_dsp), @@ -4130,7 +4130,7 @@ static void sym_intr1 (hcb_p np) */ if (sist & RST) { xpt_print_path(np->path); - printf("SCSI BUS reset detected.\n"); + kprintf("SCSI BUS reset detected.\n"); sym_init (np, 1); return; }; @@ -4167,16 +4167,16 @@ unknown_int: * We just miss the cause of the interrupt. :( * Print a message. The timeout will do the real work. */ - printf( "%s: unknown interrupt(s) ignored, " + kprintf( "%s: unknown interrupt(s) ignored, " "ISTAT=0x%x DSTAT=0x%x SIST=0x%x\n", sym_name(np), istat, dstat, sist); } static void sym_intr(void *arg) { - if (DEBUG_FLAGS & DEBUG_TINY) printf ("["); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("["); sym_intr1((hcb_p) arg); - if (DEBUG_FLAGS & DEBUG_TINY) printf ("]"); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("]"); return; } @@ -4269,7 +4269,7 @@ void sym_int_sto (hcb_p np) { u32 dsp = INL (nc_dsp); - if (DEBUG_FLAGS & DEBUG_TINY) printf ("T"); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("T"); if (dsp == SCRIPTA_BA (np, wf_sel_done) + 8) sym_recover_scsi_int(np, HS_SEL_TIMEOUT); @@ -4282,7 +4282,7 @@ void sym_int_sto (hcb_p np) */ void sym_int_udc (hcb_p np) { - printf ("%s: unexpected disconnect\n", sym_name(np)); + kprintf ("%s: unexpected disconnect\n", sym_name(np)); sym_recover_scsi_int(np, HS_UNEXPECTED); } @@ -4304,7 +4304,7 @@ static void sym_int_sbmc (hcb_p np) * Notify user. */ xpt_print_path(np->path); - printf("SCSI BUS mode change from %s to %s.\n", + kprintf("SCSI BUS mode change from %s to %s.\n", sym_scsi_bus_mode(np->scsi_mode), sym_scsi_bus_mode(scsi_mode)); /* @@ -4349,7 +4349,7 @@ static void sym_int_par (hcb_p np, u_short sist) int phase = cmd & 7; ccb_p cp = sym_ccb_from_dsa(np, dsa); - printf("%s: SCSI parity error detected: SCR1=%d DBC=%x SBCL=%x\n", + kprintf("%s: SCSI parity error detected: SCR1=%d DBC=%x SBCL=%x\n", sym_name(np), hsts, dbc, sbcl); /* @@ -4509,7 +4509,7 @@ static void sym_int_ma (hcb_p np) * log the information */ if (DEBUG_FLAGS & (DEBUG_TINY|DEBUG_PHASE)) - printf ("P%x%x RL=%d D=%d ", cmd&7, INB(nc_sbcl)&7, + kprintf ("P%x%x RL=%d D=%d ", cmd&7, INB(nc_sbcl)&7, (unsigned) rest, (unsigned) delta); /* @@ -4533,18 +4533,18 @@ static void sym_int_ma (hcb_p np) * log the information */ if (DEBUG_FLAGS & DEBUG_PHASE) { - printf ("\nCP=%p DSP=%x NXT=%x VDSP=%p CMD=%x ", + kprintf ("\nCP=%p DSP=%x NXT=%x VDSP=%p CMD=%x ", cp, (unsigned)dsp, (unsigned)nxtdsp, vdsp, cmd); }; if (!vdsp) { - printf ("%s: interrupted SCRIPT address not found.\n", + kprintf ("%s: interrupted SCRIPT address not found.\n", sym_name (np)); goto reset_all; } if (!cp) { - printf ("%s: SCSI phase error fixup: CCB already dequeued.\n", + kprintf ("%s: SCSI phase error fixup: CCB already dequeued.\n", sym_name (np)); goto reset_all; } @@ -4564,7 +4564,7 @@ static void sym_int_ma (hcb_p np) }; if (DEBUG_FLAGS & DEBUG_PHASE) { - printf ("OCMD=%x\nTBLP=%p OLEN=%x OADR=%x\n", + kprintf ("OCMD=%x\nTBLP=%p OLEN=%x OADR=%x\n", (unsigned) (scr_to_cpu(vdsp[0]) >> 24), tblp, (unsigned) olen, @@ -4578,7 +4578,7 @@ static void sym_int_ma (hcb_p np) */ if (((cmd & 2) ? cmd : (cmd & ~4)) != (scr_to_cpu(vdsp[0]) >> 24)) { PRINT_ADDR(cp); - printf ("internal error: cmd=%02x != %02x=(vdsp[0] >> 24)\n", + kprintf ("internal error: cmd=%02x != %02x=(vdsp[0] >> 24)\n", (unsigned)cmd, (unsigned)scr_to_cpu(vdsp[0]) >> 24); goto reset_all; @@ -4589,7 +4589,7 @@ static void sym_int_ma (hcb_p np) */ if (cmd & 2) { PRINT_ADDR(cp); - printf ("phase change %x-%x %d@%08x resid=%d.\n", + kprintf ("phase change %x-%x %d@%08x resid=%d.\n", cmd&7, INB(nc_sbcl)&7, (unsigned)olen, (unsigned)oadr, (unsigned)rest); goto unexpected_phase; @@ -4675,7 +4675,7 @@ static void sym_int_ma (hcb_p np) if (DEBUG_FLAGS & DEBUG_PHASE) { PRINT_ADDR(cp); - printf ("PM %x %x %x / %x %x %x.\n", + kprintf ("PM %x %x %x / %x %x %x.\n", hflags0, hflags, newcmd, (unsigned)scr_to_cpu(pm->sg.addr), (unsigned)scr_to_cpu(pm->sg.size), @@ -4905,7 +4905,7 @@ static void sym_sir_bad_scsi_status(hcb_p np, int num, ccb_p cp) case S_QUEUE_FULL: if (sym_verbose >= 2) { PRINT_ADDR(cp); - printf (s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n"); + kprintf (s_status == S_BUSY ? "BUSY" : "QUEUE FULL\n"); } default: /* S_INT, S_INT_COND_MET, S_CONFLICT */ sym_complete_error (np, cp); @@ -5082,7 +5082,7 @@ sym_clear_tasks(hcb_p np, int cam_status, int target, int lun, int task) sym_set_cam_status(ccb, cam_status); ++i; #if 0 -printf("XXXX TASK @%p CLEARED\n", cp); +kprintf("XXXX TASK @%p CLEARED\n", cp); #endif } return i; @@ -5763,15 +5763,15 @@ static int sym_compute_residual(hcb_p np, ccb_p cp) static int sym_show_msg (u_char * msg) { u_char i; - printf ("%x",*msg); + kprintf ("%x",*msg); if (*msg==M_EXTENDED) { for (i=1;i<8;i++) { if (i-1>msg[1]) break; - printf ("-%x",msg[i]); + kprintf ("-%x",msg[i]); }; return (i+1); } else if ((*msg & 0xf0) == 0x20) { - printf ("-%x",msg[1]); + kprintf ("-%x",msg[1]); return (2); }; return (1); @@ -5781,10 +5781,10 @@ static void sym_print_msg (ccb_p cp, char *label, u_char *msg) { PRINT_ADDR(cp); if (label) - printf ("%s: ", label); + kprintf ("%s: ", label); (void) sym_show_msg (msg); - printf (".\n"); + kprintf (".\n"); } /* @@ -5880,7 +5880,7 @@ static void sym_sync_nego(hcb_p np, tcb_p tp, ccb_p cp) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp); - printf ("sdtr: ofs=%d per=%d div=%d fak=%d chg=%d.\n", + kprintf ("sdtr: ofs=%d per=%d div=%d fak=%d chg=%d.\n", ofs, per, div, fak, chg); } @@ -6005,7 +6005,7 @@ static void sym_ppr_nego(hcb_p np, tcb_p tp, ccb_p cp) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp); - printf ("ppr: " + kprintf ("ppr: " "dt=%x ofs=%d per=%d wide=%d div=%d fak=%d chg=%d.\n", dt, ofs, per, wide, div, fak, chg); } @@ -6105,7 +6105,7 @@ static void sym_wide_nego(hcb_p np, tcb_p tp, ccb_p cp) if (DEBUG_FLAGS & DEBUG_NEGO) { PRINT_ADDR(cp); - printf ("wdtr: wide=%d chg=%d.\n", wide, chg); + kprintf ("wdtr: wide=%d chg=%d.\n", wide, chg); } /* @@ -6228,7 +6228,7 @@ void sym_int_sir (hcb_p np) tcb_p tp = &np->target[target]; int tmp; - if (DEBUG_FLAGS & DEBUG_TINY) printf ("I#%d", num); + if (DEBUG_FLAGS & DEBUG_TINY) kprintf ("I#%d", num); switch (num) { /* @@ -6253,7 +6253,7 @@ void sym_int_sir (hcb_p np) * that. */ case SIR_SEL_ATN_NO_MSG_OUT: - printf ("%s:%d: No MSG OUT phase after selection with ATN.\n", + kprintf ("%s:%d: No MSG OUT phase after selection with ATN.\n", sym_name (np), target); goto out_stuck; /* @@ -6261,7 +6261,7 @@ void sym_int_sir (hcb_p np) * having reseleted the initiator. */ case SIR_RESEL_NO_MSG_IN: - printf ("%s:%d: No MSG IN phase after reselection.\n", + kprintf ("%s:%d: No MSG IN phase after reselection.\n", sym_name (np), target); goto out_stuck; /* @@ -6269,7 +6269,7 @@ void sym_int_sir (hcb_p np) * an IDENTIFY. */ case SIR_RESEL_NO_IDENTIFY: - printf ("%s:%d: No IDENTIFY after reselection.\n", + kprintf ("%s:%d: No IDENTIFY after reselection.\n", sym_name (np), target); goto out_stuck; /* @@ -6299,7 +6299,7 @@ void sym_int_sir (hcb_p np) case SIR_RESEL_ABORTED: np->lastmsg = np->msgout[0]; np->msgout[0] = M_NOOP; - printf ("%s:%d: message %x sent on bad reselection.\n", + kprintf ("%s:%d: message %x sent on bad reselection.\n", sym_name (np), target, np->lastmsg); goto out; /* @@ -6432,7 +6432,7 @@ void sym_int_sir (hcb_p np) sym_nego_rejected(np, tp, cp); else { PRINT_ADDR(cp); - printf ("M_REJECT received (%x:%x).\n", + kprintf ("M_REJECT received (%x:%x).\n", scr_to_cpu(np->lastmsg), np->msgout[0]); } goto out_clrack; @@ -6594,7 +6594,7 @@ static ccb_p sym_get_ccb (hcb_p np, u_char tn, u_char ln, u_char tag_order) if (DEBUG_FLAGS & DEBUG_TAGS) { PRINT_LUN(np, tn, ln); - printf ("ccb @%p using tag %d.\n", cp, tag); + kprintf ("ccb @%p using tag %d.\n", cp, tag); } out: @@ -6614,7 +6614,7 @@ static void sym_free_ccb (hcb_p np, ccb_p cp) if (DEBUG_FLAGS & DEBUG_TAGS) { PRINT_LUN(np, cp->target, cp->lun); - printf ("ccb @%p freeing tag %d.\n", cp, cp->tag); + kprintf ("ccb @%p freeing tag %d.\n", cp, cp->tag); } /* @@ -6963,7 +6963,7 @@ static int sym_regtest (hcb_p np) #else if ((data & 0xe2f0fffd) != 0x02000080) { #endif - printf ("CACHE TEST FAILED: reg dstat-sstat2 readback %x.\n", + kprintf ("CACHE TEST FAILED: reg dstat-sstat2 readback %x.\n", (unsigned) data); return (0x10); }; @@ -7008,7 +7008,7 @@ restart_test: if (INB(nc_istat) & (INTF|SIP|DIP)) break; if (i>=SYM_SNOOP_TIMEOUT) { - printf ("CACHE TEST FAILED: timeout.\n"); + kprintf ("CACHE TEST FAILED: timeout.\n"); return (0x20); }; /* @@ -7017,7 +7017,7 @@ restart_test: dstat = INB (nc_dstat); #if 1 /* Band aiding for broken hardwares that fail PCI parity */ if ((dstat & MDPE) && (np->rv_ctest4 & MPEE)) { - printf ("%s: PCI DATA PARITY ERROR DETECTED - " + kprintf ("%s: PCI DATA PARITY ERROR DETECTED - " "DISABLING MASTER DATA PARITY CHECKING.\n", sym_name(np)); np->rv_ctest4 &= ~MPEE; @@ -7025,7 +7025,7 @@ restart_test: } #endif if (dstat & (MDPE|BF|IID)) { - printf ("CACHE TEST FAILED: DMA error (dstat=0x%02x).", dstat); + kprintf ("CACHE TEST FAILED: DMA error (dstat=0x%02x).", dstat); return (0x80); } /* @@ -7043,8 +7043,8 @@ restart_test: * Check termination position. */ if (pc != SCRIPTB0_BA (np, snoopend)+8) { - printf ("CACHE TEST FAILED: script execution failed.\n"); - printf ("start=%08lx, pc=%08lx, end=%08lx\n", + kprintf ("CACHE TEST FAILED: script execution failed.\n"); + kprintf ("start=%08lx, pc=%08lx, end=%08lx\n", (u_long) SCRIPTB0_BA (np, snooptest), (u_long) pc, (u_long) SCRIPTB0_BA (np, snoopend) +8); return (0x40); @@ -7053,17 +7053,17 @@ restart_test: * Show results. */ if (host_wr != sym_rd) { - printf ("CACHE TEST FAILED: host wrote %d, chip read %d.\n", + kprintf ("CACHE TEST FAILED: host wrote %d, chip read %d.\n", (int) host_wr, (int) sym_rd); err |= 1; }; if (host_rd != sym_wr) { - printf ("CACHE TEST FAILED: chip wrote %d, host read %d.\n", + kprintf ("CACHE TEST FAILED: chip wrote %d, host read %d.\n", (int) sym_wr, (int) host_rd); err |= 2; }; if (sym_bk != sym_wr) { - printf ("CACHE TEST FAILED: chip wrote %d, read back %d.\n", + kprintf ("CACHE TEST FAILED: chip wrote %d, read back %d.\n", (int) sym_wr, (int) sym_bk); err |= 4; }; @@ -7103,7 +7103,7 @@ static void sym_selectclock(hcb_p np, u_char scntl3) } if (sym_verbose >= 2) - printf ("%s: enabling clock multiplier\n", sym_name(np)); + kprintf ("%s: enabling clock multiplier\n", sym_name(np)); OUTB(nc_stest1, DBLEN); /* Enable clock multiplier */ /* @@ -7115,7 +7115,7 @@ static void sym_selectclock(hcb_p np, u_char scntl3) while (!(INB(nc_stest4) & LCKFRQ) && --i > 0) UDELAY (20); if (!i) - printf("%s: the chip cannot lock the frequency\n", + kprintf("%s: the chip cannot lock the frequency\n", sym_name(np)); } else UDELAY (20); @@ -7171,7 +7171,7 @@ static unsigned getfreq (hcb_p np, int gen) f = ms ? ((1 << gen) * 4340) / ms : 0; if (sym_verbose >= 2) - printf ("%s: Delay (GEN=%d): %u msec, %u KHz\n", + kprintf ("%s: Delay (GEN=%d): %u msec, %u KHz\n", sym_name(np), gen, ms, f); return f; @@ -7214,7 +7214,7 @@ static void sym_getclock (hcb_p np, int mult) */ if (mult > 1 && (stest1 & (DBLEN+DBLSEL)) == DBLEN+DBLSEL) { if (sym_verbose >= 2) - printf ("%s: clock multiplier found\n", sym_name(np)); + kprintf ("%s: clock multiplier found\n", sym_name(np)); np->multiplier = mult; } @@ -7228,7 +7228,7 @@ static void sym_getclock (hcb_p np, int mult) f1 = sym_getfreq (np); if (sym_verbose) - printf ("%s: chip clock is %uKHz\n", sym_name(np), f1); + kprintf ("%s: chip clock is %uKHz\n", sym_name(np), f1); if (f1 < 45000) f1 = 40000; else if (f1 < 55000) f1 = 50000; @@ -7236,7 +7236,7 @@ static void sym_getclock (hcb_p np, int mult) if (f1 < 80000 && mult > 1) { if (sym_verbose >= 2) - printf ("%s: clock multiplier assumed\n", + kprintf ("%s: clock multiplier assumed\n", sym_name(np)); np->multiplier = mult; } @@ -7286,23 +7286,23 @@ static void sym_print_xerr(ccb_p cp, int x_status) { if (x_status & XE_PARITY_ERR) { PRINT_ADDR(cp); - printf ("unrecovered SCSI parity error.\n"); + kprintf ("unrecovered SCSI parity error.\n"); } if (x_status & XE_EXTRA_DATA) { PRINT_ADDR(cp); - printf ("extraneous data discarded.\n"); + kprintf ("extraneous data discarded.\n"); } if (x_status & XE_BAD_PHASE) { PRINT_ADDR(cp); - printf ("illegal scsi phase (4/5).\n"); + kprintf ("illegal scsi phase (4/5).\n"); } if (x_status & XE_SODL_UNRUN) { PRINT_ADDR(cp); - printf ("ODD transfer in DATA OUT phase.\n"); + kprintf ("ODD transfer in DATA OUT phase.\n"); } if (x_status & XE_SWIDE_OVRUN) { PRINT_ADDR(cp); - printf ("ODD transfer in DATA IN phase.\n"); + kprintf ("ODD transfer in DATA IN phase.\n"); } } @@ -7348,7 +7348,7 @@ static void sym_complete_error (hcb_p np, ccb_p cp) return; if (DEBUG_FLAGS & (DEBUG_TINY|DEBUG_RESULT)) { - printf ("CCB=%lx STAT=%x/%x/%x DEV=%d/%d\n", (unsigned long)cp, + kprintf ("CCB=%lx STAT=%x/%x/%x DEV=%d/%d\n", (unsigned long)cp, cp->host_status, cp->ssss_status, cp->host_flags, cp->target, cp->lun); MDELAY(100); @@ -7431,7 +7431,7 @@ static void sym_complete_error (hcb_p np, ccb_p cp) else { /* Extended error */ if (sym_verbose) { PRINT_ADDR(cp); - printf ("COMMAND FAILED (%x %x %x).\n", + kprintf ("COMMAND FAILED (%x %x %x).\n", cp->host_status, cp->ssss_status, cp->xerr_status); } @@ -8155,7 +8155,7 @@ sym_fast_scatter_sg_physical(hcb_p np, ccb_p cp, data->addr = cpu_to_scr(psegs2->ds_addr); data->size = cpu_to_scr(psegs2->ds_len); if (DEBUG_FLAGS & DEBUG_SCATTER) { - printf ("%s scatter: paddr=%lx len=%ld\n", + kprintf ("%s scatter: paddr=%lx len=%ld\n", sym_name(np), (long) psegs2->ds_addr, (long) psegs2->ds_len); } @@ -8283,7 +8283,7 @@ sym_scatter_virtual(hcb_p np, ccb_p cp, vm_offset_t vaddr, vm_size_t len) pn = pe - n; } if (DEBUG_FLAGS & DEBUG_SCATTER) { - printf ("%s scatter: va=%lx pa=%lx siz=%ld\n", + kprintf ("%s scatter: va=%lx pa=%lx siz=%ld\n", sym_name(np), pn, (u_long) vtobus(pn), k); } cp->phys.data[s].addr = cpu_to_scr(vtobus(pn)); @@ -8357,7 +8357,7 @@ sym_scatter_sg_physical(hcb_p np, ccb_p cp, bus_dma_segment_t *psegs, int nsegs) pn = ps; k = pe - pn; if (DEBUG_FLAGS & DEBUG_SCATTER) { - printf ("%s scatter: paddr=%lx len=%ld\n", + kprintf ("%s scatter: paddr=%lx len=%ld\n", sym_name(np), pn, k); } cp->phys.data[s].addr = cpu_to_scr(pn); @@ -8608,7 +8608,7 @@ static void sym_action2(struct cam_sim *sim, union ccb *ccb) sym_reset_scsi_bus(np, 0); if (sym_verbose) { xpt_print_path(np->path); - printf("SCSI BUS reset delivered.\n"); + kprintf("SCSI BUS reset delivered.\n"); } sym_init (np, 1); sym_xpt_done2(np, ccb, CAM_REQ_CMP); @@ -9012,7 +9012,7 @@ sym_pci_attach(pcici_t pci_tag, int unit) { int err = sym_pci_attach2(pci_tag, unit); if (err) - printf("sym: failed to attach unit %d - err=%d.\n", unit, err); + kprintf("sym: failed to attach unit %d - err=%d.\n", unit, err); } static int sym_pci_attach2(pcici_t pci_tag, int unit) @@ -9178,7 +9178,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit) if ((command & PCIM_CMD_MEMEN) != 0) { vm_offset_t vaddr, paddr; if (!pci_map_mem(pci_tag, SYM_PCI_MMIO, &vaddr, &paddr)) { - printf("%s: failed to map MMIO window\n", sym_name(np)); + kprintf("%s: failed to map MMIO window\n", sym_name(np)); goto attach_failed; } np->mmio_va = vaddr; @@ -9222,7 +9222,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit) if ((command & PCI_COMMAND_IO_ENABLE) != 0) { pci_port_t io_port; if (!pci_map_port (pci_tag, SYM_PCI_IO, &io_port)) { - printf("%s: failed to map IO window\n", sym_name(np)); + kprintf("%s: failed to map IO window\n", sym_name(np)); goto attach_failed; } np->io_port = io_port; @@ -9259,7 +9259,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit) if (np->features & FE_64BIT) regs_id = SYM_PCI_RAM64; if (!pci_map_mem(pci_tag, regs_id, &vaddr, &paddr)) { - printf("%s: failed to map RAM window\n", sym_name(np)); + kprintf("%s: failed to map RAM window\n", sym_name(np)); goto attach_failed; } np->ram_va = vaddr; @@ -9302,7 +9302,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit) #ifdef FreeBSD_Bus_Io_Abstraction device_printf(dev, "PCI BUS clock seems too high: %u KHz.\n",i); #else - printf("%s: PCI BUS clock seems too high: %u KHz.\n", + kprintf("%s: PCI BUS clock seems too high: %u KHz.\n", sym_name(np), i); #endif @@ -9451,7 +9451,7 @@ sym_pci_attach2(pcici_t pci_tag, int unit) #ifdef FreeBSD_Bus_Io_Abstraction device_printf(dev, "CACHE INCORRECTLY CONFIGURED.\n"); #else - printf("%s: CACHE INCORRECTLY CONFIGURED.\n", sym_name(np)); + kprintf("%s: CACHE INCORRECTLY CONFIGURED.\n", sym_name(np)); #endif goto attach_failed; }; @@ -9599,7 +9599,7 @@ int sym_cam_attach(hcb_p np) #else err = 0; if (!pci_map_int (np->pci_tag, sym_intr, np)) { - printf("%s: failed to map interrupt\n", sym_name(np)); + kprintf("%s: failed to map interrupt\n", sym_name(np)); goto fail; } #endif @@ -9803,7 +9803,7 @@ static void sym_display_Symbios_nvram(hcb_p np, Symbios_nvram *nvram) int i; /* display Symbios nvram host data */ - printf("%s: HOST ID=%d%s%s%s%s%s%s\n", + kprintf("%s: HOST ID=%d%s%s%s%s%s%s\n", sym_name(np), nvram->host_id & 0x0f, (nvram->flags & SYMBIOS_SCAM_ENABLE) ? " SCAM" :"", (nvram->flags & SYMBIOS_PARITY_ENABLE) ? " PARITY" :"", @@ -9815,7 +9815,7 @@ static void sym_display_Symbios_nvram(hcb_p np, Symbios_nvram *nvram) /* display Symbios nvram drive data */ for (i = 0 ; i < 15 ; i++) { struct Symbios_target *tn = &nvram->target[i]; - printf("%s-%d:%s%s%s%s WIDTH=%d SYNC=%d TMO=%d\n", + kprintf("%s-%d:%s%s%s%s WIDTH=%d SYNC=%d TMO=%d\n", sym_name(np), i, (tn->flags & SYMBIOS_DISCONNECT_ENABLE) ? " DISC" : "", (tn->flags & SYMBIOS_SCAN_AT_BOOT_TIME) ? " SCAN_BOOT" : "", @@ -9848,7 +9848,7 @@ static void sym_display_Tekram_nvram(hcb_p np, Tekram_nvram *nvram) case 2: rem = " REMOVABLE=all"; break; } - printf("%s: HOST ID=%d%s%s%s%s%s%s%s%s%s BOOT DELAY=%d tags=%d\n", + kprintf("%s: HOST ID=%d%s%s%s%s%s%s%s%s%s BOOT DELAY=%d tags=%d\n", sym_name(np), nvram->host_id & 0x0f, (nvram->flags1 & SYMBIOS_SCAM_ENABLE) ? " SCAM" :"", (nvram->flags & TEKRAM_MORE_THAN_2_DRIVES) ? " >2DRIVES" :"", @@ -9866,7 +9866,7 @@ static void sym_display_Tekram_nvram(hcb_p np, Tekram_nvram *nvram) struct Tekram_target *tn = &nvram->target[i]; j = tn->sync_index & 0xf; sync = Tekram_sync[j]; - printf("%s-%d:%s%s%s%s%s%s PERIOD=%d\n", + kprintf("%s-%d:%s%s%s%s%s%s PERIOD=%d\n", sym_name(np), i, (tn->flags & TEKRAM_PARITY_CHECK) ? " PARITY" : "", (tn->flags & TEKRAM_SYNC_NEGO) ? " SYNC" : "", diff --git a/sys/dev/disk/trm/trm.c b/sys/dev/disk/trm/trm.c index b3542ecbfb..82ca2bc23d 100644 --- a/sys/dev/disk/trm/trm.c +++ b/sys/dev/disk/trm/trm.c @@ -45,7 +45,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/trm/trm.c,v 1.2.2.2 2002/12/19 20:34:45 cognet Exp $ - * $DragonFly: src/sys/dev/disk/trm/trm.c,v 1.13 2006/10/25 20:55:54 dillon Exp $ + * $DragonFly: src/sys/dev/disk/trm/trm.c,v 1.14 2006/12/22 23:26:17 swildner Exp $ */ /* @@ -104,7 +104,7 @@ #define PCI_DEVICEID_TRMS1040 0x03911DE1 #ifdef trm_DEBUG1 -#define TRM_DPRINTF(fmt, arg...) printf("trm: " fmt, ##arg) +#define TRM_DPRINTF(fmt, arg...) kprintf("trm: " fmt, ##arg) #else #define TRM_DPRINTF(fmt, arg...) {} #endif /* TRM_DEBUG */ @@ -3174,14 +3174,14 @@ trm_init(u_int16_t unit, device_t pci_config_id) pACB = (PACB) device_get_softc(pci_config_id); if (!pACB) { - printf("trm%d: cannot allocate ACB !\n", unit); + kprintf("trm%d: cannot allocate ACB !\n", unit); return (NULL); } bzero (pACB, sizeof (struct _ACB)); pACB->iores = bus_alloc_resource(pci_config_id, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE); if (pACB->iores == NULL) { - printf("trm_init: bus_alloc_resource failed!\n"); + kprintf("trm_init: bus_alloc_resource failed!\n"); return (NULL); } pACB->tag = rman_get_bustag(pACB->iores); @@ -3202,7 +3202,7 @@ trm_init(u_int16_t unit, device_t pci_config_id) trm_check_eeprom(&trm_eepromBuf[unit],pACB); trm_initACB(pACB, unit); if (trm_initAdapter(pACB, unit, pci_config_id)) { - printf("trm_initAdapter: initial ERROR\n"); + kprintf("trm_initAdapter: initial ERROR\n"); goto bad; } return (pACB); @@ -3231,7 +3231,7 @@ trm_attach(device_t pci_config_id) if (device_id == PCI_DEVICEID_TRMS1040) { if ((pACB=trm_init((u_int16_t) unit, pci_config_id)) == NULL) { - printf("trm%d: trm_init error!\n",unit); + kprintf("trm%d: trm_init error!\n",unit); return (ENXIO); } } else @@ -3249,12 +3249,12 @@ trm_attach(device_t pci_config_id) bus_setup_intr(pci_config_id, pACB->irq, 0, trm_Interrupt, pACB, &pACB->ih, NULL)) { - printf("trm%d: register Interrupt handler error!\n", unit); + kprintf("trm%d: register Interrupt handler error!\n", unit); goto bad; } device_Q = cam_simq_alloc(MAX_START_JOB); if (device_Q == NULL){ - printf("trm%d: device_Q == NULL !\n",unit); + kprintf("trm%d: device_Q == NULL !\n",unit); goto bad; } /* @@ -3293,11 +3293,11 @@ trm_attach(device_t pci_config_id) device_Q); cam_simq_release(device_Q); /* SIM allocate fault*/ if (pACB->psim == NULL) { - printf("trm%d: SIM allocate fault !\n",unit); + kprintf("trm%d: SIM allocate fault !\n",unit); goto bad; } if (xpt_bus_register(pACB->psim, 0) != CAM_SUCCESS) { - printf("trm%d: xpt_bus_register fault !\n",unit); + kprintf("trm%d: xpt_bus_register fault !\n",unit); goto bad; } if (xpt_create_path(&pACB->ppath, @@ -3305,7 +3305,7 @@ trm_attach(device_t pci_config_id) cam_sim_path(pACB->psim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - printf("trm%d: xpt_create_path fault !\n",unit); + kprintf("trm%d: xpt_create_path fault !\n",unit); xpt_bus_deregister(cam_sim_path(pACB->psim)); goto bad; /* diff --git a/sys/dev/disk/vn/vn.c b/sys/dev/disk/vn/vn.c index 38229a2a8e..fc1bf4c821 100644 --- a/sys/dev/disk/vn/vn.c +++ b/sys/dev/disk/vn/vn.c @@ -39,7 +39,7 @@ * * from: @(#)vn.c 8.6 (Berkeley) 4/1/94 * $FreeBSD: src/sys/dev/vn/vn.c,v 1.105.2.4 2001/11/18 07:11:00 dillon Exp $ - * $DragonFly: src/sys/dev/disk/vn/vn.c,v 1.28 2006/09/10 01:26:34 dillon Exp $ + * $DragonFly: src/sys/dev/disk/vn/vn.c,v 1.29 2006/12/22 23:26:17 swildner Exp $ */ /* @@ -227,7 +227,7 @@ vnopen(struct dev_open_args *ap) return (EACCES); IFOPT(vn, VN_FOLLOW) - printf("vnopen(%s, 0x%x, 0x%x)\n", + kprintf("vnopen(%s, 0x%x, 0x%x)\n", devtoname(dev), ap->a_oflags, ap->a_devtype); /* @@ -286,7 +286,7 @@ vnstrategy(struct dev_strategy_args *ap) bp = bio->bio_buf; IFOPT(vn, VN_DEBUG) - printf("vnstrategy(%p): unit %d\n", bp, unit); + kprintf("vnstrategy(%p): unit %d\n", bp, unit); if ((vn->sc_flags & VNF_INITED) == 0) { bp->b_error = ENXIO; @@ -440,7 +440,7 @@ vnioctl(struct dev_ioctl_args *ap) vn = dev->si_drv1; IFOPT(vn,VN_FOLLOW) { - printf("vnioctl(%s, 0x%lx, %p, 0x%x): unit %d\n", + kprintf("vnioctl(%s, 0x%lx, %p, 0x%x): unit %d\n", devtoname(dev), ap->a_cmd, ap->a_data, ap->a_fflag, dkunit(dev)); } @@ -500,7 +500,7 @@ vnioctl(struct dev_ioctl_args *ap) */ vnclear(vn); IFOPT(vn, VN_FOLLOW) - printf("vnioctl: CLRed\n"); + kprintf("vnioctl: CLRed\n"); break; case VNIOCGSET: @@ -604,7 +604,7 @@ vniocattach_file(struct vn_softc *vn, struct vn_ioctl *vio, cdev_t dev, vnclear(vn); } IFOPT(vn, VN_FOLLOW) - printf("vnioctl: SET vp %p size %x blks\n", + kprintf("vnioctl: SET vp %p size %x blks\n", vn->sc_vp, vn->sc_size); done: nlookup_done(&nd); @@ -671,7 +671,7 @@ vniocattach_swap(struct vn_softc *vn, struct vn_ioctl *vio, cdev_t dev, } if (error == 0) { IFOPT(vn, VN_FOLLOW) { - printf("vnioctl: SET vp %p size %x\n", + kprintf("vnioctl: SET vp %p size %x\n", vn->sc_vp, vn->sc_size); } } @@ -731,7 +731,7 @@ void vnclear(struct vn_softc *vn) { IFOPT(vn, VN_FOLLOW) - printf("vnclear(%p): vp=%p\n", vn, vn->sc_vp); + kprintf("vnclear(%p): vp=%p\n", vn, vn->sc_vp); if (vn->sc_slices != NULL) dsgone(&vn->sc_slices); vn->sc_flags &= ~VNF_INITED; diff --git a/sys/dev/disk/vpo/immio.c b/sys/dev/disk/vpo/immio.c index 64da805a81..4cd7953f9c 100644 --- a/sys/dev/disk/vpo/immio.c +++ b/sys/dev/disk/vpo/immio.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/immio.c,v 1.10.2.3 2001/10/02 05:27:20 nsouch Exp $ - * $DragonFly: src/sys/dev/disk/vpo/immio.c,v 1.6 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/vpo/immio.c,v 1.7 2006/12/22 23:26:17 swildner Exp $ * */ @@ -297,7 +297,7 @@ imm_disconnect(struct vpoio_data *vpo, int *connected, int release_bus) if ((s1 != (char)0xb8 || s2 != (char)0x18 || s3 != (char)0x38)) { if (bootverbose) - printf("imm%d: (disconnect) s1=0x%x s2=0x%x, s3=0x%x\n", + kprintf("imm%d: (disconnect) s1=0x%x s2=0x%x, s3=0x%x\n", vpo->vpo_unit, s1 & 0xff, s2 & 0xff, s3 & 0xff); if (connected) *connected = VP0_ECONNECT; @@ -350,7 +350,7 @@ imm_connect(struct vpoio_data *vpo, int how, int *disconnected, int request_bus) if ((s1 != (char)0xb8 || s2 != (char)0x18 || s3 != (char)0x30)) { if (bootverbose) - printf("imm%d: (connect) s1=0x%x s2=0x%x, s3=0x%x\n", + kprintf("imm%d: (connect) s1=0x%x s2=0x%x, s3=0x%x\n", vpo->vpo_unit, s1 & 0xff, s2 & 0xff, s3 & 0xff); if (disconnected) *disconnected = VP0_ECONNECT; @@ -396,7 +396,7 @@ imm_detect(struct vpoio_data *vpo) goto error; vpo->vpo_mode_found = VP0_MODE_NIBBLE; } else { - printf("imm%d: NIBBLE mode unavailable!\n", vpo->vpo_unit); + kprintf("imm%d: NIBBLE mode unavailable!\n", vpo->vpo_unit); goto error; } } else { @@ -417,7 +417,7 @@ imm_detect(struct vpoio_data *vpo) if (error) { if (bootverbose) - printf("imm%d: can't disconnect from the drive\n", + kprintf("imm%d: can't disconnect from the drive\n", vpo->vpo_unit); goto error; } @@ -607,17 +607,17 @@ imm_attach(struct vpoio_data *vpo) case VP0_MODE_EPP: ppb_MS_GET_init(ppbus, vpo->vpo_dev, epp17_instr); ppb_MS_PUT_init(ppbus, vpo->vpo_dev, epp17_outstr); - printf("imm%d: EPP mode\n", vpo->vpo_unit); + kprintf("imm%d: EPP mode\n", vpo->vpo_unit); break; case VP0_MODE_PS2: ppb_MS_GET_init(ppbus, vpo->vpo_dev, ps2_inbyte_submicroseq); ppb_MS_PUT_init(ppbus, vpo->vpo_dev, spp_outbyte_submicroseq); - printf("imm%d: PS2 mode\n", vpo->vpo_unit); + kprintf("imm%d: PS2 mode\n", vpo->vpo_unit); break; case VP0_MODE_NIBBLE: ppb_MS_GET_init(ppbus, vpo->vpo_dev, vpo->vpo_nibble_inbyte_msq); ppb_MS_PUT_init(ppbus, vpo->vpo_dev, spp_outbyte_submicroseq); - printf("imm%d: NIBBLE mode\n", vpo->vpo_unit); + kprintf("imm%d: NIBBLE mode\n", vpo->vpo_unit); break; default: panic("imm: unknown mode %d", vpo->vpo_mode_found); diff --git a/sys/dev/disk/vpo/vpo.c b/sys/dev/disk/vpo/vpo.c index a1e1368089..e783b16634 100644 --- a/sys/dev/disk/vpo/vpo.c +++ b/sys/dev/disk/vpo/vpo.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/vpo.c,v 1.20.2.1 2000/05/07 21:08:18 n_hibma Exp $ - * $DragonFly: src/sys/dev/disk/vpo/vpo.c,v 1.8 2006/12/05 23:31:56 dillon Exp $ + * $DragonFly: src/sys/dev/disk/vpo/vpo.c,v 1.9 2006/12/22 23:26:17 swildner Exp $ */ #include @@ -229,14 +229,14 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) } #ifdef VP0_DEBUG - printf("vpo_do_scsi = %d, status = 0x%x, count = %d, vpo_error = %d\n", + kprintf("vpo_do_scsi = %d, status = 0x%x, count = %d, vpo_error = %d\n", error, vpo->vpo_stat, vpo->vpo_count, vpo->vpo_error); /* dump of command */ for (i=0; icdb_len; i++) - printf("%x ", ((char *)&csio->cdb_io.cdb_bytes)[i]); + kprintf("%x ", ((char *)&csio->cdb_io.cdb_bytes)[i]); - printf("\n"); + kprintf("\n"); #endif if (error) { @@ -248,7 +248,7 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) /* if a timeout occured, no sense */ if (vpo->vpo_error) { if (vpo->vpo_error != VP0_ESELECT_TIMEOUT) - printf("vpo%d: VP0 error/timeout (%d)\n", + kprintf("vpo%d: VP0 error/timeout (%d)\n", vpo->vpo_unit, vpo->vpo_error); csio->ccb_h.status = CAM_CMD_TIMEOUT; @@ -286,7 +286,7 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) #ifdef VP0_DEBUG - printf("(sense) vpo_do_scsi = %d, status = 0x%x, count = %d, vpo_error = %d\n", + kprintf("(sense) vpo_do_scsi = %d, status = 0x%x, count = %d, vpo_error = %d\n", error, vpo->vpo_sense.stat, vpo->vpo_sense.count, vpo->vpo_error); #endif @@ -298,10 +298,10 @@ vpo_intr(struct vpo_data *vpo, struct ccb_scsiio *csio) #ifdef VP0_DEBUG /* dump of sense info */ - printf("(sense) "); + kprintf("(sense) "); for (i=0; ivpo_sense.count; i++) - printf("%x ", ((char *)&csio->sense_data)[i]); - printf("\n"); + kprintf("%x ", ((char *)&csio->sense_data)[i]); + kprintf("\n"); #endif } else { @@ -339,7 +339,7 @@ vpo_action(struct cam_sim *sim, union ccb *ccb) csio = &ccb->csio; #ifdef VP0_DEBUG - printf("vpo%d: XPT_SCSI_IO (0x%x) request\n", + kprintf("vpo%d: XPT_SCSI_IO (0x%x) request\n", vpo->vpo_unit, csio->cdb_io.cdb_bytes[0]); #endif @@ -356,7 +356,7 @@ vpo_action(struct cam_sim *sim, union ccb *ccb) ccg = &ccb->ccg; #ifdef VP0_DEBUG - printf("vpo%d: XPT_CALC_GEOMETRY (bs=%d,vs=%d,c=%d,h=%d,spt=%d) request\n", + kprintf("vpo%d: XPT_CALC_GEOMETRY (bs=%d,vs=%d,c=%d,h=%d,spt=%d) request\n", vpo->vpo_unit, ccg->block_size, ccg->volume_size, @@ -378,7 +378,7 @@ vpo_action(struct cam_sim *sim, union ccb *ccb) { #ifdef VP0_DEBUG - printf("vpo%d: XPT_RESET_BUS request\n", vpo->vpo_unit); + kprintf("vpo%d: XPT_RESET_BUS request\n", vpo->vpo_unit); #endif if (vpo->vpo_isplus) { @@ -404,7 +404,7 @@ vpo_action(struct cam_sim *sim, union ccb *ccb) struct ccb_pathinq *cpi = &ccb->cpi; #ifdef VP0_DEBUG - printf("vpo%d: XPT_PATH_INQ request\n", vpo->vpo_unit); + kprintf("vpo%d: XPT_PATH_INQ request\n", vpo->vpo_unit); #endif cpi->version_num = 1; /* XXX??? */ cpi->hba_inquiry = 0; diff --git a/sys/dev/disk/vpo/vpoio.c b/sys/dev/disk/vpo/vpoio.c index a7887b3287..21ca87605b 100644 --- a/sys/dev/disk/vpo/vpoio.c +++ b/sys/dev/disk/vpo/vpoio.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/vpoio.c,v 1.10.2.3 2001/10/02 05:27:20 nsouch Exp $ - * $DragonFly: src/sys/dev/disk/vpo/vpoio.c,v 1.7 2006/09/05 03:48:10 dillon Exp $ + * $DragonFly: src/sys/dev/disk/vpo/vpoio.c,v 1.8 2006/12/22 23:26:17 swildner Exp $ * */ @@ -298,7 +298,7 @@ vpoio_connect(struct vpoio_data *vpo, int how) if ((error = ppb_request_bus(ppbus, vpo->vpo_dev, how))) { #ifdef VP0_DEBUG - printf("%s: can't request bus!\n", __func__); + kprintf("%s: can't request bus!\n", __func__); #endif return error; } @@ -402,7 +402,7 @@ vpoio_detect(struct vpoio_data *vpo) if (!vpoio_in_disk_mode(vpo)) { vpo->vpo_mode_found = VP0_MODE_UNDEFINED; if (bootverbose) - printf("vpo%d: can't connect to the drive\n", + kprintf("vpo%d: can't connect to the drive\n", vpo->vpo_unit); /* disconnect and release the bus */ @@ -423,7 +423,7 @@ vpoio_detect(struct vpoio_data *vpo) * may cause serious problem to the disk */ if (vpoio_in_disk_mode(vpo)) { if (bootverbose) - printf("vpo%d: can't disconnect from the drive\n", + kprintf("vpo%d: can't disconnect from the drive\n", vpo->vpo_unit); goto error; } @@ -617,17 +617,17 @@ vpoio_attach(struct vpoio_data *vpo) case VP0_MODE_EPP: ppb_MS_GET_init(ppbus, vpo->vpo_dev, epp17_instr_body); ppb_MS_PUT_init(ppbus, vpo->vpo_dev, epp17_outstr_body); - printf("vpo%d: EPP mode\n", vpo->vpo_unit); + kprintf("vpo%d: EPP mode\n", vpo->vpo_unit); break; case VP0_MODE_PS2: ppb_MS_GET_init(ppbus, vpo->vpo_dev, ps2_inbyte_submicroseq); ppb_MS_PUT_init(ppbus, vpo->vpo_dev, spp_outbyte_submicroseq); - printf("vpo%d: PS2 mode\n", vpo->vpo_unit); + kprintf("vpo%d: PS2 mode\n", vpo->vpo_unit); break; case VP0_MODE_NIBBLE: ppb_MS_GET_init(ppbus, vpo->vpo_dev, vpo->vpo_nibble_inbyte_msq); ppb_MS_PUT_init(ppbus, vpo->vpo_dev, spp_outbyte_submicroseq); - printf("vpo%d: NIBBLE mode\n", vpo->vpo_unit); + kprintf("vpo%d: NIBBLE mode\n", vpo->vpo_unit); break; default: panic("vpo: unknown mode %d", vpo->vpo_mode_found); @@ -650,7 +650,7 @@ vpoio_reset_bus(struct vpoio_data *vpo) if (vpoio_connect(vpo, PPB_WAIT|PPB_INTR) || !vpoio_in_disk_mode(vpo)) { #ifdef VP0_DEBUG - printf("%s: not in disk mode!\n", __func__); + kprintf("%s: not in disk mode!\n", __func__); #endif /* release ppbus */ vpoio_disconnect(vpo); diff --git a/sys/dev/disk/wt/wt.c b/sys/dev/disk/wt/wt.c index 39849cdf16..adb1ebb74f 100644 --- a/sys/dev/disk/wt/wt.c +++ b/sys/dev/disk/wt/wt.c @@ -21,7 +21,7 @@ * * Version 1.3, Thu Nov 11 12:09:13 MSK 1993 * $FreeBSD: src/sys/i386/isa/wt.c,v 1.57.2.1 2000/08/08 19:49:53 peter Exp $ - * $DragonFly: src/sys/dev/disk/wt/wt.c,v 1.18 2006/09/10 01:26:34 dillon Exp $ + * $DragonFly: src/sys/dev/disk/wt/wt.c,v 1.19 2006/12/22 23:26:17 swildner Exp $ * */ @@ -81,7 +81,7 @@ /* * Uncomment this to enable internal device tracing. */ -#define TRACE(s) /* printf s */ +#define TRACE(s) /* kprintf s */ /* * Wangtek controller ports @@ -209,7 +209,7 @@ wtprobe (struct isa_device *id) t->chan = id->id_drq; t->port = id->id_iobase; if (t->chan<1 || t->chan>3) { - printf ("wt%d: Bad drq=%d, should be 1..3\n", t->unit, t->chan); + kprintf ("wt%d: Bad drq=%d, should be 1..3\n", t->unit, t->chan); return (0); } @@ -252,10 +252,10 @@ wtattach (struct isa_device *id) id->id_intr = (inthand2_t *)wtintr; if (t->type == ARCHIVE) { - printf ("wt%d: type \n", t->unit); + kprintf ("wt%d: type \n", t->unit); outb (t->RDMAPORT, 0); /* reset dma */ } else - printf ("wt%d: type \n", t->unit); + kprintf ("wt%d: type \n", t->unit); t->flags = TPSTART; /* tape is rewound */ t->dens = -1; /* unknown density */ isa_dmainit(t->chan, 1024); @@ -323,7 +323,7 @@ wtopen (struct dev_open_args *ap) /* Check the status of the controller. */ if (t->error.err & TP_ILL) { - printf ("wt%d: invalid tape density\n", t->unit); + kprintf ("wt%d: invalid tape density\n", t->unit); return (ENODEV); } } @@ -942,7 +942,7 @@ wtsense (wtinfo_t *t, int verb, int ignor) else if (err & TP_NDT) msg = "No data detected"; else if (err & TP_ILL) msg = "Illegal command"; if (msg) - printf ("wt%d: %s\n", t->unit, msg); + kprintf ("wt%d: %s\n", t->unit, msg); return (0); } diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index bc4e56f89d..703a9b6985 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.10.2.1 2003/04/26 07:05:28 anholt Exp $ - * $DragonFly: src/sys/dev/drm/Attic/drm_os_freebsd.h,v 1.22 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/drm/Attic/drm_os_freebsd.h,v 1.23 2006/12/22 23:26:17 swildner Exp $ */ #include #include @@ -314,19 +314,19 @@ find_first_zero_bit(volatile void *p, int max) #define agp_memory void #define jiffies ticks - /* Macros to make printf easier */ + /* Macros to make kprintf easier */ #define DRM_ERROR(fmt, arg...) \ - printf("error: " "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ## arg) + kprintf("error: " "[" DRM_NAME ":%s] *ERROR* " fmt , __func__ , ## arg) #define DRM_MEM_ERROR(area, fmt, arg...) \ - printf("error: " "[" DRM_NAME ":%s:%s] *ERROR* " fmt , \ + kprintf("error: " "[" DRM_NAME ":%s:%s] *ERROR* " fmt , \ __func__, DRM(mem_stats)[area].name , ##arg) -#define DRM_INFO(fmt, arg...) printf("info: " "[" DRM_NAME "] " fmt , ## arg) +#define DRM_INFO(fmt, arg...) kprintf("info: " "[" DRM_NAME "] " fmt , ## arg) #if DRM_DEBUG_CODE #define DRM_DEBUG(fmt, arg...) \ do { \ if (DRM(flags) & DRM_FLAG_DEBUG) \ - printf("[" DRM_NAME ":%s] " fmt , __func__ , ## arg); \ + kprintf("[" DRM_NAME ":%s] " fmt , __func__ , ## arg); \ } while (0) #else #define DRM_DEBUG(fmt, arg...) do { } while (0) diff --git a/sys/dev/misc/atkbdc_layer/atkbdc_isa.c b/sys/dev/misc/atkbdc_layer/atkbdc_isa.c index 93a46fed41..cb0d52e322 100644 --- a/sys/dev/misc/atkbdc_layer/atkbdc_isa.c +++ b/sys/dev/misc/atkbdc_layer/atkbdc_isa.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/isa/atkbdc_isa.c,v 1.14.2.1 2000/03/31 12:52:05 yokota Exp $ - * $DragonFly: src/sys/dev/misc/atkbdc_layer/atkbdc_isa.c,v 1.6 2006/10/25 20:55:54 dillon Exp $ + * $DragonFly: src/sys/dev/misc/atkbdc_layer/atkbdc_isa.c,v 1.7 2006/12/22 23:26:17 swildner Exp $ */ #include "opt_kbd.h" @@ -241,9 +241,9 @@ atkbdc_print_child(device_t bus, device_t dev) retval += bus_print_child_header(bus, dev); if (kbdcdev->flags != 0) - retval += printf(" flags 0x%x", kbdcdev->flags); + retval += kprintf(" flags 0x%x", kbdcdev->flags); if (kbdcdev->irq != -1) - retval += printf(" irq %d", kbdcdev->irq); + retval += kprintf(" irq %d", kbdcdev->irq); retval += bus_print_child_footer(bus, dev); return (retval); diff --git a/sys/dev/misc/dcons/dcons_crom.c b/sys/dev/misc/dcons/dcons_crom.c index 6666585f83..47ec373f35 100644 --- a/sys/dev/misc/dcons/dcons_crom.c +++ b/sys/dev/misc/dcons/dcons_crom.c @@ -33,7 +33,7 @@ * * $Id: dcons_crom.c,v 1.8 2003/10/23 15:47:21 simokawa Exp $ * $FreeBSD: src/sys/dev/dcons/dcons_crom.c,v 1.5 2004/10/13 05:38:42 simokawa Exp $ - * $DragonFly: src/sys/dev/misc/dcons/dcons_crom.c,v 1.4 2006/10/25 20:55:54 dillon Exp $ + * $DragonFly: src/sys/dev/misc/dcons/dcons_crom.c,v 1.5 2006/12/22 23:26:17 swildner Exp $ */ #include @@ -129,7 +129,7 @@ dmamap_cb(void *arg, bus_dma_segment_t *segments, int seg, int error) struct dcons_crom_softc *sc; if (error) - printf("dcons_dmamap_cb: error=%d\n", error); + kprintf("dcons_dmamap_cb: error=%d\n", error); sc = (struct dcons_crom_softc *)arg; sc->bus_addr = segments[0].ds_addr; @@ -161,7 +161,7 @@ static int dcons_crom_attach(device_t dev) { #ifdef NEED_NEW_DRIVER - printf("dcons_crom: you need newer firewire driver\n"); + kprintf("dcons_crom: you need newer firewire driver\n"); return (-1); #else struct dcons_crom_softc *sc; diff --git a/sys/dev/misc/dcons/dcons_os.c b/sys/dev/misc/dcons/dcons_os.c index 187b2a2938..69b87ec16e 100644 --- a/sys/dev/misc/dcons/dcons_os.c +++ b/sys/dev/misc/dcons/dcons_os.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.4 2004/10/24 12:41:04 simokawa Exp $ - * $DragonFly: src/sys/dev/misc/dcons/dcons_os.c,v 1.8 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/misc/dcons/dcons_os.c,v 1.9 2006/12/22 23:26:17 swildner Exp $ */ #include @@ -605,7 +605,7 @@ dcons_detach(int port) tp = ((DEV)dc->dev)->si_tty; if (tp->t_state & TS_ISOPEN) { - printf("dcons: still opened\n"); + kprintf("dcons: still opened\n"); #if __FreeBSD_version < 502113 (*linesw[tp->t_line].l_close)(tp, 0); tp->t_gen++; @@ -650,7 +650,7 @@ dcons_modevent(module_t mode, int type, void *data) #endif break; case MOD_UNLOAD: - printf("dcons: unload\n"); + kprintf("dcons: unload\n"); callout_stop(&dcons_callout); #if __FreeBSD_version < 502122 #if DDB && DCONS_FORCE_GDB diff --git a/sys/dev/misc/gpib/gpib.c b/sys/dev/misc/gpib/gpib.c index 1a20bd55e1..366294c3b2 100644 --- a/sys/dev/misc/gpib/gpib.c +++ b/sys/dev/misc/gpib/gpib.c @@ -17,7 +17,7 @@ * all derivative works or modified versions. * * $FreeBSD: src/sys/i386/isa/gpib.c,v 1.29 2000/01/29 16:17:32 peter Exp $ - * $DragonFly: src/sys/dev/misc/gpib/gpib.c,v 1.13 2006/09/10 01:26:34 dillon Exp $ + * $DragonFly: src/sys/dev/misc/gpib/gpib.c,v 1.14 2006/12/22 23:26:17 swildner Exp $ * */ /*Please read the README file for usage information*/ @@ -119,11 +119,11 @@ gpattach(struct isa_device *isdp) sc->sc_unit = isdp->id_unit; if (sc->sc_type==3) - printf ("gp%d: type AT-GPIB/TNT\n",sc->sc_unit); + kprintf ("gp%d: type AT-GPIB/TNT\n",sc->sc_unit); if (sc->sc_type==2) - printf ("gp%d: type AT-GPIB chip NAT4882B\n",sc->sc_unit); + kprintf ("gp%d: type AT-GPIB chip NAT4882B\n",sc->sc_unit); if (sc->sc_type==1) - printf ("gp%d: type AT-GPIB chip NAT4882A\n",sc->sc_unit); + kprintf ("gp%d: type AT-GPIB chip NAT4882A\n",sc->sc_unit); sc->sc_flags |=ATTACHED; dev_ops_add(&gp_ops, -1, sc->sc_unit); @@ -270,7 +270,7 @@ if (oldcount==2){ outb(CDOR,oldbytes[1]); else { outb (CDOR,13); /*Send a CR.. we've got trouble*/ - printf("gpib: Warning: gpclose called with nothing left in buffer\n"); + kprintf("gpib: Warning: gpclose called with nothing left in buffer\n"); } } @@ -429,29 +429,29 @@ gpioctl(struct dev_ioctl_args *ap) /*Just in case you want a dump of the registers...*/ static void showregs() { - printf ("NAT4882:\n"); - printf ("ISR1=%X\t",inb(ISR1)); - printf ("ISR2=%X\t",inb(ISR2)); - printf ("SPSR=%X\t",inb(SPSR)); - printf ("KSR =%X\t",inb(KSR)); - printf ("ADSR=%X\t",inb(ADSR)); - printf ("CPTR=%X\t",inb(CPTR)); - printf ("SASR=%X\t",inb(SASR)); - printf ("ADR0=%X\t",inb(ADR0)); - printf ("ISR0=%X\t",inb(ISR0)); - printf ("ADR1=%X\t",inb(ADR1)); - printf ("BSR =%X\n",inb(BSR)); - - printf ("Turbo488\n"); - printf ("STS1=%X ",inb(STS1)); - printf ("STS2=%X ",inb(STS2)); - printf ("ISR3=%X ",inb(ISR3)); - printf ("CNT0=%X ",inb(CNT0)); - printf ("CNT1=%X ",inb(CNT1)); - printf ("CNT2=%X ",inb(CNT2)); - printf ("CNT3=%X ",inb(CNT3)); - printf ("IMR3=%X ",inb(IMR3)); - printf ("TIMER=%X\n",inb(TIMER)); + kprintf ("NAT4882:\n"); + kprintf ("ISR1=%X\t",inb(ISR1)); + kprintf ("ISR2=%X\t",inb(ISR2)); + kprintf ("SPSR=%X\t",inb(SPSR)); + kprintf ("KSR =%X\t",inb(KSR)); + kprintf ("ADSR=%X\t",inb(ADSR)); + kprintf ("CPTR=%X\t",inb(CPTR)); + kprintf ("SASR=%X\t",inb(SASR)); + kprintf ("ADR0=%X\t",inb(ADR0)); + kprintf ("ISR0=%X\t",inb(ISR0)); + kprintf ("ADR1=%X\t",inb(ADR1)); + kprintf ("BSR =%X\n",inb(BSR)); + + kprintf ("Turbo488\n"); + kprintf ("STS1=%X ",inb(STS1)); + kprintf ("STS2=%X ",inb(STS2)); + kprintf ("ISR3=%X ",inb(ISR3)); + kprintf ("CNT0=%X ",inb(CNT0)); + kprintf ("CNT1=%X ",inb(CNT1)); + kprintf ("CNT2=%X ",inb(CNT2)); + kprintf ("CNT3=%X ",inb(CNT3)); + kprintf ("IMR3=%X ",inb(IMR3)); + kprintf ("TIMER=%X\n",inb(TIMER)); } @@ -783,7 +783,7 @@ status=EWOULDBLOCK; if((count>1)&&(inb(ISR3)&0x08)){ outw(FIFOB,*(unsigned*)(data+counter)); - /* printf ("gpib: sent:%c,%c\n",data[counter],data[counter+1]);*/ + /* kprintf ("gpib: sent:%c,%c\n",data[counter],data[counter+1]);*/ counter+=2; count-=2; @@ -1005,7 +1005,7 @@ do status2=inb(STS2); inword=inw(FIFOB); *(unsigned*)(data+counter)=inword; - /* printf ("Read:%c,%c\n",data[counter],data[counter+1]);*/ + /* kprintf ("Read:%c,%c\n",data[counter],data[counter+1]);*/ counter+=2; } else { diff --git a/sys/dev/misc/kbd/atkbd.c b/sys/dev/misc/kbd/atkbd.c index 2b7359e021..dbf6e7fb14 100644 --- a/sys/dev/misc/kbd/atkbd.c +++ b/sys/dev/misc/kbd/atkbd.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/kbd/atkbd.c,v 1.25.2.4 2002/04/08 19:21:38 asmodai Exp $ - * $DragonFly: src/sys/dev/misc/kbd/atkbd.c,v 1.12 2006/10/25 20:55:54 dillon Exp $ + * $DragonFly: src/sys/dev/misc/kbd/atkbd.c,v 1.13 2006/12/22 23:26:17 swildner Exp $ */ #include "opt_kbd.h" @@ -561,7 +561,7 @@ next_code: ++kbd->kb_count; #if KBDIO_DEBUG >= 10 - printf("atkbd_read_char(): scancode:0x%x\n", scancode); + kprintf("atkbd_read_char(): scancode:0x%x\n", scancode); #endif /* return the byte as is for the K_RAW mode */ @@ -1128,11 +1128,11 @@ init_keyboard(KBDC kbdc, int *type, int flags) if (c == -1) { /* CONTROLLER ERROR */ kbdc_lock(kbdc, FALSE); - printf("atkbd: unable to get the current command byte value.\n"); + kprintf("atkbd: unable to get the current command byte value.\n"); return EIO; } if (bootverbose) - printf("atkbd: the current kbd controller command byte %04x\n", + kprintf("atkbd: the current kbd controller command byte %04x\n", c); #if 0 /* override the keyboard lock switch */ @@ -1142,7 +1142,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) /* enable the keyboard port, but disable the keyboard intr. */ if (setup_kbd_port(kbdc, TRUE, FALSE)) { /* CONTROLLER ERROR: there is very little we can do... */ - printf("atkbd: unable to set the command byte.\n"); + kprintf("atkbd: unable to set the command byte.\n"); kbdc_lock(kbdc, FALSE); return EIO; } @@ -1165,7 +1165,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) codeset = read_kbd_data(kbdc); } if (bootverbose) - printf("atkbd: scancode set %d\n", codeset); + kprintf("atkbd: scancode set %d\n", codeset); #endif /* KBD_DETECT_XT_KEYBOARD */ *type = KB_OTHER; @@ -1189,7 +1189,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) break; } if (bootverbose) - printf("atkbd: keyboard ID 0x%x (%d)\n", id, *type); + kprintf("atkbd: keyboard ID 0x%x (%d)\n", id, *type); /* reset keyboard hardware */ if (!(flags & KB_CONF_NO_RESET) && !reset_kbd(kbdc)) { @@ -1215,7 +1215,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) set_controller_command_byte(kbdc, 0xff, c); kbdc_lock(kbdc, FALSE); if (bootverbose) - printf("atkbd: failed to reset the keyboard.\n"); + kprintf("atkbd: failed to reset the keyboard.\n"); return EIO; } @@ -1237,7 +1237,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) */ set_controller_command_byte(kbdc, 0xff, c); kbdc_lock(kbdc, FALSE); - printf("atkbd: unable to set the XT keyboard mode.\n"); + kprintf("atkbd: unable to set the XT keyboard mode.\n"); return EIO; } } @@ -1254,7 +1254,7 @@ init_keyboard(KBDC kbdc, int *type, int flags) */ set_controller_command_byte(kbdc, 0xff, c); kbdc_lock(kbdc, FALSE); - printf("atkbd: unable to enable the keyboard port and intr.\n"); + kprintf("atkbd: unable to enable the keyboard port and intr.\n"); return EIO; } diff --git a/sys/dev/misc/kbd/kbd.c b/sys/dev/misc/kbd/kbd.c index 506b816772..ebf1230785 100644 --- a/sys/dev/misc/kbd/kbd.c +++ b/sys/dev/misc/kbd/kbd.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/kbd/kbd.c,v 1.17.2.2 2001/07/30 16:46:43 yokota Exp $ - * $DragonFly: src/sys/dev/misc/kbd/kbd.c,v 1.21 2006/09/10 01:26:34 dillon Exp $ + * $DragonFly: src/sys/dev/misc/kbd/kbd.c,v 1.22 2006/12/22 23:26:17 swildner Exp $ */ /* * Generic keyboard driver. @@ -108,7 +108,7 @@ kbd_realloc_array(void) crit_exit(); if (bootverbose) - printf("kbd: new array size %d\n", keyboards); + kprintf("kbd: new array size %d\n", keyboards); return 0; } @@ -474,7 +474,7 @@ kbd_attach(keyboard_t *kbd) M_WAITOK); bzero(dev->si_drv1, sizeof(genkbd_softc_t)); - printf("kbd%d at %s%d\n", kbd->kb_index, kbd->kb_name, kbd->kb_unit); + kprintf("kbd%d at %s%d\n", kbd->kb_index, kbd->kb_name, kbd->kb_unit); return 0; } @@ -947,14 +947,14 @@ void genkbd_diag(keyboard_t *kbd, int level) { if (level > 0) { - printf("kbd%d: %s%d, %s (%d), config:0x%x, flags:0x%x", + kprintf("kbd%d: %s%d, %s (%d), config:0x%x, flags:0x%x", kbd->kb_index, kbd->kb_name, kbd->kb_unit, get_kbd_type_name(kbd->kb_type), kbd->kb_type, kbd->kb_config, kbd->kb_flags); if (kbd->kb_io_base > 0) - printf(", port:0x%x-0x%x", kbd->kb_io_base, + kprintf(", port:0x%x-0x%x", kbd->kb_io_base, kbd->kb_io_base + kbd->kb_io_size - 1); - printf("\n"); + kprintf("\n"); } } diff --git a/sys/dev/misc/labpc/labpc.c b/sys/dev/misc/labpc/labpc.c index 2c5f7ea949..0c433f7b66 100644 --- a/sys/dev/misc/labpc/labpc.c +++ b/sys/dev/misc/labpc/labpc.c @@ -39,7 +39,7 @@ * dufault@hda.com * * $FreeBSD: src/sys/i386/isa/labpc.c,v 1.35 1999/09/25 18:24:08 phk Exp $ - * $DragonFly: src/sys/dev/misc/labpc/labpc.c,v 1.20 2006/09/10 05:02:14 sephe Exp $ + * $DragonFly: src/sys/dev/misc/labpc/labpc.c,v 1.21 2006/12/22 23:26:17 swildner Exp $ * */ @@ -419,14 +419,14 @@ labpcprobe(struct isa_device *dev) { if (labpcinit() == 0) { - printf("labpcprobe: init failed\n"); + kprintf("labpcprobe: init failed\n"); return 0; } } if (unit > NLABPC) { - printf("Too many LAB-PCs. Reconfigure O/S.\n"); + kprintf("Too many LAB-PCs. Reconfigure O/S.\n"); return 0; } ctlr = &scratch; /* Need somebody with the right base for the macros */ @@ -589,24 +589,24 @@ tmo_stop(void *p) if (ctlr == 0) { - printf("labpc?: Null ctlr struct?\n"); + kprintf("labpc?: Null ctlr struct?\n"); crit_exit(); return; } - printf("labpc%d: timeout", ctlr->unit); + kprintf("labpc%d: timeout", ctlr->unit); (*ctlr->stop)(ctlr); bio = ctlr->start_queue.bio_actf; if (bio == NULL) { - printf(", Null bp.\n"); + kprintf(", Null bp.\n"); crit_exit(); return; } - printf("\n"); + kprintf("\n"); done_and_start_next(ctlr, bio, ETIMEDOUT); @@ -625,8 +625,8 @@ static void ad_intr(struct ctlr *ctlr) return; } - printf("ad_intr (should not happen) interrupt with interrupts off\n"); - printf("status %x, cr3 %x\n", inb(STATUS(ctlr)), ctlr->cr_image[2]); + kprintf("ad_intr (should not happen) interrupt with interrupts off\n"); + kprintf("status %x, cr3 %x\n", inb(STATUS(ctlr)), ctlr->cr_image[2]); return; } @@ -636,22 +636,22 @@ static void ad_intr(struct ctlr *ctlr) { struct bio *bio = ctlr->start_queue.bio_actf; - printf("ad_intr: error: bp %p, data %p, status %x", + kprintf("ad_intr: error: bp %p, data %p, status %x", bio->bio_buf, ctlr->data, status); if (status & OVERRUN) - printf(" Conversion overrun (multiple A-D trigger)"); + kprintf(" Conversion overrun (multiple A-D trigger)"); if (status & OVERFLOW) - printf(" FIFO overflow"); + kprintf(" FIFO overflow"); - printf("\n"); + kprintf("\n"); if (bio) { done_and_start_next(ctlr, bio, EIO); return; } else { - printf("ad_intr: (should not happen) error between records\n"); + kprintf("ad_intr: (should not happen) error between records\n"); ctlr->err = status; /* Set overrun condition */ return; } @@ -669,10 +669,10 @@ static void ad_intr(struct ctlr *ctlr) } } else { /* Interrupt with no where to put the data. */ - printf("ad_intr: (should not happen) dropped input.\n"); + kprintf("ad_intr: (should not happen) dropped input.\n"); (void)inb(ADFIFO(ctlr)); - printf("bp %p, status %x, cr3 %x\n", + kprintf("bp %p, status %x, cr3 %x\n", bio->bio_buf, status, ctlr->cr_image[2]); ctlr->err = DROPPED_INPUT; return; @@ -777,14 +777,14 @@ start(struct ctlr *ctlr) if (ctlr->err) { - printf("labpc start: (should not happen) error between records.\n"); + kprintf("labpc start: (should not happen) error between records.\n"); done_and_start_next(ctlr, bio, EIO); return; } if (ctlr->data == 0) { - printf("labpc start: (should not happen) NULL data pointer.\n"); + kprintf("labpc start: (should not happen) NULL data pointer.\n"); done_and_start_next(ctlr, bio, EIO); return; } diff --git a/sys/dev/misc/lpt/lpt.c b/sys/dev/misc/lpt/lpt.c index fdbd679a27..f07954353b 100644 --- a/sys/dev/misc/lpt/lpt.c +++ b/sys/dev/misc/lpt/lpt.c @@ -49,7 +49,7 @@ * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp * From Id: nlpt.c,v 1.14 1999/02/08 13:55:43 des Exp * $FreeBSD: src/sys/dev/ppbus/lpt.c,v 1.15.2.3 2000/07/07 00:30:40 obrien Exp $ - * $DragonFly: src/sys/dev/misc/lpt/lpt.c,v 1.18 2006/10/25 20:55:54 dillon Exp $ + * $DragonFly: src/sys/dev/misc/lpt/lpt.c,v 1.19 2006/12/22 23:26:17 swildner Exp $ */ /* @@ -94,7 +94,7 @@ MALLOC_DEFINE(M_LPT, "lpt", "LPT buffers"); #define lprintf(args) \ do { \ if (lptflag) \ - printf args; \ + kprintf args; \ } while (0) static int volatile lptflag = 1; #endif @@ -315,7 +315,7 @@ lpt_detect(device_t dev) status = 1; /* assume success */ if ((error = lpt_request_ppbus(dev, PPB_DONTWAIT))) { - printf(LPT_NAME ": cannot alloc ppbus (%d)!\n", error); + kprintf(LPT_NAME ": cannot alloc ppbus (%d)!\n", error); status = 0; goto end_probe; } @@ -371,7 +371,7 @@ lpt_attach(device_t dev) callout_init(&sc->sc_callout); if ((error = lpt_request_ppbus(dev, PPB_DONTWAIT))) { - printf(LPT_NAME ": cannot alloc ppbus (%d)!\n", error); + kprintf(LPT_NAME ": cannot alloc ppbus (%d)!\n", error); return (0); } diff --git a/sys/dev/misc/mse/mse.c b/sys/dev/misc/mse/mse.c index 99e8345b70..6f21f7e52a 100644 --- a/sys/dev/misc/mse/mse.c +++ b/sys/dev/misc/mse/mse.c @@ -12,7 +12,7 @@ * without express or implied warranty. * * $FreeBSD: src/sys/i386/isa/mse.c,v 1.49.2.1 2000/03/20 13:58:47 yokota Exp $ - * $DragonFly: src/sys/dev/misc/mse/mse.c,v 1.19 2006/10/25 20:55:54 dillon Exp $ + * $DragonFly: src/sys/dev/misc/mse/mse.c,v 1.20 2006/12/22 23:26:17 swildner Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -647,7 +647,7 @@ msetimeout(void *arg) sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); if (sc->sc_watchdog) { if (bootverbose) - printf("mse%d: lost interrupt?\n", MSE_UNIT(dev)); + kprintf("mse%d: lost interrupt?\n", MSE_UNIT(dev)); mseintr(sc); } sc->sc_watchdog = TRUE; @@ -681,7 +681,7 @@ mseintr(void *arg) #ifdef DEBUG static int mse_intrcnt = 0; if((mse_intrcnt++ % 10000) == 0) - printf("mseintr\n"); + kprintf("mseintr\n"); #endif /* DEBUG */ if ((sc->sc_flags & MSESC_OPEN) == 0) return; diff --git a/sys/dev/misc/musycc/musycc.c b/sys/dev/misc/musycc/musycc.c index e0d7905cb8..b1e1e04593 100644 --- a/sys/dev/misc/musycc/musycc.c +++ b/sys/dev/misc/musycc/musycc.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/dev/musycc/musycc.c,v 1.17.2.3 2001/03/13 22:05:36 phk Exp $ - * $DragonFly: src/sys/dev/misc/musycc/musycc.c,v 1.9 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/misc/musycc/musycc.c,v 1.10 2006/12/22 23:26:17 swildner Exp $ * * * @@ -369,7 +369,7 @@ static void init_card(struct csoftc *csc) { - printf("init_card(%p)\n", csc); + kprintf("init_card(%p)\n", csc); csc->state = C_INIT; csc->reg->srd = 0x100; @@ -392,10 +392,10 @@ init_ctrl(struct softc *sc) { int i; - printf("init_ctrl(%p) [%s] [%08x]\n", sc, sc->nodename, sc->csc->reg->glcd); + kprintf("init_ctrl(%p) [%s] [%08x]\n", sc, sc->nodename, sc->csc->reg->glcd); init_8370(sc); tsleep(sc, PCATCH, "ds8370", hz); - printf("%s: glcd: [%08x]\n", sc->nodename, sc->csc->reg->glcd); + kprintf("%s: glcd: [%08x]\n", sc->nodename, sc->csc->reg->glcd); sc->reg->gbp = vtophys(sc->ram); sc->ram->grcd = 0x00000001; /* RXENBL */ sc->ram->grcd |= 0x00000002; /* TXENBL */ @@ -643,7 +643,7 @@ musycc_intr0_tx_eom(struct softc *sc, int ch) sch = sc->chan[ch]; if (sch == NULL || sch->state != UP) { /* XXX: this should not happen once the driver is done */ - printf("Xmit packet on uninitialized channel %d\n", ch); + kprintf("Xmit packet on uninitialized channel %d\n", ch); } if (sc->mdt[ch] == NULL) return; /* XXX: can this happen ? */ @@ -682,7 +682,7 @@ musycc_intr0_rx_eom(struct softc *sc, int ch) sch = sc->chan[ch]; if (sch == NULL || sch->state != UP) { /* XXX: this should not happen once the driver is done */ - printf("Received packet on uninitialized channel %d\n", ch); + kprintf("Received packet on uninitialized channel %d\n", ch); return; } if (sc->mdr[ch] == NULL) @@ -740,13 +740,13 @@ musycc_intr0_rx_eom(struct softc *sc, int ch) } else { sch->last_rxerr = time_second; /* Receive error, print some useful info */ - printf("%s %s: RX 0x%08x ", sch->sc->nodename, + kprintf("%s %s: RX 0x%08x ", sch->sc->nodename, sch->hookname, status); /* Don't print a lot, just the begining will do */ if (m->m_len > 16) m->m_len = m->m_pkthdr.len = 16; m_print(m); - printf("\n"); + kprintf("\n"); } md->status = 1600; /* XXX: MTU */ /* Check next mdesc in the ring */ @@ -772,7 +772,7 @@ musycc_intr0(void *arg) if (c == 0) return; if (debug & 1) - printf("%s: IRQ: %08x n = %d c = %d\n", csc->serial[0].nodename, u, n, c); + kprintf("%s: IRQ: %08x n = %d c = %d\n", csc->serial[0].nodename, u, n, c); for (i = 0; i < c; i++) { j = (n + i) % NIQD; u1 = csc->iqd[j]; @@ -783,19 +783,19 @@ musycc_intr0(void *arg) er = (u1 >> 16) & 0xf; sc = &csc->serial[g]; if ((debug & 2) || er) { - printf("%08x %d", u1, g); - printf("/%s", u1 & 0x80000000 ? "T" : "R"); - printf("/%02d", ch); - printf(" %02d", ev); - printf(":%02d", er); - printf("\n"); + kprintf("%08x %d", u1, g); + kprintf("/%s", u1 & 0x80000000 ? "T" : "R"); + kprintf("/%02d", ch); + kprintf(" %02d", ev); + kprintf(":%02d", er); + kprintf("\n"); } switch (ev) { case 1: /* SACK Service Request Acknowledge */ #if 0 - printf("%s: SACK: %08x group=%d", sc->nodename, csc->iqd[j], g); - printf("/%s", csc->iqd[j] & 0x80000000 ? "T" : "R"); - printf(" cmd %08x (%08x) \n", sc->last, sc->reg->srd); + kprintf("%s: SACK: %08x group=%d", sc->nodename, csc->iqd[j], g); + kprintf("/%s", csc->iqd[j] & 0x80000000 ? "T" : "R"); + kprintf(" cmd %08x (%08x) \n", sc->last, sc->reg->srd); #endif sc->last = 0xffffffff; wakeup(&sc->last); @@ -819,12 +819,12 @@ musycc_intr0(void *arg) musycc_intr0_tx_eom(sc, ch); musycc_intr0_rx_eom(sc, ch); #if 1 - printf("huh ? %08x %d", u1, g); - printf("/%s", u1 & 0x80000000 ? "T" : "R"); - printf("/%02d", ch); - printf(" %02d", ev); - printf(":%02d", er); - printf("\n"); + kprintf("huh ? %08x %d", u1, g); + kprintf("/%s", u1 & 0x80000000 ? "T" : "R"); + kprintf("/%02d", ch); + kprintf(" %02d", ev); + kprintf(":%02d", er); + kprintf("\n"); #endif } csc->iqd[j] = 0xffffffff; @@ -870,10 +870,10 @@ musycc_intr1(void *arg) if (debug & 4) { int j; - printf("musycc_intr1:%d %02x", i, irr); + kprintf("musycc_intr1:%d %02x", i, irr); for (j = 4; j < 0x14; j++) - printf(" %02x", u[j] & 0xff); - printf("\n"); + kprintf(" %02x", u[j] & 0xff); + kprintf("\n"); } } } @@ -943,7 +943,7 @@ musycc_config(node_p node, char *set, char *ret) dump_8370(sc, ret, 0x100); } else if (!strncmp(set, "creg", 4)) { i = strtol(set + 5, 0, 0); - printf("set creg %d\n", i); + kprintf("set creg %d\n", i); csc->creg = 0xfe | (i << 24); *csc->cregp = csc->creg; /* @@ -953,7 +953,7 @@ musycc_config(node_p node, char *set, char *ret) reset_card(sc, ret); */ } else { - printf("%s CONFIG SET [%s]\n", sc->nodename, set); + kprintf("%s CONFIG SET [%s]\n", sc->nodename, set); goto barf; } @@ -1099,7 +1099,7 @@ musycc_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) ch = sch->chan; if (csc->state != C_RUNNING) { - printf("csc->state = %d\n", csc->state); + kprintf("csc->state = %d\n", csc->state); NG_FREE_DATA(m, meta); return (0); } @@ -1108,7 +1108,7 @@ musycc_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) meta = NULL; if (sch->state != UP) { - printf("sch->state = %d\n", sch->state); + kprintf("sch->state = %d\n", sch->state); NG_FREE_DATA(m, meta); return (0); } @@ -1142,7 +1142,7 @@ musycc_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) if (m->m_len == 0) continue; if (md->status != 0) { - printf("Out of tx md(2)\n"); + kprintf("Out of tx md(2)\n"); sch->last_txerr = time_second; sch->tx_drop++; sch->last_txdrop = time_second; @@ -1226,7 +1226,7 @@ musycc_connect(hook_p hook) break; } - printf("Connect ch= %d ts= %08x nts= %d nbuf = %d\n", + kprintf("Connect ch= %d ts= %08x nts= %d nbuf = %d\n", ch, sch->ts, nts, nbuf); /* Reread the Time Slot Map */ @@ -1389,19 +1389,19 @@ musycc_probe(device_t self) char desc[40]; if (sizeof(struct groupr) != 1572) { - printf("sizeof(struct groupr) = %d, should be 1572\n", + kprintf("sizeof(struct groupr) = %d, should be 1572\n", sizeof(struct groupr)); return(ENXIO); } if (sizeof(struct globalr) != 1572) { - printf("sizeof(struct globalr) = %d, should be 1572\n", + kprintf("sizeof(struct globalr) = %d, should be 1572\n", sizeof(struct globalr)); return(ENXIO); } if (sizeof(struct mycg) > 2048) { - printf("sizeof(struct mycg) = %d, should be <= 2048\n", + kprintf("sizeof(struct mycg) = %d, should be <= 2048\n", sizeof(struct mycg)); return(ENXIO); } @@ -1441,9 +1441,9 @@ musycc_attach(device_t self) once++; error = ng_newtype(&ngtypestruct); if (error != 0) - printf("ng_newtype() failed %d\n", error); + kprintf("ng_newtype() failed %d\n", error); } - printf("We have %d pad bytes in mycg\n", 2048 - sizeof(struct mycg)); + kprintf("We have %d pad bytes in mycg\n", 2048 - sizeof(struct mycg)); f = pci_get_function(self); /* For function zero allocate a csoftc */ @@ -1479,7 +1479,7 @@ musycc_attach(device_t self) 1, RF_SHAREABLE | RF_ACTIVE); if (csc->irq[f] == NULL) { - printf("couldn't map interrupt\n"); + kprintf("couldn't map interrupt\n"); return(ENXIO); } @@ -1488,7 +1488,7 @@ musycc_attach(device_t self) &csc->intrhand[f], NULL); if (error) { - printf("couldn't set up irq\n"); + kprintf("couldn't set up irq\n"); return(ENXIO); } @@ -1496,7 +1496,7 @@ musycc_attach(device_t self) return (0); for (i = 0; i < 2; i++) - printf("f%d: device %p virtual %p physical %08x\n", + kprintf("f%d: device %p virtual %p physical %08x\n", i, csc->f[i], csc->virbase[i], csc->physbase[i]); csc->reg = (struct globalr *)csc->virbase[0]; @@ -1504,11 +1504,11 @@ musycc_attach(device_t self) u32p = (u_int32_t *)csc->virbase[1]; u = u32p[0x1200]; if ((u & 0xffff0000) != 0x13760000) { - printf("Not a LMC1504 (ID is 0x%08x). Bailing out.\n", u); + kprintf("Not a LMC1504 (ID is 0x%08x). Bailing out.\n", u); return(ENXIO); } csc->nchan = (u >> 8) & 0xf; - printf("Found \n", (u >> 12) & 0xf, csc->nchan); + kprintf("Found \n", (u >> 12) & 0xf, csc->nchan); csc->creg = 0xfe; csc->cregp = &u32p[0x1000]; @@ -1528,7 +1528,7 @@ musycc_attach(device_t self) error = ng_make_node_common(&ngtypestruct, &sc->node); if (error) { - printf("ng_make_node_common() failed %d\n", error); + kprintf("ng_make_node_common() failed %d\n", error); continue; } sc->node->private = sc; diff --git a/sys/dev/misc/pcfclock/pcfclock.c b/sys/dev/misc/pcfclock/pcfclock.c index a353ec8476..6549a5ff7c 100644 --- a/sys/dev/misc/pcfclock/pcfclock.c +++ b/sys/dev/misc/pcfclock/pcfclock.c @@ -22,7 +22,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/pcfclock.c,v 1.3.2.1 2000/05/24 00:20:57 n_hibma Exp $ - * $DragonFly: src/sys/dev/misc/pcfclock/pcfclock.c,v 1.11 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/pcfclock/pcfclock.c,v 1.12 2006/12/22 23:26:18 swildner Exp $ * */ @@ -208,7 +208,7 @@ pcfclock_display_data(cdev_t dev, char buf[18]) year = NR(buf, 14); if (year < 70) year += 100; - printf(PCFCLOCK_NAME "%d: %02d.%02d.%4d %02d:%02d:%02d, " + kprintf(PCFCLOCK_NAME "%d: %02d.%02d.%4d %02d:%02d:%02d, " "battery status: %s\n", unit, NR(buf, 10), NR(buf, 12), 1900 + year, @@ -216,7 +216,7 @@ pcfclock_display_data(cdev_t dev, char buf[18]) PCFCLOCK_BATTERY_STATUS_LOW(buf) ? "LOW" : "ok"); #else if (PCFCLOCK_BATTERY_STATUS_LOW(buf)) - printf(PCFCLOCK_NAME "%d: BATTERY STATUS LOW ON\n", + kprintf(PCFCLOCK_NAME "%d: BATTERY STATUS LOW ON\n", unit); #endif } @@ -304,7 +304,7 @@ pcfclock_read(struct dev_read_args *ap) error = pcfclock_read_dev(dev, buf, PCFCLOCK_MAX_RETRIES); if (error) { - printf(PCFCLOCK_NAME "%d: no PCF found\n", unit); + kprintf(PCFCLOCK_NAME "%d: no PCF found\n", unit); } else { pcfclock_display_data(dev, buf); diff --git a/sys/dev/misc/ppc/ppc.c b/sys/dev/misc/ppc/ppc.c index 8370133964..58e9960cd0 100644 --- a/sys/dev/misc/ppc/ppc.c +++ b/sys/dev/misc/ppc/ppc.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/ppc.c,v 1.26.2.5 2001/10/02 05:21:45 nsouch Exp $ - * $DragonFly: src/sys/dev/misc/ppc/ppc.c,v 1.13 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/ppc/ppc.c,v 1.14 2006/12/22 23:26:18 swildner Exp $ * */ @@ -54,7 +54,7 @@ #include "ppbus_if.h" #define LOG_PPC(function, ppc, string) \ - if (bootverbose) printf("%s: %s\n", function, string) + if (bootverbose) kprintf("%s: %s\n", function, string) #define DEVTOSOFTC(dev) ((struct ppc_data *)device_get_softc(dev)) @@ -168,7 +168,7 @@ ppc_ecp_sync(device_t dev) DELAY(100); } - printf("ppc%d: ECP sync failed as data still " \ + kprintf("ppc%d: ECP sync failed as data still " \ "present in FIFO.\n", ppc->ppc_unit); return; @@ -478,19 +478,19 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for ppc->ppc_model = NS_PC87303; } else { if (bootverbose && (val != 0xff)) - printf("PC873xx probe at 0x%x got unknown ID 0x%x\n", idport, val); + kprintf("PC873xx probe at 0x%x got unknown ID 0x%x\n", idport, val); continue ; /* not recognised */ } /* print registers */ if (bootverbose) { - printf("PC873xx"); + kprintf("PC873xx"); for (i=0; pc873xx_regstab[i] != -1; i++) { outb(idport, pc873xx_regstab[i]); - printf(" %s=0x%x", pc873xx_rnametab[i], + kprintf(" %s=0x%x", pc873xx_rnametab[i], inb(idport + 1) & 0xff); } - printf("\n"); + kprintf("\n"); } /* @@ -500,7 +500,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for val = inb(idport + 1); if (!(val & PC873_PPENABLE)) { if (bootverbose) - printf("PC873xx parallel port disabled\n"); + kprintf("PC873xx parallel port disabled\n"); continue; } outb(idport, PC873_FAR); @@ -542,7 +542,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for if (pc873xx_porttab[val] != ppc->ppc_base) { if (bootverbose) - printf("PC873xx at 0x%x not for driver at port 0x%x\n", + kprintf("PC873xx at 0x%x not for driver at port 0x%x\n", pc873xx_porttab[val], ppc->ppc_base); } continue; @@ -558,7 +558,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for irq = pc873xx_irqtab[val]; if (bootverbose) - printf("PC873xx irq %d at 0x%x\n", irq, ppc->ppc_base); + kprintf("PC873xx irq %d at 0x%x\n", irq, ppc->ppc_base); /* * Check if irq settings are correct @@ -577,14 +577,14 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for outb(idport + 1, (ptr & ~PC873_LPTBIRQ7)); } if (bootverbose) - printf("PC873xx irq set to %d\n", ppc->ppc_irq); + kprintf("PC873xx irq set to %d\n", ppc->ppc_irq); } else { if (bootverbose) - printf("PC873xx sorry, can't change irq setting\n"); + kprintf("PC873xx sorry, can't change irq setting\n"); } } else { if (bootverbose) - printf("PC873xx irq settings are correct\n"); + kprintf("PC873xx irq settings are correct\n"); } outb(idport, PC873_PCR); @@ -592,17 +592,17 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for if ((ptr & PC873_CFGLOCK) || !chipset_mode) { if (bootverbose) - printf("PC873xx %s", (ptr & PC873_CFGLOCK)?"locked":"unlocked"); + kprintf("PC873xx %s", (ptr & PC873_CFGLOCK)?"locked":"unlocked"); ppc->ppc_avm |= PPB_NIBBLE; if (bootverbose) - printf(", NIBBLE"); + kprintf(", NIBBLE"); if (pcr & PC873_EPPEN) { ppc->ppc_avm |= PPB_EPP; if (bootverbose) - printf(", EPP"); + kprintf(", EPP"); if (pcr & PC873_EPP19) ppc->ppc_epp = EPP_1_9; @@ -613,19 +613,19 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for outb(idport, PC873_PTR); ptr = inb(idport + 1); if (ptr & PC873_EPPRDIR) - printf(", Regular mode"); + kprintf(", Regular mode"); else - printf(", Automatic mode"); + kprintf(", Automatic mode"); } } else if (pcr & PC873_ECPEN) { ppc->ppc_avm |= PPB_ECP; if (bootverbose) - printf(", ECP"); + kprintf(", ECP"); if (pcr & PC873_ECPCLK) { /* XXX */ ppc->ppc_avm |= PPB_PS2; if (bootverbose) - printf(", PS/2"); + kprintf(", PS/2"); } } else { outb(idport, PC873_PTR); @@ -633,16 +633,16 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for if (ptr & PC873_EXTENDED) { ppc->ppc_avm |= PPB_SPP; if (bootverbose) - printf(", SPP"); + kprintf(", SPP"); } } } else { if (bootverbose) - printf("PC873xx unlocked"); + kprintf("PC873xx unlocked"); if (chipset_mode & PPB_ECP) { if ((chipset_mode & PPB_EPP) && bootverbose) - printf(", ECP+EPP not supported"); + kprintf(", ECP+EPP not supported"); pcr &= ~PC873_EPPEN; pcr |= (PC873_ECPEN | PC873_ECPCLK); /* XXX */ @@ -650,7 +650,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for outb(idport + 1, pcr); if (bootverbose) - printf(", ECP"); + kprintf(", ECP"); } else if (chipset_mode & PPB_EPP) { pcr &= ~(PC873_ECPEN | PC873_ECPCLK); @@ -661,7 +661,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for ppc->ppc_epp = EPP_1_9; /* XXX */ if (bootverbose) - printf(", EPP1.9"); + kprintf(", EPP1.9"); /* enable automatic direction turnover */ if (ppc->ppc_model == NS_PC87332) { @@ -672,7 +672,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for outb(idport + 1, ptr); if (bootverbose) - printf(", Automatic mode"); + kprintf(", Automatic mode"); } } else { pcr &= ~(PC873_ECPEN | PC873_ECPCLK | PC873_EPPEN); @@ -687,14 +687,14 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for ptr |= PC873_EXTENDED; if (bootverbose) - printf(", PS/2"); + kprintf(", PS/2"); } else { /* default to NIBBLE mode */ ptr &= ~PC873_EXTENDED; if (bootverbose) - printf(", NIBBLE"); + kprintf(", NIBBLE"); } outb(idport + 1, ptr); outb(idport + 1, ptr); @@ -704,7 +704,7 @@ ppc_pc873xx_detect(struct ppc_data *ppc, int chipset_mode) /* XXX mode never for } if (bootverbose) - printf("\n"); + kprintf("\n"); ppc->ppc_type = PPC_TYPE_GENERIC; ppc_generic_setmode(ppc, chipset_mode); @@ -787,11 +787,11 @@ config: if (bootverbose) { outb(csr, 0x1); - printf("ppc%d: SMC registers CR1=0x%x", ppc->ppc_unit, + kprintf("ppc%d: SMC registers CR1=0x%x", ppc->ppc_unit, inb(cio) & 0xff); outb(csr, 0x4); - printf(" CR4=0x%x", inb(cio) & 0xff); + kprintf(" CR4=0x%x", inb(cio) & 0xff); } /* select CR1 */ @@ -804,7 +804,7 @@ config: if (type == SMC_37C666GT) { ppc->ppc_avm |= PPB_ECP | PPB_EPP | PPB_SPP; if (bootverbose) - printf(" configuration hardwired, supposing " \ + kprintf(" configuration hardwired, supposing " \ "ECP+EPP SPP"); } else @@ -817,32 +817,32 @@ config: case SMC_SPP: ppc->ppc_avm |= PPB_SPP; if (bootverbose) - printf(" SPP"); + kprintf(" SPP"); break; case SMC_EPPSPP: ppc->ppc_avm |= PPB_EPP | PPB_SPP; if (bootverbose) - printf(" EPP SPP"); + kprintf(" EPP SPP"); break; case SMC_ECP: ppc->ppc_avm |= PPB_ECP | PPB_SPP; if (bootverbose) - printf(" ECP SPP"); + kprintf(" ECP SPP"); break; case SMC_ECPEPP: ppc->ppc_avm |= PPB_ECP | PPB_EPP | PPB_SPP; if (bootverbose) - printf(" ECP+EPP SPP"); + kprintf(" ECP+EPP SPP"); break; } } else { /* not an extended port mode */ ppc->ppc_avm |= PPB_SPP; if (bootverbose) - printf(" SPP"); + kprintf(" SPP"); } } else { @@ -858,7 +858,7 @@ config: /* do not use ECP when the mode is not forced to */ outb(cio, r | SMC_CR1_MODE); if (bootverbose) - printf(" SPP"); + kprintf(" SPP"); } else { /* an extended mode is selected */ outb(cio, r & ~SMC_CR1_MODE); @@ -871,17 +871,17 @@ config: if (chipset_mode & PPB_EPP) { outb(cio, r | SMC_ECPEPP); if (bootverbose) - printf(" ECP+EPP"); + kprintf(" ECP+EPP"); } else { outb(cio, r | SMC_ECP); if (bootverbose) - printf(" ECP"); + kprintf(" ECP"); } } else { /* PPB_EPP is set */ outb(cio, r | SMC_EPPSPP); if (bootverbose) - printf(" EPP SPP"); + kprintf(" EPP SPP"); } } ppc->ppc_avm = chipset_mode; @@ -897,7 +897,7 @@ config: end_detect: if (bootverbose) - printf ("\n"); + kprintf ("\n"); if (ppc->ppc_avm & PPB_EPP) { /* select CR4 */ @@ -1080,23 +1080,23 @@ found: if (bootverbose) { /* dump of registers */ - printf("ppc%d: 0x%x - ", ppc->ppc_unit, w83877f_keys[i]); + kprintf("ppc%d: 0x%x - ", ppc->ppc_unit, w83877f_keys[i]); for (i = 0; i <= 0xd; i ++) { outb(efir, i); - printf("0x%x ", inb(efdr)); + kprintf("0x%x ", inb(efdr)); } for (i = 0x10; i <= 0x17; i ++) { outb(efir, i); - printf("0x%x ", inb(efdr)); + kprintf("0x%x ", inb(efdr)); } outb(efir, 0x1e); - printf("0x%x ", inb(efdr)); + kprintf("0x%x ", inb(efdr)); for (i = 0x20; i <= 0x29; i ++) { outb(efir, i); - printf("0x%x ", inb(efdr)); + kprintf("0x%x ", inb(efdr)); } - printf("\n"); - printf("ppc%d:", ppc->ppc_unit); + kprintf("\n"); + kprintf("ppc%d:", ppc->ppc_unit); } ppc->ppc_type = PPC_TYPE_GENERIC; @@ -1115,7 +1115,7 @@ found: switch (r) { case WINB_W83757: if (bootverbose) - printf("ppc%d: W83757 compatible mode\n", + kprintf("ppc%d: W83757 compatible mode\n", ppc->ppc_unit); return (-1); /* generic or SMC-like */ @@ -1124,19 +1124,19 @@ found: case WINB_EXT2FDD: case WINB_JOYSTICK: if (bootverbose) - printf(" not in parallel port mode\n"); + kprintf(" not in parallel port mode\n"); return (-1); case (WINB_PARALLEL | WINB_EPP_SPP): ppc->ppc_avm |= PPB_EPP | PPB_SPP; if (bootverbose) - printf(" EPP SPP"); + kprintf(" EPP SPP"); break; case (WINB_PARALLEL | WINB_ECP): ppc->ppc_avm |= PPB_ECP | PPB_SPP; if (bootverbose) - printf(" ECP SPP"); + kprintf(" ECP SPP"); break; case (WINB_PARALLEL | WINB_ECP_EPP): @@ -1144,10 +1144,10 @@ found: ppc->ppc_type = PPC_TYPE_SMCLIKE; if (bootverbose) - printf(" ECP+EPP SPP"); + kprintf(" ECP+EPP SPP"); break; default: - printf("%s: unknown case (0x%x)!\n", __func__, r); + kprintf("%s: unknown case (0x%x)!\n", __func__, r); } } else { @@ -1165,26 +1165,26 @@ found: if (chipset_mode & PPB_EPP) { outb(efdr, inb(efdr) | WINB_ECP_EPP); if (bootverbose) - printf(" ECP+EPP"); + kprintf(" ECP+EPP"); ppc->ppc_type = PPC_TYPE_SMCLIKE; } else { outb(efdr, inb(efdr) | WINB_ECP); if (bootverbose) - printf(" ECP"); + kprintf(" ECP"); } } else { /* select EPP_SPP otherwise */ outb(efdr, inb(efdr) | WINB_EPP_SPP); if (bootverbose) - printf(" EPP SPP"); + kprintf(" EPP SPP"); } ppc->ppc_avm = chipset_mode; } if (bootverbose) - printf("\n"); + kprintf("\n"); /* exit configuration mode */ outb(efer, 0xaa); @@ -1212,14 +1212,14 @@ ppc_generic_detect(struct ppc_data *ppc, int chipset_mode) ppc->ppc_type = PPC_TYPE_GENERIC; if (bootverbose) - printf("ppc%d:", ppc->ppc_unit); + kprintf("ppc%d:", ppc->ppc_unit); /* first, check for ECP */ w_ecr(ppc, PPC_ECR_PS2); if ((r_ecr(ppc) & 0xe0) == PPC_ECR_PS2) { ppc->ppc_dtm |= PPB_ECP | PPB_SPP; if (bootverbose) - printf(" ECP SPP"); + kprintf(" ECP SPP"); /* search for SMC style ECP+EPP mode */ w_ecr(ppc, PPC_ECR_EPP); @@ -1235,10 +1235,10 @@ ppc_generic_detect(struct ppc_data *ppc, int chipset_mode) ppc->ppc_type = PPC_TYPE_SMCLIKE; if (bootverbose) - printf(" ECP+EPP"); + kprintf(" ECP+EPP"); } else { if (bootverbose) - printf(" EPP"); + kprintf(" EPP"); } } else { /* restore to standard mode */ @@ -1249,7 +1249,7 @@ ppc_generic_detect(struct ppc_data *ppc, int chipset_mode) ppc->ppc_dtm |= PPB_NIBBLE; if (bootverbose) - printf(" SPP"); + kprintf(" SPP"); if (chipset_mode) ppc->ppc_avm = chipset_mode; @@ -1257,7 +1257,7 @@ ppc_generic_detect(struct ppc_data *ppc, int chipset_mode) ppc->ppc_avm = ppc->ppc_dtm; if (bootverbose) - printf("\n"); + kprintf("\n"); switch (ppc->ppc_type) { case PPC_TYPE_SMCLIKE: @@ -1308,7 +1308,7 @@ ppc_detect(struct ppc_data *ppc, int chipset_mode) */ if (ppc->ppc_flags & 0x40) { if (bootverbose) - printf("ppc: chipset forced to generic\n"); + kprintf("ppc: chipset forced to generic\n"); #endif ppc->ppc_mode = ppc_generic_detect(ppc, chipset_mode); @@ -1561,7 +1561,7 @@ ppcintr(void *arg) ecr = r_ecr(ppc); #if PPC_DEBUG > 1 - printf("![%x/%x/%x]", ctr, ecr, str); + kprintf("![%x/%x/%x]", ctr, ecr, str); #endif /* don't use ecp mode with IRQENABLE set */ @@ -1593,7 +1593,7 @@ ppcintr(void *arg) /* check if DMA completed */ if ((ppc->ppc_avm & PPB_ECP) && (ecr & PPC_ENABLE_DMA)) { #ifdef PPC_DEBUG - printf("a"); + kprintf("a"); #endif /* stop DMA */ w_ecr(ppc, ecr & ~PPC_ENABLE_DMA); @@ -1601,7 +1601,7 @@ ppcintr(void *arg) if (ppc->ppc_dmastat == PPC_DMA_STARTED) { #ifdef PPC_DEBUG - printf("d"); + kprintf("d"); #endif isa_dmadone( ppc->ppc_dmaflags, @@ -1646,7 +1646,7 @@ ppc_write(device_t dev, char *buf, int len, int how) int spin; #ifdef PPC_DEBUG - printf("w"); + kprintf("w"); #endif ecr_sav = r_ecr(ppc); @@ -1708,7 +1708,7 @@ ppc_write(device_t dev, char *buf, int len, int how) ppc->ppc_dmacnt, ppc->ppc_dmachan); #ifdef PPC_DEBUG - printf("s%d", ppc->ppc_dmacnt); + kprintf("s%d", ppc->ppc_dmacnt); #endif ppc->ppc_dmastat = PPC_DMA_STARTED; @@ -1726,7 +1726,7 @@ ppc_write(device_t dev, char *buf, int len, int how) if (error) { #ifdef PPC_DEBUG - printf("i"); + kprintf("i"); #endif /* stop DMA */ isa_dmadone( @@ -1748,12 +1748,12 @@ ppc_write(device_t dev, char *buf, int len, int how) if (r_ecr(ppc) & PPC_FIFO_EMPTY) goto fifo_empty; #ifdef PPC_DEBUG - printf("Z"); + kprintf("Z"); #endif error = tsleep((caddr_t)ppc, PCATCH, "ppcfifo", hz/100); if (error != EWOULDBLOCK) { #ifdef PPC_DEBUG - printf("I"); + kprintf("I"); #endif /* no dma, no interrupt, flush the fifo */ w_ecr(ppc, PPC_ECR_RESET); diff --git a/sys/dev/misc/ppi/ppi.c b/sys/dev/misc/ppi/ppi.c index d5bbcd4e8e..192e4158f9 100644 --- a/sys/dev/misc/ppi/ppi.c +++ b/sys/dev/misc/ppi/ppi.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.21.2.3 2000/08/07 18:24:43 peter Exp $ - * $DragonFly: src/sys/dev/misc/ppi/ppi.c,v 1.14 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/ppi/ppi.c,v 1.15 2006/12/22 23:26:18 swildner Exp $ * */ #include "opt_ppb_1284.h" @@ -203,7 +203,7 @@ ppiintr(void *arg) (SELECT | nBUSY)) { /* IEEE1284 negociation */ #ifdef DEBUG_1284 - printf("N"); + kprintf("N"); #endif /* Event 2 - prepare for reading the ext. value */ @@ -213,7 +213,7 @@ ppiintr(void *arg) } else { #ifdef DEBUG_1284 - printf("0x%x", ppb_rstr(ppbus)); + kprintf("0x%x", ppb_rstr(ppbus)); #endif ppb_peripheral_terminate(ppbus, PPB_DONTWAIT); break; @@ -229,7 +229,7 @@ ppiintr(void *arg) break; default: #ifdef DEBUG_1284 - printf("?%d", ppb_1284_get_state(ppbus)); + kprintf("?%d", ppb_1284_get_state(ppbus)); #endif ppb_1284_set_state(ppbus, PPB_FORWARD_IDLE); ppb_set_mode(ppbus, PPB_COMPATIBLE); @@ -364,7 +364,7 @@ ppiread(struct dev_read_args *ap) } #ifdef DEBUG_1284 - printf("N"); + kprintf("N"); #endif /* read data */ len = 0; @@ -379,7 +379,7 @@ ppiread(struct dev_read_args *ap) goto error; /* no more data */ #ifdef DEBUG_1284 - printf("d"); + kprintf("d"); #endif if ((error = uiomove(ppi->ppi_buffer, len, uio))) goto error; @@ -432,7 +432,7 @@ ppiwrite(struct dev_write_args *ap) /* negociate ECP mode */ if (ppb_1284_negociate(ppbus, PPB_ECP, 0)) { - printf("ppiwrite: ECP negociation failed\n"); + kprintf("ppiwrite: ECP negociation failed\n"); } while (!error && (len = min(uio->uio_resid, BUFSIZE))) { @@ -453,7 +453,7 @@ ppiwrite(struct dev_write_args *ap) while (ppb_1284_get_state(ppbus) != PPB_PERIPHERAL_IDLE) { /* XXX should check a variable before sleeping */ #ifdef DEBUG_1284 - printf("s"); + kprintf("s"); #endif ppi_enable_intr(ppidev); @@ -473,7 +473,7 @@ ppiwrite(struct dev_write_args *ap) } } #ifdef DEBUG_1284 - printf("N"); + kprintf("N"); #endif /* negociation done, write bytes to master host */ @@ -483,7 +483,7 @@ ppiwrite(struct dev_write_args *ap) ppi->ppi_buffer, len, &sent))) goto error; #ifdef DEBUG_1284 - printf("d"); + kprintf("d"); #endif } diff --git a/sys/dev/misc/psm/psm.c b/sys/dev/misc/psm/psm.c index 59ef9c53d0..876ad50b8a 100644 --- a/sys/dev/misc/psm/psm.c +++ b/sys/dev/misc/psm/psm.c @@ -21,7 +21,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/isa/psm.c,v 1.23.2.7 2003/11/12 04:26:26 mikeh Exp $ - * $DragonFly: src/sys/dev/misc/psm/psm.c,v 1.21 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/psm/psm.c,v 1.22 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -929,7 +929,7 @@ psmprobe(device_t dev) device_set_desc(dev, "PS/2 Mouse"); if (!kbdc_lock(sc->kbdc, TRUE)) { - printf("psm%d: unable to lock the controller.\n", unit); + kprintf("psm%d: unable to lock the controller.\n", unit); if (bootverbose) --verbose; return (ENXIO); @@ -948,10 +948,10 @@ psmprobe(device_t dev) mask = kbdc_get_device_mask(sc->kbdc) & ~KBD_AUX_CONTROL_BITS; command_byte = get_controller_command_byte(sc->kbdc); if (verbose) - printf("psm%d: current command byte:%04x\n", unit, command_byte); + kprintf("psm%d: current command byte:%04x\n", unit, command_byte); if (command_byte == -1) { /* CONTROLLER ERROR */ - printf("psm%d: unable to get the current command byte value.\n", + kprintf("psm%d: unable to get the current command byte value.\n", unit); endprobe(ENXIO); } @@ -969,7 +969,7 @@ psmprobe(device_t dev) * from this error... */ restore_controller(sc->kbdc, command_byte); - printf("psm%d: unable to set the command byte.\n", unit); + kprintf("psm%d: unable to set the command byte.\n", unit); endprobe(ENXIO); } write_controller_command(sc->kbdc, KBDC_ENABLE_AUX_PORT); @@ -997,7 +997,7 @@ psmprobe(device_t dev) case 3: case PSM_ACK: if (verbose) - printf("psm%d: strange result for test aux port (%d).\n", + kprintf("psm%d: strange result for test aux port (%d).\n", unit, i); /* fall though */ case 0: /* no error */ @@ -1009,7 +1009,7 @@ psmprobe(device_t dev) break; restore_controller(sc->kbdc, command_byte); if (verbose) - printf("psm%d: the aux port is not functioning (%d).\n", + kprintf("psm%d: the aux port is not functioning (%d).\n", unit, i); endprobe(ENXIO); } @@ -1032,12 +1032,12 @@ psmprobe(device_t dev) recover_from_error(sc->kbdc); restore_controller(sc->kbdc, command_byte); if (verbose) - printf("psm%d: failed to reset the aux device.\n", unit); + kprintf("psm%d: failed to reset the aux device.\n", unit); endprobe(ENXIO); } else if (!reset_aux_dev(sc->kbdc)) { recover_from_error(sc->kbdc); if (verbose >= 2) - printf("psm%d: failed to reset the aux device (2).\n", + kprintf("psm%d: failed to reset the aux device (2).\n", unit); } } @@ -1053,7 +1053,7 @@ psmprobe(device_t dev) recover_from_error(sc->kbdc); restore_controller(sc->kbdc, command_byte); if (verbose) - printf("psm%d: failed to enable the aux device.\n", unit); + kprintf("psm%d: failed to enable the aux device.\n", unit); endprobe(ENXIO); } @@ -1074,7 +1074,7 @@ psmprobe(device_t dev) if (!is_a_mouse(sc->hw.hwid)) { restore_controller(sc->kbdc, command_byte); if (verbose) - printf("psm%d: unknown device type (%d).\n", unit, sc->hw.hwid); + kprintf("psm%d: unknown device type (%d).\n", unit, sc->hw.hwid); endprobe(ENXIO); } switch (sc->hw.hwid) { @@ -1104,7 +1104,7 @@ psmprobe(device_t dev) for (i = 0; vendortype[i].probefunc != NULL; ++i) { if ((*vendortype[i].probefunc)(sc)) { if (verbose >= 2) - printf("psm%d: found %s\n", + kprintf("psm%d: found %s\n", unit, model_name(vendortype[i].model)); break; } @@ -1135,7 +1135,7 @@ psmprobe(device_t dev) */ i = send_aux_command(sc->kbdc, PSMC_SET_DEFAULTS); if (verbose >= 2) - printf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i); + kprintf("psm%d: SET_DEFAULTS return code:%04x\n", unit, i); #endif if (sc->config & PSM_CONFIG_RESOLUTION) { sc->mode.resolution @@ -1152,7 +1152,7 @@ psmprobe(device_t dev) /* request a data packet and extract sync. bits */ if (get_mouse_status(sc->kbdc, stat, 1, 3) < 3) { - printf("psm%d: failed to get data.\n", unit); + kprintf("psm%d: failed to get data.\n", unit); sc->mode.syncmask[0] = 0; } else { sc->mode.syncmask[1] = stat[0] & sc->mode.syncmask[0]; /* syncbits */ @@ -1167,7 +1167,7 @@ psmprobe(device_t dev) * after ACK from the mouse. */ if (get_mouse_status(sc->kbdc, stat, 0, 3) < 3) { - printf("psm%d: failed to get status.\n", unit); + kprintf("psm%d: failed to get status.\n", unit); } else { /* * When in its native mode, some mice operate with different @@ -1187,7 +1187,7 @@ psmprobe(device_t dev) * recover from this error... */ restore_controller(sc->kbdc, command_byte); - printf("psm%d: unable to set the command byte.\n", unit); + kprintf("psm%d: unable to set the command byte.\n", unit); endprobe(ENXIO); } @@ -1196,7 +1196,7 @@ psmprobe(device_t dev) sc->intr = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, irq, irq, 1, RF_ACTIVE); if (sc->intr == NULL) { - printf("psm%d: unable to allocate the IRQ resource (%d).\n", + kprintf("psm%d: unable to allocate the IRQ resource (%d).\n", unit, irq); endprobe(ENXIO); } else { @@ -1245,15 +1245,15 @@ psmattach(device_t dev) make_dev(&psm_ops, PSM_MKMINOR(unit, TRUE), 0, 0, 0666, "bpsm%d", unit); if (!verbose) { - printf("psm%d: model %s, device ID %d\n", + kprintf("psm%d: model %s, device ID %d\n", unit, model_name(sc->hw.model), sc->hw.hwid & 0x00ff); } else { - printf("psm%d: model %s, device ID %d-%02x, %d buttons\n", + kprintf("psm%d: model %s, device ID %d-%02x, %d buttons\n", unit, model_name(sc->hw.model), sc->hw.hwid & 0x00ff, sc->hw.hwid >> 8, sc->hw.buttons); - printf("psm%d: config:%08x, flags:%08x, packet size:%d\n", + kprintf("psm%d: config:%08x, flags:%08x, packet size:%d\n", unit, sc->config, sc->flags, sc->mode.packetsize); - printf("psm%d: syncmask:%02x, syncbits:%02x\n", + kprintf("psm%d: syncmask:%02x, syncbits:%02x\n", unit, sc->mode.syncmask[0], sc->mode.syncmask[1]); } diff --git a/sys/dev/misc/puc/puc.c b/sys/dev/misc/puc/puc.c index a9f55e21db..22e321c77b 100644 --- a/sys/dev/misc/puc/puc.c +++ b/sys/dev/misc/puc/puc.c @@ -1,7 +1,7 @@ /* * $NetBSD: puc.c,v 1.7 2000/07/29 17:43:38 jlam Exp $ * $FreeBSD: src/sys/dev/puc/puc.c,v 1.3.2.5 2003/04/04 08:42:17 sobomax Exp $ - * $DragonFly: src/sys/dev/misc/puc/puc.c,v 1.10 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/puc/puc.c,v 1.11 2006/12/22 23:26:18 swildner Exp $ */ /*- @@ -226,7 +226,7 @@ puc_pci_attach(device_t dev) #ifdef PUC_DEBUG bootverbose = 1; - printf("puc: name: %s\n", sc->sc_desc->name); + kprintf("puc: name: %s\n", sc->sc_desc->name); #endif rid = 0; res = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, @@ -262,7 +262,7 @@ puc_pci_attach(device_t dev) res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, 1, RF_ACTIVE); if (res == NULL) { - printf("could not get resource\n"); + kprintf("could not get resource\n"); continue; } sc->sc_bar_mappings[bidx].res = res; @@ -275,7 +275,7 @@ puc_pci_attach(device_t dev) device_printf(dev, "ILR disabled\n"); } #ifdef PUC_DEBUG - printf("port bst %x, start %x, end %x\n", + kprintf("port bst %x, start %x, end %x\n", (u_int)rman_get_bustag(res), (u_int)rman_get_start(res), (u_int)rman_get_end(res)); #endif @@ -354,7 +354,7 @@ puc_pci_attach(device_t dev) if (!bootverbose) device_quiet(sc->sc_ports[i].dev); #ifdef PUC_DEBUG - printf("puc: type %d, bar %x, offset %x\n", + kprintf("puc: type %d, bar %x, offset %x\n", sc->sc_desc->ports[i].type, sc->sc_desc->ports[i].bar, sc->sc_desc->ports[i].offset); @@ -490,7 +490,7 @@ puc_print_win877(bus_space_tag_t bst, bus_space_handle_t bsh, u_int efir, cr2c = rdspio(0x2c); cr31 = rdspio(0x31); cr32 = rdspio(0x32); - printf("877T: cr00 %x, cr01 %x, cr04 %x, cr09 %x, cr0d %x, cr14 %x, " + kprintf("877T: cr00 %x, cr01 %x, cr04 %x, cr09 %x, cr0d %x, cr14 %x, " "cr15 %x, cr16 %x, cr17 %x, cr18 %x, cr19 %x, cr24 %x, cr25 %x, " "cr28 %x, cr2c %x, cr31 %x, cr32 %x\n", cr00, cr01, cr04, cr09, cr0d, cr14, cr15, cr16, cr17, @@ -515,12 +515,12 @@ puc_config_win877(struct resource *res) efdr = 0x252; val = rdspio(0x09) & 0x0f; if (val != 0x0c) { - printf("conf_win877: Oops not a W83877TF\n"); + kprintf("conf_win877: Oops not a W83877TF\n"); return; } #ifdef PUC_DEBUG - printf("before: "); + kprintf("before: "); puc_print_win877(bst, bsh, efir, efdr); #endif @@ -536,7 +536,7 @@ puc_config_win877(struct resource *res) wrspio(0x28, 0x43); #ifdef PUC_DEBUG - printf("after: "); + kprintf("after: "); puc_print_win877(bst, bsh, efir, efdr); #endif @@ -549,12 +549,12 @@ puc_config_win877(struct resource *res) efdr = 0x3f1; val = rdspio(0x09) & 0x0f; if (val != 0x0c) { - printf("conf_win877: Oops not a W83877TF\n"); + kprintf("conf_win877: Oops not a W83877TF\n"); return; } #ifdef PUC_DEBUG - printf("before: "); + kprintf("before: "); puc_print_win877(bst, bsh, efir, efdr); #endif @@ -570,7 +570,7 @@ puc_config_win877(struct resource *res) wrspio(0x28, 0x43); #ifdef PUC_DEBUG - printf("after: "); + kprintf("after: "); puc_print_win877(bst, bsh, efir, efdr); #endif @@ -597,7 +597,7 @@ static int puc_find_free_unit(char *name) while (devclass_get_device(dc, unit)) unit++; #ifdef PUC_DEBUG - printf("puc: Using %s%d\n", name, unit); + kprintf("puc: Using %s%d\n", name, unit); #endif return (unit); } @@ -608,10 +608,10 @@ puc_print_resource_list(struct resource_list *rl) { struct resource_list_entry *rle; - printf("print_resource_list: rl %p\n", rl); + kprintf("print_resource_list: rl %p\n", rl); SLIST_FOREACH(rle, rl, link) - printf("type %x, rid %x\n", rle->type, rle->rid); - printf("print_resource_list: end.\n"); + kprintf("type %x, rid %x\n", rle->type, rle->rid); + kprintf("print_resource_list: end.\n"); } #endif @@ -628,7 +628,7 @@ puc_alloc_resource(device_t dev, device_t child, int type, int *rid, rl = &pdev->resources; #ifdef PUC_DEBUG - printf("puc_alloc_resource: pdev %p, looking for t %x, r %x\n", + kprintf("puc_alloc_resource: pdev %p, looking for t %x, r %x\n", pdev, type, *rid); puc_print_resource_list(rl); #endif @@ -639,11 +639,11 @@ puc_alloc_resource(device_t dev, device_t child, int type, int *rid, end = rle->end; count = rle->count; #ifdef PUC_DEBUG - printf("found rle, %lx, %lx, %lx\n", start, end, count); + kprintf("found rle, %lx, %lx, %lx\n", start, end, count); #endif retval = rle->res; } else - printf("oops rle is gone\n"); + kprintf("oops rle is gone\n"); return (retval); } @@ -667,25 +667,25 @@ puc_get_resource(device_t dev, device_t child, int type, int rid, rl = &pdev->resources; #ifdef PUC_DEBUG - printf("puc_get_resource: pdev %p, looking for t %x, r %x\n", pdev, + kprintf("puc_get_resource: pdev %p, looking for t %x, r %x\n", pdev, type, rid); puc_print_resource_list(rl); #endif rle = resource_list_find(rl, type, rid); if (rle) { #ifdef PUC_DEBUG - printf("found rle %p,", rle); + kprintf("found rle %p,", rle); #endif if (startp != NULL) *startp = rle->start; if (countp != NULL) *countp = rle->count; #ifdef PUC_DEBUG - printf(" %lx, %lx\n", rle->start, rle->count); + kprintf(" %lx, %lx\n", rle->start, rle->count); #endif return (0); } else - printf("oops rle is gone\n"); + kprintf("oops rle is gone\n"); return (ENXIO); } diff --git a/sys/dev/misc/snp/snp.c b/sys/dev/misc/snp/snp.c index 05a0a50097..7964fb5edb 100644 --- a/sys/dev/misc/snp/snp.c +++ b/sys/dev/misc/snp/snp.c @@ -13,7 +13,7 @@ * Snoop stuff. * * $FreeBSD: src/sys/dev/snp/snp.c,v 1.69.2.2 2002/05/06 07:30:02 dd Exp $ - * $DragonFly: src/sys/dev/misc/snp/snp.c,v 1.17 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/misc/snp/snp.c,v 1.18 2006/12/22 23:26:18 swildner Exp $ */ #include @@ -195,7 +195,7 @@ snpwrite(struct dev_write_args *ap) tp->t_line == snooplinedisc) goto tty_input; - printf("Snoop: attempt to write to bad tty.\n"); + kprintf("Snoop: attempt to write to bad tty.\n"); return (EIO); tty_input: @@ -293,12 +293,12 @@ snp_in(struct snoop *snp, char *buf, int n) return (0); if (snp->snp_flags & SNOOP_DOWN) { - printf("Snoop: more data to down interface.\n"); + kprintf("Snoop: more data to down interface.\n"); return (0); } if (snp->snp_flags & SNOOP_OFLOW) { - printf("Snoop: buffer overflow.\n"); + kprintf("Snoop: buffer overflow.\n"); /* * On overflow we just repeat the standart close * procedure...yes , this is waste of space but.. Then next @@ -416,7 +416,7 @@ snp_detach(struct snoop *snp) tp->t_state &= ~TS_SNOOP; tp->t_line = snp->snp_olddisc; } else - printf("Snoop: bad attached tty data.\n"); + kprintf("Snoop: bad attached tty data.\n"); snp->snp_tty = NULL; snp->snp_target = NOCDEV; diff --git a/sys/dev/misc/spic/spic.c b/sys/dev/misc/spic/spic.c index cc2872b51a..71bf771a94 100644 --- a/sys/dev/misc/spic/spic.c +++ b/sys/dev/misc/spic/spic.c @@ -48,7 +48,7 @@ * also provided sample code upon which this driver was based. * * $FreeBSD: src/sys/i386/isa/spic.c,v 1.4.2.1 2002/04/15 00:52:12 will Exp $ - * $DragonFly: src/sys/dev/misc/spic/spic.c,v 1.15 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/spic/spic.c,v 1.16 2006/12/22 23:26:18 swildner Exp $ */ #include @@ -157,7 +157,7 @@ busy_wait(struct spic_softc *sc) while(read_port2(sc) & 2) { DELAY(10); if (i++>10000) { - printf("spic busy wait abort\n"); + kprintf("spic busy wait abort\n"); return; } } @@ -171,7 +171,7 @@ busy_wait_cst(struct spic_softc *sc, int mask) while(read_port_cst(sc) & mask) { DELAY(10); if (i++>10000) { - printf("spic busy wait abort\n"); + kprintf("spic busy wait abort\n"); return; } } @@ -415,13 +415,13 @@ spictimeout(void *arg) } break; case 0x60: /* Capture button */ - printf("Capture button event: %x\n",param); + kprintf("Capture button event: %x\n",param); break; case 0x30: /* Lid switch */ - printf("Lid switch event: %x\n",param); + kprintf("Lid switch event: %x\n",param); break; default: - printf("Unknown event: event %02x param %02x\n", event, param); + kprintf("Unknown event: event %02x param %02x\n", event, param); break; } else { diff --git a/sys/dev/misc/syscons/apm/apm_saver.c b/sys/dev/misc/syscons/apm/apm_saver.c index 5ff1f2d51c..bb24bd0d26 100644 --- a/sys/dev/misc/syscons/apm/apm_saver.c +++ b/sys/dev/misc/syscons/apm/apm_saver.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/modules/syscons/apm/apm_saver.c,v 1.1.4.2 2001/03/07 21:47:24 nsayer Exp $ - * $DragonFly: src/sys/dev/misc/syscons/apm/apm_saver.c,v 1.8 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/apm/apm_saver.c,v 1.9 2006/12/22 23:26:18 swildner Exp $ */ #include @@ -71,7 +71,7 @@ static int apm_init(video_adapter_t *adp) { if (!apm_softc.initialized || !apm_softc.active) - printf("WARNING: apm_saver module requires apm enabled\n"); + kprintf("WARNING: apm_saver module requires apm enabled\n"); return 0; } diff --git a/sys/dev/misc/syscons/syscons.c b/sys/dev/misc/syscons/syscons.c index 78c70c155f..08659c6f02 100644 --- a/sys/dev/misc/syscons/syscons.c +++ b/sys/dev/misc/syscons/syscons.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/dev/syscons/syscons.c,v 1.336.2.17 2004/03/25 08:41:09 ru Exp $ - * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.28 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.29 2006/12/22 23:26:18 swildner Exp $ */ #include "use_splash.h" @@ -213,7 +213,7 @@ sc_probe_unit(int unit, int flags) { if (!scvidprobe(unit, flags, FALSE)) { if (bootverbose) - printf("sc%d: no video adapter found.\n", unit); + kprintf("sc%d: no video adapter found.\n", unit); return ENXIO; } @@ -346,18 +346,18 @@ sc_attach_unit(int unit, int flags) kbd_ioctl(sc->kbd, KDSKBMODE, (caddr_t)&scp->kbd_mode); update_kbd_state(scp, scp->status, LOCK_MASK); - printf("sc%d: %s <%d virtual consoles, flags=0x%x>\n", + kprintf("sc%d: %s <%d virtual consoles, flags=0x%x>\n", unit, adapter_name(sc->adp), sc->vtys, sc->config); if (bootverbose) { - printf("sc%d:", unit); + kprintf("sc%d:", unit); if (sc->adapter >= 0) - printf(" fb%d", sc->adapter); + kprintf(" fb%d", sc->adapter); if (sc->keyboard >= 0) - printf(", kbd%d", sc->keyboard); + kprintf(", kbd%d", sc->keyboard); if (scp->tsw) - printf(", terminal emulator: %s (%s)", + kprintf(", terminal emulator: %s (%s)", scp->tsw->te_name, scp->tsw->te_desc); - printf("\n"); + kprintf("\n"); } /* register a shutdown callback for the kernel console */ @@ -1685,11 +1685,11 @@ scrn_update(scr_stat *scp, int show_cursor) #if 1 /* debug: XXX */ if (scp->end >= scp->xsize*scp->ysize) { - printf("scrn_update(): scp->end %d > size_of_screen!!\n", scp->end); + kprintf("scrn_update(): scp->end %d > size_of_screen!!\n", scp->end); scp->end = scp->xsize*scp->ysize - 1; } if (scp->start < 0) { - printf("scrn_update(): scp->start %d < 0\n", scp->start); + kprintf("scrn_update(): scp->start %d < 0\n", scp->start); scp->start = 0; } #endif @@ -1835,7 +1835,7 @@ scsplash_saver(sc_softc_t *sc, int show) sc->flags |= SC_SAVER_FAILED; scsplash_stick(FALSE); restore_scrn_saver_mode(scp, TRUE); - printf("scsplash_saver(): failed to put up the image\n"); + kprintf("scsplash_saver(): failed to put up the image\n"); break; } } @@ -3133,7 +3133,7 @@ next_code: #ifdef DDB Debugger("manual escape to debugger"); #else - printf("No debugger in kernel\n"); + kprintf("No debugger in kernel\n"); #endif #else /* SC_DISABLE_DDBKEY */ /* do nothing */ diff --git a/sys/dev/misc/syscons/syscons.h b/sys/dev/misc/syscons/syscons.h index f3d0cf9522..02aebe0348 100644 --- a/sys/dev/misc/syscons/syscons.h +++ b/sys/dev/misc/syscons/syscons.h @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/syscons/syscons.h,v 1.60.2.6 2002/09/15 22:30:45 dd Exp $ - * $DragonFly: src/sys/dev/misc/syscons/syscons.h,v 1.17 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/syscons.h,v 1.18 2006/12/22 23:26:18 swildner Exp $ */ #ifndef _DEV_SYSCONS_SYSCONS_H_ @@ -85,7 +85,7 @@ MALLOC_DECLARE(M_SYSCONS); #define SC_DEBUG_LEVEL 0 #endif -#define DPRINTF(l, p) if (SC_DEBUG_LEVEL >= (l)) printf p +#define DPRINTF(l, p) if (SC_DEBUG_LEVEL >= (l)) kprintf p #define SC_DRIVER_NAME "sc" #define SC_VTY(dev) minor(dev) diff --git a/sys/dev/misc/xrpu/xrpu.c b/sys/dev/misc/xrpu/xrpu.c index d2d7b90c3e..a3fc4f8d22 100644 --- a/sys/dev/misc/xrpu/xrpu.c +++ b/sys/dev/misc/xrpu/xrpu.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/pci/xrpu.c,v 1.19.2.1 2000/08/02 22:19:57 peter Exp $ - * $DragonFly: src/sys/dev/misc/xrpu/Attic/xrpu.c,v 1.12 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/misc/xrpu/Attic/xrpu.c,v 1.13 2006/12/22 23:26:18 swildner Exp $ * * A very simple device driver for PCI cards based on Xilinx 6200 series * FPGA/RPU devices. Current Functionality is to allow you to open and @@ -244,7 +244,7 @@ xrpu_attach(device_t self) sc->virbase62 = (u_int *)(sc->virbase + 0x800000); if (bootverbose) - printf("Mapped physbase %#lx to virbase %#lx\n", + kprintf("Mapped physbase %#lx to virbase %#lx\n", (u_long)sc->physbase, (u_long)sc->virbase); dev_ops_add(&xrpu_ops, -1, unit); diff --git a/sys/dev/netif/acx/if_acx.c b/sys/dev/netif/acx/if_acx.c index 1b83b5788d..93dcdfa09c 100644 --- a/sys/dev/netif/acx/if_acx.c +++ b/sys/dev/netif/acx/if_acx.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/dev/netif/acx/if_acx.c,v 1.11 2006/12/09 08:10:04 sephe Exp $ + * $DragonFly: src/sys/dev/netif/acx/if_acx.c,v 1.12 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -373,10 +373,10 @@ acx_attach(device_t dev) error = acx_read_eeprom(sc, i, &val); if (i % 10 == 0) - printf("\n"); - printf("%02x ", val); + kprintf("\n"); + kprintf("%02x ", val); } - printf("\n"); + kprintf("\n"); #endif /* DUMP_EEPROM */ /* Get EEPROM version */ @@ -1358,24 +1358,24 @@ acx_txerr(struct acx_softc *sc, uint8_t err) #if 0 case DESC_ERR_OTHER_FRAG: /* XXX what's this */ - printf("error in other fragment\n"); + kprintf("error in other fragment\n"); stats->err_oth_frag++; break; #endif case DESC_ERR_ABORT: - printf("aborted\n"); + kprintf("aborted\n"); stats->err_abort++; break; case DESC_ERR_PARAM: - printf("wrong paramters in descriptor\n"); + kprintf("wrong paramters in descriptor\n"); stats->err_param++; break; case DESC_ERR_NO_WEPKEY: - printf("WEP key missing\n"); + kprintf("WEP key missing\n"); stats->err_no_wepkey++; break; case DESC_ERR_MSDU_TIMEOUT: - printf("MSDU life timeout\n"); + kprintf("MSDU life timeout\n"); stats->err_msdu_timeout++; break; case DESC_ERR_EXCESSIVE_RETRY: @@ -1388,15 +1388,15 @@ acx_txerr(struct acx_softc *sc, uint8_t err) stats->err_ex_retry++; break; case DESC_ERR_BUF_OVERFLOW: - printf("buffer overflow\n"); + kprintf("buffer overflow\n"); stats->err_buf_oflow++; break; case DESC_ERR_DMA: - printf("DMA error\n"); + kprintf("DMA error\n"); stats->err_dma++; break; default: - printf("unknown error %d\n", err); + kprintf("unknown error %d\n", err); stats->err_unkn++; break; } diff --git a/sys/dev/netif/an/if_an.c b/sys/dev/netif/an/if_an.c index 12ffc8da09..4faf95b24a 100644 --- a/sys/dev/netif/an/if_an.c +++ b/sys/dev/netif/an/if_an.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/an/if_an.c,v 1.2.2.13 2003/02/11 03:32:48 ambrisko Exp $ - * $DragonFly: src/sys/dev/netif/an/if_an.c,v 1.40 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/an/if_an.c,v 1.41 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -255,7 +255,7 @@ sysctl_an_dump(SYSCTL_HANDLER_ARGS) an_dump = r; } if (an_dump != last) - printf("Sysctl changed for Aironet driver\n"); + kprintf("Sysctl changed for Aironet driver\n"); return error; } @@ -1199,7 +1199,7 @@ an_cmd_struct(struct an_softc *sc, struct an_command *cmd, break; } if( i == AN_TIMEOUT) { - printf("BUSY\n"); + kprintf("BUSY\n"); return(ETIMEDOUT); } @@ -1454,7 +1454,7 @@ an_write_record(struct an_softc *sc, struct an_ltv_gen *ltv) break; } if (i == AN_TIMEOUT) { - printf("BUSY\n"); + kprintf("BUSY\n"); } an_rid_desc.an_valid = 1; @@ -1523,7 +1523,7 @@ an_dump_record(struct an_softc *sc, struct an_ltv_gen *ltv, char *string) ptr2 = (u_int8_t *)<v->an_val; for (i = len; i > 0; i--) { - printf("%02x ", *ptr2); + kprintf("%02x ", *ptr2); temp = *ptr2++; if (temp >= ' ' && temp <= '~') @@ -1534,15 +1534,15 @@ an_dump_record(struct an_softc *sc, struct an_ltv_gen *ltv, char *string) buf[count] = '.'; if (++count == 16) { count = 0; - printf("%s\n",buf); + kprintf("%s\n",buf); if_printf(&sc->arpcom.ac_if, "\t"); bzero(buf,sizeof(buf)); } } for (; count != 16; count++) { - printf(" "); + kprintf(" "); } - printf(" %s\n",buf); + kprintf(" %s\n",buf); } } @@ -1932,7 +1932,7 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr) max = (sc->areq.an_len - 4) / sizeof(struct an_ltv_ssid_entry); if ( max > MAX_SSIDS ) { - printf("To many SSIDs only using " + kprintf("To many SSIDs only using " "%d of %d\n", MAX_SSIDS, max); max = MAX_SSIDS; @@ -1969,7 +1969,7 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr) max = (sc->areq.an_len - 4) / sizeof(struct an_ltv_ssid_entry); if (max > MAX_SSIDS) { - printf("To many SSIDs only using " + kprintf("To many SSIDs only using " "%d of %d\n", MAX_SSIDS, max); max = MAX_SSIDS; @@ -2184,7 +2184,7 @@ an_ioctl(struct ifnet *ifp, u_long command, caddr_t data, struct ucred *cr) max = (sc->areq.an_len - 4) / sizeof(struct an_ltv_ssid_entry); if (max > MAX_SSIDS) { - printf("To many SSIDs only using " + kprintf("To many SSIDs only using " "%d of %d\n", MAX_SSIDS, max); max = MAX_SSIDS; @@ -3290,7 +3290,7 @@ setflashmode(struct ifnet *ifp) FLASH_DELAY(500); if (!(status = WaitBusy(ifp, AN_TIMEOUT))) { - printf("Waitbusy hang after setflash mode\n"); + kprintf("Waitbusy hang after setflash mode\n"); return -EIO; } return 0; diff --git a/sys/dev/netif/ar/if_ar.c b/sys/dev/netif/ar/if_ar.c index e330924204..1da3972fe1 100644 --- a/sys/dev/netif/ar/if_ar.c +++ b/sys/dev/netif/ar/if_ar.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ar/if_ar.c,v 1.66 2005/01/06 01:42:28 imp Exp $ - * $DragonFly: src/sys/dev/netif/ar/if_ar.c,v 1.20 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ar/if_ar.c,v 1.21 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -260,7 +260,7 @@ ar_attach(device_t device) hc = (struct ar_hardc *)device_get_softc(device); lwkt_serialize_init(&ar_serializer); - printf("arc%d: %uK RAM, %u ports, rev %u.\n", + kprintf("arc%d: %uK RAM, %u ports, rev %u.\n", hc->cunit, hc->memsize/1024, hc->numports, @@ -316,7 +316,7 @@ ar_attach(device_t device) case AR_IFACE_COMBO: iface = "COMBO X.21 / EIA-530"; break; } - printf("ar%d: Adapter %d, port %d, interface %s.\n", + kprintf("ar%d: Adapter %d, port %d, interface %s.\n", sc->unit, hc->cunit, sc->subunit, @@ -364,7 +364,7 @@ ar_detach(device_t device) if (hc->intr_cookie != NULL) { if (BUS_TEARDOWN_INTR(parent, device, hc->res_irq, hc->intr_cookie) != 0) { - printf("intr teardown failed.. continuing\n"); + kprintf("intr teardown failed.. continuing\n"); } hc->intr_cookie = NULL; } @@ -514,14 +514,14 @@ arintr(void *arg) arisr = ar_inb(hc, AR_ISTAT); while(arisr & AR_BD_INT) { - TRC(printf("arisr = %x\n", arisr)); + TRC(kprintf("arisr = %x\n", arisr)); if(arisr & AR_INT_0) scano = 0; else if(arisr & AR_INT_1) scano = 1; else { /* XXX Oops this shouldn't happen. */ - printf("arc%d: Interrupted with no interrupt.\n", + kprintf("arc%d: Interrupted with no interrupt.\n", hc->cunit); return; } @@ -534,7 +534,7 @@ arintr(void *arg) isr1 = sca->isr1; isr2 = sca->isr2; - TRC(printf("arc%d: ARINTR isr0 %x, isr1 %x, isr2 %x\n", + TRC(kprintf("arc%d: ARINTR isr0 %x, isr1 %x, isr2 %x\n", hc->cunit, isr0, isr1, @@ -687,7 +687,7 @@ top_arstart: for(;;) { len = mtx->m_pkthdr.len; - TRC(printf("ar%d: ARstart len %u\n", sc->unit, len)); + TRC(kprintf("ar%d: ARstart len %u\n", sc->unit, len)); /* * We can do this because the tx buffers don't wrap. @@ -752,11 +752,11 @@ top_arstart: blkp->txeda = (u_short)((u_int)&txdesc[i]); #if 0 - printf("ARstart: %p desc->cp %x\n", &txdesc->cp, txdesc->cp); - printf("ARstart: %p desc->bp %x\n", &txdesc->bp, txdesc->bp); - printf("ARstart: %p desc->bpb %x\n", &txdesc->bpb, txdesc->bpb); - printf("ARstart: %p desc->len %x\n", &txdesc->len, txdesc->len); - printf("ARstart: %p desc->stat %x\n", &txdesc->stat, txdesc->stat); + kprintf("ARstart: %p desc->cp %x\n", &txdesc->cp, txdesc->cp); + kprintf("ARstart: %p desc->bp %x\n", &txdesc->bp, txdesc->bp); + kprintf("ARstart: %p desc->bpb %x\n", &txdesc->bpb, txdesc->bpb); + kprintf("ARstart: %p desc->len %x\n", &txdesc->len, txdesc->len); + kprintf("ARstart: %p desc->stat %x\n", &txdesc->stat, txdesc->stat); #endif sc->txb_inuse++; @@ -838,7 +838,7 @@ arwatchdog(struct ar_softc *sc) ARC_SET_SCA(sc->hc, sc->scano); /* XXX if(sc->ifsppp.pp_if.if_flags & IFF_DEBUG) */ - printf("ar%d: transmit failed, " + kprintf("ar%d: transmit failed, " "ST0 %x, ST1 %x, ST3 %x, DSR %x.\n", sc->unit, msci->st0, @@ -878,7 +878,7 @@ ar_up(struct ar_softc *sc) sca = sc->sca; msci = &sca->msci[sc->scachan]; - TRC(printf("ar%d: sca %p, msci %p, ch %d\n", + TRC(kprintf("ar%d: sca %p, msci %p, ch %d\n", sc->unit, sca, msci, sc->scachan)); /* @@ -996,9 +996,9 @@ ar_read_pim_iface(volatile struct ar_hardc *hc, int channel) *pimctrl = 0x00; *pimctrl = AR_PIM_READ; x = *pimctrl; - TRC(printf("x = %x", x)); + TRC(kprintf("x = %x", x)); if(x & AR_PIM_DATA) { - printf("No PIM installed\n"); + kprintf("No PIM installed\n"); return (AR_IFACE_UNKNOWN); } @@ -1010,7 +1010,7 @@ ar_read_pim_iface(volatile struct ar_hardc *hc, int channel) *pimctrl = AR_PIM_READ; *pimctrl = AR_PIM_READ | AR_PIM_STROBE; x = *pimctrl; - TRC(printf(" %x ", x)); + TRC(kprintf(" %x ", x)); x = (x >> 1) & 0x01; val |= x << i; if(i == 8 && (val & 0x000f) == 0x0004) { @@ -1038,7 +1038,7 @@ ar_read_pim_iface(volatile struct ar_hardc *hc, int channel) x = *pimctrl; if(x & AR_PIM_DATA) - printf("\nOops A2D start bit not zero (%X)\n", x); + kprintf("\nOops A2D start bit not zero (%X)\n", x); for(ii = 7; ii >= 0; ii--) { *pimctrl = 0x00; @@ -1049,7 +1049,7 @@ ar_read_pim_iface(volatile struct ar_hardc *hc, int channel) } } } - TRC(printf("\nPIM val %x, ctype %x, %d\n", val, ctype, ctype)); + TRC(kprintf("\nPIM val %x, ctype %x, %d\n", val, ctype, ctype)); *pimctrl = AR_PIM_MODEG; *pimctrl = AR_PIM_MODEG | AR_PIM_AUTO_LED; if(ctype > 255) @@ -1125,7 +1125,7 @@ arc_init(struct ar_hardc *hc) mar = memst >> 16; isr = irqtable[hc->isa_irq] << 1; if(isr == 0) - printf("ar%d: Warning illegal interrupt %d\n", + kprintf("ar%d: Warning illegal interrupt %d\n", hc->cunit, hc->isa_irq); isr = isr | ((memst & 0xc000) >> 10); @@ -1192,7 +1192,7 @@ arc_init(struct ar_hardc *hc) / AR_BUF_SIZ; next += bufmem; - TRC(printf("ar%d: blk %d: txdesc %x, txstart %x, " + TRC(kprintf("ar%d: blk %d: txdesc %x, txstart %x, " "txend %x, txmax %d\n", x, blk, @@ -1211,7 +1211,7 @@ arc_init(struct ar_hardc *hc) sc->rxend = next + bufmem; sc->rxmax = (sc->rxend - sc->rxstart) / AR_BUF_SIZ; next += bufmem; - TRC(printf("ar%d: rxdesc %x, rxstart %x, " + TRC(kprintf("ar%d: rxdesc %x, rxstart %x, " "rxend %x, rxmax %d\n", x, sc->rxdesc, sc->rxstart, sc->rxend, sc->rxmax)); } @@ -1386,7 +1386,7 @@ ar_init_rx_dmac(struct ar_softc *sc) x++; if(x < 6) - TRC(printf("Descrp %p, data pt %x, data %x, ", + TRC(kprintf("Descrp %p, data pt %x, data %x, ", rxd, rxda, rxbuf)); rxd->bp = (u_short)(rxbuf & 0xfffful); @@ -1395,7 +1395,7 @@ ar_init_rx_dmac(struct ar_softc *sc) rxd->stat = 0xff; /* The sca write here when it is finished. */ if(x < 6) - TRC(printf("bpb %x, bp %x.\n", rxd->bpb, rxd->bp)); + TRC(kprintf("bpb %x, bp %x.\n", rxd->bpb, rxd->bp)); } rxd--; rxd->cp = (u_short)(sc->rxdesc & 0xfffful); @@ -1457,7 +1457,7 @@ ar_init_tx_dmac(struct ar_softc *sc) txd->bp = (u_short)(txbuf & 0xfffful); txd->bpb = (u_char)((txbuf >> 16) & 0xff); - TRC(printf("ar%d: txbuf %x, bpb %x, bp %x\n", + TRC(kprintf("ar%d: txbuf %x, bpb %x, bp %x\n", sc->unit, txbuf, txd->bpb, txd->bp)); txd->len = 0; txd->stat = 0; @@ -1466,7 +1466,7 @@ ar_init_tx_dmac(struct ar_softc *sc) txd->cp = (u_short)(blkp->txdesc & 0xfffful); blkp->txtail = (u_int)txd - (u_int)sc->hc->mem_start; - TRC(printf("TX Descriptors start %x, end %x.\n", + TRC(kprintf("TX Descriptors start %x, end %x.\n", blkp->txdesc, blkp->txtail)); } @@ -1525,7 +1525,7 @@ ar_packet_avail(struct ar_softc *sc, if(rxdesc->stat & SCA_DESC_EOM) { *rxstat = rxdesc->stat; - TRC(printf("ar%d: PKT AVAIL len %d, %x.\n", + TRC(kprintf("ar%d: PKT AVAIL len %d, %x.\n", sc->unit, *len, *rxstat)); return (1); } @@ -1627,7 +1627,7 @@ ar_eat_packet(struct ar_softc *sc, int single) while(rxdesc != cda) { loopcnt++; if(loopcnt > sc->rxmax) { - printf("ar%d: eat pkt %d loop, cda %p, " + kprintf("ar%d: eat pkt %d loop, cda %p, " "rxdesc %p, stat %x.\n", sc->unit, loopcnt, @@ -1685,7 +1685,7 @@ ar_get_packets(struct ar_softc *sc) #endif while(ar_packet_avail(sc, &len, &rxstat)) { - TRC(printf("apa: len %d, rxstat %x\n", len, rxstat)); + TRC(kprintf("apa: len %d, rxstat %x\n", len, rxstat)); if(((rxstat & SCA_DESC_ERRORS) == 0) && (len < MCLBYTES)) { m = m_getl(len, MB_DONTWAIT, MT_DATA, M_PKTHDR, NULL); if(m == NULL) { @@ -1750,7 +1750,7 @@ ar_get_packets(struct ar_softc *sc) if(sc->hc->bustype == AR_BUS_ISA) ARC_SET_SCA(sc->hc, sc->scano); - TRCL(printf("ar%d: Receive error chan %d, " + TRCL(kprintf("ar%d: Receive error chan %d, " "stat %x, msci st3 %x," "rxhind %d, cda %x, eda %x.\n", sc->unit, @@ -1811,7 +1811,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) /* Counter overflow */ if(dsr & SCA_DSR_COF) { - printf("ar%d: TX DMA Counter overflow, " + kprintf("ar%d: TX DMA Counter overflow, " "txpacket no %lu.\n", sc->unit, #ifndef NETGRAPH @@ -1825,7 +1825,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) /* Buffer overflow */ if(dsr & SCA_DSR_BOF) { - printf("ar%d: TX DMA Buffer overflow, " + kprintf("ar%d: TX DMA Buffer overflow, " "txpacket no %lu, dsr %02x, " "cda %04x, eda %04x.\n", sc->unit, @@ -1880,7 +1880,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) dsr = dmac->dsr; dmac->dsr = dsr; - TRC(printf("AR: RX DSR %x\n", dsr)); + TRC(kprintf("AR: RX DSR %x\n", dsr)); /* End of frame */ if(dsr & SCA_DSR_EOM) { @@ -1899,13 +1899,13 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) if(hc->bustype == AR_BUS_ISA) ARC_SET_SCA(hc, scano); - printf("AR: RXINTR isr1 %x, dsr %x, " + kprintf("AR: RXINTR isr1 %x, dsr %x, " "no data %d pkts, orxhind %d.\n", dotxstart, dsr, tt, ind); - printf("AR: rxdesc %x, rxstart %x, " + kprintf("AR: rxdesc %x, rxstart %x, " "rxend %x, rxhind %d, " "rxmax %d.\n", sc->rxdesc, @@ -1913,7 +1913,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) sc->rxend, sc->rxhind, sc->rxmax); - printf("AR: cda %x, eda %x.\n", + kprintf("AR: cda %x, eda %x.\n", dmac->cda, dmac->eda); @@ -1925,7 +1925,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) (sc->rxdesc & sc->hc->winmsk)); rxdesc = &rxdesc[sc->rxhind]; for(i=0;i<3;i++,rxdesc++) - printf("AR: rxdesc->stat %x, " + kprintf("AR: rxdesc->stat %x, " "len %d.\n", rxdesc->stat, rxdesc->len); @@ -1934,7 +1934,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) /* Counter overflow */ if(dsr & SCA_DSR_COF) { - printf("ar%d: RX DMA Counter overflow, " + kprintf("ar%d: RX DMA Counter overflow, " "rxpkts %lu.\n", sc->unit, #ifndef NETGRAPH @@ -1950,7 +1950,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) if(dsr & SCA_DSR_BOF) { if(hc->bustype == AR_BUS_ISA) ARC_SET_SCA(hc, scano); - printf("ar%d: RX DMA Buffer overflow, " + kprintf("ar%d: RX DMA Buffer overflow, " "rxpkts %lu, rxind %d, " "cda %x, eda %x, dsr %x.\n", sc->unit, @@ -1978,7 +1978,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) sca->msci[mch].cmd = SCA_CMD_RXMSGREJ; dmac->dsr = SCA_DSR_DE; - TRC(printf("ar%d: RX DMA Buffer overflow, " + TRC(kprintf("ar%d: RX DMA Buffer overflow, " "rxpkts %lu, rxind %d, " "cda %x, eda %x, dsr %x. After\n", sc->unit, @@ -1998,7 +1998,7 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) * * XXX We should enable the dma again. */ - printf("ar%d: RX End of transfer, rxpkts %lu.\n", + kprintf("ar%d: RX End of transfer, rxpkts %lu.\n", sc->unit, #ifndef NETGRAPH sc->ifsppp.pp_if.if_ipackets); @@ -2035,13 +2035,13 @@ ar_dmac_intr(struct ar_hardc *hc, int scano, u_char isr1) static void ar_msci_intr(struct ar_hardc *hc, int scano, u_char isr0) { - printf("arc%d: ARINTR: MSCI\n", hc->cunit); + kprintf("arc%d: ARINTR: MSCI\n", hc->cunit); } static void ar_timer_intr(struct ar_hardc *hc, int scano, u_char isr2) { - printf("arc%d: ARINTR: TIMER\n", hc->cunit); + kprintf("arc%d: ARINTR: TIMER\n", hc->cunit); } @@ -2279,7 +2279,7 @@ ngar_shutdown(node_p node) ksprintf(sc->nodename, "%s%d", NG_AR_NODE_TYPE, sc->unit); if (ng_name_node(sc->node, sc->nodename)) { sc->node = NULL; - printf("node naming failed\n"); + kprintf("node naming failed\n"); NG_NODE_UNREF(sc->node); /* node dissappears */ return (0); } @@ -2333,7 +2333,7 @@ static void ngar_init(void *ignored) { if (ng_newtype(&typestruct)) - printf("ngar install failed\n"); + kprintf("ngar install failed\n"); ngar_done_init = 1; } #endif /* NETGRAPH */ diff --git a/sys/dev/netif/ar/if_ar_isa.c b/sys/dev/netif/ar/if_ar_isa.c index 91e610a9aa..57ea2ae698 100644 --- a/sys/dev/netif/ar/if_ar_isa.c +++ b/sys/dev/netif/ar/if_ar_isa.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ar/if_ar_isa.c,v 1.54 2005/01/06 01:42:28 imp Exp $ - * $DragonFly: src/sys/dev/netif/ar/if_ar_isa.c,v 1.5 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ar/if_ar_isa.c,v 1.6 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -175,20 +175,20 @@ ar_isa_attach(device_t device) switch(hc->interface[0]) { case AR_IFACE_EIA_232: - printf("ar%d: The EIA 232 interface is not supported.\n", + kprintf("ar%d: The EIA 232 interface is not supported.\n", hc->cunit); ar_deallocate_resources(device); return (ENXIO); case AR_IFACE_V_35: break; case AR_IFACE_EIA_530: - printf("ar%d: WARNING: The EIA 530 interface is untested.\n", + kprintf("ar%d: WARNING: The EIA 530 interface is untested.\n", hc->cunit); break; case AR_IFACE_X_21: break; case AR_IFACE_COMBO: - printf("ar%d: WARNING: The COMBO interface is untested.\n", + kprintf("ar%d: WARNING: The COMBO interface is untested.\n", hc->cunit); break; } diff --git a/sys/dev/netif/ar/if_ar_pci.c b/sys/dev/netif/ar/if_ar_pci.c index 7d59b909ce..6daf24938c 100644 --- a/sys/dev/netif/ar/if_ar_pci.c +++ b/sys/dev/netif/ar/if_ar_pci.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ar/if_ar_pci.c,v 1.11 2004/05/30 20:08:26 phk Exp $ - * $DragonFly: src/sys/dev/netif/ar/if_ar_pci.c,v 1.6 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ar/if_ar_pci.c,v 1.7 2006/12/22 23:26:18 swildner Exp $ */ #include @@ -103,7 +103,7 @@ ar_pci_probe(device_t device) for (t = ar_devs; t->ar_name != NULL; t++) { if (vendor == t->ar_vid && product == t->ar_did) { if (t->ar_errmsg != NULL) { - printf("%s\n%s\n", t->ar_name, t->ar_errmsg); + kprintf("%s\n%s\n", t->ar_name, t->ar_errmsg); return(ENXIO); } else { device_set_desc(device, t->ar_name); @@ -160,7 +160,7 @@ ar_pci_attach(device_t device) for(i = 1; i < hc->numports; i++) hc->interface[i] = hc->interface[0]; - TRC(printf("arp%d: bus %x, rev %d, memstart %p, winsize %d, " + TRC(kprintf("arp%d: bus %x, rev %d, memstart %p, winsize %d, " "winmsk %x, interface %x\n", unit, hc->bustype, hc->revision, hc->mem_start, hc->winsize, hc->winmsk, hc->interface[0])); diff --git a/sys/dev/netif/ath/ath/if_ath.c b/sys/dev/netif/ath/ath/if_ath.c index 5bc460496e..04be040630 100644 --- a/sys/dev/netif/ath/ath/if_ath.c +++ b/sys/dev/netif/ath/ath/if_ath.c @@ -34,7 +34,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/if_ath.c,v 1.94.2.17 2006/04/19 16:14:47 sam Exp $ - * $DragonFly: src/sys/dev/netif/ath/ath/if_ath.c,v 1.4 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ath/ath/if_ath.c,v 1.5 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -213,7 +213,7 @@ TUNABLE_INT("hw.ath.txbuf", &ath_txbuf); #ifdef ATH_DEBUG static int ath_debug = 0; SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, - 0, "control debugging printfs"); + 0, "control debugging kprintfs"); TUNABLE_INT("hw.ath.debug", &ath_debug); enum { ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ @@ -244,7 +244,7 @@ enum { (sc->sc_ic.ic_if.if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) #define DPRINTF(sc, m, fmt, ...) do { \ if (sc->sc_debug & (m)) \ - printf(fmt, __VA_ARGS__); \ + kprintf(fmt, __VA_ARGS__); \ } while (0) #define KEYPRINTF(sc, ix, hk, mac) do { \ if (sc->sc_debug & ATH_DEBUG_KEYCACHE) \ @@ -1363,16 +1363,16 @@ ath_keyprint(const char *tag, u_int ix, }; int i, n; - printf("%s: [%02u] %-7s ", tag, ix, ciphers[hk->kv_type]); + kprintf("%s: [%02u] %-7s ", tag, ix, ciphers[hk->kv_type]); for (i = 0, n = hk->kv_len; i < n; i++) - printf("%02x", hk->kv_val[i]); - printf(" mac %6D", mac, ":"); + kprintf("%02x", hk->kv_val[i]); + kprintf(" mac %6D", mac, ":"); if (hk->kv_type == HAL_CIPHER_TKIP) { - printf(" mic "); + kprintf(" mic "); for (i = 0; i < sizeof(hk->kv_mic); i++) - printf("%02x", hk->kv_mic[i]); + kprintf("%02x", hk->kv_mic[i]); } - printf("\n"); + kprintf("\n"); } #endif @@ -4074,7 +4074,7 @@ ath_stoprecv(struct ath_softc *sc) struct ath_buf *bf; u_int ix; - printf("%s: rx queue %p, link %p\n", __func__, + kprintf("%s: rx queue %p, link %p\n", __func__, (caddr_t)(uintptr_t) ath_hal_getrxbuf(ah), sc->sc_rxlink); ix = 0; @@ -4891,7 +4891,7 @@ ath_printrxbuf(struct ath_buf *bf, u_int ix, int done) int i; for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { - printf("R[%2u] (DS.V:%p DS.P:%p) L:%08x D:%08x%s\n" + kprintf("R[%2u] (DS.V:%p DS.P:%p) L:%08x D:%08x%s\n" " %08x %08x %08x %08x\n", ix, ds, (struct ath_desc *)bf->bf_daddr + i, ds->ds_link, ds->ds_data, @@ -4907,9 +4907,9 @@ ath_printtxbuf(struct ath_buf *bf, u_int qnum, u_int ix, int done) struct ath_desc *ds; int i; - printf("Q%u[%3u]", qnum, ix); + kprintf("Q%u[%3u]", qnum, ix); for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { - printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:04%x%s\n" + kprintf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:04%x%s\n" " %08x %08x %08x %08x %08x %08x\n", ds, (struct ath_desc *)bf->bf_daddr + i, ds->ds_link, ds->ds_data, bf->bf_flags, @@ -5415,7 +5415,7 @@ ath_sysctlattach(struct ath_softc *sc) sc->sc_debug = ath_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, 0, - "control debugging printfs"); + "control debugging kprintfs"); #endif SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "slottime", CTLTYPE_INT | CTLFLAG_RW, sc, 0, @@ -5532,18 +5532,18 @@ ath_announce(struct ath_softc *sc) modes = ath_hal_getwirelessmodes(ah, cc); if ((modes & HAL_MODE_DUALBAND) == HAL_MODE_DUALBAND) { if (ah->ah_analog5GhzRev && ah->ah_analog2GhzRev) - printf(" 5ghz radio %d.%d 2ghz radio %d.%d", + kprintf(" 5ghz radio %d.%d 2ghz radio %d.%d", ah->ah_analog5GhzRev >> 4, ah->ah_analog5GhzRev & 0xf, ah->ah_analog2GhzRev >> 4, ah->ah_analog2GhzRev & 0xf); else - printf(" radio %d.%d", ah->ah_analog5GhzRev >> 4, + kprintf(" radio %d.%d", ah->ah_analog5GhzRev >> 4, ah->ah_analog5GhzRev & 0xf); } else - printf(" radio %d.%d", ah->ah_analog5GhzRev >> 4, + kprintf(" radio %d.%d", ah->ah_analog5GhzRev >> 4, ah->ah_analog5GhzRev & 0xf); - printf("\n"); + kprintf("\n"); if (bootverbose) { int i; for (i = 0; i <= WME_AC_VO; i++) { diff --git a/sys/dev/netif/ath/rate_amrr/amrr.c b/sys/dev/netif/ath/rate_amrr/amrr.c index 2f0bd992f3..b3af1b829c 100644 --- a/sys/dev/netif/ath/rate_amrr/amrr.c +++ b/sys/dev/netif/ath/rate_amrr/amrr.c @@ -35,7 +35,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/ath_rate/amrr/amrr.c,v 1.8.2.3 2006/02/24 19:51:11 sam Exp $ - * $DragonFly: src/sys/dev/netif/ath/rate_amrr/amrr.c,v 1.3 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ath/rate_amrr/amrr.c,v 1.4 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -73,7 +73,7 @@ #ifdef AMRR_DEBUG #define DPRINTF(sc, _fmt, ...) do { \ if (sc->sc_debug & 0x10) \ - printf(_fmt, __VA_ARGS__); \ + kprintf(_fmt, __VA_ARGS__); \ } while (0) #else #define DPRINTF(sc, _fmt, ...) @@ -530,7 +530,7 @@ amrr_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: if (bootverbose) - printf("ath_rate: version 0.1\n"); + kprintf("ath_rate: version 0.1\n"); return 0; case MOD_UNLOAD: return 0; diff --git a/sys/dev/netif/ath/rate_onoe/onoe.c b/sys/dev/netif/ath/rate_onoe/onoe.c index daf91279e2..61e4e5a36e 100644 --- a/sys/dev/netif/ath/rate_onoe/onoe.c +++ b/sys/dev/netif/ath/rate_onoe/onoe.c @@ -34,7 +34,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/ath_rate/onoe/onoe.c,v 1.8.2.3 2006/02/24 19:51:11 sam Exp $ - * $DragonFly: src/sys/dev/netif/ath/rate_onoe/onoe.c,v 1.3 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ath/rate_onoe/onoe.c,v 1.4 2006/12/22 23:26:18 swildner Exp $ */ /* @@ -73,7 +73,7 @@ enum { }; #define DPRINTF(sc, _fmt, ...) do { \ if (sc->sc_debug & ATH_DEBUG_RATE) \ - printf(_fmt, __VA_ARGS__); \ + kprintf(_fmt, __VA_ARGS__); \ } while (0) #else #define DPRINTF(sc, _fmt, ...) @@ -511,7 +511,7 @@ onoe_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: if (bootverbose) - printf("ath_rate: \n"); + kprintf("ath_rate: \n"); return 0; case MOD_UNLOAD: return 0; diff --git a/sys/dev/netif/ath/rate_sample/sample.c b/sys/dev/netif/ath/rate_sample/sample.c index 4f9de29ec9..e9a02e85a4 100644 --- a/sys/dev/netif/ath/rate_sample/sample.c +++ b/sys/dev/netif/ath/rate_sample/sample.c @@ -34,7 +34,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.c,v 1.8.2.3 2006/03/14 23:22:27 sam Exp $ - * $DragonFly: src/sys/dev/netif/ath/rate_sample/sample.c,v 1.4 2006/10/25 20:55:55 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ath/rate_sample/sample.c,v 1.5 2006/12/22 23:26:19 swildner Exp $ */ /* @@ -71,7 +71,7 @@ enum { }; #define DPRINTF(sc, _fmt, ...) do { \ if (sc->sc_debug & ATH_DEBUG_RATE) \ - printf(_fmt, __VA_ARGS__); \ + kprintf(_fmt, __VA_ARGS__); \ } while (0) #else #define DPRINTF(sc, _fmt, ...) @@ -815,7 +815,7 @@ sample_modevent(module_t mod, int type, void *unused) switch (type) { case MOD_LOAD: if (bootverbose) - printf("ath_rate: version 1.2 \n"); + kprintf("ath_rate: version 1.2 \n"); return 0; case MOD_UNLOAD: return 0; diff --git a/sys/dev/netif/ath/rate_sample/sample.h b/sys/dev/netif/ath/rate_sample/sample.h index 4aaaf8ac07..37622b8e15 100644 --- a/sys/dev/netif/ath/rate_sample/sample.h +++ b/sys/dev/netif/ath/rate_sample/sample.h @@ -34,7 +34,7 @@ * THE POSSIBILITY OF SUCH DAMAGES. * * $FreeBSD: src/sys/dev/ath/ath_rate/sample/sample.h,v 1.3.2.1 2006/02/24 19:51:11 sam Exp $ - * $DragonFly: src/sys/dev/netif/ath/rate_sample/sample.h,v 1.2 2006/08/06 12:49:04 swildner Exp $ + * $DragonFly: src/sys/dev/netif/ath/rate_sample/sample.h,v 1.3 2006/12/22 23:26:19 swildner Exp $ */ /* @@ -202,7 +202,7 @@ calc_usecs_unicast_packet(struct ath_softc *sc, int length, int rix, KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); if (!rt->info[rix].rateKbps) { - printf("rix %d (%d) bad ratekbps %d mode %u", + kprintf("rix %d (%d) bad ratekbps %d mode %u", rix, rt->info[rix].dot11Rate, rt->info[rix].rateKbps, sc->sc_curmode); @@ -256,7 +256,7 @@ calc_usecs_unicast_packet(struct ath_softc *sc, int length, int rix, int ctsduration = 0; if (!rt->info[cix].rateKbps) { - printf("cix %d (%d) bad ratekbps %d mode %u", + kprintf("cix %d (%d) bad ratekbps %d mode %u", cix, rt->info[cix].dot11Rate, rt->info[cix].rateKbps, sc->sc_curmode); diff --git a/sys/dev/netif/awi/am79c930.c b/sys/dev/netif/awi/am79c930.c index 5ae15cec03..1730ffaade 100644 --- a/sys/dev/netif/awi/am79c930.c +++ b/sys/dev/netif/awi/am79c930.c @@ -1,6 +1,6 @@ /* $NetBSD: am79c930.c,v 1.5 2000/03/23 13:57:58 onoe Exp $ */ /* $FreeBSD: src/sys/dev/awi/am79c930.c,v 1.2.2.1 2000/12/07 04:09:39 imp Exp $ */ -/* $DragonFly: src/sys/dev/netif/awi/Attic/am79c930.c,v 1.8 2006/10/25 20:55:56 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/awi/Attic/am79c930.c,v 1.9 2006/12/22 23:26:19 swildner Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -383,11 +383,11 @@ am79c930_regdump(struct am79c930_softc *sc) buf[i] = bus_space_read_1 (sc->sc_iot, sc->sc_ioh, i); AM930_DELAY(5); } - printf("am79c930: regdump:"); + kprintf("am79c930: regdump:"); for (i=0; i<8; i++) { - printf(" %02x", buf[i]); + kprintf(" %02x", buf[i]); } - printf("\n"); + kprintf("\n"); } #endif diff --git a/sys/dev/netif/awi/awi.c b/sys/dev/netif/awi/awi.c index 5378e1f271..3cdbe1be98 100644 --- a/sys/dev/netif/awi/awi.c +++ b/sys/dev/netif/awi/awi.c @@ -35,7 +35,7 @@ * * $NetBSD: awi.c,v 1.26 2000/07/21 04:48:55 onoe Exp $ * $FreeBSD: src/sys/dev/awi/awi.c,v 1.10.2.2 2003/01/23 21:06:42 sam Exp $ - * $DragonFly: src/sys/dev/netif/awi/Attic/awi.c,v 1.28 2006/10/25 20:55:56 dillon Exp $ + * $DragonFly: src/sys/dev/netif/awi/Attic/awi.c,v 1.29 2006/12/22 23:26:19 swildner Exp $ */ /* * Driver for AMD 802.11 firmware. @@ -774,7 +774,7 @@ awi_start(struct ifnet *ifp) ifp->if_timer = 1; #ifdef AWI_DEBUG if (awi_verbose) - printf("awi_start: sent %d txdone %d txnext %d txbase %d txend %d\n", sent, sc->sc_txdone, sc->sc_txnext, sc->sc_txbase, sc->sc_txend); + kprintf("awi_start: sent %d txdone %d txnext %d txbase %d txend %d\n", sent, sc->sc_txdone, sc->sc_txnext, sc->sc_txbase, sc->sc_txend); #endif } } @@ -798,7 +798,7 @@ awi_txint(struct awi_softc *sc) ifp->if_flags &= ~IFF_OACTIVE; #ifdef AWI_DEBUG if (awi_verbose) - printf("awi_txint: txdone %d txnext %d txbase %d txend %d\n", + kprintf("awi_txint: txdone %d txnext %d txbase %d txend %d\n", sc->sc_txdone, sc->sc_txnext, sc->sc_txbase, sc->sc_txend); #endif awi_start(ifp); @@ -1187,8 +1187,8 @@ awi_init_hw(struct awi_softc *sc) if (memcmp(sc->sc_banner, "PCnetMobile:", 12) != 0) { if_printf(ifp, "failed to complete selftest (bad banner)\n"); for (i = 0; i < AWI_BANNER_LEN; i++) - printf("%s%02x", i ? ":" : "\t", sc->sc_banner[i]); - printf("\n"); + kprintf("%s%02x", i ? ":" : "\t", sc->sc_banner[i]); + kprintf("\n"); return ENXIO; } @@ -1211,11 +1211,11 @@ awi_init_hw(struct awi_softc *sc) if (error) { if_printf(ifp, "failed to complete selftest"); if (error == ENXIO) - printf(" (no hardware)\n"); + kprintf(" (no hardware)\n"); else if (error != EWOULDBLOCK) - printf(" (error %d)\n", error); + kprintf(" (error %d)\n", error); else - printf(" (command timeout)\n"); + kprintf(" (command timeout)\n"); } return error; } @@ -1529,25 +1529,25 @@ awi_stop_scan(struct awi_softc *sc) sizeof(bp->essid)) != 0) fail |= 0x08; if (ifp->if_flags & IFF_DEBUG) { - printf(" %c %6D", fail ? '-' : '+', bp->esrc, ":"); + kprintf(" %c %6D", fail ? '-' : '+', bp->esrc, ":"); if (sc->sc_mib_phy.IEEE_PHY_Type == AWI_PHY_TYPE_FH) - printf(" %2d/%d%c", bp->pattern, bp->chanset, + kprintf(" %2d/%d%c", bp->pattern, bp->chanset, fail & 0x01 ? '!' : ' '); else - printf(" %4d%c", bp->chanset, + kprintf(" %4d%c", bp->chanset, fail & 0x01 ? '!' : ' '); - printf(" %+4d", bp->rssi); - printf(" %4s%c", + kprintf(" %+4d", bp->rssi); + kprintf(" %4s%c", (bp->capinfo & IEEE80211_CAPINFO_ESS) ? "ess" : (bp->capinfo & IEEE80211_CAPINFO_IBSS) ? "ibss" : "????", fail & 0x02 ? '!' : ' '); - printf(" %3s%c ", + kprintf(" %3s%c ", (bp->capinfo & IEEE80211_CAPINFO_PRIVACY) ? "wep" : "no", fail & 0x04 ? '!' : ' '); awi_print_essid(bp->essid); - printf("%s\n", fail & 0x08 ? "!" : ""); + kprintf("%s\n", fail & 0x08 ? "!" : ""); } if (!fail) { if (sbp == NULL || bp->rssi > sbp->rssi) @@ -1588,7 +1588,7 @@ awi_recv_beacon(struct awi_softc *sc, struct mbuf *m0, u_int32_t rxts, if (frame + 12 > eframe) { #ifdef AWI_DEBUG if (awi_verbose) - printf("awi_recv_beacon: frame too short \n"); + kprintf("awi_recv_beacon: frame too short \n"); #endif return; } @@ -1618,7 +1618,7 @@ awi_recv_beacon(struct awi_softc *sc, struct mbuf *m0, u_int32_t rxts, if (ssid == NULL || rates == NULL || parms == NULL) { #ifdef AWI_DEBUG if (awi_verbose) - printf("awi_recv_beacon: ssid=%p, rates=%p, parms=%p\n", + kprintf("awi_recv_beacon: ssid=%p, rates=%p, parms=%p\n", ssid, rates, parms); #endif return; @@ -1626,7 +1626,7 @@ awi_recv_beacon(struct awi_softc *sc, struct mbuf *m0, u_int32_t rxts, if (ssid[1] > IEEE80211_NWID_LEN) { #ifdef AWI_DEBUG if (awi_verbose) - printf("awi_recv_beacon: bad ssid len: %d from %6D\n", + kprintf("awi_recv_beacon: bad ssid len: %d from %6D\n", ssid[1], wh->i_addr2, ":"); #endif return; @@ -1682,7 +1682,7 @@ awi_set_ss(struct awi_softc *sc) bp->chanset, bp->pattern, bp->index, bp->dwell_time, bp->interval, bp->bssid, ":"); awi_print_essid(bp->essid); - printf("\n"); + kprintf("\n"); } memcpy(&sc->sc_mib_mgt.aCurrent_BSS_ID, bp->bssid, ETHER_ADDR_LEN); memcpy(&sc->sc_mib_mgt.aCurrent_ESS_ID, bp->essid, @@ -1730,16 +1730,16 @@ awi_sync_done(struct awi_softc *sc) if (ifp->if_flags & IFF_DEBUG) { if_printf(ifp, "synced with"); if (sc->sc_no_bssid) - printf(" no-bssid"); + kprintf(" no-bssid"); else { - printf(" %6D ssid ", sc->sc_bss.bssid, ":"); + kprintf(" %6D ssid ", sc->sc_bss.bssid, ":"); awi_print_essid(sc->sc_bss.essid); } if (sc->sc_mib_phy.IEEE_PHY_Type == AWI_PHY_TYPE_FH) - printf(" at chanset %d pattern %d\n", + kprintf(" at chanset %d pattern %d\n", sc->sc_bss.chanset, sc->sc_bss.pattern); else - printf(" at channel %d\n", sc->sc_bss.chanset); + kprintf(" at channel %d\n", sc->sc_bss.chanset); } awi_drvstate(sc, AWI_DRV_ADHSY); sc->sc_status = AWI_ST_RUNNING; @@ -2001,10 +2001,10 @@ awi_recv_asresp(struct awi_softc *sc, struct mbuf *m0) sc->sc_bss.bssid, ":"); awi_print_essid(sc->sc_bss.essid); if (sc->sc_mib_phy.IEEE_PHY_Type == AWI_PHY_TYPE_FH) - printf(" chanset %d pattern %d\n", + kprintf(" chanset %d pattern %d\n", sc->sc_bss.chanset, sc->sc_bss.pattern); else - printf(" channel %d\n", sc->sc_bss.chanset); + kprintf(" channel %d\n", sc->sc_bss.chanset); } sc->sc_tx_rate = rate; sc->sc_mgt_timer = 0; @@ -2054,7 +2054,7 @@ awi_mib(struct awi_softc *sc, u_int8_t cmd, u_int8_t mib) error = awi_cmd_wait(sc); if (error) { if (error == EWOULDBLOCK) - printf("awi_mib: cmd %d inprog", + kprintf("awi_mib: cmd %d inprog", sc->sc_cmd_inprog); return error; } @@ -2074,10 +2074,10 @@ awi_mib(struct awi_softc *sc, u_int8_t cmd, u_int8_t mib) if (awi_verbose) { int i; - printf("awi_mib: #%d:", mib); + kprintf("awi_mib: #%d:", mib); for (i = 0; i < size; i++) - printf(" %02x", ptr[i]); - printf("\n"); + kprintf(" %02x", ptr[i]); + kprintf("\n"); } #endif } @@ -2298,14 +2298,14 @@ awi_print_essid(u_int8_t *essid) break; } if (i == len) { - printf("\""); + kprintf("\""); for (i = 0, p = essid + 2; i < len; i++, p++) - printf("%c", *p); - printf("\""); + kprintf("%c", *p); + kprintf("\""); } else { - printf("0x"); + kprintf("0x"); for (i = 0, p = essid + 2; i < len; i++, p++) - printf("%02x", *p); + kprintf("%02x", *p); } } @@ -2329,79 +2329,79 @@ awi_dump_pkt(struct awi_softc *sc, struct mbuf *m, int rssi) return; if (rssi < 0) - printf("tx: "); + kprintf("tx: "); else - printf("rx: "); + kprintf("rx: "); switch (wh->i_fc[1] & IEEE80211_FC1_DIR_MASK) { case IEEE80211_FC1_DIR_NODS: - printf("NODS %6D->%6D(%6D)", wh->i_addr2, ":", + kprintf("NODS %6D->%6D(%6D)", wh->i_addr2, ":", wh->i_addr1, ":", wh->i_addr3, ":"); break; case IEEE80211_FC1_DIR_TODS: - printf("TODS %6D->%6D(%6D)", wh->i_addr2, ":", + kprintf("TODS %6D->%6D(%6D)", wh->i_addr2, ":", wh->i_addr3, ":", wh->i_addr1, ":"); break; case IEEE80211_FC1_DIR_FROMDS: - printf("FRDS %6D->%6D(%6D)", wh->i_addr3, ":", + kprintf("FRDS %6D->%6D(%6D)", wh->i_addr3, ":", wh->i_addr1, ":", wh->i_addr2, ":"); break; case IEEE80211_FC1_DIR_DSTODS: - printf("DSDS %6D->%6D(%6D->%6D)", (u_int8_t *)&wh[1], ":", + kprintf("DSDS %6D->%6D(%6D->%6D)", (u_int8_t *)&wh[1], ":", wh->i_addr3, ":", wh->i_addr2, ":", wh->i_addr1, ":"); break; } switch (wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) { case IEEE80211_FC0_TYPE_DATA: - printf(" data"); + kprintf(" data"); break; case IEEE80211_FC0_TYPE_MGT: switch (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK) { case IEEE80211_FC0_SUBTYPE_PROBE_REQ: - printf(" probe_req"); + kprintf(" probe_req"); break; case IEEE80211_FC0_SUBTYPE_PROBE_RESP: - printf(" probe_resp"); + kprintf(" probe_resp"); break; case IEEE80211_FC0_SUBTYPE_BEACON: - printf(" beacon"); + kprintf(" beacon"); break; case IEEE80211_FC0_SUBTYPE_AUTH: - printf(" auth"); + kprintf(" auth"); break; case IEEE80211_FC0_SUBTYPE_ASSOC_REQ: - printf(" assoc_req"); + kprintf(" assoc_req"); break; case IEEE80211_FC0_SUBTYPE_ASSOC_RESP: - printf(" assoc_resp"); + kprintf(" assoc_resp"); break; case IEEE80211_FC0_SUBTYPE_REASSOC_REQ: - printf(" reassoc_req"); + kprintf(" reassoc_req"); break; case IEEE80211_FC0_SUBTYPE_REASSOC_RESP: - printf(" reassoc_resp"); + kprintf(" reassoc_resp"); break; case IEEE80211_FC0_SUBTYPE_DEAUTH: - printf(" deauth"); + kprintf(" deauth"); break; case IEEE80211_FC0_SUBTYPE_DISASSOC: - printf(" disassoc"); + kprintf(" disassoc"); break; default: - printf(" mgt#%d", + kprintf(" mgt#%d", wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK); break; } break; default: - printf(" type#%d", + kprintf(" type#%d", wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK); break; } if (wh->i_fc[1] & IEEE80211_FC1_WEP) - printf(" WEP"); + kprintf(" WEP"); if (rssi >= 0) - printf(" +%d", rssi); - printf("\n"); + kprintf(" +%d", rssi); + kprintf("\n"); if (awi_dump_len > 0) { l = m->m_len; if (l > awi_dump_len + sizeof(*wh)) @@ -2411,10 +2411,10 @@ awi_dump_pkt(struct awi_softc *sc, struct mbuf *m, int rssi) i = 0; for (; i < l; i++) { if ((i & 1) == 0) - printf(" "); - printf("%02x", mtod(m, u_int8_t *)[i]); + kprintf(" "); + kprintf("%02x", mtod(m, u_int8_t *)[i]); } - printf("\n"); + kprintf("\n"); } } #endif diff --git a/sys/dev/netif/cs/if_cs.c b/sys/dev/netif/cs/if_cs.c index 030732f0b2..7a4c5ef61c 100644 --- a/sys/dev/netif/cs/if_cs.c +++ b/sys/dev/netif/cs/if_cs.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/cs/if_cs.c,v 1.19.2.1 2001/01/25 20:13:48 imp Exp $ - * $DragonFly: src/sys/dev/netif/cs/if_cs.c,v 1.27 2006/10/25 20:55:56 dillon Exp $ + * $DragonFly: src/sys/dev/netif/cs/if_cs.c,v 1.28 2006/12/22 23:26:19 swildner Exp $ */ /* @@ -124,13 +124,13 @@ get_eeprom_data(device_t dev, int off, int len, int *buffer) buffer[i] = cs_readreg (sc->nic_addr, PP_EEData); #ifdef CS_DEBUG - printf("%02x %02x ",(unsigned char)buffer[i], + kprintf("%02x %02x ",(unsigned char)buffer[i], (unsigned char)buffer[i+1]); #endif } #ifdef CS_DEBUG - printf("\n"); + kprintf("\n"); #endif return 0; @@ -852,8 +852,8 @@ cs_get_packet(struct cs_softc *sc) #ifdef CS_DEBUG for (i=0;im_data+i))); - printf( "\n" ); + kprintf(" %02x",(unsigned char)*((char *)(m->m_data+i))); + kprintf( "\n" ); #endif if (status & (RX_IA | RX_BROADCAST) || diff --git a/sys/dev/netif/cx/cx.c b/sys/dev/netif/cx/cx.c index 4185bfdf15..f2baf099c6 100644 --- a/sys/dev/netif/cx/cx.c +++ b/sys/dev/netif/cx/cx.c @@ -16,7 +16,7 @@ * Version 1.9, Wed Oct 4 18:58:15 MSK 1995 * * $FreeBSD: src/sys/i386/isa/cx.c,v 1.45.2.1 2001/02/26 04:23:09 jlemon Exp $ - * $DragonFly: src/sys/dev/netif/cx/cx.c,v 1.19 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/netif/cx/cx.c,v 1.20 2006/12/22 23:26:19 swildner Exp $ * */ #undef DEBUG @@ -70,7 +70,7 @@ timeout_t cxtimeout; extern struct callout cxtimeout_ch; #ifdef DEBUG -# define print(s) printf s +# define print(s) kprintf s #else # define print(s) {/*void*/} #endif @@ -779,7 +779,7 @@ cxrinta (cx_chan_t *c) cnt_port = ARBCNT(port); sts_port = ARBSTS(port); } else - printf ("cx%d.%d: timeout: invalid buffer address\n", + kprintf ("cx%d.%d: timeout: invalid buffer address\n", c->board->num, c->num); if (len) { @@ -808,7 +808,7 @@ cxrinta (cx_chan_t *c) inb (ARBSTS(port)), BSTS_BITS, inb (BRBSTS(port)), BSTS_BITS)); if (risr & RIS_BUSERR) { - printf ("cx%d.%d: receive bus error\n", c->board->num, c->num); + kprintf ("cx%d.%d: receive bus error\n", c->board->num, c->num); ++c->stat->ierrs; } if (risr & (RIS_OVERRUN | RISA_PARERR | RISA_FRERR | RISA_BREAK)) { @@ -879,11 +879,11 @@ void cxtinta (cx_chan_t *c) inb (ATBSTS(port)), BSTS_BITS, inb (BTBSTS(port)), BSTS_BITS)); if (tisr & TIS_BUSERR) { - printf ("cx%d.%d: transmit bus error\n", + kprintf ("cx%d.%d: transmit bus error\n", c->board->num, c->num); ++c->stat->oerrs; } else if (tisr & TIS_UNDERRUN) { - printf ("cx%d.%d: transmit underrun error\n", + kprintf ("cx%d.%d: transmit underrun error\n", c->board->num, c->num); ++c->stat->oerrs; } @@ -908,7 +908,7 @@ cxmint (cx_chan_t *c) struct tty *tp = c->ttyp; if (c->mode != M_ASYNC) { - printf ("cx%d.%d: unexpected modem interrupt, misr=%b, msvr=%b\n", + kprintf ("cx%d.%d: unexpected modem interrupt, misr=%b, msvr=%b\n", c->board->num, c->num, misr, MIS_BITS, msvr, MSV_BITS); return; } diff --git a/sys/dev/netif/cx/if_cx.c b/sys/dev/netif/cx/if_cx.c index 18b6256ce0..f3eb0e3df3 100644 --- a/sys/dev/netif/cx/if_cx.c +++ b/sys/dev/netif/cx/if_cx.c @@ -17,7 +17,7 @@ * Version 1.9, Wed Oct 4 18:58:15 MSK 1995 * * $FreeBSD: src/sys/i386/isa/if_cx.c,v 1.32 1999/11/18 08:36:42 peter Exp $ - * $DragonFly: src/sys/dev/netif/cx/if_cx.c,v 1.22 2006/09/05 00:55:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/cx/if_cx.c,v 1.23 2006/12/22 23:26:19 swildner Exp $ * */ #undef DEBUG @@ -65,7 +65,7 @@ static void cxintr(void *); static int cxtinth (cx_chan_t *c); #ifdef DEBUG -# define print(s) printf s +# define print(s) kprintf s #else # define print(s) {/*void*/} #endif @@ -126,15 +126,15 @@ valid (unsigned short value, unsigned short *list) static void printmbuf (struct mbuf *m) { - printf ("mbuf:"); + kprintf ("mbuf:"); for (; m; m=m->m_next) { if (m->m_flags & M_PKTHDR) - printf (" HDR %d:", m->m_pkthdr.len); + kprintf (" HDR %d:", m->m_pkthdr.len); if (m->m_flags & M_EXT) - printf (" EXT:"); - printf (" %d", m->m_len); + kprintf (" EXT:"); + kprintf (" %d", m->m_len); } - printf ("\n"); + kprintf ("\n"); } /* @@ -202,15 +202,15 @@ cxprobe (struct isa_device *id) print (("cx%d: probe iobase=0x%x irq=%d drq=%d\n", unit, iobase, irqnum, drq)); if (! valid (irqnum, irq_valid_values)) { - printf ("cx%d: Incorrect IRQ: %d\n", unit, irqnum); + kprintf ("cx%d: Incorrect IRQ: %d\n", unit, irqnum); return (0); } if (! valid (iobase, port_valid_values)) { - printf ("cx%d: Incorrect port address: 0x%x\n", unit, iobase); + kprintf ("cx%d: Incorrect port address: 0x%x\n", unit, iobase); return (0); } if (! valid (drq, drq_valid_values)) { - printf ("cx%d: Incorrect DMA channel: %d\n", unit, drq); + kprintf ("cx%d: Incorrect DMA channel: %d\n", unit, drq); return (0); } if (! cx_probe_board (iobase)) @@ -257,7 +257,7 @@ cxattach (struct isa_device *id) /* All buffers should be located in lower 16M of memory! */ /* XXX all buffers located where? I don't think so! */ if (!c->arbuf || !c->brbuf || !c->atbuf || !c->btbuf) { - printf ("cx%d.%d: No memory for channel buffers\n", + kprintf ("cx%d.%d: No memory for channel buffers\n", c->board->num, c->num); c->type = T_NONE; } @@ -296,7 +296,7 @@ cxattach (struct isa_device *id) callout_init(&cxtimeout_ch); callout_reset(&cxtimeout_ch, hz * 5, cxtimeout, NULL); } - printf ("cx%d: \n", unit, b->name); + kprintf ("cx%d: \n", unit, b->name); dev_ops_add(&cx_ops, -1, unit); make_dev(&cx_ops, unit, UID_ROOT, GID_WHEEL, 0600, "cx%d", unit); return (1); @@ -472,7 +472,7 @@ cxput (cx_chan_t *c, char b) c->stat->obytes += len + 3; if (len >= DMABUFSZ) { - printf ("cx%d.%d: too long packet: %d bytes: ", + kprintf ("cx%d.%d: too long packet: %d bytes: ", c->board->num, c->num, len); printmbuf (m); m_freem (m); @@ -571,7 +571,7 @@ cxwatchdog (struct ifnet *ifp) if (! (ifp->if_flags & IFF_RUNNING)) return; if (ifp->if_flags & IFF_DEBUG) - printf ("cx%d.%d: device timeout\n", c->board->num, c->num); + kprintf ("cx%d.%d: device timeout\n", c->board->num, c->num); cxdown (c); for (q=c->slaveq; q; q=q->slaveq) @@ -597,7 +597,7 @@ cxrinth (cx_chan_t *c) /* Receive errors. */ if (risr & (RIS_BUSERR | RIS_OVERRUN | RISH_CRCERR | RISH_RXABORT)) { if (c->ifp->if_flags & IFF_DEBUG) - printf ("cx%d.%d: receive error, risr=%b\n", + kprintf ("cx%d.%d: receive error, risr=%b\n", c->board->num, c->num, risr, RISH_BITS); ++c->ifp->if_ierrors; ++c->stat->ierrs; @@ -619,7 +619,7 @@ cxrinth (cx_chan_t *c) * exceeds our buffer size. It could be caused * by incorrectly programmed DMA register or * hardware fault. Possibly, should panic here. */ - printf ("cx%d.%d: panic! DMA buffer overflow: %d bytes\n", + kprintf ("cx%d.%d: panic! DMA buffer overflow: %d bytes\n", c->board->num, c->num, len); ++c->ifp->if_ierrors; } else if (! (risr & RIS_EOFR)) { @@ -627,7 +627,7 @@ cxrinth (cx_chan_t *c) * It could be caused by serial lie noise, * or if the peer has too big MTU. */ if (c->ifp->if_flags & IFF_DEBUG) - printf ("cx%d.%d: received frame length exceeds MTU, risr=%b\n", + kprintf ("cx%d.%d: received frame length exceeds MTU, risr=%b\n", c->board->num, c->num, risr, RISH_BITS); ++c->ifp->if_ierrors; } else { @@ -712,7 +712,7 @@ cxintr (void *arg) unsigned char eoi = 0; if (c->type == T_NONE) { - printf ("cx%d.%d: unexpected interrupt, livr=0x%x\n", + kprintf ("cx%d.%d: unexpected interrupt, livr=0x%x\n", c->board->num, c->num, livr); continue; /* incorrect channel number? */ } @@ -788,7 +788,7 @@ cxinput (cx_chan_t *c, void *buf, unsigned len) struct mbuf *m = makembuf (buf, len); if (! m) { if (c->ifp->if_flags & IFF_DEBUG) - printf ("cx%d.%d: no memory for packet\n", + kprintf ("cx%d.%d: no memory for packet\n", c->board->num, c->num); ++c->ifp->if_iqdrops; return; diff --git a/sys/dev/netif/dc/if_dc.c b/sys/dev/netif/dc/if_dc.c index eb0247123f..6c4511bb0d 100644 --- a/sys/dev/netif/dc/if_dc.c +++ b/sys/dev/netif/dc/if_dc.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_dc.c,v 1.9.2.45 2003/06/08 14:31:53 mux Exp $ - * $DragonFly: src/sys/dev/netif/dc/if_dc.c,v 1.53 2006/10/25 20:55:56 dillon Exp $ + * $DragonFly: src/sys/dev/netif/dc/if_dc.c,v 1.54 2006/12/22 23:26:19 swildner Exp $ */ /* @@ -2814,10 +2814,10 @@ dc_tx_underrun(struct dc_softc *sc) if_printf(&sc->arpcom.ac_if, "TX underrun -- "); sc->dc_txthresh += DC_TXTHRESH_INC; if (sc->dc_txthresh > DC_TXTHRESH_MAX) { - printf("using store and forward mode\n"); + kprintf("using store and forward mode\n"); DC_SETBIT(sc, DC_NETCFG, DC_NETCFG_STORENFWD); } else { - printf("increasing TX threshold\n"); + kprintf("increasing TX threshold\n"); DC_CLRBIT(sc, DC_NETCFG, DC_NETCFG_TX_THRESH); DC_SETBIT(sc, DC_NETCFG, sc->dc_txthresh); } diff --git a/sys/dev/netif/de/if_de.c b/sys/dev/netif/de/if_de.c index 5602d8af9d..1bb0912fd6 100644 --- a/sys/dev/netif/de/if_de.c +++ b/sys/dev/netif/de/if_de.c @@ -1,7 +1,7 @@ /* $NetBSD: if_de.c,v 1.86 1999/06/01 19:17:59 thorpej Exp $ */ /* $FreeBSD: src/sys/pci/if_de.c,v 1.123.2.4 2000/08/04 23:25:09 peter Exp $ */ -/* $DragonFly: src/sys/dev/netif/de/if_de.c,v 1.46 2006/10/25 20:55:56 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/de/if_de.c,v 1.47 2006/12/22 23:26:19 swildner Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -3329,20 +3329,20 @@ tulip_print_abnormal_interrupt(tulip_softc_t *sc, uint32_t csr) if_printf(&sc->tulip_if, "abnormal interrupt:"); for (sep = " ", mask = 1; mask <= csr; mask <<= 1, msgp++) { if ((csr & mask) && *msgp != NULL) { - printf("%s%s", sep, *msgp); + kprintf("%s%s", sep, *msgp); if (mask == TULIP_STS_TXUNDERFLOW && (sc->tulip_flags & TULIP_NEWTXTHRESH)) { sc->tulip_flags &= ~TULIP_NEWTXTHRESH; if (sc->tulip_cmdmode & TULIP_CMD_STOREFWD) { - printf(" (switching to store-and-forward mode)"); + kprintf(" (switching to store-and-forward mode)"); } else { - printf(" (raising TX threshold to %s)", + kprintf(" (raising TX threshold to %s)", &thrsh[9 * ((sc->tulip_cmdmode & TULIP_CMD_THRESHOLDCTL) >> 14)]); } } sep = ", "; } } - printf("\n"); + kprintf("\n"); } static void @@ -4163,8 +4163,8 @@ tulip_pci_attach(device_t dev) if ((retval = tulip_read_macaddr(sc)) < 0) { device_printf(dev, "can't read ENET ROM (why=%d) (", retval); for (idx = 0; idx < 32; idx++) - printf("%02x", sc->tulip_rombuf[idx]); - printf("\n"); + kprintf("%02x", sc->tulip_rombuf[idx]); + kprintf("\n"); device_printf(dev, "%s%s pass %d.%d\n", sc->tulip_boardid, tulip_chipdescs[sc->tulip_chipid], (sc->tulip_revinfo & 0xF0) >> 4, sc->tulip_revinfo & 0x0F); diff --git a/sys/dev/netif/de/if_devar.h b/sys/dev/netif/de/if_devar.h index d7af83d067..86d140b006 100644 --- a/sys/dev/netif/de/if_devar.h +++ b/sys/dev/netif/de/if_devar.h @@ -1,7 +1,7 @@ /* $NetBSD: if_devar.h,v 1.32 1999/04/01 14:55:25 tsubai Exp $ */ /* $FreeBSD: src/sys/pci/if_devar.h,v 1.23.2.1 2000/08/04 23:25:10 peter Exp $ */ -/* $DragonFly: src/sys/dev/netif/de/if_devar.h,v 1.15 2006/02/17 19:18:05 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/de/if_devar.h,v 1.16 2006/12/22 23:26:19 swildner Exp $ */ /*- * Copyright (c) 1994-1997 Matt Thomas (matt@3am-software.com) @@ -700,7 +700,7 @@ static const struct { #define SIOCGCHIPID _IOWR('i', 241, struct ifreq) /* get chipid */ #endif -#define loudprintf if (bootverbose) printf +#define loudprintf if (bootverbose) kprintf #ifndef tulip_if #define tulip_if tulip_ac.ac_if diff --git a/sys/dev/netif/ed/if_ed.c b/sys/dev/netif/ed/if_ed.c index 56e601b979..f6235ef11a 100644 --- a/sys/dev/netif/ed/if_ed.c +++ b/sys/dev/netif/ed/if_ed.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ed/if_ed.c,v 1.224 2003/12/08 07:54:12 obrien Exp $ - * $DragonFly: src/sys/dev/netif/ed/if_ed.c,v 1.32 2006/10/25 20:55:56 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ed/if_ed.c,v 1.33 2006/12/22 23:26:19 swildner Exp $ */ /* @@ -368,10 +368,10 @@ ed_probe_WD80x3_generic(device_t dev, int flags, u_short *intr_vals[]) return (error); #if ED_DEBUG - printf("type = %x type_str=%s isa16bit=%d memsize=%d id_msize=%d\n", + kprintf("type = %x type_str=%s isa16bit=%d memsize=%d id_msize=%d\n", sc->type, sc->type_str, isa16bit, memsize, conf_msize); for (i = 0; i < 8; i++) - printf("%x -> %x\n", i, ed_asic_inb(sc, i)); + kprintf("%x -> %x\n", i, ed_asic_inb(sc, i)); #endif /* @@ -467,7 +467,7 @@ ed_probe_WD80x3_generic(device_t dev, int flags, u_short *intr_vals[]) error = ed_alloc_memory(dev, 0, memsize); if (error) { - printf("*** ed_alloc_memory() failed! (%d)\n", error); + kprintf("*** ed_alloc_memory() failed! (%d)\n", error); return (error); } sc->mem_start = (caddr_t) rman_get_virtual(sc->mem_res); @@ -549,11 +549,11 @@ ed_probe_WD80x3_generic(device_t dev, int flags, u_short *intr_vals[]) } #if 0 - printf("starting memory performance test at 0x%x, size %d...\n", + kprintf("starting memory performance test at 0x%x, size %d...\n", sc->mem_start, memsize*16384); for (i = 0; i < 16384; i++) bzero(sc->mem_start, memsize); - printf("***DONE***\n"); + kprintf("***DONE***\n"); #endif /* @@ -1724,18 +1724,18 @@ ed_attach(device_t dev) /* device attach does transition from UNCONFIGURED to IDLE state */ if (sc->type_str && (*sc->type_str != 0)) - printf("type %s ", sc->type_str); + kprintf("type %s ", sc->type_str); else - printf("type unknown (0x%x) ", sc->type); + kprintf("type unknown (0x%x) ", sc->type); if (sc->vendor == ED_VENDOR_HP) - printf("(%s %s IO)", (sc->hpp_id & ED_HPP_ID_16_BIT_ACCESS) ? + kprintf("(%s %s IO)", (sc->hpp_id & ED_HPP_ID_16_BIT_ACCESS) ? "16-bit" : "32-bit", sc->hpp_mem_start ? "memory mapped" : "regular"); else - printf("%s ", sc->isa16bit ? "(16 bit)" : "(8 bit)"); + kprintf("%s ", sc->isa16bit ? "(16 bit)" : "(8 bit)"); - printf("%s\n", (((sc->vendor == ED_VENDOR_3COM) || + kprintf("%s\n", (((sc->vendor == ED_VENDOR_3COM) || (sc->vendor == ED_VENDOR_HP)) && (ifp->if_flags & IFF_ALTPHYS)) ? " tranceiver disabled" : ""); @@ -2067,7 +2067,7 @@ ed_start(struct ifnet *ifp) int len; if (sc->gone) { - printf("ed_start(%p) GONE\n",ifp); + kprintf("ed_start(%p) GONE\n",ifp); return; } outloop: @@ -2077,7 +2077,7 @@ outloop: * should never happen at this point. */ if (sc->txb_inuse && (sc->xmit_busy == 0)) { - printf("ed: packets buffered, but transmitter idle\n"); + kprintf("ed: packets buffered, but transmitter idle\n"); ed_xmit(sc); } diff --git a/sys/dev/netif/ed/if_ed_pccard.c b/sys/dev/netif/ed/if_ed_pccard.c index b0c8581e49..f04d3ae982 100644 --- a/sys/dev/netif/ed/if_ed_pccard.c +++ b/sys/dev/netif/ed/if_ed_pccard.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ed/if_ed_pccard.c,v 1.55 2003/12/31 04:25:00 kato Exp $ - * $DragonFly: src/sys/dev/netif/ed/if_ed_pccard.c,v 1.17 2006/10/25 20:55:56 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ed/if_ed_pccard.c,v 1.18 2006/12/22 23:26:19 swildner Exp $ */ #include "opt_ed.h" @@ -285,7 +285,7 @@ ed_pccard_attach(device_t dev) edintr, sc, &sc->irq_handle, sc->arpcom.ac_if.if_serializer); if (error) { - printf("setup intr failed %d \n", error); + kprintf("setup intr failed %d \n", error); ed_release_resources(dev); return (error); } diff --git a/sys/dev/netif/el/if_el.c b/sys/dev/netif/el/if_el.c index 126dd27f55..f07a45f6db 100644 --- a/sys/dev/netif/el/if_el.c +++ b/sys/dev/netif/el/if_el.c @@ -7,7 +7,7 @@ * Questions, comments, bug reports and fixes to kimmel@cs.umass.edu. * * $FreeBSD: src/sys/i386/isa/if_el.c,v 1.47.2.2 2000/07/17 21:24:30 archie Exp $ - * $DragonFly: src/sys/dev/netif/el/if_el.c,v 1.21 2006/08/06 12:49:05 swildner Exp $ + * $DragonFly: src/sys/dev/netif/el/if_el.c,v 1.22 2006/12/22 23:26:19 swildner Exp $ */ /* Except of course for the portions of code lifted from other FreeBSD * drivers (mainly elread, elget and el_ioctl) @@ -53,7 +53,7 @@ DECLARE_DUMMY_MODULE(if_el); /* For debugging convenience */ #ifdef EL_DEBUG -#define dprintf(x) printf x +#define dprintf(x) kprintf x #else #define dprintf(x) #endif @@ -106,7 +106,7 @@ el_probe(struct isa_device *idev) /* First check the base */ if((base < 0x280) || (base > 0x3f0)) { - printf("el%d: ioaddr must be between 0x280 and 0x3f0\n", + kprintf("el%d: ioaddr must be between 0x280 and 0x3f0\n", idev->id_unit); return(0); } diff --git a/sys/dev/netif/em/if_em.h b/sys/dev/netif/em/if_em.h index cbc2808ada..cd37d1c7d6 100644 --- a/sys/dev/netif/em/if_em.h +++ b/sys/dev/netif/em/if_em.h @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ /*$FreeBSD: src/sys/dev/em/if_em.h,v 1.1.2.13 2003/06/09 21:43:41 pdeuskar Exp $*/ -/*$DragonFly: src/sys/dev/netif/em/if_em.h,v 1.17 2006/10/25 20:55:56 dillon Exp $*/ +/*$DragonFly: src/sys/dev/netif/em/if_em.h,v 1.18 2006/12/22 23:26:19 swildner Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -247,15 +247,15 @@ POSSIBILITY OF SUCH DAMAGE. #define DEBUG_IOCTL 0 #define DEBUG_HW 0 -#define INIT_DEBUGOUT(S) if (DEBUG_INIT) printf(S "\n") -#define INIT_DEBUGOUT1(S, A) if (DEBUG_INIT) printf(S "\n", A) -#define INIT_DEBUGOUT2(S, A, B) if (DEBUG_INIT) printf(S "\n", A, B) -#define IOCTL_DEBUGOUT(S) if (DEBUG_IOCTL) printf(S "\n") -#define IOCTL_DEBUGOUT1(S, A) if (DEBUG_IOCTL) printf(S "\n", A) -#define IOCTL_DEBUGOUT2(S, A, B) if (DEBUG_IOCTL) printf(S "\n", A, B) -#define HW_DEBUGOUT(S) if (DEBUG_HW) printf(S "\n") -#define HW_DEBUGOUT1(S, A) if (DEBUG_HW) printf(S "\n", A) -#define HW_DEBUGOUT2(S, A, B) if (DEBUG_HW) printf(S "\n", A, B) +#define INIT_DEBUGOUT(S) if (DEBUG_INIT) kprintf(S "\n") +#define INIT_DEBUGOUT1(S, A) if (DEBUG_INIT) kprintf(S "\n", A) +#define INIT_DEBUGOUT2(S, A, B) if (DEBUG_INIT) kprintf(S "\n", A, B) +#define IOCTL_DEBUGOUT(S) if (DEBUG_IOCTL) kprintf(S "\n") +#define IOCTL_DEBUGOUT1(S, A) if (DEBUG_IOCTL) kprintf(S "\n", A) +#define IOCTL_DEBUGOUT2(S, A, B) if (DEBUG_IOCTL) kprintf(S "\n", A, B) +#define HW_DEBUGOUT(S) if (DEBUG_HW) kprintf(S "\n") +#define HW_DEBUGOUT1(S, A) if (DEBUG_HW) kprintf(S "\n", A) +#define HW_DEBUGOUT2(S, A, B) if (DEBUG_HW) kprintf(S "\n", A, B) /* Supported RX Buffer Sizes */ diff --git a/sys/dev/netif/em/if_em_osdep.h b/sys/dev/netif/em/if_em_osdep.h index 6a331026ba..531ab5c0fb 100644 --- a/sys/dev/netif/em/if_em_osdep.h +++ b/sys/dev/netif/em/if_em_osdep.h @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ /*$FreeBSD: src/sys/dev/em/if_em_osdep.h,v 1.1.2.11 2003/06/09 21:43:41 pdeuskar Exp $*/ -/*$DragonFly: src/sys/dev/netif/em/if_em_osdep.h,v 1.7 2006/10/25 20:55:56 dillon Exp $*/ +/*$DragonFly: src/sys/dev/netif/em/if_em_osdep.h,v 1.8 2006/12/22 23:26:19 swildner Exp $*/ #ifndef _FREEBSD_OS_H_ #define _FREEBSD_OS_H_ @@ -63,14 +63,14 @@ POSSIBILITY OF SUCH DAMAGE. /* TODO: Should we be paranoid about delaying in interrupt context? */ #define msec_delay_irq(x) DELAY(1000*(x)) -#define MSGOUT(S, A, B) printf(S "\n", A, B) +#define MSGOUT(S, A, B) kprintf(S "\n", A, B) #define DEBUGFUNC(F) DEBUGOUT(F); #if DBG - #define DEBUGOUT(S) printf(S "\n") - #define DEBUGOUT1(S,A) printf(S "\n",A) - #define DEBUGOUT2(S,A,B) printf(S "\n",A,B) - #define DEBUGOUT3(S,A,B,C) printf(S "\n",A,B,C) - #define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S "\n",A,B,C,D,E,F,G) + #define DEBUGOUT(S) kprintf(S "\n") + #define DEBUGOUT1(S,A) kprintf(S "\n",A) + #define DEBUGOUT2(S,A,B) kprintf(S "\n",A,B) + #define DEBUGOUT3(S,A,B,C) kprintf(S "\n",A,B,C) + #define DEBUGOUT7(S,A,B,C,D,E,F,G) kprintf(S "\n",A,B,C,D,E,F,G) #else #define DEBUGOUT(S) #define DEBUGOUT1(S,A) diff --git a/sys/dev/netif/en_pci/if_en_pci.c b/sys/dev/netif/en_pci/if_en_pci.c index 3f64dc68d7..e6b030089d 100644 --- a/sys/dev/netif/en_pci/if_en_pci.c +++ b/sys/dev/netif/en_pci/if_en_pci.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_en_pci.c,v 1.12 1999/08/21 22:10:49 msmith Exp $ - * $DragonFly: src/sys/dev/netif/en_pci/if_en_pci.c,v 1.14 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/en_pci/if_en_pci.c,v 1.15 2006/12/22 23:26:19 swildner Exp $ */ /* @@ -178,7 +178,7 @@ adp_busreset(void *v) dummy = bus_space_read_4(sc->en_memt, sc->en_base, ADP_PCIREG); if ((dummy & (ADP_PCIREG_SWAP_WORD|ADP_PCIREG_SWAP_DMA)) != (ADP_PCIREG_SWAP_WORD|ADP_PCIREG_SWAP_DMA)) - printf("adp_busreset: Adaptec ATM did NOT reset!\n"); + kprintf("adp_busreset: Adaptec ATM did NOT reset!\n"); } #endif @@ -218,7 +218,7 @@ en_pci_attach(pcici_t config_id, int unit) vm_offset_t pa; if (unit >= NEN) { - printf("en%d: not configured; kernel is built for only %d device%s.\n", + kprintf("en%d: not configured; kernel is built for only %d device%s.\n", unit, NEN, NEN == 1 ? "" : "s"); return; } @@ -257,7 +257,7 @@ en_pci_attach(pcici_t config_id, int unit) SHUTDOWN_PRI_DEFAULT); if (!pci_map_int(config_id, en_intr, (void *) sc)) { - printf("%s: couldn't establish interrupt\n", sc->sc_dev.dv_xname); + kprintf("%s: couldn't establish interrupt\n", sc->sc_dev.dv_xname); return; } sc->ipl = 1; /* XXX */ diff --git a/sys/dev/netif/ep/if_ep.c b/sys/dev/netif/ep/if_ep.c index 434df2897e..3381629576 100644 --- a/sys/dev/netif/ep/if_ep.c +++ b/sys/dev/netif/ep/if_ep.c @@ -39,7 +39,7 @@ /* * $FreeBSD: src/sys/dev/ep/if_ep.c,v 1.95.2.3 2002/03/06 07:26:35 imp Exp $ - * $DragonFly: src/sys/dev/netif/ep/if_ep.c,v 1.25 2006/10/25 20:55:56 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ep/if_ep.c,v 1.26 2006/12/22 23:26:19 swildner Exp $ * * Promiscuous mode added and interrupt logic slightly changed * to reduce the number of adapter failures. Transceiver select @@ -558,14 +558,14 @@ rescan: if (status & S_CARD_FAILURE) { ifp->if_timer = 0; #ifdef EP_LOCAL_STATS - printf("\n"); + kprintf("\n"); if_printf(ifp, "\n\tStatus: %x\n", status); GO_WINDOW(4); - printf("\tFIFO Diagnostic: %x\n", inw(BASE + EP_W4_FIFO_DIAG)); - printf("\tStat: %x\n", sc->stat); - printf("\tIpackets=%d, Opackets=%d\n", + kprintf("\tFIFO Diagnostic: %x\n", inw(BASE + EP_W4_FIFO_DIAG)); + kprintf("\tStat: %x\n", sc->stat); + kprintf("\tIpackets=%d, Opackets=%d\n", ifp->if_ipackets, ifp->if_opackets); - printf("\tNOF=%d, NOMB=%d, RXOF=%d, RXOL=%d, TXU=%d\n", + kprintf("\tNOF=%d, NOMB=%d, RXOF=%d, RXOL=%d, TXU=%d\n", sc->rx_no_first, sc->rx_no_mbuf, sc->rx_overrunf, sc->rx_overrunl, sc->tx_underrun); #else diff --git a/sys/dev/netif/ex/if_ex.c b/sys/dev/netif/ex/if_ex.c index 00d3379a6b..fb4f2d9a87 100644 --- a/sys/dev/netif/ex/if_ex.c +++ b/sys/dev/netif/ex/if_ex.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ex/if_ex.c,v 1.26.2.3 2001/03/05 05:33:20 imp Exp $ - * $DragonFly: src/sys/dev/netif/ex/if_ex.c,v 1.23 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ex/if_ex.c,v 1.24 2006/12/22 23:26:19 swildner Exp $ * * MAINTAINER: Matthew N. Dodd * @@ -280,7 +280,7 @@ ex_init(void *xsc) int iobase = sc->iobase; unsigned short temp_reg; - DODEBUG(Start_End, printf("ex_init%d: start\n", ifp->if_dunit);); + DODEBUG(Start_End, kprintf("ex_init%d: start\n", ifp->if_dunit);); ifp->if_timer = 0; @@ -343,7 +343,7 @@ ex_init(void *xsc) ifp->if_flags |= IFF_RUNNING; ifp->if_flags &= ~IFF_OACTIVE; - DODEBUG(Status, printf("OIDLE init\n");); + DODEBUG(Status, kprintf("OIDLE init\n");); /* * Final reset of the board, and enable operation. @@ -354,7 +354,7 @@ ex_init(void *xsc) ex_start(ifp); - DODEBUG(Start_End, printf("ex_init%d: finish\n", ifp->if_dunit);); + DODEBUG(Start_End, kprintf("ex_init%d: finish\n", ifp->if_dunit);); } @@ -368,7 +368,7 @@ ex_start(struct ifnet *ifp) struct mbuf * opkt; struct mbuf * m; - DODEBUG(Start_End, printf("ex_start%d: start\n", unit);); + DODEBUG(Start_End, kprintf("ex_start%d: start\n", unit);); /* * Main loop: send outgoing packets to network card until there are no @@ -393,7 +393,7 @@ ex_start(struct ifnet *ifp) data_len = len; - DODEBUG(Sent_Pkts, printf("1. Sending packet with %d data bytes. ", data_len);); + DODEBUG(Sent_Pkts, kprintf("1. Sending packet with %d data bytes. ", data_len);); if (len & 1) { len += XMT_HEADER_LEN + 1; @@ -407,7 +407,7 @@ ex_start(struct ifnet *ifp) avail = -i; } - DODEBUG(Sent_Pkts, printf("i=%d, avail=%d\n", i, avail);); + DODEBUG(Sent_Pkts, kprintf("i=%d, avail=%d\n", i, avail);); if (avail >= len + XMT_HEADER_LEN) { ifq_dequeue(&ifp->if_snd, opkt); @@ -443,7 +443,7 @@ ex_start(struct ifnet *ifp) /* * Build the packet frame in the card's ring buffer. */ - DODEBUG(Sent_Pkts, printf("2. dest=%d, next=%d. ", dest, next);); + DODEBUG(Sent_Pkts, kprintf("2. dest=%d, next=%d. ", dest, next);); outw(iobase + HOST_ADDR_REG, dest); outw(iobase + IO_PORT_REG, Transmit_CMD); @@ -458,7 +458,7 @@ ex_start(struct ifnet *ifp) */ for (m = opkt, i = 0; m != NULL; m = m->m_next) { - DODEBUG(Sent_Pkts, printf("[%d]", m->m_len);); + DODEBUG(Sent_Pkts, kprintf("[%d]", m->m_len);); if (i) { tmp16[1] = *(mtod(m, caddr_t)); outsw(iobase + IO_PORT_REG, tmp16, 1); @@ -509,10 +509,10 @@ ex_start(struct ifnet *ifp) outw(iobase + XMT_BAR, dest); outb(iobase + CMD_REG, Transmit_CMD); sc->tx_head = dest; - DODEBUG(Sent_Pkts, printf("Transmit\n");); + DODEBUG(Sent_Pkts, kprintf("Transmit\n");); } else { outb(iobase + CMD_REG, Resume_XMT_List_CMD); - DODEBUG(Sent_Pkts, printf("Resume\n");); + DODEBUG(Sent_Pkts, kprintf("Resume\n");); } sc->tx_last = dest; @@ -525,10 +525,10 @@ ex_start(struct ifnet *ifp) m_freem(opkt); } else { ifp->if_flags |= IFF_OACTIVE; - DODEBUG(Status, printf("OACTIVE start\n");); + DODEBUG(Status, kprintf("OACTIVE start\n");); } } - DODEBUG(Start_End, printf("ex_start%d: finish\n", unit);); + DODEBUG(Start_End, kprintf("ex_start%d: finish\n", unit);); } void @@ -536,7 +536,7 @@ ex_stop(struct ex_softc *sc) { int iobase = sc->iobase; - DODEBUG(Start_End, printf("ex_stop%d: start\n", unit);); + DODEBUG(Start_End, kprintf("ex_stop%d: start\n", unit);); /* * Disable card operation: @@ -556,7 +556,7 @@ ex_stop(struct ex_softc *sc) outb(iobase + CMD_REG, Reset_CMD); DELAY(200); - DODEBUG(Start_End, printf("ex_stop%d: finish\n", unit);); + DODEBUG(Start_End, kprintf("ex_stop%d: finish\n", unit);); return; } @@ -569,11 +569,11 @@ ex_intr(void *arg) int iobase = sc->iobase; int int_status, send_pkts; - DODEBUG(Start_End, printf("ex_intr%d: start\n", unit);); + DODEBUG(Start_End, kprintf("ex_intr%d: start\n", unit);); #ifdef EXDEBUG if (++exintr_count != 1) - printf("WARNING: nested interrupt (%d). Mail the author.\n", exintr_count); + kprintf("WARNING: nested interrupt (%d). Mail the author.\n", exintr_count); #endif send_pkts = 0; @@ -602,7 +602,7 @@ ex_intr(void *arg) exintr_count--; #endif - DODEBUG(Start_End, printf("ex_intr%d: finish\n", unit);); + DODEBUG(Start_End, kprintf("ex_intr%d: finish\n", unit);); return; } @@ -614,7 +614,7 @@ ex_tx_intr(struct ex_softc *sc) int iobase = sc->iobase; int tx_status; - DODEBUG(Start_End, printf("ex_tx_intr%d: start\n", unit);); + DODEBUG(Start_End, kprintf("ex_tx_intr%d: start\n", unit);); /* * - Cancel the watchdog. @@ -649,8 +649,8 @@ ex_tx_intr(struct ex_softc *sc) ifp->if_flags &= ~IFF_OACTIVE; - DODEBUG(Status, printf("OIDLE tx_intr\n");); - DODEBUG(Start_End, printf("ex_tx_intr%d: finish\n", unit);); + DODEBUG(Status, kprintf("OIDLE tx_intr\n");); + DODEBUG(Start_End, kprintf("ex_tx_intr%d: finish\n", unit);); return; } @@ -666,7 +666,7 @@ ex_rx_intr(struct ex_softc *sc) struct mbuf * m; struct mbuf * ipkt; - DODEBUG(Start_End, printf("ex_rx_intr%d: start\n", unit);); + DODEBUG(Start_End, kprintf("ex_rx_intr%d: start\n", unit);); /* * For all packets received since last receive interrupt: @@ -746,7 +746,7 @@ rx_another: ; else outw(iobase + RCV_STOP_REG, sc->rx_head - 2); - DODEBUG(Start_End, printf("ex_rx_intr%d: finish\n", unit);); + DODEBUG(Start_End, kprintf("ex_rx_intr%d: finish\n", unit);); return; } @@ -759,11 +759,11 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) struct ifreq * ifr = (struct ifreq *)data; int error = 0; - DODEBUG(Start_End, printf("ex_ioctl%d: start ", ifp->if_dunit);); + DODEBUG(Start_End, kprintf("ex_ioctl%d: start ", ifp->if_dunit);); switch(cmd) { case SIOCSIFFLAGS: - DODEBUG(Start_End, printf("SIOCSIFFLAGS");); + DODEBUG(Start_End, kprintf("SIOCSIFFLAGS");); if ((ifp->if_flags & IFF_UP) == 0 && (ifp->if_flags & IFF_RUNNING)) { @@ -775,15 +775,15 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) break; #ifdef NODEF case SIOCGHWADDR: - DODEBUG(Start_End, printf("SIOCGHWADDR");); + DODEBUG(Start_End, kprintf("SIOCGHWADDR");); bcopy((caddr_t)sc->sc_addr, (caddr_t)&ifr->ifr_data, sizeof(sc->sc_addr)); break; #endif case SIOCADDMULTI: - DODEBUG(Start_End, printf("SIOCADDMULTI");); + DODEBUG(Start_End, kprintf("SIOCADDMULTI");); case SIOCDELMULTI: - DODEBUG(Start_End, printf("SIOCDELMULTI");); + DODEBUG(Start_End, kprintf("SIOCDELMULTI");); /* XXX Support not done yet. */ error = EINVAL; break; @@ -792,12 +792,12 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, cmd); break; default: - DODEBUG(Start_End, printf("unknown");); + DODEBUG(Start_End, kprintf("unknown");); error = ether_ioctl(ifp, cmd, data); break; } - DODEBUG(Start_End, printf("\nex_ioctl%d: finish\n", ifp->if_dunit);); + DODEBUG(Start_End, kprintf("\nex_ioctl%d: finish\n", ifp->if_dunit);); return(error); } @@ -806,12 +806,12 @@ ex_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) static void ex_reset(struct ex_softc *sc) { - DODEBUG(Start_End, printf("ex_reset%d: start\n", unit);); + DODEBUG(Start_End, kprintf("ex_reset%d: start\n", unit);); ex_stop(sc); ex_init(sc); - DODEBUG(Start_End, printf("ex_reset%d: finish\n", unit);); + DODEBUG(Start_End, kprintf("ex_reset%d: finish\n", unit);); } static void @@ -819,17 +819,17 @@ ex_watchdog(struct ifnet *ifp) { struct ex_softc * sc = ifp->if_softc; - DODEBUG(Start_End, printf("ex_watchdog%d: start\n", ifp->if_dunit);); + DODEBUG(Start_End, kprintf("ex_watchdog%d: start\n", ifp->if_dunit);); ifp->if_flags &= ~IFF_OACTIVE; - DODEBUG(Status, printf("OIDLE watchdog\n");); + DODEBUG(Status, kprintf("OIDLE watchdog\n");); ifp->if_oerrors++; ex_reset(sc); ex_start(ifp); - DODEBUG(Start_End, printf("ex_watchdog%d: finish\n", ifp->if_dunit);); + DODEBUG(Start_End, kprintf("ex_watchdog%d: finish\n", ifp->if_dunit);); return; } diff --git a/sys/dev/netif/ex/if_ex_isa.c b/sys/dev/netif/ex/if_ex_isa.c index 3f55ec17ce..5734fb6e9e 100644 --- a/sys/dev/netif/ex/if_ex_isa.c +++ b/sys/dev/netif/ex/if_ex_isa.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ex/if_ex_isa.c,v 1.3.2.1 2001/03/05 05:33:20 imp Exp $ - * $DragonFly: src/sys/dev/netif/ex/if_ex_isa.c,v 1.12 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ex/if_ex_isa.c,v 1.13 2006/12/22 23:26:19 swildner Exp $ */ #include @@ -102,7 +102,7 @@ ex_pnp_wakeup (void * dummy) int tmp; if (bootverbose) - printf("ex_pnp_wakeup()\n"); + kprintf("ex_pnp_wakeup()\n"); outb(EX_PNP_WAKE, 0); outb(EX_PNP_WAKE, 0); @@ -133,7 +133,7 @@ ex_isa_identify (driver_t *driver, device_t parent) return (0); if (bootverbose) - printf("ex_isa_identify()\n"); + kprintf("ex_isa_identify()\n"); count = 0; for (ioport = 0x200; ioport < 0x3a0; ioport += 0x10) { @@ -144,7 +144,7 @@ ex_isa_identify (driver_t *driver, device_t parent) } if (bootverbose) - printf("ex: Found card at 0x%03x!\n", ioport); + kprintf("ex: Found card at 0x%03x!\n", ioport); /* Board in PnP mode */ if (eeprom_read(ioport, EE_W0) & EE_W0_PNP) { @@ -152,7 +152,7 @@ ex_isa_identify (driver_t *driver, device_t parent) outb(ioport + CMD_REG, Reset_CMD); DELAY(500); if (bootverbose) - printf("ex: card at 0x%03x in PnP mode!\n", ioport); + kprintf("ex: card at 0x%03x in PnP mode!\n", ioport); continue; } @@ -183,7 +183,7 @@ ex_isa_identify (driver_t *driver, device_t parent) ++count; if (bootverbose) - printf("ex: Adding board at 0x%03x, irq %d\n", ioport, irq); + kprintf("ex: Adding board at 0x%03x, irq %d\n", ioport, irq); } return (count ? 0 : ENXIO); } @@ -214,17 +214,17 @@ ex_isa_probe(device_t dev) iobase = bus_get_resource_start(dev, SYS_RES_IOPORT, 0); if (!iobase) { - printf("ex: no iobase?\n"); + kprintf("ex: no iobase?\n"); return(ENXIO); } if (!look_for_card(iobase)) { - printf("ex: no card found at 0x%03x\n", iobase); + kprintf("ex: no card found at 0x%03x\n", iobase); return(ENXIO); } if (bootverbose) - printf("ex: ex_isa_probe() found card at 0x%03x\n", iobase); + kprintf("ex: ex_isa_probe() found card at 0x%03x\n", iobase); /* * Reset the card. @@ -249,7 +249,7 @@ ex_isa_probe(device_t dev) if (irq > 0) { /* This will happen if board is in PnP mode. */ if (ee2irq[tmp] != irq) { - printf("ex: WARNING: board's EEPROM is configured" + kprintf("ex: WARNING: board's EEPROM is configured" " for IRQ %d, using %d\n", ee2irq[tmp], irq); } @@ -259,7 +259,7 @@ ex_isa_probe(device_t dev) } if (irq == 0) { - printf("ex: invalid IRQ.\n"); + kprintf("ex: invalid IRQ.\n"); return(ENXIO); } @@ -300,7 +300,7 @@ ex_isa_attach(device_t dev) (temp & EE_W0_BUS16) ? "16-bit" : "8-bit"); temp = eeprom_read(sc->iobase, EE_W6); - printf("board id 0x%03x, stepping 0x%01x\n", + kprintf("board id 0x%03x, stepping 0x%01x\n", (temp & EE_W6_BOARD_MASK) >> EE_W6_BOARD_SHIFT, temp & EE_W6_STEP_MASK); diff --git a/sys/dev/netif/ex/if_ex_pccard.c b/sys/dev/netif/ex/if_ex_pccard.c index 7f4603fe46..dcba635881 100644 --- a/sys/dev/netif/ex/if_ex_pccard.c +++ b/sys/dev/netif/ex/if_ex_pccard.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ex/if_ex_pccard.c,v 1.2.2.1 2001/03/05 05:33:20 imp Exp $ - * $DragonFly: src/sys/dev/netif/ex/if_ex_pccard.c,v 1.12 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ex/if_ex_pccard.c,v 1.13 2006/12/22 23:26:19 swildner Exp $ */ #include @@ -104,17 +104,17 @@ ex_pccard_probe(device_t dev) iobase = bus_get_resource_start(dev, SYS_RES_IOPORT, 0); if (!iobase) { - printf("ex: no iobase?\n"); + kprintf("ex: no iobase?\n"); return(ENXIO); } if (bootverbose) - printf("ex: ex_pccard_probe() found card at 0x%03x\n", iobase); + kprintf("ex: ex_pccard_probe() found card at 0x%03x\n", iobase); irq = bus_get_resource_start(dev, SYS_RES_IRQ, 0); if (irq == 0) { - printf("ex: invalid IRQ.\n"); + kprintf("ex: invalid IRQ.\n"); return(ENXIO); } diff --git a/sys/dev/netif/fe/if_fe.c b/sys/dev/netif/fe/if_fe.c index 894fae7a04..c1e8e3c7b6 100644 --- a/sys/dev/netif/fe/if_fe.c +++ b/sys/dev/netif/fe/if_fe.c @@ -22,7 +22,7 @@ /* * $FreeBSD: src/sys/dev/fe/if_fe.c,v 1.65.2.1 2000/09/22 10:01:47 nyan Exp $ - * $DragonFly: src/sys/dev/netif/fe/if_fe.c,v 1.27 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/netif/fe/if_fe.c,v 1.28 2006/12/22 23:26:20 swildner Exp $ * * Device driver for Fujitsu MB86960A/MB86965A based Ethernet cards. * Contributed by M. Sekiguchi. @@ -248,7 +248,7 @@ int valid_Ether_p (u_char const * addr, unsigned vendor) { #ifdef FE_DEBUG - printf("fe?: validating %6D against %06x\n", addr, ":", vendor); + kprintf("fe?: validating %6D against %06x\n", addr, ":", vendor); #endif /* All zero is not allowed as a vendor code. */ @@ -313,10 +313,10 @@ fe_softc_defaults (struct fe_softc *sc) void fe_irq_failure (char const *name, int unit, int irq, char const *list) { - printf("fe%d: %s board is detected, but %s IRQ was given\n", + kprintf("fe%d: %s board is detected, but %s IRQ was given\n", unit, name, (irq == NO_IRQ ? "no" : "invalid")); if (list != NULL) { - printf("fe%d: specify an IRQ from %s in kernel config\n", + kprintf("fe%d: specify an IRQ from %s in kernel config\n", unit, list); } } @@ -436,7 +436,7 @@ fe_read_eeprom_jli (struct fe_softc * sc, u_char * data) int i; data -= JLI_EEPROM_SIZE; for (i = 0; i < JLI_EEPROM_SIZE; i += 16) { - printf("fe%d: EEPROM(JLI):%3x: %16D\n", + kprintf("fe%d: EEPROM(JLI):%3x: %16D\n", sc->sc_unit, i, data + i, " "); } } @@ -552,7 +552,7 @@ fe_read_eeprom_ssi (struct fe_softc *sc, u_char *data) int i; data -= SSI_EEPROM_SIZE; for (i = 0; i < SSI_EEPROM_SIZE; i += 16) { - printf("fe%d: EEPROM(SSI):%3x: %16D\n", + kprintf("fe%d: EEPROM(SSI):%3x: %16D\n", sc->sc_unit, i, data + i, " "); } } @@ -654,7 +654,7 @@ fe_read_eeprom_lnx (struct fe_softc *sc, u_char *data) this board was not a TDK/LANX) or not working properly. */ if (bootverbose) { - printf("fe%d: no ACK received from EEPROM(LNX)\n", + kprintf("fe%d: no ACK received from EEPROM(LNX)\n", sc->sc_unit); } /* Clear the given buffer to indicate we could not get @@ -693,7 +693,7 @@ fe_read_eeprom_lnx (struct fe_softc *sc, u_char *data) if (bootverbose) { data -= LNX_EEPROM_SIZE; for (i = 0; i < LNX_EEPROM_SIZE; i += 16) { - printf("fe%d: EEPROM(LNX):%3x: %16D\n", + kprintf("fe%d: EEPROM(LNX):%3x: %16D\n", sc->sc_unit, i, data + i, " "); } } @@ -782,7 +782,7 @@ fe_attach (device_t dev) default: /* Oops, we can't work with single buffer configuration. */ if (bootverbose) { - printf("fe%d: strange TXBSIZ config; fixing\n", + kprintf("fe%d: strange TXBSIZ config; fixing\n", sc->sc_unit); } sc->proto_dlcr6 &= ~FE_D6_TXBSIZ; @@ -986,11 +986,11 @@ fe_watchdog ( struct ifnet *ifp ) struct fe_softc *sc = (struct fe_softc *)ifp; /* A "debug" message. */ - printf("%s: transmission timeout (%d+%d)%s\n", + kprintf("%s: transmission timeout (%d+%d)%s\n", ifp->if_xname, sc->txb_sched, sc->txb_count, (ifp->if_flags & IFF_UP) ? "" : " when down"); if (sc->sc_if.if_opackets == 0 && sc->sc_if.if_ipackets == 0) - printf("%s: wrong IRQ setting in config?\n", ifp->if_xname); + kprintf("%s: wrong IRQ setting in config?\n", ifp->if_xname); fe_reset(sc); } @@ -1080,7 +1080,7 @@ fe_init (void * xsc) * The following message helps discovering the fact. FIXME. */ if (!(fe_inb(sc, FE_DLCR5) & FE_D5_BUFEMP)) { - printf("fe%d: receive buffer has some data after reset\n", + kprintf("fe%d: receive buffer has some data after reset\n", sc->sc_unit); fe_emptybuffer(sc); } @@ -1161,7 +1161,7 @@ fe_start (struct ifnet *ifp) * txb_count is zero if and only if txb_free is same * as txb_size (which represents whole buffer.) */ - printf("fe%d: inconsistent txb variables (%d, %d)\n", + kprintf("fe%d: inconsistent txb variables (%d, %d)\n", sc->sc_unit, sc->txb_count, sc->txb_free); /* * So, what should I do, then? @@ -1187,7 +1187,7 @@ fe_start (struct ifnet *ifp) * transmitter - should never happen at this point. */ if ((sc->txb_count > 0) && (sc->txb_sched == 0)) { - printf("fe%d: transmitter idle with %d buffered packets\n", + kprintf("fe%d: transmitter idle with %d buffered packets\n", sc->sc_unit, sc->txb_count); fe_xmit(sc); } @@ -1350,7 +1350,7 @@ fe_emptybuffer (struct fe_softc * sc) u_char saved_dlcr5; #ifdef FE_DEBUG - printf("fe%d: emptying receive buffer\n", sc->sc_unit); + kprintf("fe%d: emptying receive buffer\n", sc->sc_unit); #endif /* @@ -1388,7 +1388,7 @@ fe_emptybuffer (struct fe_softc * sc) * Double check. */ if (fe_inb(sc, FE_DLCR5) & FE_D5_BUFEMP) { - printf("fe%d: could not empty receive buffer\n", sc->sc_unit); + kprintf("fe%d: could not empty receive buffer\n", sc->sc_unit); /* Hmm. What should I do if this happens? FIXME. */ } @@ -1419,7 +1419,7 @@ fe_tint (struct fe_softc * sc, u_char tstat) * are left unsent in transmission buffer. */ left = fe_inb(sc, FE_BMPR10); - printf("fe%d: excessive collision (%d/%d)\n", + kprintf("fe%d: excessive collision (%d/%d)\n", sc->sc_unit, left, sc->txb_sched); /* @@ -1626,7 +1626,7 @@ fe_rint (struct fe_softc * sc, u_char rstat) if ((status & 0xF0) != 0x20 || len > ETHER_MAX_LEN - ETHER_CRC_LEN || len < ETHER_MIN_LEN - ETHER_CRC_LEN) { - printf("fe%d: RX buffer out-of-sync\n", sc->sc_unit); + kprintf("fe%d: RX buffer out-of-sync\n", sc->sc_unit); sc->sc_if.if_ierrors++; sc->mibdata.dot3StatsInternalMacReceiveErrors++; fe_reset(sc); @@ -1656,7 +1656,7 @@ fe_rint (struct fe_softc * sc, u_char rstat) /* Maximum number of frames has been received. Something strange is happening here... */ - printf("fe%d: unusual receive flood\n", sc->sc_unit); + kprintf("fe%d: unusual receive flood\n", sc->sc_unit); sc->mibdata.dot3StatsInternalMacReceiveErrors++; fe_reset(sc); } @@ -1730,7 +1730,7 @@ fe_intr (void *arg) fe_start(&sc->sc_if); } - printf("fe%d: too many loops\n", sc->sc_unit); + kprintf("fe%d: too many loops\n", sc->sc_unit); } /* @@ -1904,7 +1904,7 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) /* Check if this matches the one in the packet header. */ if (length != m->m_pkthdr.len) { - printf("fe%d: packet length mismatch? (%d/%d)\n", sc->sc_unit, + kprintf("fe%d: packet length mismatch? (%d/%d)\n", sc->sc_unit, length, m->m_pkthdr.len); } #else @@ -1920,7 +1920,7 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) */ if (length < ETHER_HDR_LEN || length > ETHER_MAX_LEN - ETHER_CRC_LEN) { - printf("fe%d: got an out-of-spec packet (%u bytes) to send\n", + kprintf("fe%d: got an out-of-spec packet (%u bytes) to send\n", sc->sc_unit, length); sc->sc_if.if_oerrors++; sc->mibdata.dot3StatsInternalMacTransmitErrors++; @@ -2080,7 +2080,7 @@ fe_mcaf ( struct fe_softc *sc ) continue; index = fe_hash(LLADDR((struct sockaddr_dl *)ifma->ifma_addr)); #ifdef FE_DEBUG - printf("fe%d: hash(%6D) == %d\n", + kprintf("fe%d: hash(%6D) == %d\n", sc->sc_unit, enm->enm_addrlo , ":", index); #endif @@ -2223,7 +2223,7 @@ fe_medchange (struct ifnet *ifp) if (bit2media[b] == sc->media.ifm_media) break; } if (((1 << b) & sc->mbitmap) == 0) { - printf("fe%d: got an unsupported media request (0x%x)\n", + kprintf("fe%d: got an unsupported media request (0x%x)\n", sc->sc_unit, sc->media.ifm_media); return EINVAL; } diff --git a/sys/dev/netif/fe/if_fe_isa.c b/sys/dev/netif/fe/if_fe_isa.c index cb7d4bb7ee..09e5c1ec9d 100644 --- a/sys/dev/netif/fe/if_fe_isa.c +++ b/sys/dev/netif/fe/if_fe_isa.c @@ -20,7 +20,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fe/if_fe_isa.c,v 1.2.2.1 2000/09/22 10:01:47 nyan Exp $ - * $DragonFly: src/sys/dev/netif/fe/if_fe_isa.c,v 1.7 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/netif/fe/if_fe_isa.c,v 1.8 2006/12/22 23:26:20 swildner Exp $ */ #include "opt_fe.h" @@ -545,7 +545,7 @@ fe_probe_jli_icl(struct fe_softc * sc, u_char const * eeprom) sc->typestr = "EtherTeam16i"; sc->stability |= UNSTABLE_TYPE; if (bootverbose) { - printf("fe%d: unknown model code %02x for EtherTeam16i\n", + kprintf("fe%d: unknown model code %02x for EtherTeam16i\n", sc->sc_unit, eeprom[0x5E]); } break; @@ -564,7 +564,7 @@ fe_probe_jli_icl(struct fe_softc * sc, u_char const * eeprom) case 3: defmedia = MB_H2; break; default: if (bootverbose) { - printf("fe%d: unknown default media: %02x\n", + kprintf("fe%d: unknown default media: %02x\n", sc->sc_unit, eeprom[0x28]); } defmedia = MB_HA; @@ -575,7 +575,7 @@ fe_probe_jli_icl(struct fe_softc * sc, u_char const * eeprom) supported media. */ if ((defmedia & sc->mbitmap) == 0) { if (bootverbose) { - printf("fe%d: default media adjusted\n", sc->sc_unit); + kprintf("fe%d: default media adjusted\n", sc->sc_unit); } defmedia = sc->mbitmap; } @@ -592,7 +592,7 @@ fe_probe_jli_icl(struct fe_softc * sc, u_char const * eeprom) default: /* We can't support it, since we don't know which bits to set in DLCR6. */ - printf("fe%d: unknown SRAM config for ICL\n", sc->sc_unit); + kprintf("fe%d: unknown SRAM config for ICL\n", sc->sc_unit); return NULL; } sc->proto_dlcr6 = d6; diff --git a/sys/dev/netif/fpa/if_fpa.c b/sys/dev/netif/fpa/if_fpa.c index fd5eda1a7e..29009e3c05 100644 --- a/sys/dev/netif/fpa/if_fpa.c +++ b/sys/dev/netif/fpa/if_fpa.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pdq/if_fpa.c,v 1.13 1999/08/28 00:50:50 peter Exp $ - * $DragonFly: src/sys/dev/netif/fpa/Attic/if_fpa.c,v 1.16 2006/09/05 00:55:40 dillon Exp $ + * $DragonFly: src/sys/dev/netif/fpa/Attic/if_fpa.c,v 1.17 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -160,7 +160,7 @@ pdq_pci_attach( pdq_uint32_t data; if (unit == NFPA) { - printf("fpa%d: not configured; kernel is built for only %d device%s.\n", + kprintf("fpa%d: not configured; kernel is built for only %d device%s.\n", unit, NFPA, NFPA == 1 ? "" : "s"); return; } @@ -255,7 +255,7 @@ pdq_pci_probe( irq = (1 << (pci_inl(pa, PCI_I_LINE) & 0xFF)); if (ia->ia_irq != IRQUNK && irq != ia->ia_irq) { - printf("fpa%d: error: desired IRQ of %d does not match device's actual IRQ of %d\n", + kprintf("fpa%d: error: desired IRQ of %d does not match device's actual IRQ of %d\n", cf->cf_unit, ffs(ia->ia_irq) - 1, ffs(irq) - 1); return 0; @@ -310,7 +310,7 @@ pdq_pci_attach( sc->sc_if.if_dname, sc->sc_if.if_dunit, (void *) sc, PDQ_DEFPA); if (sc->sc_pdq == NULL) { - printf("%s: initialization failed\n", sc->sc_if.if_xname); + kprintf("%s: initialization failed\n", sc->sc_if.if_xname); return; } @@ -400,7 +400,7 @@ pdq_pci_attach( sc->sc_if.if_xname, 0, (void *) sc, PDQ_DEFPA); if (sc->sc_pdq == NULL) { - printf("%s: initialization failed\n", sc->sc_dev.dv_xname); + kprintf("%s: initialization failed\n", sc->sc_dev.dv_xname); return; } @@ -409,24 +409,24 @@ pdq_pci_attach( if (pci_intr_map(pa->pa_pc, pa->pa_intrtag, pa->pa_intrpin, pa->pa_intrline, &intrhandle)) { - printf("%s: couldn't map interrupt\n", self->dv_xname); + kprintf("%s: couldn't map interrupt\n", self->dv_xname); return; } intrstr = pci_intr_string(pa->pa_pc, intrhandle); sc->sc_ih = pci_intr_establish(pa->pa_pc, intrhandle, IPL_NET, pdq_pci_ifintr, sc); if (sc->sc_ih == NULL) { - printf("%s: couldn't establish interrupt", self->dv_xname); + kprintf("%s: couldn't establish interrupt", self->dv_xname); if (intrstr != NULL) - printf(" at %s", intrstr); - printf("\n"); + kprintf(" at %s", intrstr); + kprintf("\n"); return; } sc->sc_ats = shutdownhook_establish((void (*)(void *)) pdq_hwreset, sc->sc_pdq); if (sc->sc_ats == NULL) - printf("%s: warning: couldn't establish shutdown hook\n", self->dv_xname); + kprintf("%s: warning: couldn't establish shutdown hook\n", self->dv_xname); if (intrstr != NULL) - printf("%s: interrupting at %s\n", self->dv_xname, intrstr); + kprintf("%s: interrupting at %s\n", self->dv_xname, intrstr); } struct cfattach fpa_ca = { diff --git a/sys/dev/netif/gx/if_gx.c b/sys/dev/netif/gx/if_gx.c index 0d89d27405..b73d4be323 100644 --- a/sys/dev/netif/gx/if_gx.c +++ b/sys/dev/netif/gx/if_gx.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/gx/if_gx.c,v 1.2.2.3 2001/12/14 19:51:39 jlemon Exp $ - * $DragonFly: src/sys/dev/netif/gx/Attic/if_gx.c,v 1.25 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/gx/Attic/if_gx.c,v 1.26 2006/12/22 23:26:20 swildner Exp $ */ #include @@ -541,7 +541,7 @@ gx_init(void *xsc) } #if 0 -printf("66mhz: %s 64bit: %s\n", +kprintf("66mhz: %s 64bit: %s\n", CSR_READ_4(gx, GX_STATUS) & GX_STAT_PCI66 ? "yes" : "no", CSR_READ_4(gx, GX_STATUS) & GX_STAT_BUS64 ? "yes" : "no"); #endif @@ -1474,7 +1474,7 @@ context_done: continue; if (cnt == GX_TX_RING_CNT) { -printf("overflow(2): %d, %d\n", cnt, GX_TX_RING_CNT); +kprintf("overflow(2): %d, %d\n", cnt, GX_TX_RING_CNT); return (ENOBUFS); } diff --git a/sys/dev/netif/ic/if_ic.c b/sys/dev/netif/ic/if_ic.c index c8b6b90f2e..bb6877c62a 100644 --- a/sys/dev/netif/ic/if_ic.c +++ b/sys/dev/netif/ic/if_ic.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/iicbus/if_ic.c,v 1.8 1999/12/29 04:35:39 peter Exp $ - * $DragonFly: src/sys/dev/netif/ic/if_ic.c,v 1.16 2006/09/05 03:48:10 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ic/if_ic.c,v 1.17 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -322,7 +322,7 @@ icintr (device_t dev, int event, char *ptr) break; err: - printf("ic%d: errors (%d)!\n", unit, sc->ic_iferrs); + kprintf("ic%d: errors (%d)!\n", unit, sc->ic_iferrs); sc->ic_iferrs = 0; /* reset error count */ sc->ic_if.if_ierrors ++; diff --git a/sys/dev/netif/ie/if_ie.c b/sys/dev/netif/ie/if_ie.c index 002b347835..c026cdcbc1 100644 --- a/sys/dev/netif/ie/if_ie.c +++ b/sys/dev/netif/ie/if_ie.c @@ -48,7 +48,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ie/if_ie.c,v 1.72.2.4 2003/03/27 21:01:49 mdodd Exp $ - * $DragonFly: src/sys/dev/netif/ie/if_ie.c,v 1.30 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ie/if_ie.c,v 1.31 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -393,7 +393,7 @@ sl_probe(struct isa_device *dvp) default: if (bootverbose) - printf("ie%d: unknown AT&T board type code %d\n", unit, + kprintf("ie%d: unknown AT&T board type code %d\n", unit, ie_softc[unit].hard_type); return (0); } @@ -430,7 +430,7 @@ el_probe(struct isa_device *dvp) c = inb(PORT + IE507_MADDR); if (c & 0x20) { #ifdef DEBUG - printf("ie%d: can't map 3C507 RAM in high memory\n", unit); + kprintf("ie%d: can't map 3C507 RAM in high memory\n", unit); #endif return (0); } @@ -448,7 +448,7 @@ el_probe(struct isa_device *dvp) c = inb(PORT + IE507_IRQ) & 0x0f; if (dvp->id_irq != (1 << c)) { - printf("ie%d: kernel configured irq %d " + kprintf("ie%d: kernel configured irq %d " "doesn't match board configured irq %d\n", unit, ffs(dvp->id_irq) - 1, c); return (0); @@ -456,7 +456,7 @@ el_probe(struct isa_device *dvp) c = (inb(PORT + IE507_MADDR) & 0x1c) + 0xc0; if (kvtop(dvp->id_maddr) != ((int) c << 12)) { - printf("ie%d: kernel configured maddr %llx " + kprintf("ie%d: kernel configured maddr %llx " "doesn't match board configured maddr %x\n", unit, kvtop(dvp->id_maddr), (int) c << 12); return (0); @@ -472,14 +472,14 @@ el_probe(struct isa_device *dvp) find_ie_mem_size(unit); if (!sc->iosize) { - printf("ie%d: can't find shared memory\n", unit); + kprintf("ie%d: can't find shared memory\n", unit); outb(PORT + IE507_CTRL, EL_CTRL_NRST); return (0); } if (!dvp->id_msize) dvp->id_msize = sc->iosize; else if (dvp->id_msize != sc->iosize) { - printf("ie%d: kernel configured msize %d " + kprintf("ie%d: kernel configured msize %d " "doesn't match board configured msize %d\n", unit, dvp->id_msize, sc->iosize); outb(PORT + IE507_CTRL, EL_CTRL_NRST); @@ -535,7 +535,7 @@ ni_probe(struct isa_device *dvp) if (!dvp->id_msize) dvp->id_msize = ie_softc[unit].iosize; else if (dvp->id_msize != ie_softc[unit].iosize) { - printf("ie%d: kernel configured msize %d " + kprintf("ie%d: kernel configured msize %d " "doesn't match board configured msize %d\n", unit, dvp->id_msize, ie_softc[unit].iosize); return (0); @@ -601,7 +601,7 @@ ee16_probe(struct isa_device *dvp) if (board_id != IEE16_ID) { if (bootverbose) - printf("ie%d: unknown board_id: %x\n", unit, board_id); + kprintf("ie%d: unknown board_id: %x\n", unit, board_id); return (0); } /* need sc->port for ee16_read_eeprom */ @@ -645,7 +645,7 @@ ee16_probe(struct isa_device *dvp) } dvp->id_msize = 0x8000; if (kvtop(dvp->id_maddr) != bd_maddr) { - printf("ie%d: kernel configured maddr %llx " + kprintf("ie%d: kernel configured maddr %llx " "doesn't match board configured maddr %lx\n", unit, kvtop(dvp->id_maddr), bd_maddr); } @@ -661,7 +661,7 @@ ee16_probe(struct isa_device *dvp) checksum += ee16_read_eeprom(sc, i); if (checksum != IEE16_ID) { - printf("ie%d: invalid eeprom checksum: %x\n", unit, checksum); + kprintf("ie%d: invalid eeprom checksum: %x\n", unit, checksum); return (0); } /* @@ -680,7 +680,7 @@ ee16_probe(struct isa_device *dvp) case 16384: case 49512: default: - printf("ie%d: mapped memory size %d not supported\n", unit, + kprintf("ie%d: mapped memory size %d not supported\n", unit, dvp->id_msize); return (0); break; /* NOTREACHED */ @@ -688,7 +688,7 @@ ee16_probe(struct isa_device *dvp) if ((kvtop(dvp->id_maddr) < 0xC0000) || (kvtop(dvp->id_maddr) + sc->iosize > 0xF0000)) { - printf("ie%d: mapped memory location %p out of range\n", unit, + kprintf("ie%d: mapped memory location %p out of range\n", unit, (void *)dvp->id_maddr); return (0); } @@ -725,7 +725,7 @@ ee16_probe(struct isa_device *dvp) irq = irq_translate[irq]; if (dvp->id_irq > 0) { if (irq != dvp->id_irq) { - printf("ie%d: WARNING: board configured " + kprintf("ie%d: WARNING: board configured " "at irq %u, using %u\n", dvp->id_unit, dvp->id_irq, irq); irq = dvp->id_unit; @@ -866,7 +866,7 @@ loop: #ifdef DEBUG in_ierint++; if (ie_debug & IED_RINT) - printf("ie%d: rint\n", unit); + kprintf("ie%d: rint\n", unit); #endif ierint(unit, ie); #ifdef DEBUG @@ -877,7 +877,7 @@ loop: #ifdef DEBUG in_ietint++; if (ie_debug & IED_TINT) - printf("ie%d: tint\n", unit); + kprintf("ie%d: tint\n", unit); #endif ietint(unit, ie); #ifdef DEBUG @@ -887,14 +887,14 @@ loop: if (status & IE_ST_RNR) { #ifdef DEBUG if (ie_debug & IED_RNR) - printf("ie%d: rnr\n", unit); + kprintf("ie%d: rnr\n", unit); #endif iernr(unit, ie); } #ifdef DEBUG if ((status & IE_ST_ALLDONE) && (ie_debug & IED_CNA)) - printf("ie%d: cna\n", unit); + kprintf("ie%d: cna\n", unit); #endif if ((status = ie->scb->ie_status) & IE_ST_WHENCE) @@ -975,20 +975,20 @@ ietint(int unit, struct ie_softc *ie) status = ie->xmit_cmds[i]->ie_xmit_status; if (status & IE_XS_LATECOLL) { - printf("ie%d: late collision\n", unit); + kprintf("ie%d: late collision\n", unit); ie->arpcom.ac_if.if_collisions++; ie->arpcom.ac_if.if_oerrors++; } else if (status & IE_XS_NOCARRIER) { - printf("ie%d: no carrier\n", unit); + kprintf("ie%d: no carrier\n", unit); ie->arpcom.ac_if.if_oerrors++; } else if (status & IE_XS_LOSTCTS) { - printf("ie%d: lost CTS\n", unit); + kprintf("ie%d: lost CTS\n", unit); ie->arpcom.ac_if.if_oerrors++; } else if (status & IE_XS_UNDERRUN) { - printf("ie%d: DMA underrun\n", unit); + kprintf("ie%d: DMA underrun\n", unit); ie->arpcom.ac_if.if_oerrors++; } else if (status & IE_XS_EXCMAX) { - printf("ie%d: too many collisions\n", unit); + kprintf("ie%d: too many collisions\n", unit); ie->arpcom.ac_if.if_collisions += 16; ie->arpcom.ac_if.if_oerrors++; } else { @@ -1721,7 +1721,7 @@ iereset(int unit) if (unit >= NIE) { return; } - printf("ie%d: reset\n", unit); + kprintf("ie%d: reset\n", unit); ie_softc[unit].arpcom.ac_if.if_flags &= ~IFF_UP; ieioctl(&ie_softc[unit].arpcom.ac_if, SIOCSIFFLAGS, 0, (struct ucred *)NULL); @@ -1729,10 +1729,10 @@ iereset(int unit) * Stop i82586 dead in its tracks. */ if (command_and_wait(unit, IE_RU_ABORT | IE_CU_ABORT, 0, 0)) - printf("ie%d: abort commands timed out\n", unit); + kprintf("ie%d: abort commands timed out\n", unit); if (command_and_wait(unit, IE_RU_DISABLE | IE_CU_STOP, 0, 0)) - printf("ie%d: disable commands timed out\n", unit); + kprintf("ie%d: disable commands timed out\n", unit); #ifdef notdef if (!check_ie_present(unit, ie_softc[unit].iomembot, @@ -1826,15 +1826,15 @@ run_tdr(int unit, volatile struct ie_tdr_cmd *cmd) return; if (result & IE_TDR_XCVR) { - printf("ie%d: transceiver problem\n", unit); + kprintf("ie%d: transceiver problem\n", unit); } else if (result & IE_TDR_OPEN) { - printf("ie%d: TDR detected an open %d clocks away\n", unit, + kprintf("ie%d: TDR detected an open %d clocks away\n", unit, result & IE_TDR_TIME); } else if (result & IE_TDR_SHORT) { - printf("ie%d: TDR detected a short %d clocks away\n", unit, + kprintf("ie%d: TDR detected a short %d clocks away\n", unit, result & IE_TDR_TIME); } else { - printf("ie%d: TDR returned unknown status %x\n", unit, result); + kprintf("ie%d: TDR returned unknown status %x\n", unit, result); } } @@ -1943,7 +1943,7 @@ mc_setup(int unit, v_caddr_t ptr, scb->ie_command_list = MK_16(MEM, cmd); if (command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL) || !(cmd->com.ie_cmd_status & IE_STAT_OK)) { - printf("ie%d: multicast address setup command failed\n", unit); + kprintf("ie%d: multicast address setup command failed\n", unit); return (0); } return (1); @@ -1982,7 +1982,7 @@ ieinit(void *xsc) if (command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL) || !(cmd->com.ie_cmd_status & IE_STAT_OK)) { - printf("ie%d: configure command failed\n", unit); + kprintf("ie%d: configure command failed\n", unit); return; } } @@ -2001,7 +2001,7 @@ ieinit(void *xsc) scb->ie_command_list = MK_16(MEM, cmd); if (command_and_wait(unit, IE_CU_START, cmd, IE_STAT_COMPL) || !(cmd->com.ie_cmd_status & IE_STAT_OK)) { - printf("ie%d: individual address " + kprintf("ie%d: individual address " "setup command failed\n", unit); return; } @@ -2159,7 +2159,7 @@ setflag: static void print_rbd(volatile struct ie_recv_buf_desc * rbd) { - printf("RBD at %p:\n" + kprintf("RBD at %p:\n" "actual %04x, next %04x, buffer %p\n" "length %04x, mbz %04x\n", (volatile void *) rbd, diff --git a/sys/dev/netif/ipw/if_ipw.c b/sys/dev/netif/ipw/if_ipw.c index 6618ef1dd5..85263396a9 100644 --- a/sys/dev/netif/ipw/if_ipw.c +++ b/sys/dev/netif/ipw/if_ipw.c @@ -27,7 +27,7 @@ * * $Id: if_ipw.c,v 1.7.2.1 2005/01/13 20:01:03 damien Exp $ * $FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.7.2.4 2006/01/29 15:13:01 damien Exp $ - * $DragonFly: src/sys/dev/netif/ipw/Attic/if_ipw.c,v 1.17 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ipw/Attic/if_ipw.c,v 1.18 2006/12/22 23:26:20 swildner Exp $ */ /*- @@ -82,8 +82,8 @@ #include #ifdef IPW_DEBUG -#define DPRINTF(x) if (ipw_debug > 0) printf x -#define DPRINTFN(n, x) if (ipw_debug >= (n)) printf x +#define DPRINTF(x) if (ipw_debug > 0) kprintf x +#define DPRINTFN(n, x) if (ipw_debug >= (n)) kprintf x int ipw_debug = 0; SYSCTL_INT(_debug, OID_AUTO, ipw, CTLFLAG_RW, &ipw_debug, 0, "ipw debug level"); #else @@ -1961,9 +1961,9 @@ ipw_config(struct ipw_softc *sc) #ifdef IPW_DEBUG if (ipw_debug > 0) { - printf("Setting ESSID to "); + kprintf("Setting ESSID to "); ieee80211_print_essid(ic->ic_des_essid, ic->ic_des_esslen); - printf("\n"); + kprintf("\n"); } #endif error = ipw_cmd(sc, IPW_CMD_SET_ESSID, ic->ic_des_essid, diff --git a/sys/dev/netif/iwi/if_iwi.c b/sys/dev/netif/iwi/if_iwi.c index 416f7f4ff3..b54a3d203f 100644 --- a/sys/dev/netif/iwi/if_iwi.c +++ b/sys/dev/netif/iwi/if_iwi.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/iwi/if_iwi.c,v 1.8.2.6 2006/02/23 02:06:46 sam Exp $ - * $DragonFly: src/sys/dev/netif/iwi/if_iwi.c,v 1.16 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/iwi/if_iwi.c,v 1.17 2006/12/22 23:26:20 swildner Exp $ */ /*- @@ -80,8 +80,8 @@ #include #ifdef IWI_DEBUG -#define DPRINTF(x) do { if (iwi_debug > 0) printf x; } while (0) -#define DPRINTFN(n, x) do { if (iwi_debug >= (n)) printf x; } while (0) +#define DPRINTF(x) do { if (iwi_debug > 0) kprintf x; } while (0) +#define DPRINTFN(n, x) do { if (iwi_debug >= (n)) kprintf x; } while (0) int iwi_debug = 0; SYSCTL_INT(_debug, OID_AUTO, iwi, CTLFLAG_RW, &iwi_debug, 0, "iwi debug level"); #else @@ -2406,10 +2406,10 @@ iwi_config(struct iwi_softc *sc) if (ic->ic_des_esslen != 0) { #ifdef IWI_DEBUG if (iwi_debug > 0) { - printf("Setting desired ESSID to "); + kprintf("Setting desired ESSID to "); ieee80211_print_essid(ic->ic_des_essid, ic->ic_des_esslen); - printf("\n"); + kprintf("\n"); } #endif error = iwi_cmd(sc, IWI_CMD_SET_ESSID, ic->ic_des_essid, @@ -2539,9 +2539,9 @@ iwi_auth_and_assoc(struct iwi_softc *sc) #ifdef IWI_DEBUG if (iwi_debug > 0) { - printf("Setting ESSID to "); + kprintf("Setting ESSID to "); ieee80211_print_essid(ni->ni_essid, ni->ni_esslen); - printf("\n"); + kprintf("\n"); } #endif error = iwi_cmd(sc, IWI_CMD_SET_ESSID, ni->ni_essid, ni->ni_esslen, 1); diff --git a/sys/dev/netif/kue/if_kue.c b/sys/dev/netif/kue/if_kue.c index 50545a8d6e..8d3e14970d 100644 --- a/sys/dev/netif/kue/if_kue.c +++ b/sys/dev/netif/kue/if_kue.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/if_kue.c,v 1.17.2.9 2003/04/13 02:39:25 murray Exp $ - * $DragonFly: src/sys/dev/netif/kue/if_kue.c,v 1.22 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/kue/if_kue.c,v 1.23 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -281,7 +281,7 @@ kue_load_fw(struct kue_softc *sc) err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN, 0, kue_code_seg, sizeof(kue_code_seg)); if (err) { - printf("kue%d: failed to load code segment: %s\n", + kprintf("kue%d: failed to load code segment: %s\n", sc->kue_unit, usbd_errstr(err)); return(ENXIO); } @@ -290,7 +290,7 @@ kue_load_fw(struct kue_softc *sc) err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN, 0, kue_fix_seg, sizeof(kue_fix_seg)); if (err) { - printf("kue%d: failed to load fixup segment: %s\n", + kprintf("kue%d: failed to load fixup segment: %s\n", sc->kue_unit, usbd_errstr(err)); return(ENXIO); } @@ -299,7 +299,7 @@ kue_load_fw(struct kue_softc *sc) err = kue_ctl(sc, KUE_CTL_WRITE, KUE_CMD_SEND_SCAN, 0, kue_trig_seg, sizeof(kue_trig_seg)); if (err) { - printf("kue%d: failed to load trigger segment: %s\n", + kprintf("kue%d: failed to load trigger segment: %s\n", sc->kue_unit, usbd_errstr(err)); return(ENXIO); } @@ -368,7 +368,7 @@ kue_reset(struct kue_softc *sc) if (usbd_set_config_no(sc->kue_udev, KUE_CONFIG_NO, 0) || usbd_device2interface_handle(sc->kue_udev, KUE_IFACE_IDX, &sc->kue_iface)) { - printf("kue%d: getting interface handle failed\n", + kprintf("kue%d: getting interface handle failed\n", sc->kue_unit); } @@ -422,13 +422,13 @@ USB_ATTACH(kue) usbd_devinfo(uaa->device, 0, devinfo); device_set_desc_copy(self, devinfo); - printf("%s: %s\n", USBDEVNAME(self), devinfo); + kprintf("%s: %s\n", USBDEVNAME(self), devinfo); /* Find endpoints. */ for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(uaa->iface, i); if (!ed) { - printf("kue%d: couldn't get ep %d\n", + kprintf("kue%d: couldn't get ep %d\n", sc->kue_unit, i); USB_ATTACH_ERROR_RETURN; } @@ -538,14 +538,14 @@ kue_newbuf(struct kue_softc *sc, struct kue_chain *c, struct mbuf *m) if (m == NULL) { MGETHDR(m_new, MB_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("kue%d: no memory for rx list " + kprintf("kue%d: no memory for rx list " "-- packet dropped!\n", sc->kue_unit); return(ENOBUFS); } MCLGET(m_new, MB_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("kue%d: no memory for rx list " + kprintf("kue%d: no memory for rx list " "-- packet dropped!\n", sc->kue_unit); m_freem(m_new); return(ENOBUFS); @@ -668,7 +668,7 @@ kue_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) return; } if (usbd_ratecheck(&sc->kue_rx_notice)) - printf("kue%d: usb error on rx: %s\n", sc->kue_unit, + kprintf("kue%d: usb error on rx: %s\n", sc->kue_unit, usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->kue_ep[KUE_ENDPT_RX]); @@ -740,7 +740,7 @@ kue_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) KUE_UNLOCK(sc); return; } - printf("kue%d: usb error on tx: %s\n", sc->kue_unit, + kprintf("kue%d: usb error on tx: %s\n", sc->kue_unit, usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall(sc->kue_ep[KUE_ENDPT_TX]); @@ -890,14 +890,14 @@ kue_init(void *xsc) /* Init TX ring. */ if (kue_tx_list_init(sc) == ENOBUFS) { - printf("kue%d: tx list init failed\n", sc->kue_unit); + kprintf("kue%d: tx list init failed\n", sc->kue_unit); KUE_UNLOCK(sc); return; } /* Init RX ring. */ if (kue_rx_list_init(sc) == ENOBUFS) { - printf("kue%d: rx list init failed\n", sc->kue_unit); + kprintf("kue%d: rx list init failed\n", sc->kue_unit); KUE_UNLOCK(sc); return; } @@ -909,7 +909,7 @@ kue_init(void *xsc) err = usbd_open_pipe(sc->kue_iface, sc->kue_ed[KUE_ENDPT_RX], USBD_EXCLUSIVE_USE, &sc->kue_ep[KUE_ENDPT_RX]); if (err) { - printf("kue%d: open rx pipe failed: %s\n", + kprintf("kue%d: open rx pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); KUE_UNLOCK(sc); return; @@ -918,7 +918,7 @@ kue_init(void *xsc) err = usbd_open_pipe(sc->kue_iface, sc->kue_ed[KUE_ENDPT_TX], USBD_EXCLUSIVE_USE, &sc->kue_ep[KUE_ENDPT_TX]); if (err) { - printf("kue%d: open tx pipe failed: %s\n", + kprintf("kue%d: open tx pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); KUE_UNLOCK(sc); return; @@ -998,7 +998,7 @@ kue_watchdog(struct ifnet *ifp) sc = ifp->if_softc; KUE_LOCK(sc); ifp->if_oerrors++; - printf("kue%d: watchdog timeout\n", sc->kue_unit); + kprintf("kue%d: watchdog timeout\n", sc->kue_unit); c = &sc->kue_cdata.kue_tx_chain[0]; usbd_get_xfer_status(c->kue_xfer, NULL, NULL, NULL, &stat); @@ -1030,12 +1030,12 @@ kue_stop(struct kue_softc *sc) if (sc->kue_ep[KUE_ENDPT_RX] != NULL) { err = usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_RX]); if (err) { - printf("kue%d: abort rx pipe failed: %s\n", + kprintf("kue%d: abort rx pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); } err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_RX]); if (err) { - printf("kue%d: close rx pipe failed: %s\n", + kprintf("kue%d: close rx pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); } sc->kue_ep[KUE_ENDPT_RX] = NULL; @@ -1044,12 +1044,12 @@ kue_stop(struct kue_softc *sc) if (sc->kue_ep[KUE_ENDPT_TX] != NULL) { err = usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_TX]); if (err) { - printf("kue%d: abort tx pipe failed: %s\n", + kprintf("kue%d: abort tx pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); } err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_TX]); if (err) { - printf("kue%d: close tx pipe failed: %s\n", + kprintf("kue%d: close tx pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); } sc->kue_ep[KUE_ENDPT_TX] = NULL; @@ -1058,12 +1058,12 @@ kue_stop(struct kue_softc *sc) if (sc->kue_ep[KUE_ENDPT_INTR] != NULL) { err = usbd_abort_pipe(sc->kue_ep[KUE_ENDPT_INTR]); if (err) { - printf("kue%d: abort intr pipe failed: %s\n", + kprintf("kue%d: abort intr pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); } err = usbd_close_pipe(sc->kue_ep[KUE_ENDPT_INTR]); if (err) { - printf("kue%d: close intr pipe failed: %s\n", + kprintf("kue%d: close intr pipe failed: %s\n", sc->kue_unit, usbd_errstr(err)); } sc->kue_ep[KUE_ENDPT_INTR] = NULL; diff --git a/sys/dev/netif/le/if_le.c b/sys/dev/netif/le/if_le.c index a2041201e2..74b3785115 100644 --- a/sys/dev/netif/le/if_le.c +++ b/sys/dev/netif/le/if_le.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/if_le.c,v 1.56.2.4 2002/06/05 23:24:10 paul Exp $ - * $DragonFly: src/sys/dev/netif/le/if_le.c,v 1.36 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/netif/le/if_le.c,v 1.37 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -261,7 +261,7 @@ le_probe(struct isa_device *dvp) lwkt_serialize_init(&le_serialize); if (dvp->id_unit >= NLE) { - printf("%s%d not configured -- too many devices\n", + kprintf("%s%d not configured -- too many devices\n", ledriver.name, dvp->id_unit); return 0; } @@ -1350,13 +1350,13 @@ lance_dumpcsrs(struct le_softc *sc, const char *id) { if_printf(&sc->le_if, "%s: nicsr=%04x", id, DEPCA_RDNICSR(sc)); LN_SELCSR(sc, LN_CSR0); - printf(" csr0=%04x", LN_RDCSR(sc)); + kprintf(" csr0=%04x", LN_RDCSR(sc)); LN_SELCSR(sc, LN_CSR1); - printf(" csr1=%04x", LN_RDCSR(sc)); + kprintf(" csr1=%04x", LN_RDCSR(sc)); LN_SELCSR(sc, LN_CSR2); - printf(" csr2=%04x", LN_RDCSR(sc)); + kprintf(" csr2=%04x", LN_RDCSR(sc)); LN_SELCSR(sc, LN_CSR3); - printf(" csr3=%04x\n", LN_RDCSR(sc)); + kprintf(" csr3=%04x\n", LN_RDCSR(sc)); LN_SELCSR(sc, LN_CSR0); } diff --git a/sys/dev/netif/lge/if_lge.c b/sys/dev/netif/lge/if_lge.c index 19c3b67798..11da586503 100644 --- a/sys/dev/netif/lge/if_lge.c +++ b/sys/dev/netif/lge/if_lge.c @@ -31,7 +31,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/lge/if_lge.c,v 1.5.2.2 2001/12/14 19:49:23 jlemon Exp $ - * $DragonFly: src/sys/dev/netif/lge/if_lge.c,v 1.37 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/lge/if_lge.c,v 1.38 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -226,7 +226,7 @@ lge_eeprom_getword(struct lge_softc *sc, int addr, uint16_t *dest) } if (i == LGE_TIMEOUT) { - printf("lge%d: EEPROM read timed out\n", sc->lge_unit); + kprintf("lge%d: EEPROM read timed out\n", sc->lge_unit); return; } @@ -276,7 +276,7 @@ lge_miibus_readreg(device_t dev, int phy, int reg) } if (i == LGE_TIMEOUT) { - printf("lge%d: PHY read timed out\n", sc->lge_unit); + kprintf("lge%d: PHY read timed out\n", sc->lge_unit); return(0); } @@ -298,7 +298,7 @@ lge_miibus_writereg(device_t dev, int phy, int reg, int data) } if (i == LGE_TIMEOUT) { - printf("lge%d: PHY write timed out\n", sc->lge_unit); + kprintf("lge%d: PHY write timed out\n", sc->lge_unit); return(0); } @@ -390,7 +390,7 @@ lge_reset(struct lge_softc *sc) } if (i == LGE_TIMEOUT) - printf("lge%d: reset never completed\n", sc->lge_unit); + kprintf("lge%d: reset never completed\n", sc->lge_unit); /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); @@ -465,7 +465,7 @@ lge_attach(device_t dev) sc->lge_res = bus_alloc_resource_any(dev, LGE_RES, &rid, RF_ACTIVE); if (sc->lge_res == NULL) { - printf("lge%d: couldn't map ports/memory\n", unit); + kprintf("lge%d: couldn't map ports/memory\n", unit); error = ENXIO; goto fail; } @@ -479,7 +479,7 @@ lge_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); if (sc->lge_irq == NULL) { - printf("lge%d: couldn't map interrupt\n", unit); + kprintf("lge%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } @@ -500,7 +500,7 @@ lge_attach(device_t dev) M_WAITOK, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->lge_ldata == NULL) { - printf("lge%d: no memory for list buffers!\n", unit); + kprintf("lge%d: no memory for list buffers!\n", unit); error = ENXIO; goto fail; } @@ -508,7 +508,7 @@ lge_attach(device_t dev) /* Try to allocate memory for jumbo buffers. */ if (lge_alloc_jumbo_mem(sc)) { - printf("lge%d: jumbo buffer allocation failed\n", + kprintf("lge%d: jumbo buffer allocation failed\n", sc->lge_unit); error = ENXIO; goto fail; @@ -539,7 +539,7 @@ lge_attach(device_t dev) */ if (mii_phy_probe(dev, &sc->lge_miibus, lge_ifmedia_upd, lge_ifmedia_sts)) { - printf("lge%d: MII without any PHY!\n", sc->lge_unit); + kprintf("lge%d: MII without any PHY!\n", sc->lge_unit); error = ENXIO; goto fail; } @@ -554,7 +554,7 @@ lge_attach(device_t dev) ifp->if_serializer); if (error) { ether_ifdetach(ifp); - printf("lge%d: couldn't set up irq\n", unit); + kprintf("lge%d: couldn't set up irq\n", unit); goto fail; } @@ -665,7 +665,7 @@ lge_newbuf(struct lge_softc *sc, struct lge_rx_desc *c, struct mbuf *m) if (m == NULL) { MGETHDR(m_new, MB_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("lge%d: no memory for rx list " + kprintf("lge%d: no memory for rx list " "-- packet dropped!\n", sc->lge_unit); return(ENOBUFS); } @@ -674,7 +674,7 @@ lge_newbuf(struct lge_softc *sc, struct lge_rx_desc *c, struct mbuf *m) buf = lge_jalloc(sc); if (buf == NULL) { #ifdef LGE_VERBOSE - printf("lge%d: jumbo allocation failed " + kprintf("lge%d: jumbo allocation failed " "-- packet dropped!\n", sc->lge_unit); #endif m_freem(m_new); @@ -739,7 +739,7 @@ lge_alloc_jumbo_mem(struct lge_softc *sc) M_WAITOK, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->lge_cdata.lge_jumbo_buf == NULL) { - printf("lge%d: no memory for jumbo buffers!\n", sc->lge_unit); + kprintf("lge%d: no memory for jumbo buffers!\n", sc->lge_unit); return(ENOBUFS); } @@ -785,7 +785,7 @@ lge_jalloc(struct lge_softc *sc) entry->lge_inuse = 1; } else { #ifdef LGE_VERBOSE - printf("lge%d: no free jumbo buffers\n", sc->lge_unit); + kprintf("lge%d: no free jumbo buffers\n", sc->lge_unit); #endif } lwkt_serialize_exit(&sc->lge_jslot_serializer); @@ -887,7 +887,7 @@ lge_rxeof(struct lge_softc *sc, int cnt) total_len + ETHER_ALIGN, 0, ifp, NULL); lge_newbuf(sc, &LGE_RXTAIL(sc), m); if (m0 == NULL) { - printf("lge%d: no receive buffers " + kprintf("lge%d: no receive buffers " "available -- packet dropped!\n", sc->lge_unit); ifp->if_ierrors++; @@ -1005,7 +1005,7 @@ lge_tick_serialized(void *xsc) sc->lge_link++; if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX|| IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) - printf("lge%d: gigabit link up\n", + kprintf("lge%d: gigabit link up\n", sc->lge_unit); if (!ifq_is_empty(&ifp->if_snd)) (*ifp->if_start)(ifp); @@ -1184,7 +1184,7 @@ lge_init(void *xsc) /* Init circular RX list. */ if (lge_list_rx_init(sc) == ENOBUFS) { - printf("lge%d: initialization failed: no " + kprintf("lge%d: initialization failed: no " "memory for rx buffers\n", sc->lge_unit); lge_stop(sc); return; @@ -1384,7 +1384,7 @@ lge_watchdog(struct ifnet *ifp) struct lge_softc *sc = ifp->if_softc; ifp->if_oerrors++; - printf("lge%d: watchdog timeout\n", sc->lge_unit); + kprintf("lge%d: watchdog timeout\n", sc->lge_unit); lge_stop(sc); lge_reset(sc); diff --git a/sys/dev/netif/lnc/am7990.c b/sys/dev/netif/lnc/am7990.c index 290a0cb084..ab4d6e9ff8 100644 --- a/sys/dev/netif/lnc/am7990.c +++ b/sys/dev/netif/lnc/am7990.c @@ -1,6 +1,6 @@ /* $NetBSD: am7990.c,v 1.68 2005/12/11 12:21:25 christos Exp $ */ /* $FreeBSD: src/sys/dev/le/am7990.c,v 1.3 2006/05/16 21:04:01 marius Exp $ */ -/* $DragonFly: src/sys/dev/netif/lnc/am7990.c,v 1.2 2006/10/25 20:55:57 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/lnc/am7990.c,v 1.3 2006/12/22 23:26:20 swildner Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -588,7 +588,7 @@ am7990_recv_print(struct lance_softc *sc, int no) if (len - ETHER_CRC_LEN >= sizeof(eh)) { (*sc->sc_copyfrombuf)(sc, &eh, LE_RBUFADDR(sc, no), sizeof(eh)); if_printf(ifp, "dst %s", ether_sprintf(eh.ether_dhost)); - printf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), + kprintf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), ntohs(eh.ether_type)); } } @@ -611,7 +611,7 @@ am7990_xmit_print(struct lance_softc *sc, int no) if (len >= sizeof(eh)) { (*sc->sc_copyfrombuf)(sc, &eh, LE_TBUFADDR(sc, no), sizeof(eh)); if_printf(ifp, "dst %s", ether_sprintf(eh.ether_dhost)); - printf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), + kprintf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), ntohs(eh.ether_type)); } } diff --git a/sys/dev/netif/lnc/am79900.c b/sys/dev/netif/lnc/am79900.c index 01cff9718c..a59d6cc4a7 100644 --- a/sys/dev/netif/lnc/am79900.c +++ b/sys/dev/netif/lnc/am79900.c @@ -1,6 +1,6 @@ /* $NetBSD: am79900.c,v 1.17 2005/12/24 20:27:29 perry Exp $ */ /* $FreeBSD: src/sys/dev/le/am79900.c,v 1.3 2006/05/16 21:04:01 marius Exp $ */ -/* $DragonFly: src/sys/dev/netif/lnc/am79900.c,v 1.2 2006/10/25 20:55:57 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/lnc/am79900.c,v 1.3 2006/12/22 23:26:20 swildner Exp $ */ /*- @@ -626,7 +626,7 @@ am79900_recv_print(struct lance_softc *sc, int no) if (len - ETHER_CRC_LEN >= sizeof(eh)) { (*sc->sc_copyfrombuf)(sc, &eh, LE_RBUFADDR(sc, no), sizeof(eh)); if_printf(ifp, "dst %s", ether_sprintf(eh.ether_dhost)); - printf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), + kprintf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), ntohs(eh.ether_type)); } } @@ -648,7 +648,7 @@ am79900_xmit_print(struct lance_softc *sc, int no) if (len >= sizeof(eh)) { (*sc->sc_copyfrombuf)(sc, &eh, LE_TBUFADDR(sc, no), sizeof(eh)); if_printf(ifp, "dst %s", ether_sprintf(eh.ether_dhost)); - printf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), + kprintf(" src %s type %04x\n", ether_sprintf(eh.ether_shost), ntohs(eh.ether_type)); } } diff --git a/sys/dev/netif/mii_layer/acphy.c b/sys/dev/netif/mii_layer/acphy.c index 464b249db7..a8fd8dc668 100644 --- a/sys/dev/netif/mii_layer/acphy.c +++ b/sys/dev/netif/mii_layer/acphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/acphy.c,v 1.2.2.2 2002/10/21 21:20:19 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/acphy.c,v 1.9 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/acphy.c,v 1.10 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -169,8 +169,8 @@ acphy_attach(device_t dev) if (sc->mii_capabilities & BMSR_MEDIAMASK) mii_phy_add_media(sc); else - printf("no media present"); - printf("\n"); + kprintf("no media present"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return (0); diff --git a/sys/dev/netif/mii_layer/amphy.c b/sys/dev/netif/mii_layer/amphy.c index 5809b11ab7..37be944ded 100644 --- a/sys/dev/netif/mii_layer/amphy.c +++ b/sys/dev/netif/mii_layer/amphy.c @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/amphy.c,v 1.2.2.2 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/amphy.c,v 1.10 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/amphy.c,v 1.11 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -140,10 +140,10 @@ amphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/brgphy.c b/sys/dev/netif/mii_layer/brgphy.c index f4422cf6b8..b778599a82 100644 --- a/sys/dev/netif/mii_layer/brgphy.c +++ b/sys/dev/netif/mii_layer/brgphy.c @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/brgphy.c,v 1.1.2.7 2003/05/11 18:00:55 ps Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/brgphy.c,v 1.14 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/brgphy.c,v 1.15 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -180,8 +180,8 @@ brgphy_attach(device_t dev) (sc->mii_extcapabilities & EXTSR_MEDIAMASK)) mii_phy_add_media(sc); else - printf("no media present"); - printf("\n"); + kprintf("no media present"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/ciphy.c b/sys/dev/netif/mii_layer/ciphy.c index d1c3e4d590..349b640529 100644 --- a/sys/dev/netif/mii_layer/ciphy.c +++ b/sys/dev/netif/mii_layer/ciphy.c @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/ciphy.c,v 1.3 2005/09/30 19:39:27 imp Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/ciphy.c,v 1.3 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/ciphy.c,v 1.4 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -141,10 +141,10 @@ ciphy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 && (sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/dcphy.c b/sys/dev/netif/mii_layer/dcphy.c index acec627e01..7daa764dfe 100644 --- a/sys/dev/netif/mii_layer/dcphy.c +++ b/sys/dev/netif/mii_layer/dcphy.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/dcphy.c,v 1.2.2.2 2000/10/14 00:44:40 wpaul Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/dcphy.c,v 1.10 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/dcphy.c,v 1.11 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -189,10 +189,10 @@ dcphy_attach(device_t dev) sc->mii_capabilities &= ma->mii_capmask; device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/e1000phy.c b/sys/dev/netif/mii_layer/e1000phy.c index 8b380b9d05..43c8ccf50d 100644 --- a/sys/dev/netif/mii_layer/e1000phy.c +++ b/sys/dev/netif/mii_layer/e1000phy.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/mii/e1000phy.c,v 1.1.2.2 2002/11/08 21:53:49 semenu Exp $ */ -/* $DragonFly: src/sys/dev/netif/mii_layer/e1000phy.c,v 1.8 2006/08/06 10:32:23 sephe Exp $ */ +/* $DragonFly: src/sys/dev/netif/mii_layer/e1000phy.c,v 1.9 2006/12/22 23:26:20 swildner Exp $ */ /* $OpenBSD: eephy.c,v 1.26 2006/06/08 00:27:12 brad Exp $ */ /* * Principal Author: Parag Patel @@ -148,7 +148,7 @@ e1000phy_attach(device_t dev) e1000phy_reset(sc); #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) -#define PRINT(s) printf("%s%s", sep, s); sep = ", " +#define PRINT(s) kprintf("%s%s", sep, s); sep = ", " #if 0 ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), @@ -187,7 +187,7 @@ e1000phy_attach(device_t dev) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); PRINT("auto"); - printf("\n"); + kprintf("\n"); #undef ADD #undef PRINT diff --git a/sys/dev/netif/mii_layer/exphy.c b/sys/dev/netif/mii_layer/exphy.c index cf365ee0a5..2a0b472d62 100644 --- a/sys/dev/netif/mii_layer/exphy.c +++ b/sys/dev/netif/mii_layer/exphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/exphy.c,v 1.4.2.2 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/exphy.c,v 1.9 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/exphy.c,v 1.10 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -183,10 +183,10 @@ exphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/inphy.c b/sys/dev/netif/mii_layer/inphy.c index f8fb228256..39adc183e2 100644 --- a/sys/dev/netif/mii_layer/inphy.c +++ b/sys/dev/netif/mii_layer/inphy.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/inphy.c,v 1.14 2004/05/30 17:57:40 phk Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/inphy.c,v 1.7 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/inphy.c,v 1.8 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -131,10 +131,10 @@ inphy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return (0); diff --git a/sys/dev/netif/mii_layer/ip1000phy.c b/sys/dev/netif/mii_layer/ip1000phy.c index e19d9ad1c3..b9080e0e23 100644 --- a/sys/dev/netif/mii_layer/ip1000phy.c +++ b/sys/dev/netif/mii_layer/ip1000phy.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/ip1000phy.c,v 1.1 2006/07/25 00:16:09 yongari Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/ip1000phy.c,v 1.1 2006/11/16 13:43:55 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/ip1000phy.c,v 1.2 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -132,25 +132,25 @@ ip1000phy_attach(device_t dev) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, 0, sc->mii_inst), IP1000PHY_BMCR_10); - printf("10baseT, "); + kprintf("10baseT, "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_FDX, sc->mii_inst), IP1000PHY_BMCR_10 | IP1000PHY_BMCR_FDX); - printf("10baseT-FDX, "); + kprintf("10baseT-FDX, "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, 0, sc->mii_inst), IP1000PHY_BMCR_100); - printf("100baseTX, "); + kprintf("100baseTX, "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_100_TX, IFM_FDX, sc->mii_inst), IP1000PHY_BMCR_100 | IP1000PHY_BMCR_FDX); - printf("100baseTX-FDX, "); + kprintf("100baseTX-FDX, "); /* 1000baseT half-duplex, really supported? */ ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, 0, sc->mii_inst), IP1000PHY_BMCR_1000); - printf("1000baseTX, "); + kprintf("1000baseTX, "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_T, IFM_FDX, sc->mii_inst), IP1000PHY_BMCR_1000 | IP1000PHY_BMCR_FDX); - printf("1000baseTX-FDX, "); + kprintf("1000baseTX-FDX, "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); - printf("auto\n"); + kprintf("auto\n"); #undef ADD ip1000phy_reset(sc); diff --git a/sys/dev/netif/mii_layer/lxtphy.c b/sys/dev/netif/mii_layer/lxtphy.c index e52b141503..e267f4a61e 100644 --- a/sys/dev/netif/mii_layer/lxtphy.c +++ b/sys/dev/netif/mii_layer/lxtphy.c @@ -38,7 +38,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/lxtphy.c,v 1.1.2.1 2001/06/08 19:58:33 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/lxtphy.c,v 1.9 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/lxtphy.c,v 1.10 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -180,8 +180,8 @@ lxtphy_attach(device_t dev) if (sc->mii_capabilities & BMSR_MEDIAMASK) mii_phy_add_media(sc); else - printf("no media present"); - printf("\n"); + kprintf("no media present"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/mii_physubr.c b/sys/dev/netif/mii_layer/mii_physubr.c index cb0c082244..2ae6d634a3 100644 --- a/sys/dev/netif/mii_layer/mii_physubr.c +++ b/sys/dev/netif/mii_layer/mii_physubr.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/mii_physubr.c,v 1.2.2.1 2000/12/12 19:29:14 wpaul Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/mii_physubr.c,v 1.12 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/mii_physubr.c,v 1.13 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -274,7 +274,7 @@ mii_phy_add_media(struct mii_softc *sc) int fdx = 0; #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) -#define PRINT(s) printf("%s%s", sep, s); sep = ", " +#define PRINT(s) kprintf("%s%s", sep, s); sep = ", " if ((sc->mii_flags & MIIF_NOISOLATE) == 0) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), diff --git a/sys/dev/netif/mii_layer/mlphy.c b/sys/dev/netif/mii_layer/mlphy.c index 61bbe5ae72..2b4a4d0f79 100644 --- a/sys/dev/netif/mii_layer/mlphy.c +++ b/sys/dev/netif/mii_layer/mlphy.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/mlphy.c,v 1.2.2.3 2001/02/09 09:50:15 asmodai Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/mlphy.c,v 1.10 2006/09/05 00:55:40 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/mlphy.c,v 1.11 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -171,10 +171,10 @@ mlphy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/nsgphy.c b/sys/dev/netif/mii_layer/nsgphy.c index ab472e3aa3..0d0f9351af 100644 --- a/sys/dev/netif/mii_layer/nsgphy.c +++ b/sys/dev/netif/mii_layer/nsgphy.c @@ -31,7 +31,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/nsgphy.c,v 1.1.2.3 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/nsgphy.c,v 1.13 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/nsgphy.c,v 1.14 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -159,9 +159,9 @@ nsgphy_attach(device_t dev) (sc->mii_extcapabilities & EXTSR_MEDIAMASK)) mii_phy_add_media(sc); else - printf("no media present"); + kprintf("no media present"); - printf("\n"); + kprintf("\n"); #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); diff --git a/sys/dev/netif/mii_layer/nsphy.c b/sys/dev/netif/mii_layer/nsphy.c index 19bea3a893..db05eb7dd3 100644 --- a/sys/dev/netif/mii_layer/nsphy.c +++ b/sys/dev/netif/mii_layer/nsphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/nsphy.c,v 1.2.2.5 2001/06/08 19:58:33 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/nsphy.c,v 1.9 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/nsphy.c,v 1.10 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -183,10 +183,10 @@ nsphy_attach(device_t dev) sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & ma->mii_capmask; device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); diff --git a/sys/dev/netif/mii_layer/pnaphy.c b/sys/dev/netif/mii_layer/pnaphy.c index 26d8b5ed6b..c6300249c6 100644 --- a/sys/dev/netif/mii_layer/pnaphy.c +++ b/sys/dev/netif/mii_layer/pnaphy.c @@ -31,7 +31,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/pnaphy.c,v 1.1.2.3 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/pnaphy.c,v 1.10 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/pnaphy.c,v 1.11 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -134,10 +134,10 @@ pnaphy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), diff --git a/sys/dev/netif/mii_layer/pnphy.c b/sys/dev/netif/mii_layer/pnphy.c index 4770e1f469..6e01738b7d 100644 --- a/sys/dev/netif/mii_layer/pnphy.c +++ b/sys/dev/netif/mii_layer/pnphy.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/pnphy.c,v 1.1.2.1 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/pnphy.c,v 1.11 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/pnphy.c,v 1.12 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -143,10 +143,10 @@ pnphy_attach(device_t dev) sc->mii_capabilities &= ma->mii_capmask; device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), MII_MEDIA_NONE); diff --git a/sys/dev/netif/mii_layer/qsphy.c b/sys/dev/netif/mii_layer/qsphy.c index c81077440a..31776fb670 100644 --- a/sys/dev/netif/mii_layer/qsphy.c +++ b/sys/dev/netif/mii_layer/qsphy.c @@ -38,7 +38,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/qsphy.c,v 1.1.2.2 2002/10/21 21:21:42 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/qsphy.c,v 1.9 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/qsphy.c,v 1.10 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -168,8 +168,8 @@ qsphy_attach(device_t dev) if (sc->mii_capabilities & BMSR_MEDIAMASK) mii_phy_add_media(sc); else - printf("no media present"); - printf("\n"); + kprintf("no media present"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return (0); diff --git a/sys/dev/netif/mii_layer/rgephy.c b/sys/dev/netif/mii_layer/rgephy.c index 3da89b3cd1..e618196877 100644 --- a/sys/dev/netif/mii_layer/rgephy.c +++ b/sys/dev/netif/mii_layer/rgephy.c @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/rgephy.c,v 1.7 2005/09/30 19:39:27 imp Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/rgephy.c,v 1.4 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/rgephy.c,v 1.5 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -144,10 +144,10 @@ rgephy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 && (sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/rlphy.c b/sys/dev/netif/mii_layer/rlphy.c index f3c45d6fbc..23f63c4dda 100644 --- a/sys/dev/netif/mii_layer/rlphy.c +++ b/sys/dev/netif/mii_layer/rlphy.c @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/rlphy.c,v 1.2.2.4 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/rlphy.c,v 1.11 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/rlphy.c,v 1.12 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -180,10 +180,10 @@ rlphy_attach(device_t dev) PHY_READ(sc, MII_BMSR) & ma->mii_capmask; device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); #undef ADD MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/ruephy.c b/sys/dev/netif/mii_layer/ruephy.c index fa993870c1..4f26fed7f9 100644 --- a/sys/dev/netif/mii_layer/ruephy.c +++ b/sys/dev/netif/mii_layer/ruephy.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/ruephy.c,v 1.1.4.1 2003/07/30 13:57:35 akiyama Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/ruephy.c,v 1.5 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/ruephy.c,v 1.6 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -139,10 +139,10 @@ ruephy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return (0); diff --git a/sys/dev/netif/mii_layer/tlphy.c b/sys/dev/netif/mii_layer/tlphy.c index 656c803b54..079780123a 100644 --- a/sys/dev/netif/mii_layer/tlphy.c +++ b/sys/dev/netif/mii_layer/tlphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/tlphy.c,v 1.2.2.2 2001/07/29 22:48:37 kris Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/tlphy.c,v 1.11 2006/10/25 20:55:57 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/tlphy.c,v 1.12 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -204,7 +204,7 @@ tlphy_attach(device_t dev) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_T, IFM_LOOP, sc->sc_mii.mii_inst), MII_MEDIA_10_T); -#define PRINT(s) printf("%s%s", sep, s); sep = ", " +#define PRINT(s) kprintf("%s%s", sep, s); sep = ", " device_printf(dev, " "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_10_2, 0, sc->sc_mii.mii_inst), 0); @@ -213,14 +213,14 @@ tlphy_attach(device_t dev) PRINT("10base5/AUI"); if (sc->sc_mii.mii_capabilities & BMSR_MEDIAMASK) { - printf("%s", sep); + kprintf("%s", sep); mii_phy_add_media(&sc->sc_mii); } else { ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->sc_mii.mii_inst), MII_MEDIA_NONE); } - printf("\n"); + kprintf("\n"); #undef ADD #undef PRINT MIIBUS_MEDIAINIT(sc->sc_mii.mii_dev); diff --git a/sys/dev/netif/mii_layer/ukphy.c b/sys/dev/netif/mii_layer/ukphy.c index 389ed664c6..3655133de5 100644 --- a/sys/dev/netif/mii_layer/ukphy.c +++ b/sys/dev/netif/mii_layer/ukphy.c @@ -37,7 +37,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/ukphy.c,v 1.2.2.2 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/ukphy.c,v 1.10 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/ukphy.c,v 1.11 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -165,10 +165,10 @@ ukphy_attach(device_t dev) device_printf(dev, " "); if ((sc->mii_capabilities & BMSR_MEDIAMASK) == 0 && (sc->mii_extcapabilities & EXTSR_MEDIAMASK) == 0) - printf("no media present"); + kprintf("no media present"); else mii_phy_add_media(sc); - printf("\n"); + kprintf("\n"); MIIBUS_MEDIAINIT(sc->mii_dev); return(0); diff --git a/sys/dev/netif/mii_layer/xmphy.c b/sys/dev/netif/mii_layer/xmphy.c index 3667e1b2b5..7bf45129e1 100644 --- a/sys/dev/netif/mii_layer/xmphy.c +++ b/sys/dev/netif/mii_layer/xmphy.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mii/xmphy.c,v 1.1.2.5 2002/11/08 21:53:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/mii_layer/xmphy.c,v 1.9 2006/08/06 10:32:23 sephe Exp $ + * $DragonFly: src/sys/dev/netif/mii_layer/xmphy.c,v 1.10 2006/12/22 23:26:20 swildner Exp $ */ /* @@ -129,7 +129,7 @@ xmphy_attach(device_t dev) mii->mii_instance++; #define ADD(m, c) ifmedia_add(&mii->mii_media, (m), (c), NULL) -#define PRINT(s) printf("%s%s", sep, s); sep = ", " +#define PRINT(s) kprintf("%s%s", sep, s); sep = ", " ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, sc->mii_inst), BMCR_ISO); @@ -149,7 +149,7 @@ xmphy_attach(device_t dev) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, sc->mii_inst), 0); PRINT("auto"); - printf("\n"); + kprintf("\n"); #undef ADD #undef PRINT diff --git a/sys/dev/netif/mn/if_mn.c b/sys/dev/netif/mn/if_mn.c index aa1be18301..fdb002aaa7 100644 --- a/sys/dev/netif/mn/if_mn.c +++ b/sys/dev/netif/mn/if_mn.c @@ -22,7 +22,7 @@ * this gadget. * * $FreeBSD: src/sys/pci/if_mn.c,v 1.11.2.3 2001/01/23 12:47:09 phk Exp $ - * $DragonFly: src/sys/dev/netif/mn/if_mn.c,v 1.15 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/mn/if_mn.c,v 1.16 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -317,7 +317,7 @@ ngmn_config(node_p node, char *set, char *ret) mn_reset(sc); #endif } else { - printf("%s CONFIG SET [%s]\n", sc->nodename, set); + kprintf("%s CONFIG SET [%s]\n", sc->nodename, set); strcat(ret, "ENOGROK\n"); return; } @@ -456,7 +456,7 @@ ngmn_newhook(node_p node, hook_p hook, const char *name) return (EINVAL); ts = mn_parse_ts(name + 2, &nbit); - printf("%d bits %x\n", nbit, ts); + kprintf("%d bits %x\n", nbit, ts); if (sc->framing == E1 && (ts & 1)) return (EINVAL); if (sc->framing == E1U && nbit != 32) @@ -630,11 +630,11 @@ ngmn_rcvdata(hook_p hook, struct mbuf *m, meta_p meta) } } if (pitch) - printf("%s%d: Short on mem, pitched %d packets\n", + kprintf("%s%d: Short on mem, pitched %d packets\n", sc->name, chan, pitch); else { #if 0 - printf("%d = %d + %d (%p)\n", + kprintf("%d = %d + %d (%p)\n", sch->tx_pending + m->m_pkthdr.len, sch->tx_pending , m->m_pkthdr.len, m); #endif @@ -752,7 +752,7 @@ ngmn_connect(hook_p hook) DELAY(1000); u = sc->m32x->stat; if (!(u & 1)) - printf("%s: init chan %d stat %08x\n", sc->name, chan, u); + kprintf("%s: init chan %d stat %08x\n", sc->name, chan, u); sc->m32x->stat = 1; return (0); @@ -793,7 +793,7 @@ ngmn_disconnect(hook_p hook) DELAY(30); u = sc->m32x->stat; if (!(u & 1)) - printf("%s: zap chan %d stat %08x\n", sc->name, chan, u); + kprintf("%s: zap chan %d stat %08x\n", sc->name, chan, u); sc->m32x->stat = 1; /* Free all receive descriptors and mbufs */ @@ -844,20 +844,20 @@ m32_dump(struct softc *sc) u_int32_t *tp4; int i, j; - printf("mn%d: MUNICH32X dump\n", sc->unit); + kprintf("mn%d: MUNICH32X dump\n", sc->unit); tp4 = (u_int32_t *)sc->m0v; for(j = 0; j < 64; j += 8) { - printf("%02x", j * sizeof *tp4); + kprintf("%02x", j * sizeof *tp4); for(i = 0; i < 8; i++) - printf(" %08x", tp4[i+j]); - printf("\n"); + kprintf(" %08x", tp4[i+j]); + kprintf("\n"); } for(j = 0; j < M32_CHAN; j++) { if (!sc->ch[j]) continue; - printf("CH%d: state %d ts %08x", + kprintf("CH%d: state %d ts %08x", j, sc->ch[j]->state, sc->ch[j]->ts); - printf(" %08x %08x %08x %08x %08x %08x\n", + kprintf(" %08x %08x %08x %08x %08x %08x\n", sc->m32_mem.cs[j].flags, sc->m32_mem.cs[j].rdesc, sc->m32_mem.cs[j].tdesc, @@ -876,13 +876,13 @@ f54_dump(struct softc *sc) u_int8_t *tp1; int i, j; - printf("%s: FALC54 dump\n", sc->name); + kprintf("%s: FALC54 dump\n", sc->name); tp1 = (u_int8_t *)sc->m1v; for(j = 0; j < 128; j += 16) { - printf("%s: %02x |", sc->name, j * sizeof *tp1); + kprintf("%s: %02x |", sc->name, j * sizeof *tp1); for(i = 0; i < 16; i++) - printf(" %02x", tp1[i+j]); - printf("\n"); + kprintf(" %02x", tp1[i+j]); + kprintf("\n"); } } #endif /* notyet */ @@ -994,7 +994,7 @@ mn_reset(struct softc *sc) sc->m32_mem.ts[i] = 0x20002000; if (!(u & 1)) { - printf( + kprintf( "mn%d: WARNING: Controller failed the PCI bus-master test.\n" "mn%d: WARNING: Use a PCI slot which can support bus-master cards.\n", sc->unit, sc->unit); @@ -1020,7 +1020,7 @@ f54_intr(struct softc *sc) /* don't chat about the 1 sec heart beat */ if (u & ~0x40) { #if 0 - printf("%s*: FALC54 IRQ GIS:%02x %b\n", sc->name, g, u, "\20" + kprintf("%s*: FALC54 IRQ GIS:%02x %b\n", sc->name, g, u, "\20" "\40RME\37RFS\36T8MS\35RMB\34CASC\33CRC4\32SA6SC\31RPF" "\30b27\27RDO\26ALLS\25XDU\24XMB\23b22\22XLSC\21XPR" "\20FAR\17LFA\16MFAR\15T400MS\14AIS\13LOS\12RAR\11RA" @@ -1037,7 +1037,7 @@ f54_intr(struct softc *sc) s &= ~0x00780000; /* XXX: TS16 related */ s &= ~0x06000000; /* XXX: Multiframe related */ #if 0 - printf("%s*: FALC54 Status %b\n", sc->name, s, "\20" + kprintf("%s*: FALC54 Status %b\n", sc->name, s, "\20" "\40LOS\37AIS\36LFA\35RRA\34AUXP\33NMF\32LMFA\31frs0.0" "\30frs1.7\27TS16RA\26TS16LOS\25TS16AIS\24TS16LFA\23frs1.2\22XLS\21XLO" "\20RS1\17rsw.6\16RRA\15RY0\14RY1\13RY2\12RY3\11RY4" @@ -1087,7 +1087,7 @@ mn_tx_intr(struct softc *sc, u_int32_t vector) if (!sc->ch[chan]) return; if (sc->ch[chan]->state != UP) { - printf("%s: tx_intr when not UP\n", sc->name); + kprintf("%s: tx_intr when not UP\n", sc->name); return; } for (;;) { @@ -1097,7 +1097,7 @@ mn_tx_intr(struct softc *sc, u_int32_t vector) m = dp->m; if (m) { #if 0 - printf("%d = %d - %d (%p)\n", + kprintf("%d = %d - %d (%p)\n", sc->ch[chan]->tx_pending - m->m_pkthdr.len, sc->ch[chan]->tx_pending , m->m_pkthdr.len, m); #endif @@ -1126,7 +1126,7 @@ mn_rx_intr(struct softc *sc, u_int32_t vector) return; sch = sc->ch[chan]; if (sch->state != UP) { - printf("%s: rx_intr when not UP\n", sc->name); + kprintf("%s: rx_intr when not UP\n", sc->name); return; } vector &= ~0x1f; @@ -1216,7 +1216,7 @@ mn_intr(void *xsc) #endif if (stat & ~0xc200) { - printf("%s: I stat=%08x lstat=%08x\n", sc->name, stat, lstat); + kprintf("%s: I stat=%08x lstat=%08x\n", sc->name, stat, lstat); } if ((stat & 0x200) || (lstat & 2)) @@ -1235,13 +1235,13 @@ mn_intr(void *xsc) if (!(u & ~0x1f)) continue; if (!j) - printf("%s*: RIQB:", sc->name); - printf(" [%d]=%08x", i, u); + kprintf("%s*: RIQB:", sc->name); + kprintf(" [%d]=%08x", i, u); j++; } } if (j) - printf("\n"); + kprintf("\n"); for (j = i = 0; i < 64; i ++) { u = sc->tiqb[i]; @@ -1254,13 +1254,13 @@ mn_intr(void *xsc) if (!u) continue; if (!j) - printf("%s*: TIQB:", sc->name); - printf(" [%d]=%08x", i, u); + kprintf("%s*: TIQB:", sc->name); + kprintf(" [%d]=%08x", i, u); j++; } } if (j) - printf("\n"); + kprintf("\n"); sc->m32x->stat = stat; } @@ -1274,15 +1274,15 @@ mn_probe (device_t self) u_int id = pci_get_devid(self); if (sizeof (struct m32xreg) != 256) { - printf("MN: sizeof(struct m32xreg) = %d, should have been 256\n", sizeof (struct m32xreg)); + kprintf("MN: sizeof(struct m32xreg) = %d, should have been 256\n", sizeof (struct m32xreg)); return (ENXIO); } if (sizeof (struct f54rreg) != 128) { - printf("MN: sizeof(struct f54rreg) = %d, should have been 128\n", sizeof (struct f54rreg)); + kprintf("MN: sizeof(struct f54rreg) = %d, should have been 128\n", sizeof (struct f54rreg)); return (ENXIO); } if (sizeof (struct f54wreg) != 128) { - printf("MN: sizeof(struct f54wreg) = %d, should have been 128\n", sizeof (struct f54wreg)); + kprintf("MN: sizeof(struct f54wreg) = %d, should have been 128\n", sizeof (struct f54wreg)); return (ENXIO); } @@ -1305,7 +1305,7 @@ mn_attach (device_t self) if (!once) { if (ng_newtype(&mntypestruct)) - printf("ng_newtype failed\n"); + kprintf("ng_newtype failed\n"); once++; } @@ -1341,7 +1341,7 @@ mn_attach (device_t self) RF_SHAREABLE | RF_ACTIVE); if (sc->irq == NULL) { - printf("couldn't map interrupt\n"); + kprintf("couldn't map interrupt\n"); return(ENXIO); } @@ -1349,18 +1349,18 @@ mn_attach (device_t self) &sc->intrhand, NULL); if (error) { - printf("couldn't set up irq\n"); + kprintf("couldn't set up irq\n"); return(ENXIO); } u = pci_read_config(self, PCIR_COMMAND, 1); - printf("%x\n", u); + kprintf("%x\n", u); pci_write_config(self, PCIR_COMMAND, u | PCIM_CMD_PERRESPEN | PCIM_CMD_BUSMASTEREN | PCIM_CMD_MEMEN, 1); #if 0 pci_write_config(self, PCIR_COMMAND, 0x02800046, 4); #endif u = pci_read_config(self, PCIR_COMMAND, 1); - printf("%x\n", u); + kprintf("%x\n", u); ver = pci_get_revid(self); @@ -1373,37 +1373,37 @@ mn_attach (device_t self) if (!u) return (0); - printf("mn%d: Munich32X", sc->unit); + kprintf("mn%d: Munich32X", sc->unit); switch (ver) { case 0x13: - printf(" Rev 2.2"); + kprintf(" Rev 2.2"); break; default: - printf(" Rev 0x%x\n", ver); + kprintf(" Rev 0x%x\n", ver); } - printf(", Falc54"); + kprintf(", Falc54"); switch (sc->f54r->vstr) { case 0: - printf(" Rev < 1.3\n"); + kprintf(" Rev < 1.3\n"); break; case 1: - printf(" Rev 1.3\n"); + kprintf(" Rev 1.3\n"); break; case 2: - printf(" Rev 1.4\n"); + kprintf(" Rev 1.4\n"); break; case 0x10: - printf("-LH Rev 1.1\n"); + kprintf("-LH Rev 1.1\n"); break; case 0x13: - printf("-LH Rev 1.3\n"); + kprintf("-LH Rev 1.3\n"); break; default: - printf(" Rev 0x%x\n", sc->f54r->vstr); + kprintf(" Rev 0x%x\n", sc->f54r->vstr); } if (ng_make_node_common(&mntypestruct, &sc->node) != 0) { - printf("ng_make_node_common failed\n"); + kprintf("ng_make_node_common failed\n"); return (0); } sc->node->private = sc; diff --git a/sys/dev/netif/my/if_my.c b/sys/dev/netif/my/if_my.c index 88ce5f994b..f50fcfcd72 100644 --- a/sys/dev/netif/my/if_my.c +++ b/sys/dev/netif/my/if_my.c @@ -26,7 +26,7 @@ * Written by: yen_cw@myson.com.tw available at: http://www.myson.com.tw/ * * $FreeBSD: src/sys/dev/my/if_my.c,v 1.2.2.4 2002/04/17 02:05:27 julian Exp $ - * $DragonFly: src/sys/dev/netif/my/if_my.c,v 1.26 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/my/if_my.c,v 1.27 2006/12/22 23:26:21 swildner Exp $ * * Myson fast ethernet PCI NIC driver * @@ -411,7 +411,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose) phy_sts = my_phy_readreg(sc, PHY_BMSR); if (!(phy_sts & PHY_BMSR_CANAUTONEG)) { if (verbose) - printf("my%d: autonegotiation not supported\n", + kprintf("my%d: autonegotiation not supported\n", sc->my_unit); ifm->ifm_media = IFM_ETHER | IFM_10_T | IFM_HDX; return; @@ -449,17 +449,17 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose) sc->my_autoneg = 0; break; default: - printf("my%d: invalid autoneg flag: %d\n", sc->my_unit, flag); + kprintf("my%d: invalid autoneg flag: %d\n", sc->my_unit, flag); return; } if (my_phy_readreg(sc, PHY_BMSR) & PHY_BMSR_AUTONEGCOMP) { if (verbose) - printf("my%d: autoneg complete, ", sc->my_unit); + kprintf("my%d: autoneg complete, ", sc->my_unit); phy_sts = my_phy_readreg(sc, PHY_BMSR); } else { if (verbose) - printf("my%d: autoneg not complete, ", sc->my_unit); + kprintf("my%d: autoneg not complete, ", sc->my_unit); } media = my_phy_readreg(sc, PHY_BMCR); @@ -467,7 +467,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose) /* Link is good. Report modes and set duplex mode. */ if (my_phy_readreg(sc, PHY_BMSR) & PHY_BMSR_LINKSTAT) { if (verbose) - printf("my%d: link status good. ", sc->my_unit); + kprintf("my%d: link status good. ", sc->my_unit); advert = my_phy_readreg(sc, PHY_ANAR); ability = my_phy_readreg(sc, PHY_LPAR); if ((sc->my_pinfo->my_vid == MarvellPHYID0) || @@ -486,7 +486,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose) media &= ~PHY_BMCR_SPEEDSEL; media |= PHY_BMCR_1000; media |= PHY_BMCR_DUPLEX; - printf("(full-duplex, 1000Mbps)\n"); + kprintf("(full-duplex, 1000Mbps)\n"); } else if (ability2 & PHY_1000SR_1000BTXHALF) { advert = 0; ability = 0; @@ -498,37 +498,37 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose) media &= ~PHY_BMCR_SPEEDSEL; media &= ~PHY_BMCR_DUPLEX; media |= PHY_BMCR_1000; - printf("(half-duplex, 1000Mbps)\n"); + kprintf("(half-duplex, 1000Mbps)\n"); } } if (advert & PHY_ANAR_100BT4 && ability & PHY_ANAR_100BT4) { ifm->ifm_media = IFM_ETHER | IFM_100_T4; media |= PHY_BMCR_SPEEDSEL; media &= ~PHY_BMCR_DUPLEX; - printf("(100baseT4)\n"); + kprintf("(100baseT4)\n"); } else if (advert & PHY_ANAR_100BTXFULL && ability & PHY_ANAR_100BTXFULL) { ifm->ifm_media = IFM_ETHER | IFM_100_TX | IFM_FDX; media |= PHY_BMCR_SPEEDSEL; media |= PHY_BMCR_DUPLEX; - printf("(full-duplex, 100Mbps)\n"); + kprintf("(full-duplex, 100Mbps)\n"); } else if (advert & PHY_ANAR_100BTXHALF && ability & PHY_ANAR_100BTXHALF) { ifm->ifm_media = IFM_ETHER | IFM_100_TX | IFM_HDX; media |= PHY_BMCR_SPEEDSEL; media &= ~PHY_BMCR_DUPLEX; - printf("(half-duplex, 100Mbps)\n"); + kprintf("(half-duplex, 100Mbps)\n"); } else if (advert & PHY_ANAR_10BTFULL && ability & PHY_ANAR_10BTFULL) { ifm->ifm_media = IFM_ETHER | IFM_10_T | IFM_FDX; media &= ~PHY_BMCR_SPEEDSEL; media |= PHY_BMCR_DUPLEX; - printf("(full-duplex, 10Mbps)\n"); + kprintf("(full-duplex, 10Mbps)\n"); } else if (advert) { ifm->ifm_media = IFM_ETHER | IFM_10_T | IFM_HDX; media &= ~PHY_BMCR_SPEEDSEL; media &= ~PHY_BMCR_DUPLEX; - printf("(half-duplex, 10Mbps)\n"); + kprintf("(half-duplex, 10Mbps)\n"); } media &= ~PHY_BMCR_AUTONEGENBL; @@ -537,7 +537,7 @@ my_autoneg_mii(struct my_softc * sc, int flag, int verbose) my_setcfg(sc, media); } else { if (verbose) - printf("my%d: no carrier\n", sc->my_unit); + kprintf("my%d: no carrier\n", sc->my_unit); } my_init(sc); @@ -559,14 +559,14 @@ my_getmode_mii(struct my_softc * sc) bmsr = my_phy_readreg(sc, PHY_BMSR); if (bootverbose) - printf("my%d: PHY status word: %x\n", sc->my_unit, bmsr); + kprintf("my%d: PHY status word: %x\n", sc->my_unit, bmsr); /* fallback */ sc->ifmedia.ifm_media = IFM_ETHER | IFM_10_T | IFM_HDX; if (bmsr & PHY_BMSR_10BTHALF) { if (bootverbose) - printf("my%d: 10Mbps half-duplex mode supported\n", + kprintf("my%d: 10Mbps half-duplex mode supported\n", sc->my_unit); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_10_T | IFM_HDX, 0, NULL); @@ -574,7 +574,7 @@ my_getmode_mii(struct my_softc * sc) } if (bmsr & PHY_BMSR_10BTFULL) { if (bootverbose) - printf("my%d: 10Mbps full-duplex mode supported\n", + kprintf("my%d: 10Mbps full-duplex mode supported\n", sc->my_unit); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_10_T | IFM_FDX, @@ -583,7 +583,7 @@ my_getmode_mii(struct my_softc * sc) } if (bmsr & PHY_BMSR_100BTXHALF) { if (bootverbose) - printf("my%d: 100Mbps half-duplex mode supported\n", + kprintf("my%d: 100Mbps half-duplex mode supported\n", sc->my_unit); ifp->if_baudrate = 100000000; ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_100_TX, 0, NULL); @@ -593,7 +593,7 @@ my_getmode_mii(struct my_softc * sc) } if (bmsr & PHY_BMSR_100BTXFULL) { if (bootverbose) - printf("my%d: 100Mbps full-duplex mode supported\n", + kprintf("my%d: 100Mbps full-duplex mode supported\n", sc->my_unit); ifp->if_baudrate = 100000000; ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_100_TX | IFM_FDX, @@ -603,13 +603,13 @@ my_getmode_mii(struct my_softc * sc) /* Some also support 100BaseT4. */ if (bmsr & PHY_BMSR_100BT4) { if (bootverbose) - printf("my%d: 100baseT4 mode supported\n", sc->my_unit); + kprintf("my%d: 100baseT4 mode supported\n", sc->my_unit); ifp->if_baudrate = 100000000; ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_100_T4, 0, NULL); sc->ifmedia.ifm_media = IFM_ETHER | IFM_100_T4; #ifdef FORCE_AUTONEG_TFOUR if (bootverbose) - printf("my%d: forcing on autoneg support for BT4\n", + kprintf("my%d: forcing on autoneg support for BT4\n", sc->my_unit); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_AUTO, 0 NULL): sc->ifmedia.ifm_media = IFM_ETHER | IFM_AUTO; @@ -618,7 +618,7 @@ my_getmode_mii(struct my_softc * sc) #if 0 /* this version did not support 1000M, */ if (sc->my_pinfo->my_vid == MarvellPHYID0) { if (bootverbose) - printf("my%d: 1000Mbps half-duplex mode supported\n", + kprintf("my%d: 1000Mbps half-duplex mode supported\n", sc->my_unit); ifp->if_baudrate = 1000000000; @@ -626,7 +626,7 @@ my_getmode_mii(struct my_softc * sc) ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T | IFM_HDX, 0, NULL); if (bootverbose) - printf("my%d: 1000Mbps full-duplex mode supported\n", + kprintf("my%d: 1000Mbps full-duplex mode supported\n", sc->my_unit); ifp->if_baudrate = 1000000000; ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_1000_T | IFM_FDX, @@ -636,7 +636,7 @@ my_getmode_mii(struct my_softc * sc) #endif if (bmsr & PHY_BMSR_CANAUTONEG) { if (bootverbose) - printf("my%d: autoneg supported\n", sc->my_unit); + kprintf("my%d: autoneg supported\n", sc->my_unit); ifmedia_add(&sc->ifmedia, IFM_ETHER | IFM_AUTO, 0, NULL); sc->ifmedia.ifm_media = IFM_ETHER | IFM_AUTO; } @@ -655,43 +655,43 @@ my_setmode_mii(struct my_softc * sc, int media) * If an autoneg session is in progress, stop it. */ if (sc->my_autoneg) { - printf("my%d: canceling autoneg session\n", sc->my_unit); + kprintf("my%d: canceling autoneg session\n", sc->my_unit); ifp->if_timer = sc->my_autoneg = sc->my_want_auto = 0; bmcr = my_phy_readreg(sc, PHY_BMCR); bmcr &= ~PHY_BMCR_AUTONEGENBL; my_phy_writereg(sc, PHY_BMCR, bmcr); } - printf("my%d: selecting MII, ", sc->my_unit); + kprintf("my%d: selecting MII, ", sc->my_unit); bmcr = my_phy_readreg(sc, PHY_BMCR); bmcr &= ~(PHY_BMCR_AUTONEGENBL | PHY_BMCR_SPEEDSEL | PHY_BMCR_1000 | PHY_BMCR_DUPLEX | PHY_BMCR_LOOPBK); #if 0 /* this version did not support 1000M, */ if (IFM_SUBTYPE(media) == IFM_1000_T) { - printf("1000Mbps/T4, half-duplex\n"); + kprintf("1000Mbps/T4, half-duplex\n"); bmcr &= ~PHY_BMCR_SPEEDSEL; bmcr &= ~PHY_BMCR_DUPLEX; bmcr |= PHY_BMCR_1000; } #endif if (IFM_SUBTYPE(media) == IFM_100_T4) { - printf("100Mbps/T4, half-duplex\n"); + kprintf("100Mbps/T4, half-duplex\n"); bmcr |= PHY_BMCR_SPEEDSEL; bmcr &= ~PHY_BMCR_DUPLEX; } if (IFM_SUBTYPE(media) == IFM_100_TX) { - printf("100Mbps, "); + kprintf("100Mbps, "); bmcr |= PHY_BMCR_SPEEDSEL; } if (IFM_SUBTYPE(media) == IFM_10_T) { - printf("10Mbps, "); + kprintf("10Mbps, "); bmcr &= ~PHY_BMCR_SPEEDSEL; } if ((media & IFM_GMASK) == IFM_FDX) { - printf("full duplex\n"); + kprintf("full duplex\n"); bmcr |= PHY_BMCR_DUPLEX; } else { - printf("half duplex\n"); + kprintf("half duplex\n"); bmcr &= ~PHY_BMCR_DUPLEX; } my_phy_writereg(sc, PHY_BMCR, bmcr); @@ -718,7 +718,7 @@ my_setcfg(struct my_softc * sc, int bmcr) break; } if (i == MY_TIMEOUT) - printf("my%d: failed to force tx and rx to idle \n", + kprintf("my%d: failed to force tx and rx to idle \n", sc->my_unit); } MY_CLRBIT(sc, MY_TCRRCR, MY_PS1000); @@ -747,7 +747,7 @@ my_reset(struct my_softc * sc) break; } if (i == MY_TIMEOUT) - printf("m0x%d: reset never completed!\n", sc->my_unit); + kprintf("m0x%d: reset never completed!\n", sc->my_unit); /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); @@ -826,13 +826,13 @@ my_attach(device_t dev) } if (MY_USEIOSPACE) { if (!(command & PCIM_CMD_PORTEN)) { - printf("my%d: failed to enable I/O ports!\n", unit); + kprintf("my%d: failed to enable I/O ports!\n", unit); error = ENXIO; return(error); } } else { if (!(command & PCIM_CMD_MEMEN)) { - printf("my%d: failed to enable memory mapping!\n", + kprintf("my%d: failed to enable memory mapping!\n", unit); error = ENXIO; return(error); @@ -843,7 +843,7 @@ my_attach(device_t dev) sc->my_res = bus_alloc_resource_any(dev, MY_RES, &rid, RF_ACTIVE); if (sc->my_res == NULL) { - printf("my%d: couldn't map ports/memory\n", unit); + kprintf("my%d: couldn't map ports/memory\n", unit); error = ENXIO; goto fail; } @@ -855,7 +855,7 @@ my_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); if (sc->my_irq == NULL) { - printf("my%d: couldn't map interrupt\n", unit); + kprintf("my%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } @@ -876,7 +876,7 @@ my_attach(device_t dev) sc->my_ldata_ptr = kmalloc(sizeof(struct my_list_data) + 8, M_DEVBUF, M_WAITOK); if (sc->my_ldata_ptr == NULL) { - printf("my%d: no memory for list buffers!\n", unit); + kprintf("my%d: no memory for list buffers!\n", unit); error = ENXIO; goto fail; } @@ -910,10 +910,10 @@ my_attach(device_t dev) sc->my_pinfo = my_phys; else { if (bootverbose) - printf("my%d: probing for a PHY\n", sc->my_unit); + kprintf("my%d: probing for a PHY\n", sc->my_unit); for (i = MY_PHYADDR_MIN; i < MY_PHYADDR_MAX + 1; i++) { if (bootverbose) - printf("my%d: checking address: %d\n", + kprintf("my%d: checking address: %d\n", sc->my_unit, i); sc->my_phy_addr = i; phy_sts = my_phy_readreg(sc, PHY_BMSR); @@ -926,9 +926,9 @@ my_attach(device_t dev) phy_vid = my_phy_readreg(sc, PHY_VENID); phy_did = my_phy_readreg(sc, PHY_DEVID); if (bootverbose) { - printf("my%d: found PHY at address %d, ", + kprintf("my%d: found PHY at address %d, ", sc->my_unit, sc->my_phy_addr); - printf("vendor id: %x device id: %x\n", + kprintf("vendor id: %x device id: %x\n", phy_vid, phy_did); } p = my_phys; @@ -942,10 +942,10 @@ my_attach(device_t dev) if (sc->my_pinfo == NULL) sc->my_pinfo = &my_phys[PHY_UNKNOWN]; if (bootverbose) - printf("my%d: PHY type: %s\n", + kprintf("my%d: PHY type: %s\n", sc->my_unit, sc->my_pinfo->my_name); } else { - printf("my%d: MII without any phy!\n", sc->my_unit); + kprintf("my%d: MII without any phy!\n", sc->my_unit); error = ENXIO; goto fail; } @@ -966,7 +966,7 @@ my_attach(device_t dev) ifp->if_serializer); if (error) { ether_ifdetach(ifp); - printf("my%d: couldn't set up irq\n", unit); + kprintf("my%d: couldn't set up irq\n", unit); goto fail; } @@ -1069,13 +1069,13 @@ my_newbuf(struct my_softc * sc, struct my_chain_onefrag * c) MGETHDR(m_new, MB_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("my%d: no memory for rx list -- packet dropped!\n", + kprintf("my%d: no memory for rx list -- packet dropped!\n", sc->my_unit); return (ENOBUFS); } MCLGET(m_new, MB_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - printf("my%d: no memory for rx list -- packet dropped!\n", + kprintf("my%d: no memory for rx list -- packet dropped!\n", sc->my_unit); m_freem(m_new); return (ENOBUFS); @@ -1297,14 +1297,14 @@ my_encap(struct my_softc * sc, struct my_chain * c, struct mbuf * m_head) m = m_head; MGETHDR(m_new, MB_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("my%d: no memory for tx list", sc->my_unit); + kprintf("my%d: no memory for tx list", sc->my_unit); return (1); } if (m_head->m_pkthdr.len > MHLEN) { MCLGET(m_new, MB_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - printf("my%d: no memory for tx list", sc->my_unit); + kprintf("my%d: no memory for tx list", sc->my_unit); return (1); } } @@ -1442,7 +1442,7 @@ my_init(void *xsc) my_setcfg(sc, phy_bmcr); /* Init circular RX list. */ if (my_list_rx_init(sc) == ENOBUFS) { - printf("my%d: init failed: no memory for rx buffers\n", + kprintf("my%d: init failed: no memory for rx buffers\n", sc->my_unit); my_stop(sc); crit_exit(); @@ -1630,9 +1630,9 @@ my_watchdog(struct ifnet * ifp) return; } ifp->if_oerrors++; - printf("my%d: watchdog timeout\n", sc->my_unit); + kprintf("my%d: watchdog timeout\n", sc->my_unit); if (!(my_phy_readreg(sc, PHY_BMSR) & PHY_BMSR_LINKSTAT)) - printf("my%d: no carrier - transceiver cable problem?\n", + kprintf("my%d: no carrier - transceiver cable problem?\n", sc->my_unit); my_stop(sc); my_reset(sc); diff --git a/sys/dev/netif/nge/if_nge.c b/sys/dev/netif/nge/if_nge.c index 66642bef62..093c5b65cd 100644 --- a/sys/dev/netif/nge/if_nge.c +++ b/sys/dev/netif/nge/if_nge.c @@ -31,7 +31,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/nge/if_nge.c,v 1.13.2.13 2003/02/05 22:03:57 mbr Exp $ - * $DragonFly: src/sys/dev/netif/nge/if_nge.c,v 1.40 2006/11/30 01:38:54 sephe Exp $ + * $DragonFly: src/sys/dev/netif/nge/if_nge.c,v 1.41 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -674,7 +674,7 @@ nge_reset(struct nge_softc *sc) } if (i == NGE_TIMEOUT) - printf("nge%d: reset never completed\n", sc->nge_unit); + kprintf("nge%d: reset never completed\n", sc->nge_unit); /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); @@ -744,7 +744,7 @@ nge_attach(device_t dev) irq = pci_read_config(dev, NGE_PCI_INTLINE, 4); /* Reset the power state. */ - printf("nge%d: chip is in D%d power mode " + kprintf("nge%d: chip is in D%d power mode " "-- setting to D0\n", unit, command & NGE_PSTATE_MASK); command &= 0xFFFFFFFC; pci_write_config(dev, NGE_PCI_PWRMGMTCTRL, command, 4); @@ -766,13 +766,13 @@ nge_attach(device_t dev) #ifdef NGE_USEIOSPACE if (!(command & PCIM_CMD_PORTEN)) { - printf("nge%d: failed to enable I/O ports!\n", unit); + kprintf("nge%d: failed to enable I/O ports!\n", unit); error = ENXIO; return(error); } #else if (!(command & PCIM_CMD_MEMEN)) { - printf("nge%d: failed to enable memory mapping!\n", unit); + kprintf("nge%d: failed to enable memory mapping!\n", unit); error = ENXIO; return(error); } @@ -782,7 +782,7 @@ nge_attach(device_t dev) sc->nge_res = bus_alloc_resource_any(dev, NGE_RES, &rid, RF_ACTIVE); if (sc->nge_res == NULL) { - printf("nge%d: couldn't map ports/memory\n", unit); + kprintf("nge%d: couldn't map ports/memory\n", unit); error = ENXIO; return(error); } @@ -796,7 +796,7 @@ nge_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); if (sc->nge_irq == NULL) { - printf("nge%d: couldn't map interrupt\n", unit); + kprintf("nge%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } @@ -817,7 +817,7 @@ nge_attach(device_t dev) M_WAITOK, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->nge_ldata == NULL) { - printf("nge%d: no memory for list buffers!\n", unit); + kprintf("nge%d: no memory for list buffers!\n", unit); error = ENXIO; goto fail; } @@ -825,7 +825,7 @@ nge_attach(device_t dev) /* Try to allocate memory for jumbo buffers. */ if (nge_alloc_jumbo_mem(sc)) { - printf("nge%d: jumbo buffer allocation failed\n", + kprintf("nge%d: jumbo buffer allocation failed\n", sc->nge_unit); error = ENXIO; goto fail; @@ -864,7 +864,7 @@ nge_attach(device_t dev) ifmedia_init(&sc->nge_ifmedia, 0, nge_ifmedia_upd, nge_ifmedia_sts); #define ADD(m, c) ifmedia_add(&sc->nge_ifmedia, (m), (c), NULL) -#define PRINT(s) printf("%s%s", sep, s); sep = ", " +#define PRINT(s) kprintf("%s%s", sep, s); sep = ", " ADD(IFM_MAKEWORD(IFM_ETHER, IFM_NONE, 0, 0), 0); device_printf(dev, " "); ADD(IFM_MAKEWORD(IFM_ETHER, IFM_1000_SX, 0, 0), 0); @@ -874,7 +874,7 @@ nge_attach(device_t dev) ADD(IFM_MAKEWORD(IFM_ETHER, IFM_AUTO, 0, 0), 0); PRINT("auto"); - printf("\n"); + kprintf("\n"); #undef ADD #undef PRINT ifmedia_set(&sc->nge_ifmedia, @@ -887,7 +887,7 @@ nge_attach(device_t dev) | NGE_GPIO_GP3_IN | NGE_GPIO_GP4_IN); } else { - printf("nge%d: MII without any PHY!\n", sc->nge_unit); + kprintf("nge%d: MII without any PHY!\n", sc->nge_unit); error = ENXIO; goto fail; } @@ -1031,7 +1031,7 @@ nge_newbuf(struct nge_softc *sc, struct nge_desc *c, struct mbuf *m) if (m == NULL) { MGETHDR(m_new, MB_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("nge%d: no memory for rx list " + kprintf("nge%d: no memory for rx list " "-- packet dropped!\n", sc->nge_unit); return(ENOBUFS); } @@ -1040,7 +1040,7 @@ nge_newbuf(struct nge_softc *sc, struct nge_desc *c, struct mbuf *m) buf = nge_jalloc(sc); if (buf == NULL) { #ifdef NGE_VERBOSE - printf("nge%d: jumbo allocation failed " + kprintf("nge%d: jumbo allocation failed " "-- packet dropped!\n", sc->nge_unit); #endif m_freem(m_new); @@ -1084,7 +1084,7 @@ nge_alloc_jumbo_mem(struct nge_softc *sc) M_WAITOK, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->nge_cdata.nge_jumbo_buf == NULL) { - printf("nge%d: no memory for jumbo buffers!\n", sc->nge_unit); + kprintf("nge%d: no memory for jumbo buffers!\n", sc->nge_unit); return(ENOBUFS); } @@ -1124,7 +1124,7 @@ nge_jalloc(struct nge_softc *sc) entry->nge_inuse = 1; } else { #ifdef NGE_VERBOSE - printf("nge%d: no free jumbo buffers\n", sc->nge_unit); + kprintf("nge%d: no free jumbo buffers\n", sc->nge_unit); #endif } lwkt_serialize_exit(&sc->nge_jslot_serializer); @@ -1247,7 +1247,7 @@ nge_rxeof(struct nge_softc *sc) total_len + ETHER_ALIGN, 0, ifp, NULL); nge_newbuf(sc, cur_rx, m); if (m0 == NULL) { - printf("nge%d: no receive buffers " + kprintf("nge%d: no receive buffers " "available -- packet dropped!\n", sc->nge_unit); ifp->if_ierrors++; @@ -1363,7 +1363,7 @@ nge_tick(void *xsc) if (sc->nge_link == 0) { if (CSR_READ_4(sc, NGE_TBI_BMSR) & NGE_TBIBMSR_ANEG_DONE) { - printf("nge%d: gigabit link up\n", + kprintf("nge%d: gigabit link up\n", sc->nge_unit); nge_miibus_statchg(sc->nge_miibus); sc->nge_link++; @@ -1381,7 +1381,7 @@ nge_tick(void *xsc) sc->nge_link++; if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) - printf("nge%d: gigabit link up\n", + kprintf("nge%d: gigabit link up\n", sc->nge_unit); if (!ifq_is_empty(&ifp->if_snd)) nge_start(ifp); @@ -1677,7 +1677,7 @@ nge_init(void *xsc) /* Init circular RX list. */ if (nge_list_rx_init(sc) == ENOBUFS) { - printf("nge%d: initialization failed: no " + kprintf("nge%d: initialization failed: no " "memory for rx buffers\n", sc->nge_unit); nge_stop(sc); return; @@ -2004,7 +2004,7 @@ nge_watchdog(struct ifnet *ifp) struct nge_softc *sc = ifp->if_softc; ifp->if_oerrors++; - printf("nge%d: watchdog timeout\n", sc->nge_unit); + kprintf("nge%d: watchdog timeout\n", sc->nge_unit); nge_stop(sc); nge_reset(sc); diff --git a/sys/dev/netif/nv/if_nv.c b/sys/dev/netif/nv/if_nv.c index 002cdbc112..3400d964af 100644 --- a/sys/dev/netif/nv/if_nv.c +++ b/sys/dev/netif/nv/if_nv.c @@ -26,7 +26,7 @@ * * $Id: if_nv.c,v 1.20 2005/03/12 01:11:00 q Exp $ * $FreeBSD: src/sys/dev/nve/if_nve.c,v 1.20 2005/12/12 06:23:43 bz Exp $ - * $DragonFly: src/sys/dev/netif/nv/Attic/if_nv.c,v 1.28 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/nv/Attic/if_nv.c,v 1.29 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -1672,7 +1672,7 @@ nv_ossettimer(PNV_VOID ctx, PNV_VOID timer, NV_UINT32 delay) struct nv_softc *sc = ctx; DEBUGOUT(NV_DEBUG_BROKEN, "nv: nv_ossettimer\n"); - printf("nv_ossettimer %d\n", (int)delay); + kprintf("nv_ossettimer %d\n", (int)delay); callout_reset(&sc->ostimer, delay, nv_ostimer_callback, sc); diff --git a/sys/dev/netif/nv/if_nvreg.h b/sys/dev/netif/nv/if_nvreg.h index 8533a7b3ce..331d70a89f 100644 --- a/sys/dev/netif/nv/if_nvreg.h +++ b/sys/dev/netif/nv/if_nvreg.h @@ -25,7 +25,7 @@ * * $Id: if_nvreg.h,v 1.6 2004/08/12 14:00:05 q Exp $ * $FreeBSD: src/sys/dev/nve/if_nvereg.h,v 1.7 2005/12/07 17:38:03 obrien Exp $ - * $DragonFly: src/sys/dev/netif/nv/Attic/if_nvreg.h,v 1.12 2006/01/29 22:10:11 corecode Exp $ + * $DragonFly: src/sys/dev/netif/nv/Attic/if_nvreg.h,v 1.13 2006/12/22 23:26:21 swildner Exp $ */ #ifndef _IF_NVREG_H_ @@ -83,7 +83,7 @@ #if NV_DEBUG #define DEBUGOUT(level, fmt, args...) if (NV_DEBUG & level) \ - printf(fmt, ## args) + kprintf(fmt, ## args) #else #define DEBUGOUT(level, fmt, args...) #endif diff --git a/sys/dev/netif/pcn/if_pcn.c b/sys/dev/netif/pcn/if_pcn.c index 148edb48b1..958d38ac1c 100644 --- a/sys/dev/netif/pcn/if_pcn.c +++ b/sys/dev/netif/pcn/if_pcn.c @@ -31,7 +31,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_pcn.c,v 1.5.2.10 2003/03/05 18:42:33 njl Exp $ - * $DragonFly: src/sys/dev/netif/pcn/if_pcn.c,v 1.31 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/pcn/if_pcn.c,v 1.32 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -507,7 +507,7 @@ pcn_attach(device_t dev) irq = pci_read_config(dev, PCN_PCI_INTLINE, 4); /* Reset the power state. */ - printf("pcn%d: chip is in D%d power mode " + kprintf("pcn%d: chip is in D%d power mode " "-- setting to D0\n", unit, command & PCN_PSTATE_MASK); command &= 0xFFFFFFFC; pci_write_config(dev, PCN_PCI_PWRMGMTCTRL, command, 4); @@ -529,13 +529,13 @@ pcn_attach(device_t dev) #ifdef PCN_USEIOSPACE if (!(command & PCIM_CMD_PORTEN)) { - printf("pcn%d: failed to enable I/O ports!\n", unit); + kprintf("pcn%d: failed to enable I/O ports!\n", unit); error = ENXIO; return(error); } #else if (!(command & PCIM_CMD_MEMEN)) { - printf("pcn%d: failed to enable memory mapping!\n", unit); + kprintf("pcn%d: failed to enable memory mapping!\n", unit); error = ENXIO; return(error); } @@ -545,7 +545,7 @@ pcn_attach(device_t dev) sc->pcn_res = bus_alloc_resource_any(dev, PCN_RES, &rid, RF_ACTIVE); if (sc->pcn_res == NULL) { - printf("pcn%d: couldn't map ports/memory\n", unit); + kprintf("pcn%d: couldn't map ports/memory\n", unit); error = ENXIO; return(error); } @@ -559,7 +559,7 @@ pcn_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); if (sc->pcn_irq == NULL) { - printf("pcn%d: couldn't map interrupt\n", unit); + kprintf("pcn%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } @@ -580,7 +580,7 @@ pcn_attach(device_t dev) M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->pcn_ldata == NULL) { - printf("pcn%d: no memory for list buffers!\n", unit); + kprintf("pcn%d: no memory for list buffers!\n", unit); error = ENXIO; goto fail; } @@ -604,7 +604,7 @@ pcn_attach(device_t dev) */ if (mii_phy_probe(dev, &sc->pcn_miibus, pcn_ifmedia_upd, pcn_ifmedia_sts)) { - printf("pcn%d: MII without any PHY!\n", sc->pcn_unit); + kprintf("pcn%d: MII without any PHY!\n", sc->pcn_unit); error = ENXIO; goto fail; } @@ -1089,7 +1089,7 @@ pcn_init(void *xsc) /* Init circular RX list. */ if (pcn_list_rx_init(sc) == ENOBUFS) { - printf("pcn%d: initialization failed: no " + kprintf("pcn%d: initialization failed: no " "memory for rx buffers\n", sc->pcn_unit); pcn_stop(sc); @@ -1274,7 +1274,7 @@ pcn_watchdog(struct ifnet *ifp) sc = ifp->if_softc; ifp->if_oerrors++; - printf("pcn%d: watchdog timeout\n", sc->pcn_unit); + kprintf("pcn%d: watchdog timeout\n", sc->pcn_unit); pcn_stop(sc); pcn_reset(sc); diff --git a/sys/dev/netif/pdq_layer/pdq.c b/sys/dev/netif/pdq_layer/pdq.c index d4baceba95..a3a3112026 100644 --- a/sys/dev/netif/pdq_layer/pdq.c +++ b/sys/dev/netif/pdq_layer/pdq.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pdq/pdq.c,v 1.5 1999/08/28 00:42:19 peter Exp $ - * $DragonFly: src/sys/dev/netif/pdq_layer/Attic/pdq.c,v 1.6 2005/11/22 00:24:33 dillon Exp $ + * $DragonFly: src/sys/dev/netif/pdq_layer/Attic/pdq.c,v 1.7 2006/12/22 23:26:21 swildner Exp $ * */ @@ -56,7 +56,7 @@ #define PDQ_CMD_RX_ALIGNMENT 16 #if (defined(PDQTEST) && !defined(PDQ_NOPRINTF)) || defined(PDQVERBOSE) -#define PDQ_PRINTF(x) printf x +#define PDQ_PRINTF(x) kprintf x #else #define PDQ_PRINTF(x) do { } while (0) #endif @@ -176,7 +176,7 @@ pdq_print_fddi_chars( { const char hexchars[] = "0123456789abcdef"; - printf( + kprintf( #if !defined(__bsdi__) && !defined(__NetBSD__) PDQ_OS_PREFIX #else @@ -189,7 +189,7 @@ pdq_print_fddi_chars( pdq_descriptions[pdq->pdq_type], pdq_station_types[rsp->status_chars_get.station_type]); - printf(PDQ_OS_PREFIX "FDDI address %c%c:%c%c:%c%c:%c%c:%c%c:%c%c, FW=%c%c%c%c, HW=%c", + kprintf(PDQ_OS_PREFIX "FDDI address %c%c:%c%c:%c%c:%c%c:%c%c:%c%c, FW=%c%c%c%c, HW=%c", PDQ_OS_PREFIX_ARGS, hexchars[pdq->pdq_hwaddr.lanaddr_bytes[0] >> 4], hexchars[pdq->pdq_hwaddr.lanaddr_bytes[0] & 0x0F], @@ -208,21 +208,21 @@ pdq_print_fddi_chars( rsp->status_chars_get.module_rev.fwrev_bytes[0]); if (rsp->status_chars_get.smt_version_id < PDQ_ARRAY_SIZE(pdq_smt_versions)) { - printf(", SMT %s\n", pdq_smt_versions[rsp->status_chars_get.smt_version_id]); + kprintf(", SMT %s\n", pdq_smt_versions[rsp->status_chars_get.smt_version_id]); } - printf(PDQ_OS_PREFIX "FDDI Port%s = %c (PMD = %s)", + kprintf(PDQ_OS_PREFIX "FDDI Port%s = %c (PMD = %s)", PDQ_OS_PREFIX_ARGS, rsp->status_chars_get.station_type == PDQ_STATION_TYPE_DAS ? "[A]" : "", pdq_phy_types[rsp->status_chars_get.phy_type[0]], pdq_pmd_types[rsp->status_chars_get.pmd_type[0] / 100][rsp->status_chars_get.pmd_type[0] % 100]); if (rsp->status_chars_get.station_type == PDQ_STATION_TYPE_DAS) - printf(", FDDI Port[B] = %c (PMD = %s)", + kprintf(", FDDI Port[B] = %c (PMD = %s)", pdq_phy_types[rsp->status_chars_get.phy_type[1]], pdq_pmd_types[rsp->status_chars_get.pmd_type[1] / 100][rsp->status_chars_get.pmd_type[1] % 100]); - printf("\n"); + kprintf("\n"); } static void @@ -635,13 +635,13 @@ pdq_process_unsolicited_events( switch (event->event_type) { case PDQ_UNSOLICITED_EVENT: { - printf(PDQ_OS_PREFIX "Unsolicited Event: %s: %s", + kprintf(PDQ_OS_PREFIX "Unsolicited Event: %s: %s", PDQ_OS_PREFIX_ARGS, pdq_entities[event->event_entity], pdq_event_codes[event->event_entity][event->event_code.value]); if (event->event_entity == PDQ_ENTITY_PHY_PORT) - printf("[%d]", event->event_index); - printf("\n"); + kprintf("[%d]", event->event_index); + kprintf("\n"); break; } case PDQ_UNSOLICITED_COUNTERS: { @@ -761,7 +761,7 @@ pdq_process_received_data( /* hardware fault */ } if (status.rxs_rcc_badcrc) { - printf(PDQ_OS_PREFIX " MAC CRC error (source=%x-%x-%x-%x-%x-%x)\n", + kprintf(PDQ_OS_PREFIX " MAC CRC error (source=%x-%x-%x-%x-%x-%x)\n", PDQ_OS_PREFIX_ARGS, dataptr[PDQ_RX_FC_OFFSET+1], dataptr[PDQ_RX_FC_OFFSET+2], @@ -1298,7 +1298,7 @@ pdq_interrupt( data = PDQ_CSR_READ(csrs, csr_host_int_type_0); if (data & PDQ_HOST_INT_STATE_CHANGE) { pdq_state_t state = PDQ_PSTS_ADAPTER_STATE(PDQ_CSR_READ(csrs, csr_port_status)); - printf(PDQ_OS_PREFIX "%s", PDQ_OS_PREFIX_ARGS, pdq_adapter_states[state]); + kprintf(PDQ_OS_PREFIX "%s", PDQ_OS_PREFIX_ARGS, pdq_adapter_states[state]); if (state == PDQS_LINK_UNAVAILABLE) { pdq->pdq_flags &= ~PDQ_TXOK; } else if (state == PDQS_LINK_AVAILABLE) { @@ -1307,7 +1307,7 @@ pdq_interrupt( } else if (state == PDQS_HALTED) { pdq_response_error_log_get_t log_entry; pdq_halt_code_t halt_code = PDQ_PSTS_HALT_ID(PDQ_CSR_READ(csrs, csr_port_status)); - printf(": halt code = %d (%s)\n", + kprintf(": halt code = %d (%s)\n", halt_code, pdq_halt_codes[halt_code]); if (halt_code == PDQH_DMA_ERROR && pdq->pdq_type == PDQ_DEFPA) { PDQ_PRINTF(("\tPFI status = 0x%x, Host 0 Fatal Interrupt = 0x%x\n", @@ -1320,7 +1320,7 @@ pdq_interrupt( pdq_run(pdq); return 1; } - printf("\n"); + kprintf("\n"); PDQ_CSR_WRITE(csrs, csr_host_int_type_0, PDQ_HOST_INT_STATE_CHANGE); } if (data & PDQ_HOST_INT_FATAL_ERROR) { @@ -1330,7 +1330,7 @@ pdq_interrupt( return 1; } if (data & PDQ_HOST_INT_XMT_DATA_FLUSH) { - printf(PDQ_OS_PREFIX "Flushing transmit queue\n", PDQ_OS_PREFIX_ARGS); + kprintf(PDQ_OS_PREFIX "Flushing transmit queue\n", PDQ_OS_PREFIX_ARGS); pdq->pdq_flags &= ~PDQ_TXOK; pdq_flush_transmitter(pdq); pdq_do_port_control(csrs, PDQ_PCTL_XMT_DATA_FLUSH_DONE); @@ -1564,7 +1564,7 @@ pdq_initialize( #if defined(PDQVERBOSE) if (state == PDQS_HALTED) { pdq_halt_code_t halt_code = PDQ_PSTS_HALT_ID(PDQ_CSR_READ(&pdq->pdq_csrs, csr_port_status)); - printf("Halt code = %d (%s)\n", halt_code, pdq_halt_codes[halt_code]); + kprintf("Halt code = %d (%s)\n", halt_code, pdq_halt_codes[halt_code]); if (halt_code == PDQH_DMA_ERROR && pdq->pdq_type == PDQ_DEFPA) PDQ_PRINTF(("PFI status = 0x%x, Host 0 Fatal Interrupt = 0x%x\n", PDQ_CSR_READ(&pdq->pdq_pci_csrs, csr_pfi_status), diff --git a/sys/dev/netif/plip/if_plip.c b/sys/dev/netif/plip/if_plip.c index 9628ce2b56..f17b4806fa 100644 --- a/sys/dev/netif/plip/if_plip.c +++ b/sys/dev/netif/plip/if_plip.c @@ -25,7 +25,7 @@ * * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp * $FreeBSD: src/sys/dev/ppbus/if_plip.c,v 1.19.2.1 2000/05/24 00:20:57 n_hibma Exp $ - * $DragonFly: src/sys/dev/netif/plip/if_plip.c,v 1.18 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/plip/if_plip.c,v 1.19 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -137,7 +137,7 @@ #define LPIPTBLSIZE 256 /* Size of octet translation table */ -#define lprintf if (lptflag) printf +#define lprintf if (lptflag) kprintf #ifdef PLIP_DEBUG static int volatile lptflag = 1; @@ -560,7 +560,7 @@ lp_intr (void *arg) * so stop wasting our time */ if (sc->sc_iferrs > LPMAXERRS) { - printf("lp%d: Too many errors, Going off-line.\n", device_get_unit(dev)); + kprintf("lp%d: Too many errors, Going off-line.\n", device_get_unit(dev)); ppb_wctr(ppbus, 0x00); sc->sc_if.if_flags &= ~IFF_RUNNING; sc->sc_iferrs=0; diff --git a/sys/dev/netif/ral/rt2560.c b/sys/dev/netif/ral/rt2560.c index 7b1c9028db..ab365d0f36 100644 --- a/sys/dev/netif/ral/rt2560.c +++ b/sys/dev/netif/ral/rt2560.c @@ -15,7 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $FreeBSD: src/sys/dev/ral/rt2560.c,v 1.3 2006/03/21 21:15:43 damien Exp $ - * $DragonFly: src/sys/dev/netif/ral/rt2560.c,v 1.6 2006/11/18 09:26:43 sephe Exp $ + * $DragonFly: src/sys/dev/netif/ral/rt2560.c,v 1.7 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -52,8 +52,8 @@ #include #ifdef RAL_DEBUG -#define DPRINTF(x) do { if (ral_debug > 0) printf x; } while (0) -#define DPRINTFN(n, x) do { if (ral_debug >= (n)) printf x; } while (0) +#define DPRINTF(x) do { if (ral_debug > 0) kprintf x; } while (0) +#define DPRINTFN(n, x) do { if (ral_debug >= (n)) kprintf x; } while (0) extern int ral_debug; #else #define DPRINTF(x) diff --git a/sys/dev/netif/ral/rt2661.c b/sys/dev/netif/ral/rt2661.c index bd0a0a0298..602f87bf3b 100644 --- a/sys/dev/netif/ral/rt2661.c +++ b/sys/dev/netif/ral/rt2661.c @@ -15,7 +15,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $FreeBSD: src/sys/dev/ral/rt2661.c,v 1.4 2006/03/21 21:15:43 damien Exp $ - * $DragonFly: src/sys/dev/netif/ral/rt2661.c,v 1.8 2006/11/20 15:03:26 sephe Exp $ + * $DragonFly: src/sys/dev/netif/ral/rt2661.c,v 1.9 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -54,8 +54,8 @@ #include #ifdef RAL_DEBUG -#define DPRINTF(x) do { if (ral_debug > 0) printf x; } while (0) -#define DPRINTFN(n, x) do { if (ral_debug >= (n)) printf x; } while (0) +#define DPRINTF(x) do { if (ral_debug > 0) kprintf x; } while (0) +#define DPRINTFN(n, x) do { if (ral_debug >= (n)) kprintf x; } while (0) int ral_debug = 1; SYSCTL_INT(_debug, OID_AUTO, ral, CTLFLAG_RW, &ral_debug, 0, "ral debug level"); #else @@ -2630,7 +2630,7 @@ rt2661_init(void *priv) DELAY(1000); } if (ntries == 1000) { - printf("timeout waiting for BBP/RF to wakeup\n"); + kprintf("timeout waiting for BBP/RF to wakeup\n"); rt2661_stop(sc); return; } @@ -2766,7 +2766,7 @@ rt2661_load_microcode(struct rt2661_softc *sc, const uint8_t *ucode, int size) DELAY(100); } if (ntries == 500) { - printf("timeout waiting for MCU to initialize\n"); + kprintf("timeout waiting for MCU to initialize\n"); return EIO; } return 0; diff --git a/sys/dev/netif/ray/if_ray.c b/sys/dev/netif/ray/if_ray.c index c4a458c67a..263ef4c2c1 100644 --- a/sys/dev/netif/ray/if_ray.c +++ b/sys/dev/netif/ray/if_ray.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ray/if_ray.c,v 1.47.2.4 2001/08/14 22:54:05 dmlb Exp $ - * $DragonFly: src/sys/dev/netif/ray/Attic/if_ray.c,v 1.30 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/ray/Attic/if_ray.c,v 1.31 2006/12/22 23:26:21 swildner Exp $ * */ @@ -535,27 +535,27 @@ ray_attach(device_t dev) if (bootverbose || (RAY_DEBUG & RAY_DBG_BOOTPARAM)) { RAY_PRINTF(sc, "start up results"); if (sc->sc_version == RAY_ECFS_BUILD_4) - printf(". Firmware version 4\n"); + kprintf(". Firmware version 4\n"); else - printf(". Firmware version 5\n"); - printf(". Status 0x%b\n", ep->e_status, RAY_ECFS_PRINTFB); + kprintf(". Firmware version 5\n"); + kprintf(". Status 0x%b\n", ep->e_status, RAY_ECFS_PRINTFB); if (sc->sc_version == RAY_ECFS_BUILD_4) { - printf(". Program checksum %0x\n", ep->e_resv0); - printf(". CIS checksum %0x\n", ep->e_rates[0]); + kprintf(". Program checksum %0x\n", ep->e_resv0); + kprintf(". CIS checksum %0x\n", ep->e_rates[0]); } else { - printf(". (reserved word) %0x\n", ep->e_resv0); - printf(". Supported rates %8D\n", ep->e_rates, ":"); + kprintf(". (reserved word) %0x\n", ep->e_resv0); + kprintf(". Supported rates %8D\n", ep->e_rates, ":"); } - printf(". Japan call sign %12D\n", ep->e_japan_callsign, ":"); + kprintf(". Japan call sign %12D\n", ep->e_japan_callsign, ":"); if (sc->sc_version == RAY_ECFS_BUILD_5) { - printf(". Program checksum %0x\n", ep->e_prg_cksum); - printf(". CIS checksum %0x\n", ep->e_cis_cksum); - printf(". Firmware version %0x\n", + kprintf(". Program checksum %0x\n", ep->e_prg_cksum); + kprintf(". CIS checksum %0x\n", ep->e_cis_cksum); + kprintf(". Firmware version %0x\n", ep->e_fw_build_string); - printf(". Firmware revision %0x\n", ep->e_fw_build); - printf(". (reserved word) %0x\n", ep->e_fw_resv); - printf(". ASIC version %0x\n", ep->e_asic_version); - printf(". TIB size %0x\n", ep->e_tibsize); + kprintf(". Firmware revision %0x\n", ep->e_fw_build); + kprintf(". (reserved word) %0x\n", ep->e_fw_resv); + kprintf(". ASIC version %0x\n", ep->e_asic_version); + kprintf(". TIB size %0x\n", ep->e_tibsize); } } @@ -3783,14 +3783,14 @@ ray_dump_mbuf(struct ray_softc *sc, struct mbuf *m, char *s) for (; d < ed; i++, d++) { if ((i % 16) == 0) { - printf(" %s\n\t", p); + kprintf(" %s\n\t", p); } else if ((i % 8) == 0) - printf(" "); - printf(" %02x", *d); + kprintf(" "); + kprintf(" %02x", *d); p[i % 16] = ((*d >= 0x20) && (*d < 0x80)) ? *d : '.'; } } if ((i - 1) % 16) - printf(" %s\n", p); + kprintf(" %s\n", p); } #endif /* RAY_DEBUG & RAY_DBG_MBUF */ diff --git a/sys/dev/netif/ray/if_raydbg.h b/sys/dev/netif/ray/if_raydbg.h index fb3e95be37..8e61e17a3b 100644 --- a/sys/dev/netif/ray/if_raydbg.h +++ b/sys/dev/netif/ray/if_raydbg.h @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ray/if_raydbg.h,v 1.10.2.2 2001/08/14 22:54:07 dmlb Exp $ - * $DragonFly: src/sys/dev/netif/ray/Attic/if_raydbg.h,v 1.3 2005/02/17 13:59:36 joerg Exp $ + * $DragonFly: src/sys/dev/netif/ray/Attic/if_raydbg.h,v 1.4 2006/12/22 23:26:21 swildner Exp $ * */ @@ -105,20 +105,20 @@ device_printf((sc)->dev, "%s(%d) %s\n", \ __func__ , __LINE__ , (s)); \ for (i = (off); i < (off)+(len); i += 8) { \ - printf(". 0x%04x ", i); \ + kprintf(". 0x%04x ", i); \ for (j = 0; j < 8; j++) \ - printf("%02x ", SRAM_READ_1((sc), i+j)); \ - printf("\n"); \ + kprintf("%02x ", SRAM_READ_1((sc), i+j)); \ + kprintf("\n"); \ } \ } } while (0) #define RAY_DCOM(sc, mask, com, s) do { if (RAY_DEBUG & (mask)) { \ device_printf((sc)->dev, "%s(%d) %s com entry 0x%p\n", \ __func__ , __LINE__ , (s) , (com)); \ - printf(". c_mesg %s\n", (com)->c_mesg); \ - printf(". c_flags 0x%b\n", (com)->c_flags, RAY_COM_FLAGS_PRINTFB); \ - printf(". c_retval 0x%x\n", (com)->c_retval); \ - printf(". c_ccs 0x%0x index 0x%02x\n", \ + kprintf(". c_mesg %s\n", (com)->c_mesg); \ + kprintf(". c_flags 0x%b\n", (com)->c_flags, RAY_COM_FLAGS_PRINTFB); \ + kprintf(". c_retval 0x%x\n", (com)->c_retval); \ + kprintf(". c_ccs 0x%0x index 0x%02x\n", \ (com)->c_ccs, RAY_CCS_INDEX((com)->c_ccs)); \ } } while (0) diff --git a/sys/dev/netif/rdp/if_rdp.c b/sys/dev/netif/rdp/if_rdp.c index 53d0dc2743..39dfca2772 100644 --- a/sys/dev/netif/rdp/if_rdp.c +++ b/sys/dev/netif/rdp/if_rdp.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/if_rdp.c,v 1.6.2.2 2000/07/17 21:24:32 archie Exp $ - * $DragonFly: src/sys/dev/netif/rdp/if_rdp.c,v 1.24 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/netif/rdp/if_rdp.c,v 1.25 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -494,7 +494,7 @@ rdp_probe(struct isa_device *isa_dev) * broadcasts). */ if (bootverbose) - printf("rdp%d: CMR1 = %#x, CMR2 = %#x\n", unit, b1, b2); + kprintf("rdp%d: CMR1 = %#x, CMR2 = %#x\n", unit, b1, b2); if ((b1 & (CMR1_BUFE | CMR1_IRQ | CMR1_TRA)) != CMR1_BUFE || (b2 & ~CMR2_IRQINV) != CMR2_AM_PB) @@ -545,18 +545,18 @@ rdp_probe(struct isa_device *isa_dev) cpu_enable_intr(); if (bootverbose) - printf("rdp%d: irq maps / lpt status " + kprintf("rdp%d: irq maps / lpt status " "%#x/%#x - %#x/%#x - %#x/%#x (id_irq %#x)\n", unit, irqmap[0], sval[0], irqmap[1], sval[1], irqmap[2], sval[2], isa_dev->id_irq); if ((irqmap[1] & isa_dev->id_irq) == 0) { - printf("rdp%d: configured IRQ (%d) cannot be asserted " + kprintf("rdp%d: configured IRQ (%d) cannot be asserted " "by device", unit, ffs(isa_dev->id_irq) - 1); if (irqmap[1]) - printf(" (probable IRQ: %d)", ffs(irqmap[1]) - 1); - printf("\n"); + kprintf(" (probable IRQ: %d)", ffs(irqmap[1]) - 1); + kprintf("\n"); return 0; } @@ -567,7 +567,7 @@ rdp_probe(struct isa_device *isa_dev) switch (sc->eeprom) { case EEPROM_93C46: if (rdp_gethwaddr_93c46(sc, sc->arpcom.ac_enaddr) == 0) { - printf("rdp%d: failed to find a valid hardware " + kprintf("rdp%d: failed to find a valid hardware " "address in EEPROM\n", unit); return 0; @@ -620,7 +620,7 @@ rdp_attach(struct isa_device *isa_dev) /* * Print additional info when attached */ - printf("%s: RealTek RTL%s pocket ethernet, EEPROM %s, %s mode\n", + kprintf("%s: RealTek RTL%s pocket ethernet, EEPROM %s, %s mode\n", ifp->if_xname, "8002", /* hook for 8012 */ sc->eeprom == EEPROM_93C46? "93C46": "74S288", @@ -892,7 +892,7 @@ rdpintr(void *arg) if (isr == 0) break; #if DEBUG & 4 - printf("rdp%d: ISR = %#x\n", unit, isr); + kprintf("rdp%d: ISR = %#x\n", unit, isr); #endif /* @@ -910,7 +910,7 @@ rdpintr(void *arg) RdEnd(sc, TSR); #if DEBUG & 4 if (isr & ISR_TER) - printf("rdp%d: tsr %#x\n", unit, tsr); + kprintf("rdp%d: tsr %#x\n", unit, tsr); #endif if (tsr & TSR_TABT) ifp->if_oerrors++; @@ -962,11 +962,11 @@ rdpintr(void *arg) RdEnd(sc, RSR + HNib); #if DEBUG & 4 if (isr & (ISR_RER | ISR_RBER)) - printf("rdp%d: rsr %#x\n", unit, rsr); + kprintf("rdp%d: rsr %#x\n", unit, rsr); #endif if (rsr & (RSR_PUN | RSR_POV)) { - printf("rdp%d: rsr %#x, resetting\n", + kprintf("rdp%d: rsr %#x, resetting\n", unit, rsr); rdp_reset(ifp); break; @@ -1047,7 +1047,7 @@ rdp_rint(struct rdp_softc *sc) len < (ETHER_MIN_LEN - ETHER_CRC_LEN) || len > MCLBYTES) { #if DEBUG - printf("%s: bad packet in buffer, " + kprintf("%s: bad packet in buffer, " "len %d, status %#x\n", ifp->if_xname, (int)len, (int)status); #endif @@ -1061,7 +1061,7 @@ rdp_rint(struct rdp_softc *sc) * over and over again */ #if DEBUG - printf("%s: resetting due to an " + kprintf("%s: resetting due to an " "excessive number of bad packets\n", ifp->if_xname); #endif @@ -1341,14 +1341,14 @@ rdp_93c46_cmd(struct rdp_softc *sc, u_short data, unsigned nbits) u_char b; #if DEBUG & 2 - printf("rdp_93c46_cmd(): "); + kprintf("rdp_93c46_cmd(): "); #endif for (i = 0; i < nbits; i++, mask >>= 1) { b = HNib + PCMR_SK + PCMR_CS; if (data & mask) b += PCMR_DO; #if DEBUG & 2 - printf("%d", b & 1); + kprintf("%d", b & 1); #endif WrNib(sc, PCMR + HNib, b); DELAY(1); @@ -1356,7 +1356,7 @@ rdp_93c46_cmd(struct rdp_softc *sc, u_short data, unsigned nbits) DELAY(1); } #if DEBUG & 2 - printf("\n"); + kprintf("\n"); #endif } @@ -1373,7 +1373,7 @@ rdp_93c46_read(struct rdp_softc *sc) int i; #if DEBUG & 2 - printf("rdp_93c46_read(): "); + kprintf("rdp_93c46_read(): "); #endif for (i = 0; i < 17; i++) { WrNib(sc, PCMR + HNib, PCMR_SK + PCMR_CS + HNib); @@ -1385,14 +1385,14 @@ rdp_93c46_read(struct rdp_softc *sc) if (b & 1) data |= 1; #if DEBUG & 2 - printf("%d", b & 1); + kprintf("%d", b & 1); #endif RdEnd(sc, PDR); DELAY(1); } #if DEBUG & 2 - printf("\n"); + kprintf("\n"); #endif /* end of cycle */ WrNib(sc, PCMR + HNib, PCMR_SK + HNib); diff --git a/sys/dev/netif/rtw/rtw.c b/sys/dev/netif/rtw/rtw.c index cd70ae0560..21a74455ba 100644 --- a/sys/dev/netif/rtw/rtw.c +++ b/sys/dev/netif/rtw/rtw.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * $NetBSD: rtw.c,v 1.72 2006/03/28 00:48:10 dyoung Exp $ - * $DragonFly: src/sys/dev/netif/rtw/rtw.c,v 1.4 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/rtw/rtw.c,v 1.5 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -788,7 +788,7 @@ rtw_srom_parse(struct rtw_softc *sc) srom_version >> 8, srom_version & 0xff); if (srom_version <= 0x0101) { - printf(" is not understood, limping along with defaults\n"); + kprintf(" is not understood, limping along with defaults\n"); /* Default values */ sc->sc_flags |= (RTW_F_DIGPHY | RTW_F_ANTDIV); @@ -797,7 +797,7 @@ rtw_srom_parse(struct rtw_softc *sc) sc->sc_rfchipid = RTW_RFCHIPID_PHILIPS; return 0; } - printf("\n"); + kprintf("\n"); for (i = 0; i < IEEE80211_ADDR_LEN; i++) mac[i] = RTW_SR_GET(sr, RTW_SR_MAC + i); @@ -1383,7 +1383,7 @@ rtw_intr_rx(struct rtw_softc *sc, uint16_t isr) #ifdef RTW_DEBUG #define PRINTSTAT(flag) do { \ if ((hstat & flag) != 0) { \ - printf("%s" #flag, delim); \ + kprintf("%s" #flag, delim); \ delim = ","; \ } \ } while (0) @@ -1392,7 +1392,7 @@ rtw_intr_rx(struct rtw_softc *sc, uint16_t isr) if_printf(ifp, "%s", ""); if ((hstat & RTW_RXSTAT_DEBUG) != 0) { - printf("status %08x", hstat); + kprintf("status %08x", hstat); PRINTSTAT(RTW_RXSTAT_SPLCP); PRINTSTAT(RTW_RXSTAT_MAR); PRINTSTAT(RTW_RXSTAT_PAR); @@ -1400,7 +1400,7 @@ rtw_intr_rx(struct rtw_softc *sc, uint16_t isr) PRINTSTAT(RTW_RXSTAT_PWRMGT); PRINTSTAT(RTW_RXSTAT_CRC32); PRINTSTAT(RTW_RXSTAT_ICV); - printf(">, "); + kprintf(">, "); } } #endif /* RTW_DEBUG */ @@ -2038,7 +2038,7 @@ rtw_intr(void *arg) #ifdef RTW_DEBUG #define PRINTINTR(flag) do { \ if ((isr & flag) != 0) { \ - printf("%s" #flag, delim); \ + kprintf("%s" #flag, delim); \ delim = ","; \ } \ } while (0) @@ -2065,7 +2065,7 @@ rtw_intr(void *arg) PRINTINTR(RTW_INTR_RER); PRINTINTR(RTW_INTR_ROK); - printf(">\n"); + kprintf(">\n"); } #undef PRINTINTR #endif /* RTW_DEBUG */ @@ -2380,7 +2380,7 @@ rtw_tune(struct rtw_softc *sc) dflantb, RTW_ON); if (rc != 0) { /* XXX condition on powersaving */ - printf("%s: phy init failed\n", ic->ic_if.if_xname); + kprintf("%s: phy init failed\n", ic->ic_if.if_xname); } sc->sc_cur_chan = chan; @@ -4023,7 +4023,7 @@ rtw_txdesc_blk_alloc(struct rtw_softc *sc, int q_len, int q_no, (void **)&tdb->tdb_desc, &tdb->tdb_base, &tdb->tdb_dmamap); if (error) { - printf("%dth tx\n", q_no); + kprintf("%dth tx\n", q_no); return error; } tdb->tdb_basereg = q_basereg; @@ -4058,7 +4058,7 @@ rtw_rxdesc_blk_alloc(struct rtw_softc *sc, int q_len) (void **)&rdb->rdb_desc, &rdb->rdb_base, &rdb->rdb_dmamap); if (error) { - printf("rx\n"); + kprintf("rx\n"); } else { rdb->rdb_ndesc = q_len; } @@ -4425,7 +4425,7 @@ rtw_compute_duration(const struct ieee80211_frame_min *wh, firstlen = paylen + overlen; if (debug) { - printf("%s: npkt %d firstlen %d lastlen0 %d lastlen %d " + kprintf("%s: npkt %d firstlen %d lastlen0 %d lastlen %d " "fraglen %d overlen %d len %d rate %d icflags %08x\n", __func__, npkt, firstlen, lastlen0, lastlen, fraglen, overlen, len, rate, icflags); diff --git a/sys/dev/netif/rtw/rtwphyio.c b/sys/dev/netif/rtw/rtwphyio.c index 9bace43a2e..1d081364f9 100644 --- a/sys/dev/netif/rtw/rtwphyio.c +++ b/sys/dev/netif/rtw/rtwphyio.c @@ -29,7 +29,7 @@ * OF SUCH DAMAGE. * * $NetBSD: rtwphyio.c,v 1.11 2006/03/08 00:24:06 dyoung Exp $ - * $DragonFly: src/sys/dev/netif/rtw/rtwphyio.c,v 1.2 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/rtw/rtwphyio.c,v 1.3 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -110,7 +110,7 @@ rtw_bbp_write(struct rtw_regs *regs, u_int addr, u_int val) } DELAY(BBP_WRITE_DELAY); /* again */ } - printf("%s: timeout\n", __func__); + kprintf("%s: timeout\n", __func__); return -1; } @@ -193,7 +193,7 @@ rtw_rf_macbangbits(struct rtw_regs *regs, uint32_t reg) RTW_RBR(regs, RTW_PHYCFG, RTW_PHYCFG); /* XXX paranoia? */ } - printf("%s: RTW_PHYCFG_MAC_POLL still set.\n", __func__); + kprintf("%s: RTW_PHYCFG_MAC_POLL still set.\n", __func__); return -1; } @@ -288,7 +288,7 @@ rtw_rf_hostwrite(struct rtw_regs *regs, enum rtw_rfchipid rfchipid, break; case RTW_RFCHIPID_INTERSIL: default: - printf("%s: unknown rfchipid %d\n", __func__, rfchipid); + kprintf("%s: unknown rfchipid %d\n", __func__, rfchipid); return -1; } @@ -351,7 +351,7 @@ rtw_rf_macwrite(struct rtw_regs *regs, enum rtw_rfchipid rfchipid, reg |= RTW_PHYCFG_MAC_RFTYPE_PHILIPS; break; default: - printf("%s: unknown rfchipid %d\n", __func__, rfchipid); + kprintf("%s: unknown rfchipid %d\n", __func__, rfchipid); return -1; } diff --git a/sys/dev/netif/rtw/rtwvar.h b/sys/dev/netif/rtw/rtwvar.h index 805e8c1b8f..4ced154a0e 100644 --- a/sys/dev/netif/rtw/rtwvar.h +++ b/sys/dev/netif/rtw/rtwvar.h @@ -29,7 +29,7 @@ * OF SUCH DAMAGE. * * $NetBSD: rtwvar.h,v 1.28 2006/02/16 20:17:16 perry Exp $ - * $DragonFly: src/sys/dev/netif/rtw/rtwvar.h,v 1.2 2006/09/30 20:03:44 swildner Exp $ + * $DragonFly: src/sys/dev/netif/rtw/rtwvar.h,v 1.3 2006/12/22 23:26:21 swildner Exp $ */ #ifndef _DEV_IC_RTWVAR_H_ @@ -77,7 +77,7 @@ struct rtw_duration { extern int rtw_debug; #define RTW_DPRINTF(__flags, __x) \ - if ((rtw_debug & (__flags)) != 0) printf __x + if ((rtw_debug & (__flags)) != 0) kprintf __x #define DPRINTF(__sc, __flags, __x) \ if (((__sc)->sc_if.if_flags & IFF_DEBUG) != 0) \ RTW_DPRINTF(__flags, __x) diff --git a/sys/dev/netif/rtw/smc93cx6.c b/sys/dev/netif/rtw/smc93cx6.c index dbfcecb1d9..781599bba0 100644 --- a/sys/dev/netif/rtw/smc93cx6.c +++ b/sys/dev/netif/rtw/smc93cx6.c @@ -20,7 +20,7 @@ * * $FreeBSD: src/sys/dev/aic7xxx/93cx6.c,v 1.5 2000/01/07 23:08:17 gibbs Exp $ * $NetBSD: smc93cx6.c,v 1.12 2005/12/11 12:21:28 christos Exp $ - * $DragonFly: src/sys/dev/netif/rtw/smc93cx6.c,v 1.2 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/rtw/smc93cx6.c,v 1.3 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -171,14 +171,14 @@ read_seeprom(sd, buf, start_addr, count) CLOCK_PULSE(sd, sd->sd_RDY); } #ifdef AHC_DUMP_EEPROM - printf("\nSerial EEPROM:\n\t"); + kprintf("\nSerial EEPROM:\n\t"); for (k = 0; k < count; k = k + 1) { if (((k % 8) == 0) && (k != 0)) { - printf ("\n\t"); + kprintf ("\n\t"); } - printf (" 0x%x", buf[k]); + kprintf (" 0x%x", buf[k]); } - printf ("\n"); + kprintf ("\n"); #endif return (1); } diff --git a/sys/dev/netif/rum/if_rum.c b/sys/dev/netif/rum/if_rum.c index 0f3ad8702d..780e8f36ca 100644 --- a/sys/dev/netif/rum/if_rum.c +++ b/sys/dev/netif/rum/if_rum.c @@ -1,5 +1,5 @@ /* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */ -/* $DragonFly: src/sys/dev/netif/rum/if_rum.c,v 1.1 2006/12/10 03:24:25 sephe Exp $ */ +/* $DragonFly: src/sys/dev/netif/rum/if_rum.c,v 1.2 2006/12/22 23:26:21 swildner Exp $ */ /*- * Copyright (c) 2005, 2006 Damien Bergamini @@ -235,7 +235,7 @@ USB_ATTACH(rum) USB_ATTACH_SETUP; if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) { - printf("%s: could not set configuration no\n", + kprintf("%s: could not set configuration no\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -244,7 +244,7 @@ USB_ATTACH(rum) error = usbd_device2interface_handle(sc->sc_udev, RT2573_IFACE_INDEX, &sc->sc_iface); if (error != 0) { - printf("%s: could not get interface handle\n", + kprintf("%s: could not get interface handle\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -258,7 +258,7 @@ USB_ATTACH(rum) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for iface %d\n", + kprintf("%s: no endpoint descriptor for iface %d\n", USBDEVNAME(sc->sc_dev), i); USB_ATTACH_ERROR_RETURN; } @@ -271,7 +271,7 @@ USB_ATTACH(rum) sc->sc_tx_no = ed->bEndpointAddress; } if (sc->sc_rx_no == -1 || sc->sc_tx_no == -1) { - printf("%s: missing endpoint\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: missing endpoint\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -287,7 +287,7 @@ USB_ATTACH(rum) DELAY(1000); } if (ntries == 1000) { - printf("%s: timeout waiting for chip to settle\n", + kprintf("%s: timeout waiting for chip to settle\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -295,7 +295,7 @@ USB_ATTACH(rum) /* retrieve MAC address and various other things from EEPROM */ rum_read_eeprom(sc); - printf("%s: MAC/BBP RT%04x (rev 0x%05x), RF %s, address %6D\n", + kprintf("%s: MAC/BBP RT%04x (rev 0x%05x), RF %s, address %6D\n", USBDEVNAME(sc->sc_dev), sc->macbbp_rev, tmp, rum_get_rf(sc->rf_rev), ic->ic_myaddr, ":"); @@ -467,7 +467,7 @@ rum_alloc_tx_list(struct rum_softc *sc) data->xfer = usbd_alloc_xfer(sc->sc_udev); if (data->xfer == NULL) { - printf("%s: could not allocate tx xfer\n", + kprintf("%s: could not allocate tx xfer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -476,7 +476,7 @@ rum_alloc_tx_list(struct rum_softc *sc) data->buf = usbd_alloc_buffer(data->xfer, RT2573_TX_DESC_SIZE + IEEE80211_MAX_LEN); if (data->buf == NULL) { - printf("%s: could not allocate tx buffer\n", + kprintf("%s: could not allocate tx buffer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -527,14 +527,14 @@ rum_alloc_rx_list(struct rum_softc *sc) data->xfer = usbd_alloc_xfer(sc->sc_udev); if (data->xfer == NULL) { - printf("%s: could not allocate rx xfer\n", + kprintf("%s: could not allocate rx xfer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; } if (usbd_alloc_buffer(data->xfer, MCLBYTES) == NULL) { - printf("%s: could not allocate rx buffer\n", + kprintf("%s: could not allocate rx buffer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -542,7 +542,7 @@ rum_alloc_rx_list(struct rum_softc *sc) data->m = m_getcl(MB_DONTWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { - printf("%s: could not allocate rx mbuf\n", + kprintf("%s: could not allocate rx mbuf\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -735,7 +735,7 @@ rum_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; - printf("%s: could not transmit buffer: %s\n", + kprintf("%s: could not transmit buffer: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(status)); if (status == USBD_STALLED) @@ -818,7 +818,7 @@ rum_rxeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) mnew = m_getcl(MB_DONTWAIT, MT_DATA, M_PKTHDR); if (mnew == NULL) { - printf("%s: could not allocate rx mbuf\n", + kprintf("%s: could not allocate rx mbuf\n", USBDEVNAME(sc->sc_dev)); ifp->if_ierrors++; goto skip; @@ -1241,7 +1241,7 @@ rum_watchdog(struct ifnet *ifp) if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { - printf("%s: device timeout\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: device timeout\n", USBDEVNAME(sc->sc_dev)); /*rum_init(sc); XXX needs a process context! */ ifp->if_oerrors++; return; @@ -1322,7 +1322,7 @@ rum_eeprom_read(struct rum_softc *sc, uint16_t addr, void *buf, int len) error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { - printf("%s: could not read EEPROM: %s\n", + kprintf("%s: could not read EEPROM: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1351,7 +1351,7 @@ rum_read_multi(struct rum_softc *sc, uint16_t reg, void *buf, int len) error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { - printf("%s: could not multi read MAC register: %s\n", + kprintf("%s: could not multi read MAC register: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1378,7 +1378,7 @@ rum_write_multi(struct rum_softc *sc, uint16_t reg, void *buf, size_t len) error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { - printf("%s: could not multi write MAC register: %s\n", + kprintf("%s: could not multi write MAC register: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1394,7 +1394,7 @@ rum_bbp_write(struct rum_softc *sc, uint8_t reg, uint8_t val) break; } if (ntries == 5) { - printf("%s: could not write to BBP\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not write to BBP\n", USBDEVNAME(sc->sc_dev)); return; } @@ -1413,7 +1413,7 @@ rum_bbp_read(struct rum_softc *sc, uint8_t reg) break; } if (ntries == 5) { - printf("%s: could not read BBP\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not read BBP\n", USBDEVNAME(sc->sc_dev)); return 0; } @@ -1427,7 +1427,7 @@ rum_bbp_read(struct rum_softc *sc, uint8_t reg) DELAY(1); } - printf("%s: could not read BBP\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not read BBP\n", USBDEVNAME(sc->sc_dev)); return 0; } @@ -1442,7 +1442,7 @@ rum_rf_write(struct rum_softc *sc, uint8_t reg, uint32_t val) break; } if (ntries == 5) { - printf("%s: could not write to RF\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not write to RF\n", USBDEVNAME(sc->sc_dev)); return; } @@ -1848,7 +1848,7 @@ rum_bbp_init(struct rum_softc *sc) DELAY(1000); } if (ntries == 100) { - printf("%s: timeout waiting for BBP\n", + kprintf("%s: timeout waiting for BBP\n", USBDEVNAME(sc->sc_dev)); return EIO; } @@ -1900,7 +1900,7 @@ rum_init(void *xsc) DELAY(1000); } if (ntries == 1000) { - printf("%s: timeout waiting for BBP/RF to wakeup\n", + kprintf("%s: timeout waiting for BBP/RF to wakeup\n", USBDEVNAME(sc->sc_dev)); goto fail; } @@ -1928,7 +1928,7 @@ rum_init(void *xsc) */ sc->stats_xfer = usbd_alloc_xfer(sc->sc_udev); if (sc->stats_xfer == NULL) { - printf("%s: could not allocate AMRR xfer\n", + kprintf("%s: could not allocate AMRR xfer\n", USBDEVNAME(sc->sc_dev)); goto fail; } @@ -1939,7 +1939,7 @@ rum_init(void *xsc) error = usbd_open_pipe(sc->sc_iface, sc->sc_tx_no, USBD_EXCLUSIVE_USE, &sc->sc_tx_pipeh); if (error != 0) { - printf("%s: could not open Tx pipe: %s\n", + kprintf("%s: could not open Tx pipe: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); goto fail; } @@ -1947,7 +1947,7 @@ rum_init(void *xsc) error = usbd_open_pipe(sc->sc_iface, sc->sc_rx_no, USBD_EXCLUSIVE_USE, &sc->sc_rx_pipeh); if (error != 0) { - printf("%s: could not open Rx pipe: %s\n", + kprintf("%s: could not open Rx pipe: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); goto fail; } @@ -1957,14 +1957,14 @@ rum_init(void *xsc) */ error = rum_alloc_tx_list(sc); if (error != 0) { - printf("%s: could not allocate Tx list\n", + kprintf("%s: could not allocate Tx list\n", USBDEVNAME(sc->sc_dev)); goto fail; } error = rum_alloc_rx_list(sc); if (error != 0) { - printf("%s: could not allocate Rx list\n", + kprintf("%s: could not allocate Rx list\n", USBDEVNAME(sc->sc_dev)); goto fail; } @@ -2067,7 +2067,7 @@ rum_load_microcode(struct rum_softc *sc, const uint8_t *ucode, size_t size) error = usbd_do_request(sc->sc_udev, &req, NULL); if (error != 0) { - printf("%s: could not run firmware: %s\n", + kprintf("%s: could not run firmware: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } return error; @@ -2142,7 +2142,7 @@ rum_stats_update(usbd_xfer_handle xfer, usbd_private_handle priv, struct ieee80211_ratectl_stats *stats = &sc->sc_stats; if (status != USBD_NORMAL_COMPLETION) { - printf("%s: could not retrieve Tx statistics - cancelling " + kprintf("%s: could not retrieve Tx statistics - cancelling " "automatic rate control\n", USBDEVNAME(sc->sc_dev)); return; } diff --git a/sys/dev/netif/sbni/if_sbni.c b/sys/dev/netif/sbni/if_sbni.c index dffd41d2d0..93f53066d5 100644 --- a/sys/dev/netif/sbni/if_sbni.c +++ b/sys/dev/netif/sbni/if_sbni.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sbni/if_sbni.c,v 1.1.2.4 2002/08/11 09:32:00 fjoe Exp $ - * $DragonFly: src/sys/dev/netif/sbni/if_sbni.c,v 1.24 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sbni/if_sbni.c,v 1.25 2006/12/22 23:26:21 swildner Exp $ */ /* @@ -249,9 +249,9 @@ sbni_attach(struct sbni_softc *sc, int unit, struct sbni_flags flags) if_printf(ifp, "speed %ld, rxl ", ifp->if_baudrate); if (sc->delta_rxl) - printf("auto\n"); + kprintf("auto\n"); else - printf("%d (fixed)\n", sc->cur_rxl_index); + kprintf("%d (fixed)\n", sc->cur_rxl_index); } /* -------------------------------------------------------------------------- */ @@ -368,7 +368,7 @@ handle_channel(struct sbni_softc *sc) */ csr0 = sbni_inb(sc, CSR0); if ((csr0 & TR_RDY) == 0 || (csr0 & RC_RDY) != 0) - printf("sbni: internal error!\n"); + kprintf("sbni: internal error!\n"); /* if state & FL_NEED_RESEND != 0 then tx_frameno != 0 */ if (req_ans || sc->tx_frameno != 0) @@ -647,7 +647,7 @@ prepare_to_send(struct sbni_softc *sc) /* sc->tx_buf_p == NULL here! */ if (sc->tx_buf_p) - printf("sbni: memory leak!\n"); + kprintf("sbni: memory leak!\n"); sc->outpos = 0; sc->state &= ~(FL_WAIT_ACK | FL_NEED_RESEND); @@ -795,7 +795,7 @@ get_rx_buf(struct sbni_softc *sc) MGETHDR(m, MB_DONTWAIT, MT_DATA); if (m == NULL) { - printf("%s: cannot allocate header mbuf\n", + kprintf("%s: cannot allocate header mbuf\n", sc->arpcom.ac_if.if_xname); return (0); } diff --git a/sys/dev/netif/sbni/if_sbni_pci.c b/sys/dev/netif/sbni/if_sbni_pci.c index e7eec004be..9744673d25 100644 --- a/sys/dev/netif/sbni/if_sbni_pci.c +++ b/sys/dev/netif/sbni/if_sbni_pci.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sbni/if_sbni_pci.c,v 1.6 2002/09/28 20:59:59 phk Exp $ - * $DragonFly: src/sys/dev/netif/sbni/if_sbni_pci.c,v 1.13 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sbni/if_sbni_pci.c,v 1.14 2006/12/22 23:26:21 swildner Exp $ */ @@ -95,7 +95,7 @@ sbni_pci_probe(device_t dev) sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid, 0ul, ~0ul, ports, RF_ACTIVE); if (!sc->io_res) { - printf("sbni: cannot allocate io ports!\n"); + kprintf("sbni: cannot allocate io ports!\n"); if (sc->slave_sc) kfree(sc->slave_sc, M_DEVBUF); return (ENOENT); @@ -126,7 +126,7 @@ sbni_pci_attach(device_t dev) sc = device_get_softc(dev); - printf("sbni%d: port 0x%lx", + kprintf("sbni%d: port 0x%lx", next_sbni_unit, sc->slave_sc ? " Dual " : " ", rman_get_start(sc->io_res)); sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, @@ -144,10 +144,10 @@ sbni_pci_attach(device_t dev) &sc->irq_handle, sc->arpcom.ac_if.if_serializer); if (error) { - printf("sbni%d: bus_setup_intr\n", next_sbni_unit); + kprintf("sbni%d: bus_setup_intr\n", next_sbni_unit); } } else { - printf("\nsbni%d: cannot claim irq!\n", next_sbni_unit); + kprintf("\nsbni%d: cannot claim irq!\n", next_sbni_unit); } return (0); diff --git a/sys/dev/netif/sbsh/if_sbsh.c b/sys/dev/netif/sbsh/if_sbsh.c index aa9993ee2e..846b461fae 100644 --- a/sys/dev/netif/sbsh/if_sbsh.c +++ b/sys/dev/netif/sbsh/if_sbsh.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sbsh/if_sbsh.c,v 1.3.2.1 2003/04/15 18:15:07 fjoe Exp $ - * $DragonFly: src/sys/dev/netif/sbsh/if_sbsh.c,v 1.24 2006/10/25 20:55:58 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sbsh/if_sbsh.c,v 1.25 2006/12/22 23:26:22 swildner Exp $ */ #include @@ -229,7 +229,7 @@ sbsh_attach(device_t dev) 0, ~0, 4096, RF_ACTIVE); if (sc->mem_res == NULL) { - printf ("sbsh%d: couldn't map memory\n", unit); + kprintf ("sbsh%d: couldn't map memory\n", unit); error = ENXIO; goto fail; } @@ -239,7 +239,7 @@ sbsh_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { - printf("sbsh%d: couldn't map interrupt\n", unit); + kprintf("sbsh%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } @@ -270,7 +270,7 @@ sbsh_attach(device_t dev) ifp->if_serializer); if (error) { ether_ifdetach(ifp); - printf("sbsh%d: couldn't set up irq\n", unit); + kprintf("sbsh%d: couldn't set up irq\n", unit); goto fail; } diff --git a/sys/dev/netif/sf/if_sf.c b/sys/dev/netif/sf/if_sf.c index 8111fd60f3..b285b4ecde 100644 --- a/sys/dev/netif/sf/if_sf.c +++ b/sys/dev/netif/sf/if_sf.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_sf.c,v 1.18.2.8 2001/12/16 15:46:07 luigi Exp $ - * $DragonFly: src/sys/dev/netif/sf/if_sf.c,v 1.29 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sf/if_sf.c,v 1.30 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -573,7 +573,7 @@ sf_reset(struct sf_softc *sc) } if (i == SF_TIMEOUT) - printf("sf%d: reset never completed!\n", sc->sf_unit); + kprintf("sf%d: reset never completed!\n", sc->sf_unit); /* Wait a little while for the chip to get its brains in order. */ DELAY(1000); @@ -669,7 +669,7 @@ sf_attach(device_t dev) irq = pci_read_config(dev, SF_PCI_INTLINE, 4); /* Reset the power state. */ - printf("sf%d: chip is in D%d power mode " + kprintf("sf%d: chip is in D%d power mode " "-- setting to D0\n", unit, command & SF_PSTATE_MASK); command &= 0xFFFFFFFC; pci_write_config(dev, SF_PCI_PWRMGMTCTRL, command, 4); @@ -691,13 +691,13 @@ sf_attach(device_t dev) #ifdef SF_USEIOSPACE if (!(command & PCIM_CMD_PORTEN)) { - printf("sf%d: failed to enable I/O ports!\n", unit); + kprintf("sf%d: failed to enable I/O ports!\n", unit); error = ENXIO; return(error); } #else if (!(command & PCIM_CMD_MEMEN)) { - printf("sf%d: failed to enable memory mapping!\n", unit); + kprintf("sf%d: failed to enable memory mapping!\n", unit); error = ENXIO; return(error); } @@ -707,7 +707,7 @@ sf_attach(device_t dev) sc->sf_res = bus_alloc_resource_any(dev, SF_RES, &rid, RF_ACTIVE); if (sc->sf_res == NULL) { - printf ("sf%d: couldn't map ports\n", unit); + kprintf ("sf%d: couldn't map ports\n", unit); error = ENXIO; return(error); } @@ -721,7 +721,7 @@ sf_attach(device_t dev) RF_SHAREABLE | RF_ACTIVE); if (sc->sf_irq == NULL) { - printf("sf%d: couldn't map interrupt\n", unit); + kprintf("sf%d: couldn't map interrupt\n", unit); error = ENXIO; goto fail; } @@ -745,7 +745,7 @@ sf_attach(device_t dev) M_WAITOK, 0, 0xffffffff, PAGE_SIZE, 0); if (sc->sf_ldata == NULL) { - printf("sf%d: no memory for list buffers!\n", unit); + kprintf("sf%d: no memory for list buffers!\n", unit); error = ENXIO; goto fail; } @@ -755,7 +755,7 @@ sf_attach(device_t dev) /* Do MII setup. */ if (mii_phy_probe(dev, &sc->sf_miibus, sf_ifmedia_upd, sf_ifmedia_sts)) { - printf("sf%d: MII without any phy!\n", sc->sf_unit); + kprintf("sf%d: MII without any phy!\n", sc->sf_unit); error = ENXIO; goto fail; } @@ -1045,7 +1045,7 @@ sf_txthresh_adjust(struct sf_softc *sc) txfctl &= ~SF_TXFRMCTL_TXTHRESH; txfctl |= txthresh; #ifdef DIAGNOSTIC - printf("sf%d: tx underrun, increasing " + kprintf("sf%d: tx underrun, increasing " "tx threshold to %d bytes\n", sc->sf_unit, txthresh * 4); #endif @@ -1134,7 +1134,7 @@ sf_init(void *xsc) sf_setperf(sc, 0, (caddr_t)&sc->arpcom.ac_enaddr); if (sf_init_rx_ring(sc) == ENOBUFS) { - printf("sf%d: initialization failed: no " + kprintf("sf%d: initialization failed: no " "memory for rx buffers\n", sc->sf_unit); return; } @@ -1239,7 +1239,7 @@ sf_encap(struct sf_softc *sc, struct sf_tx_bufdesc_type0 *c, MGETHDR(m_new, MB_DONTWAIT, MT_DATA); if (m_new == NULL) { - printf("sf%d: no memory for tx list", sc->sf_unit); + kprintf("sf%d: no memory for tx list", sc->sf_unit); return(1); } @@ -1247,7 +1247,7 @@ sf_encap(struct sf_softc *sc, struct sf_tx_bufdesc_type0 *c, MCLGET(m_new, MB_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { m_freem(m_new); - printf("sf%d: no memory for tx list", + kprintf("sf%d: no memory for tx list", sc->sf_unit); return(1); } @@ -1293,7 +1293,7 @@ sf_start(struct ifnet *ifp) i = SF_IDX_HI(txprod) >> 4; if (sc->sf_ldata->sf_tx_dlist[i].sf_mbuf != NULL) { - printf("sf%d: TX ring full, resetting\n", sc->sf_unit); + kprintf("sf%d: TX ring full, resetting\n", sc->sf_unit); sf_init(sc); txprod = csr_read_4(sc, SF_TXDQ_PRODIDX); i = SF_IDX_HI(txprod) >> 4; @@ -1436,7 +1436,7 @@ sf_watchdog(struct ifnet *ifp) sc = ifp->if_softc; ifp->if_oerrors++; - printf("sf%d: watchdog timeout\n", sc->sf_unit); + kprintf("sf%d: watchdog timeout\n", sc->sf_unit); sf_stop(sc); sf_reset(sc); diff --git a/sys/dev/netif/sk/if_sk.c b/sys/dev/netif/sk/if_sk.c index bc43744b4d..557c73c278 100644 --- a/sys/dev/netif/sk/if_sk.c +++ b/sys/dev/netif/sk/if_sk.c @@ -31,7 +31,7 @@ * * $OpenBSD: if_sk.c,v 1.129 2006/10/16 12:30:08 tom Exp $ * $FreeBSD: /c/ncvs/src/sys/pci/if_sk.c,v 1.20 2000/04/22 02:16:37 wpaul Exp $ - * $DragonFly: src/sys/dev/netif/sk/if_sk.c,v 1.51 2006/12/21 14:13:04 sephe Exp $ + * $DragonFly: src/sys/dev/netif/sk/if_sk.c,v 1.52 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -236,8 +236,8 @@ static void sk_buf_dma_addr(void *, bus_dma_segment_t *, int, bus_size_t, static void sk_dmamem_addr(void *, bus_dma_segment_t *, int, int); #ifdef SK_DEBUG -#define DPRINTF(x) if (skdebug) printf x -#define DPRINTFN(n,x) if (skdebug >= (n)) printf x +#define DPRINTF(x) if (skdebug) kprintf x +#define DPRINTFN(n,x) if (skdebug >= (n)) kprintf x static int skdebug = 2; static void sk_dump_txdesc(struct sk_tx_desc *, int); @@ -2869,7 +2869,7 @@ sk_dump_txdesc(struct sk_tx_desc *desc, int idx) { #define DESC_PRINT(X) \ if (X) \ - printf("txdesc[%d]." #X "=%#x\n", \ + kprintf("txdesc[%d]." #X "=%#x\n", \ idx, X); DESC_PRINT(le32toh(desc->sk_ctl)); @@ -2891,26 +2891,26 @@ sk_dump_bytes(const char *data, int len) int c, i, j; for (i = 0; i < len; i += 16) { - printf("%08x ", i); + kprintf("%08x ", i); c = len - i; if (c > 16) c = 16; for (j = 0; j < c; j++) { - printf("%02x ", data[i + j] & 0xff); + kprintf("%02x ", data[i + j] & 0xff); if ((j & 0xf) == 7 && j > 0) - printf(" "); + kprintf(" "); } for (; j < 16; j++) - printf(" "); - printf(" "); + kprintf(" "); + kprintf(" "); for (j = 0; j < c; j++) { int ch = data[i + j] & 0xff; - printf("%c", ' ' <= ch && ch <= '~' ? ch : ' '); + kprintf("%c", ' ' <= ch && ch <= '~' ? ch : ' '); } - printf("\n"); + kprintf("\n"); if (c < 16) break; @@ -2922,10 +2922,10 @@ sk_dump_mbuf(struct mbuf *m) { int count = m->m_pkthdr.len; - printf("m=%p, m->m_pkthdr.len=%d\n", m, m->m_pkthdr.len); + kprintf("m=%p, m->m_pkthdr.len=%d\n", m, m->m_pkthdr.len); while (count > 0 && m) { - printf("m=%p, m->m_data=%p, m->m_len=%d\n", + kprintf("m=%p, m->m_data=%p, m->m_len=%d\n", m, m->m_data, m->m_len); sk_dump_bytes(mtod(m, char *), m->m_len); diff --git a/sys/dev/netif/sn/if_sn.c b/sys/dev/netif/sn/if_sn.c index 6ee8ec4585..f0efbe48a8 100644 --- a/sys/dev/netif/sn/if_sn.c +++ b/sys/dev/netif/sn/if_sn.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sn/if_sn.c,v 1.7.2.3 2001/02/04 04:38:38 toshi Exp $ - * $DragonFly: src/sys/dev/netif/sn/if_sn.c,v 1.26 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sn/if_sn.c,v 1.27 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -186,11 +186,11 @@ sn_attach(device_t dev) SMC_SELECT_BANK(3); rev = inw(BASE + REVISION_REG_W); if (chip_ids[(rev >> 4) & 0xF]) - printf("%s ", chip_ids[(rev >> 4) & 0xF]); + kprintf("%s ", chip_ids[(rev >> 4) & 0xF]); SMC_SELECT_BANK(1); i = inw(BASE + CONFIG_REG_W); - printf("%s\n", i & CR_AUI_SELECT ? "AUI" : "UTP"); + kprintf("%s\n", i & CR_AUI_SELECT ? "AUI" : "UTP"); if (sc->pccard_enaddr) for (j = 0; j < 3; j++) { @@ -354,7 +354,7 @@ snstart(struct ifnet *ifp) return; } if (sc->pages_wanted != -1) { - printf("%s: snstart() while memory allocation pending\n", + kprintf("%s: snstart() while memory allocation pending\n", ifp->if_xname); return; } @@ -381,7 +381,7 @@ startagain: * them instead? */ if (len + pad > ETHER_MAX_LEN - ETHER_CRC_LEN) { - printf("%s: large packet discarded (A)\n", ifp->if_xname); + kprintf("%s: large packet discarded (A)\n", ifp->if_xname); ++sc->arpcom.ac_if.if_oerrors; ifq_dequeue(&ifp->if_snd, m); m_freem(m); @@ -451,7 +451,7 @@ startagain: */ packet_no = inb(BASE + ALLOC_RESULT_REG_B); if (packet_no & ARR_FAILED) { - printf("%s: Memory allocation failed\n", ifp->if_xname); + kprintf("%s: Memory allocation failed\n", ifp->if_xname); goto startagain; } /* @@ -576,7 +576,7 @@ snresume(struct ifnet *ifp) */ m = ifq_poll(&ifp->if_snd); if (m == NULL) { - printf("%s: snresume() with nothing to send\n", ifp->if_xname); + kprintf("%s: snresume() with nothing to send\n", ifp->if_xname); return; } /* @@ -593,7 +593,7 @@ snresume(struct ifnet *ifp) * them instead? */ if (len + pad > ETHER_MAX_LEN - ETHER_CRC_LEN) { - printf("%s: large packet discarded (B)\n", ifp->if_xname); + kprintf("%s: large packet discarded (B)\n", ifp->if_xname); ++ifp->if_oerrors; ifq_dequeue(&ifp->if_snd, m); m_freem(m); @@ -629,7 +629,7 @@ snresume(struct ifnet *ifp) */ packet_no = inb(BASE + ALLOC_RESULT_REG_B); if (packet_no & ARR_FAILED) { - printf("%s: Memory allocation failed. Weird.\n", ifp->if_xname); + kprintf("%s: Memory allocation failed. Weird.\n", ifp->if_xname); ifp->if_timer = 1; goto try_start; } @@ -643,7 +643,7 @@ snresume(struct ifnet *ifp) * memory allocation was initiated. */ if (pages_wanted != numPages) { - printf("%s: memory allocation wrong size. Weird.\n", ifp->if_xname); + kprintf("%s: memory allocation wrong size. Weird.\n", ifp->if_xname); /* * If the allocation was the wrong size we simply release the * memory once it is granted. Wait for the MMU to be un-busy. @@ -806,7 +806,7 @@ sn_intr(void *arg) /* * we got called , but nothing was on the FIFO */ - printf("sn: Receive interrupt with nothing on FIFO\n"); + kprintf("sn: Receive interrupt with nothing on FIFO\n"); goto out; } @@ -977,7 +977,7 @@ snread(struct ifnet *ifp) /* * we got called , but nothing was on the FIFO */ - printf("sn: Receive interrupt with nothing on FIFO\n"); + kprintf("sn: Receive interrupt with nothing on FIFO\n"); return; } #endif @@ -1039,7 +1039,7 @@ read_another: if ((m->m_flags & M_EXT) == 0) { m_freem(m); ++ifp->if_ierrors; - printf("sn: snread() kernel memory allocation problem\n"); + kprintf("sn: snread() kernel memory allocation problem\n"); goto out; } @@ -1294,7 +1294,7 @@ sn_probe(device_t dev, int pccard) * have been a SMC chip after all. */ /* - * printf("sn: ioaddr %x doesn't match card configuration + * kprintf("sn: ioaddr %x doesn't match card configuration * (%x)\n", ioaddr, base_address_register >> 3 & 0x3E0 ); */ diff --git a/sys/dev/netif/sr/if_sr.c b/sys/dev/netif/sr/if_sr.c index 16ea202743..4c25303a34 100644 --- a/sys/dev/netif/sr/if_sr.c +++ b/sys/dev/netif/sr/if_sr.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sr/if_sr.c,v 1.48.2.1 2002/06/17 15:10:58 jhay Exp $ - * $DragonFly: src/sys/dev/netif/sr/if_sr.c,v 1.20 2006/12/20 18:14:39 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sr/if_sr.c,v 1.21 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -388,7 +388,7 @@ sr_attach(device_t device) * Report Card configuration information before we start configuring * each channel on the card... */ - printf("src%d: %uK RAM (%d mempages) @ %08x-%08x, %u ports.\n", + kprintf("src%d: %uK RAM (%d mempages) @ %08x-%08x, %u ports.\n", hc->cunit, hc->memsize / 1024, hc->mempages, (u_int)hc->mem_start, (u_int)hc->mem_end, hc->numports); @@ -414,7 +414,7 @@ sr_attach(device_t device) sr_init_tx_dmac(sc); sr_init_msci(sc); - printf("sr%d: Adapter %d, port %d.\n", + kprintf("sr%d: Adapter %d, port %d.\n", sc->unit, hc->cunit, sc->subunit); #ifndef NETGRAPH @@ -472,7 +472,7 @@ sr_detach(device_t device) if (hc->intr_cookie != NULL) { if (BUS_TEARDOWN_INTR(parent, device, hc->res_irq, hc->intr_cookie) != 0) { - printf("intr teardown failed.. continuing\n"); + kprintf("intr teardown failed.. continuing\n"); } hc->intr_cookie = NULL; } @@ -613,7 +613,7 @@ srintr(void *arg) u_char isr0, isr1, isr2; /* interrupt statii captured */ #if BUGGY > 1 - printf("sr: srintr_hc(hc=%08x)\n", hc); + kprintf("sr: srintr_hc(hc=%08x)\n", hc); #endif /* @@ -638,7 +638,7 @@ srintr(void *arg) break; #if BUGGY > 2 - printf("src%d: srintr_hc isr0 %x, isr1 %x, isr2 %x\n", + kprintf("src%d: srintr_hc isr0 %x, isr1 %x, isr2 %x\n", #ifndef NETGRAPH unit, isr0, isr1, isr2); #else @@ -679,7 +679,7 @@ sr_xmit(struct sr_softc *sc) dmac_channel *dmac; /* DMA channel registers */ #if BUGGY > 0 - printf("sr: sr_xmit( sc=%08x)\n", sc); + kprintf("sr: sr_xmit( sc=%08x)\n", sc); #endif hc = sc->hc; @@ -708,7 +708,7 @@ sr_xmit(struct sr_softc *sc) sc->xmit_busy = 1; /* mark transmitter busy */ #if BUGGY > 2 - printf("sr%d: XMIT cda=%04x, eda=%4x, rcda=%08lx\n", + kprintf("sr%d: XMIT cda=%04x, eda=%4x, rcda=%08lx\n", sc->unit, cda_value, eda_value, sc->block[sc->txb_next_tx].txdesc + hc->mem_pstart); #endif @@ -766,7 +766,7 @@ srstart(struct sr_softc *sc) #ifndef NETGRAPH #if BUGGY > 0 - printf("sr: srstart( ifp=%08x)\n", ifp); + kprintf("sr: srstart( ifp=%08x)\n", ifp); #endif sc = ifp->if_softc; if ((ifp->if_flags & IFF_RUNNING) == 0) @@ -804,7 +804,7 @@ top_srstart: SRC_SET_OFF(hc->iobase); #if BUGGY > 9 - printf("sr%d.srstart: sc->txb_inuse=%d; DPRAM full...\n", + kprintf("sr%d.srstart: sc->txb_inuse=%d; DPRAM full...\n", sc->unit, sc->txb_inuse); #endif return; @@ -860,7 +860,7 @@ top_srstart: len = mtx->m_pkthdr.len; /* length of message */ #if BUGGY > 1 - printf("sr%d.srstart: mbuf @ %08lx, %d bytes\n", + kprintf("sr%d.srstart: mbuf @ %08lx, %d bytes\n", sc->unit, mtx, len); #endif @@ -925,7 +925,7 @@ top_srstart: */ if ((i + 3) >= blkp->txmax) { /* enough remains? */ #if BUGGY > 9 - printf("sr%d.srstart: i=%d (%d pkts); card full.\n", + kprintf("sr%d.srstart: i=%d (%d pkts); card full.\n", sc->unit, i, pkts); #endif break; @@ -943,7 +943,7 @@ top_srstart: #endif /* NETGRAPH */ if (!mtx) { /* no message? We're done! */ #if BUGGY > 9 - printf("sr%d.srstart: pending=0, pkts=%d\n", + kprintf("sr%d.srstart: pending=0, pkts=%d\n", sc->unit, pkts); #endif break; @@ -979,7 +979,7 @@ top_srstart: if (sc->xmit_busy == 0) { sr_xmit(sc); #if BUGGY > 9 - printf("sr%d.srstart: called sr_xmit()\n", sc->unit); + kprintf("sr%d.srstart: called sr_xmit()\n", sc->unit); #endif } goto top_srstart; @@ -1001,7 +1001,7 @@ srioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) struct sr_softc *sc = ifp->if_softc; #if BUGGY > 0 - printf("%s: srioctl(ifp=%08x, cmd=%08x, data=%08x)\n", + kprintf("%s: srioctl(ifp=%08x, cmd=%08x, data=%08x)\n", ifp->if_xname, ifp, cmd, data); #endif @@ -1010,7 +1010,7 @@ srioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) error = sppp_ioctl(ifp, cmd, data); #if BUGGY > 1 - printf("%s: ioctl: ifsppp.pp_flags = %08x, if_flags %08x.\n", + kprintf("%s: ioctl: ifsppp.pp_flags = %08x, if_flags %08x.\n", ifp->if_xname, ((struct sppp *)ifp)->pp_flags, ifp->if_flags); #endif @@ -1020,23 +1020,23 @@ srioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cr) if ((cmd != SIOCSIFFLAGS) && (cmd != SIOCSIFADDR)) { #if BUGGY > 2 if (bug_splats[sc->unit]++ < 2) { - printf("sr(%d).if_addrlist = %08x\n", + kprintf("sr(%d).if_addrlist = %08x\n", sc->unit, ifp->if_addrlist); - printf("sr(%d).if_bpf = %08x\n", + kprintf("sr(%d).if_bpf = %08x\n", sc->unit, ifp->if_bpf); - printf("sr(%d).if_init = %08x\n", + kprintf("sr(%d).if_init = %08x\n", sc->unit, ifp->if_init); - printf("sr(%d).if_output = %08x\n", + kprintf("sr(%d).if_output = %08x\n", sc->unit, ifp->if_output); - printf("sr(%d).if_start = %08x\n", + kprintf("sr(%d).if_start = %08x\n", sc->unit, ifp->if_start); - printf("sr(%d).if_done = %08x\n", + kprintf("sr(%d).if_done = %08x\n", sc->unit, ifp->if_done); - printf("sr(%d).if_ioctl = %08x\n", + kprintf("sr(%d).if_ioctl = %08x\n", sc->unit, ifp->if_ioctl); - printf("sr(%d).if_reset = %08x\n", + kprintf("sr(%d).if_reset = %08x\n", sc->unit, ifp->if_reset); - printf("sr(%d).if_watchdog = %08x\n", + kprintf("sr(%d).if_watchdog = %08x\n", sc->unit, ifp->if_watchdog); } #endif @@ -1093,9 +1093,9 @@ srwatchdog(struct sr_softc *sc) #if BUGGY > 0 #ifndef NETGRAPH - printf("srwatchdog(unit=%d)\n", unit); + kprintf("srwatchdog(unit=%d)\n", unit); #else - printf("srwatchdog(unit=%d)\n", sc->unit); + kprintf("srwatchdog(unit=%d)\n", sc->unit); #endif /* NETGRAPH */ #endif @@ -1117,9 +1117,9 @@ srwatchdog(struct sr_softc *sc) #if 0 if (ifp->if_flags & IFF_DEBUG) #endif - printf("sr%d: transmit failed, " + kprintf("sr%d: transmit failed, " #else /* NETGRAPH */ - printf("sr%d: transmit failed, " + kprintf("sr%d: transmit failed, " #endif /* NETGRAPH */ "ST0 %02x, ST1 %02x, ST3 %02x, DSR %02x.\n", sc->unit, @@ -1156,7 +1156,7 @@ sr_up(struct sr_softc *sc) msci_channel *msci = &sca->msci[sc->scachan]; #if BUGGY > 0 - printf("sr_up(sc=%08x)\n", sc); + kprintf("sr_up(sc=%08x)\n", sc); #endif /* @@ -1227,7 +1227,7 @@ sr_down(struct sr_softc *sc) msci_channel *msci = &sca->msci[sc->scachan]; #if BUGGY > 0 - printf("sr_down(sc=%08x)\n", sc); + kprintf("sr_down(sc=%08x)\n", sc); #endif #ifdef NETGRAPH callout_stop(&sc->sr_timer); @@ -1296,7 +1296,7 @@ src_init(struct sr_hardc *hc) u_int descneeded; #if BUGGY > 0 - printf("src_init(hc=%08x)\n", hc); + kprintf("src_init(hc=%08x)\n", hc); #endif chanmem = hc->memsize / hc->numports; @@ -1322,7 +1322,7 @@ src_init(struct sr_hardc *hc) next += bufmem; #if BUGGY > 2 - printf("sr%d: blk %d: txdesc %08x, txstart %08x\n", + kprintf("sr%d: blk %d: txdesc %08x, txstart %08x\n", sc->unit, blk, sc->block[blk].txdesc, sc->block[blk].txstart); #endif @@ -1353,7 +1353,7 @@ sr_init_sca(struct sr_hardc *hc) sca_regs *sca = hc->sca; #if BUGGY > 0 - printf("sr_init_sca(hc=%08x)\n", hc); + kprintf("sr_init_sca(hc=%08x)\n", hc); #endif /* @@ -1415,7 +1415,7 @@ sr_init_msci(struct sr_softc *sc) portndx = sc->scachan; #if BUGGY > 0 - printf("sr: sr_init_msci( sc=%08x)\n", sc); + kprintf("sr: sr_init_msci( sc=%08x)\n", sc); #endif SRC_PUT8(hc->sca_base, msci->cmd, SCA_CMD_RESET); @@ -1441,7 +1441,7 @@ sr_init_msci(struct sr_softc *sc) switch (sc->clk_cfg) { default: #if BUGGY > 0 - printf("sr%: clk_cfg=%08x, selected default clock.\n", + kprintf("sr%: clk_cfg=%08x, selected default clock.\n", portndx, sc->clk_cfg); #endif /* FALLTHROUGH */ @@ -1452,7 +1452,7 @@ sr_init_msci(struct sr_softc *sc) */ #if BUGGY > 0 - printf("sr%d: External Clock Selected.\n", portndx); + kprintf("sr%d: External Clock Selected.\n", portndx); #endif SRC_PUT8(hc->sca_base, msci->rxs, @@ -1463,7 +1463,7 @@ sr_init_msci(struct sr_softc *sc) case SR_FLAGS_EXT_SEP_CLK: #if BUGGY > 0 - printf("sr%d: Split Clocking Selected.\n", portndx); + kprintf("sr%d: Split Clocking Selected.\n", portndx); #endif SRC_PUT8(hc->sca_base, msci->rxs, @@ -1474,7 +1474,7 @@ sr_init_msci(struct sr_softc *sc) case SR_FLAGS_INT_CLK: #if BUGGY > 0 - printf("sr%d: Internal Clocking selected.\n", portndx); + kprintf("sr%d: Internal Clocking selected.\n", portndx); #endif /* @@ -1546,10 +1546,10 @@ sr_init_msci(struct sr_softc *sc) #if BUGGY > 0 if (wanted != gotspeed) - printf("sr%d: Speed wanted=%d, found=%d\n", + kprintf("sr%d: Speed wanted=%d, found=%d\n", wanted, gotspeed); - printf("sr%d: Internal Clock %dx100 BPS, tmc=%d, div=%d\n", + kprintf("sr%d: Internal Clock %dx100 BPS, tmc=%d, div=%d\n", portndx, gotspeed, tmc_v, br_v); #endif #else @@ -1618,7 +1618,7 @@ sr_init_rx_dmac(struct sr_softc *sc) u_int cda_v, sarb_v, rxbuf, rxda, rxda_d; #if BUGGY > 0 - printf("sr_init_rx_dmac(sc=%08x)\n", sc); + kprintf("sr_init_rx_dmac(sc=%08x)\n", sc); #endif hc = sc->hc; @@ -1708,7 +1708,7 @@ sr_init_tx_dmac(struct sr_softc *sc) u_int sarb_v; #if BUGGY > 0 - printf("sr_init_tx_dmac(sc=%08x)\n", sc); + kprintf("sr_init_tx_dmac(sc=%08x)\n", sc); #endif hc = sc->hc; @@ -1794,7 +1794,7 @@ sr_packet_avail(struct sr_softc *sc, int *len, u_char *rxstat) cda = (sca_descriptor *)(hc->mem_start + (wko & hc->winmsk)); #if BUGGY > 1 - printf("sr_packet_avail(): wki=%d, wko=%04x, cda=%08x\n", + kprintf("sr_packet_avail(): wki=%d, wko=%04x, cda=%08x\n", wki, wko, cda); #endif @@ -1831,7 +1831,7 @@ sr_packet_avail(struct sr_softc *sc, int *len, u_char *rxstat) if (rxdesc->stat & SCA_DESC_EOM) { /* End Of Message */ *rxstat = rxdesc->stat; /* return closing */ #if BUGGY > 0 - printf("sr%d: PKT AVAIL len %d, %x, bufs %u.\n", + kprintf("sr%d: PKT AVAIL len %d, %x, bufs %u.\n", sc->unit, *len, *rxstat, granules); #endif return 1; /* indicate success */ @@ -1872,7 +1872,7 @@ sr_copy_rxbuf(struct mbuf *m, struct sr_softc *sc, int len) u_int tlen; #if BUGGY > 0 - printf("sr_copy_rxbuf(m=%08x,sc=%08x,len=%d)\n", + kprintf("sr_copy_rxbuf(m=%08x,sc=%08x,len=%d)\n", m, sc, len); #endif @@ -1978,7 +1978,7 @@ sr_eat_packet(struct sr_softc *sc, int single) loopcnt++; if (loopcnt > sc->rxmax) { - printf("sr%d: eat pkt %d loop, cda %x, " + kprintf("sr%d: eat pkt %d loop, cda %x, " "rxdesc %x, stat %x.\n", sc->unit, loopcnt, (u_int) cda, (u_int) rxdesc, rxdesc->stat); @@ -2033,7 +2033,7 @@ sr_get_packets(struct sr_softc *sc) struct mbuf *m = NULL; /* message buffer */ #if BUGGY > 0 - printf("sr_get_packets(sc=%08x)\n", sc); + kprintf("sr_get_packets(sc=%08x)\n", sc); #endif hc = sc->hc; @@ -2065,7 +2065,7 @@ sr_get_packets(struct sr_softc *sc) sr_packet_avail(sc, &len, &rxstat); #if BUGGY > 1 - printf("sr_packet_avail() returned len=%d, rxstat=%02ux\n", + kprintf("sr_packet_avail() returned len=%d, rxstat=%02ux\n", len, rxstat); #endif @@ -2081,7 +2081,7 @@ sr_get_packets(struct sr_softc *sc) */ if (((rxstat & SCA_DESC_ERRORS) == 0) && (len < MCLBYTES)) { #if BUGGY > 1 - printf("sr%d: sr_get_packet() rxstat=%02x, len=%d\n", + kprintf("sr%d: sr_get_packet() rxstat=%02x, len=%d\n", sc->unit, rxstat, len); #endif @@ -2129,7 +2129,7 @@ sr_get_packets(struct sr_softc *sc) u_char *bp; bp = (u_char *)m; - printf("sr%d: rcvd=%02x%02x%02x%02x%02x%02x\n", + kprintf("sr%d: rcvd=%02x%02x%02x%02x%02x%02x\n", sc->unit, bp[0], bp[1], bp[2], bp[4], bp[5], bp[6]); @@ -2144,11 +2144,11 @@ sr_get_packets(struct sr_softc *sc) u_char *bp; bp = mtod(m,u_char *); - printf("sr%d: rd=%02x:%02x:%02x:%02x:%02x:%02x", + kprintf("sr%d: rd=%02x:%02x:%02x:%02x:%02x:%02x", sc->unit, bp[0], bp[1], bp[2], bp[4], bp[5], bp[6]); - printf(":%02x:%02x:%02x:%02x:%02x:%02x\n", + kprintf(":%02x:%02x:%02x:%02x:%02x:%02x\n", bp[6], bp[7], bp[8], bp[9], bp[10], bp[11]); } @@ -2206,7 +2206,7 @@ sr_get_packets(struct sr_softc *sc) hc->sca->dmac[DMAC_RXCH(sc->scachan)].eda); #if BUGGY > 0 - printf("sr%d: Receive error chan %d, " + kprintf("sr%d: Receive error chan %d, " "stat %02x, msci st3 %02x," "rxhind %d, cda %04x, eda %04x.\n", sc->unit, sc->scachan, rxstat, @@ -2216,7 +2216,7 @@ sr_get_packets(struct sr_softc *sc) } #if BUGGY > 0 - printf("sr%d: sr_get_packets() found %d packet(s)\n", + kprintf("sr%d: sr_get_packets() found %d packet(s)\n", sc->unit, pkts); #endif @@ -2242,7 +2242,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) dmac_channel *dmac; /* dma structure of chip */ #if BUGGY > 0 - printf("sr_dmac_intr(hc=%08x,isr1=%04x)\n", hc, isr1); + kprintf("sr_dmac_intr(hc=%08x,isr1=%04x)\n", hc, isr1); #endif mch = 0; /* assume chan0 on card */ @@ -2276,7 +2276,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) * Check for (& process) a Counter overflow */ if (dsr & SCA_DSR_COF) { - printf("sr%d: TX DMA Counter overflow, " + kprintf("sr%d: TX DMA Counter overflow, " "txpacket no %lu.\n", #ifndef NETGRAPH sc->unit, sc->ifsppp.pp_if.if_opackets); @@ -2290,7 +2290,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) * Check for (& process) a Buffer overflow */ if (dsr & SCA_DSR_BOF) { - printf("sr%d: TX DMA Buffer overflow, " + kprintf("sr%d: TX DMA Buffer overflow, " "txpacket no %lu, dsr %02x, " "cda %04x, eda %04x.\n", #ifndef NETGRAPH @@ -2320,7 +2320,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) * there is data to transmit. */ #if BUGGY > 0 - printf("sr%d: TX Completed OK\n", sc->unit); + kprintf("sr%d: TX Completed OK\n", sc->unit); #endif sc->xmit_busy = 0; #ifndef NETGRAPH @@ -2371,16 +2371,16 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) sca_descriptor *rxdesc; int i; - printf("SR: RXINTR isr1 %x, dsr %x, " + kprintf("SR: RXINTR isr1 %x, dsr %x, " "no data %d pkts, orxind %d.\n", dotxstart, dsr, tt, ind); - printf("SR: rxdesc %x, rxstart %x, " + kprintf("SR: rxdesc %x, rxstart %x, " "rxend %x, rxhind %d, " "rxmax %d.\n", sc->rxdesc, sc->rxstart, sc->rxend, sc->rxhind, sc->rxmax); - printf("SR: cda %x, eda %x.\n", + kprintf("SR: cda %x, eda %x.\n", SRC_GET16(hc->sca_base, dmac->cda), SRC_GET16(hc->sca_base, dmac->eda)); @@ -2394,7 +2394,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) rxdesc = &rxdesc[sc->rxhind]; for (i = 0; i < 3; i++, rxdesc++) - printf("SR: rxdesc->stat %x, " + kprintf("SR: rxdesc->stat %x, " "len %d.\n", rxdesc->stat, rxdesc->len); @@ -2408,7 +2408,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) * Check for Counter overflow */ if (dsr & SCA_DSR_COF) { - printf("sr%d: RX DMA Counter overflow, " + kprintf("sr%d: RX DMA Counter overflow, " "rxpkts %lu.\n", #ifndef NETGRAPH sc->unit, sc->ifsppp.pp_if.if_ipackets); @@ -2422,7 +2422,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) * Check for Buffer overflow */ if (dsr & SCA_DSR_BOF) { - printf("sr%d: RX DMA Buffer overflow, " + kprintf("sr%d: RX DMA Buffer overflow, " "rxpkts %lu, rxind %d, " "cda %x, eda %x, dsr %x.\n", #ifndef NETGRAPH @@ -2456,7 +2456,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) SRC_PUT8(hc->sca_base, dmac->dsr, SCA_DSR_DE); #if BUGGY > 0 - printf("sr%d: RX DMA Buffer overflow, " + kprintf("sr%d: RX DMA Buffer overflow, " "rxpkts %lu, rxind %d, " "cda %x, eda %x, dsr %x. After\n", sc->unit, @@ -2485,7 +2485,7 @@ sr_dmac_intr(struct sr_hardc *hc, u_char isr1) * * XXX We should enable the dma again. */ - printf("sr%d: RX End of xfer, rxpkts %lu.\n", + kprintf("sr%d: RX End of xfer, rxpkts %lu.\n", sc->unit, #ifndef NETGRAPH sc->ifsppp.pp_if.if_ipackets); @@ -2623,7 +2623,7 @@ sr_modemck(void *arg) dcd_v = (got_st3 & SCA_ST3_DCD) == 0; if (dcd_v == 0) - printf("sr%d: DCD lost\n", sc->unit); + kprintf("sr%d: DCD lost\n", sc->unit); } } @@ -2672,13 +2672,13 @@ sr_modemck(struct sr_softc *sc ) static void sr_msci_intr(struct sr_hardc *hc, u_char isr0) { - printf("src%d: SRINTR: MSCI\n", hc->cunit); + kprintf("src%d: SRINTR: MSCI\n", hc->cunit); } static void sr_timer_intr(struct sr_hardc *hc, u_char isr2) { - printf("src%d: SRINTR: TIMER\n", hc->cunit); + kprintf("src%d: SRINTR: TIMER\n", hc->cunit); } #ifdef NETGRAPH @@ -2986,7 +2986,7 @@ static void ngsr_init(void *ignored) { if (ng_newtype(&typestruct)) - printf("ngsr install failed\n"); + kprintf("ngsr install failed\n"); ngsr_done_init = 1; } #endif /* NETGRAPH */ diff --git a/sys/dev/netif/sr/if_sr_isa.c b/sys/dev/netif/sr/if_sr_isa.c index 0e36480e96..75ce86eac1 100644 --- a/sys/dev/netif/sr/if_sr_isa.c +++ b/sys/dev/netif/sr/if_sr_isa.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sr/if_sr_isa.c,v 1.46.2.1 2002/06/17 15:10:58 jhay Exp $ - * $DragonFly: src/sys/dev/netif/sr/if_sr_isa.c,v 1.5 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sr/if_sr_isa.c,v 1.6 2006/12/22 23:26:22 swildner Exp $ */ #include @@ -160,7 +160,7 @@ sr_isa_probe (device_t device) inb(port + SR_PCR); tmp = inb(port + SR_BAR); if (tmp != i) { - printf("sr%d: probe failed BAR %x, %x.\n", + kprintf("sr%d: probe failed BAR %x, %x.\n", hc->cunit, i, tmp); goto errexit; } @@ -179,7 +179,7 @@ sr_isa_probe (device_t device) tmp = SRC_GET8(port, sca->msci[0].tmc); if (tmp != 0) { - printf("sr%d: Error reading SCA 0, %x\n", hc->cunit, tmp); + kprintf("sr%d: Error reading SCA 0, %x\n", hc->cunit, tmp); goto errexit; } SRC_PUT8(port, sca->msci[0].tmc, 0x5A); @@ -187,7 +187,7 @@ sr_isa_probe (device_t device) tmp = SRC_GET8(port, sca->msci[0].tmc); if (tmp != 0x5A) { - printf("sr%d: Error reading SCA 0x5A, %x\n", hc->cunit, tmp); + kprintf("sr%d: Error reading SCA 0x5A, %x\n", hc->cunit, tmp); goto errexit; } SRC_PUT16(port, sca->dmac[0].cda, 0); @@ -195,7 +195,7 @@ sr_isa_probe (device_t device) tmp = SRC_GET16(port, sca->dmac[0].cda); if (tmp != 0) { - printf("sr%d: Error reading SCA 0, %x\n", hc->cunit, tmp); + kprintf("sr%d: Error reading SCA 0, %x\n", hc->cunit, tmp); goto errexit; } SRC_PUT16(port, sca->dmac[0].cda, 0x55AA); @@ -203,7 +203,7 @@ sr_isa_probe (device_t device) tmp = SRC_GET16(port, sca->dmac[0].cda); if (tmp != 0x55AA) { - printf("sr%d: Error reading SCA 0x55AA, %x\n", + kprintf("sr%d: Error reading SCA 0x55AA, %x\n", hc->cunit, tmp); goto errexit; } @@ -229,7 +229,7 @@ sr_isa_probe (device_t device) * Do a little sanity check. */ if (sr_irqtable[irq] == 0) - printf("sr%d: Warning: illegal interrupt %ld chosen.\n", + kprintf("sr%d: Warning: illegal interrupt %ld chosen.\n", hc->cunit, irq); /* @@ -408,7 +408,7 @@ src_dpram_size(device_t device) * is 4 x 16k pages. */ if (i < 4) { - printf("sr%d: Bad mem page %d, mem %x, %x.\n", + kprintf("sr%d: Bad mem page %d, mem %x, %x.\n", hc->cunit, i, 0xAA55, *smem); return 0; } diff --git a/sys/dev/netif/sr/if_sr_pci.c b/sys/dev/netif/sr/if_sr_pci.c index 6a7e212244..ea48a3050b 100644 --- a/sys/dev/netif/sr/if_sr_pci.c +++ b/sys/dev/netif/sr/if_sr_pci.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sr/if_sr_pci.c,v 1.15.2.1 2002/06/17 15:10:58 jhay Exp $ - * $DragonFly: src/sys/dev/netif/sr/if_sr_pci.c,v 1.5 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/sr/if_sr_pci.c,v 1.6 2006/12/22 23:26:22 swildner Exp $ */ @@ -191,7 +191,7 @@ sr_pci_attach(device_t device) 0x1000000); if (hc->mem_start == NULL) { - printf("src%d: pci: failed to allocate buffer space.\n", + kprintf("src%d: pci: failed to allocate buffer space.\n", hc->cunit); goto errexit; } diff --git a/sys/dev/netif/tx/if_tx.c b/sys/dev/netif/tx/if_tx.c index 9e1c37fe7c..ae21c1921a 100644 --- a/sys/dev/netif/tx/if_tx.c +++ b/sys/dev/netif/tx/if_tx.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/tx/if_tx.c,v 1.61.2.1 2002/10/29 01:43:49 semenu Exp $ - * $DragonFly: src/sys/dev/netif/tx/if_tx.c,v 1.38 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/tx/if_tx.c,v 1.39 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -255,16 +255,16 @@ epic_attach(device_t dev) } /* board type and ... */ - printf(" type "); + kprintf(" type "); for(i=0x2c;i<0x32;i++) { tmp = epic_read_eeprom(sc, i); if (' ' == (u_int8_t)tmp) break; - printf("%c", (u_int8_t)tmp); + kprintf("%c", (u_int8_t)tmp); tmp >>= 8; if (' ' == (u_int8_t)tmp) break; - printf("%c", (u_int8_t)tmp); + kprintf("%c", (u_int8_t)tmp); } - printf("\n"); + kprintf("\n"); /* Attach to OS's managers */ ether_ifattach(ifp, sc->sc_macaddr, NULL); diff --git a/sys/dev/netif/txp/if_txp.c b/sys/dev/netif/txp/if_txp.c index a8bcd327dc..5170a9121f 100644 --- a/sys/dev/netif/txp/if_txp.c +++ b/sys/dev/netif/txp/if_txp.c @@ -1,6 +1,6 @@ /* $OpenBSD: if_txp.c,v 1.48 2001/06/27 06:34:50 kjc Exp $ */ /* $FreeBSD: src/sys/dev/txp/if_txp.c,v 1.4.2.4 2001/12/14 19:50:43 jlemon Exp $ */ -/* $DragonFly: src/sys/dev/netif/txp/if_txp.c,v 1.40 2006/10/25 20:55:59 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/txp/if_txp.c,v 1.41 2006/12/22 23:26:22 swildner Exp $ */ /* * Copyright (c) 2001 @@ -1617,30 +1617,30 @@ txp_show_descriptor(void *d) switch (cmd->cmd_flags & CMD_FLAGS_TYPE_M) { case CMD_FLAGS_TYPE_CMD: /* command descriptor */ - printf("[cmd flags 0x%x num %d id %d seq %d par1 0x%x par2 0x%x par3 0x%x]\n", + kprintf("[cmd flags 0x%x num %d id %d seq %d par1 0x%x par2 0x%x par3 0x%x]\n", cmd->cmd_flags, cmd->cmd_numdesc, cmd->cmd_id, cmd->cmd_seq, cmd->cmd_par1, cmd->cmd_par2, cmd->cmd_par3); break; case CMD_FLAGS_TYPE_RESP: /* response descriptor */ - printf("[rsp flags 0x%x num %d id %d seq %d par1 0x%x par2 0x%x par3 0x%x]\n", + kprintf("[rsp flags 0x%x num %d id %d seq %d par1 0x%x par2 0x%x par3 0x%x]\n", rsp->rsp_flags, rsp->rsp_numdesc, rsp->rsp_id, rsp->rsp_seq, rsp->rsp_par1, rsp->rsp_par2, rsp->rsp_par3); break; case CMD_FLAGS_TYPE_DATA: /* data header (assuming tx for now) */ - printf("[data flags 0x%x num %d totlen %d addr 0x%x/0x%x pflags 0x%x]", + kprintf("[data flags 0x%x num %d totlen %d addr 0x%x/0x%x pflags 0x%x]", txd->tx_flags, txd->tx_numdesc, txd->tx_totlen, txd->tx_addrlo, txd->tx_addrhi, txd->tx_pflags); break; case CMD_FLAGS_TYPE_FRAG: /* fragment descriptor */ - printf("[frag flags 0x%x rsvd1 0x%x len %d addr 0x%x/0x%x rsvd2 0x%x]", + kprintf("[frag flags 0x%x rsvd1 0x%x len %d addr 0x%x/0x%x rsvd2 0x%x]", frgd->frag_flags, frgd->frag_rsvd1, frgd->frag_len, frgd->frag_addrlo, frgd->frag_addrhi, frgd->frag_rsvd2); break; default: - printf("[unknown(%x) flags 0x%x num %d id %d seq %d par1 0x%x par2 0x%x par3 0x%x]\n", + kprintf("[unknown(%x) flags 0x%x num %d id %d seq %d par1 0x%x par2 0x%x par3 0x%x]\n", cmd->cmd_flags & CMD_FLAGS_TYPE_M, cmd->cmd_flags, cmd->cmd_numdesc, cmd->cmd_id, cmd->cmd_seq, cmd->cmd_par1, cmd->cmd_par2, cmd->cmd_par3); diff --git a/sys/dev/netif/ural/if_ural.c b/sys/dev/netif/ural/if_ural.c index 130bcd139b..d2710ba60a 100644 --- a/sys/dev/netif/ural/if_ural.c +++ b/sys/dev/netif/ural/if_ural.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/usb/if_ural.c,v 1.10.2.8 2006/07/08 07:48:43 maxim Exp $ */ -/* $DragonFly: src/sys/dev/netif/ural/if_ural.c,v 1.2 2006/12/10 04:37:02 sephe Exp $ */ +/* $DragonFly: src/sys/dev/netif/ural/if_ural.c,v 1.3 2006/12/22 23:26:22 swildner Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -366,7 +366,7 @@ USB_ATTACH(ural) USB_ATTACH_SETUP; if (usbd_set_config_no(sc->sc_udev, RAL_CONFIG_NO, 0) != 0) { - printf("%s: could not set configuration no\n", + kprintf("%s: could not set configuration no\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -375,7 +375,7 @@ USB_ATTACH(ural) error = usbd_device2interface_handle(sc->sc_udev, RAL_IFACE_INDEX, &sc->sc_iface); if (error != 0) { - printf("%s: could not get interface handle\n", + kprintf("%s: could not get interface handle\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -389,7 +389,7 @@ USB_ATTACH(ural) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", + kprintf("%s: no endpoint descriptor for %d\n", USBDEVNAME(sc->sc_dev), i); USB_ATTACH_ERROR_RETURN; } @@ -402,7 +402,7 @@ USB_ATTACH(ural) sc->sc_tx_no = ed->bEndpointAddress; } if (sc->sc_rx_no == -1 || sc->sc_tx_no == -1) { - printf("%s: missing endpoint\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: missing endpoint\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -421,7 +421,7 @@ USB_ATTACH(ural) /* retrieve MAC address and various other things from EEPROM */ ural_read_eeprom(sc); - printf("%s: MAC/BBP RT2570 (rev 0x%02x), RF %s\n", + kprintf("%s: MAC/BBP RT2570 (rev 0x%02x), RF %s\n", USBDEVNAME(sc->sc_dev), sc->asic_rev, ural_get_rf(sc->rf_rev)); ifp = &ic->ic_if; @@ -582,7 +582,7 @@ ural_alloc_tx_list(struct ural_softc *sc) data->xfer = usbd_alloc_xfer(sc->sc_udev); if (data->xfer == NULL) { - printf("%s: could not allocate tx xfer\n", + kprintf("%s: could not allocate tx xfer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -591,7 +591,7 @@ ural_alloc_tx_list(struct ural_softc *sc) data->buf = usbd_alloc_buffer(data->xfer, RAL_TX_DESC_SIZE + MCLBYTES); if (data->buf == NULL) { - printf("%s: could not allocate tx buffer\n", + kprintf("%s: could not allocate tx buffer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -638,14 +638,14 @@ ural_alloc_rx_list(struct ural_softc *sc) data->xfer = usbd_alloc_xfer(sc->sc_udev); if (data->xfer == NULL) { - printf("%s: could not allocate rx xfer\n", + kprintf("%s: could not allocate rx xfer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; } if (usbd_alloc_buffer(data->xfer, MCLBYTES) == NULL) { - printf("%s: could not allocate rx buffer\n", + kprintf("%s: could not allocate rx buffer\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -653,7 +653,7 @@ ural_alloc_rx_list(struct ural_softc *sc) data->m = m_getcl(MB_DONTWAIT, MT_DATA, M_PKTHDR); if (data->m == NULL) { - printf("%s: could not allocate rx mbuf\n", + kprintf("%s: could not allocate rx mbuf\n", USBDEVNAME(sc->sc_dev)); error = ENOMEM; goto fail; @@ -782,13 +782,13 @@ ural_task(void *arg) ic->ic_opmode == IEEE80211_M_IBSS) { m = ieee80211_beacon_alloc(ic, ni, &sc->sc_bo); if (m == NULL) { - printf("%s: could not allocate beacon\n", + kprintf("%s: could not allocate beacon\n", USBDEVNAME(sc->sc_dev)); return; } if (ural_tx_bcn(sc, m, ni) != 0) { - printf("%s: could not send beacon\n", + kprintf("%s: could not send beacon\n", USBDEVNAME(sc->sc_dev)); return; } @@ -896,7 +896,7 @@ ural_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; - printf("%s: could not transmit buffer: %s\n", + kprintf("%s: could not transmit buffer: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(status)); if (status == USBD_STALLED) @@ -1534,7 +1534,7 @@ ural_set_testmode(struct ural_softc *sc) error = usbd_do_request(sc->sc_udev, &req, NULL); if (error != 0) { - printf("%s: could not set test mode: %s\n", + kprintf("%s: could not set test mode: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1553,7 +1553,7 @@ ural_eeprom_read(struct ural_softc *sc, uint16_t addr, void *buf, int len) error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { - printf("%s: could not read EEPROM: %s\n", + kprintf("%s: could not read EEPROM: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1573,7 +1573,7 @@ ural_read(struct ural_softc *sc, uint16_t reg) error = usbd_do_request(sc->sc_udev, &req, &val); if (error != 0) { - printf("%s: could not read MAC register: %s\n", + kprintf("%s: could not read MAC register: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); return 0; } @@ -1595,7 +1595,7 @@ ural_read_multi(struct ural_softc *sc, uint16_t reg, void *buf, int len) error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { - printf("%s: could not read MAC register: %s\n", + kprintf("%s: could not read MAC register: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1614,7 +1614,7 @@ ural_write(struct ural_softc *sc, uint16_t reg, uint16_t val) error = usbd_do_request(sc->sc_udev, &req, NULL); if (error != 0) { - printf("%s: could not write MAC register: %s\n", + kprintf("%s: could not write MAC register: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1633,7 +1633,7 @@ ural_write_multi(struct ural_softc *sc, uint16_t reg, void *buf, int len) error = usbd_do_request(sc->sc_udev, &req, buf); if (error != 0) { - printf("%s: could not write MAC register: %s\n", + kprintf("%s: could not write MAC register: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); } } @@ -1649,7 +1649,7 @@ ural_bbp_write(struct ural_softc *sc, uint8_t reg, uint8_t val) break; } if (ntries == 5) { - printf("%s: could not write to BBP\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not write to BBP\n", USBDEVNAME(sc->sc_dev)); return; } @@ -1671,7 +1671,7 @@ ural_bbp_read(struct ural_softc *sc, uint8_t reg) break; } if (ntries == 5) { - printf("%s: could not read BBP\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not read BBP\n", USBDEVNAME(sc->sc_dev)); return 0; } @@ -1689,7 +1689,7 @@ ural_rf_write(struct ural_softc *sc, uint8_t reg, uint32_t val) break; } if (ntries == 5) { - printf("%s: could not write to RF\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: could not write to RF\n", USBDEVNAME(sc->sc_dev)); return; } @@ -2129,7 +2129,7 @@ ural_init(void *priv) DELAY(1000); } if (ntries == 100) { - printf("%s: timeout waiting for BBP/RF to wakeup\n", + kprintf("%s: timeout waiting for BBP/RF to wakeup\n", USBDEVNAME(sc->sc_dev)); goto fail; } @@ -2169,7 +2169,7 @@ ural_init(void *priv) */ sc->stats_xfer = usbd_alloc_xfer(sc->sc_udev); if (sc->stats_xfer == NULL) { - printf("%s: could not allocate AMRR xfer\n", + kprintf("%s: could not allocate AMRR xfer\n", USBDEVNAME(sc->sc_dev)); goto fail; } @@ -2180,7 +2180,7 @@ ural_init(void *priv) error = usbd_open_pipe(sc->sc_iface, sc->sc_tx_no, USBD_EXCLUSIVE_USE, &sc->sc_tx_pipeh); if (error != 0) { - printf("%s: could not open Tx pipe: %s\n", + kprintf("%s: could not open Tx pipe: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); goto fail; } @@ -2188,7 +2188,7 @@ ural_init(void *priv) error = usbd_open_pipe(sc->sc_iface, sc->sc_rx_no, USBD_EXCLUSIVE_USE, &sc->sc_rx_pipeh); if (error != 0) { - printf("%s: could not open Rx pipe: %s\n", + kprintf("%s: could not open Rx pipe: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(error)); goto fail; } @@ -2198,14 +2198,14 @@ ural_init(void *priv) */ error = ural_alloc_tx_list(sc); if (error != 0) { - printf("%s: could not allocate Tx list\n", + kprintf("%s: could not allocate Tx list\n", USBDEVNAME(sc->sc_dev)); goto fail; } error = ural_alloc_rx_list(sc); if (error != 0) { - printf("%s: could not allocate Rx list\n", + kprintf("%s: could not allocate Rx list\n", USBDEVNAME(sc->sc_dev)); goto fail; } diff --git a/sys/dev/netif/vr/if_vr.c b/sys/dev/netif/vr/if_vr.c index fb40b71e4e..e740d9268c 100644 --- a/sys/dev/netif/vr/if_vr.c +++ b/sys/dev/netif/vr/if_vr.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_vr.c,v 1.26.2.13 2003/02/06 04:46:20 silby Exp $ - * $DragonFly: src/sys/dev/netif/vr/if_vr.c,v 1.43 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/vr/if_vr.c,v 1.44 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -974,20 +974,20 @@ vr_rxeof(struct vr_softc *sc) ifp->if_ierrors++; if_printf(ifp, "rx error (%02x):", rxstat & 0x000000ff); if (rxstat & VR_RXSTAT_CRCERR) - printf(" crc error"); + kprintf(" crc error"); if (rxstat & VR_RXSTAT_FRAMEALIGNERR) - printf(" frame alignment error\n"); + kprintf(" frame alignment error\n"); if (rxstat & VR_RXSTAT_FIFOOFLOW) - printf(" FIFO overflow"); + kprintf(" FIFO overflow"); if (rxstat & VR_RXSTAT_GIANT) - printf(" received giant packet"); + kprintf(" received giant packet"); if (rxstat & VR_RXSTAT_RUNT) - printf(" received runt packet"); + kprintf(" received runt packet"); if (rxstat & VR_RXSTAT_BUSERR) - printf(" system bus error"); + kprintf(" system bus error"); if (rxstat & VR_RXSTAT_BUFFERR) - printf("rx buffer error"); - printf("\n"); + kprintf("rx buffer error"); + kprintf("\n"); vr_newbuf(sc, cur_rx, m); continue; } @@ -1210,12 +1210,12 @@ vr_intr(void *arg) (status & VR_ISR_RX_NOBUF) || (status & VR_ISR_RX_OFLOW)) { if_printf(ifp, "receive error (%04x)", status); if (status & VR_ISR_RX_NOBUF) - printf(" no buffers"); + kprintf(" no buffers"); if (status & VR_ISR_RX_OFLOW) - printf(" overflow"); + kprintf(" overflow"); if (status & VR_ISR_RX_DROPPED) - printf(" packet lost"); - printf("\n"); + kprintf(" packet lost"); + kprintf("\n"); vr_rxeoc(sc); } diff --git a/sys/dev/netif/vx/if_vx.c b/sys/dev/netif/vx/if_vx.c index e618d003fa..16e367a792 100644 --- a/sys/dev/netif/vx/if_vx.c +++ b/sys/dev/netif/vx/if_vx.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/vx/if_vx.c,v 1.25.2.6 2002/02/13 00:43:10 dillon Exp $ - * $DragonFly: src/sys/dev/netif/vx/if_vx.c,v 1.27 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/vx/if_vx.c,v 1.28 2006/12/22 23:26:22 swildner Exp $ * */ @@ -255,7 +255,7 @@ vxgetlink(struct vx_softc *sc) if (n == 0) if_printf(&sc->arpcom.ac_if, "%s", conn_tab[k].name); else - printf("/%s", conn_tab[k].name); + kprintf("/%s", conn_tab[k].name); n++; } } @@ -269,10 +269,10 @@ vxgetlink(struct vx_softc *sc) >> INTERNAL_CONNECTOR_BITS; if (sc->vx_connector & 0x10) { sc->vx_connector &= 0x0f; - printf("[*%s*]", conn_tab[(int)sc->vx_connector].name); - printf(": disable 'auto select' with DOS util!\n"); + kprintf("[*%s*]", conn_tab[(int)sc->vx_connector].name); + kprintf(": disable 'auto select' with DOS util!\n"); } else { - printf("[*%s*]\n", conn_tab[(int)sc->vx_connector].name); + kprintf("[*%s*]\n", conn_tab[(int)sc->vx_connector].name); } } diff --git a/sys/dev/netif/vx/if_vx_pci.c b/sys/dev/netif/vx/if_vx_pci.c index 585097ff1d..0558e66090 100644 --- a/sys/dev/netif/vx/if_vx_pci.c +++ b/sys/dev/netif/vx/if_vx_pci.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/vx/if_vx_pci.c,v 1.21 2000/05/28 15:59:52 peter Exp $ - * $DragonFly: src/sys/dev/netif/vx/if_vx_pci.c,v 1.14 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/vx/if_vx_pci.c,v 1.15 2006/12/22 23:26:22 swildner Exp $ */ #include @@ -168,7 +168,7 @@ vx_pci_attach(device_t dev) if (vxbusyeeprom(sc)) goto bad; if (!(CSR_READ_2(sc, VX_W0_EEPROM_DATA) & NO_RX_OVN_ANOMALY)) { - printf("Warning! Defective early revision adapter!\n"); + kprintf("Warning! Defective early revision adapter!\n"); } } diff --git a/sys/dev/netif/wi/if_wi.c b/sys/dev/netif/wi/if_wi.c index f3e8e335fe..8770cbc293 100644 --- a/sys/dev/netif/wi/if_wi.c +++ b/sys/dev/netif/wi/if_wi.c @@ -32,7 +32,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/wi/if_wi.c,v 1.180.2.7 2005/10/05 13:16:29 avatar Exp $ - * $DragonFly: src/sys/dev/netif/wi/if_wi.c,v 1.38 2006/10/25 20:55:59 dillon Exp $ + * $DragonFly: src/sys/dev/netif/wi/if_wi.c,v 1.39 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -181,7 +181,7 @@ SYSCTL_INT(_hw_wi, OID_AUTO, txerate, CTLFLAG_RW, &wi_txerate, #ifdef WI_DEBUG static int wi_debug = 0; SYSCTL_INT(_hw_wi, OID_AUTO, debug, CTLFLAG_RW, &wi_debug, - 0, "control debugging printfs"); + 0, "control debugging kprintfs"); #define DPRINTF(X) if (wi_debug) if_printf X #define DPRINTF2(X) if (wi_debug > 1) if_printf X @@ -1536,18 +1536,18 @@ wi_tx_ex_intr(struct wi_softc *sc) if (ppsratecheck(&lasttxerror, &curtxeps, wi_txerate)) { if_printf(ifp, "tx failed"); if (status & WI_TXSTAT_RET_ERR) - printf(", retry limit exceeded"); + kprintf(", retry limit exceeded"); if (status & WI_TXSTAT_AGED_ERR) - printf(", max transmit lifetime exceeded"); + kprintf(", max transmit lifetime exceeded"); if (status & WI_TXSTAT_DISCONNECT) - printf(", port disconnected"); + kprintf(", port disconnected"); if (status & WI_TXSTAT_FORM_ERR) - printf(", invalid format (data len %u src %6D)", + kprintf(", invalid format (data len %u src %6D)", le16toh(frmhdr.wi_dat_len), frmhdr.wi_ehdr.ether_shost, ":"); if (status & ~0xf) - printf(", status=0x%x", status); - printf("\n"); + kprintf(", status=0x%x", status); + kprintf("\n"); } ifp->if_oerrors++; } else { @@ -1722,17 +1722,17 @@ wi_read_nicid(struct wi_softc *sc) sc->sc_firmware_type = WI_NOTYPE; for (id = wi_card_ident; id->card_name != NULL; id++) { if (le16toh(ver[0]) == id->card_id) { - printf("%s", id->card_name); + kprintf("%s", id->card_name); sc->sc_firmware_type = id->firm_type; break; } } if (sc->sc_firmware_type == WI_NOTYPE) { if (le16toh(ver[0]) & 0x8000) { - printf("Unknown PRISM2 chip"); + kprintf("Unknown PRISM2 chip"); sc->sc_firmware_type = WI_INTERSIL; } else { - printf("Unknown Lucent chip"); + kprintf("Unknown Lucent chip"); sc->sc_firmware_type = WI_LUCENT; } } @@ -1768,16 +1768,16 @@ wi_read_nicid(struct wi_softc *sc) (p[6] - '0') * 10 + (p[7] - '0'); } } - printf("\n"); + kprintf("\n"); if_printf(&sc->sc_ic.ic_if, "%s Firmware: ", sc->sc_firmware_type == WI_LUCENT ? "Lucent" : (sc->sc_firmware_type == WI_SYMBOL ? "Symbol" : "Intersil")); if (sc->sc_firmware_type != WI_LUCENT) /* XXX */ - printf("Primary (%u.%u.%u), ", + kprintf("Primary (%u.%u.%u), ", sc->sc_pri_firmware_ver / 10000, (sc->sc_pri_firmware_ver % 10000) / 100, sc->sc_pri_firmware_ver % 100); - printf("Station (%u.%u.%u)\n", + kprintf("Station (%u.%u.%u)\n", sc->sc_sta_firmware_ver / 10000, (sc->sc_sta_firmware_ver % 10000) / 100, sc->sc_sta_firmware_ver % 100); @@ -2819,15 +2819,15 @@ wi_dump_pkt(struct wi_frame *wh, struct ieee80211_node *ni, int rssi) { ieee80211_dump_pkt((u_int8_t *) &wh->wi_whdr, sizeof(wh->wi_whdr), ni ? ni->ni_rates.rs_rates[ni->ni_txrate] & IEEE80211_RATE_VAL : -1, rssi); - printf(" status 0x%x rx_tstamp1 %u rx_tstamp0 0x%u rx_silence %u\n", + kprintf(" status 0x%x rx_tstamp1 %u rx_tstamp0 0x%u rx_silence %u\n", le16toh(wh->wi_status), le16toh(wh->wi_rx_tstamp1), le16toh(wh->wi_rx_tstamp0), wh->wi_rx_silence); - printf(" rx_signal %u rx_rate %u rx_flow %u\n", + kprintf(" rx_signal %u rx_rate %u rx_flow %u\n", wh->wi_rx_signal, wh->wi_rx_rate, wh->wi_rx_flow); - printf(" tx_rtry %u tx_rate %u tx_ctl 0x%x dat_len %u\n", + kprintf(" tx_rtry %u tx_rate %u tx_ctl 0x%x dat_len %u\n", wh->wi_tx_rtry, wh->wi_tx_rate, le16toh(wh->wi_tx_ctl), le16toh(wh->wi_dat_len)); - printf(" ehdr dst %6D src %6D type 0x%x\n", + kprintf(" ehdr dst %6D src %6D type 0x%x\n", wh->wi_ehdr.ether_dhost, ":", wh->wi_ehdr.ether_shost, ":", wh->wi_ehdr.ether_type); } diff --git a/sys/dev/netif/wl/if_wl.c b/sys/dev/netif/wl/if_wl.c index ac4bef68c2..aca643ae72 100644 --- a/sys/dev/netif/wl/if_wl.c +++ b/sys/dev/netif/wl/if_wl.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/i386/isa/if_wl.c,v 1.27.2.2 2000/07/17 21:24:32 archie Exp $ */ -/* $DragonFly: src/sys/dev/netif/wl/if_wl.c,v 1.29 2006/10/25 20:56:00 dillon Exp $ */ +/* $DragonFly: src/sys/dev/netif/wl/if_wl.c,v 1.30 2006/12/22 23:26:22 swildner Exp $ */ /* * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -547,8 +547,8 @@ wlattach(device_t dev) ether_ifattach(ifp, sc->wl_ac.ac_enaddr, NULL); if (sc->freq24) - printf(", Freq %d MHz",sc->freq24); /* 2.4 Gz */ - printf("\n"); /* 2.4 Gz */ + kprintf(", Freq %d MHz",sc->freq24); /* 2.4 Gz */ + kprintf("\n"); /* 2.4 Gz */ error = bus_setup_intr(dev, sc->res_irq, INTR_NETSAFE, wlintr, sc, &sc->intr_handle, @@ -649,20 +649,20 @@ wldump(struct wl_softc *sc) if_printf(&sc->wl_if, "scb at %04x:\n ", OFFSET_SCB); outw(PIOR1(base), OFFSET_SCB); for(i = 0; i < 8; i++) - printf("%04x ", inw(PIOP1(base))); - printf("\n"); + kprintf("%04x ", inw(PIOP1(base))); + kprintf("\n"); if_printf(&sc->wl_if, "cu at %04x:\n ", OFFSET_CU); outw(PIOR1(base), OFFSET_CU); for(i = 0; i < 8; i++) - printf("%04x ", inw(PIOP1(base))); - printf("\n"); + kprintf("%04x ", inw(PIOP1(base))); + kprintf("\n"); if_printf(&sc->wl_if, "tbd at %04x:\n ", OFFSET_TBD); outw(PIOR1(base), OFFSET_TBD); for(i = 0; i < 4; i++) - printf("%04x ", inw(PIOP1(base))); - printf("\n"); + kprintf("%04x ", inw(PIOP1(base))); + kprintf("\n"); } /* Initialize the Modem Management Controller */ @@ -1287,7 +1287,7 @@ wlioctl(struct ifnet *ifp, u_long cmd, caddr_t data, struct ucred *cred) wlinit(sc); } - /* if WLDEBUG set on interface, then printf rf-modem regs + /* if WLDEBUG set on interface, then kprintf rf-modem regs */ if(ifp->if_flags & IFF_DEBUG) wlmmcstat(sc); @@ -1817,7 +1817,7 @@ wlxmt(struct wl_softc *sc, struct mbuf *m) if (sc->wl_if.if_flags & IFF_DEBUG) { if (xmt_debug) { if_printf(&sc->wl_if, "XMT mbuf: L%d @%p ", count, (void *)mb_p); - printf("ether type %x\n", eh_p->ether_type); + kprintf("ether type %x\n", eh_p->ether_type); } } #endif /* WLDEBUG */ @@ -1896,7 +1896,7 @@ wlxmt(struct wl_softc *sc, struct mbuf *m) if (sc->wl_if.if_flags & IFF_DEBUG) { if (xmt_debug) { wltbd(sc); - printf("\n"); + kprintf("\n"); } } #endif /* WLDEBUG */ @@ -2171,7 +2171,7 @@ wlconfig(struct wl_softc *sc) ((lo << 8) & 0xff00)); /* #define MCASTDEBUG */ #ifdef MCASTDEBUG -printf("mcast_addr[%d,%d,%d] %x %x %x %x %x %x\n", lo, hi, cnt, +kprintf("mcast_addr[%d,%d,%d] %x %x %x %x %x %x\n", lo, hi, cnt, enm->enm_addrlo[0], enm->enm_addrlo[1], enm->enm_addrlo[2], @@ -2231,13 +2231,13 @@ wlcmd(struct wl_softc *sc, const char *str) str, inw(PIOP0(base)) & AC_SW_OK, inw(PIOP0(base)), inw(PIOR0(base))); outw(PIOR0(base), OFFSET_SCB); - printf("scb_status %x\n", inw(PIOP0(base))); + kprintf("scb_status %x\n", inw(PIOP0(base))); outw(PIOR0(base), OFFSET_SCB+2); - printf("scb_command %x\n", inw(PIOP0(base))); + kprintf("scb_command %x\n", inw(PIOP0(base))); outw(PIOR0(base), OFFSET_SCB+4); - printf("scb_cbl %x\n", inw(PIOP0(base))); + kprintf("scb_cbl %x\n", inw(PIOP0(base))); outw(PIOR0(base), OFFSET_CU+2); - printf("cu_cmd %x\n", inw(PIOP0(base))); + kprintf("cu_cmd %x\n", inw(PIOP0(base))); return(0); } @@ -2295,7 +2295,7 @@ wltbd(struct wl_softc *sc) outw(PIOR1(base), tbd_p); insw(PIOP1(base), &tbd, sizeof(tbd_t)/2); sum += (tbd.act_count & ~TBD_SW_EOF); - printf("%d: addr %x, count %d (%d), next %x, base %x\n", + kprintf("%d: addr %x, count %d (%d), next %x, base %x\n", i++, tbd.buffer_addr, (tbd.act_count & ~TBD_SW_EOF), sum, tbd.next_tbd_offset, tbd.buffer_base); @@ -2383,15 +2383,15 @@ wlmmcstat(struct wl_softc *sc) wlmmcread(base,MMC_DCE_STATUS) & 0x0f); tmp = wlmmcread(base,MMC_CORRECT_NWID_H) << 8; tmp |= wlmmcread(base,MMC_CORRECT_NWID_L); - printf("Correct NWID's: %d, ", tmp); + kprintf("Correct NWID's: %d, ", tmp); tmp = wlmmcread(base,MMC_WRONG_NWID_H) << 8; tmp |= wlmmcread(base,MMC_WRONG_NWID_L); - printf("Wrong NWID's: %d\n", tmp); - printf("THR_PRE_SET: 0x%x, ", wlmmcread(base,MMC_THR_PRE_SET)); - printf("SIGNAL_LVL: %d, SILENCE_LVL: %d\n", + kprintf("Wrong NWID's: %d\n", tmp); + kprintf("THR_PRE_SET: 0x%x, ", wlmmcread(base,MMC_THR_PRE_SET)); + kprintf("SIGNAL_LVL: %d, SILENCE_LVL: %d\n", wlmmcread(base,MMC_SIGNAL_LVL), wlmmcread(base,MMC_SILENCE_LVL)); - printf("SIGN_QUAL: 0x%x, NETW_ID: %x:%x, DES: %d\n", + kprintf("SIGN_QUAL: 0x%x, NETW_ID: %x:%x, DES: %d\n", wlmmcread(base,MMC_SIGN_QUAL), wlmmcread(base,MMC_NETW_ID_H), wlmmcread(base,MMC_NETW_ID_L), @@ -2707,10 +2707,10 @@ check_allmulti(struct wl_softc *sc) while (enm != NULL) { unsigned int lo, hi; #ifdef MDEBUG - printf("enm_addrlo %x:%x:%x:%x:%x:%x\n", enm->enm_addrlo[0], enm->enm_addrlo[1], + kprintf("enm_addrlo %x:%x:%x:%x:%x:%x\n", enm->enm_addrlo[0], enm->enm_addrlo[1], enm->enm_addrlo[2], enm->enm_addrlo[3], enm->enm_addrlo[4], enm->enm_addrlo[5]); - printf("enm_addrhi %x:%x:%x:%x:%x:%x\n", enm->enm_addrhi[0], enm->enm_addrhi[1], + kprintf("enm_addrhi %x:%x:%x:%x:%x:%x\n", enm->enm_addrhi[0], enm->enm_addrhi[1], enm->enm_addrhi[2], enm->enm_addrhi[3], enm->enm_addrhi[4], enm->enm_addrhi[5]); #endif diff --git a/sys/dev/netif/xe/if_xe.c b/sys/dev/netif/xe/if_xe.c index d7adf0ee51..b0647771d7 100644 --- a/sys/dev/netif/xe/if_xe.c +++ b/sys/dev/netif/xe/if_xe.c @@ -25,7 +25,7 @@ * * $Id: if_xe.c,v 1.20 1999/06/13 19:17:40 scott Exp $ * $FreeBSD: src/sys/dev/xe/if_xe.c,v 1.39 2003/10/14 22:51:35 rsm Exp $ - * $DragonFly: src/sys/dev/netif/xe/if_xe.c,v 1.33 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/netif/xe/if_xe.c,v 1.34 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -202,7 +202,7 @@ SYSCTL_NODE(_hw, OID_AUTO, xe, CTLFLAG_RD, 0, "xe parameters"); int xe_debug = 1; SYSCTL_INT(_hw_xe, OID_AUTO, debug, CTLFLAG_RW, &xe_debug, 0, "xe debug level"); -#define DPRINTF(level, arg) if (xe_debug >= (level)) printf arg +#define DPRINTF(level, arg) if (xe_debug >= (level)) kprintf arg #define IFPRINTF(level, arg) if (xe_debug >= (level)) if_printf arg #define DEVPRINTF(level, arg) if (xe_debug >= (level)) device_printf arg #define XE_MII_DUMP(scp) if (xe_debug >= 3) xe_mii_dump(scp) @@ -1849,12 +1849,12 @@ xe_mii_dump(struct xe_softc *scp) { if_printf(scp->ifp, "MII registers: "); for (i = 0; i < 2; i++) { - printf(" %d:%04x", i, xe_phy_readreg(scp, i)); + kprintf(" %d:%04x", i, xe_phy_readreg(scp, i)); } for (i = 4; i < 7; i++) { - printf(" %d:%04x", i, xe_phy_readreg(scp, i)); + kprintf(" %d:%04x", i, xe_phy_readreg(scp, i)); } - printf("\n"); + kprintf("\n"); crit_exit(); } @@ -1867,17 +1867,17 @@ xe_reg_dump(struct xe_softc *scp) { if_printf(scp->ifp, "Common registers: "); for (i = 0; i < 8; i++) { - printf(" %2.2x", XE_INB(i)); + kprintf(" %2.2x", XE_INB(i)); } - printf("\n"); + kprintf("\n"); for (page = 0; page <= 8; page++) { if_printf(scp->ifp, "Register page %2.2x: ", page); XE_SELECT_PAGE(page); for (i = 8; i < 16; i++) { - printf(" %2.2x", XE_INB(i)); + kprintf(" %2.2x", XE_INB(i)); } - printf("\n"); + kprintf("\n"); } for (page = 0x10; page < 0x5f; page++) { @@ -1889,9 +1889,9 @@ xe_reg_dump(struct xe_softc *scp) { if_printf(scp->ifp, "Register page %2.2x: ", page); XE_SELECT_PAGE(page); for (i = 8; i < 16; i++) { - printf(" %2.2x", XE_INB(i)); + kprintf(" %2.2x", XE_INB(i)); } - printf("\n"); + kprintf("\n"); } crit_exit(); diff --git a/sys/dev/netif/xl/if_xl.c b/sys/dev/netif/xl/if_xl.c index a7a134248a..aaef05c394 100644 --- a/sys/dev/netif/xl/if_xl.c +++ b/sys/dev/netif/xl/if_xl.c @@ -30,7 +30,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/if_xl.c,v 1.72.2.28 2003/10/08 06:01:57 murray Exp $ - * $DragonFly: src/sys/dev/netif/xl/if_xl.c,v 1.46 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/netif/xl/if_xl.c,v 1.47 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -927,7 +927,7 @@ xl_setmode(struct xl_softc *sc, int media) if (sc->xl_media & XL_MEDIAOPT_BT) { if (IFM_SUBTYPE(media) == IFM_10_T) { - printf("10baseT transceiver, "); + kprintf("10baseT transceiver, "); sc->xl_xcvr = XL_XCVR_10BT; icfg &= ~XL_ICFG_CONNECTOR_MASK; icfg |= (XL_XCVR_10BT << XL_ICFG_CONNECTOR_BITS); @@ -939,7 +939,7 @@ xl_setmode(struct xl_softc *sc, int media) if (sc->xl_media & XL_MEDIAOPT_BFX) { if (IFM_SUBTYPE(media) == IFM_100_FX) { - printf("100baseFX port, "); + kprintf("100baseFX port, "); sc->xl_xcvr = XL_XCVR_100BFX; icfg &= ~XL_ICFG_CONNECTOR_MASK; icfg |= (XL_XCVR_100BFX << XL_ICFG_CONNECTOR_BITS); @@ -950,7 +950,7 @@ xl_setmode(struct xl_softc *sc, int media) if (sc->xl_media & (XL_MEDIAOPT_AUI|XL_MEDIAOPT_10FL)) { if (IFM_SUBTYPE(media) == IFM_10_5) { - printf("AUI port, "); + kprintf("AUI port, "); sc->xl_xcvr = XL_XCVR_AUI; icfg &= ~XL_ICFG_CONNECTOR_MASK; icfg |= (XL_XCVR_AUI << XL_ICFG_CONNECTOR_BITS); @@ -959,7 +959,7 @@ xl_setmode(struct xl_softc *sc, int media) mediastat |= ~XL_MEDIASTAT_SQEENB; } if (IFM_SUBTYPE(media) == IFM_10_FL) { - printf("10baseFL transceiver, "); + kprintf("10baseFL transceiver, "); sc->xl_xcvr = XL_XCVR_AUI; icfg &= ~XL_ICFG_CONNECTOR_MASK; icfg |= (XL_XCVR_AUI << XL_ICFG_CONNECTOR_BITS); @@ -971,7 +971,7 @@ xl_setmode(struct xl_softc *sc, int media) if (sc->xl_media & XL_MEDIAOPT_BNC) { if (IFM_SUBTYPE(media) == IFM_10_2) { - printf("BNC port, "); + kprintf("BNC port, "); sc->xl_xcvr = XL_XCVR_COAX; icfg &= ~XL_ICFG_CONNECTOR_MASK; icfg |= (XL_XCVR_COAX << XL_ICFG_CONNECTOR_BITS); @@ -983,11 +983,11 @@ xl_setmode(struct xl_softc *sc, int media) if ((media & IFM_GMASK) == IFM_FDX || IFM_SUBTYPE(media) == IFM_100_FX) { - printf("full duplex\n"); + kprintf("full duplex\n"); XL_SEL_WIN(3); CSR_WRITE_1(sc, XL_W3_MAC_CTRL, XL_MACCTRL_DUPLEX); } else { - printf("half duplex\n"); + kprintf("half duplex\n"); XL_SEL_WIN(3); CSR_WRITE_1(sc, XL_W3_MAC_CTRL, (CSR_READ_1(sc, XL_W3_MAC_CTRL) & ~XL_MACCTRL_DUPLEX)); diff --git a/sys/dev/pccard/cardbus/cardbus.c b/sys/dev/pccard/cardbus/cardbus.c index a618c107c1..03e087b887 100644 --- a/sys/dev/pccard/cardbus/cardbus.c +++ b/sys/dev/pccard/cardbus/cardbus.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/cardbus/cardbus.c,v 1.28 2002/11/27 17:30:41 imp Exp $ - * $DragonFly: src/sys/dev/pccard/cardbus/cardbus.c,v 1.9 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/pccard/cardbus/cardbus.c,v 1.10 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -74,7 +74,7 @@ SYSCTL_INT(_hw_cardbus, OID_AUTO, cis_debug, CTLFLAG_RW, &cardbus_cis_debug, 0, "CardBus CIS debug"); -#define DPRINTF(a) if (cardbus_debug) printf a +#define DPRINTF(a) if (cardbus_debug) kprintf a #define DEVPRINTF(x) if (cardbus_debug) device_printf x @@ -362,7 +362,7 @@ cardbus_read_extcap(device_t cbdev, 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; } @@ -493,22 +493,22 @@ cardbus_print_verbose(struct cardbus_devinfo *dinfo) { pcicfgregs *cfg = &dinfo->pci.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("\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("\tcmdreg=0x%04x, statreg=0x%04x, " + 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), " + 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); if (cfg->intpin > 0) - printf("\tintpin=%c, irq=%d\n", + kprintf("\tintpin=%c, irq=%d\n", cfg->intpin + 'a' - 1, cfg->intline); } } @@ -846,14 +846,14 @@ cardbus_print_resources(struct resource_list *rl, const char *name, 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); } } @@ -879,9 +879,9 @@ cardbus_print_child(device_t cbdev, device_t child) retval += cardbus_print_resources(rl, "mem", SYS_RES_MEMORY, "%#lx"); retval += cardbus_print_resources(rl, "irq", SYS_RES_IRQ, "%ld"); if (device_get_flags(cbdev)) - retval += printf(" flags %#x", device_get_flags(cbdev)); + retval += kprintf(" flags %#x", device_get_flags(cbdev)); - 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(cbdev, child); @@ -898,12 +898,12 @@ cardbus_probe_nomatch(device_t cbdev, device_t child) dinfo = device_get_ivars(child); cfg = &dinfo->pci.cfg; device_printf(cbdev, ""); - printf(" (vendor=0x%04x, dev=0x%04x)", cfg->vendor, cfg->device); - printf(" at %d.%d", pci_get_slot(child), pci_get_function(child)); + kprintf(" (vendor=0x%04x, dev=0x%04x)", cfg->vendor, cfg->device); + 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; } diff --git a/sys/dev/pccard/cardbus/cardbus_cis.c b/sys/dev/pccard/cardbus/cardbus_cis.c index 97d31ff770..c2d61f1f45 100644 --- a/sys/dev/pccard/cardbus/cardbus_cis.c +++ b/sys/dev/pccard/cardbus/cardbus_cis.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/cardbus/cardbus_cis.c,v 1.27 2002/11/27 06:56:29 imp Exp $ - * $DragonFly: src/sys/dev/pccard/cardbus/cardbus_cis.c,v 1.4 2006/12/13 21:58:48 dillon Exp $ + * $DragonFly: src/sys/dev/pccard/cardbus/cardbus_cis.c,v 1.5 2006/12/22 23:26:22 swildner Exp $ */ /* @@ -52,7 +52,7 @@ extern int cardbus_cis_debug; -#define DPRINTF(a) if (cardbus_cis_debug) printf a +#define DPRINTF(a) if (cardbus_cis_debug) kprintf a #define DEVPRINTF(x) if (cardbus_cis_debug) device_printf x #define DECODE_PARAMS \ @@ -142,16 +142,16 @@ DECODE_PROTOTYPE(generic) int i; if (info) - printf("TUPLE: %s [%d]:", info->name, len); + kprintf("TUPLE: %s [%d]:", info->name, len); else - printf("TUPLE: Unknown(0x%02x) [%d]:", id, len); + kprintf("TUPLE: Unknown(0x%02x) [%d]:", id, len); for (i = 0; i < len; i++) { if (i % 0x10 == 0 && len > 0x10) - printf("\n 0x%02x:", i); - printf(" %02x", tupledata[i]); + kprintf("\n 0x%02x:", i); + kprintf(" %02x", tupledata[i]); } - printf("\n"); + kprintf("\n"); #endif return (0); } @@ -187,18 +187,18 @@ DECODE_PROTOTYPE(linktarget) #ifdef CARDBUS_DEBUG int i; - printf("TUPLE: %s [%d]:", info->name, len); + kprintf("TUPLE: %s [%d]:", info->name, len); for (i = 0; i < len; i++) { if (i % 0x10 == 0 && len > 0x10) - printf("\n 0x%02x:", i); - printf(" %02x", tupledata[i]); + kprintf("\n 0x%02x:", i); + kprintf(" %02x", tupledata[i]); } - printf("\n"); + kprintf("\n"); #endif if (len != 3 || tupledata[0] != 'C' || tupledata[1] != 'I' || tupledata[2] != 'S') { - printf("Invalid data for CIS Link Target!\n"); + kprintf("Invalid data for CIS Link Target!\n"); decode_tuple_generic(cbdev, child, id, len, tupledata, start, off, info); return (EINVAL); @@ -210,17 +210,17 @@ DECODE_PROTOTYPE(vers_1) { int i; - printf("Product version: %d.%d\n", tupledata[0], tupledata[1]); - printf("Product name: "); + kprintf("Product version: %d.%d\n", tupledata[0], tupledata[1]); + kprintf("Product name: "); for (i = 2; i < len; i++) { if (tupledata[i] == '\0') - printf(" | "); + kprintf(" | "); else if (tupledata[i] == 0xff) break; else - printf("%c", tupledata[i]); + kprintf("%c", tupledata[i]); } - printf("\n"); + kprintf("\n"); return (0); } @@ -230,19 +230,19 @@ DECODE_PROTOTYPE(funcid) int numnames = sizeof(funcnames) / sizeof(funcnames[0]); int i; - printf("Functions: "); + kprintf("Functions: "); for (i = 0; i < len; i++) { if (tupledata[i] < numnames) - printf("%s", funcnames[tupledata[i]]); + kprintf("%s", funcnames[tupledata[i]]); else - printf("Unknown(%d)", tupledata[i]); + kprintf("Unknown(%d)", tupledata[i]); if (i < len-1) - printf(", "); + kprintf(", "); } if (len > 0) dinfo->funcid = tupledata[0]; /* use first in list */ - printf("\n"); + kprintf("\n"); return (0); } @@ -251,10 +251,10 @@ DECODE_PROTOTYPE(manfid) struct cardbus_devinfo *dinfo = device_get_ivars(child); int i; - printf("Manufacturer ID: "); + kprintf("Manufacturer ID: "); for (i = 0; i < len; i++) - printf("%02x", tupledata[i]); - printf("\n"); + kprintf("%02x", tupledata[i]); + kprintf("\n"); if (len == 5) { dinfo->mfrid = tupledata[1] | (tupledata[2]<<8); @@ -268,10 +268,10 @@ DECODE_PROTOTYPE(funce) struct cardbus_devinfo *dinfo = device_get_ivars(child); int type, i; - printf("Function Extension: "); + kprintf("Function Extension: "); for (i = 0; i < len; i++) - printf("%02x", tupledata[i]); - printf("\n"); + kprintf("%02x", tupledata[i]); + kprintf("\n"); if (len < 2) /* too short */ return (0); type = tupledata[0]; /* XXX <32 always? */ @@ -332,7 +332,7 @@ DECODE_PROTOTYPE(bar) u_int32_t bar; if (len != 6) { - printf("*** ERROR *** BAR length not 6 (%d)\n", len); + kprintf("*** ERROR *** BAR length not 6 (%d)\n", len); return (EINVAL); } reg = *(u_int16_t*)tupledata; @@ -378,13 +378,13 @@ DECODE_PROTOTYPE(bar) DECODE_PROTOTYPE(unhandled) { - printf("TUPLE: %s [%d] is unhandled! Bailing...", info->name, len); + kprintf("TUPLE: %s [%d] is unhandled! Bailing...", info->name, len); return (-1); } DECODE_PROTOTYPE(end) { - printf("CIS reading done\n"); + kprintf("CIS reading done\n"); return (0); } diff --git a/sys/dev/pccard/exca/exca.c b/sys/dev/pccard/exca/exca.c index bbbeacb938..8efbea3575 100644 --- a/sys/dev/pccard/exca/exca.c +++ b/sys/dev/pccard/exca/exca.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/exca/exca.c,v 1.6 2002/10/07 06:18:50 imp Exp $ */ -/* $DragonFly: src/sys/dev/pccard/exca/exca.c,v 1.2 2006/10/25 20:56:00 dillon Exp $ */ +/* $DragonFly: src/sys/dev/pccard/exca/exca.c,v 1.3 2006/12/22 23:26:22 swildner Exp $ */ /* * Copyright (c) 2002 M Warner Losh. All rights reserved. @@ -74,7 +74,7 @@ #ifdef EXCA_DEBUG #define DEVPRINTF(dev, fmt, args...) device_printf((dev), (fmt), ## args) -#define DPRINTF(fmt, args...) printf(fmt, ## args) +#define DPRINTF(fmt, args...) kprintf(fmt, ## args) #else #define DEVPRINTF(dev, fmt, args...) #define DPRINTF(fmt, args...) @@ -165,7 +165,7 @@ exca_do_mem_map(struct exca_softc *sc, int win) r5 = exca_read(sc, map->cardmem_msb); r6 = exca_read(sc, map->cardmem_lsb); r7 = exca_read(sc, map->sysmem_win); - printf("exca_do_mem_map window %d: %02x%02x %02x%02x " + kprintf("exca_do_mem_map window %d: %02x%02x %02x%02x " "%02x%02x %02x (%08x+%08x.%08x*%08lx)\n", win, r1, r2, r3, r4, r5, r6, r7, mem->addr, mem->size, mem->realsize, diff --git a/sys/dev/pccard/pccbb/pccbb.c b/sys/dev/pccard/pccbb/pccbb.c index 900fc81fe1..977dbe9d7d 100644 --- a/sys/dev/pccard/pccbb/pccbb.c +++ b/sys/dev/pccard/pccbb/pccbb.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pccbb/pccbb.c,v 1.64 2002/11/23 23:09:45 imp Exp $ - * $DragonFly: src/sys/dev/pccard/pccbb/pccbb.c,v 1.18 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/pccard/pccbb/pccbb.c,v 1.19 2006/12/22 23:26:23 swildner Exp $ */ /* @@ -105,7 +105,7 @@ #include "card_if.h" #include "pcib_if.h" -#define DPRINTF(x) do { if (cbb_debug) printf x; } while (0) +#define DPRINTF(x) do { if (cbb_debug) kprintf x; } while (0) #define DEVPRINTF(x) do { if (cbb_debug) device_printf x; } while (0) #define PCI_MASK_CONFIG(DEV,REG,MASK,SIZE) \ @@ -648,7 +648,7 @@ cbb_attach(device_t brdev) sc->irq_res = bus_alloc_resource(brdev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_SHAREABLE | RF_ACTIVE); if (sc->irq_res == NULL) { - printf("cbb: Unable to map IRQ...\n"); + kprintf("cbb: Unable to map IRQ...\n"); goto err; } @@ -1187,7 +1187,7 @@ cbb_power(device_t brdev, int volts) /* XXX should only reset EVENT_POWER */ cbb_set(sc, CBB_SOCKET_EVENT, sockevent); if (timeout < 0) { - printf ("VCC supply failed.\n"); + kprintf ("VCC supply failed.\n"); return (0); } @@ -1203,7 +1203,7 @@ cbb_power(device_t brdev, int volts) device_printf(sc->dev, "bad Vcc request. ctrl=0x%x, status=0x%x\n", sock_ctrl ,status); - printf("cbb_power: %s and %s [%x]\n", + kprintf("cbb_power: %s and %s [%x]\n", (volts & CARD_VCCMASK) == CARD_VCC_UC ? "CARD_VCC_UC" : (volts & CARD_VCCMASK) == CARD_VCC_5V ? "CARD_VCC_5V" : (volts & CARD_VCCMASK) == CARD_VCC_3V ? "CARD_VCC_3V" : @@ -1517,7 +1517,7 @@ cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type, res = BUS_ALLOC_RESOURCE(device_get_parent(brdev), child, type, rid, start, end, count, flags & ~RF_ACTIVE); if (res == NULL) { - printf("cbb alloc res fail\n"); + kprintf("cbb alloc res fail\n"); return (NULL); } if (cbb_insert_res(sc, res, type, *rid)) { diff --git a/sys/dev/powermng/i386/alpm/alpm.c b/sys/dev/powermng/i386/alpm/alpm.c index a288999421..ff0aff878d 100644 --- a/sys/dev/powermng/i386/alpm/alpm.c +++ b/sys/dev/powermng/i386/alpm/alpm.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/alpm.c,v 1.15 2001/01/17 00:38:06 peter Exp $ - * $DragonFly: src/sys/dev/powermng/i386/alpm/alpm.c,v 1.7 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/powermng/i386/alpm/alpm.c,v 1.8 2006/12/22 23:26:23 swildner Exp $ * */ @@ -234,29 +234,29 @@ alpm_pci_attach(device_t dev) if (bootverbose) { l = pci_read_config(dev, SMBHSI, 1); - printf("alsmb%d: %s/%s", unit, + kprintf("alsmb%d: %s/%s", unit, (l & SMBHSI_HOST) ? "host":"nohost", (l & SMBHSI_SLAVE) ? "slave":"noslave"); l = pci_read_config(dev, SMBHCBC, 1); switch (l & SMBHCBC_CLOCK) { case SMBCLOCK_149K: - printf(" 149K"); + kprintf(" 149K"); break; case SMBCLOCK_74K: - printf(" 74K"); + kprintf(" 74K"); break; case SMBCLOCK_37K: - printf(" 37K"); + kprintf(" 37K"); break; case SMBCLOCK_223K: - printf(" 223K"); + kprintf(" 223K"); break; case SMBCLOCK_111K: - printf(" 111K"); + kprintf(" 111K"); break; case SMBCLOCK_55K: - printf(" 55K"); + kprintf(" 55K"); break; } } @@ -285,7 +285,7 @@ alpm_pci_attach(device_t dev) alpm->smbsh = rman_get_bushandle(res); if (bootverbose) - printf(" at 0x%x\n", alpm->smbsh); + kprintf(" at 0x%x\n", alpm->smbsh); smbinterface = device_add_child(dev, "alsmb", unit); if (!smbinterface) @@ -369,7 +369,7 @@ alsmb_idle(struct alsmb_softc *sc) sts = ALPM_SMBINB(sc, SMBSTS); - ALPM_DEBUG(printf("alpm: idle? STS=0x%x\n", sts)); + ALPM_DEBUG(kprintf("alpm: idle? STS=0x%x\n", sts)); return (sts & IDL_STS); } @@ -392,7 +392,7 @@ alsmb_wait(struct alsmb_softc *sc) break; } - ALPM_DEBUG(printf("alpm: STS=0x%x\n", sts)); + ALPM_DEBUG(kprintf("alpm: STS=0x%x\n", sts)); error = SMB_ENOERR; @@ -426,11 +426,11 @@ alsmb_smb_quick(device_t dev, u_char slave, int how) switch (how) { case SMB_QWRITE: - ALPM_DEBUG(printf("alpm: QWRITE to 0x%x", slave)); + ALPM_DEBUG(kprintf("alpm: QWRITE to 0x%x", slave)); ALPM_SMBOUTB(sc, SMBHADDR, slave & ~LSB); break; case SMB_QREAD: - ALPM_DEBUG(printf("alpm: QREAD to 0x%x", slave)); + ALPM_DEBUG(kprintf("alpm: QREAD to 0x%x", slave)); ALPM_SMBOUTB(sc, SMBHADDR, slave | LSB); break; default: @@ -441,7 +441,7 @@ alsmb_smb_quick(device_t dev, u_char slave, int how) error = alsmb_wait(sc); - ALPM_DEBUG(printf(", error=0x%x\n", error)); + ALPM_DEBUG(kprintf(", error=0x%x\n", error)); return (error); } @@ -463,7 +463,7 @@ alsmb_smb_sendb(device_t dev, u_char slave, char byte) error = alsmb_wait(sc); - ALPM_DEBUG(printf("alpm: SENDB to 0x%x, byte=0x%x, error=0x%x\n", slave, byte, error)); + ALPM_DEBUG(kprintf("alpm: SENDB to 0x%x, byte=0x%x, error=0x%x\n", slave, byte, error)); return (error); } @@ -485,7 +485,7 @@ alsmb_smb_recvb(device_t dev, u_char slave, char *byte) if ((error = alsmb_wait(sc)) == SMB_ENOERR) *byte = ALPM_SMBINB(sc, SMBHDATA); - ALPM_DEBUG(printf("alpm: RECVB from 0x%x, byte=0x%x, error=0x%x\n", slave, *byte, error)); + ALPM_DEBUG(kprintf("alpm: RECVB from 0x%x, byte=0x%x, error=0x%x\n", slave, *byte, error)); return (error); } @@ -508,7 +508,7 @@ alsmb_smb_writeb(device_t dev, u_char slave, char cmd, char byte) error = alsmb_wait(sc); - ALPM_DEBUG(printf("alpm: WRITEB to 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, byte, error)); + ALPM_DEBUG(kprintf("alpm: WRITEB to 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, byte, error)); return (error); } @@ -531,7 +531,7 @@ alsmb_smb_readb(device_t dev, u_char slave, char cmd, char *byte) if ((error = alsmb_wait(sc)) == SMB_ENOERR) *byte = ALPM_SMBINB(sc, SMBHDATA); - ALPM_DEBUG(printf("alpm: READB from 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, *byte, error)); + ALPM_DEBUG(kprintf("alpm: READB from 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, *byte, error)); return (error); } @@ -555,7 +555,7 @@ alsmb_smb_writew(device_t dev, u_char slave, char cmd, short word) error = alsmb_wait(sc); - ALPM_DEBUG(printf("alpm: WRITEW to 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, word, error)); + ALPM_DEBUG(kprintf("alpm: WRITEW to 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, word, error)); return (error); } @@ -583,7 +583,7 @@ alsmb_smb_readw(device_t dev, u_char slave, char cmd, short *word) *word = ((high & 0xff) << 8) | (low & 0xff); } - ALPM_DEBUG(printf("alpm: READW from 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, *word, error)); + ALPM_DEBUG(kprintf("alpm: READW from 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, *word, error)); return (error); } @@ -626,7 +626,7 @@ alsmb_smb_bwrite(device_t dev, u_char slave, char cmd, u_char count, char *buf) } error: - ALPM_DEBUG(printf("alpm: WRITEBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); + ALPM_DEBUG(kprintf("alpm: WRITEBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); return (error); } @@ -667,7 +667,7 @@ alsmb_smb_bread(device_t dev, u_char slave, char cmd, u_char count, char *buf) remain -= len; } error: - ALPM_DEBUG(printf("alpm: READBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); + ALPM_DEBUG(kprintf("alpm: READBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); return (error); } diff --git a/sys/dev/powermng/i386/amdpm/amdpm.c b/sys/dev/powermng/i386/amdpm/amdpm.c index d2da7ede88..df95023818 100644 --- a/sys/dev/powermng/i386/amdpm/amdpm.c +++ b/sys/dev/powermng/i386/amdpm/amdpm.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/amdpm.c,v 1.1.2.1 2001/10/10 12:10:26 murray Exp $ - * $DragonFly: src/sys/dev/powermng/i386/amdpm/amdpm.c,v 1.6 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/powermng/i386/amdpm/amdpm.c,v 1.7 2006/12/22 23:26:23 swildner Exp $ * */ @@ -276,7 +276,7 @@ amdsmb_idle(struct amdsmb_softc *sc) sts = AMDPM_SMBINW(sc, AMDSMB_GLOBAL_STATUS); - AMDPM_DEBUG(printf("amdpm: busy? STS=0x%x\n", sts)); + AMDPM_DEBUG(kprintf("amdpm: busy? STS=0x%x\n", sts)); return (~(sts & AMDSMB_GS_HST_STS)); } @@ -299,7 +299,7 @@ amdsmb_wait(struct amdsmb_softc *sc) break; } - AMDPM_DEBUG(printf("amdpm: STS=0x%x (count=%d)\n", sts, count)); + AMDPM_DEBUG(kprintf("amdpm: STS=0x%x (count=%d)\n", sts, count)); error = SMB_ENOERR; @@ -334,11 +334,11 @@ amdsmb_smb_quick(device_t dev, u_char slave, int how) switch (how) { case SMB_QWRITE: - AMDPM_DEBUG(printf("amdpm: QWRITE to 0x%x", slave)); + AMDPM_DEBUG(kprintf("amdpm: QWRITE to 0x%x", slave)); AMDPM_SMBOUTW(sc, AMDSMB_HSTADDR, slave & ~LSB); break; case SMB_QREAD: - AMDPM_DEBUG(printf("amdpm: QREAD to 0x%x", slave)); + AMDPM_DEBUG(kprintf("amdpm: QREAD to 0x%x", slave)); AMDPM_SMBOUTW(sc, AMDSMB_HSTADDR, slave | LSB); break; default: @@ -349,7 +349,7 @@ amdsmb_smb_quick(device_t dev, u_char slave, int how) error = amdsmb_wait(sc); - AMDPM_DEBUG(printf(", error=0x%x\n", error)); + AMDPM_DEBUG(kprintf(", error=0x%x\n", error)); return (error); } @@ -372,7 +372,7 @@ amdsmb_smb_sendb(device_t dev, u_char slave, char byte) error = amdsmb_wait(sc); - AMDPM_DEBUG(printf("amdpm: SENDB to 0x%x, byte=0x%x, error=0x%x\n", slave, byte, error)); + AMDPM_DEBUG(kprintf("amdpm: SENDB to 0x%x, byte=0x%x, error=0x%x\n", slave, byte, error)); return (error); } @@ -395,7 +395,7 @@ amdsmb_smb_recvb(device_t dev, u_char slave, char *byte) if ((error = amdsmb_wait(sc)) == SMB_ENOERR) *byte = AMDPM_SMBINW(sc, AMDSMB_HSTDATA); - AMDPM_DEBUG(printf("amdpm: RECVB from 0x%x, byte=0x%x, error=0x%x\n", slave, *byte, error)); + AMDPM_DEBUG(kprintf("amdpm: RECVB from 0x%x, byte=0x%x, error=0x%x\n", slave, *byte, error)); return (error); } @@ -419,7 +419,7 @@ amdsmb_smb_writeb(device_t dev, u_char slave, char cmd, char byte) error = amdsmb_wait(sc); - AMDPM_DEBUG(printf("amdpm: WRITEB to 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, byte, error)); + AMDPM_DEBUG(kprintf("amdpm: WRITEB to 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, byte, error)); return (error); } @@ -443,7 +443,7 @@ amdsmb_smb_readb(device_t dev, u_char slave, char cmd, char *byte) if ((error = amdsmb_wait(sc)) == SMB_ENOERR) *byte = AMDPM_SMBINW(sc, AMDSMB_HSTDATA); - AMDPM_DEBUG(printf("amdpm: READB from 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, *byte, error)); + AMDPM_DEBUG(kprintf("amdpm: READB from 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, *byte, error)); return (error); } @@ -467,7 +467,7 @@ amdsmb_smb_writew(device_t dev, u_char slave, char cmd, short word) error = amdsmb_wait(sc); - AMDPM_DEBUG(printf("amdpm: WRITEW to 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, word, error)); + AMDPM_DEBUG(kprintf("amdpm: WRITEW to 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, word, error)); return (error); } @@ -491,7 +491,7 @@ amdsmb_smb_readw(device_t dev, u_char slave, char cmd, short *word) if ((error = amdsmb_wait(sc)) == SMB_ENOERR) *word = AMDPM_SMBINW(sc, AMDSMB_HSTDATA); - AMDPM_DEBUG(printf("amdpm: READW from 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, *word, error)); + AMDPM_DEBUG(kprintf("amdpm: READW from 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, *word, error)); return (error); } @@ -537,7 +537,7 @@ amdsmb_smb_bwrite(device_t dev, u_char slave, char cmd, u_char count, char *buf) } error: - AMDPM_DEBUG(printf("amdpm: WRITEBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); + AMDPM_DEBUG(kprintf("amdpm: WRITEBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); return (error); } @@ -577,7 +577,7 @@ amdsmb_smb_bread(device_t dev, u_char slave, char cmd, u_char count, char *buf) remain -= len; } error: - AMDPM_DEBUG(printf("amdpm: READBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); + AMDPM_DEBUG(kprintf("amdpm: READBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); return (error); } diff --git a/sys/dev/powermng/i386/intpm/intpm.c b/sys/dev/powermng/i386/intpm/intpm.c index 1fa78c61d8..8a695b2d0c 100644 --- a/sys/dev/powermng/i386/intpm/intpm.c +++ b/sys/dev/powermng/i386/intpm/intpm.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/intpm.c,v 1.16.2.1 2001/12/23 08:17:47 pirzyk Exp $ - * $DragonFly: src/sys/dev/powermng/i386/intpm/intpm.c,v 1.10 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/powermng/i386/intpm/intpm.c,v 1.11 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -295,10 +295,10 @@ static void intsmb_alrintr(device_t dev) uint32_t addr; addr = bus_space_read_1(sc->st,sc->sh, PIIX4_SMBHSTDAT0); - printf("ALART_RESPONSE: %#x\n", addr); + kprintf("ALART_RESPONSE: %#x\n", addr); } }else{ - printf("ERROR\n"); + kprintf("ERROR\n"); } /*Re-enable INTR from ALART*/ @@ -355,7 +355,7 @@ intsmb_stop_poll(device_t dev){ (status&PIIX4_SMBHSTSTAT_BUSC)?EBUSY: (status&PIIX4_SMBHSTSTAT_FAIL)?EIO:0; if(error==0&&!(status&PIIX4_SMBHSTSTAT_INTR)){ - printf("unknown cause why?"); + kprintf("unknown cause why?"); } return error; } @@ -389,7 +389,7 @@ intsmb_stop(device_t dev){ (status&PIIX4_SMBHSTSTAT_BUSC)?EBUSY: (status&PIIX4_SMBHSTSTAT_FAIL)?EIO:0; if(error==0&&!(status&PIIX4_SMBHSTSTAT_INTR)){ - printf("intsmb%d:unknown cause why?\n", + kprintf("intsmb%d:unknown cause why?\n", device_get_unit(dev)); } #ifdef ENABLE_ALART @@ -693,7 +693,7 @@ intpm_attach(device_t dev) } device_printf(dev,"intr %s %s ",str,((value&1)? "enabled":"disabled")); value=pci_read_config(dev,PCI_REVID_SMB,1); - printf("revision %d\n",value); + kprintf("revision %d\n",value); /* * Install intr HANDLER here */ @@ -712,13 +712,13 @@ intpm_attach(device_t dev) } smbinterface=device_add_child(dev,"intsmb",unit); if(!smbinterface){ - printf("intsmb%d:could not add SMBus device\n",unit); + kprintf("intsmb%d:could not add SMBus device\n",unit); } device_probe_and_attach(smbinterface); } value=pci_read_config(dev,PCI_BASE_ADDR_PM,4); - printf("intpm%d: PM %s %x \n",unit,(value&1)?"I/O mapped":"Memory",value&0xfffe); + kprintf("intpm%d: PM %s %x \n",unit,(value&1)?"I/O mapped":"Memory",value&0xfffe); return 0; } static int diff --git a/sys/dev/powermng/i386/viapm/viapm.c b/sys/dev/powermng/i386/viapm/viapm.c index 08b0344a40..225097a243 100644 --- a/sys/dev/powermng/i386/viapm/viapm.c +++ b/sys/dev/powermng/i386/viapm/viapm.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/viapm.c,v 1.1.2.1 2002/04/19 05:52:15 nsouch Exp $ - * $DragonFly: src/sys/dev/powermng/i386/viapm/viapm.c,v 1.9 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/powermng/i386/viapm/viapm.c,v 1.10 2006/12/22 23:26:23 swildner Exp $ * */ #include @@ -561,7 +561,7 @@ viapm_busy(struct viapm_softc *viapm) sts = VIAPM_INB(SMBHST); - VIAPM_DEBUG(printf("viapm: idle? STS=0x%x\n", sts)); + VIAPM_DEBUG(kprintf("viapm: idle? STS=0x%x\n", sts)); return (sts & SMBHST_BUSY); } @@ -586,7 +586,7 @@ viapm_wait(struct viapm_softc *viapm) break; } - VIAPM_DEBUG(printf("viapm: SMBHST=0x%x\n", sts)); + VIAPM_DEBUG(kprintf("viapm: SMBHST=0x%x\n", sts)); error = SMB_ENOERR; @@ -639,11 +639,11 @@ viasmb_quick(device_t dev, u_char slave, int how) switch (how) { case SMB_QWRITE: - VIAPM_DEBUG(printf("viapm: QWRITE to 0x%x", slave)); + VIAPM_DEBUG(kprintf("viapm: QWRITE to 0x%x", slave)); VIAPM_OUTB(SMBHADDR, slave & ~LSB); break; case SMB_QREAD: - VIAPM_DEBUG(printf("viapm: QREAD to 0x%x", slave)); + VIAPM_DEBUG(kprintf("viapm: QREAD to 0x%x", slave)); VIAPM_OUTB(SMBHADDR, slave | LSB); break; default: @@ -674,7 +674,7 @@ viasmb_sendb(device_t dev, u_char slave, char byte) error = viapm_wait(viapm); - VIAPM_DEBUG(printf("viapm: SENDB to 0x%x, byte=0x%x, error=0x%x\n", slave, byte, error)); + VIAPM_DEBUG(kprintf("viapm: SENDB to 0x%x, byte=0x%x, error=0x%x\n", slave, byte, error)); return (error); } @@ -696,7 +696,7 @@ viasmb_recvb(device_t dev, u_char slave, char *byte) if ((error = viapm_wait(viapm)) == SMB_ENOERR) *byte = VIAPM_INB(SMBHDATA0); - VIAPM_DEBUG(printf("viapm: RECVB from 0x%x, byte=0x%x, error=0x%x\n", slave, *byte, error)); + VIAPM_DEBUG(kprintf("viapm: RECVB from 0x%x, byte=0x%x, error=0x%x\n", slave, *byte, error)); return (error); } @@ -719,7 +719,7 @@ viasmb_writeb(device_t dev, u_char slave, char cmd, char byte) error = viapm_wait(viapm); - VIAPM_DEBUG(printf("viapm: WRITEB to 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, byte, error)); + VIAPM_DEBUG(kprintf("viapm: WRITEB to 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, byte, error)); return (error); } @@ -742,7 +742,7 @@ viasmb_readb(device_t dev, u_char slave, char cmd, char *byte) if ((error = viapm_wait(viapm)) == SMB_ENOERR) *byte = VIAPM_INB(SMBHDATA0); - VIAPM_DEBUG(printf("viapm: READB from 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, *byte, error)); + VIAPM_DEBUG(kprintf("viapm: READB from 0x%x, cmd=0x%x, byte=0x%x, error=0x%x\n", slave, cmd, *byte, error)); return (error); } @@ -766,7 +766,7 @@ viasmb_writew(device_t dev, u_char slave, char cmd, short word) error = viapm_wait(viapm); - VIAPM_DEBUG(printf("viapm: WRITEW to 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, word, error)); + VIAPM_DEBUG(kprintf("viapm: WRITEW to 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, word, error)); return (error); } @@ -794,7 +794,7 @@ viasmb_readw(device_t dev, u_char slave, char cmd, short *word) *word = ((high & 0xff) << 8) | (low & 0xff); } - VIAPM_DEBUG(printf("viapm: READW from 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, *word, error)); + VIAPM_DEBUG(kprintf("viapm: READW from 0x%x, cmd=0x%x, word=0x%x, error=0x%x\n", slave, cmd, *word, error)); return (error); } @@ -834,7 +834,7 @@ viasmb_bwrite(device_t dev, u_char slave, char cmd, u_char count, char *buf) } error: - VIAPM_DEBUG(printf("viapm: WRITEBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); + VIAPM_DEBUG(kprintf("viapm: WRITEBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); return (error); @@ -874,7 +874,7 @@ viasmb_bread(device_t dev, u_char slave, char cmd, u_char count, char *buf) remain -= len; } error: - VIAPM_DEBUG(printf("viapm: READBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); + VIAPM_DEBUG(kprintf("viapm: READBLK to 0x%x, count=0x%x, cmd=0x%x, error=0x%x", slave, count, cmd, error)); return (error); } diff --git a/sys/dev/raid/aac/aac.c b/sys/dev/raid/aac/aac.c index 0f11f8bc78..8de1fd8f33 100644 --- a/sys/dev/raid/aac/aac.c +++ b/sys/dev/raid/aac/aac.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aac.c,v 1.9.2.14 2003/04/08 13:22:08 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aac.c,v 1.27 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aac.c,v 1.28 2006/12/22 23:26:23 swildner Exp $ */ /* @@ -544,7 +544,7 @@ aac_shutdown(device_t dev) cc->ContainerId = 0xffffffff; if (aac_sync_fib(sc, ContainerCommand, 0, fib, sizeof(struct aac_close_command))) - printf("FAILED.\n"); + kprintf("FAILED.\n"); else { fib->data[0] = 0; /* @@ -555,9 +555,9 @@ aac_shutdown(device_t dev) */ if (aac_sync_fib(sc, FsaHostShutdown, AAC_FIBSTATE_SHUTDOWN, fib, 1)) { - printf("FAILED.\n"); + kprintf("FAILED.\n"); } else { - printf("done.\n"); + kprintf("done.\n"); } } @@ -1050,7 +1050,7 @@ aac_dump_enqueue(struct aac_disk *ad, u_int32_t lba, void *data, int dumppages) /* * Wait for the card's queue to drain when dumping. Also check for monitor - * printf's + * kprintf's */ void aac_dump_complete(struct aac_softc *sc) @@ -2527,7 +2527,7 @@ aac_ioctl_sendfib(struct aac_softc *sc, caddr_t ufib) * Pass the FIB to the controller, wait for it to complete. */ if ((error = aac_wait_command(cm, 30)) != 0) { /* XXX user timeout? */ - printf("aac_wait_command return %d\n", error); + kprintf("aac_wait_command return %d\n", error); goto out; } @@ -2802,7 +2802,7 @@ aac_return_aif(struct aac_softc *sc, caddr_t uptr) error = copyout(&sc->aac_aifq[sc->aac_aifq_tail], uptr, sizeof(struct aac_aif_command)); if (error) - printf("aac_return_aif: copyout returned %d\n", error); + kprintf("aac_return_aif: copyout returned %d\n", error); if (!error) sc->aac_aifq_tail = (sc->aac_aifq_tail + 1) % AAC_AIFQ_LENGTH; diff --git a/sys/dev/raid/aac/aac_cam.c b/sys/dev/raid/aac/aac_cam.c index 362de58d46..eca0c1b83f 100644 --- a/sys/dev/raid/aac/aac_cam.c +++ b/sys/dev/raid/aac/aac_cam.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aac_cam.c,v 1.2.2.4 2003/04/08 13:22:08 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aac_cam.c,v 1.5 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aac_cam.c,v 1.6 2006/12/22 23:26:23 swildner Exp $ */ /* @@ -493,7 +493,7 @@ aac_cam_reset_bus(struct cam_sim *sim, union ccb *ccb) sc = camsc->inf->aac_sc; if (sc == NULL) { - printf("Null sc?\n"); + kprintf("Null sc?\n"); return (CAM_REQ_ABORTED); } diff --git a/sys/dev/raid/aac/aac_disk.c b/sys/dev/raid/aac/aac_disk.c index 1e663a9745..b50fca88a6 100644 --- a/sys/dev/raid/aac/aac_disk.c +++ b/sys/dev/raid/aac/aac_disk.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aac_disk.c,v 1.3.2.8 2003/01/11 18:39:39 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aac_disk.c,v 1.15 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aac_disk.c,v 1.16 2006/12/22 23:26:23 swildner Exp $ */ #include "opt_aac.h" @@ -125,13 +125,13 @@ aac_disk_open(struct dev_open_args *ap) sc = (struct aac_disk *)dev->si_drv1; if (sc == NULL) { - printf("aac_disk_open: No Softc\n"); + kprintf("aac_disk_open: No Softc\n"); return (ENXIO); } /* check that the controller is up and running */ if (sc->ad_controller->aac_state & AAC_STATE_SUSPEND) { - printf("Controller Suspended controller state = 0x%x\n", + kprintf("Controller Suspended controller state = 0x%x\n", sc->ad_controller->aac_state); return(ENXIO); } diff --git a/sys/dev/raid/aac/aacvar.h b/sys/dev/raid/aac/aacvar.h index 0b24b837db..00c8bec85b 100644 --- a/sys/dev/raid/aac/aacvar.h +++ b/sys/dev/raid/aac/aacvar.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aacvar.h,v 1.4.2.7 2003/04/08 13:22:08 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aacvar.h,v 1.14 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aacvar.h,v 1.15 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -62,7 +62,7 @@ #define AAC_AIFQ_LENGTH 64 /* - * Firmware messages are passed in the printf buffer. + * Firmware messages are passed in the kprintf buffer. */ #define AAC_PRINTF_BUFSIZE 256 @@ -411,11 +411,11 @@ extern int aac_sync_fib(struct aac_softc *sc, u_int32_t command, #ifdef AAC_DEBUG # define debug(level, fmt, args...) \ do { \ - if (level <=AAC_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); \ + if (level <=AAC_DEBUG) kprintf("%s: " fmt "\n", __func__ , ##args); \ } while (0) # define debug_called(level) \ do { \ - if (level <= AAC_DEBUG) printf(__func__ ": called\n"); \ + if (level <= AAC_DEBUG) kprintf(__func__ ": called\n"); \ } while (0) extern void aac_print_queues(struct aac_softc *sc); @@ -477,7 +477,7 @@ aac_enqueue_ ## name (struct aac_command *cm) \ { \ crit_enter(); \ if ((cm->cm_flags & AAC_ON_AACQ_MASK) != 0) { \ - printf("command %p is on another queue, flags = %#x\n", \ + kprintf("command %p is on another queue, flags = %#x\n", \ cm, cm->cm_flags); \ panic("command is on another queue"); \ } \ @@ -491,7 +491,7 @@ aac_requeue_ ## name (struct aac_command *cm) \ { \ crit_enter(); \ if ((cm->cm_flags & AAC_ON_AACQ_MASK) != 0) { \ - printf("command %p is on another queue, flags = %#x\n", \ + kprintf("command %p is on another queue, flags = %#x\n", \ cm, cm->cm_flags); \ panic("command is on another queue"); \ } \ @@ -508,7 +508,7 @@ aac_dequeue_ ## name (struct aac_softc *sc) \ crit_enter(); \ if ((cm = TAILQ_FIRST(&sc->aac_ ## name)) != NULL) { \ if ((cm->cm_flags & AAC_ON_ ## index) == 0) { \ - printf("command %p not in queue, flags = %#x, " \ + kprintf("command %p not in queue, flags = %#x, " \ "bit = %#x\n", cm, cm->cm_flags, \ AAC_ON_ ## index); \ panic("command not in queue"); \ @@ -525,7 +525,7 @@ aac_remove_ ## name (struct aac_command *cm) \ { \ crit_enter(); \ if ((cm->cm_flags & AAC_ON_ ## index) == 0) { \ - printf("command %p not in queue, flags = %#x, " \ + kprintf("command %p not in queue, flags = %#x, " \ "bit = %#x\n", cm, cm->cm_flags, \ AAC_ON_ ## index); \ panic("command not in queue"); \ @@ -579,7 +579,7 @@ static __inline void aac_print_printf(struct aac_softc *sc) { /* - * XXX We have the ability to read the length of the printf string + * XXX We have the ability to read the length of the kprintf string * from out of the mailboxes. */ device_printf(sc->aac_dev, "**Monitor** %.*s", AAC_PRINTF_BUFSIZE, diff --git a/sys/dev/raid/amr/amr_pci.c b/sys/dev/raid/amr/amr_pci.c index 5a8157c494..209cb77c7a 100644 --- a/sys/dev/raid/amr/amr_pci.c +++ b/sys/dev/raid/amr/amr_pci.c @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/amr/amr_pci.c,v 1.1.2.9 2002/12/20 15:12:04 emoore Exp $ - * $DragonFly: src/sys/dev/raid/amr/amr_pci.c,v 1.8 2006/10/25 20:56:00 dillon Exp $ + * $DragonFly: src/sys/dev/raid/amr/amr_pci.c,v 1.9 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -345,7 +345,7 @@ amr_pci_shutdown(device_t dev) /* flush controller */ device_printf(sc->amr_dev, "flushing cache..."); - printf("%s\n", amr_flush(sc) ? "failed" : "done"); + kprintf("%s\n", amr_flush(sc) ? "failed" : "done"); crit_enter(); error = 0; @@ -380,7 +380,7 @@ amr_pci_suspend(device_t dev) /* flush controller */ device_printf(sc->amr_dev, "flushing cache..."); - printf("%s\n", amr_flush(sc) ? "failed" : "done"); + kprintf("%s\n", amr_flush(sc) ? "failed" : "done"); /* XXX disable interrupts? */ diff --git a/sys/dev/raid/amr/amrvar.h b/sys/dev/raid/amr/amrvar.h index 797629eb3d..fad3229018 100644 --- a/sys/dev/raid/amr/amrvar.h +++ b/sys/dev/raid/amr/amrvar.h @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.2.2.5 2002/12/20 15:12:04 emoore Exp $ - * $DragonFly: src/sys/dev/raid/amr/amrvar.h,v 1.8 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/raid/amr/amrvar.h,v 1.9 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -63,13 +63,13 @@ #endif #ifdef AMR_DEBUG -# define debug(level, fmt, args...) do {if (level <= AMR_DEBUG) printf("%s: " fmt "\n", __func__ , ##args);} while(0) -# define debug_called(level) do {if (level <= AMR_DEBUG) printf("%s: called\n", __func__);} while(0) +# define debug(level, fmt, args...) do {if (level <= AMR_DEBUG) kprintf("%s: " fmt "\n", __func__ , ##args);} while(0) +# define debug_called(level) do {if (level <= AMR_DEBUG) kprintf("%s: called\n", __func__);} while(0) #else # define debug(level, fmt, args...) # define debug_called(level) #endif -#define xdebug(fmt, args...) printf("%s: " fmt "\n", __func__ , ##args) +#define xdebug(fmt, args...) kprintf("%s: " fmt "\n", __func__ , ##args) /* * Per-logical-drive datastructure diff --git a/sys/dev/raid/asr/asr.c b/sys/dev/raid/asr/asr.c index 8c763af11e..6400c7657b 100644 --- a/sys/dev/raid/asr/asr.c +++ b/sys/dev/raid/asr/asr.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/asr/asr.c,v 1.3.2.2 2001/08/23 05:21:29 scottl Exp $ */ -/* $DragonFly: src/sys/dev/raid/asr/asr.c,v 1.27 2006/10/25 20:56:01 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/asr/asr.c,v 1.28 2006/12/22 23:26:23 swildner Exp $ */ /* * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000-2001 Adaptec Corporation @@ -123,7 +123,7 @@ u_int32_t counter = 0; \ \ while (length--) { \ - printf ("%08lx%c", (u_long)*(pointer++), \ + kprintf ("%08lx%c", (u_long)*(pointer++), \ (((++counter & 7) == 0) || (length == 0)) \ ? '\n' \ : ' '); \ @@ -133,14 +133,14 @@ #if (defined(DEBUG_ASR)) /* Breaks on none STDC based compilers :-( */ -# define debug_asr_printf(fmt,args...) printf(fmt, ##args) +# define debug_asr_printf(fmt,args...) kprintf(fmt, ##args) # define debug_asr_dump_message(message) debug_asr_message(message) # define debug_asr_print_path(ccb) xpt_print_path(ccb->ccb_h.path); /* None fatal version of the ASSERT macro */ # if (defined(__STDC__)) -# define ASSERT(phrase) if(!(phrase))printf(#phrase " at line %d file %s\n",__LINE__,__FILE__) +# define ASSERT(phrase) if(!(phrase))kprintf(#phrase " at line %d file %s\n",__LINE__,__FILE__) # else -# define ASSERT(phrase) if(!(phrase))printf("phrase" " at line %d file %s\n",__LINE__,__FILE__) +# define ASSERT(phrase) if(!(phrase))kprintf("phrase" " at line %d file %s\n",__LINE__,__FILE__) # endif #else /* DEBUG_ASR */ # define debug_asr_printf(fmt,args...) @@ -156,7 +156,7 @@ * 2 - add in outgoing message frames. */ #if (defined(DEBUG_ASR_CMD)) -# define debug_asr_cmd_printf(fmt,args...) printf(fmt,##args) +# define debug_asr_cmd_printf(fmt,args...) kprintf(fmt,##args) # define debug_asr_dump_ccb(ccb) \ { \ u_int8_t * cp = (unsigned char *)&(ccb->csio.cdb_io); \ @@ -188,7 +188,7 @@ #endif /* DEBUG_ASR_CMD */ #if (defined(DEBUG_ASR_USR_CMD)) -# define debug_usr_cmd_printf(fmt,args...) printf(fmt,##args) +# define debug_usr_cmd_printf(fmt,args...) kprintf(fmt,##args) # define debug_usr_cmd_dump_message(message) debug_usr_message(message) #else /* DEBUG_ASR_USR_CMD */ # define debug_usr_cmd_printf(fmt,args...) @@ -813,7 +813,7 @@ ASR_prstring ( int len) { while ((--len >= 0) && (*s) && (*s != ' ') && (*s != '-')) { - printf ("%c", *(s++)); + kprintf ("%c", *(s++)); } } /* ASR_prstring */ @@ -1426,7 +1426,7 @@ ASR_reset( /* * Take adapter off-line. */ - printf ("asr%d: Taking adapter off-line\n", + kprintf ("asr%d: Taking adapter off-line\n", sc->ha_path[0] ? cam_sim_unit(xpt_path_sim(sc->ha_path[0])) : 0); @@ -1450,7 +1450,7 @@ ASR_reset( } ASR_failActiveCommands (sc); if (sc->ha_in_reset == HA_OFF_LINE_RECOVERY) { - printf ("asr%d: Brining adapter back on-line\n", + kprintf ("asr%d: Brining adapter back on-line\n", sc->ha_path[0] ? cam_sim_unit(xpt_path_sim(sc->ha_path[0])) : 0); @@ -1478,7 +1478,7 @@ asr_timeout( */ if ((s = ASR_getBlinkLedCode(sc)) != 0) { /* Reset Adapter */ - printf ("asr%d: Blink LED 0x%x resetting adapter\n", + kprintf ("asr%d: Blink LED 0x%x resetting adapter\n", cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), s); if (ASR_reset (sc) == ENXIO) { /* Try again later */ @@ -2523,7 +2523,7 @@ asr_attach (ATTACH_ARGS) * engine (dptioctl.h) to pick up. */ bcopy (osrelease, &ASR_sig.dsDescription[16], 5); - printf ("asr%d: major=%d\n", unit, asr_ops.head.maj); + kprintf ("asr%d: major=%d\n", unit, asr_ops.head.maj); } /* * Initialize the software structure @@ -2545,7 +2545,7 @@ asr_attach (ATTACH_ARGS) * This is the real McCoy! */ if (!asr_pci_map_mem(tag, sc)) { - printf ("asr%d: could not map memory\n", unit); + kprintf ("asr%d: could not map memory\n", unit); ATTACH_RETURN(ENXIO); } /* Enable if not formerly enabled */ @@ -2569,7 +2569,7 @@ asr_attach (ATTACH_ARGS) sizeof(I2O_EXEC_STATUS_GET_REPLY), M_TEMP, M_WAITOK)) == (PI2O_EXEC_STATUS_GET_REPLY)NULL) || (ASR_getStatus(sc->ha_Virt, sc->ha_Fvirt, status) == NULL)) { - printf ("asr%d: could not initialize hardware\n", unit); + kprintf ("asr%d: could not initialize hardware\n", unit); ATTACH_RETURN(ENODEV); /* Get next, maybe better luck */ } sc->ha_SystemTable.OrganizationID = status->OrganizationID; @@ -2583,7 +2583,7 @@ asr_attach (ATTACH_ARGS) = (U32)(sc->ha_Base) + (U32)(&(((i2oRegs_t *)NULL)->ToFIFO)); if (!asr_pci_map_int(tag, (void *)sc)) { - printf ("asr%d: could not map interrupt\n", unit); + kprintf ("asr%d: could not map interrupt\n", unit); ATTACH_RETURN(ENXIO); } @@ -2643,7 +2643,7 @@ asr_attach (ATTACH_ARGS) (void)ASR_acquireHrt(sc); } } else { - printf ("asr%d: failed to initialize\n", unit); + kprintf ("asr%d: failed to initialize\n", unit); ATTACH_RETURN(ENXIO); } /* @@ -2682,7 +2682,7 @@ asr_attach (ATTACH_ARGS) * Print the HBA model number as inquired from the card. */ - printf ("asr%d:", unit); + kprintf ("asr%d:", unit); if ((iq = (struct scsi_inquiry_data *)kmalloc ( sizeof(struct scsi_inquiry_data), M_TEMP, M_WAITOK)) @@ -2745,26 +2745,26 @@ asr_attach (ATTACH_ARGS) (void)ASR_queue_c(sc, (PI2O_MESSAGE_FRAME)Message_Ptr); if (iq->vendor[0] && (iq->vendor[0] != ' ')) { - printf (" "); + kprintf (" "); ASR_prstring (iq->vendor, 8); ++posted; } if (iq->product[0] && (iq->product[0] != ' ')) { - printf (" "); + kprintf (" "); ASR_prstring (iq->product, 16); ++posted; } if (iq->revision[0] && (iq->revision[0] != ' ')) { - printf (" FW Rev. "); + kprintf (" FW Rev. "); ASR_prstring (iq->revision, 4); ++posted; } kfree ((caddr_t)iq, M_TEMP); if (posted) { - printf (","); + kprintf (","); } } - printf (" %d channel, %d CCBs, Protocol I2O\n", sc->ha_MaxBus + 1, + kprintf (" %d channel, %d CCBs, Protocol I2O\n", sc->ha_MaxBus + 1, (sc->ha_QueueSize > MAX_INBOUND) ? MAX_INBOUND : sc->ha_QueueSize); /* @@ -2775,7 +2775,7 @@ asr_attach (ATTACH_ARGS) union asr_ccb * ccb; if ((ccb = asr_alloc_ccb (sc)) == (union asr_ccb *)NULL) { - printf ("asr%d: CAM could not be notified of asynchronous callback parameters\n", unit); + kprintf ("asr%d: CAM could not be notified of asynchronous callback parameters\n", unit); ATTACH_RETURN(ENOMEM); } for (bus = 0; bus <= sc->ha_MaxBus; ++bus) { @@ -2868,7 +2868,7 @@ asr_action( break; } if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_INPROG) { - printf( + kprintf( "asr%d WARNING: scsi_cmd(%x) already done on b%dt%du%d\n", cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), ccb->csio.cdb_io.cdb_bytes[0], @@ -3684,7 +3684,7 @@ ASR_queue_i( while ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INPROG) { if (ASR_getBlinkLedCode(sc)) { /* Reset Adapter */ - printf ("asr%d: Blink LED 0x%x resetting adapter\n", + kprintf ("asr%d: Blink LED 0x%x resetting adapter\n", cam_sim_unit(xpt_path_sim(ccb->ccb_h.path)), ASR_getBlinkLedCode(sc)); if (ASR_reset (sc) == ENXIO) { diff --git a/sys/dev/raid/ciss/ciss.c b/sys/dev/raid/ciss/ciss.c index 83c458990f..ceac20b709 100644 --- a/sys/dev/raid/ciss/ciss.c +++ b/sys/dev/raid/ciss/ciss.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.2.2.6 2003/02/18 22:27:41 ps Exp $ - * $DragonFly: src/sys/dev/raid/ciss/ciss.c,v 1.21 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ciss/ciss.c,v 1.22 2006/12/22 23:26:23 swildner Exp $ */ /* @@ -3122,9 +3122,9 @@ ciss_print_request(struct ciss_request *cr) for (i = 0; i < cc->header.sg_in_list; i++) { if ((i % 4) == 0) ciss_printf(sc, " "); - printf("0x%08x/%d ", (u_int32_t)cc->sg[i].address, cc->sg[i].length); + kprintf("0x%08x/%d ", (u_int32_t)cc->sg[i].address, cc->sg[i].length); if ((((i + 1) % 4) == 0) || (i == (cc->header.sg_in_list - 1))) - printf("\n"); + kprintf("\n"); } } } @@ -3138,45 +3138,45 @@ ciss_print_ldrive(struct ciss_softc *sc, struct ciss_ldrive *ld) int bus, target, i; if (ld->cl_lstatus == NULL) { - printf("does not exist\n"); + kprintf("does not exist\n"); return; } /* print drive status */ switch(ld->cl_lstatus->status) { case CISS_LSTATUS_OK: - printf("online\n"); + kprintf("online\n"); break; case CISS_LSTATUS_INTERIM_RECOVERY: - printf("in interim recovery mode\n"); + kprintf("in interim recovery mode\n"); break; case CISS_LSTATUS_READY_RECOVERY: - printf("ready to begin recovery\n"); + kprintf("ready to begin recovery\n"); break; case CISS_LSTATUS_RECOVERING: bus = CISS_BIG_MAP_BUS(sc, ld->cl_lstatus->drive_rebuilding); target = CISS_BIG_MAP_BUS(sc, ld->cl_lstatus->drive_rebuilding); - printf("being recovered, working on physical drive %d.%d, %u blocks remaining\n", + kprintf("being recovered, working on physical drive %d.%d, %u blocks remaining\n", bus, target, ld->cl_lstatus->blocks_to_recover); break; case CISS_LSTATUS_EXPANDING: - printf("being expanded, %u blocks remaining\n", + kprintf("being expanded, %u blocks remaining\n", ld->cl_lstatus->blocks_to_recover); break; case CISS_LSTATUS_QUEUED_FOR_EXPANSION: - printf("queued for expansion\n"); + kprintf("queued for expansion\n"); break; case CISS_LSTATUS_FAILED: - printf("queued for expansion\n"); + kprintf("queued for expansion\n"); break; case CISS_LSTATUS_WRONG_PDRIVE: - printf("wrong physical drive inserted\n"); + kprintf("wrong physical drive inserted\n"); break; case CISS_LSTATUS_MISSING_PDRIVE: - printf("missing a needed physical drive\n"); + kprintf("missing a needed physical drive\n"); break; case CISS_LSTATUS_BECOMING_READY: - printf("becoming ready\n"); + kprintf("becoming ready\n"); break; } @@ -3234,7 +3234,7 @@ ciss_print0(void) sc = devclass_get_softc(devclass_find("ciss"), 0); if (sc == NULL) { - printf("no ciss controllers\n"); + kprintf("no ciss controllers\n"); } else { ciss_print_adapter(sc); } diff --git a/sys/dev/raid/ciss/cissvar.h b/sys/dev/raid/ciss/cissvar.h index b588e60712..6001e30b29 100644 --- a/sys/dev/raid/ciss/cissvar.h +++ b/sys/dev/raid/ciss/cissvar.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ciss/cissvar.h,v 1.3.2.2 2003/02/06 21:42:59 ps Exp $ - * $DragonFly: src/sys/dev/raid/ciss/cissvar.h,v 1.6 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ciss/cissvar.h,v 1.7 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -259,17 +259,17 @@ struct ciss_softc #ifdef CISS_DEBUG # define debug(level, fmt, args...) \ do { \ - if (level <= CISS_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); \ + if (level <= CISS_DEBUG) kprintf("%s: " fmt "\n", __func__ , ##args); \ } while(0) # define debug_called(level) \ do { \ - if (level <= CISS_DEBUG) printf("%s: called\n", __func__); \ + if (level <= CISS_DEBUG) kprintf("%s: called\n", __func__); \ } while(0) -# define debug_struct(s) printf(" SIZE %s: %d\n", #s, sizeof(struct s)) -# define debug_union(s) printf(" SIZE %s: %d\n", #s, sizeof(union s)) -# define debug_type(s) printf(" SIZE %s: %d\n", #s, sizeof(s)) -# define debug_field(s, f) printf(" OFFSET %s.%s: %d\n", #s, #f, ((int)&(((struct s *)0)->f))) -# define debug_const(c) printf(" CONST %s %d/0x%x\n", #c, c, c); +# define debug_struct(s) kprintf(" SIZE %s: %d\n", #s, sizeof(struct s)) +# define debug_union(s) kprintf(" SIZE %s: %d\n", #s, sizeof(union s)) +# define debug_type(s) kprintf(" SIZE %s: %d\n", #s, sizeof(s)) +# define debug_field(s, f) kprintf(" OFFSET %s.%s: %d\n", #s, #f, ((int)&(((struct s *)0)->f))) +# define debug_const(c) kprintf(" CONST %s %d/0x%x\n", #c, c, c); #else # define debug(level, fmt, args...) # define debug_called(level) @@ -349,7 +349,7 @@ ciss_remove_ ## name (struct ciss_request *cr) \ \ crit_enter(); \ if (cr->cr_onq != index) { \ - printf("request on queue %d (expected %d)\n", cr->cr_onq, index);\ + kprintf("request on queue %d (expected %d)\n", cr->cr_onq, index);\ error = 1; \ } else { \ TAILQ_REMOVE(&cr->cr_sc->ciss_ ## name, cr, cr_link); \ diff --git a/sys/dev/raid/dpt/dpt_control.c b/sys/dev/raid/dpt/dpt_control.c index c395cf3533..21ce1e7be4 100644 --- a/sys/dev/raid/dpt/dpt_control.c +++ b/sys/dev/raid/dpt/dpt_control.c @@ -37,7 +37,7 @@ */ #ident "$FreeBSD: src/sys/dev/dpt/dpt_control.c,v 1.16 1999/09/25 18:23:48 phk Exp $" -#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_control.c,v 1.12 2006/12/20 18:14:40 dillon Exp $" +#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_control.c,v 1.13 2006/12/22 23:26:23 swildner Exp $" #include "opt_dpt.h" @@ -259,7 +259,7 @@ dpt_get_sysinfo(void) /* Get The Number Of Drives From The Bios Data Area */ if ((addr = (char *) dpt_physmap(0x0475, 1024)) == NULL) { - printf("DPT: Cannot map BIOS address 0x0475. No sysinfo... :-(\n"); + kprintf("DPT: Cannot map BIOS address 0x0475. No sysinfo... :-(\n"); return; } dpt_sysinfo.numDrives = *addr; @@ -432,7 +432,7 @@ dpt_open(cdev_t dev, int flags, int fmt, struct proc * p) if ((dpt_inbuf[minor_no & ~SCSI_CONTROL_MASK] = geteblk(PAGE_SIZE)) == NULL) { #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: Failed to obtain an I/O buffer\n", + kprintf("dpt%d: Failed to obtain an I/O buffer\n", minor_no & ~SCSI_CONTROL_MASK); #endif crit_exit(); @@ -474,7 +474,7 @@ dpt_write(cdev_t dev, struct uio * uio, int ioflag) if (minor_no & SCSI_CONTROL_MASK) { #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: I/O attempted to control channel (%x)\n", + kprintf("dpt%d: I/O attempted to control channel (%x)\n", dpt_minor2unit(minor_no), minor_no); #endif return (ENXIO); @@ -494,7 +494,7 @@ dpt_write(cdev_t dev, struct uio * uio, int ioflag) if ((error = uiomove(cp, length, uio) != 0)) { #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: uiomove(%x, %d, %x) failed (%d)\n", + kprintf("dpt%d: uiomove(%x, %d, %x) failed (%d)\n", minor_no, cp, length, uio, error); #endif return (error); @@ -511,7 +511,7 @@ dpt_write(cdev_t dev, struct uio * uio, int ioflag) * For lack of anything better to do; * For now, dump the data so we can look at it and rejoice */ - printf("dpt%d: Command \"%s\" arrived\n", + kprintf("dpt%d: Command \"%s\" arrived\n", unit, dpt_rw_command[unit]); #endif } @@ -531,13 +531,13 @@ dpt_read(cdev_t dev, struct uio * uio, int ioflag) error = 0; #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: read, count = %d, dev = %08x\n", + kprintf("dpt%d: read, count = %d, dev = %08x\n", minor_no, uio->uio_resid, dev); #endif if (minor_no & SCSI_CONTROL_MASK) { #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: I/O attempted to control channel (%x)\n", + kprintf("dpt%d: I/O attempted to control channel (%x)\n", dpt_minor2unit(minor_no), minor_no); #endif return (ENXIO); @@ -636,7 +636,7 @@ dpt_read(cdev_t dev, struct uio * uio, int ioflag) wbp += x; } else { #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: Bad READ state (%s)\n", minor_no, command); + kprintf("dpt%d: Bad READ state (%s)\n", minor_no, command); #endif crit_exit(); error = EINVAL; @@ -648,7 +648,7 @@ dpt_read(cdev_t dev, struct uio * uio, int ioflag) uio->uio_resid = 0; #ifdef DPT_DEBUG_CONTROL if (error) { - printf("dpt%d: READ uimove failed (%d)\n", dpt->unit, error); + kprintf("dpt%d: READ uimove failed (%d)\n", dpt->unit, error); } #endif } @@ -678,7 +678,7 @@ dpt_ioctl(cdev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p) if (!(minor_no & SCSI_CONTROL_MASK)) { #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: Control attempted to I/O channel (%x)\n", + kprintf("dpt%d: Control attempted to I/O channel (%x)\n", dpt_minor2unit(minor_no), minor_no); #endif /* DEBUG */ return (ENXIO); @@ -686,7 +686,7 @@ dpt_ioctl(cdev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p) minor_no &= ~SCSI_CONTROL_MASK; #ifdef DPT_DEBUG_CONTROL - printf("dpt%d: IOCTL(%x, %x, %p, %x, %p)\n", + kprintf("dpt%d: IOCTL(%x, %x, %p, %x, %p)\n", minor_no, dev, cmd, cmdarg, flags, p); #endif /* DEBUG */ @@ -828,13 +828,13 @@ dpt_ioctl(cdev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p) (caddr_t *) eata_pass_thru->command_buffer, sizeof(result))); default: - printf("dpt%d: Invalid (%x) pass-throu command\n", + kprintf("dpt%d: Invalid (%x) pass-throu command\n", dpt->unit, eata_pass_thru->command); result = EINVAL; } default: - printf("dpt%d: Invalid (%lx) IOCTL\n", dpt->unit, cmd); + kprintf("dpt%d: Invalid (%lx) IOCTL\n", dpt->unit, cmd); return (EINVAL); } @@ -849,7 +849,7 @@ dpt_drvinit(void *unused) { if (!dpt_devsw_installed) { if (bootverbose) - printf("DPT: RAID Manager driver, Version %d.%d.%d\n", + kprintf("DPT: RAID Manager driver, Version %d.%d.%d\n", DPT_CTL_RELEASE, DPT_CTL_VERSION, DPT_CTL_PATCH); /* Add the I/O (data) channel */ diff --git a/sys/dev/raid/dpt/dpt_eisa.c b/sys/dev/raid/dpt/dpt_eisa.c index ad141016d2..08d66ee332 100644 --- a/sys/dev/raid/dpt/dpt_eisa.c +++ b/sys/dev/raid/dpt/dpt_eisa.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/dpt/dpt_eisa.c,v 1.12.2.1 2000/08/07 18:48:14 peter Exp $ - * $DragonFly: src/sys/dev/raid/dpt/dpt_eisa.c,v 1.7 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/raid/dpt/dpt_eisa.c,v 1.8 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -82,7 +82,7 @@ dpt_eisa_probe (device_t dev) conf = dpt_pio_get_conf(io_base + DPT_EISA_EATA_REG_OFFSET); if (!conf) { - printf("dpt: dpt_pio_get_conf() failed.\n"); + kprintf("dpt: dpt_pio_get_conf() failed.\n"); return (ENXIO); } diff --git a/sys/dev/raid/dpt/dpt_scsi.c b/sys/dev/raid/dpt/dpt_scsi.c index 8e988636dd..9863293940 100644 --- a/sys/dev/raid/dpt/dpt_scsi.c +++ b/sys/dev/raid/dpt/dpt_scsi.c @@ -44,7 +44,7 @@ */ #ident "$FreeBSD: src/sys/dev/dpt/dpt_scsi.c,v 1.28.2.3 2003/01/31 02:47:10 grog Exp $" -#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_scsi.c,v 1.11 2006/10/25 20:56:01 dillon Exp $" +#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_scsi.c,v 1.12 2006/12/22 23:26:23 swildner Exp $" #define _DPT_C_ @@ -225,7 +225,7 @@ dptgetccb(struct dpt_softc *dpt) dptallocccbs(dpt); dccb = SLIST_FIRST(&dpt->free_dccb_list); if (dccb == NULL) - printf("dpt%d: Can't malloc DCCB\n", dpt->unit); + kprintf("dpt%d: Can't malloc DCCB\n", dpt->unit); else { SLIST_REMOVE_HEAD(&dpt->free_dccb_list, links); dpt->free_dccbs--; @@ -408,12 +408,12 @@ dpt_pio_get_conf (u_int32_t base) * before we wait on ready status. */ if (dpt_pio_wait(base, HA_RSTATUS, HA_SBUSY, 0)) { - printf("dpt: timeout waiting for controller to become ready\n"); + kprintf("dpt: timeout waiting for controller to become ready\n"); return (NULL); } if (dpt_pio_wait(base, HA_RAUXSTAT, HA_ABUSY, 0)) { - printf("dpt: timetout waiting for adapter ready.\n"); + kprintf("dpt: timetout waiting for adapter ready.\n"); return (NULL); } @@ -429,7 +429,7 @@ dpt_pio_get_conf (u_int32_t base) for (i = 0; i < (sizeof(dpt_conf_t) / 2); i++) { if (dpt_pio_wait(base, HA_RSTATUS, HA_SDRQ, 0)) { - printf("dpt: timeout in data read.\n"); + kprintf("dpt: timeout in data read.\n"); return (NULL); } @@ -438,7 +438,7 @@ dpt_pio_get_conf (u_int32_t base) } if (inb(base + HA_RSTATUS) & HA_SERROR) { - printf("dpt: error reading configuration data.\n"); + kprintf("dpt: error reading configuration data.\n"); return (NULL); } @@ -513,7 +513,7 @@ dpt_get_conf(dpt_softc_t *dpt, dpt_ccb_t *dccb, u_int32_t dccb_busaddr, * the DPT controller is in a NON PC (PCI?) platform). */ if (dpt_raid_busy(dpt)) { - printf("dpt%d WARNING: Get_conf() RSUS failed.\n", + kprintf("dpt%d WARNING: Get_conf() RSUS failed.\n", dpt->unit); crit_exit(); return (0); @@ -530,7 +530,7 @@ dpt_get_conf(dpt_softc_t *dpt, dpt_ccb_t *dccb, u_int32_t dccb_busaddr, if ((result = dpt_send_eata_command(dpt, cp, dccb_busaddr, EATA_CMD_DMA_SEND_CP, 10000, 0, 0, 0)) != 0) { - printf("dpt%d WARNING: Get_conf() failed (%d) to send " + kprintf("dpt%d WARNING: Get_conf() failed (%d) to send " "EATA_CMD_DMA_READ_CONFIG\n", dpt->unit, result); crit_exit(); @@ -623,7 +623,7 @@ dpt_detect_cache(dpt_softc_t *dpt, dpt_ccb_t *dccb, u_int32_t dccb_busaddr, EATA_CMD_DMA_SEND_CP, 10000, 0, 0, 0); if (result != 0) { - printf("dpt%d WARNING: detect_cache() failed (%d) to send " + kprintf("dpt%d WARNING: detect_cache() failed (%d) to send " "EATA_CMD_DMA_SEND_CP\n", dpt->unit, result); crit_exit(); return; @@ -653,7 +653,7 @@ dpt_detect_cache(dpt_softc_t *dpt, dpt_ccb_t *dccb, u_int32_t dccb_busaddr, /* * DPT Log Page layout error */ - printf("dpt%d: NOTICE: Log Page (1) layout error\n", + kprintf("dpt%d: NOTICE: Log Page (1) layout error\n", dpt->unit); return; } @@ -709,7 +709,7 @@ dptexecuteccb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error) if (error != 0) { if (error != EFBIG) - printf("dpt%d: Unexepected error 0x%x returned from " + kprintf("dpt%d: Unexepected error 0x%x returned from " "bus_dmamap_load\n", dpt->unit, error); if (ccb->ccb_h.status == CAM_REQ_INPROG) { xpt_freeze_devq(ccb->ccb_h.path, /*count*/1); @@ -802,7 +802,7 @@ dpt_action(struct cam_sim *sim, union ccb *ccb) if ((dpt->state & DPT_HA_SHUTDOWN_ACTIVE) != 0) { xpt_print_path(ccb->ccb_h.path); - printf("controller is shutdown. Aborting CCB.\n"); + kprintf("controller is shutdown. Aborting CCB.\n"); ccb->ccb_h.status = CAM_NO_HBA; xpt_done(ccb); return; @@ -1233,7 +1233,7 @@ dpt_init(struct dpt_softc *dpt) SLIST_INIT(&dpt->sg_maps); #ifdef DPT_RESET_BOARD - printf("dpt%d: resetting HBA\n", dpt->unit); + kprintf("dpt%d: resetting HBA\n", dpt->unit); dpt_outb(dpt, HA_WCOMMAND, EATA_CMD_RESET); DELAY(750000); /* XXX Shouldn't we poll a status register or something??? */ @@ -1280,7 +1280,7 @@ dpt_init(struct dpt_softc *dpt) sizeof(conf), 0xc1, 7, 1); if (retval != 0) { - printf("dpt%d: Failed to get board configuration\n", dpt->unit); + kprintf("dpt%d: Failed to get board configuration\n", dpt->unit); return (retval); } bcopy(&dccb[1], &conf, sizeof(conf)); @@ -1289,7 +1289,7 @@ dpt_init(struct dpt_softc *dpt) retval = dpt_get_conf(dpt, dccb, sg_map->sg_physaddr + sizeof(dpt_sp_t), sizeof(dpt->board_data), 0, conf.scsi_id0, 0); if (retval != 0) { - printf("dpt%d: Failed to get inquiry information\n", dpt->unit); + kprintf("dpt%d: Failed to get inquiry information\n", dpt->unit); return (retval); } bcopy(&dccb[1], &dpt->board_data, sizeof(dpt->board_data)); @@ -1339,7 +1339,7 @@ dpt_init(struct dpt_softc *dpt) dpt->max_dccbs = ntohs(conf.queuesiz); if (dpt->max_dccbs > 256) { - printf("dpt%d: Max CCBs reduced from %d to " + kprintf("dpt%d: Max CCBs reduced from %d to " "256 due to tag algorithm\n", dpt->unit, dpt->max_dccbs); dpt->max_dccbs = 256; } @@ -1369,7 +1369,7 @@ dpt_init(struct dpt_softc *dpt) /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, &dpt->buffer_dmat) != 0) { - printf("dpt: bus_dma_tag_create(...,dpt->buffer_dmat) failed\n"); + kprintf("dpt: bus_dma_tag_create(...,dpt->buffer_dmat) failed\n"); goto error_exit; } @@ -1385,7 +1385,7 @@ dpt_init(struct dpt_softc *dpt) /*nsegments*/1, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &dpt->dccb_dmat) != 0) { - printf("dpt: bus_dma_tag_create(...,dpt->dccb_dmat) failed\n"); + kprintf("dpt: bus_dma_tag_create(...,dpt->dccb_dmat) failed\n"); goto error_exit; } @@ -1394,7 +1394,7 @@ dpt_init(struct dpt_softc *dpt) /* Allocation for our ccbs and interrupt status packet */ if (bus_dmamem_alloc(dpt->dccb_dmat, (void **)&dpt->dpt_dccbs, BUS_DMA_NOWAIT, &dpt->dccb_dmamap) != 0) { - printf("dpt: bus_dmamem_alloc(dpt->dccb_dmat,...) failed\n"); + kprintf("dpt: bus_dmamem_alloc(dpt->dccb_dmat,...) failed\n"); goto error_exit; } @@ -1420,7 +1420,7 @@ dpt_init(struct dpt_softc *dpt) /* Allocate our first batch of ccbs */ if (dptallocccbs(dpt) == 0) { - printf("dpt: dptallocccbs(dpt) == 0\n"); + kprintf("dpt: dptallocccbs(dpt) == 0\n"); return (2); } @@ -1436,20 +1436,20 @@ dpt_init(struct dpt_softc *dpt) strp += string_sizes[i]; } - printf("dpt%d: %.8s %.16s FW Rev. %.4s, ", + kprintf("dpt%d: %.8s %.16s FW Rev. %.4s, ", dpt->unit, dpt->board_data.vendor, dpt->board_data.modelNum, dpt->board_data.firmware); - printf("%d channel%s, ", dpt->channels, dpt->channels > 1 ? "s" : ""); + kprintf("%d channel%s, ", dpt->channels, dpt->channels > 1 ? "s" : ""); if (dpt->cache_type != DPT_NO_CACHE && dpt->cache_size != 0) { - printf("%s Cache, ", + kprintf("%s Cache, ", dpt->cache_type == DPT_CACHE_WRITETHROUGH ? "Write-Through" : "Write-Back"); } - printf("%d CCBs\n", dpt->max_dccbs); + kprintf("%d CCBs\n", dpt->max_dccbs); return (0); error_exit: @@ -1526,7 +1526,7 @@ dpt_intr(void *arg) */ if (dpt->sp->ccb_busaddr < dpt->dpt_ccb_busbase || dpt->sp->ccb_busaddr >= dpt->dpt_ccb_busend) { - printf("Encountered bogus status packet\n"); + kprintf("Encountered bogus status packet\n"); status = dpt_inb(dpt, HA_RSTATUS); return; } @@ -1537,7 +1537,7 @@ dpt_intr(void *arg) /* Ignore status packets with EOC not set */ if (dpt->sp->EOC == 0) { - printf("dpt%d ERROR: Request %d received with " + kprintf("dpt%d ERROR: Request %d received with " "clear EOC.\n Marking as LOST.\n", dpt->unit, dccb->transaction_id); @@ -1569,12 +1569,12 @@ dpt_intr(void *arg) /* Check that this is not a board reset interrupt */ if (dpt_just_reset(dpt)) { - printf("dpt%d: HBA rebooted.\n" + kprintf("dpt%d: HBA rebooted.\n" " All transactions should be " "resubmitted\n", dpt->unit); - printf("dpt%d: >>---->> This is incomplete, " + kprintf("dpt%d: >>---->> This is incomplete, " "fix me.... <<----<<", dpt->unit); panic("DPT Rebooted"); @@ -1676,8 +1676,8 @@ dptprocesserror(dpt_softc_t *dpt, dpt_ccb_t *dccb, union ccb *ccb, ccb->ccb_h.status = CAM_AUTOSENSE_FAIL; break; default: - printf("dpt%d: Undocumented Error %x\n", dpt->unit, hba_stat); - printf("Please mail this message to shimon@simon-shapiro.org\n"); + kprintf("dpt%d: Undocumented Error %x\n", dpt->unit, hba_stat); + kprintf("Please mail this message to shimon@simon-shapiro.org\n"); ccb->ccb_h.status = CAM_REQ_CMP_ERR; break; } @@ -1696,7 +1696,7 @@ dpttimeout(void *arg) ccb = dccb->ccb; dpt = (struct dpt_softc *)ccb->ccb_h.ccb_dpt_ptr; xpt_print_path(ccb->ccb_h.path); - printf("CCB %p - timed out\n", (void *)dccb); + kprintf("CCB %p - timed out\n", (void *)dccb); crit_enter(); @@ -1710,7 +1710,7 @@ dpttimeout(void *arg) if ((dccb->state & DCCB_ACTIVE) == 0) { xpt_print_path(ccb->ccb_h.path); - printf("CCB %p - timed out CCB already completed\n", + kprintf("CCB %p - timed out CCB already completed\n", (void *)dccb); crit_exit(); return; @@ -1734,7 +1734,7 @@ dptshutdown(void *arg, int howto) dpt = (dpt_softc_t *)arg; - printf("dpt%d: Shutting down (mode %x) HBA. Please wait...\n", + kprintf("dpt%d: Shutting down (mode %x) HBA. Please wait...\n", dpt->unit, howto); /* @@ -1742,7 +1742,7 @@ dptshutdown(void *arg, int howto) */ dpt_send_immediate(dpt, NULL, 0, EATA_POWER_OFF_WARN, 0, 0, 0); DELAY(1000 * 1000 * 5); - printf("dpt%d: Controller was warned of shutdown and is now " + kprintf("dpt%d: Controller was warned of shutdown and is now " "disabled\n", dpt->unit); } @@ -1802,7 +1802,7 @@ dpt_reset_hba(dpt_softc_t *dpt) /* Send the RESET message */ if ((result = dpt_send_eata_command(dpt, &dccb.eata_ccb, EATA_CMD_RESET, 0, 0, 0, 0)) != 0) { - printf("dpt%d: Failed to send the RESET message.\n" + kprintf("dpt%d: Failed to send the RESET message.\n" " Trying cold boot (ouch!)\n", dpt->unit); @@ -1821,7 +1821,7 @@ dpt_reset_hba(dpt_softc_t *dpt) dpt->performance.warm_starts++; #endif /* DPT_MEASURE_PERFORMANCE */ - printf("dpt%d: Aborting pending requests. O/S should re-submit\n", + kprintf("dpt%d: Aborting pending requests. O/S should re-submit\n", dpt->unit); while ((dccbp = TAILQ_FIRST(&dpt->completed_ccbs)) != NULL) { @@ -1848,7 +1848,7 @@ dpt_reset_hba(dpt_softc_t *dpt) } } - printf("dpt%d: reset done aborting all pending commands\n", dpt->unit); + kprintf("dpt%d: reset done aborting all pending commands\n", dpt->unit); dpt->queue_status &= ~DPT_SUBMITTED_QUEUE_ACTIVE; } @@ -1872,7 +1872,7 @@ dpt_target_ccb(dpt_softc_t * dpt, int bus, u_int8_t target, u_int8_t lun, eata_ccb_t *cp; if ((length + offset) > DPT_MAX_TARGET_MODE_BUFFER_SIZE) { - printf("dpt%d: Length of %d, and offset of %d are wrong\n", + kprintf("dpt%d: Length of %d, and offset of %d are wrong\n", dpt->unit, length, offset); length = DPT_MAX_TARGET_MODE_BUFFER_SIZE; offset = 0; @@ -1917,7 +1917,7 @@ dpt_target_ccb(dpt_softc_t * dpt, int bus, u_int8_t target, u_int8_t lun, */ if (dpt_scatter_gather(dpt, ccb, DPT_RW_BUFFER_SIZE, dpt->rw_buffer[bus][target][lun])) { - printf("dpt%d: Failed to setup Scatter/Gather for " + kprintf("dpt%d: Failed to setup Scatter/Gather for " "Target-Mode buffer\n", dpt->unit); } } @@ -1947,7 +1947,7 @@ dpt_set_target(int redo, dpt_softc_t * dpt, crit_exit(); } else { - printf("dpt%d: Target Mode Request, but Target Mode is OFF\n", + kprintf("dpt%d: Target Mode Request, but Target Mode is OFF\n", dpt->unit); } } @@ -1993,7 +1993,7 @@ valid_unit: crit_enter(); /* Process the free list */ if ((TAILQ_EMPTY(&dpt->free_ccbs)) && dpt_alloc_freelist(dpt)) { - printf("dpt%d ERROR: Cannot allocate any more free CCB's.\n" + kprintf("dpt%d ERROR: Cannot allocate any more free CCB's.\n" " Please try later\n", dpt->unit); crit_exit(); @@ -2081,7 +2081,7 @@ dpt_target_done(dpt_softc_t * dpt, int bus, dpt_ccb_t * ccb) br_lun, ccb->status_packet.hba_stat); break; default: - printf("dpt%d: %s is an unsupported command for target mode\n", + kprintf("dpt%d: %s is an unsupported command for target mode\n", dpt->unit, scsi_cmd_name(ccb->eata_ccb.cp_scsi_cmd)); } crit_enter(); @@ -2131,7 +2131,7 @@ valid_unit: /* Process the free list */ if ((TAILQ_EMPTY(&dpt->free_ccbs)) && dpt_alloc_freelist(dpt)) { - printf("dpt%d ERROR: Cannot allocate any more free CCB's.\n" + kprintf("dpt%d ERROR: Cannot allocate any more free CCB's.\n" " Please try later\n", dpt->unit); crit_exit(); @@ -2244,7 +2244,7 @@ dpt_user_cmd(dpt_softc_t * dpt, eata_pt_t * user_cmd, /* Process the free list */ if ((TAILQ_EMPTY(&dpt->free_ccbs)) && dpt_alloc_freelist(dpt)) { - printf("dpt%d ERROR: Cannot allocate any more free CCB's.\n" + kprintf("dpt%d ERROR: Cannot allocate any more free CCB's.\n" " Please try later\n", dpt->unit); crit_exit(); @@ -2288,7 +2288,7 @@ dpt_user_cmd(dpt_softc_t * dpt, eata_pt_t * user_cmd, } if (data == NULL) { - printf("dpt%d: Cannot allocate %d bytes " + kprintf("dpt%d: Cannot allocate %d bytes " "for EATA command\n", dpt->unit, ccb->eata_ccb.cp_datalen); return (EFAULT); @@ -2469,7 +2469,7 @@ dpt_handle_timeouts(dpt_softc_t * dpt) crit_enter(); if (dpt->state & DPT_HA_TIMEOUTS_ACTIVE) { - printf("dpt%d WARNING: Timeout Handling Collision\n", + kprintf("dpt%d WARNING: Timeout Handling Collision\n", dpt->unit); crit_exit(); return; @@ -2511,7 +2511,7 @@ dpt_handle_timeouts(dpt_softc_t * dpt) ccb->state |= DPT_CCB_STATE_ABORTED; #define cmd_name scsi_cmd_name(ccb->eata_ccb.cp_scsi_cmd) if (ccb->retries++ > DPT_RETRIES) { - printf("dpt%d ERROR: Destroying stale " + kprintf("dpt%d ERROR: Destroying stale " "%d (%s)\n" " on " "c%db%dt%du%d (%d/%d)\n", @@ -2535,7 +2535,7 @@ dpt_handle_timeouts(dpt_softc_t * dpt) xs->flags |= SCSI_ITSDONE; scsi_done(xs); } else { - printf("dpt%d ERROR: Stale %d (%s) on " + kprintf("dpt%d ERROR: Stale %d (%s) on " "c%db%dt%du%d (%d)\n" " gets another " "chance(%d/%d)\n", @@ -2561,7 +2561,7 @@ dpt_handle_timeouts(dpt_softc_t * dpt) */ if (!(ccb->state & DPT_CCB_STATE_MARKED_LOST) && (age != ~0) && (age > max_age)) { - printf("dpt%d ERROR: Marking %d (%s) on " + kprintf("dpt%d ERROR: Marking %d (%s) on " "c%db%dt%du%d \n" " as late after %dusec\n", dpt->unit, ccb->transaction_id, diff --git a/sys/dev/raid/ida/ida.c b/sys/dev/raid/ida/ida.c index 5682447236..802ef46dbf 100644 --- a/sys/dev/raid/ida/ida.c +++ b/sys/dev/raid/ida/ida.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ida/ida.c,v 1.7.2.3 2001/03/01 01:57:32 ps Exp $ - * $DragonFly: src/sys/dev/raid/ida/ida.c,v 1.14 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ida/ida.c,v 1.15 2006/12/22 23:26:23 swildner Exp $ */ /* @@ -334,7 +334,7 @@ ida_command(struct ida_softc *ida, int command, void *data, int datasize, crit_exit(); if (qcb == NULL) { - printf("ida_command: out of QCBs"); + kprintf("ida_command: out of QCBs"); return (EAGAIN); } diff --git a/sys/dev/raid/iir/iir.c b/sys/dev/raid/iir/iir.c index fd3ac803fa..5c37d86d1e 100644 --- a/sys/dev/raid/iir/iir.c +++ b/sys/dev/raid/iir/iir.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/iir/iir.c,v 1.2.2.3 2002/05/05 08:18:12 asmodai Exp $ */ -/* $DragonFly: src/sys/dev/raid/iir/iir.c,v 1.15 2006/12/20 18:14:40 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/iir/iir.c,v 1.16 2006/12/22 23:26:23 swildner Exp $ */ /* * Copyright (c) 2000-01 Intel Corporation * All Rights Reserved @@ -123,7 +123,7 @@ static void ser_putc(int c) } int -ser_printf(const char *fmt, ...) +ser_kprintf(const char *fmt, ...) { __va_list args; int i; @@ -210,7 +210,7 @@ iir_init(struct gdt_softc *gdt) /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, &gdt->sc_buffer_dmat) != 0) { - printf("iir%d: bus_dma_tag_create(...,gdt->sc_buffer_dmat) failed\n", + kprintf("iir%d: bus_dma_tag_create(...,gdt->sc_buffer_dmat) failed\n", gdt->sc_hanum); return (1); } @@ -225,7 +225,7 @@ iir_init(struct gdt_softc *gdt) /*nsegments*/1, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, &gdt->sc_gccb_dmat) != 0) { - printf("iir%d: bus_dma_tag_create(...,gdt->sc_gccb_dmat) failed\n", + kprintf("iir%d: bus_dma_tag_create(...,gdt->sc_gccb_dmat) failed\n", gdt->sc_hanum); return (1); } @@ -234,7 +234,7 @@ iir_init(struct gdt_softc *gdt) /* Allocation for our ccbs */ if (bus_dmamem_alloc(gdt->sc_gccb_dmat, (void **)&gdt->sc_gccbs, BUS_DMA_NOWAIT, &gdt->sc_gccb_dmamap) != 0) { - printf("iir%d: bus_dmamem_alloc(...,&gdt->sc_gccbs,...) failed\n", + kprintf("iir%d: bus_dmamem_alloc(...,&gdt->sc_gccbs,...) failed\n", gdt->sc_hanum); return (1); } @@ -268,14 +268,14 @@ iir_init(struct gdt_softc *gdt) /* allocate ccb for gdt_internal_cmd() */ gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", + kprintf("iir%d: No free command index found\n", gdt->sc_hanum); return (1); } if (!gdt_internal_cmd(gdt, gccb, GDT_SCREENSERVICE, GDT_INIT, 0, 0, 0)) { - printf("iir%d: Screen service initialization error %d\n", + kprintf("iir%d: Screen service initialization error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); @@ -283,7 +283,7 @@ iir_init(struct gdt_softc *gdt) if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INIT, GDT_LINUX_OS, 0, 0)) { - printf("iir%d: Cache service initialization error %d\n", + kprintf("iir%d: Cache service initialization error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); @@ -293,7 +293,7 @@ iir_init(struct gdt_softc *gdt) if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_MOUNT, 0xffff, 1, 0)) { - printf("iir%d: Cache service mount error %d\n", + kprintf("iir%d: Cache service mount error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); @@ -301,7 +301,7 @@ iir_init(struct gdt_softc *gdt) if (!gdt_internal_cmd(gdt, gccb, GDT_CACHESERVICE, GDT_INIT, GDT_LINUX_OS, 0, 0)) { - printf("iir%d: Cache service post-mount initialization error %d\n", + kprintf("iir%d: Cache service post-mount initialization error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); @@ -333,7 +333,7 @@ iir_init(struct gdt_softc *gdt) GDT_IO_CHANNEL | GDT_INVALID_CHANNEL, GDT_GETCH_SZ)) { if (i == 0) { - printf("iir%d: Cannot get channel count, " + kprintf("iir%d: Cannot get channel count, " "error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); @@ -352,7 +352,7 @@ iir_init(struct gdt_softc *gdt) if (!gdt_internal_cmd(gdt, gccb, GDT_SCSIRAWSERVICE, GDT_INIT, 0, 0, 0)) { - printf("iir%d: Raw service initialization error %d\n", + kprintf("iir%d: Raw service initialization error %d\n", gdt->sc_hanum, gdt->sc_status); gdt_free_ccb(gdt, gccb); return (1); @@ -1028,7 +1028,7 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt_ucmd_t *ucmd) sizeof(u_int32_t)); cnt = ucmd->u.ioctl.param_size; if (cnt > GDT_SCRATCH_SZ) { - printf("iir%d: Scratch buffer too small (%d/%d)\n", + kprintf("iir%d: Scratch buffer too small (%d/%d)\n", gdt->sc_hanum, GDT_SCRATCH_SZ, cnt); gdt_free_ccb(gdt, gccb); return (NULL); @@ -1038,7 +1038,7 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt_ucmd_t *ucmd) GDT_SG_SZ, sizeof(u_int32_t)); cnt = ucmd->u.cache.BlockCnt * GDT_SECTOR_SIZE; if (cnt > GDT_SCRATCH_SZ) { - printf("iir%d: Scratch buffer too small (%d/%d)\n", + kprintf("iir%d: Scratch buffer too small (%d/%d)\n", gdt->sc_hanum, GDT_SCRATCH_SZ, cnt); gdt_free_ccb(gdt, gccb); return (NULL); @@ -1049,7 +1049,7 @@ gdt_ioctl_cmd(struct gdt_softc *gdt, gdt_ucmd_t *ucmd) GDT_SG_SZ, sizeof(u_int32_t)); cnt = ucmd->u.raw.sdlen; if (cnt + ucmd->u.raw.sense_len > GDT_SCRATCH_SZ) { - printf("iir%d: Scratch buffer too small (%d/%d)\n", + kprintf("iir%d: Scratch buffer too small (%d/%d)\n", gdt->sc_hanum, GDT_SCRATCH_SZ, cnt + ucmd->u.raw.sense_len); gdt_free_ccb(gdt, gccb); return (NULL); @@ -1509,7 +1509,7 @@ iir_shutdown( void *arg, int howto ) gdt = (struct gdt_softc *)arg; GDT_DPRINTF(GDT_D_CMD, ("iir_shutdown(%p, %d)\n", gdt, howto)); - printf("iir%d: Flushing all Host Drives. Please wait ... ", + kprintf("iir%d: Flushing all Host Drives. Please wait ... ", gdt->sc_hanum); /* allocate ucmd buffer */ @@ -1539,7 +1539,7 @@ iir_shutdown( void *arg, int howto ) } kfree(ucmd, M_DEVBUF); - printf("Done.\n"); + kprintf("Done.\n"); } void @@ -1681,7 +1681,7 @@ gdt_async_event(struct gdt_softc *gdt, int service) bzero(gdt->sc_cmd, GDT_CMD_SZ); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", + kprintf("iir%d: No free command index found\n", gdt->sc_hanum); return (1); } @@ -1701,7 +1701,7 @@ gdt_async_event(struct gdt_softc *gdt, int service) sizeof(u_int32_t)); gdt->sc_cmd_cnt = 0; gdt->sc_copy_cmd(gdt, gccb); - printf("iir%d: [PCI %d/%d] ", + kprintf("iir%d: [PCI %d/%d] ", gdt->sc_hanum,gdt->sc_bus,gdt->sc_slot); gdt->sc_release_event(gdt); } @@ -1721,7 +1721,7 @@ gdt_async_event(struct gdt_softc *gdt, int service) *(u_int32_t *)gdt->sc_dvr.eu.async.scsi_coord = gdt->sc_info2; } gdt_store_event(GDT_ES_ASYNC, service, &gdt->sc_dvr); - printf("iir%d: %s\n", gdt->sc_hanum, gdt->sc_dvr.event_string); + kprintf("iir%d: %s\n", gdt->sc_hanum, gdt->sc_dvr.event_string); } return (0); @@ -1747,7 +1747,7 @@ gdt_sync_event(struct gdt_softc *gdt, int service, if (!(gccb->gc_scratch[GDT_SCR_MSG_ANSWER] && gccb->gc_scratch[GDT_SCR_MSG_EXT])) { gccb->gc_scratch[GDT_SCR_MSG_TEXT + msg_len] = '\0'; - printf("%s",&gccb->gc_scratch[GDT_SCR_MSG_TEXT]); + kprintf("%s",&gccb->gc_scratch[GDT_SCR_MSG_TEXT]); } if (gccb->gc_scratch[GDT_SCR_MSG_EXT] && @@ -1757,7 +1757,7 @@ gdt_sync_event(struct gdt_softc *gdt, int service, bzero(gdt->sc_cmd, GDT_CMD_SZ); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", + kprintf("iir%d: No free command index found\n", gdt->sc_hanum); return (1); } @@ -1802,7 +1802,7 @@ gdt_sync_event(struct gdt_softc *gdt, int service, bzero(gdt->sc_cmd, GDT_CMD_SZ); gccb = gdt_get_ccb(gdt); if (gccb == NULL) { - printf("iir%d: No free command index found\n", + kprintf("iir%d: No free command index found\n", gdt->sc_hanum); return (1); } @@ -1825,7 +1825,7 @@ gdt_sync_event(struct gdt_softc *gdt, int service, gdt->sc_release_event(gdt); return (0); } - printf("\n"); + kprintf("\n"); return (0); } else { callout_stop(&ccb->ccb_h.timeout_ch); diff --git a/sys/dev/raid/iir/iir.h b/sys/dev/raid/iir/iir.h index 618c0620b5..476245d338 100644 --- a/sys/dev/raid/iir/iir.h +++ b/sys/dev/raid/iir/iir.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/iir/iir.h,v 1.3.2.2 2002/05/04 08:49:50 msmith Exp $ */ -/* $DragonFly: src/sys/dev/raid/iir/iir.h,v 1.6 2006/09/10 01:26:35 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/iir/iir.h,v 1.7 2006/12/22 23:26:23 swildner Exp $ */ /* * Copyright (c) 2000-01 Intel Corporation * All Rights Reserved @@ -357,9 +357,9 @@ extern int gdt_debug; #ifdef __SERIAL__ extern int ser_printf(const char *fmt, ...); -#define GDT_DPRINTF(mask, args) if (gdt_debug & (mask)) ser_printf args +#define GDT_DPRINTF(mask, args) if (gdt_debug & (mask)) ser_kprintf args #else -#define GDT_DPRINTF(mask, args) if (gdt_debug & (mask)) printf args +#define GDT_DPRINTF(mask, args) if (gdt_debug & (mask)) kprintf args #endif #else #define GDT_DPRINTF(mask, args) diff --git a/sys/dev/raid/iir/iir_pci.c b/sys/dev/raid/iir/iir_pci.c index b685cd8ce9..1e4ae14edb 100644 --- a/sys/dev/raid/iir/iir_pci.c +++ b/sys/dev/raid/iir/iir_pci.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/iir/iir_pci.c,v 1.3.2.3 2002/05/05 08:18:12 asmodai Exp $ */ -/* $DragonFly: src/sys/dev/raid/iir/iir_pci.c,v 1.6 2006/10/25 20:56:01 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/iir/iir_pci.c,v 1.7 2006/12/22 23:26:23 swildner Exp $ */ /* * Copyright (c) 2000-01 Intel Corporation * All Rights Reserved @@ -223,7 +223,7 @@ iir_pci_attach(device_t dev) htole32(GDT_MPR_MAGIC)); if (bus_space_read_4(gdt->sc_dpmemt, gdt->sc_dpmemh, GDT_MPR_IC) != htole32(GDT_MPR_MAGIC)) { - printf("cannot access DPMEM at 0x%x (shadowed?)\n", + kprintf("cannot access DPMEM at 0x%x (shadowed?)\n", gdt->sc_dpmembase); error = ENXIO; goto err; @@ -252,7 +252,7 @@ iir_pci_attach(device_t dev) while (bus_space_read_1(gdt->sc_dpmemt, gdt->sc_dpmemh, GDT_MPR_IC + GDT_S_STATUS) != 0xff) { if (--retries == 0) { - printf("DEINIT failed\n"); + kprintf("DEINIT failed\n"); error = ENXIO; goto err; } @@ -264,7 +264,7 @@ iir_pci_attach(device_t dev) bus_space_write_1(gdt->sc_dpmemt, gdt->sc_dpmemh, GDT_MPR_IC + GDT_S_STATUS, 0); if (protocol != GDT_PROTOCOL_VERSION) { - printf("unsupported protocol %d\n", protocol); + kprintf("unsupported protocol %d\n", protocol); error = ENXIO; goto err; } @@ -289,7 +289,7 @@ iir_pci_attach(device_t dev) while (bus_space_read_1(gdt->sc_dpmemt, gdt->sc_dpmemh, GDT_MPR_IC + GDT_S_STATUS) != 0xfe) { if (--retries == 0) { - printf("initialization error\n"); + kprintf("initialization error\n"); error = ENXIO; goto err; } diff --git a/sys/dev/raid/ips/ips.c b/sys/dev/raid/ips/ips.c index 18b3e9ebc2..0b0ea887c4 100644 --- a/sys/dev/raid/ips/ips.c +++ b/sys/dev/raid/ips/ips.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips.c,v 1.12 2004/05/30 04:01:29 scottl Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips.c,v 1.18 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips.c,v 1.19 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -798,7 +798,7 @@ ips_issue_copperhead_cmd(ips_command_t *command) for (i = 0; ips_read_4(command->sc, COPPER_REG_CCCR) & COPPER_SEM_BIT; i++) { if (i == 20) { - printf("sem bit still set, can't send a command\n"); + kprintf("sem bit still set, can't send a command\n"); crit_exit(); return; } @@ -812,5 +812,5 @@ ips_issue_copperhead_cmd(ips_command_t *command) void ips_copperhead_poll(ips_command_t *command) { - printf("ips: cmd polling not implemented for copperhead devices\n"); + kprintf("ips: cmd polling not implemented for copperhead devices\n"); } diff --git a/sys/dev/raid/ips/ips.h b/sys/dev/raid/ips/ips.h index cbbf48f2db..2784e171de 100644 --- a/sys/dev/raid/ips/ips.h +++ b/sys/dev/raid/ips/ips.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips.h,v 1.10 2004/05/30 20:08:34 phk Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips.h,v 1.12 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips.h,v 1.13 2006/12/22 23:26:23 swildner Exp $ */ @@ -225,7 +225,7 @@ MALLOC_DECLARE(M_IPSBUF); #define PRINTF(x...) #else #define DEVICE_PRINTF(level,x...) if(IPS_DEBUG >= level)device_printf(x) -#define PRINTF(level,x...) if(IPS_DEBUG >= level)printf(x) +#define PRINTF(level,x...) if(IPS_DEBUG >= level)kprintf(x) #endif /* diff --git a/sys/dev/raid/ips/ips_commands.c b/sys/dev/raid/ips/ips_commands.c index 01b63d75f5..9a1f9cd5ca 100644 --- a/sys/dev/raid/ips/ips_commands.c +++ b/sys/dev/raid/ips/ips_commands.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips_commands.c,v 1.10 2004/05/30 04:01:29 scottl Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips_commands.c,v 1.12 2006/03/24 18:35:32 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips_commands.c,v 1.13 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -107,7 +107,7 @@ ips_io_request_callback(void *cmdptr, bus_dma_segment_t *segments, int segnum, sc = command->sc; if (error) { - printf("ips: error = %d in ips_sg_request_callback\n", error); + kprintf("ips: error = %d in ips_sg_request_callback\n", error); bus_dmamap_unload(command->data_dmatag, command->data_dmamap); bp->b_flags |= B_ERROR; bp->b_error = ENOMEM; @@ -215,7 +215,7 @@ ips_adapter_info_callback(void *cmdptr, bus_dma_segment_t *segments,int segnum, if (error) { command->status.value = IPS_ERROR_STATUS; /* a lovely error value */ ips_insert_free_cmd(sc, command); - printf("ips: error = %d in ips_get_adapter_info\n", error); + kprintf("ips: error = %d in ips_get_adapter_info\n", error); return; } command_struct = (ips_adapter_info_cmd *)command->command_buffer; @@ -248,7 +248,7 @@ ips_send_adapter_info_cmd(ips_command_t *command) /* maxsegsize*/ IPS_ADAPTER_INFO_LEN, /* flags */ 0, &command->data_dmatag) != 0) { - printf("ips: can't alloc dma tag for adapter status\n"); + kprintf("ips: can't alloc dma tag for adapter status\n"); error = ENOMEM; goto exit; } @@ -315,7 +315,7 @@ ips_drive_info_callback(void *cmdptr, bus_dma_segment_t *segments, int segnum, command->status.value = IPS_ERROR_STATUS; ips_insert_free_cmd(sc, command); - printf("ips: error = %d in ips_get_drive_info\n", error); + kprintf("ips: error = %d in ips_get_drive_info\n", error); return; } command_struct = (ips_drive_cmd *)command->command_buffer; @@ -348,7 +348,7 @@ ips_send_drive_info_cmd(ips_command_t *command) /* maxsegsize*/ IPS_DRIVE_INFO_LEN, /* flags */ 0, &command->data_dmatag) != 0) { - printf("ips: can't alloc dma tag for drive status\n"); + kprintf("ips: can't alloc dma tag for drive status\n"); error = ENOMEM; goto exit; } @@ -573,7 +573,7 @@ ips_read_nvram_callback(void *cmdptr, bus_dma_segment_t *segments, int segnum, if (error) { command->status.value = IPS_ERROR_STATUS; ips_insert_free_cmd(sc, command); - printf("ips: error = %d in ips_read_nvram_callback\n", error); + kprintf("ips: error = %d in ips_read_nvram_callback\n", error); return; } command_struct = (ips_rw_nvram_cmd *)command->command_buffer; @@ -608,7 +608,7 @@ ips_read_nvram(ips_command_t *command) /* maxsegsize*/ IPS_NVRAM_PAGE_SIZE, /* flags */ 0, &command->data_dmatag) != 0) { - printf("ips: can't alloc dma tag for nvram\n"); + kprintf("ips: can't alloc dma tag for nvram\n"); error = ENOMEM; goto exit; } diff --git a/sys/dev/raid/ips/ips_disk.c b/sys/dev/raid/ips/ips_disk.c index 09ef3cd5dc..9b36da4e37 100644 --- a/sys/dev/raid/ips/ips_disk.c +++ b/sys/dev/raid/ips/ips_disk.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips_disk.c,v 1.4 2003/09/22 04:59:07 njl Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips_disk.c,v 1.10 2006/09/10 01:26:35 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips_disk.c,v 1.11 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -217,7 +217,7 @@ ipsd_detach(device_t dev) static int ipsd_dump_helper(struct dev_dump_args *ap) { - printf("dump support for IPS not yet working, will not dump\n"); + kprintf("dump support for IPS not yet working, will not dump\n"); return (ENODEV); #if 0 @@ -273,7 +273,7 @@ ipsd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, sc = dsc->sc; if (ips_get_free_cmd(sc, &command, 0) != 0) { - printf("ipsd: failed to get cmd for dump\n"); + kprintf("ipsd: failed to get cmd for dump\n"); return (ENOMEM); } @@ -322,7 +322,7 @@ ipsd_dump_map_sg(void *arg, bus_dma_segment_t *segs, int nsegs, int error) length = 0; if (error) { - printf("ipsd_dump_map_sg: error %d\n", error); + kprintf("ipsd_dump_map_sg: error %d\n", error); command->status.value = IPS_ERROR_STATUS; return; } @@ -364,7 +364,7 @@ static void ipsd_dump_block_complete(ips_command_t *command) { if (COMMAND_ERROR(&command->status)) { - printf("ipsd_dump completion error= 0x%x\n", + kprintf("ipsd_dump completion error= 0x%x\n", command->status.value); } bus_dmamap_sync(command->data_dmatag, command->data_dmamap, diff --git a/sys/dev/raid/ips/ips_pci.c b/sys/dev/raid/ips/ips_pci.c index ddd763977b..bdb1e1096c 100644 --- a/sys/dev/raid/ips/ips_pci.c +++ b/sys/dev/raid/ips/ips_pci.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips_pci.c,v 1.10 2004/03/19 17:36:47 scottl Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips_pci.c,v 1.16 2006/06/04 21:09:50 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips_pci.c,v 1.17 2006/12/22 23:26:23 swildner Exp $ */ #include @@ -148,7 +148,7 @@ ips_pci_attach(device_t dev) /* maxsegsize*/ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, &sc->adapter_dmatag) != 0) { - printf("IPS can't alloc dma tag\n"); + kprintf("IPS can't alloc dma tag\n"); goto error; } sc->ips_ich.ich_func = ips_intrhook; @@ -157,7 +157,7 @@ ips_pci_attach(device_t dev) lockinit(&sc->queue_lock, "ipslk", 0, 0); bioq_init(&sc->bio_queue); if (config_intrhook_establish(&sc->ips_ich) != 0) { - printf("IPS can't establish configuration hook\n"); + kprintf("IPS can't establish configuration hook\n"); goto error; } return 0; diff --git a/sys/dev/raid/mlx/mlx.c b/sys/dev/raid/mlx/mlx.c index 0adbfea2fb..beb301db73 100644 --- a/sys/dev/raid/mlx/mlx.c +++ b/sys/dev/raid/mlx/mlx.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlx.c,v 1.14.2.5 2001/09/11 09:49:53 kris Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.23 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.24 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -608,9 +608,9 @@ mlx_shutdown(device_t dev) /* flush controller */ device_printf(sc->mlx_dev, "flushing cache..."); if (mlx_flush(sc)) { - printf("failed\n"); + kprintf("failed\n"); } else { - printf("done\n"); + kprintf("done\n"); } /* delete all our child devices */ @@ -642,7 +642,7 @@ mlx_suspend(device_t dev) /* flush controller */ device_printf(sc->mlx_dev, "flushing cache..."); - printf("%s\n", mlx_flush(sc) ? "failed" : "done"); + kprintf("%s\n", mlx_flush(sc) ? "failed" : "done"); sc->mlx_intaction(sc, MLX_INTACTION_DISABLE); crit_exit(); @@ -803,9 +803,9 @@ mlx_ioctl(struct dev_ioctl_args *ap) detach_out: if (error) { - printf("failed\n"); + kprintf("failed\n"); } else { - printf("done\n"); + kprintf("done\n"); } return(error); diff --git a/sys/dev/raid/mlx/mlxvar.h b/sys/dev/raid/mlx/mlxvar.h index 0261626827..f5735cd0b3 100644 --- a/sys/dev/raid/mlx/mlxvar.h +++ b/sys/dev/raid/mlx/mlxvar.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlxvar.h,v 1.5.2.3 2001/06/25 04:37:51 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlxvar.h,v 1.9 2006/09/10 01:26:36 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlxvar.h,v 1.10 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -34,8 +34,8 @@ * 2 - extremely noisy, emit trace items in loops, etc. */ #ifdef MLX_DEBUG -#define debug(level, fmt, args...) do { if (level <= MLX_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); } while(0) -#define debug_called(level) do { if (level <= MLX_DEBUG) printf(__func__ ": called\n"); } while(0) +#define debug(level, fmt, args...) do { if (level <= MLX_DEBUG) kprintf("%s: " fmt "\n", __func__ , ##args); } while(0) +#define debug_called(level) do { if (level <= MLX_DEBUG) kprintf(__func__ ": called\n"); } while(0) #else #define debug(level, fmt, args...) #define debug_called(level) diff --git a/sys/dev/raid/mly/mly.c b/sys/dev/raid/mly/mly.c index 873ebe90a9..1cf6ca9b34 100644 --- a/sys/dev/raid/mly/mly.c +++ b/sys/dev/raid/mly/mly.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mly/mly.c,v 1.3.2.3 2001/03/05 20:17:24 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.16 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.17 2006/12/22 23:26:24 swildner Exp $ */ #include @@ -222,7 +222,7 @@ mly_detach(struct mly_softc *sc) /* flush controller */ mly_printf(sc, "flushing cache..."); - printf("%s\n", mly_flush(sc) ? "failed" : "done"); + kprintf("%s\n", mly_flush(sc) ? "failed" : "done"); MLY_MASK_INTERRUPTS(sc); } @@ -1666,7 +1666,7 @@ mly_print_controller(int controller) struct mly_softc *sc; if ((sc = devclass_get_softc(devclass_find("mly"), controller)) == NULL) { - printf("mly: controller %d invalid\n", controller); + kprintf("mly: controller %d invalid\n", controller); } else { device_printf(sc->mly_dev, "queue curr max\n"); device_printf(sc->mly_dev, "free %04d/%04d\n", diff --git a/sys/dev/raid/mly/mlyvar.h b/sys/dev/raid/mly/mlyvar.h index b6de5670f2..b5d104bcb2 100644 --- a/sys/dev/raid/mly/mlyvar.h +++ b/sys/dev/raid/mly/mlyvar.h @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mly/mlyvar.h,v 1.1.2.2 2001/03/05 20:17:24 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mly/mlyvar.h,v 1.7 2006/09/10 01:26:36 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mly/mlyvar.h,v 1.8 2006/12/22 23:26:24 swildner Exp $ */ #include @@ -78,11 +78,11 @@ * 2 - extremely noisy, emit trace items in loops, etc. */ #ifdef MLY_DEBUG -# define debug(level, fmt, args...) do { if (level <= MLY_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); } while(0) -# define debug_called(level) do { if (level <= MLY_DEBUG) printf(__func__ ": called\n"); } while(0) -# define debug_struct(s) printf(" SIZE %s: %d\n", #s, sizeof(struct s)) -# define debug_union(s) printf(" SIZE %s: %d\n", #s, sizeof(union s)) -# define debug_field(s, f) printf(" OFFSET %s.%s: %d\n", #s, #f, ((int)&(((struct s *)0)->f))) +# define debug(level, fmt, args...) do { if (level <= MLY_DEBUG) kprintf("%s: " fmt "\n", __func__ , ##args); } while(0) +# define debug_called(level) do { if (level <= MLY_DEBUG) kprintf(__func__ ": called\n"); } while(0) +# define debug_struct(s) kprintf(" SIZE %s: %d\n", #s, sizeof(struct s)) +# define debug_union(s) kprintf(" SIZE %s: %d\n", #s, sizeof(union s)) +# define debug_field(s, f) kprintf(" OFFSET %s.%s: %d\n", #s, #f, ((int)&(((struct s *)0)->f))) extern void mly_printstate0(void); extern struct mly_softc *mly_softc0; #else diff --git a/sys/dev/raid/pst/pst-iop.c b/sys/dev/raid/pst/pst-iop.c index 9761adaf19..1299815985 100644 --- a/sys/dev/raid/pst/pst-iop.c +++ b/sys/dev/raid/pst/pst-iop.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pst/pst-iop.c,v 1.2.2.1 2002/08/18 12:32:36 sos Exp $ - * $DragonFly: src/sys/dev/raid/pst/pst-iop.c,v 1.10 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/raid/pst/pst-iop.c,v 1.11 2006/12/22 23:26:24 swildner Exp $ */ #include @@ -60,7 +60,7 @@ iop_init(struct iop_softc *sc) while ((mfa = sc->reg->iqueue) == 0xffffffff && --timeout) DELAY(1000); if (!timeout) { - printf("pstiop: no free mfa\n"); + kprintf("pstiop: no free mfa\n"); return 0; } iop_free_mfa(sc, mfa); @@ -68,12 +68,12 @@ iop_init(struct iop_softc *sc) sc->reg->oqueue_intr_mask = 0xffffffff; if (!iop_reset(sc)) { - printf("pstiop: no reset response\n"); + kprintf("pstiop: no reset response\n"); return 0; } if (!iop_init_outqueue(sc)) { - printf("pstiop: init outbound queue failed\n"); + kprintf("pstiop: init outbound queue failed\n"); return 0; } @@ -84,7 +84,7 @@ iop_init(struct iop_softc *sc) sc->iop_delayed_attach->ich_arg = (void *)sc; sc->iop_delayed_attach->ich_desc = "pst"; if (config_intrhook_establish(sc->iop_delayed_attach)) { - printf("pstiop: config_intrhook_establish failed\n"); + kprintf("pstiop: config_intrhook_establish failed\n"); kfree(sc->iop_delayed_attach, M_PSTIOP); } return 1; @@ -102,7 +102,7 @@ iop_attach(struct iop_softc *sc) } if (!iop_get_lct(sc)) { - printf("pstiop: get LCT failed\n"); + kprintf("pstiop: get LCT failed\n"); return; } @@ -111,21 +111,21 @@ iop_attach(struct iop_softc *sc) #ifdef PSTDEBUG struct i2o_get_param_reply *reply; - printf("pstiop: LCT entry %d ", i); - printf("class=%04x ", sc->lct[i].class); - printf("sub=%04x ", sc->lct[i].sub_class); - printf("localtid=%04x ", sc->lct[i].local_tid); - printf("usertid=%04x ", sc->lct[i].user_tid); - printf("parentid=%04x\n", sc->lct[i].parent_tid); + kprintf("pstiop: LCT entry %d ", i); + kprintf("class=%04x ", sc->lct[i].class); + kprintf("sub=%04x ", sc->lct[i].sub_class); + kprintf("localtid=%04x ", sc->lct[i].local_tid); + kprintf("usertid=%04x ", sc->lct[i].user_tid); + kprintf("parentid=%04x\n", sc->lct[i].parent_tid); if ((reply = iop_get_util_params(sc, sc->lct[i].local_tid, I2O_PARAMS_OPERATION_FIELD_GET, I2O_UTIL_DEVICE_IDENTITY_GROUP_NO))) { struct i2o_device_identity *ident = (struct i2o_device_identity *)reply->result; - printf("pstiop: vendor=<%.16s> product=<%.16s>\n", + kprintf("pstiop: vendor=<%.16s> product=<%.16s>\n", ident->vendor, ident->product); - printf("pstiop: description=<%.16s> revision=<%.8s>\n", + kprintf("pstiop: description=<%.16s> revision=<%.8s>\n", ident->description, ident->revision); contigfree(reply, PAGE_SIZE, M_PSTIOP); } @@ -166,7 +166,7 @@ iop_intr(void *data) struct i2o_util_event_reply_message *event = (struct i2o_util_event_reply_message *)reply; - printf("pstiop: EVENT!! idx=%08x data=%08x\n", + kprintf("pstiop: EVENT!! idx=%08x data=%08x\n", event->event_mask, event->event_data[0]); return; } @@ -226,7 +226,7 @@ iop_init_outqueue(struct iop_softc *sc) M_PSTIOP, M_NOWAIT, 0x00010000, 0xFFFFFFFF, sizeof(u_int32_t), 0))) { - printf("pstiop: contigmalloc of outqueue buffers failed!\n"); + kprintf("pstiop: contigmalloc of outqueue buffers failed!\n"); return 0; } sc->phys_obase = vtophys(sc->obase); @@ -256,7 +256,7 @@ iop_init_outqueue(struct iop_softc *sc) DELAY(1000); if (!timeout) { - printf("pstiop: timeout waiting for init-complete response\n"); + kprintf("pstiop: timeout waiting for init-complete response\n"); iop_free_mfa(sc, mfa); return 0; } @@ -372,7 +372,7 @@ iop_get_mfa(struct iop_softc *sc) timeout--; } if (!timeout) - printf("pstiop: no free mfa\n"); + kprintf("pstiop: no free mfa\n"); return mfa; } @@ -402,7 +402,7 @@ iop_queue_wait_msg(struct iop_softc *sc, int mfa, struct i2o_basic_message *msg) while (--timeout && ((out_mfa = sc->reg->oqueue) == 0xffffffff)) DELAY(1000); if (!timeout) { - printf("pstiop: timeout waiting for message response\n"); + kprintf("pstiop: timeout waiting for message response\n"); iop_free_mfa(sc, mfa); return -1; } @@ -421,11 +421,11 @@ iop_create_sgl(struct i2o_basic_message *msg, caddr_t data, int count, int dir) int i = 0; if (((uintptr_t)data & 3) || (count & 3)) { - printf("pstiop: non aligned DMA transfer attempted\n"); + kprintf("pstiop: non aligned DMA transfer attempted\n"); return 0; } if (!count) { - printf("pstiop: zero length DMA transfer attempted\n"); + kprintf("pstiop: zero length DMA transfer attempted\n"); return 0; } @@ -442,7 +442,7 @@ iop_create_sgl(struct i2o_basic_message *msg, caddr_t data, int count, int dir) data += min(count, PAGE_SIZE); count -= min(count, PAGE_SIZE); if (++i >= I2O_SGL_MAX_SEGS) { - printf("pstiop: too many segments in SGL\n"); + kprintf("pstiop: too many segments in SGL\n"); return 0; } } diff --git a/sys/dev/raid/pst/pst-raid.c b/sys/dev/raid/pst/pst-raid.c index bb64c3cf15..5ef0fb661e 100644 --- a/sys/dev/raid/pst/pst-raid.c +++ b/sys/dev/raid/pst/pst-raid.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pst/pst-raid.c,v 1.2.2.1 2002/08/18 12:32:36 sos Exp $ - * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.21 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.22 2006/12/22 23:26:24 swildner Exp $ */ #include @@ -145,11 +145,11 @@ pst_attach(device_t dev) return ENODEV; ident = (struct i2o_device_identity *)reply->result; #ifdef PSTDEBUG - printf("pst: vendor=<%.16s> product=<%.16s>\n", + kprintf("pst: vendor=<%.16s> product=<%.16s>\n", ident->vendor, ident->product); - printf("pst: description=<%.16s> revision=<%.8s>\n", + kprintf("pst: description=<%.16s> revision=<%.8s>\n", ident->description, ident->revision); - printf("pst: capacity=%lld blocksize=%d\n", + kprintf("pst: capacity=%lld blocksize=%d\n", psc->info->capacity, psc->info->block_size); #endif bpack(ident->vendor, ident->vendor, 16); @@ -178,7 +178,7 @@ pst_attach(device_t dev) DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE, DEVSTAT_PRIORITY_DISK); - printf("pst%d: %lluMB <%.40s> [%d/%d/%d] on %.16s\n", lun, + kprintf("pst%d: %lluMB <%.40s> [%d/%d/%d] on %.16s\n", lun, (unsigned long long)psc->disk.d_label.d_secperunit / (1024 * 2), name, psc->disk.d_label.d_ncylinders, 255, 63, device_get_nameunit(psc->iop->dev)); @@ -208,7 +208,7 @@ pst_shutdown(device_t dev) msg->function = I2O_BSA_CACHE_FLUSH; msg->control_flags = 0x0; /* 0x80 = post progress reports */ if (iop_queue_wait_msg(psc->iop, mfa, (struct i2o_basic_message *)msg)) - printf("pst: shutdown failed!\n"); + kprintf("pst: shutdown failed!\n"); return 0; } #endif @@ -293,11 +293,11 @@ pst_timeout(void *xrequest) struct buf *bp = request->bio->bio_buf; crit_enter(); - printf("pst: timeout mfa=0x%08x cmd=%s\n", + kprintf("pst: timeout mfa=0x%08x cmd=%s\n", request->mfa, (bp->b_cmd == BUF_CMD_READ) ? "READ" : "WRITE"); iop_free_mfa(request->psc->iop, request->mfa); if ((request->mfa = iop_get_mfa(request->psc->iop)) == 0xffffffff) { - printf("pst: timeout no mfa possible\n"); + kprintf("pst: timeout no mfa possible\n"); devstat_end_transaction_buf(&request->psc->stats, bp); bp->b_error = EIO; bp->b_flags |= B_ERROR; diff --git a/sys/dev/raid/twa/twa.h b/sys/dev/raid/twa/twa.h index 29675a3145..4669048abc 100644 --- a/sys/dev/raid/twa/twa.h +++ b/sys/dev/raid/twa/twa.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD$ - * $DragonFly: src/sys/dev/raid/twa/twa.h,v 1.3 2005/06/10 17:10:26 swildner Exp $ + * $DragonFly: src/sys/dev/raid/twa/twa.h,v 1.4 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -302,7 +302,7 @@ extern u_int8_t twa_call_dbg_level; #define twa_dbg_print(dbg_level, fmt, args...) \ do { \ if (dbg_level <= twa_dbg_level) \ - printf("%s: " fmt "\n", __func__ , ##args);\ + kprintf("%s: " fmt "\n", __func__ , ##args);\ } while(0) #else diff --git a/sys/dev/raid/twa/twa_cam.c b/sys/dev/raid/twa/twa_cam.c index 15a7e74926..b68419d493 100644 --- a/sys/dev/raid/twa/twa_cam.c +++ b/sys/dev/raid/twa/twa_cam.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD$ - * $DragonFly: src/sys/dev/raid/twa/twa_cam.c,v 1.3 2006/09/05 00:55:42 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twa/twa_cam.c,v 1.4 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -539,7 +539,7 @@ twa_bus_scan_cb(struct cam_periph *periph, union ccb *ccb) { twa_dbg_print(3, "ccb = %p\n", ccb); if (ccb->ccb_h.status != CAM_REQ_CMP) - printf("cam_scan_callback: failure status = %x\n", + kprintf("cam_scan_callback: failure status = %x\n", ccb->ccb_h.status); else twa_dbg_print(3, "success"); diff --git a/sys/dev/raid/twa/twa_freebsd.c b/sys/dev/raid/twa/twa_freebsd.c index af5923030c..d947a0540c 100644 --- a/sys/dev/raid/twa/twa_freebsd.c +++ b/sys/dev/raid/twa/twa_freebsd.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD$ - * $DragonFly: src/sys/dev/raid/twa/twa_freebsd.c,v 1.13 2006/09/10 01:26:36 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twa/twa_freebsd.c,v 1.14 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -194,7 +194,7 @@ twa_probe(device_t dev) device_set_desc(dev, TWA_DEVICE_NAME); /* Print the driver version only once. */ if (first_ctlr) { - printf("3ware device driver for 9000 series storage controllers, version: %s\n", + kprintf("3ware device driver for 9000 series storage controllers, version: %s\n", TWA_DRIVER_VERSION_STRING); first_ctlr = 0; } diff --git a/sys/dev/raid/twa/twa_reg.h b/sys/dev/raid/twa/twa_reg.h index 02dc6e90bb..22355097db 100644 --- a/sys/dev/raid/twa/twa_reg.h +++ b/sys/dev/raid/twa/twa_reg.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD$ - * $DragonFly: src/sys/dev/raid/twa/twa_reg.h,v 1.1 2004/04/16 20:13:17 drhodus Exp $ + * $DragonFly: src/sys/dev/raid/twa/twa_reg.h,v 1.2 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -115,7 +115,7 @@ #define TWA_STATUS_EXPECTED_BITS 0x00002000 #define TWA_STATUS_UNEXPECTED_BITS 0x00F00000 -/* For use with the %b printf format. */ +/* For use with the %b kprintf format. */ #define TWA_STATUS_BITS_DESCRIPTION \ "\20\15CMD_Q_EMPTY\16MC_RDY\17RESP_Q_EMPTY\20CMD_Q_FULL\21RESP_INTR\22CMD_INTR\23ATTN_INTR\24HOST_INTR\25PCI_ABRT\26MC_ERR\27Q_ERR\30PCI_PERR\n" diff --git a/sys/dev/raid/twe/twe_freebsd.c b/sys/dev/raid/twe/twe_freebsd.c index 1dbeff8e51..2d9a8ced91 100644 --- a/sys/dev/raid/twe/twe_freebsd.c +++ b/sys/dev/raid/twe/twe_freebsd.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twe_freebsd.c,v 1.2.2.9 2004/06/11 18:57:31 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.24 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.25 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -693,7 +693,7 @@ twed_strategy(struct dev_strategy_args *ap) if ((sc == NULL) || (!sc->twed_drive->td_disk)) { bp->b_error = EINVAL; bp->b_flags |= B_ERROR; - printf("twe: bio for invalid disk!\n"); + kprintf("twe: bio for invalid disk!\n"); biodone(bio); TWED_BIO_OUT; return(0); @@ -849,7 +849,7 @@ twed_detach(device_t dev) devstat_remove_entry(&sc->twed_stats); disk_destroy(&sc->twed_disk); #ifdef FREEBSD_4 - printf("Disks registered: %d\n", disks_registered); + kprintf("Disks registered: %d\n", disks_registered); #if 0 if (--disks_registered == 0) dev_ops_remove(&tweddisk_ops); @@ -1137,7 +1137,7 @@ twe_report(void) crit_enter(); for (i = 0; (sc = devclass_get_softc(twe_devclass, i)) != NULL; i++) twe_print_controller(sc); - printf("twed: total bio count in %u out %u\n", twed_bio_in, twed_bio_out); + kprintf("twed: total bio count in %u out %u\n", twed_bio_in, twed_bio_out); crit_exit(); } #endif diff --git a/sys/dev/raid/twe/twereg.h b/sys/dev/raid/twe/twereg.h index b9bc65419d..8a26459ada 100644 --- a/sys/dev/raid/twe/twereg.h +++ b/sys/dev/raid/twe/twereg.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twereg.h,v 1.1.2.7 2004/05/12 03:33:37 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twereg.h,v 1.6 2005/08/22 21:16:20 hmp Exp $ + * $DragonFly: src/sys/dev/raid/twe/twereg.h,v 1.7 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -84,7 +84,7 @@ /* XXX this is a little harsh, but necessary to chase down firmware problems */ #define TWE_STATUS_PANIC_BITS (TWE_STATUS_MICROCONTROLLER_ERROR) -/* for use with the %b printf format */ +/* for use with the %b kprintf format */ #define TWE_STATUS_BITS_DESCRIPTION \ "\20\15CQEMPTY\16UCREADY\17RQEMPTY\20CQFULL\21RINTR\22CINTR\23AINTR\24HINTR\25PCIABRT\26MCERR\27QERR\30PCIPERR\n" diff --git a/sys/dev/raid/twe/twevar.h b/sys/dev/raid/twe/twevar.h index d6385617dd..6b14f25cae 100644 --- a/sys/dev/raid/twe/twevar.h +++ b/sys/dev/raid/twe/twevar.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twevar.h,v 1.1.2.8 2004/06/11 18:57:32 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twevar.h,v 1.7 2006/09/10 01:26:36 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twevar.h,v 1.8 2006/12/22 23:26:24 swildner Exp $ */ #define TWE_DRIVER_VERSION_STRING "1.40.01.002" @@ -38,11 +38,11 @@ #ifdef TWE_DEBUG #define debug(level, fmt, args...) \ do { \ - if (level <= TWE_DEBUG) printf("%s: " fmt "\n", __func__ , ##args); \ + if (level <= TWE_DEBUG) kprintf("%s: " fmt "\n", __func__ , ##args); \ } while(0) #define debug_called(level) \ do { \ - if (level <= TWE_DEBUG) printf("%s: called\n", __func__); \ + if (level <= TWE_DEBUG) kprintf("%s: called\n", __func__); \ } while(0) #else #define debug(level, fmt, args...) diff --git a/sys/dev/raid/vinum/vinumconfig.c b/sys/dev/raid/vinum/vinumconfig.c index 3d08375723..1ece18355d 100644 --- a/sys/dev/raid/vinum/vinumconfig.c +++ b/sys/dev/raid/vinum/vinumconfig.c @@ -47,7 +47,7 @@ * * $Id: vinumconfig.c,v 1.30 2000/05/01 09:45:50 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumconfig.c,v 1.32.2.6 2002/02/03 00:43:35 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumconfig.c,v 1.9 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumconfig.c,v 1.10 2006/12/22 23:26:24 swildner Exp $ */ #define STATIC static @@ -112,9 +112,9 @@ throw_rude_remark(int error, char *msg,...) text = Malloc(MSG_MAX); if (text == NULL) { log(LOG_ERR, "vinum: can't allocate error message buffer\n"); - printf("vinum: "); + kprintf("vinum: "); kvprintf(msg, ap); /* print to the console */ - printf("\n"); + kprintf("\n"); } else { retval = kvcprintf(msg, NULL, (void *) text, 10, ap); text[retval] = '\0'; /* delimit */ @@ -123,9 +123,9 @@ throw_rude_remark(int error, char *msg,...) Free(text); } } else { - printf("vinum: "); + kprintf("vinum: "); kvprintf(msg, ap); /* print to the console */ - printf("\n"); + kprintf("\n"); } __va_end(ap); diff --git a/sys/dev/raid/vinum/vinumext.h b/sys/dev/raid/vinum/vinumext.h index 17c6c9bd84..12341613cc 100644 --- a/sys/dev/raid/vinum/vinumext.h +++ b/sys/dev/raid/vinum/vinumext.h @@ -35,7 +35,7 @@ * * $Id: vinumext.h,v 1.26 2000/05/16 07:38:08 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumext.h,v 1.25.2.3 2001/05/11 02:11:06 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumext.h,v 1.10 2006/09/10 01:26:36 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumext.h,v 1.11 2006/12/22 23:26:24 swildner Exp $ */ /* vinumext.h: external definitions */ @@ -53,7 +53,7 @@ extern int debug; /* debug flags */ #define CHECKALLOC(ptr, msg) \ if (ptr == NULL) \ { \ - printf (msg); \ + kprintf (msg); \ longjmp (command_fail, -1); \ } #ifndef _KERNEL diff --git a/sys/dev/raid/vinum/vinumio.c b/sys/dev/raid/vinum/vinumio.c index ebd74e9f37..50dd770efe 100644 --- a/sys/dev/raid/vinum/vinumio.c +++ b/sys/dev/raid/vinum/vinumio.c @@ -35,7 +35,7 @@ * * $Id: vinumio.c,v 1.30 2000/05/10 23:23:30 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.52.2.6 2002/05/02 08:43:44 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumio.c,v 1.19 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumio.c,v 1.20 2006/12/22 23:26:24 swildner Exp $ */ #include "vinumhdr.h" @@ -971,7 +971,7 @@ vinum_scandisk(char *devicename[], int drives) error = read_drive(drive, config_text, MAXCONFIG * 2, VINUM_CONFIG_OFFSET); else { error = EIO; - printf("vinum_scandisk: %s is %s\n", drive->devicename, drive_state(drive->state)); + kprintf("vinum_scandisk: %s is %s\n", drive->devicename, drive_state(drive->state)); } if (error != 0) { @@ -1023,7 +1023,7 @@ vinum_scandisk(char *devicename[], int drives) Free(drivelist); vinum_conf.flags &= ~VF_READING_CONFIG; /* no longer reading from disk */ if (status != 0) - printf("vinum: couldn't read configuration"); + kprintf("vinum: couldn't read configuration"); else updateconfig(VF_READING_CONFIG); /* update from disk config */ return status; diff --git a/sys/dev/raid/vinum/vinumrevive.c b/sys/dev/raid/vinum/vinumrevive.c index defcc75a17..6333ab938a 100644 --- a/sys/dev/raid/vinum/vinumrevive.c +++ b/sys/dev/raid/vinum/vinumrevive.c @@ -39,7 +39,7 @@ * * $Id: vinumrevive.c,v 1.14 2000/12/21 01:55:11 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumrevive.c,v 1.22.2.5 2001/03/13 02:59:43 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumrevive.c,v 1.14 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumrevive.c,v 1.15 2006/12/22 23:26:24 swildner Exp $ */ #include "vinumhdr.h" @@ -555,7 +555,7 @@ initsd(int sdno, int verify) error = bp->b_error; else if ((*bp->b_data != 0) /* first word spammed */ ||(bcmp(bp->b_data, &bp->b_data[1], bp->b_bcount - 1))) { /* or one of the others */ - printf("vinum: init error on %s, offset 0x%llx sectors\n", + kprintf("vinum: init error on %s, offset 0x%llx sectors\n", sd->name, (long long) sd->initialized); verified = 0; diff --git a/sys/dev/serial/cy/cy.c b/sys/dev/serial/cy/cy.c index 642077ca8d..5132dba67b 100644 --- a/sys/dev/serial/cy/cy.c +++ b/sys/dev/serial/cy/cy.c @@ -28,7 +28,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/cy.c,v 1.97.2.2 2001/08/22 13:04:58 bde Exp $ - * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.25 2006/11/07 18:50:06 dillon Exp $ + * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.26 2006/12/22 23:26:24 swildner Exp $ */ #include "opt_compat.h" @@ -505,7 +505,7 @@ sioattach(isdp) * kernel config file to be in any order. */ if (isdp->id_unit != adapter) { - printf("cy%d: attached as cy%d\n", isdp->id_unit, adapter); + kprintf("cy%d: attached as cy%d\n", isdp->id_unit, adapter); isdp->id_unit = adapter; /* XXX */ } isdp->id_intr = (inthand2_t *)siointr; @@ -528,7 +528,7 @@ cyattach_common(cy_iobase, cy_align) adapter = cy_total_devices; if ((u_int)adapter >= NCY) { - printf( + kprintf( "cy%d: can't attach adapter: insufficient cy devices configured\n", adapter); return (-1); @@ -2670,10 +2670,10 @@ comspeed(speed, cy_clock, prescaler_io) return (-1); #if 0 - printf("prescaler = %d (%d)\n", prescaler, prescaler_unit); - printf("divider = %d (%x)\n", divider, divider); - printf("actual = %d\n", actual); - printf("error = %d\n", error); + kprintf("prescaler = %d (%d)\n", prescaler, prescaler_unit); + kprintf("divider = %d (%x)\n", divider, divider); + kprintf("actual = %d\n", actual); + kprintf("error = %d\n", error); #endif *prescaler_io = prescaler_unit; @@ -2822,51 +2822,51 @@ cystatus(unit) struct tty *tp; com = com_addr(unit); - printf("info for channel %d\n", unit); - printf("------------------\n"); - printf("total cyclom service probes:\t%d\n", cy_svrr_probes); - printf("calls to upper layer:\t\t%d\n", cy_timeouts); + kprintf("info for channel %d\n", unit); + kprintf("------------------\n"); + kprintf("total cyclom service probes:\t%d\n", cy_svrr_probes); + kprintf("calls to upper layer:\t\t%d\n", cy_timeouts); if (com == NULL) return; iobase = com->iobase; - printf("\n"); - printf("cd1400 base address:\\tt%p\n", iobase); - printf("saved channel_control:\t\t0x%02x\n", com->channel_control); - printf("saved cor1-3:\t\t\t0x%02x 0x%02x 0x%02x\n", + kprintf("\n"); + kprintf("cd1400 base address:\\tt%p\n", iobase); + kprintf("saved channel_control:\t\t0x%02x\n", com->channel_control); + kprintf("saved cor1-3:\t\t\t0x%02x 0x%02x 0x%02x\n", com->cor[0], com->cor[1], com->cor[2]); - printf("service request enable reg:\t0x%02x (0x%02x cached)\n", + kprintf("service request enable reg:\t0x%02x (0x%02x cached)\n", cd_getreg(com, CD1400_SRER), com->intr_enable); - printf("service request register:\t0x%02x\n", + kprintf("service request register:\t0x%02x\n", cd_inb(iobase, CD1400_SVRR, com->cy_align)); - printf("modem status:\t\t\t0x%02x (0x%02x cached)\n", + kprintf("modem status:\t\t\t0x%02x (0x%02x cached)\n", cd_getreg(com, CD1400_MSVR2), com->prev_modem_status); - printf("rx/tx/mdm interrupt registers:\t0x%02x 0x%02x 0x%02x\n", + kprintf("rx/tx/mdm interrupt registers:\t0x%02x 0x%02x 0x%02x\n", cd_inb(iobase, CD1400_RIR, com->cy_align), cd_inb(iobase, CD1400_TIR, com->cy_align), cd_inb(iobase, CD1400_MIR, com->cy_align)); - printf("\n"); - printf("com state:\t\t\t0x%02x\n", com->state); - printf("calls to comstart():\t\t%d (%d useful)\n", + kprintf("\n"); + kprintf("com state:\t\t\t0x%02x\n", com->state); + kprintf("calls to comstart():\t\t%d (%d useful)\n", com->start_count, com->start_real); - printf("rx buffer chars free:\t\t%d\n", com->iptr - com->ibuf); + kprintf("rx buffer chars free:\t\t%d\n", com->iptr - com->ibuf); ocount = 0; if (com->obufs[0].l_queued) ocount += com->obufs[0].l_tail - com->obufs[0].l_head; if (com->obufs[1].l_queued) ocount += com->obufs[1].l_tail - com->obufs[1].l_head; - printf("tx buffer chars:\t\t%u\n", ocount); - printf("received chars:\t\t\t%d\n", com->bytes_in); - printf("received exceptions:\t\t%d\n", com->recv_exception); - printf("modem signal deltas:\t\t%d\n", com->mdm); - printf("transmitted chars:\t\t%d\n", com->bytes_out); - printf("\n"); + kprintf("tx buffer chars:\t\t%u\n", ocount); + kprintf("received chars:\t\t\t%d\n", com->bytes_in); + kprintf("received exceptions:\t\t%d\n", com->recv_exception); + kprintf("modem signal deltas:\t\t%d\n", com->mdm); + kprintf("transmitted chars:\t\t%d\n", com->bytes_out); + kprintf("\n"); tp = com->tp; if (tp != NULL) { - printf("tty state:\t\t\t0x%08x\n", tp->t_state); - printf( + kprintf("tty state:\t\t\t0x%08x\n", tp->t_state); + kprintf( "upper layer queue lengths:\t%d raw, %d canon, %d output\n", tp->t_rawq.c_cc, tp->t_canq.c_cc, tp->t_outq.c_cc); } else - printf("tty state:\t\t\tclosed\n"); + kprintf("tty state:\t\t\tclosed\n"); } #endif /* CyDebug */ diff --git a/sys/dev/serial/cy/cy_pci.c b/sys/dev/serial/cy/cy_pci.c index 686654d1a8..8fbc004629 100644 --- a/sys/dev/serial/cy/cy_pci.c +++ b/sys/dev/serial/cy/cy_pci.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/cy_pci.c,v 1.17.2.1 2002/03/17 04:14:18 bde Exp $ - * $DragonFly: src/sys/dev/serial/cy/cy_pci.c,v 1.8 2006/11/07 06:43:23 dillon Exp $ + * $DragonFly: src/sys/dev/serial/cy/cy_pci.c,v 1.9 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -92,7 +92,7 @@ cy_attach(config_id, unit) paddr = pci_conf_read(config_id, CY_PCI_BASE_ADDR2) & ~0xf; #if 0 if (!pci_map_mem(config_id, CY_PCI_BASE_ADDR2, &vaddr, &paddr)) { - printf("cy%d: couldn't map shared memory\n", unit); + kprintf("cy%d: couldn't map shared memory\n", unit); return; }; #endif @@ -103,7 +103,7 @@ cy_attach(config_id, unit) /* * No ports found. Release resources and punt. */ - printf("cy%d: no ports found!\n", unit); + kprintf("cy%d: no ports found!\n", unit); goto fail; } @@ -124,7 +124,7 @@ cy_attach(config_id, unit) #endif !pci_map_int_right(config_id, (pci_inthand_t *)cyintr, (void *)adapter, 0)) { - printf("cy%d: couldn't map interrupt\n", unit); + kprintf("cy%d: couldn't map interrupt\n", unit); goto fail; } diff --git a/sys/dev/serial/dgb/dgm.c b/sys/dev/serial/dgb/dgm.c index 54c94ae547..60abe12435 100644 --- a/sys/dev/serial/dgb/dgm.c +++ b/sys/dev/serial/dgb/dgm.c @@ -1,6 +1,6 @@ /*- * $FreeBSD: src/sys/dev/dgb/dgm.c,v 1.31.2.3 2001/10/07 09:02:25 brian Exp $ - * $DragonFly: src/sys/dev/serial/dgb/dgm.c,v 1.15 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/serial/dgb/dgm.c,v 1.16 2006/12/22 23:26:24 swildner Exp $ * * This driver and the associated header files support the ISA PC/Xem * Digiboards. Its evolutionary roots are described below. @@ -490,9 +490,9 @@ dgmprobe(device_t dev) outb(sc->port, 1); second = inb(sc->port); - printf("dgm%d: PC/Xem (type %d, %d)\n", sc->unit, v, second); + kprintf("dgm%d: PC/Xem (type %d, %d)\n", sc->unit, v, second); } else - printf("dgm%d: PC/Xem (type %d)\n", sc->unit, v); + kprintf("dgm%d: PC/Xem (type %d)\n", sc->unit, v); sc->type = PCXEM; sc->mem_seg = 0x8000; @@ -640,7 +640,7 @@ dgmattach(device_t dev) ptr = mem + BIOSOFFSET; for (i = 0; ptr < mem + msize; i++) { if (*ptr++ != pcem_bios[i]) { - printf("Low BIOS load failed\n"); + kprintf("Low BIOS load failed\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); @@ -658,7 +658,7 @@ dgmattach(device_t dev) ptr = mem; for (i = msize - BIOSOFFSET; i < pcem_nbios; i++) { if (*ptr++ != pcem_bios[i]) { - printf("High BIOS load failed\n"); + kprintf("High BIOS load failed\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); @@ -679,7 +679,7 @@ dgmattach(device_t dev) for (i = 0; *(u_char *)(mem + addr + 0xc00) != 0x47; i++) { DELAY(10000); if (i > 3000) { - printf("\nBIOS initialize failed(1)\n"); + kprintf("\nBIOS initialize failed(1)\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); @@ -689,14 +689,14 @@ dgmattach(device_t dev) } if (*(u_char *)(mem + addr + 0xc01) != 0x44) { - printf("\nBIOS initialize failed(2)\n"); + kprintf("\nBIOS initialize failed(2)\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); bus_release_resource(dev, SYS_RES_IOPORT, sc->iorid, sc->io_res); return (ENXIO); } - printf(", DigiBIOS running\n"); + kprintf(", DigiBIOS running\n"); DELAY(10000); @@ -708,7 +708,7 @@ dgmattach(device_t dev) ptr = mem + BIOSOFFSET; for (i = 0; i < pcem_ncook; i++) { if (*ptr++ != pcem_cook[i]) { - printf("FEP/OS load failed\n"); + kprintf("FEP/OS load failed\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); @@ -727,7 +727,7 @@ dgmattach(device_t dev) for (i = 0; *(u_char *)(mem + addr + 0xd20) != 'O'; i++) { DELAY(10000); if (i > 3000) { - printf("\nFEP/OS initialize failed(1)\n"); + kprintf("\nFEP/OS initialize failed(1)\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); @@ -737,20 +737,20 @@ dgmattach(device_t dev) } if (*(u_char *)(mem + addr + 0xd21) != 'S') { - printf("\nFEP/OS initialize failed(2)\n"); + kprintf("\nFEP/OS initialize failed(2)\n"); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); bus_release_resource(dev, SYS_RES_IOPORT, sc->iorid, sc->io_res); return (ENXIO); } - printf(", FEP/OS running\n"); + kprintf(", FEP/OS running\n"); sc->numports = *(ushort *)(mem + setwin(sc, NPORT)); device_printf(dev, "%d ports attached\n", sc->numports); if (sc->numports > MAX_DGM_PORTS) { - printf("dgm%d: too many ports\n", sc->unit); + kprintf("dgm%d: too many ports\n", sc->unit); sc->enabled = 0; hidewin(sc); bus_release_resource(dev, SYS_RES_MEMORY, sc->mrid, sc->mem_res); @@ -1038,7 +1038,7 @@ open_top: bc->rout = bc->rin; /* clear input queue */ bc->idata = 1; #ifdef PRINT_BUFSIZE - printf("dgm buffers tx = %x:%x rx = %x:%x\n", + kprintf("dgm buffers tx = %x:%x rx = %x:%x\n", bc->tseg, bc->tmax, bc->rseg, bc->rmax); #endif @@ -1223,7 +1223,7 @@ dgmpoll(void *unit_c) DPRINT2(DB_INFO, "dgm%d: poll\n", sc->unit); if (!sc->enabled) { - printf("dgm%d: polling of disabled board stopped\n", unit); + kprintf("dgm%d: polling of disabled board stopped\n", unit); return; } @@ -1236,7 +1236,7 @@ dgmpoll(void *unit_c) if (head >= FEP_IMAX - FEP_ISTART || tail >= FEP_IMAX - FEP_ISTART || (head|tail) & 03 ) { - printf("dgm%d: event queue's head or tail is wrong!" + kprintf("dgm%d: event queue's head or tail is wrong!" " hd = %d, tl = %d\n", unit, head, tail); break; } @@ -1252,14 +1252,14 @@ dgmpoll(void *unit_c) tp = &sc->ttys[pnum]; if (pnum >= sc->numports || !port->enabled) { - printf("dgm%d: port%d: got event on nonexisting port\n", + kprintf("dgm%d: port%d: got event on nonexisting port\n", unit, pnum); } else if (port->used || port->wopeners > 0 ) { int wrapmask = port->rxbufsize - 1; if (!(event & ALL_IND)) - printf("dgm%d: port%d: ? event 0x%x mstat 0x%x lstat 0x%x\n", + kprintf("dgm%d: port%d: ? event 0x%x mstat 0x%x lstat 0x%x\n", unit, pnum, event, mstat, lstat); if (event & DATA_IND) { @@ -1275,7 +1275,7 @@ dgmpoll(void *unit_c) } if (bc->orun) { - printf("dgm%d: port%d: overrun\n", unit, pnum); + kprintf("dgm%d: port%d: overrun\n", unit, pnum); bc->orun = 0; } @@ -2155,7 +2155,7 @@ fepcmd(struct dgm_p *port, mem = port->sc->vmem; if (!port->enabled) { - printf("dgm%d: port%d: FEP command on disabled port\n", + kprintf("dgm%d: port%d: FEP command on disabled port\n", port->sc->unit, port->pnum); return; } @@ -2164,7 +2164,7 @@ fepcmd(struct dgm_p *port, head = port->sc->mailbox->cin; if (head >= FEP_CMAX - FEP_CSTART || (head & 3)) { - printf("dgm%d: port%d: wrong pointer head of command queue : 0x%x\n", + kprintf("dgm%d: port%d: wrong pointer head of command queue : 0x%x\n", port->sc->unit, port->pnum, head); return; } @@ -2195,7 +2195,7 @@ fepcmd(struct dgm_p *port, if (n <= ncmds * (sizeof(ushort)*4)) return; } - printf("dgm%d(%d): timeout on FEP cmd = 0x%x\n", port->sc->unit, port->pnum, cmd); + kprintf("dgm%d(%d): timeout on FEP cmd = 0x%x\n", port->sc->unit, port->pnum, cmd); } static void diff --git a/sys/dev/serial/dgb/dgmreg.h b/sys/dev/serial/dgb/dgmreg.h index e6d4951d5f..aa18d24134 100644 --- a/sys/dev/serial/dgb/dgmreg.h +++ b/sys/dev/serial/dgb/dgmreg.h @@ -1,6 +1,6 @@ /*- * $FreeBSD: src/sys/dev/dgb/dgmreg.h,v 1.4.2.1 2001/09/23 19:54:54 brian Exp $ - * $DragonFly: src/sys/dev/serial/dgb/dgmreg.h,v 1.2 2003/06/17 04:28:23 dillon Exp $ + * $DragonFly: src/sys/dev/serial/dgb/dgmreg.h,v 1.3 2006/12/22 23:26:24 swildner Exp $ * * Digiboard driver. * @@ -380,13 +380,13 @@ struct channel { /* debugging printout */ #ifdef DEBUG -#define DPRINT1(l,a1) (dgmdebug&l ? printf(a1) : 0) -#define DPRINT2(l,a1,a2) (dgmdebug&l ? printf(a1,a2) : 0) -#define DPRINT3(l,a1,a2,a3) (dgmdebug&l ? printf(a1,a2,a3) : 0) -#define DPRINT4(l,a1,a2,a3,a4) (dgmdebug&l ? printf(a1,a2,a3,a4) : 0) -#define DPRINT5(l,a1,a2,a3,a4,a5) (dgmdebug&l ? printf(a1,a2,a3,a4,a5) : 0) -#define DPRINT6(l,a1,a2,a3,a4,a5,a6) (dgmdebug&l ? printf(a1,a2,a3,a4,a5,a6) : 0) -#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7) (dgmdebug&l ? printf(a1,a2,a3,a4,a5,a6,a7) : 0) +#define DPRINT1(l,a1) (dgmdebug&l ? kprintf(a1) : 0) +#define DPRINT2(l,a1,a2) (dgmdebug&l ? kprintf(a1,a2) : 0) +#define DPRINT3(l,a1,a2,a3) (dgmdebug&l ? kprintf(a1,a2,a3) : 0) +#define DPRINT4(l,a1,a2,a3,a4) (dgmdebug&l ? kprintf(a1,a2,a3,a4) : 0) +#define DPRINT5(l,a1,a2,a3,a4,a5) (dgmdebug&l ? kprintf(a1,a2,a3,a4,a5) : 0) +#define DPRINT6(l,a1,a2,a3,a4,a5,a6) (dgmdebug&l ? kprintf(a1,a2,a3,a4,a5,a6) : 0) +#define DPRINT7(l,a1,a2,a3,a4,a5,a6,a7) (dgmdebug&l ? kprintf(a1,a2,a3,a4,a5,a6,a7) : 0) #else #define DPRINT1(l,a1) #define DPRINT2(l,a1,a2) diff --git a/sys/dev/serial/digi/digi.c b/sys/dev/serial/digi/digi.c index c6a8637a59..fb7731a377 100644 --- a/sys/dev/serial/digi/digi.c +++ b/sys/dev/serial/digi/digi.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/digi/digi.c,v 1.36 2003/09/26 09:05:57 phk Exp $ - * $DragonFly: src/sys/dev/serial/digi/digi.c,v 1.9 2006/10/25 20:56:01 dillon Exp $ + * $DragonFly: src/sys/dev/serial/digi/digi.c,v 1.10 2006/12/22 23:26:24 swildner Exp $ */ /*- @@ -1031,7 +1031,7 @@ digi_loaddata(struct digi_softc *sc) break; } if (bios->model == NULL) { - printf("digi.ko: driver %s not found", sc->module); + kprintf("digi.ko: driver %s not found", sc->module); return(EINVAL); } diff --git a/sys/dev/serial/rc/rc.c b/sys/dev/serial/rc/rc.c index f55e88cfe7..0de0dfd99c 100644 --- a/sys/dev/serial/rc/rc.c +++ b/sys/dev/serial/rc/rc.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/rc.c,v 1.53.2.1 2001/02/26 04:23:10 jlemon Exp $ - * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.21 2006/11/07 18:50:06 dillon Exp $ + * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.22 2006/12/22 23:26:24 swildner Exp $ * */ @@ -197,11 +197,11 @@ rcprobe(dvp) if (dvp->id_unit > NRC) return 0; if (!RC_VALIDADDR(nec)) { - printf("rc%d: illegal base address %x\n", dvp->id_unit, nec); + kprintf("rc%d: illegal base address %x\n", dvp->id_unit, nec); return 0; } if (!RC_VALIDIRQ(irq)) { - printf("rc%d: illegal IRQ value %d\n", dvp->id_unit, irq); + kprintf("rc%d: illegal IRQ value %d\n", dvp->id_unit, irq); return 0; } rcout(CD180_PPRL, 0x22); /* Random values to Prescale reg. */ @@ -236,7 +236,7 @@ rcattach(dvp) rcb->rcb_baserc = rc; rcb->rcb_unit = dvp->id_unit; /*rcb->rcb_chipid = 0x10 + dvp->id_unit;*/ - printf("rc%d: %d chans, firmware rev. %c\n", rcb->rcb_unit, + kprintf("rc%d: %d chans, firmware rev. %c\n", rcb->rcb_unit, CD180_NCHAN, (rcin(CD180_GFRCR) & 0xF) + 'A'); for (chan = 0; chan < CD180_NCHAN; chan++, rc++) { @@ -281,7 +281,7 @@ rcintr(void *arg, void *frame) int good_data, t_state; if (rcb->rcb_probed != RC_ATTACHED) { - printf("rc%d: bogus interrupt\n", unit); + kprintf("rc%d: bogus interrupt\n", unit); return; } nec = rcb->rcb_addr; @@ -289,21 +289,21 @@ rcintr(void *arg, void *frame) bsr = ~(rcin(RC_BSR)); if (!(bsr & (RC_BSR_TOUT|RC_BSR_RXINT|RC_BSR_TXINT|RC_BSR_MOINT))) { - printf("rc%d: extra interrupt\n", unit); + kprintf("rc%d: extra interrupt\n", unit); rcout(CD180_EOIR, 0); return; } while (bsr & (RC_BSR_TOUT|RC_BSR_RXINT|RC_BSR_TXINT|RC_BSR_MOINT)) { #ifdef RCDEBUG_DETAILED - printf("rc%d: intr (%02x) %s%s%s%s\n", unit, bsr, + kprintf("rc%d: intr (%02x) %s%s%s%s\n", unit, bsr, (bsr & RC_BSR_TOUT)?"TOUT ":"", (bsr & RC_BSR_RXINT)?"RXINT ":"", (bsr & RC_BSR_TXINT)?"TXINT ":"", (bsr & RC_BSR_MOINT)?"MOINT":""); #endif if (bsr & RC_BSR_TOUT) { - printf("rc%d: hardware failure, reset board\n", unit); + kprintf("rc%d: hardware failure, reset board\n", unit); rcout(RC_CTOUT, 0); rc_reinit(rcb); return; @@ -312,7 +312,7 @@ rcintr(void *arg, void *frame) iack = rcin(RC_PILR_RX); good_data = (iack == (GIVR_IT_RGDI | RC_FAKEID)); if (!good_data && iack != (GIVR_IT_REI | RC_FAKEID)) { - printf("rc%d: fake rxint: %02x\n", unit, iack); + kprintf("rc%d: fake rxint: %02x\n", unit, iack); goto more_intrs; } rc = rcb->rcb_baserc + ((rcin(CD180_GICR) & GICR_CHAN) >> GICR_LSH); @@ -414,7 +414,7 @@ rcintr(void *arg, void *frame) if (bsr & RC_BSR_MOINT) { iack = rcin(RC_PILR_MODEM); if (iack != (GIVR_IT_MSCI | RC_FAKEID)) { - printf("rc%d: fake moint: %02x\n", unit, iack); + kprintf("rc%d: fake moint: %02x\n", unit, iack); goto more_intrs; } rc = rcb->rcb_baserc + ((rcin(CD180_GICR) & GICR_CHAN) >> GICR_LSH); @@ -441,7 +441,7 @@ rcintr(void *arg, void *frame) if (bsr & RC_BSR_TXINT) { iack = rcin(RC_PILR_TX); if (iack != (GIVR_IT_TDI | RC_FAKEID)) { - printf("rc%d: fake txint: %02x\n", unit, iack); + kprintf("rc%d: fake txint: %02x\n", unit, iack); goto more_intrs; } rc = rcb->rcb_baserc + ((rcin(CD180_GICR) & GICR_CHAN) >> GICR_LSH); @@ -470,7 +470,7 @@ rcintr(void *arg, void *frame) if (optr >= rc->rc_obufend) { rcout(CD180_IER, rc->rc_ier &= ~IER_TxRdy); #ifdef RCDEBUG - printf("rc%d/%d: output completed\n", unit, rc->rc_chan); + kprintf("rc%d/%d: output completed\n", unit, rc->rc_chan); #endif if (!(rc->rc_flags & RC_DOXXFER)) { rc_scheduled_event += LOTS_OF_EVENTS; @@ -521,7 +521,7 @@ struct tty *tp; #endif ttwwakeup(tp); #ifdef RCDEBUG - printf("rcstart: outq = %d obuf = %d\n", + kprintf("rcstart: outq = %d obuf = %d\n", tp->t_outq.c_cc, rc->rc_obufend - rc->rc_optr); #endif if (tp->t_state & TS_BUSY) @@ -538,7 +538,7 @@ struct tty *tp; cpu_enable_intr(); if (!(rc->rc_ier & IER_TxRdy)) { #ifdef RCDEBUG - printf("rc%d/%d: rcstart enable txint\n", rc->rc_rcb->rcb_unit, rc->rc_chan); + kprintf("rc%d/%d: rcstart enable txint\n", rc->rc_rcb->rcb_unit, rc->rc_chan); #endif rcout(CD180_CAR, rc->rc_chan); rcout(CD180_IER, rc->rc_ier |= IER_TxRdy); @@ -578,7 +578,7 @@ repeat: rc->rc_flags &= ~RC_WAS_BUFOVFL; rc_scheduled_event--; cpu_enable_intr(); - printf("rc%d/%d: interrupt-level buffer overflow\n", + kprintf("rc%d/%d: interrupt-level buffer overflow\n", unit, chan); } if (rc->rc_flags & RC_WAS_SILOVFL) { @@ -586,7 +586,7 @@ repeat: rc->rc_flags &= ~RC_WAS_SILOVFL; rc_scheduled_event--; cpu_enable_intr(); - printf("rc%d/%d: silo overflow\n", + kprintf("rc%d/%d: silo overflow\n", unit, chan); } if (rc->rc_flags & RC_MODCHG) { @@ -642,7 +642,7 @@ repeat: tk_rawcc += icnt; tp->t_rawcc += icnt; if (b_to_q(tptr, icnt, &tp->t_rawq)) - printf("rc%d/%d: tty-level buffer overflow\n", + kprintf("rc%d/%d: tty-level buffer overflow\n", unit, chan); ttwakeup(tp); if ((tp->t_state & TS_TTSTOP) && ((tp->t_iflag & IXANY) @@ -684,7 +684,7 @@ rc_stop(tp, rw) u_char *tptr, *eptr; #ifdef RCDEBUG - printf("rc%d/%d: rc_stop %s%s\n", rc->rc_rcb->rcb_unit, rc->rc_chan, + kprintf("rc%d/%d: rc_stop %s%s\n", rc->rc_rcb->rcb_unit, rc->rc_chan, (rw & FWRITE)?"FWRITE ":"", (rw & FREAD)?"FREAD":""); #endif if (rw & FWRITE) @@ -727,7 +727,7 @@ rcopen(struct dev_open_args *ap) dev->si_tty = tp; nec = rc->rc_rcb->rcb_addr; #ifdef RCDEBUG - printf("rc%d/%d: rcopen: dev %x\n", rc->rc_rcb->rcb_unit, unit, dev); + kprintf("rc%d/%d: rcopen: dev %x\n", rc->rc_rcb->rcb_unit, unit, dev); #endif crit_enter(); @@ -814,7 +814,7 @@ rcclose(struct dev_close_args *ap) rc = &rc_chans[unit]; tp = rc->rc_tp; #ifdef RCDEBUG - printf("rc%d/%d: rcclose dev %x\n", rc->rc_rcb->rcb_unit, unit, dev); + kprintf("rc%d/%d: rcclose dev %x\n", rc->rc_rcb->rcb_unit, unit, dev); #endif crit_enter(); (*linesw[tp->t_line].l_close)(tp, ap->a_fflag); @@ -1211,7 +1211,7 @@ int rc_test(nec, unit) static u_char ctest[] = "\377\125\252\045\244\0\377"; #define CTLEN 8 #define ERR(s) { \ - printf("rc%d: ", unit); printf s ; printf("\n"); \ + kprintf("rc%d: ", unit); kprintf s ; kprintf("\n"); \ crit_exit(); return 1; } struct rtest { @@ -1347,7 +1347,7 @@ char *comment; u_short f = rc->rc_flags; int nec = rc->rc_rcb->rcb_addr; - printf("rc%d/%d: %s flags: %s%s%s%s%s%s%s%s%s%s%s%s\n", + kprintf("rc%d/%d: %s flags: %s%s%s%s%s%s%s%s%s%s%s%s\n", rc->rc_rcb->rcb_unit, rc->rc_chan, comment, (f & RC_DTR_OFF)?"DTR_OFF " :"", (f & RC_ACTOUT) ?"ACTOUT " :"", @@ -1364,7 +1364,7 @@ char *comment; rcout(CD180_CAR, rc->rc_chan); - printf("rc%d/%d: msvr %02x ier %02x ccsr %02x\n", + kprintf("rc%d/%d: msvr %02x ier %02x ccsr %02x\n", rc->rc_rcb->rcb_unit, rc->rc_chan, rcin(CD180_MSVR), rcin(CD180_IER), @@ -1438,6 +1438,6 @@ rc_wait0(nec, unit, chan, line) for (rcnt = 50; rcnt && rcin(CD180_CCR); rcnt--) DELAY(30); if (rcnt == 0) - printf("rc%d/%d: channel command timeout, rc.c line: %d\n", + kprintf("rc%d/%d: channel command timeout, rc.c line: %d\n", unit, chan, line); } diff --git a/sys/dev/serial/rp/rp.c b/sys/dev/serial/rp/rp.c index 96a706917a..c13347c89f 100644 --- a/sys/dev/serial/rp/rp.c +++ b/sys/dev/serial/rp/rp.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/rp/rp.c,v 1.45.2.2 2002/11/07 22:26:59 tegge Exp $ - * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.20 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.21 2006/12/22 23:26:24 swildner Exp $ */ /* @@ -747,7 +747,7 @@ rp_handle_port(struct rp_port *rp) /* oldcts = rp->rp_cts; rp->rp_cts = ((ChanStatus & CTS_ACT) != 0); if(oldcts != rp->rp_cts) { - printf("CTS change (now %s)... on port %d\n", rp->rp_cts ? "on" : "off", rp->rp_port); + kprintf("CTS change (now %s)... on port %d\n", rp->rp_cts ? "on" : "off", rp->rp_port); } */ } @@ -808,7 +808,7 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports) unit = device_get_unit(ctlp->dev); - printf("RocketPort%d (Version %s) %d ports.\n", unit, + kprintf("RocketPort%d (Version %s) %d ports.\n", unit, RocketPortVersion, num_ports); rp_num_ports[unit] = num_ports; diff --git a/sys/dev/serial/si/si.c b/sys/dev/serial/si/si.c index a3af39d516..960d31797f 100644 --- a/sys/dev/serial/si/si.c +++ b/sys/dev/serial/si/si.c @@ -31,7 +31,7 @@ * NO EVENT SHALL THE AUTHORS BE LIABLE. * * $FreeBSD: src/sys/dev/si/si.c,v 1.101.2.1 2001/02/26 04:23:06 jlemon Exp $ - * $DragonFly: src/sys/dev/serial/si/si.c,v 1.22 2006/12/18 20:41:01 dillon Exp $ + * $DragonFly: src/sys/dev/serial/si/si.c,v 1.23 2006/12/22 23:26:24 swildner Exp $ */ #ifndef lint @@ -313,7 +313,7 @@ siattach(device_t dev) *(maddr+SIRESET) = 0; break; default: /* this should never happen */ - printf("si%d: unsupported configuration\n", unit); + kprintf("si%d: unsupported configuration\n", unit); return EINVAL; break; } @@ -396,7 +396,7 @@ siattach(device_t dev) *(maddr+SIPLIRQCLR) = 0x10; break; default: /* this should _REALLY_ never happen */ - printf("si%d: Uh, it was supported a second ago...\n", unit); + kprintf("si%d: Uh, it was supported a second ago...\n", unit); return EINVAL; } @@ -410,7 +410,7 @@ siattach(device_t dev) } switch (regp->initstat) { case 0: - printf("si%d: startup timeout - aborting\n", unit); + kprintf("si%d: startup timeout - aborting\n", unit); sc->sc_type = SIEMPTY; return EINVAL; case 1: @@ -431,11 +431,11 @@ siattach(device_t dev) /* * No modules found, so give up on this one. */ - printf("si%d: %s - no ports found\n", unit, + kprintf("si%d: %s - no ports found\n", unit, si_type[sc->sc_type]); return 0; default: - printf("si%d: download code version error - initstat %x\n", + kprintf("si%d: download code version error - initstat %x\n", unit, regp->initstat); return EINVAL; } @@ -486,14 +486,14 @@ siattach(device_t dev) x = 8; break; default: - printf("si%d: unknown module type %d\n", + kprintf("si%d: unknown module type %d\n", unit, modp->sm_type); goto try_next; } /* this was limited in firmware and is also a driver issue */ if ((nport + x) > SI_MAXPORTPERCARD) { - printf("si%d: extra ports ignored\n", unit); + kprintf("si%d: extra ports ignored\n", unit); goto try_next; } @@ -556,7 +556,7 @@ try_next: if (uart_type == 1000) uart_type = ccbp->type; else if (uart_type != ccbp->type) - printf("si%d: Warning: module %d mismatch! (%d%s != %d%s)\n", + kprintf("si%d: Warning: module %d mismatch! (%d%s != %d%s)\n", unit, nmodule, ccbp->type, si_modulename(sc->sc_type, ccbp->type), uart_type, si_modulename(sc->sc_type, uart_type)); @@ -578,7 +578,7 @@ try_next: } try_next2: if (modp->sm_next == 0) { - printf("si%d: card: %s, ports: %d, modules: %d, type: %d%s\n", + kprintf("si%d: card: %s, ports: %d, modules: %d, type: %d%s\n", unit, sc->sc_typename, sc->sc_nport, @@ -1548,7 +1548,7 @@ si_poll(void *nothing) if (regp->int_pending != 0) { if (regp->int_scounter >= 200 && regp->initstat == 1) { - printf("si%d: lost intr\n", i); + kprintf("si%d: lost intr\n", i); lost++; } } else { @@ -1561,7 +1561,7 @@ si_poll(void *nothing) pp = sc->sc_ports; for (port = 0; port < sc->sc_nport; pp++, port++) { if (pp->sp_delta_overflows > 0) { - printf("si%d: %d tty level buffer overflows\n", + kprintf("si%d: %d tty level buffer overflows\n", i, pp->sp_delta_overflows); pp->sp_delta_overflows = 0; } @@ -2149,7 +2149,7 @@ si_dprintf(struct si_port *pp, int flags, const char *fmt, ...) if ((pp == NULL && (si_debug&flags)) || (pp != NULL && ((pp->sp_debug&flags) || (si_debug&flags)))) { if (pp != NULL) - printf("%ci%d(%d): ", 's', + kprintf("%ci%d(%d): ", 's', (int)SI_CARD(minor(pp->sp_tty->t_dev)), (int)SI_PORT(minor(pp->sp_tty->t_dev))); __va_start(ap, fmt); diff --git a/sys/dev/serial/si/si_isa.c b/sys/dev/serial/si/si_isa.c index a26fabbed5..d8c20db60c 100644 --- a/sys/dev/serial/si/si_isa.c +++ b/sys/dev/serial/si/si_isa.c @@ -18,7 +18,7 @@ * NO EVENT SHALL THE AUTHORS BE LIABLE. * * $FreeBSD: src/sys/dev/si/si_isa.c,v 1.1 2000/01/24 07:24:01 peter Exp $ - * $DragonFly: src/sys/dev/serial/si/si_isa.c,v 1.6 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/serial/si/si_isa.c,v 1.7 2006/12/22 23:26:24 swildner Exp $ */ #include "opt_debug_si.h" @@ -67,7 +67,7 @@ si_isa_probe(device_t dev) */ if ((caddr_t)paddr < (caddr_t)0xA0000 || (caddr_t)paddr >= (caddr_t)0x100000) { - printf("si%d: iomem (%p) out of range\n", + kprintf("si%d: iomem (%p) out of range\n", unit, (void *)paddr); goto fail; } @@ -232,7 +232,7 @@ bad_irq: break; case SIMCA: /* MCA */ default: - printf("si%d: card type %d not supported\n", unit, type); + kprintf("si%d: card type %d not supported\n", unit, type); goto fail; } sc->sc_type = type; diff --git a/sys/dev/serial/sio/sio.c b/sys/dev/serial/sio/sio.c index 84d711e01c..d84db91f2b 100644 --- a/sys/dev/serial/sio/sio.c +++ b/sys/dev/serial/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/sio.c,v 1.291.2.35 2003/05/18 08:51:15 murray Exp $ - * $DragonFly: src/sys/dev/serial/sio/sio.c,v 1.37 2006/11/07 18:50:06 dillon Exp $ + * $DragonFly: src/sys/dev/serial/sio/sio.c,v 1.38 2006/12/22 23:26:24 swildner Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.234 */ @@ -616,7 +616,7 @@ sioprobe(dev, xrid, rclk) #endif if (COM_LLCONSOLE(flags)) { - printf("sio%d: reserved for low-level i/o\n", + kprintf("sio%d: reserved for low-level i/o\n", device_get_unit(dev)); bus_release_resource(dev, SYS_RES_IOPORT, rid, port); return (ENXIO); @@ -639,7 +639,7 @@ sioprobe(dev, xrid, rclk) idev = devclass_get_device(sio_devclass, COM_MPMASTER(flags)); if (idev == NULL) { - printf("sio%d: master device %d not configured\n", + kprintf("sio%d: master device %d not configured\n", device_get_unit(dev), COM_MPMASTER(flags)); idev = dev; } @@ -726,7 +726,7 @@ sioprobe(dev, xrid, rclk) (void)sio_getreg(com, com_data); } if (fn == 256) { - printf("sio%d: can't drain, serial port might " + kprintf("sio%d: can't drain, serial port might " "not exist, disabling\n", device_get_unit(dev)); com_unlock(); return (ENXIO); @@ -853,11 +853,11 @@ sioprobe(dev, xrid, rclk) irqs = irqmap[1] & ~irqmap[0]; if (bus_get_resource(idev, SYS_RES_IRQ, 0, &xirq, NULL) == 0 && ((1 << xirq) & irqs) == 0) - printf( + kprintf( "sio%d: configured irq %ld not in bitmap of probed irqs %#x\n", device_get_unit(dev), xirq, irqs); if (bootverbose) - printf("sio%d: irq maps: %#x %#x %#x %#x\n", + kprintf("sio%d: irq maps: %#x %#x %#x %#x\n", device_get_unit(dev), irqmap[0], irqmap[1], irqmap[2], irqmap[3]); @@ -867,12 +867,12 @@ sioprobe(dev, xrid, rclk) sio_setreg(com, com_mcr, 0); result = ENXIO; if (bootverbose) { - printf("sio%d: probe failed test(s):", + kprintf("sio%d: probe failed test(s):", device_get_unit(dev)); for (fn = 0; fn < sizeof failures; ++fn) if (failures[fn]) - printf(" %d", fn); - printf("\n"); + kprintf(" %d", fn); + kprintf("\n"); } break; } @@ -894,7 +894,7 @@ espattach(com, esp_port) * card. If not, return failure immediately. */ if ((inb(esp_port) & 0xf3) == 0) { - printf(" port 0x%x is not an ESP board?\n", esp_port); + kprintf(" port 0x%x is not an ESP board?\n", esp_port); return (0); } @@ -911,9 +911,9 @@ espattach(com, esp_port) * Bits 0,1 of dips say which COM port we are. */ if (rman_get_start(com->ioportres) == likely_com_ports[dips & 0x03]) - printf(" : ESP"); + kprintf(" : ESP"); else { - printf(" esp_port has com %d\n", dips & 0x03); + kprintf(" esp_port has com %d\n", dips & 0x03); return (0); } @@ -924,7 +924,7 @@ espattach(com, esp_port) val = inb(esp_port + ESP_STATUS1); /* clear reg 1 */ val = inb(esp_port + ESP_STATUS2); if ((val & 0x70) < 0x20) { - printf("-old (%o)", val & 0x70); + kprintf("-old (%o)", val & 0x70); return (0); } @@ -932,7 +932,7 @@ espattach(com, esp_port) * Check for ability to emulate 16550: bit 7 == 1 */ if ((dips & 0x80) == 0) { - printf(" slave"); + kprintf(" slave"); return (0); } @@ -1064,7 +1064,7 @@ sioattach(dev, xrid, rclk) com->it_out = com->it_in; /* attempt to determine UART type */ - printf("sio%d: type", unit); + kprintf("sio%d: type", unit); #ifdef COM_MULTIPORT @@ -1084,7 +1084,7 @@ sioattach(dev, xrid, rclk) scr2 = sio_getreg(com, com_scr); sio_setreg(com, com_scr, scr); if (scr1 != 0xa5 || scr2 != 0x5a) { - printf(" 8250"); + kprintf(" 8250"); goto determined_type; } } @@ -1093,29 +1093,29 @@ sioattach(dev, xrid, rclk) com->st16650a = 0; switch (inb(com->int_id_port) & IIR_FIFO_MASK) { case FIFO_RX_LOW: - printf(" 16450"); + kprintf(" 16450"); break; case FIFO_RX_MEDL: - printf(" 16450?"); + kprintf(" 16450?"); break; case FIFO_RX_MEDH: - printf(" 16550?"); + kprintf(" 16550?"); break; case FIFO_RX_HIGH: if (COM_NOFIFO(flags)) { - printf(" 16550A fifo disabled"); + kprintf(" 16550A fifo disabled"); } else { com->hasfifo = TRUE; if (COM_ST16650A(flags)) { com->st16650a = 1; com->tx_fifo_size = 32; - printf(" ST16650A"); + kprintf(" ST16650A"); } else if (COM_TI16754(flags)) { com->tx_fifo_size = 64; - printf(" TI16754"); + kprintf(" TI16754"); } else { com->tx_fifo_size = COM_FIFOSIZE(flags); - printf(" 16550A"); + kprintf(" 16550A"); } } #ifdef COM_ESP @@ -1129,7 +1129,7 @@ sioattach(dev, xrid, rclk) if (!com->tx_fifo_size) com->tx_fifo_size = 16; else - printf(" lookalike with %d bytes FIFO", + kprintf(" lookalike with %d bytes FIFO", com->tx_fifo_size); } @@ -1169,10 +1169,10 @@ determined_type: ; device_t masterdev; com->multiport = TRUE; - printf(" (multiport"); + kprintf(" (multiport"); if (unit == COM_MPMASTER(flags)) - printf(" master"); - printf(")"); + kprintf(" master"); + kprintf(")"); masterdev = devclass_get_device(sio_devclass, COM_MPMASTER(flags)); com->no_irq = (masterdev == NULL || bus_get_resource(masterdev, @@ -1180,10 +1180,10 @@ determined_type: ; } #endif /* COM_MULTIPORT */ if (unit == comconsole) - printf(", console"); + kprintf(", console"); if (COM_IIR_TXRDYBUG(flags)) - printf(" with a bogus IIR_TXRDY register"); - printf("\n"); + kprintf(" with a bogus IIR_TXRDY register"); + kprintf("\n"); if (!sio_registered) { register_swi(SWI_TTY, siopoll, NULL ,"swi_siopoll", NULL); @@ -1445,7 +1445,7 @@ sioclose(struct dev_close_args *ap) siosettimeout(); crit_exit(); if (com->gone) { - printf("sio%d: gone\n", com->unit); + kprintf("sio%d: gone\n", com->unit); crit_enter(); if (com->ibuf != NULL) kfree(com->ibuf, M_DEVBUF); @@ -2981,7 +2981,7 @@ siocnprobe(cp) siocnunit = unit; } if (COM_DEBUGGER(flags)) { - printf("sio%d: gdb debugging port\n", unit); + kprintf("sio%d: gdb debugging port\n", unit); siogdbiobase = iobase; siogdbunit = unit; #if DDB > 0 @@ -3002,10 +3002,10 @@ siocnprobe(cp) * as some configuration files don't specify the gdb port. */ if (gdbdev == NOCDEV && (boothowto & RB_GDB)) { - printf("Warning: no GDB port specified. Defaulting to sio%d.\n", + kprintf("Warning: no GDB port specified. Defaulting to sio%d.\n", siocnunit); - printf("Set flag 0x80 on desired GDB port in your\n"); - printf("configuration file (currently sio only).\n"); + kprintf("Set flag 0x80 on desired GDB port in your\n"); + kprintf("configuration file (currently sio only).\n"); siogdbiobase = siocniobase; siogdbunit = siocnunit; gdbdev = make_dev(&sio_ops, siocnunit, diff --git a/sys/dev/serial/stl/stallion.c b/sys/dev/serial/stl/stallion.c index 04c85cb504..2e42925990 100644 --- a/sys/dev/serial/stl/stallion.c +++ b/sys/dev/serial/stl/stallion.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/stallion.c,v 1.39.2.2 2001/08/30 12:29:57 murray Exp $ - * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.23 2006/11/07 06:43:24 dillon Exp $ + * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.24 2006/12/22 23:26:24 swildner Exp $ */ /*****************************************************************************/ @@ -781,7 +781,7 @@ static int stlprobe(struct isa_device *idp) unsigned int status; #if STLDEBUG - printf("stlprobe(idp=%x): unit=%d iobase=%x\n", (int) idp, + kprintf("stlprobe(idp=%x): unit=%d iobase=%x\n", (int) idp, idp->id_unit, idp->id_iobase); #endif @@ -840,7 +840,7 @@ static int stlattach(struct isa_device *idp) int boardnr, portnr, minor_dev; #if STLDEBUG - printf("stlattach(idp=%p): unit=%d iobase=%x\n", (void *) idp, + kprintf("stlattach(idp=%p): unit=%d iobase=%x\n", (void *) idp, idp->id_unit, idp->id_iobase); #endif @@ -849,7 +849,7 @@ static int stlattach(struct isa_device *idp) brdp = kmalloc(sizeof(stlbrd_t), M_TTYS, M_WAITOK | M_ZERO); if ((brdp->brdnr = stl_findfreeunit()) < 0) { - printf("STALLION: too many boards found, max=%d\n", + kprintf("STALLION: too many boards found, max=%d\n", STL_MAXBRDS); return(0); } @@ -977,7 +977,7 @@ static const char *stlpciprobe(pcici_t tag, pcidi_t type) int i, brdtype; #if STLDEBUG - printf("stlpciprobe(tag=%x,type=%x)\n", (int) &tag, (int) type); + kprintf("stlpciprobe(tag=%x,type=%x)\n", (int) &tag, (int) type); #endif brdtype = 0; @@ -1014,13 +1014,13 @@ void stlpciattach(pcici_t tag, int unit) int boardnr, portnr, minor_dev; #if STLDEBUG - printf("stlpciattach(tag=%x,unit=%x)\n", (int) &tag, unit); + kprintf("stlpciattach(tag=%x,unit=%x)\n", (int) &tag, unit); #endif brdp = kmalloc(sizeof(stlbrd_t), M_TTYS, M_WAITOK | M_ZERO); if ((unit < 0) || (unit > STL_MAXBRDS)) { - printf("STALLION: bad PCI board unit number=%d\n", unit); + kprintf("STALLION: bad PCI board unit number=%d\n", unit); return; } @@ -1028,7 +1028,7 @@ void stlpciattach(pcici_t tag, int unit) * Allocate us a new driver unique unit number. */ if ((brdp->brdnr = stl_findfreeunit()) < 0) { - printf("STALLION: too many boards found, max=%d\n", + kprintf("STALLION: too many boards found, max=%d\n", STL_MAXBRDS); return; } @@ -1048,7 +1048,7 @@ void stlpciattach(pcici_t tag, int unit) } if (i >= stl_nrpcibrds) { - printf("STALLION: probed PCI board unknown type=%x\n", id); + kprintf("STALLION: probed PCI board unknown type=%x\n", id); return; } @@ -1070,7 +1070,7 @@ void stlpciattach(pcici_t tag, int unit) brdp->ioaddr2 = bar[0]; break; default: - printf("STALLION: unknown PCI board type=%d\n", brdp->brdtype); + kprintf("STALLION: unknown PCI board type=%d\n", brdp->brdtype); return; break; } @@ -1079,7 +1079,7 @@ void stlpciattach(pcici_t tag, int unit) brdp->irq = ((int) pci_conf_read(tag, 0x3c)) & 0xff; brdp->irqtype = 0; if (pci_map_int(tag, stlpciintr, (void *) NULL) == 0) { - printf("STALLION: failed to map interrupt irq=%d for unit=%d\n", + kprintf("STALLION: failed to map interrupt irq=%d for unit=%d\n", brdp->irq, brdp->brdnr); return; } @@ -1147,7 +1147,7 @@ STATIC int stlopen(struct dev_open_args *ap) int error, callout; #if STLDEBUG - printf("stlopen(dev=%x,flag=%x,mode=%x,p=%x)\n", (int) dev, flag, + kprintf("stlopen(dev=%x,flag=%x,mode=%x,p=%x)\n", (int) dev, flag, mode, (int) p); #endif @@ -1265,7 +1265,7 @@ STATIC int stlclose(struct dev_close_args *ap) stlport_t *portp; #if STLDEBUG - printf("stlclose(dev=%s,flag=%x,mode=%x,p=%p)\n", devtoname(dev), + kprintf("stlclose(dev=%s,flag=%x,mode=%x,p=%p)\n", devtoname(dev), flag, mode, (void *) p); #endif @@ -1295,7 +1295,7 @@ STATIC int stlclose(struct dev_close_args *ap) STATIC void stl_stop(struct tty *tp, int rw) { #if STLDEBUG - printf("stl_stop(tp=%x,rw=%x)\n", (int) tp, rw); + kprintf("stl_stop(tp=%x,rw=%x)\n", (int) tp, rw); #endif stl_flush((stlport_t *) tp, rw); @@ -1306,7 +1306,7 @@ STATIC void stl_stop(struct tty *tp, int rw) STATIC int stlstop(struct tty *tp, int rw) { #if STLDEBUG - printf("stlstop(tp=%x,rw=%x)\n", (int) tp, rw); + kprintf("stlstop(tp=%x,rw=%x)\n", (int) tp, rw); #endif stl_flush((stlport_t *) tp, rw); @@ -1328,7 +1328,7 @@ STATIC int stlioctl(struct dev_ioctl_args *ap) int error, i; #if STLDEBUG - printf("stlioctl(dev=%s,cmd=%lx,data=%p,flag=%x)\n", + kprintf("stlioctl(dev=%s,cmd=%lx,data=%p,flag=%x)\n", devtoname(dev), cmd, (void *) data, ap->a_fflag); #endif @@ -1521,7 +1521,7 @@ STATIC stlport_t *stl_dev2port(cdev_t dev) static int stl_rawopen(stlport_t *portp) { #if STLDEBUG - printf("stl_rawopen(portp=%p): brdnr=%d panelnr=%d portnr=%d\n", + kprintf("stl_rawopen(portp=%p): brdnr=%d panelnr=%d portnr=%d\n", (void *) portp, portp->brdnr, portp->panelnr, portp->portnr); #endif @@ -1545,7 +1545,7 @@ static int stl_rawclose(stlport_t *portp) struct tty *tp; #if STLDEBUG - printf("stl_rawclose(portp=%p): brdnr=%d panelnr=%d portnr=%d\n", + kprintf("stl_rawclose(portp=%p): brdnr=%d panelnr=%d portnr=%d\n", (void *) portp, portp->brdnr, portp->panelnr, portp->portnr); #endif @@ -1605,7 +1605,7 @@ static void stl_start(struct tty *tp) portp = (stlport_t *) tp; #if STLDEBUG - printf("stl_start(tp=%x): brdnr=%d portnr=%d\n", (int) tp, + kprintf("stl_start(tp=%x): brdnr=%d portnr=%d\n", (int) tp, portp->brdnr, portp->portnr); #endif @@ -1705,7 +1705,7 @@ static void stl_flush(stlport_t *portp, int flag) int len; #if STLDEBUG - printf("stl_flush(portp=%x,flag=%x)\n", (int) portp, flag); + kprintf("stl_flush(portp=%x,flag=%x)\n", (int) portp, flag); #endif if (portp == (stlport_t *) NULL) @@ -1762,7 +1762,7 @@ void stlintr(void *arg) int i; #if STLDEBUG - printf("stlintr(unit=%d)\n", (int)arg); + kprintf("stlintr(unit=%d)\n", (int)arg); #endif for (i = 0; (i < stl_nrbrds); i++) { @@ -1797,7 +1797,7 @@ static void stl_eiointr(stlbrd_t *brdp) int iobase; #if STLDEBUG - printf("stl_eiointr(brdp=%p)\n", brdp); + kprintf("stl_eiointr(brdp=%p)\n", brdp); #endif panelp = (stlpanel_t *) brdp->panels[0]; @@ -1867,7 +1867,7 @@ static void stl_echpciintr(stlbrd_t *brdp) int bnknr, recheck; #if STLDEBUG - printf("stl_echpciintr(brdp=%x)\n", (int) brdp); + kprintf("stl_echpciintr(brdp=%x)\n", (int) brdp); #endif for (;;) { @@ -1899,14 +1899,14 @@ static void stl_echpci64intr(stlbrd_t *brdp) int bnknr; #if STLDEBUG - printf("stl_echpci64intr(brdp=%p)\n", brdp); + kprintf("stl_echpci64intr(brdp=%p)\n", brdp); #endif while (inb(brdp->ioctrl) & 0x1) { for (bnknr = 0; (bnknr < brdp->nrbnks); bnknr++) { ioaddr = brdp->bnkstataddr[bnknr]; #if STLDEBUG - printf(" --> ioaddr=%x status=%x(%x)\n", ioaddr, inb(ioaddr) & ECH_PNLINTRPEND, inb(ioaddr)); + kprintf(" --> ioaddr=%x status=%x(%x)\n", ioaddr, inb(ioaddr) & ECH_PNLINTRPEND, inb(ioaddr)); #endif if (inb(ioaddr) & ECH_PNLINTRPEND) { panelp = brdp->bnk2panel[bnknr]; @@ -1926,7 +1926,7 @@ static void stl_echpci64intr(stlbrd_t *brdp) static void stl_dotimeout() { #if STLDEBUG - printf("stl_dotimeout()\n"); + kprintf("stl_dotimeout()\n"); #endif if (stl_doingtimeout == 0) { if ((stl_poll_ch.c_flags & CALLOUT_DID_INIT) == 0) @@ -1952,7 +1952,7 @@ static void stl_poll(void *arg) int brdnr, portnr, rearm; #if STLDEBUG - printf("stl_poll()\n"); + kprintf("stl_poll()\n"); #endif stl_doingtimeout = 0; @@ -2014,7 +2014,7 @@ static void stl_rxprocess(stlport_t *portp) int ch; #if STLDEBUG - printf("stl_rxprocess(portp=%x): brdnr=%d portnr=%d\n", (int) portp, + kprintf("stl_rxprocess(portp=%x): brdnr=%d portnr=%d\n", (int) portp, portp->brdnr, portp->portnr); #endif @@ -2124,7 +2124,7 @@ static void stl_flowcontrol(stlport_t *portp, int hw, int sw) int len, hwflow; #if STLDEBUG - printf("stl_flowcontrol(portp=%x,hw=%d,sw=%d)\n", (int) portp, hw, sw); + kprintf("stl_flowcontrol(portp=%x,hw=%d,sw=%d)\n", (int) portp, hw, sw); #endif hwflow = -1; @@ -2191,7 +2191,7 @@ static int stl_initports(stlbrd_t *brdp, stlpanel_t *panelp) int i, j; #if STLDEBUG - printf("stl_initports(panelp=%x)\n", (int) panelp); + kprintf("stl_initports(panelp=%x)\n", (int) panelp); #endif chipmask = stl_panelinit(brdp, panelp); @@ -2256,7 +2256,7 @@ static int stl_initeio(stlbrd_t *brdp) unsigned int status; #if STLDEBUG - printf("stl_initeio(brdp=%x)\n", (int) brdp); + kprintf("stl_initeio(brdp=%x)\n", (int) brdp); #endif brdp->ioctrl = brdp->ioaddr1 + 1; @@ -2306,7 +2306,7 @@ static int stl_initeio(stlbrd_t *brdp) */ if ((brdp->irq < 0) || (brdp->irq > 15) || (stl_vecmap[brdp->irq] == (unsigned char) 0xff)) { - printf("STALLION: invalid irq=%d for brd=%d\n", + kprintf("STALLION: invalid irq=%d for brd=%d\n", brdp->irq, brdp->brdnr); return(EINVAL); } @@ -2348,7 +2348,7 @@ static int stl_initech(stlbrd_t *brdp) int panelnr, ioaddr, banknr, i; #if STLDEBUG - printf("stl_initech(brdp=%x)\n", (int) brdp); + kprintf("stl_initech(brdp=%x)\n", (int) brdp); #endif /* @@ -2369,7 +2369,7 @@ static int stl_initech(stlbrd_t *brdp) if ((brdp->irq < 0) || (brdp->irq > 15) || (stl_vecmap[brdp->irq] == (unsigned char) 0xff)) { - printf("STALLION: invalid irq=%d for brd=%d\n", + kprintf("STALLION: invalid irq=%d for brd=%d\n", brdp->irq, brdp->brdnr); return(EINVAL); } @@ -2393,7 +2393,7 @@ static int stl_initech(stlbrd_t *brdp) if ((brdp->irq < 0) || (brdp->irq > 15) || (stl_vecmap[brdp->irq] == (unsigned char) 0xff)) { - printf("STALLION: invalid irq=%d for brd=%d\n", + kprintf("STALLION: invalid irq=%d for brd=%d\n", brdp->irq, brdp->brdnr); return(EINVAL); } @@ -2413,7 +2413,7 @@ static int stl_initech(stlbrd_t *brdp) break; default: - printf("STALLION: unknown board type=%d\n", brdp->brdtype); + kprintf("STALLION: unknown board type=%d\n", brdp->brdtype); break; } @@ -2482,7 +2482,7 @@ static int stl_initech(stlbrd_t *brdp) brdp->panels[panelnr++] = panelp; if ((brdp->brdtype == BRD_ECH) || (brdp->brdtype == BRD_ECHMC)){ if (ioaddr >= (brdp->ioaddr2 + 0x20)) { - printf("STALLION: too many ports attached " + kprintf("STALLION: too many ports attached " "to board %d, remove last module\n", brdp->brdnr); break; @@ -2513,7 +2513,7 @@ static int stl_brdinit(stlbrd_t *brdp) int i, j, k; #if STLDEBUG - printf("stl_brdinit(brdp=%x): unit=%d type=%d io1=%x io2=%x irq=%d\n", + kprintf("stl_brdinit(brdp=%x): unit=%d type=%d io1=%x io2=%x irq=%d\n", (int) brdp, brdp->brdnr, brdp->brdtype, brdp->ioaddr1, brdp->ioaddr2, brdp->irq); #endif @@ -2530,7 +2530,7 @@ static int stl_brdinit(stlbrd_t *brdp) stl_initech(brdp); break; default: - printf("STALLION: unit=%d is unknown board type=%d\n", + kprintf("STALLION: unit=%d is unknown board type=%d\n", brdp->brdnr, brdp->brdtype); return(ENODEV); } @@ -2538,7 +2538,7 @@ static int stl_brdinit(stlbrd_t *brdp) stl_brds[brdp->brdnr] = brdp; if ((brdp->state & BRD_FOUND) == 0) { #if 0 - printf("STALLION: %s board not found, unit=%d io=%x irq=%d\n", + kprintf("STALLION: %s board not found, unit=%d io=%x irq=%d\n", stl_brdnames[brdp->brdtype], brdp->brdnr, brdp->ioaddr1, brdp->irq); #endif @@ -2554,7 +2554,7 @@ static int stl_brdinit(stlbrd_t *brdp) } } - printf("stl%d: %s (driver version %s) unit=%d nrpanels=%d nrports=%d\n", + kprintf("stl%d: %s (driver version %s) unit=%d nrpanels=%d nrports=%d\n", brdp->unitid, stl_brdnames[brdp->brdtype], stl_drvversion, brdp->brdnr, brdp->nrpanels, brdp->nrports); return(0); @@ -2706,7 +2706,7 @@ static int stl_memioctl(cdev_t dev, unsigned long cmd, caddr_t data, int flag) int rc; #if STLDEBUG - printf("stl_memioctl(dev=%s,cmd=%lx,data=%p,flag=%x)\n", + kprintf("stl_memioctl(dev=%s,cmd=%lx,data=%p,flag=%x)\n", devtoname(dev), cmd, (void *) data, flag); #endif @@ -2773,7 +2773,7 @@ static void stl_cd1400flush(stlport_t *portp, int flag) { #if STLDEBUG - printf("stl_cd1400flush(portp=%x,flag=%x)\n", (int) portp, flag); + kprintf("stl_cd1400flush(portp=%x,flag=%x)\n", (int) portp, flag); #endif if (portp == (stlport_t *) NULL) @@ -2808,7 +2808,7 @@ static void stl_cd1400ccrwait(stlport_t *portp) return; } - printf("stl%d: cd1400 device not responding, panel=%d port=%d\n", + kprintf("stl%d: cd1400 device not responding, panel=%d port=%d\n", portp->brdnr, portp->panelnr, portp->portnr); } @@ -2830,13 +2830,13 @@ static __inline void stl_cd1400txisr(stlpanel_t *panelp, int ioaddr) int len, stlen; #if STLDEBUG - printf("stl_cd1400txisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); + kprintf("stl_cd1400txisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); #endif ioack = inb(ioaddr + EREG_TXACK); if (((ioack & panelp->ackmask) != 0) || ((ioack & ACK_TYPMASK) != ACK_TYPTX)) { - printf("STALLION: bad TX interrupt ack value=%x\n", + kprintf("STALLION: bad TX interrupt ack value=%x\n", ioack); return; } @@ -2945,12 +2945,12 @@ static __inline void stl_cd1400rxisr(stlpanel_t *panelp, int ioaddr) char *head, *tail; #if STLDEBUG - printf("stl_cd1400rxisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); + kprintf("stl_cd1400rxisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); #endif ioack = inb(ioaddr + EREG_RXACK); if ((ioack & panelp->ackmask) != 0) { - printf("STALLION: bad RX interrupt ack value=%x\n", ioack); + kprintf("STALLION: bad RX interrupt ack value=%x\n", ioack); return; } portp = panelp->ports[(ioack >> 3)]; @@ -3048,7 +3048,7 @@ static __inline void stl_cd1400rxisr(stlpanel_t *panelp, int ioaddr) head = portp->rx.buf; } } else { - printf("STALLION: bad RX interrupt ack value=%x\n", ioack); + kprintf("STALLION: bad RX interrupt ack value=%x\n", ioack); return; } @@ -3075,13 +3075,13 @@ static __inline void stl_cd1400mdmisr(stlpanel_t *panelp, int ioaddr) unsigned char misr; #if STLDEBUG - printf("stl_cd1400mdmisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); + kprintf("stl_cd1400mdmisr(panelp=%x,ioaddr=%x)\n", (int) panelp, ioaddr); #endif ioack = inb(ioaddr + EREG_MDACK); if (((ioack & panelp->ackmask) != 0) || ((ioack & ACK_TYPMASK) != ACK_TYPMDM)) { - printf("STALLION: bad MODEM interrupt ack value=%x\n", ioack); + kprintf("STALLION: bad MODEM interrupt ack value=%x\n", ioack); return; } portp = panelp->ports[(ioack >> 3)]; @@ -3109,7 +3109,7 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase) unsigned char svrtype; #if STLDEBUG - printf("stl_cd1400eiointr(panelp=%x,iobase=%x)\n", (int) panelp, + kprintf("stl_cd1400eiointr(panelp=%x,iobase=%x)\n", (int) panelp, iobase); #endif @@ -3120,7 +3120,7 @@ static void stl_cd1400eiointr(stlpanel_t *panelp, unsigned int iobase) svrtype |= inb(iobase + EREG_DATA); } #if STLDEBUG -printf("stl_cd1400eiointr(panelp=%x,iobase=%x): svrr=%x\n", (int) panelp, iobase, svrtype); +kprintf("stl_cd1400eiointr(panelp=%x,iobase=%x): svrr=%x\n", (int) panelp, iobase, svrtype); #endif if (svrtype & SVRR_RX) @@ -3142,7 +3142,7 @@ static void stl_cd1400echintr(stlpanel_t *panelp, unsigned int iobase) unsigned char svrtype; #if STLDEBUG - printf("stl_cd1400echintr(panelp=%x,iobase=%x)\n", (int) panelp, + kprintf("stl_cd1400echintr(panelp=%x,iobase=%x)\n", (int) panelp, iobase); #endif @@ -3175,7 +3175,7 @@ static int stl_cd1400setport(stlport_t *portp, struct termios *tiosp) unsigned char clk, div; #if STLDEBUG - printf("stl_cd1400setport(portp=%x,tiosp=%x): brdnr=%d portnr=%d\n", + kprintf("stl_cd1400setport(portp=%x,tiosp=%x): brdnr=%d portnr=%d\n", (int) portp, (int) tiosp, portp->brdnr, portp->portnr); #endif @@ -3306,14 +3306,14 @@ static int stl_cd1400setport(stlport_t *portp, struct termios *tiosp) * all up. */ #if STLDEBUG - printf("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, + kprintf("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, portp->panelnr, portp->brdnr); - printf(" cor1=%x cor2=%x cor3=%x cor4=%x cor5=%x\n", cor1, cor2, + kprintf(" cor1=%x cor2=%x cor3=%x cor4=%x cor5=%x\n", cor1, cor2, cor3, cor4, cor5); - printf(" mcor1=%x mcor2=%x rtpr=%x sreron=%x sreroff=%x\n", + kprintf(" mcor1=%x mcor2=%x rtpr=%x sreron=%x sreroff=%x\n", mcor1, mcor2, rtpr, sreron, sreroff); - printf(" tcor=%x tbpr=%x rcor=%x rbpr=%x\n", clk, div, clk, div); - printf(" schr1=%x schr2=%x schr3=%x schr4=%x\n", + kprintf(" tcor=%x tbpr=%x rcor=%x rbpr=%x\n", clk, div, clk, div); + kprintf(" schr1=%x schr2=%x schr3=%x schr4=%x\n", tiosp->c_cc[VSTART], tiosp->c_cc[VSTOP], tiosp->c_cc[VSTART], tiosp->c_cc[VSTOP]); #endif @@ -3375,7 +3375,7 @@ static void stl_cd1400sendflow(stlport_t *portp, int hw, int sw) { #if STLDEBUG - printf("stl_cd1400sendflow(portp=%x,hw=%d,sw=%d)\n", + kprintf("stl_cd1400sendflow(portp=%x,hw=%d,sw=%d)\n", (int) portp, hw, sw); #endif @@ -3425,7 +3425,7 @@ static void stl_cd1400sendflow(stlport_t *portp, int hw, int sw) static int stl_cd1400datastate(stlport_t *portp) { #if STLDEBUG - printf("stl_cd1400datastate(portp=%x)\n", (int) portp); + kprintf("stl_cd1400datastate(portp=%x)\n", (int) portp); #endif if (portp == (stlport_t *) NULL) @@ -3446,7 +3446,7 @@ static void stl_cd1400setsignals(stlport_t *portp, int dtr, int rts) unsigned char msvr1, msvr2; #if STLDEBUG - printf("stl_cd1400setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, + kprintf("stl_cd1400setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, dtr, rts); #endif @@ -3493,7 +3493,7 @@ static int stl_cd1400getsignals(stlport_t *portp) int sigs; #if STLDEBUG - printf("stl_cd1400getsignals(portp=%x)\n", (int) portp); + kprintf("stl_cd1400getsignals(portp=%x)\n", (int) portp); #endif crit_enter(); @@ -3529,7 +3529,7 @@ static void stl_cd1400enablerxtx(stlport_t *portp, int rx, int tx) unsigned char ccr; #if STLDEBUG - printf("stl_cd1400enablerxtx(portp=%x,rx=%d,tx=%d)\n", + kprintf("stl_cd1400enablerxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx); #endif @@ -3564,7 +3564,7 @@ static void stl_cd1400startrxtx(stlport_t *portp, int rx, int tx) unsigned char sreron, sreroff; #if STLDEBUG - printf("stl_cd1400startrxtx(portp=%x,rx=%d,tx=%d)\n", + kprintf("stl_cd1400startrxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx); #endif @@ -3604,7 +3604,7 @@ static void stl_cd1400disableintrs(stlport_t *portp) { #if STLDEBUG - printf("stl_cd1400disableintrs(portp=%x)\n", (int) portp); + kprintf("stl_cd1400disableintrs(portp=%x)\n", (int) portp); #endif crit_enter(); @@ -3621,7 +3621,7 @@ static void stl_cd1400sendbreak(stlport_t *portp, long len) { #if STLDEBUG - printf("stl_cd1400sendbreak(portp=%x,len=%d)\n", (int) portp, + kprintf("stl_cd1400sendbreak(portp=%x,len=%d)\n", (int) portp, (int) len); #endif @@ -3655,7 +3655,7 @@ static void stl_cd1400sendbreak(stlport_t *portp, long len) static void stl_cd1400portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) { #if STLDEBUG - printf("stl_cd1400portinit(brdp=%x,panelp=%x,portp=%x)\n", + kprintf("stl_cd1400portinit(brdp=%x,panelp=%x,portp=%x)\n", (int) brdp, (int) panelp, (int) portp); #endif @@ -3690,7 +3690,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) int nrchips, uartaddr, ioaddr; #if STLDEBUG - printf("stl_cd1400panelinit(brdp=%x,panelp=%x)\n", (int) brdp, + kprintf("stl_cd1400panelinit(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp); #endif @@ -3720,7 +3720,7 @@ static int stl_cd1400panelinit(stlbrd_t *brdp, stlpanel_t *panelp) break; } if ((j >= CCR_MAXWAIT) || (gfrcr < 0x40) || (gfrcr > 0x60)) { - printf("STALLION: cd1400 not responding, " + kprintf("STALLION: cd1400 not responding, " "board=%d panel=%d chip=%d\n", panelp->brdnr, panelp->panelnr, i); continue; @@ -3801,7 +3801,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp) int nrchips, ioaddr; #if STLDEBUG - printf("stl_sc26198panelinit(brdp=%x,panelp=%x)\n", (int) brdp, + kprintf("stl_sc26198panelinit(brdp=%x,panelp=%x)\n", (int) brdp, (int) panelp); #endif @@ -3821,7 +3821,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp) outb((ioaddr + XP_DATA), CR_RESETALL); outb((ioaddr + XP_ADDR), TSTR); if (inb(ioaddr + XP_DATA) != 0) { - printf("STALLION: sc26198 not responding, " + kprintf("STALLION: sc26198 not responding, " "board=%d panel=%d chip=%d\n", panelp->brdnr, panelp->panelnr, i); continue; @@ -3846,7 +3846,7 @@ static int stl_sc26198panelinit(stlbrd_t *brdp, stlpanel_t *panelp) static void stl_sc26198portinit(stlbrd_t *brdp, stlpanel_t *panelp, stlport_t *portp) { #if STLDEBUG - printf("stl_sc26198portinit(brdp=%x,panelp=%x,portp=%x)\n", + kprintf("stl_sc26198portinit(brdp=%x,panelp=%x,portp=%x)\n", (int) brdp, (int) panelp, (int) portp); #endif @@ -3877,7 +3877,7 @@ static int stl_sc26198setport(stlport_t *portp, struct termios *tiosp) unsigned char imron, imroff, iopr, ipr; #if STLDEBUG - printf("stl_sc26198setport(portp=%x,tiosp=%x): brdnr=%d portnr=%d\n", + kprintf("stl_sc26198setport(portp=%x,tiosp=%x): brdnr=%d portnr=%d\n", (int) portp, (int) tiosp, portp->brdnr, portp->portnr); #endif @@ -4001,11 +4001,11 @@ static int stl_sc26198setport(stlport_t *portp, struct termios *tiosp) */ #if STLDEBUG - printf("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, + kprintf("SETPORT: portnr=%d panelnr=%d brdnr=%d\n", portp->portnr, portp->panelnr, portp->brdnr); - printf(" mr0=%x mr1=%x mr2=%x clk=%x\n", mr0, mr1, mr2, clk); - printf(" iopr=%x imron=%x imroff=%x\n", iopr, imron, imroff); - printf(" schr1=%x schr2=%x schr3=%x schr4=%x\n", + kprintf(" mr0=%x mr1=%x mr2=%x clk=%x\n", mr0, mr1, mr2, clk); + kprintf(" iopr=%x imron=%x imroff=%x\n", iopr, imron, imroff); + kprintf(" schr1=%x schr2=%x schr3=%x schr4=%x\n", tiosp->c_cc[VSTART], tiosp->c_cc[VSTOP], tiosp->c_cc[VSTART], tiosp->c_cc[VSTOP]); #endif @@ -4056,7 +4056,7 @@ static void stl_sc26198setsignals(stlport_t *portp, int dtr, int rts) unsigned char iopioron, iopioroff; #if STLDEBUG - printf("stl_sc26198setsignals(portp=%x,dtr=%d,rts=%d)\n", + kprintf("stl_sc26198setsignals(portp=%x,dtr=%d,rts=%d)\n", (int) portp, dtr, rts); #endif @@ -4102,7 +4102,7 @@ static int stl_sc26198getsignals(stlport_t *portp) int sigs; #if STLDEBUG - printf("stl_sc26198getsignals(portp=%x)\n", (int) portp); + kprintf("stl_sc26198getsignals(portp=%x)\n", (int) portp); #endif crit_enter(); @@ -4130,7 +4130,7 @@ static void stl_sc26198enablerxtx(stlport_t *portp, int rx, int tx) unsigned char ccr; #if STLDEBUG - printf("stl_sc26198enablerxtx(portp=%x,rx=%d,tx=%d)\n", + kprintf("stl_sc26198enablerxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx); #endif @@ -4163,7 +4163,7 @@ static void stl_sc26198startrxtx(stlport_t *portp, int rx, int tx) unsigned char imr; #if STLDEBUG - printf("stl_sc26198startrxtx(portp=%x,rx=%d,tx=%d)\n", + kprintf("stl_sc26198startrxtx(portp=%x,rx=%d,tx=%d)\n", (int) portp, rx, tx); #endif @@ -4199,7 +4199,7 @@ static void stl_sc26198disableintrs(stlport_t *portp) { #if STLDEBUG - printf("stl_sc26198disableintrs(portp=%x)\n", (int) portp); + kprintf("stl_sc26198disableintrs(portp=%x)\n", (int) portp); #endif crit_enter(); @@ -4216,7 +4216,7 @@ static void stl_sc26198sendbreak(stlport_t *portp, long len) { #if STLDEBUG - printf("stl_sc26198sendbreak(portp=%x,len=%d)\n", + kprintf("stl_sc26198sendbreak(portp=%x,len=%d)\n", (int) portp, (int) len); #endif @@ -4243,7 +4243,7 @@ static void stl_sc26198sendflow(stlport_t *portp, int hw, int sw) unsigned char mr0; #if STLDEBUG - printf("stl_sc26198sendflow(portp=%x,hw=%d,sw=%d)\n", + kprintf("stl_sc26198sendflow(portp=%x,hw=%d,sw=%d)\n", (int) portp, hw, sw); #endif @@ -4304,7 +4304,7 @@ static int stl_sc26198datastate(stlport_t *portp) unsigned char sr; #if STLDEBUG - printf("stl_sc26198datastate(portp=%x)\n", (int) portp); + kprintf("stl_sc26198datastate(portp=%x)\n", (int) portp); #endif if (portp == (stlport_t *) NULL) @@ -4327,7 +4327,7 @@ static void stl_sc26198flush(stlport_t *portp, int flag) { #if STLDEBUG - printf("stl_sc26198flush(portp=%x,flag=%x)\n", (int) portp, flag); + kprintf("stl_sc26198flush(portp=%x,flag=%x)\n", (int) portp, flag); #endif if (portp == (stlport_t *) NULL) @@ -4379,7 +4379,7 @@ static void stl_sc26198wait(stlport_t *portp) int i; #if STLDEBUG - printf("stl_sc26198wait(portp=%x)\n", (int) portp); + kprintf("stl_sc26198wait(portp=%x)\n", (int) portp); #endif if (portp == (stlport_t *) NULL) @@ -4405,7 +4405,7 @@ static __inline void stl_sc26198txisr(stlport_t *portp) int len, stlen; #if STLDEBUG - printf("stl_sc26198txisr(portp=%x)\n", (int) portp); + kprintf("stl_sc26198txisr(portp=%x)\n", (int) portp); #endif ioaddr = portp->ioaddr; @@ -4463,7 +4463,7 @@ static __inline void stl_sc26198txisr(stlport_t *portp) static __inline void stl_sc26198rxisr(stlport_t *portp, unsigned int iack) { #if STLDEBUG - printf("stl_sc26198rxisr(portp=%x,iack=%x)\n", (int) portp, iack); + kprintf("stl_sc26198rxisr(portp=%x,iack=%x)\n", (int) portp, iack); #endif if ((iack & IVR_TYPEMASK) == IVR_RXDATA) @@ -4492,7 +4492,7 @@ static void stl_sc26198rxgoodchars(stlport_t *portp) char *head, *tail; #if STLDEBUG - printf("stl_sc26198rxgoodchars(port=%x)\n", (int) portp); + kprintf("stl_sc26198rxgoodchars(port=%x)\n", (int) portp); #endif ioaddr = portp->ioaddr; @@ -4652,7 +4652,7 @@ static void stl_sc26198otherisr(stlport_t *portp, unsigned int iack) unsigned char cir, ipr, xisr; #if STLDEBUG - printf("stl_sc26198otherisr(portp=%x,iack=%x)\n", (int) portp, iack); + kprintf("stl_sc26198otherisr(portp=%x,iack=%x)\n", (int) portp, iack); #endif cir = stl_sc26198getglobreg(portp, CIR); @@ -4705,7 +4705,7 @@ static void stl_sc26198intr(stlpanel_t *panelp, unsigned int iobase) iack = inb(iobase + XP_IACK); #if STLDEBUG - printf("stl_sc26198intr(panelp=%p,iobase=%x): iack=%x\n", panelp, iobase, iack); + kprintf("stl_sc26198intr(panelp=%p,iobase=%x): iack=%x\n", panelp, iobase, iack); #endif portp = panelp->ports[(iack & IVR_CHANMASK) + ((iobase & 0x4) << 1)]; diff --git a/sys/dev/serial/stli/istallion.c b/sys/dev/serial/stli/istallion.c index 23539d2d4f..f2a68dcdb8 100644 --- a/sys/dev/serial/stli/istallion.c +++ b/sys/dev/serial/stli/istallion.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/istallion.c,v 1.36.2.2 2001/08/30 12:29:57 murray Exp $ - * $DragonFly: src/sys/dev/serial/stli/istallion.c,v 1.20 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/serial/stli/istallion.c,v 1.21 2006/12/22 23:26:25 swildner Exp $ */ /*****************************************************************************/ @@ -685,7 +685,7 @@ static int stli_isaprobe(struct isa_device *idp) int btype; #if STLDEBUG - printf("stli_isaprobe(idp=%x): unit=%d iobase=%x flags=%x\n", + kprintf("stli_isaprobe(idp=%x): unit=%d iobase=%x flags=%x\n", (int) idp, idp->id_unit, idp->id_iobase, idp->id_flags); #endif @@ -718,7 +718,7 @@ static int stli_eisaprobe(struct isa_device *idp) int btype, eid; #if STLDEBUG - printf("stli_eisaprobe(idp=%x): unit=%d iobase=%x flags=%x\n", + kprintf("stli_eisaprobe(idp=%x): unit=%d iobase=%x flags=%x\n", (int) idp, idp->id_unit, idp->id_iobase, idp->id_flags); #endif @@ -765,7 +765,7 @@ static int stliprobe(struct isa_device *idp) int btype, bclass; #if STLDEBUG - printf("stliprobe(idp=%x): unit=%d iobase=%x flags=%x\n", (int) idp, + kprintf("stliprobe(idp=%x): unit=%d iobase=%x flags=%x\n", (int) idp, idp->id_unit, idp->id_iobase, idp->id_flags); #endif @@ -812,7 +812,7 @@ static int stliprobe(struct isa_device *idp) brdp->paddr = vtophys(idp->id_maddr); #if STLDEBUG - printf("%s(%d): btype=%x unit=%d brd=%d io=%x mem=%lx(%p)\n", + kprintf("%s(%d): btype=%x unit=%d brd=%d io=%x mem=%lx(%p)\n", __file__, __LINE__, btype, brdp->unitid, brdp->brdnr, brdp->iobase, brdp->paddr, (void *) brdp->vaddr); #endif @@ -839,7 +839,7 @@ static int stliattach(struct isa_device *idp) int brdnr; #if STLDEBUG - printf("stliattach(idp=%p): unit=%d iobase=%x\n", (void *) idp, + kprintf("stliattach(idp=%p): unit=%d iobase=%x\n", (void *) idp, idp->id_unit, idp->id_iobase); #endif @@ -863,7 +863,7 @@ STATIC int stliopen(struct dev_open_args *ap) int error, callout; #if STLDEBUG - printf("stliopen(dev=%x,flag=%x,mode=%x,p=%x)\n", (int) dev, flag, + kprintf("stliopen(dev=%x,flag=%x,mode=%x,p=%x)\n", (int) dev, flag, mode, (int) p); #endif @@ -993,7 +993,7 @@ STATIC int stliclose(struct dev_close_args *ap) stliport_t *portp; #if STLDEBUG - printf("stliclose(dev=%s,flag=%x,mode=%x,p=%p)\n", + kprintf("stliclose(dev=%s,flag=%x,mode=%x,p=%p)\n", devtoname(dev), flag, mode, (void *) p); #endif @@ -1023,7 +1023,7 @@ STATIC int stliread(struct dev_read_args *ap) stliport_t *portp; #if STLDEBUG - printf("stliread(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev), + kprintf("stliread(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev), ap->a_uio, flag); #endif @@ -1045,7 +1045,7 @@ STATIC int stliread(struct dev_read_args *ap) STATIC void stli_stop(struct tty *tp, int rw) { #if STLDEBUG - printf("stli_stop(tp=%x,rw=%x)\n", (int) tp, rw); + kprintf("stli_stop(tp=%x,rw=%x)\n", (int) tp, rw); #endif stli_flush((stliport_t *) tp, rw); @@ -1056,7 +1056,7 @@ STATIC void stli_stop(struct tty *tp, int rw) STATIC int stlistop(struct tty *tp, int rw) { #if STLDEBUG - printf("stlistop(tp=%x,rw=%x)\n", (int) tp, rw); + kprintf("stlistop(tp=%x,rw=%x)\n", (int) tp, rw); #endif stli_flush((stliport_t *) tp, rw); @@ -1073,7 +1073,7 @@ STATIC int stliwrite(struct dev_write_args *ap) stliport_t *portp; #if STLDEBUG - printf("stliwrite(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev), + kprintf("stliwrite(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev), ap->a_uio, flag); #endif @@ -1102,7 +1102,7 @@ STATIC int stliioctl(struct dev_ioctl_args *ap) int error, i; #if STLDEBUG - printf("stliioctl(dev=%s,cmd=%lx,data=%p,flag=%x,p=%p)\n", + kprintf("stliioctl(dev=%s,cmd=%lx,data=%p,flag=%x,p=%p)\n", devtoname(dev), cmd, (void *) data, ap->a_fflag, (void *) p); #endif @@ -1332,7 +1332,7 @@ static int stli_initopen(stliport_t *portp) int rc; #if STLDEBUG - printf("stli_initopen(portp=%x)\n", (int) portp); + kprintf("stli_initopen(portp=%x)\n", (int) portp); #endif if ((brdp = stli_brds[portp->brdnr]) == (stlibrd_t *) NULL) @@ -1385,7 +1385,7 @@ static int stli_shutdownclose(stliport_t *portp) struct tty *tp; #if STLDEBUG - printf("stli_shutdownclose(portp=%p): brdnr=%d panelnr=%d portnr=%d\n", + kprintf("stli_shutdownclose(portp=%p): brdnr=%d panelnr=%d portnr=%d\n", (void *) portp, portp->brdnr, portp->panelnr, portp->portnr); #endif @@ -1451,7 +1451,7 @@ static int stli_rawopen(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, i int rc; #if STLDEBUG - printf("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, + kprintf("stli_rawopen(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait); #endif @@ -1527,7 +1527,7 @@ static int stli_rawclose(stlibrd_t *brdp, stliport_t *portp, unsigned long arg, int rc; #if STLDEBUG - printf("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, + kprintf("stli_rawclose(brdp=%x,portp=%x,arg=%x,wait=%d)\n", (int) brdp, (int) portp, (int) arg, wait); #endif @@ -1599,7 +1599,7 @@ static int stli_cmdwait(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, v int rc; #if STLDEBUG - printf("stli_cmdwait(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d," + kprintf("stli_cmdwait(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d," "copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, (int) arg, size, copyback); #endif @@ -1653,7 +1653,7 @@ static void stli_start(struct tty *tp) portp = (stliport_t *) tp; #if STLDEBUG - printf("stli_start(tp=%x): brdnr=%d portnr=%d\n", (int) tp, + kprintf("stli_start(tp=%x): brdnr=%d portnr=%d\n", (int) tp, portp->brdnr, portp->portnr); #endif @@ -1787,7 +1787,7 @@ static void stli_flush(stliport_t *portp, int flag) unsigned long ftype; #if STLDEBUG - printf("stli_flush(portp=%x,flag=%x)\n", (int) portp, flag); + kprintf("stli_flush(portp=%x,flag=%x)\n", (int) portp, flag); #endif if (portp == (stliport_t *) NULL) @@ -1834,13 +1834,13 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, volatile unsigned char *bits; #if STLDEBUG - printf("stli_sendcmd(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d," + kprintf("stli_sendcmd(brdp=%x,portp=%x,cmd=%x,arg=%x,size=%d," "copyback=%d)\n", (int) brdp, (int) portp, (int) cmd, (int) arg, size, copyback); #endif if (portp->state & ST_CMDING) { - printf("STALLION: command already busy, cmd=%x!\n", (int) cmd); + kprintf("STALLION: command already busy, cmd=%x!\n", (int) cmd); return; } @@ -1883,7 +1883,7 @@ static void stli_rxprocess(stlibrd_t *brdp, stliport_t *portp) int ch; #if STLDEBUG - printf("stli_rxprocess(brdp=%x,portp=%d)\n", (int) brdp, (int) portp); + kprintf("stli_rxprocess(brdp=%x,portp=%d)\n", (int) brdp, (int) portp); #endif tp = &portp->tty; @@ -2049,7 +2049,7 @@ static __inline int stli_hostcmd(stlibrd_t *brdp, stliport_t *portp) int rc, donerx; #if STLDEBUG - printf("stli_hostcmd(brdp=%x,portp=%x)\n", (int) brdp, (int) portp); + kprintf("stli_hostcmd(brdp=%x,portp=%x)\n", (int) brdp, (int) portp); #endif ap = (volatile cdkasy_t *) EBRDGETMEMPTR(brdp, portp->addr); @@ -2293,7 +2293,7 @@ static void stli_poll(void *arg) static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp) { #if STLDEBUG - printf("stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", (int) portp, + kprintf("stli_mkasyport(portp=%x,pp=%x,tiosp=%d)\n", (int) portp, (int) pp, (int) tiosp); #endif @@ -2393,7 +2393,7 @@ static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tio static void stli_mkasysigs(asysigs_t *sp, int dtr, int rts) { #if STLDEBUG - printf("stli_mkasysigs(sp=%x,dtr=%d,rts=%d)\n", (int) sp, dtr, rts); + kprintf("stli_mkasysigs(sp=%x,dtr=%d,rts=%d)\n", (int) sp, dtr, rts); #endif bzero(sp, sizeof(asysigs_t)); @@ -2419,7 +2419,7 @@ static long stli_mktiocm(unsigned long sigvalue) long tiocm; #if STLDEBUG - printf("stli_mktiocm(sigvalue=%x)\n", (int) sigvalue); + kprintf("stli_mktiocm(sigvalue=%x)\n", (int) sigvalue); #endif tiocm = 0; @@ -2468,7 +2468,7 @@ static int stli_initports(stlibrd_t *brdp) int i, panelnr, panelport; #if STLDEBUG - printf("stli_initports(brdp=%x)\n", (int) brdp); + kprintf("stli_initports(brdp=%x)\n", (int) brdp); #endif for (i = 0, panelnr = 0, panelport = 0; (i < brdp->nrports); i++) { @@ -2511,7 +2511,7 @@ static void stli_ecpinit(stlibrd_t *brdp) unsigned long memconf; #if STLDEBUG - printf("stli_ecpinit(brdp=%d)\n", (int) brdp); + kprintf("stli_ecpinit(brdp=%d)\n", (int) brdp); #endif outb((brdp->iobase + ECP_ATCONFR), ECP_ATSTOP); @@ -2528,7 +2528,7 @@ static void stli_ecpinit(stlibrd_t *brdp) static void stli_ecpenable(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_ecpenable(brdp=%x)\n", (int) brdp); + kprintf("stli_ecpenable(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ECP_ATCONFR), ECP_ATENABLE); } @@ -2538,7 +2538,7 @@ static void stli_ecpenable(stlibrd_t *brdp) static void stli_ecpdisable(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_ecpdisable(brdp=%x)\n", (int) brdp); + kprintf("stli_ecpdisable(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ECP_ATCONFR), ECP_ATDISABLE); } @@ -2551,12 +2551,12 @@ static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) unsigned char val; #if STLDEBUG - printf("stli_ecpgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + kprintf("stli_ecpgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); #endif if (offset > brdp->memsize) { - printf("STALLION: shared memory pointer=%x out of range at " + kprintf("STALLION: shared memory pointer=%x out of range at " "line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); ptr = 0; @@ -2574,7 +2574,7 @@ static char *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) static void stli_ecpreset(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_ecpreset(brdp=%x)\n", (int) brdp); + kprintf("stli_ecpreset(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ECP_ATCONFR), ECP_ATSTOP); @@ -2588,7 +2588,7 @@ static void stli_ecpreset(stlibrd_t *brdp) static void stli_ecpintr(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_ecpintr(brdp=%x)\n", (int) brdp); + kprintf("stli_ecpintr(brdp=%x)\n", (int) brdp); #endif outb(brdp->iobase, 0x1); } @@ -2604,7 +2604,7 @@ static void stli_ecpeiinit(stlibrd_t *brdp) unsigned long memconf; #if STLDEBUG - printf("stli_ecpeiinit(brdp=%x)\n", (int) brdp); + kprintf("stli_ecpeiinit(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ECP_EIBRDENAB), 0x1); @@ -2641,12 +2641,12 @@ static char *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line unsigned char val; #if STLDEBUG - printf("stli_ecpeigetmemptr(brdp=%x,offset=%x,line=%d)\n", + kprintf("stli_ecpeigetmemptr(brdp=%x,offset=%x,line=%d)\n", (int) brdp, (int) offset, line); #endif if (offset > brdp->memsize) { - printf("STALLION: shared memory pointer=%x out of range at " + kprintf("STALLION: shared memory pointer=%x out of range at " "line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); ptr = 0; @@ -2684,7 +2684,7 @@ static void stli_onbinit(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_onbinit(brdp=%d)\n", (int) brdp); + kprintf("stli_onbinit(brdp=%d)\n", (int) brdp); #endif outb((brdp->iobase + ONB_ATCONFR), ONB_ATSTOP); @@ -2704,7 +2704,7 @@ static void stli_onbinit(stlibrd_t *brdp) static void stli_onbenable(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_onbenable(brdp=%x)\n", (int) brdp); + kprintf("stli_onbenable(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ONB_ATCONFR), (ONB_ATENABLE | brdp->confbits)); } @@ -2714,7 +2714,7 @@ static void stli_onbenable(stlibrd_t *brdp) static void stli_onbdisable(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_onbdisable(brdp=%x)\n", (int) brdp); + kprintf("stli_onbdisable(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ONB_ATCONFR), (ONB_ATDISABLE | brdp->confbits)); } @@ -2726,12 +2726,12 @@ static char *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) void *ptr; #if STLDEBUG - printf("stli_onbgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + kprintf("stli_onbgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); #endif if (offset > brdp->memsize) { - printf("STALLION: shared memory pointer=%x out of range at " + kprintf("STALLION: shared memory pointer=%x out of range at " "line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); ptr = 0; @@ -2748,7 +2748,7 @@ static void stli_onbreset(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_onbreset(brdp=%x)\n", (int) brdp); + kprintf("stli_onbreset(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ONB_ATCONFR), ONB_ATSTOP); @@ -2770,7 +2770,7 @@ static void stli_onbeinit(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_onbeinit(brdp=%d)\n", (int) brdp); + kprintf("stli_onbeinit(brdp=%d)\n", (int) brdp); #endif outb((brdp->iobase + ONB_EIBRDENAB), 0x1); @@ -2793,7 +2793,7 @@ static void stli_onbeinit(stlibrd_t *brdp) static void stli_onbeenable(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_onbeenable(brdp=%x)\n", (int) brdp); + kprintf("stli_onbeenable(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ONB_EICONFR), ONB_EIENABLE); } @@ -2803,7 +2803,7 @@ static void stli_onbeenable(stlibrd_t *brdp) static void stli_onbedisable(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_onbedisable(brdp=%x)\n", (int) brdp); + kprintf("stli_onbedisable(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ONB_EICONFR), ONB_EIDISABLE); } @@ -2816,12 +2816,12 @@ static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line) unsigned char val; #if STLDEBUG - printf("stli_onbegetmemptr(brdp=%x,offset=%x,line=%d)\n", (int) brdp, + kprintf("stli_onbegetmemptr(brdp=%x,offset=%x,line=%d)\n", (int) brdp, (int) offset, line); #endif if (offset > brdp->memsize) { - printf("STALLION: shared memory pointer=%x out of range at " + kprintf("STALLION: shared memory pointer=%x out of range at " "line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); ptr = 0; @@ -2844,7 +2844,7 @@ static void stli_onbereset(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_onbereset(brdp=%x)\n", (int) brdp); + kprintf("stli_onbereset(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + ONB_EICONFR), ONB_EISTOP); @@ -2865,7 +2865,7 @@ static void stli_bbyinit(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_bbyinit(brdp=%d)\n", (int) brdp); + kprintf("stli_bbyinit(brdp=%d)\n", (int) brdp); #endif outb((brdp->iobase + BBY_ATCONFR), BBY_ATSTOP); @@ -2885,12 +2885,12 @@ static char *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset, int line) unsigned char val; #if STLDEBUG - printf("stli_bbygetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + kprintf("stli_bbygetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); #endif if (offset > brdp->memsize) { - printf("STALLION: shared memory pointer=%x out of range at " + kprintf("STALLION: shared memory pointer=%x out of range at " "line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); ptr = 0; @@ -2910,7 +2910,7 @@ static void stli_bbyreset(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_bbyreset(brdp=%x)\n", (int) brdp); + kprintf("stli_bbyreset(brdp=%x)\n", (int) brdp); #endif outb((brdp->iobase + BBY_ATCONFR), BBY_ATSTOP); @@ -2931,7 +2931,7 @@ static void stli_stalinit(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_stalinit(brdp=%d)\n", (int) brdp); + kprintf("stli_stalinit(brdp=%d)\n", (int) brdp); #endif outb(brdp->iobase, 0x1); @@ -2946,12 +2946,12 @@ static char *stli_stalgetmemptr(stlibrd_t *brdp, unsigned long offset, int line) void *ptr; #if STLDEBUG - printf("stli_stalgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, + kprintf("stli_stalgetmemptr(brdp=%x,offset=%x)\n", (int) brdp, (int) offset); #endif if (offset > brdp->memsize) { - printf("STALLION: shared memory pointer=%x out of range at " + kprintf("STALLION: shared memory pointer=%x out of range at " "line=%d(%d), brd=%d\n", (int) offset, line, __LINE__, brdp->brdnr); ptr = 0; @@ -2969,7 +2969,7 @@ static void stli_stalreset(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_stalreset(brdp=%x)\n", (int) brdp); + kprintf("stli_stalreset(brdp=%x)\n", (int) brdp); #endif vecp = (volatile unsigned long *) ((char *) brdp->vaddr + 0x30); @@ -2994,7 +2994,7 @@ static int stli_initecp(stlibrd_t *brdp) int panelnr; #if STLDEBUG - printf("stli_initecp(brdp=%x)\n", (int) brdp); + kprintf("stli_initecp(brdp=%x)\n", (int) brdp); #endif /* @@ -3055,7 +3055,7 @@ static int stli_initecp(stlibrd_t *brdp) EBRDDISABLE(brdp); #if 0 - printf("%s(%d): sig-> magic=%x rom=%x panel=%x,%x,%x,%x,%x,%x,%x,%x\n", + kprintf("%s(%d): sig-> magic=%x rom=%x panel=%x,%x,%x,%x,%x,%x,%x,%x\n", __file__, __LINE__, (int) sig.magic, sig.romver, sig.panelid[0], (int) sig.panelid[1], (int) sig.panelid[2], (int) sig.panelid[3], (int) sig.panelid[4], @@ -3105,7 +3105,7 @@ static int stli_initonb(stlibrd_t *brdp) int i; #if STLDEBUG - printf("stli_initonb(brdp=%x)\n", (int) brdp); + kprintf("stli_initonb(brdp=%x)\n", (int) brdp); #endif /* @@ -3197,7 +3197,7 @@ static int stli_initonb(stlibrd_t *brdp) EBRDDISABLE(brdp); #if 0 - printf("%s(%d): sig-> magic=%x:%x:%x:%x romver=%x amask=%x:%x:%x\n", + kprintf("%s(%d): sig-> magic=%x:%x:%x:%x romver=%x amask=%x:%x:%x\n", __file__, __LINE__, sig.magic0, sig.magic1, sig.magic2, sig.magic3, sig.romver, sig.amask0, sig.amask1, sig.amask2); #endif @@ -3243,7 +3243,7 @@ static int stli_startbrd(stlibrd_t *brdp) int portnr, nrdevs, i, rc; #if STLDEBUG - printf("stli_startbrd(brdp=%x)\n", (int) brdp); + kprintf("stli_startbrd(brdp=%x)\n", (int) brdp); #endif rc = 0; @@ -3254,14 +3254,14 @@ static int stli_startbrd(stlibrd_t *brdp) nrdevs = hdrp->nrdevs; #if 0 - printf("%s(%d): CDK version %d.%d.%d --> nrdevs=%d memp=%x hostp=%x " + kprintf("%s(%d): CDK version %d.%d.%d --> nrdevs=%d memp=%x hostp=%x " "slavep=%x\n", __file__, __LINE__, hdrp->ver_release, hdrp->ver_modification, hdrp->ver_fix, nrdevs, (int) hdrp->memp, (int) hdrp->hostp, (int) hdrp->slavep); #endif if (nrdevs < (brdp->nrports + 1)) { - printf("STALLION: slave failed to allocate memory for all " + kprintf("STALLION: slave failed to allocate memory for all " "devices, devices=%d\n", nrdevs); brdp->nrports = nrdevs - 1; } @@ -3271,14 +3271,14 @@ static int stli_startbrd(stlibrd_t *brdp) brdp->bitsize = (nrdevs + 7) / 8; memp = (volatile cdkmem_t *) (void *) (uintptr_t) hdrp->memp; if ((uintptr_t)(volatile void *)memp > brdp->memsize) { - printf("STALLION: corrupted shared memory region?\n"); + kprintf("STALLION: corrupted shared memory region?\n"); rc = EIO; goto stli_donestartup; } memp = (volatile cdkmem_t *) EBRDGETMEMPTR(brdp, (uintptr_t)(volatile void *)memp); if (memp->dtype != TYP_ASYNCTRL) { - printf("STALLION: no slave control device found\n"); + kprintf("STALLION: no slave control device found\n"); rc = EIO; goto stli_donestartup; } @@ -3350,7 +3350,7 @@ stli_donestartup: static int stli_brdinit(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_brdinit(brdp=%x)\n", (int) brdp); + kprintf("stli_brdinit(brdp=%x)\n", (int) brdp); #endif stli_brds[brdp->brdnr] = brdp; @@ -3376,11 +3376,11 @@ static int stli_brdinit(stlibrd_t *brdp) case BRD_ECH: case BRD_ECHMC: case BRD_ECHPCI: - printf("STALLION: %s board type not supported in this driver\n", + kprintf("STALLION: %s board type not supported in this driver\n", stli_brdnames[brdp->brdtype]); return(ENODEV); default: - printf("STALLION: unit=%d is unknown board type=%d\n", + kprintf("STALLION: unit=%d is unknown board type=%d\n", brdp->brdnr, brdp->brdtype); return(ENODEV); } @@ -3397,12 +3397,12 @@ static int stli_brdinit(stlibrd_t *brdp) static int stli_brdattach(stlibrd_t *brdp) { #if STLDEBUG - printf("stli_brdattach(brdp=%x)\n", (int) brdp); + kprintf("stli_brdattach(brdp=%x)\n", (int) brdp); #endif #if 0 if ((brdp->state & BST_FOUND) == 0) { - printf("STALLION: %s board not found, unit=%d io=%x mem=%x\n", + kprintf("STALLION: %s board not found, unit=%d io=%x mem=%x\n", stli_brdnames[brdp->brdtype], brdp->brdnr, brdp->iobase, (int) brdp->paddr); return(ENXIO); @@ -3410,7 +3410,7 @@ static int stli_brdattach(stlibrd_t *brdp) #endif stli_initports(brdp); - printf("stli%d: %s (driver version %s), unit=%d nrpanels=%d " + kprintf("stli%d: %s (driver version %s), unit=%d nrpanels=%d " "nrports=%d\n", brdp->unitid, stli_brdnames[brdp->brdtype], stli_drvversion, brdp->brdnr, brdp->nrpanels, brdp->nrports); dev_ops_add(&stli_ops, -1, brdp->unitid); @@ -3431,7 +3431,7 @@ static int stli_getbrdstats(caddr_t data) int i; #if STLDEBUG - printf("stli_getbrdstats(data=%p)\n", (void *) data); + kprintf("stli_getbrdstats(data=%p)\n", (void *) data); #endif stli_brdstats = *((combrd_t *) data); @@ -3602,7 +3602,7 @@ STATIC int stli_memrw(cdev_t dev, struct uio *uiop, int flag) int brdnr, size, n, error; #if STLDEBUG - printf("stli_memrw(dev=%x,uiop=%x,flag=%x)\n", (int) dev, + kprintf("stli_memrw(dev=%x,uiop=%x,flag=%x)\n", (int) dev, (int) uiop, flag); #endif @@ -3649,7 +3649,7 @@ static int stli_memioctl(cdev_t dev, unsigned long cmd, caddr_t data, int flag) int brdnr, rc; #if STLDEBUG - printf("stli_memioctl(dev=%s,cmd=%lx,data=%p,flag=%x)\n", + kprintf("stli_memioctl(dev=%s,cmd=%lx,data=%p,flag=%x)\n", devtoname(dev), cmd, (void *) data, flag); #endif diff --git a/sys/dev/sound/isa/ad1816.c b/sys/dev/sound/isa/ad1816.c index 6cc651d2b4..0a65f2be87 100644 --- a/sys/dev/sound/isa/ad1816.c +++ b/sys/dev/sound/isa/ad1816.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/ad1816.c,v 1.7.2.9 2002/12/24 21:17:41 semenu Exp $ - * $DragonFly: src/sys/dev/sound/isa/ad1816.c,v 1.5 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/ad1816.c,v 1.6 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -34,7 +34,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/ad1816.c,v 1.5 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/ad1816.c,v 1.6 2006/12/22 23:26:25 swildner Exp $"); struct ad1816_info; @@ -134,7 +134,7 @@ ad1816_intr(void *arg) /* check for stray interupts */ if (c & ~(AD1816_INTRCI | AD1816_INTRPI)) { - printf("pcm: stray int (%x)\n", c); + kprintf("pcm: stray int (%x)\n", c); c &= AD1816_INTRCI | AD1816_INTRPI; } /* check for capture interupt */ @@ -150,12 +150,12 @@ ad1816_intr(void *arg) if (served == 0) { /* this probably means this is not a (working) ad1816 chip, */ /* or an error in dma handling */ - printf("pcm: int without reason (%x)\n", c); + kprintf("pcm: int without reason (%x)\n", c); c = 0; } else c &= ~served; io_wr(ad1816, AD1816_INT, c); c = io_rd(ad1816, AD1816_INT); - if (c != 0) printf("pcm: int clear failed (%x)\n", c); + if (c != 0) kprintf("pcm: int clear failed (%x)\n", c); ad1816_unlock(ad1816); } @@ -167,7 +167,7 @@ ad1816_wait_init(struct ad1816_info *ad1816, int x) for (; x--;) if ((n = (io_rd(ad1816, AD1816_ALE) & AD1816_BUSY)) == 0) DELAY(10); else return n; - printf("ad1816_wait_init failed 0x%02x.\n", n); + kprintf("ad1816_wait_init failed 0x%02x.\n", n); return -1; } @@ -255,7 +255,7 @@ ad1816mix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) break; default: - printf("ad1816_mixer_set(): unknown device.\n"); + kprintf("ad1816_mixer_set(): unknown device.\n"); break; } ad1816_unlock(ad1816); @@ -423,7 +423,7 @@ ad1816chan_trigger(kobj_t obj, void *data, int go) /* enable playback */ io_wr(ad1816, reg, io_rd(ad1816, reg) | AD1816_ENABLE); if (!(io_rd(ad1816, reg) & AD1816_ENABLE)) - printf("ad1816: failed to start %s DMA!\n", + kprintf("ad1816: failed to start %s DMA!\n", wr? "play" : "rec"); } break; @@ -438,7 +438,7 @@ ad1816chan_trigger(kobj_t obj, void *data, int go) io_wr(ad1816, reg, io_rd(ad1816, reg) & ~AD1816_ENABLE); /* disable playback */ if (io_rd(ad1816, reg) & AD1816_ENABLE) - printf("ad1816: failed to stop %s DMA!\n", + kprintf("ad1816: failed to stop %s DMA!\n", wr? "play" : "rec"); ad1816_write(ad1816, wr? 8 : 10, 0); /* reset base cnt */ ad1816_write(ad1816, wr? 9 : 11, 0); /* reset cur cnt */ diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c index 79627939fc..8eb5162837 100644 --- a/sys/dev/sound/isa/ess.c +++ b/sys/dev/sound/isa/ess.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/ess.c,v 1.3.2.8 2002/12/24 21:17:41 semenu Exp $ - * $DragonFly: src/sys/dev/sound/isa/ess.c,v 1.5 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/ess.c,v 1.6 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -39,7 +39,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/ess.c,v 1.5 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/ess.c,v 1.6 2006/12/22 23:26:25 swildner Exp $"); #define ESS_BUFFSIZE (4096) #define ABS(x) (((x) < 0)? -(x) : (x)) @@ -193,7 +193,7 @@ ess_dspwr(struct ess_info *sc, u_char val) } if (i > 10) DELAY((i > 100)? 1000 : 10); } - printf("ess_dspwr(0x%02x) timed out.\n", val); + kprintf("ess_dspwr(0x%02x) timed out.\n", val); return 0; } @@ -201,7 +201,7 @@ static int ess_cmd(struct ess_info *sc, u_char val) { #if 0 - printf("ess_cmd: %x\n", val); + kprintf("ess_cmd: %x\n", val); #endif return ess_dspwr(sc, val); } @@ -210,7 +210,7 @@ static int ess_cmd1(struct ess_info *sc, u_char cmd, int val) { #if 0 - printf("ess_cmd1: %x, %x\n", cmd, val); + kprintf("ess_cmd1: %x, %x\n", cmd, val); #endif if (ess_dspwr(sc, cmd)) { return ess_dspwr(sc, val & 0xff); @@ -220,7 +220,7 @@ ess_cmd1(struct ess_info *sc, u_char cmd, int val) static void ess_setmixer(struct ess_info *sc, u_int port, u_int value) { - DEB(printf("ess_setmixer: reg=%x, val=%x\n", port, value);) + DEB(kprintf("ess_setmixer: reg=%x, val=%x\n", port, value);) ess_wr(sc, SB_MIX_ADDR, (u_char) (port & 0xff)); /* Select register */ DELAY(10); ess_wr(sc, SB_MIX_DATA, (u_char) (value & 0xff)); @@ -272,7 +272,7 @@ ess_reset_dsp(struct ess_info *sc) DELAY(100); ess_wr(sc, SBDSP_RST, 0); if (ess_get_byte(sc) != 0xAA) { - DEB(printf("ess_reset_dsp 0x%lx failed\n", + DEB(kprintf("ess_reset_dsp 0x%lx failed\n", rman_get_start(sc->io_base))); return ENXIO; /* Sorry */ } @@ -840,7 +840,7 @@ ess_attach(device_t dev) break; } if (bootverbose) - printf("%s%s\n", sc->duplex? ", duplex" : "", + kprintf("%s%s\n", sc->duplex? ", duplex" : "", sc->newspeed? ", newspeed" : ""); if (sc->newspeed) @@ -973,10 +973,10 @@ esscontrol_attach(device_t dev) port_wr(io, 0, i); x = port_rd(io, 1); if ((i & 0x0f) == 0) - printf("%3.3x: ", i); - printf("%2.2x ", x); + kprintf("%3.3x: ", i); + kprintf("%2.2x ", x); if ((i & 0x0f) == 0x0f) - printf("\n"); + kprintf("\n"); } bus_release_resource(dev, SYS_RES_IOPORT, 0, io); io = NULL; diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c index a40591f65d..05fda48e37 100644 --- a/sys/dev/sound/isa/gusc.c +++ b/sys/dev/sound/isa/gusc.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/gusc.c,v 1.5.2.6 2002/04/22 15:49:30 cg Exp $ - * $DragonFly: src/sys/dev/sound/isa/gusc.c,v 1.9 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/gusc.c,v 1.10 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -44,7 +44,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/gusc.c,v 1.9 2006/10/25 20:56:02 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/gusc.c,v 1.10 2006/12/22 23:26:25 swildner Exp $"); #define LOGICALID_NOPNP 0 #define LOGICALID_PCM 0x0000561e @@ -277,7 +277,7 @@ gusisa_probe(device_t dev) func = kmalloc(sizeof(struct sndcard_func), M_DEVBUF, M_NOWAIT | M_ZERO); if (func == NULL) - printf("xxx: gus pcm not attached, out of memory\n"); + kprintf("xxx: gus pcm not attached, out of memory\n"); else { func->func = SCF_PCM; child = device_add_child(dev, "pcm", -1); diff --git a/sys/dev/sound/isa/mss.c b/sys/dev/sound/isa/mss.c index e04b53e977..fcf49f6c10 100644 --- a/sys/dev/sound/isa/mss.c +++ b/sys/dev/sound/isa/mss.c @@ -27,12 +27,12 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/mss.c,v 1.48.2.11 2002/12/24 21:17:41 semenu Exp $ - * $DragonFly: src/sys/dev/sound/isa/mss.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/mss.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/mss.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/mss.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); /* board-specific include files */ #include @@ -363,7 +363,7 @@ change_bits(mixer_tab *t, u_char *regval, int dev, int chn, int newval) u_char mask; int shift; - DEB(printf("ch_bits dev %d ch %d val %d old 0x%02x " + DEB(kprintf("ch_bits dev %d ch %d val %d old 0x%02x " "r %d p %d bit %d off %d\n", dev, chn, newval, *regval, (*t)[dev][chn].regno, (*t)[dev][chn].polarity, @@ -432,7 +432,7 @@ mss_mixer_set(struct mss_info *mss, int dev, int left, int right) } if ((*mix_d)[dev][LEFT_CHN].nbits == 0) { - DEB(printf("nbits = 0 for dev %d\n", dev)); + DEB(kprintf("nbits = 0 for dev %d\n", dev)); return -1; } @@ -447,7 +447,7 @@ mss_mixer_set(struct mss_info *mss, int dev, int left, int right) change_bits(mix_d, &val, dev, LEFT_CHN, left); ad_write(mss, regoffs, val); - DEB(printf("LEFT: dev %d reg %d old 0x%02x new 0x%02x\n", + DEB(kprintf("LEFT: dev %d reg %d old 0x%02x new 0x%02x\n", dev, regoffs, old, val)); if ((*mix_d)[dev][RIGHT_CHN].nbits != 0) { /* have stereo */ @@ -458,7 +458,7 @@ mss_mixer_set(struct mss_info *mss, int dev, int left, int right) change_bits(mix_d, &val, dev, RIGHT_CHN, right); ad_write(mss, regoffs, val); - DEB(printf("RIGHT: dev %d reg %d old 0x%02x new 0x%02x\n", + DEB(kprintf("RIGHT: dev %d reg %d old 0x%02x new 0x%02x\n", dev, regoffs, old, val)); } return 0; /* success */ @@ -688,7 +688,7 @@ mss_init(struct mss_info *mss, device_t dev) mss->opti_offset = (rman_get_start(mss->conf_base) & ~3) + 2 - rman_get_start(mss->conf_base); - BVDDB(printf("mss_init: opti_offset=%d\n", mss->opti_offset)); + BVDDB(kprintf("mss_init: opti_offset=%d\n", mss->opti_offset)); opti_wr(mss, 4, 0xd6); /* fifo empty, OPL3, audio enable, SB3.2 */ ad_write(mss, 10, 2); /* enable interrupts */ opti_wr(mss, 6, 2); /* MCIR6: mss enable, sb disable */ @@ -708,7 +708,7 @@ mss_init(struct mss_info *mss, device_t dev) alt = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE); if (alt == NULL) { - printf("XXX couldn't init GUS PnP/MAX\n"); + kprintf("XXX couldn't init GUS PnP/MAX\n"); break; } port_wr(alt, 0, 0xC); /* enable int and dma */ @@ -732,14 +732,14 @@ mss_init(struct mss_info *mss, device_t dev) /* enable access to hidden regs */ tmp = gus_rd(mss, 0x5b /* IVERI */); gus_wr(mss, 0x5b, tmp | 1); - BVDDB(printf("GUS: silicon rev %c\n", 'A' + ((tmp & 0xf) >> 4))); + BVDDB(kprintf("GUS: silicon rev %c\n", 'A' + ((tmp & 0xf) >> 4))); break; case MD_YM0020: conf_wr(mss, OPL3SAx_DMACONF, 0xa9); /* dma-b rec, dma-a play */ r6 = conf_rd(mss, OPL3SAx_DMACONF); r9 = conf_rd(mss, OPL3SAx_MISC); /* version */ - BVDDB(printf("Yamaha: ver 0x%x DMA config 0x%x\n", r6, r9);) + BVDDB(kprintf("Yamaha: ver 0x%x DMA config 0x%x\n", r6, r9);) /* yamaha - set volume to max */ conf_wr(mss, OPL3SAx_VOLUMEL, 0); conf_wr(mss, OPL3SAx_VOLUMER, 0); @@ -781,7 +781,7 @@ mss_intr(void *arg) u_char c = 0, served = 0; int i; - DEB(printf("mss_intr\n")); + DEB(kprintf("mss_intr\n")); mss_lock(mss); ad_read(mss, 11); /* fake read of status bits */ @@ -803,9 +803,9 @@ mss_intr(void *arg) else io_wr(mss, MSS_STATUS, 0); /* Clear interrupt status */ } if (i == 10) { - BVDDB(printf("mss_intr: irq, but not from mss\n")); + BVDDB(kprintf("mss_intr: irq, but not from mss\n")); } else if (served == 0) { - BVDDB(printf("mss_intr: unexpected irq with reason %x\n", c)); + BVDDB(kprintf("mss_intr: unexpected irq with reason %x\n", c)); /* * this should not happen... I have no idea what to do now. * maybe should do a sanity check and restart dmas ? @@ -826,7 +826,7 @@ ad_wait_init(struct mss_info *mss, int x) for (; x > 0; x--) if ((n = io_rd(mss, MSS_INDEX)) & MSS_IDXBUSY) DELAY(10); else return n; - printf("AD_WAIT_INIT FAILED %d 0x%02x\n", arg, n); + kprintf("AD_WAIT_INIT FAILED %d 0x%02x\n", arg, n); return n; } @@ -839,7 +839,7 @@ ad_read(struct mss_info *mss, int reg) x = io_rd(mss, MSS_INDEX) & ~MSS_IDXMASK; io_wr(mss, MSS_INDEX, (u_char)(reg & MSS_IDXMASK) | x); x = io_rd(mss, MSS_IDATA); - /* printf("ad_read %d, %x\n", reg, x); */ + /* kprintf("ad_read %d, %x\n", reg, x); */ return x; } @@ -848,7 +848,7 @@ ad_write(struct mss_info *mss, int reg, u_char data) { int x; - /* printf("ad_write %d, %x\n", reg, data); */ + /* kprintf("ad_write %d, %x\n", reg, data); */ ad_wait_init(mss, 1002000); x = io_rd(mss, MSS_INDEX) & ~MSS_IDXMASK; io_wr(mss, MSS_INDEX, (u_char)(reg & MSS_IDXMASK) | x); @@ -876,7 +876,7 @@ wait_for_calibration(struct mss_info *mss) */ t = ad_wait_init(mss, 1000000); - if (t & MSS_IDXBUSY) printf("mss: Auto calibration timed out(1).\n"); + if (t & MSS_IDXBUSY) kprintf("mss: Auto calibration timed out(1).\n"); /* * The calibration mode for chips that support it is set so that @@ -919,7 +919,7 @@ ad_leave_MCE(struct mss_info *mss) u_char prev; if ((mss->bd_flags & BD_F_MCE_BIT) == 0) { - DEB(printf("--- hey, leave_MCE: MCE bit was not set!\n")); + DEB(kprintf("--- hey, leave_MCE: MCE bit was not set!\n")); return; } @@ -1028,7 +1028,7 @@ mss_trigger(struct mss_chinfo *ch, int go) case PCMTRIG_START: cnt = (ch->blksz / ss) - 1; - DEB(if (m & 4) printf("OUCH! reg 9 0x%02x\n", m);); + DEB(if (m & 4) kprintf("OUCH! reg 9 0x%02x\n", m);); m |= wr? I9_PEN : I9_CEN; /* enable DMA */ ad_write_cnt(mss, (wr || !FULL_DUPLEX(mss))? 14 : 30, cnt); break; @@ -1050,7 +1050,7 @@ mss_trigger(struct mss_chinfo *ch, int go) ad_write(mss, 9, m); if (ad_read(mss, 9) == m) break; } - if (retry == 0) BVDDB(printf("stop dma, failed to set bit 0x%02x 0x%02x\n", \ + if (retry == 0) BVDDB(kprintf("stop dma, failed to set bit 0x%02x 0x%02x\n", \ m, ad_read(mss, 9))); return 0; } @@ -1071,7 +1071,7 @@ opti931_intr(void *arg) #if 0 reason = io_rd(mss, MSS_STATUS); if (!(reason & 1)) {/* no int, maybe a shared line ? */ - DEB(printf("intr: flag 0, mcir11 0x%02x\n", ad_read(mss, 11))); + DEB(kprintf("intr: flag 0, mcir11 0x%02x\n", ad_read(mss, 11))); return; } #endif @@ -1082,14 +1082,14 @@ opti931_intr(void *arg) c = mc11 = FULL_DUPLEX(mss)? opti_rd(mss, 11) : 0xc; mc11 &= 0x0c; if (c & 0x10) { - DEB(printf("Warning: CD interrupt\n");) + DEB(kprintf("Warning: CD interrupt\n");) mc11 |= 0x10; } if (c & 0x20) { - DEB(printf("Warning: MPU interrupt\n");) + DEB(kprintf("Warning: MPU interrupt\n");) mc11 |= 0x20; } - if (mc11 & masked) BVDDB(printf("irq reset failed, mc11 0x%02x, 0x%02x\n",\ + if (mc11 & masked) BVDDB(kprintf("irq reset failed, mc11 0x%02x, 0x%02x\n",\ mc11, masked)); masked |= mc11; /* @@ -1099,11 +1099,11 @@ opti931_intr(void *arg) if (mc11 == 0) { /* perhaps can return ... */ reason = io_rd(mss, MSS_STATUS); if (reason & 1) { - DEB(printf("one more try...\n");) + DEB(kprintf("one more try...\n");) if (--loops) goto again; - else DDB(printf("intr, but mc11 not set\n");) + else DDB(kprintf("intr, but mc11 not set\n");) } - if (loops == 0) BVDDB(printf("intr, nothing in mcir11 0x%02x\n", mc11)); + if (loops == 0) BVDDB(kprintf("intr, nothing in mcir11 0x%02x\n", mc11)); mss_unlock(mss); return; } @@ -1113,7 +1113,7 @@ opti931_intr(void *arg) opti_wr(mss, 11, ~mc11); /* ack */ if (--loops) goto again; mss_unlock(mss); - DEB(printf("xxx too many loops\n");) + DEB(kprintf("xxx too many loops\n");) } /* -------------------------------------------------------------------- */ @@ -1263,7 +1263,7 @@ mss_probe(device_t dev) mss->io_base = bus_alloc_resource(dev, SYS_RES_IOPORT, &mss->io_rid, 0, ~0, 8, RF_ACTIVE); if (!mss->io_base) { - BVDDB(printf("mss_probe: no address given, try 0x%x\n", 0x530)); + BVDDB(kprintf("mss_probe: no address given, try 0x%x\n", 0x530)); mss->io_rid = 0; /* XXX verify this */ setres = 1; @@ -1290,32 +1290,32 @@ mss_probe(device_t dev) device_set_desc(dev, "MSS"); tmpx = tmp = io_rd(mss, 3); if (tmp == 0xff) { /* Bus float */ - BVDDB(printf("I/O addr inactive (%x), try pseudo_mss\n", tmp)); + BVDDB(kprintf("I/O addr inactive (%x), try pseudo_mss\n", tmp)); device_set_flags(dev, flags & ~DV_F_TRUE_MSS); goto mss_probe_end; } tmp &= 0x3f; if (!(tmp == 0x04 || tmp == 0x0f || tmp == 0x00)) { - BVDDB(printf("No MSS signature detected on port 0x%lx (0x%x)\n", + BVDDB(kprintf("No MSS signature detected on port 0x%lx (0x%x)\n", rman_get_start(mss->io_base), tmpx)); goto no; } if (irq > 11) { - printf("MSS: Bad IRQ %d\n", irq); + kprintf("MSS: Bad IRQ %d\n", irq); goto no; } if (!(drq == 0 || drq == 1 || drq == 3)) { - printf("MSS: Bad DMA %d\n", drq); + kprintf("MSS: Bad DMA %d\n", drq); goto no; } if (tmpx & 0x80) { /* 8-bit board: only drq1/3 and irq7/9 */ if (drq == 0) { - printf("MSS: Can't use DMA0 with a 8 bit card/slot\n"); + kprintf("MSS: Can't use DMA0 with a 8 bit card/slot\n"); goto no; } if (!(irq == 7 || irq == 9)) { - printf("MSS: Can't use IRQ%d with a 8 bit card/slot\n", + kprintf("MSS: Can't use IRQ%d with a 8 bit card/slot\n", irq); goto no; } @@ -1356,7 +1356,7 @@ mss_detect(device_t dev, struct mss_info *mss) name = "OPTi930"; break; } - printf("Found OPTi device %s\n", name); + kprintf("Found OPTi device %s\n", name); if (opti_init(dev, mss) == 0) goto gotit; } @@ -1375,7 +1375,7 @@ mss_detect(device_t dev, struct mss_info *mss) else break; if (i >= 10) { /* Not a AD1848 */ - BVDDB(printf("mss_detect, busy still set (0x%02x)\n", tmp)); + BVDDB(kprintf("mss_detect, busy still set (0x%02x)\n", tmp)); goto no; } /* @@ -1389,7 +1389,7 @@ mss_detect(device_t dev, struct mss_info *mss) tmp1 = ad_read(mss, 0); tmp2 = ad_read(mss, 1); if (tmp1 != 0xaa || tmp2 != 0x45) { - BVDDB(printf("mss_detect error - IREG (%x/%x)\n", tmp1, tmp2)); + BVDDB(kprintf("mss_detect error - IREG (%x/%x)\n", tmp1, tmp2)); goto no; } @@ -1398,7 +1398,7 @@ mss_detect(device_t dev, struct mss_info *mss) tmp1 = ad_read(mss, 0); tmp2 = ad_read(mss, 1); if (tmp1 != 0x45 || tmp2 != 0xaa) { - BVDDB(printf("mss_detect error - IREG2 (%x/%x)\n", tmp1, tmp2)); + BVDDB(kprintf("mss_detect error - IREG2 (%x/%x)\n", tmp1, tmp2)); goto no; } @@ -1412,7 +1412,7 @@ mss_detect(device_t dev, struct mss_info *mss) tmp1 = ad_read(mss, 12); if ((tmp & 0x0f) != (tmp1 & 0x0f)) { - BVDDB(printf("mss_detect - I12 (0x%02x was 0x%02x)\n", tmp1, tmp)); + BVDDB(kprintf("mss_detect - I12 (0x%02x was 0x%02x)\n", tmp1, tmp)); goto no; } @@ -1422,7 +1422,7 @@ mss_detect(device_t dev, struct mss_info *mss) * 0x0A=RevC. also CS4231/CS4231A and OPTi931 */ - BVDDB(printf("mss_detect - chip revision 0x%02x\n", tmp & 0x0f);) + BVDDB(kprintf("mss_detect - chip revision 0x%02x\n", tmp & 0x0f);) /* * The original AD1848/CS4248 has just 16 indirect registers. This @@ -1435,7 +1435,7 @@ mss_detect(device_t dev, struct mss_info *mss) #if 0 for (i = 0; i < 16; i++) { if ((tmp1 = ad_read(mss, i)) != (tmp2 = ad_read(mss, i + 16))) { - BVDDB(printf("mss_detect warning - I%d: 0x%02x/0x%02x\n", + BVDDB(kprintf("mss_detect warning - I%d: 0x%02x/0x%02x\n", i, tmp1, tmp2)); /* * note - this seems to fail on the 4232 on I11. So we just break @@ -1458,7 +1458,7 @@ mss_detect(device_t dev, struct mss_info *mss) tmp1 = ad_read(mss, 12); if (tmp1 & 0x80) name = "CS4248"; /* Our best knowledge just now */ if ((tmp1 & 0xf0) == 0x00) { - BVDDB(printf("this should be an OPTi931\n");) + BVDDB(kprintf("this should be an OPTi931\n");) } else if ((tmp1 & 0xc0) != 0xC0) goto gotit; /* * The 4231 has bit7=1 always, and bit6 we just set to 1. @@ -1471,7 +1471,7 @@ mss_detect(device_t dev, struct mss_info *mss) ad_write(mss, 0, 0xaa); if ((tmp1 = ad_read(mss, 16)) == 0xaa) { /* Rotten bits? */ - BVDDB(printf("mss_detect error - step H(%x)\n", tmp1)); + BVDDB(kprintf("mss_detect error - step H(%x)\n", tmp1)); goto no; } /* Verify that some bits of I25 are read only. */ @@ -1549,13 +1549,13 @@ mss_detect(device_t dev, struct mss_info *mss) break; default: /* Assume CS4231 */ - BVDDB(printf("unknown id 0x%02x, assuming CS4231\n", id);) + BVDDB(kprintf("unknown id 0x%02x, assuming CS4231\n", id);) mss->bd_id = MD_CS42XX; } } ad_write(mss, 25, tmp1); /* Restore bits */ gotit: - BVDDB(printf("mss_detect() - Detected %s\n", name)); + BVDDB(kprintf("mss_detect() - Detected %s\n", name)); device_set_desc(dev, name); device_set_flags(dev, ((device_get_flags(dev) & ~DV_F_DEV_MASK) | @@ -1683,12 +1683,12 @@ mss_doattach(device_t dev, struct mss_info *mss) if (pdma != rdma) { if (rdma == valid_rdma[pdma]) bits |= 4; else { - printf("invalid dual dma config %d:%d\n", pdma, rdma); + kprintf("invalid dual dma config %d:%d\n", pdma, rdma); goto no; } } io_wr(mss, 0, bits); - printf("drq/irq conf %x\n", io_rd(mss, 0)); + kprintf("drq/irq conf %x\n", io_rd(mss, 0)); } mixer_init(dev, (mss->bd_id == MD_YM0020)? &ymmix_mixer_class : &mssmix_mixer_class, mss); switch (mss->bd_id) { @@ -2056,7 +2056,7 @@ opti_init(device_t dev, struct mss_info *mss) basebits = 0x30; break; default: - printf("opti_init: invalid MSS base address!\n"); + kprintf("opti_init: invalid MSS base address!\n"); return ENXIO; } diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c index 32b8fab7ac..73031a22c2 100644 --- a/sys/dev/sound/isa/sb16.c +++ b/sys/dev/sound/isa/sb16.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/sb16.c,v 1.64.2.7 2002/12/24 21:17:42 semenu Exp $ - * $DragonFly: src/sys/dev/sound/isa/sb16.c,v 1.6 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/sb16.c,v 1.7 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -39,7 +39,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/sb16.c,v 1.6 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/sb16.c,v 1.7 2006/12/22 23:26:25 swildner Exp $"); #define SB16_BUFFSIZE 4096 #define PLAIN_SB16(x) ((((x)->bd_flags) & (BD_F_SB16|BD_F_SB16X)) == BD_F_SB16) @@ -169,7 +169,7 @@ sb_dspwr(struct sb_info *sb, u_char val) } #if defined(__FreeBSD__) && __FreeBSD_version > 500000 if (curthread->td_intr_nesting_level == 0) - printf("sb_dspwr(0x%02x) timed out.\n", val); + kprintf("sb_dspwr(0x%02x) timed out.\n", val); #endif return 0; } @@ -178,7 +178,7 @@ static int sb_cmd(struct sb_info *sb, u_char val) { #if 0 - printf("sb_cmd: %x\n", val); + kprintf("sb_cmd: %x\n", val); #endif return sb_dspwr(sb, val); } @@ -188,7 +188,7 @@ static int sb_cmd1(struct sb_info *sb, u_char cmd, int val) { #if 0 - printf("sb_cmd1: %x, %x\n", cmd, val); + kprintf("sb_cmd1: %x, %x\n", cmd, val); #endif if (sb_dspwr(sb, cmd)) { return sb_dspwr(sb, val & 0xff); @@ -202,7 +202,7 @@ sb_cmd2(struct sb_info *sb, u_char cmd, int val) int r; #if 0 - printf("sb_cmd2: %x, %x\n", cmd, val); + kprintf("sb_cmd2: %x, %x\n", cmd, val); #endif sb_lock(sb); r = 0; @@ -274,7 +274,7 @@ sb_reset_dsp(struct sb_info *sb) b = sb_get_byte(sb); sb_unlock(sb); if (b != 0xAA) { - DEB(printf("sb_reset_dsp 0x%lx failed\n", + DEB(kprintf("sb_reset_dsp 0x%lx failed\n", rman_get_start(sb->io_base))); return ENXIO; /* Sorry */ } @@ -525,7 +525,7 @@ sb_intr(void *arg) } } #if 0 - printf("sb_intr: reason=%d c=0x%x\n", reason, c); + kprintf("sb_intr: reason=%d c=0x%x\n", reason, c); #endif if ((reason & 1) && (sb->pch.run)) chn_intr(sb->pch.channel); @@ -582,7 +582,7 @@ sb_setup(struct sb_info *sb) sndbuf_isadmasetdir(sb->rch.buffer, PCMDIR_REC); /* - printf("setup: [pch = %d, pfmt = %d, pgo = %d] [rch = %d, rfmt = %d, rgo = %d]\n", + kprintf("setup: [pch = %d, pfmt = %d, pgo = %d] [rch = %d, rfmt = %d, rgo = %d]\n", sb->pch.dch, sb->pch.fmt, sb->pch.run, sb->rch.dch, sb->rch.fmt, sb->rch.run); */ diff --git a/sys/dev/sound/isa/sb8.c b/sys/dev/sound/isa/sb8.c index f44b00ba42..62ddeb27e6 100644 --- a/sys/dev/sound/isa/sb8.c +++ b/sys/dev/sound/isa/sb8.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/sb8.c,v 1.62.2.5 2002/12/24 21:17:42 semenu Exp $ - * $DragonFly: src/sys/dev/sound/isa/sb8.c,v 1.5 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/sb8.c,v 1.6 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -39,7 +39,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/sb8.c,v 1.5 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/sb8.c,v 1.6 2006/12/22 23:26:25 swildner Exp $"); #define SB_DEFAULT_BUFSZ 4096 @@ -163,7 +163,7 @@ sb_dspwr(struct sb_info *sb, u_char val) } if (i > 10) DELAY((i > 100)? 1000 : 10); } - printf("sb_dspwr(0x%02x) timed out.\n", val); + kprintf("sb_dspwr(0x%02x) timed out.\n", val); return 0; } @@ -171,7 +171,7 @@ static int sb_cmd(struct sb_info *sb, u_char val) { #if 0 - printf("sb_cmd: %x\n", val); + kprintf("sb_cmd: %x\n", val); #endif return sb_dspwr(sb, val); } @@ -180,7 +180,7 @@ static int sb_cmd1(struct sb_info *sb, u_char cmd, int val) { #if 0 - printf("sb_cmd1: %x, %x\n", cmd, val); + kprintf("sb_cmd1: %x, %x\n", cmd, val); #endif if (sb_dspwr(sb, cmd)) { return sb_dspwr(sb, val & 0xff); @@ -191,7 +191,7 @@ static int sb_cmd2(struct sb_info *sb, u_char cmd, int val) { #if 0 - printf("sb_cmd2: %x, %x\n", cmd, val); + kprintf("sb_cmd2: %x, %x\n", cmd, val); #endif if (sb_dspwr(sb, cmd)) { return sb_dspwr(sb, val & 0xff) && @@ -248,7 +248,7 @@ sb_reset_dsp(struct sb_info *sb) DELAY(100); sb_wr(sb, SBDSP_RST, 0); if (sb_get_byte(sb) != 0xAA) { - DEB(printf("sb_reset_dsp 0x%lx failed\n", + DEB(kprintf("sb_reset_dsp 0x%lx failed\n", rman_get_start(sb->io_base))); return ENXIO; /* Sorry */ } diff --git a/sys/dev/sound/isa/sbc.c b/sys/dev/sound/isa/sbc.c index 8bd5339f4b..e853dbcbc8 100644 --- a/sys/dev/sound/isa/sbc.c +++ b/sys/dev/sound/isa/sbc.c @@ -24,14 +24,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/isa/sbc.c,v 1.19.2.12 2002/12/24 21:17:42 semenu Exp $ - * $DragonFly: src/sys/dev/sound/isa/sbc.c,v 1.7 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/sound/isa/sbc.c,v 1.8 2006/12/22 23:26:25 swildner Exp $ */ #include #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/sbc.c,v 1.7 2006/09/05 00:55:43 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/isa/sbc.c,v 1.8 2006/12/22 23:26:25 swildner Exp $"); #define IO_MAX 3 #define IRQ_MAX 1 @@ -158,7 +158,7 @@ sb_dspwr(struct resource *io, u_char val) } if (i > 10) DELAY((i > 100)? 1000 : 10); } - printf("sb_dspwr(0x%02x) timed out.\n", val); + kprintf("sb_dspwr(0x%02x) timed out.\n", val); return 0; } @@ -374,8 +374,8 @@ sbc_attach(device_t dev) sb_setmixer(scp->io[0], DMA_NR, (1 << dh) | (1 << dl)); if (bootverbose) { device_printf(dev, "setting card to irq %d, drq %d", irq, dl); - if (dl != dh) printf(", %d", dh); - printf("\n"); + if (dl != dh) kprintf(", %d", dh); + kprintf("\n"); } break; } diff --git a/sys/dev/sound/pci/als4000.c b/sys/dev/sound/pci/als4000.c index a84ea680ad..76bc8740bd 100644 --- a/sys/dev/sound/pci/als4000.c +++ b/sys/dev/sound/pci/als4000.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/als4000.c,v 1.2.2.5 2002/04/22 15:49:31 cg Exp $ - * $DragonFly: src/sys/dev/sound/pci/als4000.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/als4000.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ /* @@ -45,7 +45,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/als4000.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/als4000.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); /* Debugging macro's */ #undef DEB @@ -291,7 +291,7 @@ als_set_speed(struct sc_chinfo *ch) als_esp_wr(sc, ch->speed >> 8); als_esp_wr(sc, ch->speed & 0xff); } else { - DEB(printf("speed locked at %d (tried %d)\n", + DEB(kprintf("speed locked at %d (tried %d)\n", other->speed, ch->speed)); } } @@ -325,7 +325,7 @@ als_get_playback_command(u_int32_t format) return &playback_cmds[i]; } } - DEB(printf("als_get_playback_command: invalid format 0x%08x\n", + DEB(kprintf("als_get_playback_command: invalid format 0x%08x\n", format)); return &playback_cmds[0]; } @@ -668,7 +668,7 @@ als_init(struct sc_info *sc) /* Emulation mode */ v = als_gcr_rd(sc, ALS_GCR_DMA_EMULATION); als_gcr_wr(sc, ALS_GCR_DMA_EMULATION, v); - DEB(printf("GCR_DMA_EMULATION 0x%08x\n", v)); + DEB(kprintf("GCR_DMA_EMULATION 0x%08x\n", v)); return 0; } diff --git a/sys/dev/sound/pci/aureal.c b/sys/dev/sound/pci/aureal.c index 88fe4710e0..efb5a6cc70 100644 --- a/sys/dev/sound/pci/aureal.c +++ b/sys/dev/sound/pci/aureal.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/aureal.c,v 1.8.2.7 2002/04/22 15:49:31 cg Exp $ - * $DragonFly: src/sys/dev/sound/pci/aureal.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/aureal.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -34,7 +34,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/aureal.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/aureal.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); /* PCI IDs of supported chips */ #define AU8820_PCI_ID 0x000112eb @@ -136,7 +136,7 @@ au_rdcd(kobj_t obj, void *arg, int regno) DELAY(j * 200 + 2000); j++; } - if (j==50) printf("pcm%d: codec timeout reading register %x (%x)\n", + if (j==50) kprintf("pcm%d: codec timeout reading register %x (%x)\n", au->unit, (regno & AU_CDC_REGMASK)>>16, i); return i & AU_CDC_DATAMASK; } @@ -153,7 +153,7 @@ au_wrcd(kobj_t obj, void *arg, int regno, u_int32_t data) DELAY(2000); j++; } - if (j==50) printf("codec timeout during write of register %x, data %x\n", + if (j==50) kprintf("codec timeout during write of register %x, data %x\n", regno, data); au_wr(au, 0, AU_REG_CODECIO, (regno<<16) | AU_CDC_REGSET | data, 4); /* DELAY(20000); @@ -161,7 +161,7 @@ au_wrcd(kobj_t obj, void *arg, int regno, u_int32_t data) */ tries++; } while (0); /* (i != data && tries < 3); */ /* - if (tries == 3) printf("giving up writing 0x%4x to codec reg %2x\n", data, regno); + if (tries == 3) kprintf("giving up writing 0x%4x to codec reg %2x\n", data, regno); */ return 0; @@ -398,9 +398,9 @@ au_intr (void *p) au->interrupts++; intsrc=au_rd(au, 0, AU_REG_IRQSRC, 4); - printf("pcm%d: interrupt with src %x\n", au->unit, intsrc); - if (intsrc & AU_IRQ_FATAL) printf("pcm%d: fatal error irq\n", au->unit); - if (intsrc & AU_IRQ_PARITY) printf("pcm%d: parity error irq\n", au->unit); + kprintf("pcm%d: interrupt with src %x\n", au->unit, intsrc); + if (intsrc & AU_IRQ_FATAL) kprintf("pcm%d: fatal error irq\n", au->unit); + if (intsrc & AU_IRQ_PARITY) kprintf("pcm%d: parity error irq\n", au->unit); if (intsrc & AU_IRQ_UNKNOWN) { (void)au_rd(au, 0, AU_REG_UNK1, 4); au_wr(au, 0, AU_REG_UNK1, 0, 4); @@ -529,7 +529,7 @@ au_testirq(struct au_info *au) au_wr(au, 0, AU_REG_IRQEN, 0x00001030, 4); au_wr(au, 0, AU_REG_IRQSRC, 0x000007ff, 4); DELAY(1000000); - if (au->interrupts==0) printf("pcm%d: irq test failed\n", au->unit); + if (au->interrupts==0) kprintf("pcm%d: irq test failed\n", au->unit); /* this apparently generates an irq */ return 0; } @@ -578,11 +578,11 @@ au_pci_attach(device_t dev) #if 0 /* Slapped wrist: config_id and map are private structures */ if (bootverbose) { - printf("pcm%d: map %d - allocating ", unit, i+1); - printf("0x%x bytes of ", 1<map[i].ln2size); - printf("%s space ", (config_id->map[i].type & PCI_MAPPORT)? + kprintf("pcm%d: map %d - allocating ", unit, i+1); + kprintf("0x%x bytes of ", 1<map[i].ln2size); + kprintf("%s space ", (config_id->map[i].type & PCI_MAPPORT)? "io" : "memory"); - printf("at 0x%x...", config_id->map[i].base); + kprintf("at 0x%x...", config_id->map[i].base); } #endif regid[j] = PCIR_MAPS + i*4; @@ -600,7 +600,7 @@ au_pci_attach(device_t dev) mapped++; } #if 0 - if (bootverbose) printf("%s\n", mapped? "ok" : "failed"); + if (bootverbose) kprintf("%s\n", mapped? "ok" : "failed"); #endif if (mapped) j++; if (j == 10) { @@ -612,7 +612,7 @@ au_pci_attach(device_t dev) #if 0 if (j < config_id->nummaps) { - printf("pcm%d: unable to map a required resource\n", unit); + kprintf("pcm%d: unable to map a required resource\n", unit); kfree(au, M_DEVBUF); return; } diff --git a/sys/dev/sound/pci/cmi.c b/sys/dev/sound/pci/cmi.c index 4337003283..4d851aeb78 100644 --- a/sys/dev/sound/pci/cmi.c +++ b/sys/dev/sound/pci/cmi.c @@ -40,7 +40,7 @@ * those that don't. * * $FreeBSD: src/sys/dev/sound/pci/cmi.c,v 1.1.2.8 2002/08/27 00:17:34 orion Exp $ - * $DragonFly: src/sys/dev/sound/pci/cmi.c,v 1.7 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/cmi.c,v 1.8 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -54,7 +54,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/cmi.c,v 1.7 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/cmi.c,v 1.8 2006/12/22 23:26:25 swildner Exp $"); /* Supported chip ID's */ #define CMI8338A_PCI_ID 0x010013f6 @@ -143,7 +143,7 @@ cmi_rd(struct sc_info *sc, int regno, int size) case 4: return bus_space_read_4(sc->st, sc->sh, regno); default: - DEB(printf("cmi_rd: failed 0x%04x %d\n", regno, size)); + DEB(kprintf("cmi_rd: failed 0x%04x %d\n", regno, size)); return 0xFFFFFFFF; } } @@ -217,7 +217,7 @@ cmpci_rate_to_regvalue(int rate) } } - DEB(printf("cmpci_rate_to_regvalue: %d -> %d\n", rate, cmi_rates[i])); + DEB(kprintf("cmpci_rate_to_regvalue: %d -> %d\n", rate, cmi_rates[i])); r = ((i >> 1) | (i << 2)) & 0x07; return r; @@ -229,7 +229,7 @@ cmpci_regvalue_to_rate(u_int32_t r) int i; i = ((r << 1) | (r >> 2)) & 0x07; - DEB(printf("cmpci_regvalue_to_rate: %d -> %d\n", r, i)); + DEB(kprintf("cmpci_regvalue_to_rate: %d -> %d\n", r, i)); return cmi_rates[i]; } @@ -288,7 +288,7 @@ cmi_ch1_start(struct sc_info *sc, struct sc_chinfo *ch) /* Enable Interrupts */ cmi_set4(sc, CMPCI_REG_INTR_CTRL, CMPCI_REG_CH1_INTR_ENABLE); - DEB(printf("cmi_ch1_start: dma prog\n")); + DEB(kprintf("cmi_ch1_start: dma prog\n")); ch->dma_active = 1; } @@ -344,7 +344,7 @@ cmichan_init(kobj_t obj, void *devinfo, ch->buffer = b; ch->dma_active = 0; if (sndbuf_alloc(ch->buffer, sc->parent_dmat, sc->bufsz) != 0) { - DEB(printf("cmichan_init failed\n")); + DEB(kprintf("cmichan_init failed\n")); return NULL; } @@ -441,7 +441,7 @@ cmichan_setspeed(kobj_t obj, void *data, u_int32_t speed) snd_mtxunlock(sc->lock); ch->spd = cmpci_regvalue_to_rate(r); - DEB(printf("cmichan_setspeed (%s) %d -> %d (%d)\n", + DEB(kprintf("cmichan_setspeed (%s) %d -> %d (%d)\n", (ch->dir == PCMDIR_PLAY) ? "play" : "rec", speed, ch->spd, cmpci_regvalue_to_rate(rsp))); @@ -676,13 +676,13 @@ cmimix_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned right) r = (right * max / 100) << (8 - cmt[dev].bits); cmimix_wr(sc, MIXER_GAIN_REG_RTOL(cmt[dev].rreg), l); cmimix_wr(sc, cmt[dev].rreg, r); - DEBMIX(printf("Mixer stereo write dev %d reg 0x%02x "\ + DEBMIX(kprintf("Mixer stereo write dev %d reg 0x%02x "\ "value 0x%02x:0x%02x\n", dev, MIXER_GAIN_REG_RTOL(cmt[dev].rreg), l, r)); } else { r = l; cmimix_wr(sc, cmt[dev].rreg, l); - DEBMIX(printf("Mixer mono write dev %d reg 0x%02x " \ + DEBMIX(kprintf("Mixer mono write dev %d reg 0x%02x " \ "value 0x%02x:0x%02x\n", dev, cmt[dev].rreg, l, l)); } @@ -716,11 +716,11 @@ cmimix_setrecsrc(struct snd_mixer *m, u_int32_t src) } } cmimix_wr(sc, CMPCI_SB16_MIXER_ADCMIX_R, sl|ml); - DEBMIX(printf("cmimix_setrecsrc: reg 0x%02x val 0x%02x\n", + DEBMIX(kprintf("cmimix_setrecsrc: reg 0x%02x val 0x%02x\n", CMPCI_SB16_MIXER_ADCMIX_R, sl|ml)); ml = CMPCI_SB16_MIXER_SRC_R_TO_L(ml); cmimix_wr(sc, CMPCI_SB16_MIXER_ADCMIX_L, sl|ml); - DEBMIX(printf("cmimix_setrecsrc: reg 0x%02x val 0x%02x\n", + DEBMIX(kprintf("cmimix_setrecsrc: reg 0x%02x val 0x%02x\n", CMPCI_SB16_MIXER_ADCMIX_L, sl|ml)); return src; @@ -903,7 +903,7 @@ cmi_attach(device_t dev) rman_get_start(sc->reg), rman_get_start(sc->irq)); pcm_setstatus(dev, status); - DEB(printf("cmi_attach: succeeded\n")); + DEB(kprintf("cmi_attach: succeeded\n")); return 0; bad: diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 561525180f..0271c97e6d 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -29,7 +29,7 @@ * contributed towards power management. * * $FreeBSD: src/sys/dev/sound/pci/cs4281.c,v 1.2.2.8 2002/08/27 00:25:55 orion Exp $ - * $DragonFly: src/sys/dev/sound/pci/cs4281.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/cs4281.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -40,7 +40,7 @@ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/cs4281.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/cs4281.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); #define CS4281_DEFAULT_BUFSZ 16384 @@ -354,7 +354,7 @@ cs4281chan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) adcdac_prog(ch); adcdac_go(ch, go); - DEB(printf("cs4281chan_setblocksize: blksz %d Setting %d\n", blocksize, ch->blksz)); + DEB(kprintf("cs4281chan_setblocksize: blksz %d Setting %d\n", blocksize, ch->blksz)); return ch->blksz; } @@ -546,7 +546,7 @@ cs4281_power(struct sc_info *sc, int state) break; } - DEB(printf("cs4281_power %d -> %d\n", sc->power, state)); + DEB(kprintf("cs4281_power %d -> %d\n", sc->power, state)); sc->power = state; return 0; diff --git a/sys/dev/sound/pci/csa.c b/sys/dev/sound/pci/csa.c index f0e2f6ee28..39629924ed 100644 --- a/sys/dev/sound/pci/csa.c +++ b/sys/dev/sound/pci/csa.c @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/csa.c,v 1.8.2.12 2002/10/05 19:53:18 orion Exp $ - * $DragonFly: src/sys/dev/sound/pci/csa.c,v 1.6 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/csa.c,v 1.7 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -50,7 +50,7 @@ #include "gnu/csaimg.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/csa.c,v 1.6 2006/10/25 20:56:02 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/csa.c,v 1.7 2006/12/22 23:26:25 swildner Exp $"); /* This is the pci device id. */ #define CS4610_PCI_ID 0x60011013 @@ -260,7 +260,7 @@ csa_attach(device_t dev) resp = &scp->res; scp->card = csa_findsubcard(dev); scp->binfo.card = scp->card; - printf("csa: card is %s\n", scp->card->name); + kprintf("csa: card is %s\n", scp->card->name); resp->io_rid = PCIR_MAPS; resp->io = bus_alloc_resource(dev, SYS_RES_MEMORY, &resp->io_rid, 0, ~0, 1, RF_ACTIVE); if (resp->io == NULL) diff --git a/sys/dev/sound/pci/ds1.c b/sys/dev/sound/pci/ds1.c index 5350730947..cfea2d7471 100644 --- a/sys/dev/sound/pci/ds1.c +++ b/sys/dev/sound/pci/ds1.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/ds1.c,v 1.8.2.9 2003/04/28 03:59:03 simokawa Exp $ - * $DragonFly: src/sys/dev/sound/pci/ds1.c,v 1.6 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/ds1.c,v 1.7 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -36,7 +36,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/ds1.c,v 1.6 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/ds1.c,v 1.7 2006/12/22 23:26:25 swildner Exp $"); /* -------------------------------------------------------------------- */ @@ -426,7 +426,7 @@ static void ds_enapslot(struct sc_info *sc, int slot, int go) { wrl(sc, &sc->pbase[slot + 1], go? (sc->pbankbase + 2 * slot * sc->pbanksize) : 0); - /* printf("pbase[%d] = 0x%x\n", slot + 1, go? (sc->pbankbase + 2 * slot * sc->pbanksize) : 0); */ + /* kprintf("pbase[%d] = 0x%x\n", slot + 1, go? (sc->pbankbase + 2 * slot * sc->pbanksize) : 0); */ } static void @@ -470,7 +470,7 @@ ds_setuprch(struct sc_rchinfo *ch) x = (b16? 0x00 : 0x01) | (stereo? 0x02 : 0x00); y = (48000 * 4096) / ch->spd; y--; - /* printf("pri = %d, x = %d, y = %d\n", pri, x, y); */ + /* kprintf("pri = %d, x = %d, y = %d\n", pri, x, y); */ ds_wr(sc, pri? YDSXGR_ADCFORMAT : YDSXGR_RECFORMAT, x, 4); ds_wr(sc, pri? YDSXGR_ADCSLOTSR : YDSXGR_RECSLOTSR, y, 4); } @@ -581,7 +581,7 @@ ds1pchan_getptr(kobj_t obj, void *data) ss += (ch->fmt & AFMT_16BIT)? 1 : 0; bank = ch->lslot + sc->currbank; - /* printf("getptr: %d\n", bank->PgStart << ss); */ + /* kprintf("getptr: %d\n", bank->PgStart << ss); */ ptr = bank->PgStart; ptr <<= ss; return ptr; @@ -775,7 +775,7 @@ ds_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) sc->ctrlbase = error? 0 : (u_int32_t)segs->ds_addr; if (bootverbose) { - printf("ds1: setmap (%lx, %lx), nseg=%d, error=%d\n", + kprintf("ds1: setmap (%lx, %lx), nseg=%d, error=%d\n", (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len, nseg, error); } @@ -849,7 +849,7 @@ ds_init(struct sc_info *sc) ds_wr(sc, YDSXGR_WORKBASE, sc->ctrlbase + cb, 4); cb += ws; sc->pbase = (u_int32_t *)(t + cb); - /* printf("pbase = %p -> 0x%x\n", sc->pbase, sc->ctrlbase + cb); */ + /* kprintf("pbase = %p -> 0x%x\n", sc->pbase, sc->ctrlbase + cb); */ ds_wr(sc, YDSXGR_PLAYCTRLBASE, sc->ctrlbase + cb, 4); cb += (64 + 1) * 4; sc->rbank = (struct rbank *)(t + cb); @@ -863,10 +863,10 @@ ds_init(struct sc_info *sc) for (i = 0; i < 64; i++) { wrl(sc, &sc->pbase[i + 1], 0); sc->pbank[i * 2] = (struct pbank *)(t + cb); - /* printf("pbank[%d] = %p -> 0x%x; ", i * 2, (struct pbank *)(t + cb), sc->ctrlbase + cb - vtophys(t + cb)); */ + /* kprintf("pbank[%d] = %p -> 0x%x; ", i * 2, (struct pbank *)(t + cb), sc->ctrlbase + cb - vtophys(t + cb)); */ cb += pcs; sc->pbank[i * 2 + 1] = (struct pbank *)(t + cb); - /* printf("pbank[%d] = %p -> 0x%x\n", i * 2 + 1, (struct pbank *)(t + cb), sc->ctrlbase + cb - vtophys(t + cb)); */ + /* kprintf("pbank[%d] = %p -> 0x%x\n", i * 2 + 1, (struct pbank *)(t + cb), sc->ctrlbase + cb - vtophys(t + cb)); */ cb += pcs; } wrl(sc, &sc->pbase[0], DS1_CHANS * 2); diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c index 680ffff221..d9de8b656f 100644 --- a/sys/dev/sound/pci/emu10k1.c +++ b/sys/dev/sound/pci/emu10k1.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/emu10k1.c,v 1.6.2.9 2002/04/22 15:49:32 cg Exp $ - * $DragonFly: src/sys/dev/sound/pci/emu10k1.c,v 1.10 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/emu10k1.c,v 1.11 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -35,7 +35,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/emu10k1.c,v 1.10 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/emu10k1.c,v 1.11 2006/12/22 23:26:25 swildner Exp $"); /* -------------------------------------------------------------------- */ @@ -650,12 +650,12 @@ emu_vdump(struct sc_info *sc, struct emu_voice *v) NULL, NULL }; int i, x; - printf("voice number %d\n", v->vnum); + kprintf("voice number %d\n", v->vnum); for (i = 0, x = 0; i <= 0x1e; i++) { if (regname[i] == NULL) continue; - printf("%s\t[%08x]", regname[i], emu_rdptr(sc, v->vnum, i)); - printf("%s", (x == 2)? "\n" : "\t"); + kprintf("%s\t[%08x]", regname[i], emu_rdptr(sc, v->vnum, i)); + kprintf("%s", (x == 2)? "\n" : "\t"); x++; if (x > 2) x = 0; @@ -666,15 +666,15 @@ emu_vdump(struct sc_info *sc, struct emu_voice *v) for (i = 0; i <= 0xe; i++) { if (regname2[i] == NULL) continue; - printf("%s\t[%08x]", regname2[i], emu_rdptr(sc, v->vnum, i + 0x70)); - printf("%s", (x == 2)? "\n" : "\t"); + kprintf("%s\t[%08x]", regname2[i], emu_rdptr(sc, v->vnum, i + 0x70)); + kprintf("%s", (x == 2)? "\n" : "\t"); x++; if (x > 2) x = 0; } } - printf("\n\n"); + kprintf("\n\n"); } #endif @@ -767,7 +767,7 @@ emupchan_trigger(kobj_t obj, void *data, int go) emu_settimer(sc); emu_enatimer(sc, 1); #ifdef EMUDEBUG - printf("start [%d bit, %s, %d hz]\n", + kprintf("start [%d bit, %s, %d hz]\n", ch->master->b16? 16 : 8, ch->master->stereo? "stereo" : "mono", ch->master->speed); @@ -1096,7 +1096,7 @@ emu_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) *phys = error? 0 : (void *)segs->ds_addr; if (bootverbose) { - printf("emu: setmap (%lx, %lx), nseg=%d, error=%d\n", + kprintf("emu: setmap (%lx, %lx), nseg=%d, error=%d\n", (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len, nseg, error); } @@ -1157,12 +1157,12 @@ emu_memalloc(struct sc_info *sc, u_int32_t sz) blk->buf = buf; blk->pte_start = start; blk->pte_size = blksz; - /* printf("buf %p, pte_start %d, pte_size %d\n", blk->buf, blk->pte_start, blk->pte_size); */ + /* kprintf("buf %p, pte_start %d, pte_size %d\n", blk->buf, blk->pte_start, blk->pte_size); */ ofs = 0; for (idx = start; idx < start + blksz; idx++) { mem->bmap[idx >> 3] |= 1 << (idx & 7); tmp = (u_int32_t)vtophys((u_int8_t *)buf + ofs); - /* printf("pte[%d] -> %x phys, %x virt\n", idx, tmp, ((u_int32_t)buf) + ofs); */ + /* kprintf("pte[%d] -> %x phys, %x virt\n", idx, tmp, ((u_int32_t)buf) + ofs); */ mem->ptb_pages[idx] = (tmp << 1) | idx; ofs += EMUPAGESIZE; } diff --git a/sys/dev/sound/pci/es137x.c b/sys/dev/sound/pci/es137x.c index e48b986a40..7010a5aae3 100644 --- a/sys/dev/sound/pci/es137x.c +++ b/sys/dev/sound/pci/es137x.c @@ -39,7 +39,7 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/es137x.c,v 1.13.2.10 2002/05/07 17:02:25 greid Exp $ - * $DragonFly: src/sys/dev/sound/pci/es137x.c,v 1.7 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/es137x.c,v 1.8 2006/12/22 23:26:25 swildner Exp $ */ /* @@ -62,7 +62,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/es137x.c,v 1.7 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/es137x.c,v 1.8 2006/12/22 23:26:25 swildner Exp $"); static int debug = 0; SYSCTL_INT(_debug, OID_AUTO, es_debug, CTLFLAG_RW, &debug, 0, ""); @@ -255,7 +255,7 @@ es1370_wrcodec(struct es_info *es, u_char i, u_char data) } DELAY(1000); } while (--wait); - printf("pcm: es1370_wrcodec timed out\n"); + kprintf("pcm: es1370_wrcodec timed out\n"); return -1; } @@ -498,7 +498,7 @@ es1371_init(struct es_info *es, device_t dev) int devid = pci_get_devid(dev); int revid = pci_get_revid(dev); - if (debug > 0) printf("es_init\n"); + if (debug > 0) kprintf("es_init\n"); es->num = 0; es->ctrl = 0; @@ -558,7 +558,7 @@ es1371_wrcd(kobj_t obj, void *s, int addr, u_int32_t data) unsigned t, x; struct es_info *es = (struct es_info*)s; - if (debug > 0) printf("wrcodec addr 0x%x data 0x%x\n", addr, data); + if (debug > 0) kprintf("wrcodec addr 0x%x data 0x%x\n", addr, data); for (t = 0; t < 0x1000; t++) if (!(bus_space_read_4(es->st, es->sh,(ES1371_REG_CODEC & CODEC_WIP)))) @@ -576,7 +576,7 @@ es1371_wrcd(kobj_t obj, void *s, int addr, u_int32_t data) break; if (debug > 2) - printf("one b_s_w: 0x%lx 0x%x 0x%x\n", + kprintf("one b_s_w: 0x%lx 0x%x 0x%x\n", rman_get_start(es->reg), ES1371_REG_CODEC, ((addr << CODEC_POADD_SHIFT) & CODEC_POADD_MASK) | ((data << CODEC_PODAT_SHIFT) & CODEC_PODAT_MASK)); @@ -587,7 +587,7 @@ es1371_wrcd(kobj_t obj, void *s, int addr, u_int32_t data) /* restore SRC reg */ es1371_wait_src_ready(s); if (debug > 2) - printf("two b_s_w: 0x%lx 0x%x 0x%x\n", + kprintf("two b_s_w: 0x%lx 0x%x 0x%x\n", rman_get_start(es->reg), ES1371_REG_SMPRATE, x); bus_space_write_4(es->st, es->sh, ES1371_REG_SMPRATE, x); crit_exit(); @@ -601,12 +601,12 @@ es1371_rdcd(kobj_t obj, void *s, int addr) unsigned t, x = 0; struct es_info *es = (struct es_info *)s; - if (debug > 0) printf("rdcodec addr 0x%x ... ", addr); + if (debug > 0) kprintf("rdcodec addr 0x%x ... ", addr); for (t = 0; t < 0x1000; t++) if (!(x = bus_space_read_4(es->st, es->sh, ES1371_REG_CODEC) & CODEC_WIP)) break; - if (debug > 0) printf("loop 1 t 0x%x x 0x%x ", t, x); + if (debug > 0) kprintf("loop 1 t 0x%x x 0x%x ", t, x); crit_enter(); @@ -620,7 +620,7 @@ es1371_rdcd(kobj_t obj, void *s, int addr) for (t = 0; t < 0x5000; t++) if ((x = bus_space_read_4(es->st, es->sh, ES1371_REG_SMPRATE) & 0x00070000) == 0x00010000) break; - if (debug > 0) printf("loop 2 t 0x%x x 0x%x ", t, x); + if (debug > 0) kprintf("loop 2 t 0x%x x 0x%x ", t, x); bus_space_write_4(es->st, es->sh, ES1371_REG_CODEC, ((addr << CODEC_POADD_SHIFT) & CODEC_POADD_MASK) | CODEC_PORD); @@ -634,7 +634,7 @@ es1371_rdcd(kobj_t obj, void *s, int addr) for (t = 0; t < 0x1000; t++) if ((x = bus_space_read_4(es->st, es->sh, ES1371_REG_CODEC)) & CODEC_RDY) break; - if (debug > 0) printf("loop 3 t 0x%x 0x%x ret 0x%x\n", t, x, ((x & CODEC_PIDAT_MASK) >> CODEC_PIDAT_SHIFT)); + if (debug > 0) kprintf("loop 3 t 0x%x 0x%x ret 0x%x\n", t, x, ((x & CODEC_PIDAT_MASK) >> CODEC_PIDAT_SHIFT)); return ((x & CODEC_PIDAT_MASK) >> CODEC_PIDAT_SHIFT); } @@ -666,7 +666,7 @@ es1371_src_write(struct es_info *es, u_short reg, u_short data){ r = es1371_wait_src_ready(es) & (ES1371_DIS_SRC | ES1371_DIS_P1 | ES1371_DIS_P2 | ES1371_DIS_R1); r |= ES1371_SRC_RAM_ADDRO(reg) | ES1371_SRC_RAM_DATAO(data); - /* printf("es1371_src_write 0x%x 0x%x\n",ES1371_REG_SMPRATE,r | ES1371_SRC_RAM_WE); */ + /* kprintf("es1371_src_write 0x%x 0x%x\n",ES1371_REG_SMPRATE,r | ES1371_SRC_RAM_WE); */ bus_space_write_4(es->st, es->sh, ES1371_REG_SMPRATE, r | ES1371_SRC_RAM_WE); } @@ -737,7 +737,7 @@ es1371_wait_src_ready(struct es_info *es) return r; DELAY(1000); } - printf("es1371: wait src ready timeout 0x%x [0x%x]\n", ES1371_REG_SMPRATE, r); + kprintf("es1371: wait src ready timeout 0x%x [0x%x]\n", ES1371_REG_SMPRATE, r); return 0; } diff --git a/sys/dev/sound/pci/fm801.c b/sys/dev/sound/pci/fm801.c index 69084b64f7..0ed5c17460 100644 --- a/sys/dev/sound/pci/fm801.c +++ b/sys/dev/sound/pci/fm801.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/fm801.c,v 1.3.2.8 2002/12/24 21:17:42 semenu Exp $ - * $DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -32,7 +32,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); #define PCI_VENDOR_FORTEMEDIA 0x1319 #define PCI_DEVICE_FORTEMEDIA1 0x08011319 @@ -102,7 +102,7 @@ SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/fm801.c,v 1.8 2006/12/20 18: #define FM801_DEFAULT_BUFSZ 4096 /* Other values do not work!!! */ /* debug purposes */ -#define DPRINT if(0) printf +#define DPRINT if(0) kprintf /* static int fm801ch_setup(struct pcm_channel *c); @@ -217,7 +217,7 @@ fm801_rdcd(kobj_t obj, void *devinfo, int regno) DPRINT("fm801 rdcd: 1 - DELAY\n"); } if (i >= TIMO) { - printf("fm801 rdcd: codec busy\n"); + kprintf("fm801 rdcd: codec busy\n"); return 0; } @@ -229,7 +229,7 @@ fm801_rdcd(kobj_t obj, void *devinfo, int regno) DPRINT("fm801 rdcd: 2 - DELAY\n"); } if (i >= TIMO) { - printf("fm801 rdcd: write codec invalid\n"); + kprintf("fm801 rdcd: write codec invalid\n"); return 0; } @@ -252,7 +252,7 @@ fm801_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) DPRINT("fm801 rdcd: 1 - DELAY\n"); } if (i >= TIMO) { - printf("fm801 wrcd: read codec busy\n"); + kprintf("fm801 wrcd: read codec busy\n"); return -1; } @@ -265,7 +265,7 @@ fm801_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) DPRINT("fm801 wrcd: 2 - DELAY\n"); } if (i >= TIMO) { - printf("fm801 wrcd: read codec busy\n"); + kprintf("fm801 wrcd: read codec busy\n"); return -1; } DPRINT("fm801 wrcd release reg 0x%x val 0x%x\n",regno, data); diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 896433ad84..292ad9f55b 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/ich.c,v 1.3.2.12 2003/01/20 03:59:42 orion Exp $ - * $DragonFly: src/sys/dev/sound/pci/ich.c,v 1.11 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/ich.c,v 1.12 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -35,7 +35,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/ich.c,v 1.11 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/ich.c,v 1.12 2006/12/22 23:26:25 swildner Exp $"); /* -------------------------------------------------------------------- */ @@ -549,8 +549,8 @@ void ich_calibrate(void *arg) if (bootverbose || sc->ac97rate != 48000) { device_printf(sc->dev, "measured ac97 link rate at %d Hz", actual_48k_rate); if (sc->ac97rate != actual_48k_rate) - printf(", will use %d Hz", sc->ac97rate); - printf("\n"); + kprintf(", will use %d Hz", sc->ac97rate); + kprintf("\n"); } return; diff --git a/sys/dev/sound/pci/maestro.c b/sys/dev/sound/pci/maestro.c index 374dcc66da..24a7da1341 100644 --- a/sys/dev/sound/pci/maestro.c +++ b/sys/dev/sound/pci/maestro.c @@ -25,7 +25,7 @@ * * $Id: maestro.c,v 1.12 2000/09/06 03:32:34 taku Exp $ * $FreeBSD: src/sys/dev/sound/pci/maestro.c,v 1.2.2.5 2002/04/22 15:49:32 cg Exp $ - * $DragonFly: src/sys/dev/sound/pci/maestro.c,v 1.7 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/maestro.c,v 1.8 2006/12/22 23:26:25 swildner Exp $ */ /* @@ -53,7 +53,7 @@ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/maestro.c,v 1.7 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/maestro.c,v 1.8 2006/12/22 23:26:25 swildner Exp $"); #define inline __inline @@ -892,7 +892,7 @@ setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) *phys = error? 0 : segs->ds_addr; if (bootverbose) { - printf("setmap (%lx, %lx), nseg=%d, error=%d\n", + kprintf("setmap (%lx, %lx), nseg=%d, error=%d\n", (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len, nseg, error); } diff --git a/sys/dev/sound/pci/maestro3.c b/sys/dev/sound/pci/maestro3.c index f835a3fdaf..673ec9f14d 100644 --- a/sys/dev/sound/pci/maestro3.c +++ b/sys/dev/sound/pci/maestro3.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/maestro3.c,v 1.2.2.11 2002/09/16 19:52:33 scottl Exp $ - * $DragonFly: src/sys/dev/sound/pci/maestro3.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/maestro3.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ /* @@ -64,7 +64,7 @@ #include "gnu/maestro3_reg.h" #include "gnu/maestro3_dsp.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/maestro3.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/maestro3.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); /* -------------------------------------------------------------------- */ @@ -72,7 +72,7 @@ enum {CHANGE=0, CALL=1, INTR=2, BORING=3, NONE=-1}; #ifndef M3_DEBUG_LEVEL #define M3_DEBUG_LEVEL NONE #endif -#define M3_DEBUG(level, _msg) {if ((level) <= M3_DEBUG_LEVEL) {printf _msg;}} +#define M3_DEBUG(level, _msg) {if ((level) <= M3_DEBUG_LEVEL) {kprintf _msg;}} /* -------------------------------------------------------------------- */ enum { diff --git a/sys/dev/sound/pci/solo.c b/sys/dev/sound/pci/solo.c index 1cab3625c5..965b78a9f2 100644 --- a/sys/dev/sound/pci/solo.c +++ b/sys/dev/sound/pci/solo.c @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/solo.c,v 1.9.2.8 2002/04/22 15:49:32 cg Exp $ - * $DragonFly: src/sys/dev/sound/pci/solo.c,v 1.7 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/solo.c,v 1.8 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -36,7 +36,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/solo.c,v 1.7 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/solo.c,v 1.8 2006/12/22 23:26:25 swildner Exp $"); #define SOLO_DEFAULT_BUFSZ 16384 #define ABS(x) (((x) < 0)? -(x) : (x)) @@ -199,21 +199,21 @@ ess_dspwr(struct ess_info *sc, u_char val) } if (i > 10) DELAY((i > 100)? 1000 : 10); } - printf("ess_dspwr(0x%02x) timed out.\n", val); + kprintf("ess_dspwr(0x%02x) timed out.\n", val); return 0; } static int ess_cmd(struct ess_info *sc, u_char val) { - DEB(printf("ess_cmd: %x\n", val)); + DEB(kprintf("ess_cmd: %x\n", val)); return ess_dspwr(sc, val); } static int ess_cmd1(struct ess_info *sc, u_char cmd, int val) { - DEB(printf("ess_cmd1: %x, %x\n", cmd, val)); + DEB(kprintf("ess_cmd1: %x, %x\n", cmd, val)); if (ess_dspwr(sc, cmd)) { return ess_dspwr(sc, val & 0xff); } else return 0; @@ -222,7 +222,7 @@ ess_cmd1(struct ess_info *sc, u_char cmd, int val) static void ess_setmixer(struct ess_info *sc, u_int port, u_int value) { - DEB(printf("ess_setmixer: reg=%x, val=%x\n", port, value);) + DEB(kprintf("ess_setmixer: reg=%x, val=%x\n", port, value);) crit_enter(); ess_wr(sc, SB_MIX_ADDR, (u_char) (port & 0xff)); /* Select register */ DELAY(10); @@ -275,12 +275,12 @@ ess_read(struct ess_info *sc, u_char reg) static int ess_reset_dsp(struct ess_info *sc) { - DEB(printf("ess_reset_dsp\n")); + DEB(kprintf("ess_reset_dsp\n")); ess_wr(sc, SBDSP_RST, 3); DELAY(100); ess_wr(sc, SBDSP_RST, 0); if (ess_get_byte(sc) != 0xAA) { - DEB(printf("ess_reset_dsp failed\n")); + DEB(kprintf("ess_reset_dsp failed\n")); /* rman_get_start(d->io_base))); */ @@ -314,10 +314,10 @@ ess_intr(void *arg) if (sc->simplex_dir == PCMDIR_REC) rirq = 1; if (!pirq && !rirq) - printf("solo: IRQ neither playback nor rec!\n"); + kprintf("solo: IRQ neither playback nor rec!\n"); } - DEB(printf("ess_intr: pirq:%d rirq:%d\n",pirq,rirq)); + DEB(kprintf("ess_intr: pirq:%d rirq:%d\n",pirq,rirq)); if (pirq) { if (sc->pch.stopping) { @@ -409,7 +409,7 @@ ess_setupch(struct ess_info *sc, int ch, int dir, int spd, u_int32_t fmt, int le int unsign = (fmt == AFMT_U8 || fmt == AFMT_U16_LE || fmt == AFMT_U16_BE)? 1 : 0; u_int8_t spdval, fmtval; - DEB(printf("ess_setupch\n")); + DEB(kprintf("ess_setupch\n")); spdval = (sc->newspeed)? ess_calcspeed9(&spd) : ess_calcspeed8(&spd); sc->simplex_dir = play ? PCMDIR_PLAY : PCMDIR_REC ; @@ -476,7 +476,7 @@ ess_start(struct ess_chinfo *ch) { struct ess_info *sc = ch->parent; - DEB(printf("ess_start\n");); + DEB(kprintf("ess_start\n");); ess_setupch(sc, ch->hwch, ch->dir, ch->spd, ch->fmt, ch->blksz); ch->stopping = 0; if (ch->hwch == 1) { @@ -497,13 +497,13 @@ ess_stop(struct ess_chinfo *ch) { struct ess_info *sc = ch->parent; - DEB(printf("ess_stop\n")); + DEB(kprintf("ess_stop\n")); ch->stopping = 1; if (ch->hwch == 1) ess_write(sc, 0xb8, ess_read(sc, 0xb8) & ~0x04); else ess_setmixer(sc, 0x78, ess_getmixer(sc, 0x78) & ~0x10); - DEB(printf("done with stop\n")); + DEB(kprintf("done with stop\n")); return 0; } @@ -515,7 +515,7 @@ esschan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel * struct ess_info *sc = devinfo; struct ess_chinfo *ch = (dir == PCMDIR_PLAY)? &sc->pch : &sc->rch; - DEB(printf("esschan_init\n")); + DEB(kprintf("esschan_init\n")); ch->parent = sc; ch->channel = c; ch->buffer = b; @@ -566,7 +566,7 @@ esschan_trigger(kobj_t obj, void *data, int go) struct ess_chinfo *ch = data; struct ess_info *sc = ch->parent; - DEB(printf("esschan_trigger: %d\n",go)); + DEB(kprintf("esschan_trigger: %d\n",go)); if (go == PCMTRIG_EMLDMAWR || go == PCMTRIG_EMLDMARD) return 0; @@ -777,7 +777,7 @@ ess_dmapos(struct ess_info *sc, int ch) do { DELAY(10); if (j > 1) - printf("DMA count reg bogus: %04x & %04x\n", + kprintf("DMA count reg bogus: %04x & %04x\n", i, p); i = port_rd(sc->vc, 0x4, 2) + 1; p = port_rd(sc->vc, 0x4, 2) + 1; diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index cc436141a3..02a2589fcf 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/t4dwave.c,v 1.9.2.11 2002/10/22 08:27:13 cognet Exp $ - * $DragonFly: src/sys/dev/sound/pci/t4dwave.c,v 1.7 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/t4dwave.c,v 1.8 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -34,7 +34,7 @@ #include #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/t4dwave.c,v 1.7 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/t4dwave.c,v 1.8 2006/12/22 23:26:25 swildner Exp $"); /* -------------------------------------------------------------------- */ #define TDX_PCI_ID 0x20001023 @@ -195,7 +195,7 @@ tr_rdcd(kobj_t obj, void *devinfo, int regno) trw=TNX_CDC_RWSTAT; break; default: - printf("!!! tr_rdcd defaulted !!!\n"); + kprintf("!!! tr_rdcd defaulted !!!\n"); return -1; } @@ -223,7 +223,7 @@ tr_rdcd(kobj_t obj, void *devinfo, int regno) j=tr_rd(tr, treg, 4); } snd_mtxunlock(tr->lock); - if (i == 0) printf("codec timeout during read of register %x\n", regno); + if (i == 0) kprintf("codec timeout during read of register %x\n", regno); return (j >> TR_CDC_DATA) & 0xffff; } @@ -248,7 +248,7 @@ tr_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) trw=TNX_CDC_RWSTAT | ((regno & 0x100)? TNX_CDC_SEC : 0); break; default: - printf("!!! tr_wrcd defaulted !!!"); + kprintf("!!! tr_wrcd defaulted !!!"); return -1; } @@ -256,7 +256,7 @@ tr_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) regno &= 0x7f; #if 0 - printf("tr_wrcd: reg %x was %x", regno, tr_rdcd(devinfo, regno)); + kprintf("tr_wrcd: reg %x was %x", regno, tr_rdcd(devinfo, regno)); #endif j=trw; snd_mtxlock(tr->lock); @@ -281,10 +281,10 @@ tr_wrcd(kobj_t obj, void *devinfo, int regno, u_int32_t data) tr_wr(tr, treg, (data << TR_CDC_DATA) | regno | trw, 4); } #if 0 - printf(" - wrote %x, now %x\n", data, tr_rdcd(devinfo, regno)); + kprintf(" - wrote %x, now %x\n", data, tr_rdcd(devinfo, regno)); #endif snd_mtxunlock(tr->lock); - if (i==0) printf("codec timeout writing %x, data %x\n", regno, data); + if (i==0) kprintf("codec timeout writing %x, data %x\n", regno, data); return (i > 0)? 0 : -1; } @@ -737,7 +737,7 @@ tr_intr(void *p) tmp = (bufhalf & mask)? 1 : 0; if (chnum < tr->playchns) { ch = &tr->chinfo[chnum]; - /* printf("%d @ %d, ", chnum, trpchan_getptr(NULL, ch)); */ + /* kprintf("%d @ %d, ", chnum, trpchan_getptr(NULL, ch)); */ if (ch->bufhalf != tmp) { chn_intr(ch->channel); ch->bufhalf = tmp; diff --git a/sys/dev/sound/pci/via8233.c b/sys/dev/sound/pci/via8233.c index 9b03528471..3c405ebd43 100644 --- a/sys/dev/sound/pci/via8233.c +++ b/sys/dev/sound/pci/via8233.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/via8233.c,v 1.2.2.2 2003/02/06 17:35:56 orion Exp $ - * $DragonFly: src/sys/dev/sound/pci/via8233.c,v 1.6 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/via8233.c,v 1.7 2006/12/22 23:26:25 swildner Exp $ */ /* Some Credits: @@ -46,7 +46,7 @@ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/via8233.c,v 1.6 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/via8233.c,v 1.7 2006/12/22 23:26:25 swildner Exp $"); #define VIA8233_PCI_ID 0x30591106 @@ -156,7 +156,7 @@ via_waitready_codec(struct via_info *via) return 0; DELAY(1); } - printf("via: codec busy\n"); + kprintf("via: codec busy\n"); return 1; } @@ -171,7 +171,7 @@ via_waitvalid_codec(struct via_info *via) return 0; DELAY(1); } - printf("via: codec invalid\n"); + kprintf("via: codec invalid\n"); return 1; } diff --git a/sys/dev/sound/pci/via82c686.c b/sys/dev/sound/pci/via82c686.c index b439e7a3b8..3665f1db75 100644 --- a/sys/dev/sound/pci/via82c686.c +++ b/sys/dev/sound/pci/via82c686.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pci/via82c686.c,v 1.4.2.10 2003/05/11 01:45:53 orion Exp $ - * $DragonFly: src/sys/dev/sound/pci/via82c686.c,v 1.6 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/via82c686.c,v 1.7 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -36,7 +36,7 @@ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/via82c686.c,v 1.6 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/via82c686.c,v 1.7 2006/12/22 23:26:25 swildner Exp $"); #define VIA_PCI_ID 0x30581106 #define NSEGS 4 /* Number of segments in SGD table */ @@ -146,7 +146,7 @@ via_waitready_codec(struct via_info *via) (via_rd(via, VIA_CODEC_CTL, 4) & VIA_CODEC_BUSY); i++) DELAY(1); if (i >= TIMEOUT) { - printf("via: codec busy\n"); + kprintf("via: codec busy\n"); return 1; } @@ -164,7 +164,7 @@ via_waitvalid_codec(struct via_info *via) !(via_rd(via, VIA_CODEC_CTL, 4) & VIA_CODEC_PRIVALID); i++) DELAY(1); if (i >= TIMEOUT) { - printf("via: codec invalid\n"); + kprintf("via: codec invalid\n"); return 1; } @@ -280,7 +280,7 @@ viachan_setformat(kobj_t obj, void *data, u_int32_t format) if (format & AFMT_S16_LE) mode_set |= VIA_RPMODE_16BIT; - DEB(printf("set format: dir = %d, format=%x\n", ch->dir, format)); + DEB(kprintf("set format: dir = %d, format=%x\n", ch->dir, format)); mode = via_rd(via, ch->mode, 1); mode &= ~(VIA_RPMODE_16BIT | VIA_RPMODE_STEREO); mode |= mode_set; @@ -334,7 +334,7 @@ viachan_trigger(kobj_t obj, void *data, int go) return 0; ado = ch->sgd_table; - DEB(printf("ado located at va=%p pa=%x\n", ado, vtophys(ado))); + DEB(kprintf("ado located at va=%p pa=%x\n", ado, vtophys(ado))); if (go == PCMTRIG_START) { via_buildsgdt(ch); @@ -343,7 +343,7 @@ viachan_trigger(kobj_t obj, void *data, int go) } else via_wr(via, ch->ctrl, VIA_RPCTRL_TERMINATE, 1); - DEB(printf("viachan_trigger: go=%d\n", go)); + DEB(kprintf("viachan_trigger: go=%d\n", go)); return 0; } @@ -362,7 +362,7 @@ viachan_getptr(kobj_t obj, void *data) if (base != base1) /* Avoid race hazard */ len = via_rd(via, ch->count, 4); - DEB(printf("viachan_getptr: len / base = %x / %x\n", len, base)); + DEB(kprintf("viachan_getptr: len / base = %x / %x\n", len, base)); /* Base points to SGD segment to do, one past current */ @@ -379,7 +379,7 @@ viachan_getptr(kobj_t obj, void *data) ptr = ptr & ~0x1f; } - DEB(printf("return ptr=%d\n", ptr)); + DEB(kprintf("return ptr=%d\n", ptr)); return ptr; } @@ -412,7 +412,7 @@ via_intr(void *p) struct via_info *via = p; int st; - /* DEB(printf("viachan_intr\n")); */ + /* DEB(kprintf("viachan_intr\n")); */ /* Read channel */ st = via_rd(via, VIA_PLAY_STAT, 1); if (st & VIA_RPSTAT_INTR) { diff --git a/sys/dev/sound/pci/vibes.c b/sys/dev/sound/pci/vibes.c index 128a16ffd6..0c715cd775 100644 --- a/sys/dev/sound/pci/vibes.c +++ b/sys/dev/sound/pci/vibes.c @@ -28,7 +28,7 @@ * muting. * * $FreeBSD: src/sys/dev/sound/pci/vibes.c,v 1.4.2.6 2002/04/22 15:49:33 cg Exp $ - * $DragonFly: src/sys/dev/sound/pci/vibes.c,v 1.8 2006/12/20 18:14:40 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pci/vibes.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -39,7 +39,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/vibes.c,v 1.8 2006/12/20 18:14:40 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pci/vibes.c,v 1.9 2006/12/22 23:26:25 swildner Exp $"); /* ------------------------------------------------------------------------- */ /* Constants */ @@ -171,7 +171,7 @@ sv_dma_set_config(bus_space_tag_t st, bus_space_handle_t sh, bus_space_write_4(st, sh, SV_DMA_COUNT, count & 0xffffff); bus_space_write_1(st, sh, SV_DMA_MODE, mode); - DEB(printf("base 0x%08x count %5d mode 0x%02x\n", + DEB(kprintf("base 0x%08x count %5d mode 0x%02x\n", base, count, mode)); } @@ -196,7 +196,7 @@ svchan_init(kobj_t obj, void *devinfo, struct snd_dbuf *b, struct pcm_channel *c ch->dir = dir; if (sndbuf_alloc(b, sc->parent_dmat, sc->bufsz) != 0) { - DEB(printf("svchan_init failed\n")); + DEB(kprintf("svchan_init failed\n")); return NULL; } ch->buffer = b; @@ -222,7 +222,7 @@ svchan_setblocksize(kobj_t obj, void *data, u_int32_t blocksize) /* user has requested interrupts every blocksize bytes */ RANGE(blocksize, SV_MIN_BLKSZ, sc->bufsz / SV_INTR_PER_BUFFER); sndbuf_resize(ch->buffer, SV_INTR_PER_BUFFER, blocksize); - DEB(printf("svchan_setblocksize: %d\n", blocksize)); + DEB(kprintf("svchan_setblocksize: %d\n", blocksize)); return blocksize; } @@ -299,7 +299,7 @@ sv_set_recspeed(struct sc_info *sc, u_int32_t speed) sv_indirect_set(sc, SV_REG_ADC_PLLM, best_m); sv_indirect_set(sc, SV_REG_ADC_PLLN, SV_ADC_PLLN(best_n) | SV_ADC_PLLR(best_r)); - DEB(printf("svrchan_setspeed: %d -> PLLM 0x%02x PLLNR 0x%08x\n", + DEB(kprintf("svrchan_setspeed: %d -> PLLM 0x%02x PLLNR 0x%08x\n", speed, sv_indirect_get(sc, SV_REG_ADC_PLLM), sv_indirect_get(sc, SV_REG_ADC_PLLN))); @@ -549,7 +549,7 @@ sv_mix_setrecsrc(struct snd_mixer *m, u_int32_t mask) v |= mt[i].iselect; } } - DEB(printf("sv_mix_setrecsrc: mask 0x%08x adc_input 0x%02x\n", mask, v)); + DEB(kprintf("sv_mix_setrecsrc: mask 0x%08x adc_input 0x%02x\n", mask, v)); return mask; } @@ -587,7 +587,7 @@ sv_power(struct sc_info *sc, int state) sv_indirect_set(sc, SV_REG_DIGITAL_PWR, SV_DIGITAL_OFF); break; } - DEB(printf("Power state %d\n", state)); + DEB(kprintf("Power state %d\n", state)); } static int @@ -695,7 +695,7 @@ sv_intr(void *data) chn_intr(sc->rch.channel); status &= ~(SV_CM_STATUS_AINT|SV_CM_STATUS_CINT); - DEB(if (status) printf("intr 0x%02x ?\n", status)); + DEB(if (status) kprintf("intr 0x%02x ?\n", status)); return; } @@ -754,9 +754,9 @@ sv_attach(device_t dev) { sc->enh_sh = rman_get_bushandle(sc->enh_reg); data = pci_read_config(dev, SV_PCI_DMAA, 4); - DEB(printf("sv_attach: initial dmaa 0x%08x\n", data)); + DEB(kprintf("sv_attach: initial dmaa 0x%08x\n", data)); data = pci_read_config(dev, SV_PCI_DMAC, 4); - DEB(printf("sv_attach: initial dmac 0x%08x\n", data)); + DEB(kprintf("sv_attach: initial dmac 0x%08x\n", data)); /* Initialize DMA_A and DMA_C */ pci_write_config(dev, SV_PCI_DMAA, SV_PCI_DMA_EXTENDED, 4); @@ -848,7 +848,7 @@ sv_attach(device_t dev) { data = pci_read_config(dev, SV_PCI_DMAA, 4) | SV_PCI_DMA_ENABLE | SV_PCI_DMA_EXTENDED; data = ((u_int32_t)sdmaa & 0xfffffff0) | (data & 0x0f); pci_write_config(dev, SV_PCI_DMAA, data, 4); - DEB(printf("dmaa: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAA, 4))); + DEB(kprintf("dmaa: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAA, 4))); /* Cache resource short-cuts for dma_c */ sc->dmac_rid = SV_PCI_DMAC; @@ -867,10 +867,10 @@ sv_attach(device_t dev) { data = pci_read_config(dev, SV_PCI_DMAC, 4) | SV_PCI_DMA_ENABLE | SV_PCI_DMA_EXTENDED; data = ((u_int32_t)sdmac & 0xfffffff0) | (data & 0x0f); pci_write_config(dev, SV_PCI_DMAC, data, 4); - DEB(printf("dmac: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAC, 4))); + DEB(kprintf("dmac: 0x%x 0x%x\n", data, pci_read_config(dev, SV_PCI_DMAC, 4))); if (bootverbose) - printf("Sonicvibes: revision %d.\n", sc->rev); + kprintf("Sonicvibes: revision %d.\n", sc->rev); if (pcm_register(dev, sc, 1, 1)) { device_printf(dev, "sv_attach: pcm_register fail\n"); @@ -884,7 +884,7 @@ sv_attach(device_t dev) { rman_get_start(sc->enh_reg), rman_get_start(sc->irq)); pcm_setstatus(dev, status); - DEB(printf("sv_attach: succeeded\n")); + DEB(kprintf("sv_attach: succeeded\n")); return 0; diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index 13d284e3f4..1eee20c996 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/ac97.c,v 1.49 2003/11/11 22:15:17 kuriyama Exp $ - * $DragonFly: src/sys/dev/sound/pcm/ac97.c,v 1.21 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/ac97.c,v 1.22 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -33,7 +33,7 @@ #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/ac97.c,v 1.21 2006/12/20 18:14:41 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/ac97.c,v 1.22 2006/12/22 23:26:25 swildner Exp $"); MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); @@ -463,7 +463,7 @@ ac97_setmixer(struct ac97_info *codec, unsigned channel, unsigned left, unsigned snd_mtxunlock(codec->lock); return left | (right << 8); } else { - /* printf("ac97_setmixer: reg=%d, bits=%d, enable=%d\n", e->reg, e->bits, e->enable); */ + /* kprintf("ac97_setmixer: reg=%d, bits=%d, enable=%d\n", e->reg, e->bits, e->enable); */ return -1; } } @@ -623,7 +623,7 @@ ac97_initmixer(struct ac97_info *codec) for (k = 1; j & (1 << k); k++); codec->mix[i].bits = j? k - codec->mix[i].ofs : 0; } - /* printf("mixch %d, en=%d, b=%d\n", i, codec->mix[i].enable, codec->mix[i].bits); */ + /* kprintf("mixch %d, en=%d, b=%d\n", i, codec->mix[i].enable, codec->mix[i].bits); */ } device_printf(codec->dev, "<%s>\n", @@ -633,19 +633,19 @@ ac97_initmixer(struct ac97_info *codec) device_printf(codec->dev, "Codec features "); for (i = j = 0; i < 10; i++) if (codec->caps & (1 << i)) - printf("%s%s", j++? ", " : "", ac97feature[i]); - printf("%s%d bit master volume", j++? ", " : "", codec->mix[SOUND_MIXER_VOLUME].bits); - printf("%s%s\n", j? ", " : "", ac97enhancement[codec->se]); + kprintf("%s%s", j++? ", " : "", ac97feature[i]); + kprintf("%s%d bit master volume", j++? ", " : "", codec->mix[SOUND_MIXER_VOLUME].bits); + kprintf("%s%s\n", j? ", " : "", ac97enhancement[codec->se]); if (codec->extcaps != 0 || codec->extid) { device_printf(codec->dev, "%s codec", codec->extid? "Secondary" : "Primary"); if (codec->extcaps) - printf(" extended features "); + kprintf(" extended features "); for (i = j = 0; i < 14; i++) if (codec->extcaps & (1 << i)) - printf("%s%s", j++? ", " : "", ac97extfeature[i]); - printf("\n"); + kprintf("%s%s", j++? ", " : "", ac97extfeature[i]); + kprintf("\n"); } } diff --git a/sys/dev/sound/pcm/buffer.c b/sys/dev/sound/pcm/buffer.c index 0fe144795b..89a80f4fdb 100644 --- a/sys/dev/sound/pcm/buffer.c +++ b/sys/dev/sound/pcm/buffer.c @@ -24,14 +24,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/buffer.c,v 1.1.2.4 2002/04/22 15:49:35 cg Exp $ - * $DragonFly: src/sys/dev/sound/pcm/buffer.c,v 1.6 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/buffer.c,v 1.7 2006/12/22 23:26:25 swildner Exp $ */ #include #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/buffer.c,v 1.6 2006/12/20 18:14:41 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/buffer.c,v 1.7 2006/12/22 23:26:25 swildner Exp $"); #define SNDBUF_NAMELEN 48 struct snd_dbuf { @@ -81,7 +81,7 @@ sndbuf_setmap(void *arg, bus_dma_segment_t *segs, int nseg, int error) if (bootverbose) { device_printf(b->dev, "sndbuf_setmap %lx, %lx; ", (unsigned long)segs->ds_addr, (unsigned long)segs->ds_len); - printf("%p -> %lx\n", b->buf, (unsigned long)vtophys(b->buf)); + kprintf("%p -> %lx\n", b->buf, (unsigned long)vtophys(b->buf)); } } @@ -550,18 +550,18 @@ sndbuf_feed(struct snd_dbuf *from, struct snd_dbuf *to, struct pcm_channel *chan void sndbuf_dump(struct snd_dbuf *b, char *s, u_int32_t what) { - printf("%s: [", s); + kprintf("%s: [", s); if (what & 0x01) - printf(" bufsize: %d, maxsize: %d", b->bufsize, b->maxsize); + kprintf(" bufsize: %d, maxsize: %d", b->bufsize, b->maxsize); if (what & 0x02) - printf(" dl: %d, rp: %d, rl: %d, hp: %d", b->dl, b->rp, b->rl, b->hp); + kprintf(" dl: %d, rp: %d, rl: %d, hp: %d", b->dl, b->rp, b->rl, b->hp); if (what & 0x04) - printf(" total: %d, prev_total: %d, xrun: %d", b->total, b->prev_total, b->xrun); + kprintf(" total: %d, prev_total: %d, xrun: %d", b->total, b->prev_total, b->xrun); if (what & 0x08) - printf(" fmt: 0x%x, spd: %d", b->fmt, b->spd); + kprintf(" fmt: 0x%x, spd: %d", b->fmt, b->spd); if (what & 0x10) - printf(" blksz: %d, blkcnt: %d, flags: 0x%x", b->blksz, b->blkcnt, b->flags); - printf(" ]\n"); + kprintf(" blksz: %d, blkcnt: %d, flags: 0x%x", b->blksz, b->blkcnt, b->flags); + kprintf(" ]\n"); } /************************************************************/ @@ -623,7 +623,7 @@ sndbuf_isadma(struct snd_dbuf *b, int go) break; } - DEB(printf("buf 0x%p ISA DMA %s, channel %d\n", + DEB(kprintf("buf 0x%p ISA DMA %s, channel %d\n", b, (go == PCMTRIG_START)? "started" : "stopped", b->isadmachan)); diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c index dcf6cf5aa9..adffc0291e 100644 --- a/sys/dev/sound/pcm/channel.c +++ b/sys/dev/sound/pcm/channel.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/channel.c,v 1.19.2.19 2003/03/11 15:15:41 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/channel.c,v 1.9 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/channel.c,v 1.10 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -33,7 +33,7 @@ #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/channel.c,v 1.9 2006/07/28 02:17:38 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/channel.c,v 1.10 2006/12/22 23:26:25 swildner Exp $"); #define MIN_CHUNK_SIZE 256 /* for uiomove etc. */ #define DMA_ALIGN_THRESHOLD 4 @@ -194,7 +194,7 @@ chn_wrupdate(struct pcm_channel *c) /* tell the driver we've updated the primary buffer */ chn_trigger(c, PCMTRIG_EMLDMAWR); DEB(if (ret) - printf("chn_wrupdate: chn_wrfeed returned %d\n", ret);) + kprintf("chn_wrupdate: chn_wrfeed returned %d\n", ret);) } @@ -239,7 +239,7 @@ chn_wrintr(struct pcm_channel *c) /* tell the driver we've updated the primary buffer */ chn_trigger(c, PCMTRIG_EMLDMAWR); DEB(if (ret) - printf("chn_wrintr: chn_wrfeed returned %d\n", ret);) + kprintf("chn_wrintr: chn_wrfeed returned %d\n", ret);) } /* @@ -296,17 +296,17 @@ chn_write(struct pcm_channel *c, struct uio *buf, int ioflags) } else { sz = MIN(sz, buf->uio_resid); KASSERT(sz > 0, ("confusion in chn_write")); - /* printf("sz: %d\n", sz); */ + /* kprintf("sz: %d\n", sz); */ ret = sndbuf_uiomove(bs, buf, sz); if (ret == 0 && !(c->flags & CHN_F_TRIGGERED)) chn_start(c, 0); } } - /* printf("ret: %d left: %d\n", ret, buf->uio_resid); */ + /* kprintf("ret: %d left: %d\n", ret, buf->uio_resid); */ if (count <= 0) { c->flags |= CHN_F_DEAD; - printf("%s: play interrupt timeout, channel dead\n", c->name); + kprintf("%s: play interrupt timeout, channel dead\n", c->name); } return ret; @@ -370,7 +370,7 @@ chn_rdupdate(struct pcm_channel *c) chn_dmaupdate(c); ret = chn_rdfeed(c); if (ret) - printf("chn_rdfeed: %d\n", ret); + kprintf("chn_rdfeed: %d\n", ret); } @@ -436,7 +436,7 @@ chn_read(struct pcm_channel *c, struct uio *buf, int ioflags) if (count <= 0) { c->flags |= CHN_F_DEAD; - printf("%s: record interrupt timeout, channel dead\n", c->name); + kprintf("%s: record interrupt timeout, channel dead\n", c->name); } return ret; @@ -521,7 +521,7 @@ chn_sync(struct pcm_channel *c, int threshold) if (rdy <= threshold) { ret = chn_sleep(c, "pcmsyn", 1); if (ret == ERESTART || ret == EINTR) { - DEB(printf("chn_sync: tsleep returns %d\n", ret)); + DEB(kprintf("chn_sync: tsleep returns %d\n", ret)); return -1; } } else @@ -595,7 +595,7 @@ chn_flush(struct pcm_channel *c) CHN_LOCKASSERT(c); KASSERT(c->direction == PCMDIR_PLAY, ("chn_wrupdate on bad channel")); - DEB(printf("chn_flush c->flags 0x%08x\n", c->flags)); + DEB(kprintf("chn_flush c->flags 0x%08x\n", c->flags)); if (!(c->flags & CHN_F_TRIGGERED)) return 0; @@ -617,7 +617,7 @@ chn_flush(struct pcm_channel *c) } } if (count == 0) - DEB(printf("chn_flush: timeout\n")); + DEB(kprintf("chn_flush: timeout\n")); c->flags &= ~CHN_F_TRIGGERED; /* kill the channel */ @@ -802,8 +802,8 @@ chn_tryspeed(struct pcm_channel *c, int speed) int r, delta; CHN_LOCKASSERT(c); - DEB(printf("setspeed, channel %s\n", c->name)); - DEB(printf("want speed %d, ", speed)); + DEB(kprintf("setspeed, channel %s\n", c->name)); + DEB(kprintf("want speed %d, ", speed)); if (speed <= 0) return EINVAL; if (CANCHANGE(c)) { @@ -811,9 +811,9 @@ chn_tryspeed(struct pcm_channel *c, int speed) c->speed = speed; sndbuf_setspd(bs, speed); RANGE(speed, chn_getcaps(c)->minspeed, chn_getcaps(c)->maxspeed); - DEB(printf("try speed %d, ", speed)); + DEB(kprintf("try speed %d, ", speed)); sndbuf_setspd(b, CHANNEL_SETSPEED(c->methods, c->devinfo, speed)); - DEB(printf("got speed %d\n", sndbuf_getspd(b))); + DEB(kprintf("got speed %d\n", sndbuf_getspd(b))); delta = sndbuf_getspd(b) - sndbuf_getspd(bs); if (delta < 0) @@ -826,7 +826,7 @@ chn_tryspeed(struct pcm_channel *c, int speed) sndbuf_setspd(bs, sndbuf_getspd(b)); r = chn_buildfeeder(c); - DEB(printf("r = %d\n", r)); + DEB(kprintf("r = %d\n", r)); if (r) goto out; @@ -839,21 +839,21 @@ chn_tryspeed(struct pcm_channel *c, int speed) r = EINVAL; f = chn_findfeeder(c, FEEDER_RATE); - DEB(printf("feedrate = %p\n", f)); + DEB(kprintf("feedrate = %p\n", f)); if (f == NULL) goto out; x = (c->direction == PCMDIR_REC)? b : bs; r = FEEDER_SET(f, FEEDRATE_SRC, sndbuf_getspd(x)); - DEB(printf("feeder_set(FEEDRATE_SRC, %d) = %d\n", sndbuf_getspd(x), r)); + DEB(kprintf("feeder_set(FEEDRATE_SRC, %d) = %d\n", sndbuf_getspd(x), r)); if (r) goto out; x = (c->direction == PCMDIR_REC)? bs : b; r = FEEDER_SET(f, FEEDRATE_DST, sndbuf_getspd(x)); - DEB(printf("feeder_set(FEEDRATE_DST, %d) = %d\n", sndbuf_getspd(x), r)); + DEB(kprintf("feeder_set(FEEDRATE_DST, %d) = %d\n", sndbuf_getspd(x), r)); out: - DEB(printf("setspeed done, r = %d\n", r)); + DEB(kprintf("setspeed done, r = %d\n", r)); return r; } else return EINVAL; @@ -866,7 +866,7 @@ chn_setspeed(struct pcm_channel *c, int speed) r = chn_tryspeed(c, speed); if (r) { - DEB(printf("Failed to set speed %d falling back to %d\n", speed, oldspeed)); + DEB(kprintf("Failed to set speed %d falling back to %d\n", speed, oldspeed)); r = chn_tryspeed(c, oldspeed); } return r; @@ -881,7 +881,7 @@ chn_tryformat(struct pcm_channel *c, u_int32_t fmt) CHN_LOCKASSERT(c); if (CANCHANGE(c)) { - DEB(printf("want format %d\n", fmt)); + DEB(kprintf("want format %d\n", fmt)); c->format = fmt; r = chn_buildfeeder(c); if (r == 0) { @@ -904,7 +904,7 @@ chn_setformat(struct pcm_channel *c, u_int32_t fmt) r = chn_tryformat(c, fmt); if (r) { - DEB(printf("Format change %d failed, reverting to %d\n", fmt, oldfmt)); + DEB(kprintf("Format change %d failed, reverting to %d\n", fmt, oldfmt)); chn_tryformat(c, oldfmt); } return r; @@ -922,7 +922,7 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) return EINVAL; ret = 0; - DEB(printf("%s(%d, %d)\n", __func__, blkcnt, blksz)); + DEB(kprintf("%s(%d, %d)\n", __func__, blkcnt, blksz)); if (blksz == 0 || blksz == -1) { if (blksz == -1) c->flags &= ~CHN_F_HAS_SIZE; @@ -937,11 +937,11 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) RANGE(blksz, 16, CHN_2NDBUFMAXSIZE / 2); RANGE(blkcnt, 2, CHN_2NDBUFMAXSIZE / blksz); - DEB(printf("%s: defaulting to (%d, %d)\n", __func__, blkcnt, blksz)); + DEB(kprintf("%s: defaulting to (%d, %d)\n", __func__, blkcnt, blksz)); } else { blkcnt = sndbuf_getblkcnt(bs); blksz = sndbuf_getblksz(bs); - DEB(printf("%s: updating (%d, %d)\n", __func__, blkcnt, blksz)); + DEB(kprintf("%s: updating (%d, %d)\n", __func__, blkcnt, blksz)); } } else { ret = EINVAL; @@ -960,7 +960,7 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) /* adjust for different hw format/speed */ irqhz = (sndbuf_getbps(bs) * sndbuf_getspd(bs)) / sndbuf_getblksz(bs); - DEB(printf("%s: soft bps %d, spd %d, irqhz == %d\n", __func__, sndbuf_getbps(bs), sndbuf_getspd(bs), irqhz)); + DEB(kprintf("%s: soft bps %d, spd %d, irqhz == %d\n", __func__, sndbuf_getbps(bs), sndbuf_getspd(bs), irqhz)); RANGE(irqhz, 16, 512); sndbuf_setblksz(b, (sndbuf_getbps(b) * sndbuf_getspd(b)) / irqhz); @@ -973,12 +973,12 @@ chn_setblocksize(struct pcm_channel *c, int blkcnt, int blksz) /* round down to fit hw buffer size */ RANGE(blksz, 16, sndbuf_getmaxsize(b) / 2); - DEB(printf("%s: hard blksz requested %d (maxsize %d), ", __func__, blksz, sndbuf_getmaxsize(b))); + DEB(kprintf("%s: hard blksz requested %d (maxsize %d), ", __func__, blksz, sndbuf_getmaxsize(b))); sndbuf_setblksz(b, CHANNEL_SETBLOCKSIZE(c->methods, c->devinfo, blksz)); irqhz = (sndbuf_getbps(b) * sndbuf_getspd(b)) / sndbuf_getblksz(b); - DEB(printf("got %d, irqhz == %d\n", sndbuf_getblksz(b), irqhz)); + DEB(kprintf("got %d, irqhz == %d\n", sndbuf_getblksz(b), irqhz)); chn_resetbuf(c); out: @@ -1061,7 +1061,7 @@ chn_buildfeeder(struct pcm_channel *c) err = chn_addfeeder(c, fc, NULL); if (err) { - DEB(printf("can't add root feeder, err %d\n", err)); + DEB(kprintf("can't add root feeder, err %d\n", err)); return err; } @@ -1073,21 +1073,21 @@ chn_buildfeeder(struct pcm_channel *c) desc.flags = 0; fc = feeder_getclass(&desc); if (fc == NULL) { - DEB(printf("can't find vchan feeder\n")); + DEB(kprintf("can't find vchan feeder\n")); return EOPNOTSUPP; } err = chn_addfeeder(c, fc, &desc); if (err) { - DEB(printf("can't add vchan feeder, err %d\n", err)); + DEB(kprintf("can't add vchan feeder, err %d\n", err)); return err; } } flags = c->feederflags; - DEB(printf("not mapped, feederflags %x\n", flags)); + DEB(kprintf("not mapped, feederflags %x\n", flags)); for (type = FEEDER_RATE; type <= FEEDER_LAST; type++) { if (flags & (1 << type)) { @@ -1095,34 +1095,34 @@ chn_buildfeeder(struct pcm_channel *c) desc.in = 0; desc.out = 0; desc.flags = 0; - DEB(printf("find feeder type %d, ", type)); + DEB(kprintf("find feeder type %d, ", type)); fc = feeder_getclass(&desc); - DEB(printf("got %p\n", fc)); + DEB(kprintf("got %p\n", fc)); if (fc == NULL) { - DEB(printf("can't find required feeder type %d\n", type)); + DEB(kprintf("can't find required feeder type %d\n", type)); return EOPNOTSUPP; } if (c->feeder->desc->out != fc->desc->in) { - DEB(printf("build fmtchain from %x to %x: ", c->feeder->desc->out, fc->desc->in)); + DEB(kprintf("build fmtchain from %x to %x: ", c->feeder->desc->out, fc->desc->in)); tmp[0] = fc->desc->in; tmp[1] = 0; if (chn_fmtchain(c, tmp) == 0) { - DEB(printf("failed\n")); + DEB(kprintf("failed\n")); return ENODEV; } - DEB(printf("ok\n")); + DEB(kprintf("ok\n")); } err = chn_addfeeder(c, fc, fc->desc); if (err) { - DEB(printf("can't add feeder %p, output %x, err %d\n", fc, fc->desc->out, err)); + DEB(kprintf("can't add feeder %p, output %x, err %d\n", fc, fc->desc->out, err)); return err; } - DEB(printf("added feeder %p, output %x\n", fc, c->feeder->desc->out)); + DEB(kprintf("added feeder %p, output %x\n", fc, c->feeder->desc->out)); } } diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 7c12606ec4..f2feadf208 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.15.2.13 2002/08/30 13:53:03 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.12 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.13 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -32,7 +32,7 @@ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.12 2006/09/10 01:26:37 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.13 2006/12/22 23:26:25 swildner Exp $"); #define OLDPCM_IOCTL @@ -592,13 +592,13 @@ dsp_ioctl(struct dev_ioctl_args *ap) else if (*arg_i == AIOSYNC_CAPTURE && rdch) *arg_i = chn_abort(rdch); else { - printf("AIOSTOP: bad channel 0x%x\n", *arg_i); + kprintf("AIOSTOP: bad channel 0x%x\n", *arg_i); *arg_i = 0; } break; case AIOSYNC: - printf("AIOSYNC chan 0x%03lx pos %lu unimplemented\n", + kprintf("AIOSYNC chan 0x%03lx pos %lu unimplemented\n", ((snd_sync_parm *)arg)->chan, ((snd_sync_parm *)arg)->pos); break; #endif @@ -612,7 +612,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) break; case FIOASYNC: /*set/clear async i/o */ - DEB( printf("FIOASYNC\n") ; ) + DEB( kprintf("FIOASYNC\n") ; ) break; case SNDCTL_DSP_NONBLOCK: @@ -661,7 +661,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) break; case SNDCTL_DSP_RESET: - DEB(printf("dsp reset\n")); + DEB(kprintf("dsp reset\n")); if (wrch) chn_abort(wrch); if (rdch) @@ -669,7 +669,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) break; case SNDCTL_DSP_SYNC: - DEB(printf("dsp sync\n")); + DEB(kprintf("dsp sync\n")); /* chn_sync may sleep */ if (wrch) { CHN_LOCK(wrch); @@ -776,7 +776,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) case SNDCTL_DSP_SETFRAGMENT: /* XXX locking */ - DEB(printf("SNDCTL_DSP_SETFRAGMENT 0x%08x\n", *(int *)arg)); + DEB(kprintf("SNDCTL_DSP_SETFRAGMENT 0x%08x\n", *(int *)arg)); { u_int32_t fragln = (*arg_i) & 0x0000ffff; u_int32_t maxfrags = ((*arg_i) & 0xffff0000) >> 16; @@ -794,7 +794,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) if (maxfrags * fragsz > CHN_2NDBUFMAXSIZE) maxfrags = CHN_2NDBUFMAXSIZE / fragsz; - DEB(printf("SNDCTL_DSP_SETFRAGMENT %d frags, %d sz\n", maxfrags, fragsz)); + DEB(kprintf("SNDCTL_DSP_SETFRAGMENT %d frags, %d sz\n", maxfrags, fragsz)); if (rdch) { CHN_LOCK(rdch); ret = chn_setblocksize(rdch, maxfrags, fragsz); @@ -961,7 +961,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) case SOUND_PCM_READ_FILTER: /* dunno what these do, don't sound important */ default: - DEB(printf("default ioctl fn 0x%08lx fail\n", cmd)); + DEB(kprintf("default ioctl fn 0x%08lx fail\n", cmd)); ret = EINVAL; break; } diff --git a/sys/dev/sound/pcm/feeder.c b/sys/dev/sound/pcm/feeder.c index 8ea8424552..990fb2d8b8 100644 --- a/sys/dev/sound/pcm/feeder.c +++ b/sys/dev/sound/pcm/feeder.c @@ -24,14 +24,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/feeder.c,v 1.8.2.9 2003/02/08 01:43:07 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.4 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.5 2006/12/22 23:26:25 swildner Exp $ */ #include #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.4 2006/09/05 00:55:43 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/feeder.c,v 1.5 2006/12/22 23:26:25 swildner Exp $"); MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); @@ -64,7 +64,7 @@ feeder_register(void *p) SLIST_INIT(&feedertab); fte = kmalloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); if (fte == NULL) { - printf("can't allocate memory for root feeder\n"); + kprintf("can't allocate memory for root feeder\n"); return; } fte->feederclass = fc; @@ -84,10 +84,10 @@ feeder_register(void *p) /* beyond this point failure is non-fatal but may result in some translations being unavailable */ i = 0; while ((feedercnt < MAXFEEDERS) && (fc->desc[i].type > 0)) { - /* printf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */ + /* kprintf("adding feeder %s, %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); */ fte = kmalloc(sizeof(*fte), M_FEEDER, M_WAITOK | M_ZERO); if (fte == NULL) { - printf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); + kprintf("can't allocate memory for feeder '%s', %x -> %x\n", fc->name, fc->desc[i].in, fc->desc[i].out); return; } @@ -100,7 +100,7 @@ feeder_register(void *p) } feedercnt++; if (feedercnt >= MAXFEEDERS) - printf("MAXFEEDERS (%d >= %d) exceeded\n", feedercnt, MAXFEEDERS); + kprintf("MAXFEEDERS (%d >= %d) exceeded\n", feedercnt, MAXFEEDERS); } static void @@ -161,7 +161,7 @@ feeder_create(struct feeder_class *fc, struct pcm_feederdesc *desc) err = FEEDER_INIT(f); if (err) { - printf("feeder_init(%p) on %s returned %d\n", f, fc->name, err); + kprintf("feeder_init(%p) on %s returned %d\n", f, fc->name, err); feeder_destroy(f); return NULL; @@ -264,9 +264,9 @@ feeder_fmtchain(u_int32_t *to, struct pcm_feeder *source, struct pcm_feeder *sto struct feedertab_entry *fte; struct pcm_feeder *try, *ret; - /* printf("trying %s (%x -> %x)...\n", source->class->name, source->desc->in, source->desc->out); */ + /* kprintf("trying %s (%x -> %x)...\n", source->class->name, source->desc->in, source->desc->out); */ if (fmtvalid(source->desc->out, to)) { - /* printf("got it\n"); */ + /* kprintf("got it\n"); */ return source; } @@ -289,7 +289,7 @@ feeder_fmtchain(u_int32_t *to, struct pcm_feeder *source, struct pcm_feeder *sto } } } - /* printf("giving up %s...\n", source->class->name); */ + /* kprintf("giving up %s...\n", source->class->name); */ return NULL; } @@ -350,13 +350,13 @@ chn_fmtchain(struct pcm_channel *c, u_int32_t *to) c->feeder = try; c->align = 0; #ifdef FEEDER_DEBUG - printf("\n\nchain: "); + kprintf("\n\nchain: "); #endif while (try && (try != stop)) { #ifdef FEEDER_DEBUG - printf("%s [%d]", try->class->name, try->desc->idx); + kprintf("%s [%d]", try->class->name, try->desc->idx); if (try->source) - printf(" -> "); + kprintf(" -> "); #endif if (try->source) try->source->parent = try; @@ -367,7 +367,7 @@ chn_fmtchain(struct pcm_channel *c, u_int32_t *to) try = try->source; } #ifdef FEEDER_DEBUG - printf("%s [%d]\n", try->class->name, try->desc->idx); + kprintf("%s [%d]\n", try->class->name, try->desc->idx); #endif return (c->direction == PCMDIR_REC)? best : c->feeder->desc->out; @@ -395,7 +395,7 @@ feed_root(struct pcm_feeder *feeder, struct pcm_channel *ch, u_int8_t *buffer, u /* if (l < count) - printf("appending %d bytes\n", count - l); + kprintf("appending %d bytes\n", count - l); */ x = (sndbuf_getfmt(src) & AFMT_SIGNED)? 0 : 0x80; diff --git a/sys/dev/sound/pcm/feeder_rate.c b/sys/dev/sound/pcm/feeder_rate.c index 68d1016527..6bb08e13c1 100644 --- a/sys/dev/sound/pcm/feeder_rate.c +++ b/sys/dev/sound/pcm/feeder_rate.c @@ -43,7 +43,7 @@ * testing revisions. * * $FreeBSD: src/sys/dev/sound/pcm/feeder_rate.c,v 1.2.2.3 2003/02/08 02:38:21 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/feeder_rate.c,v 1.3 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/feeder_rate.c,v 1.4 2006/12/22 23:26:25 swildner Exp $ */ #ifdef _KERNEL @@ -51,7 +51,7 @@ #include #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/feeder_rate.c,v 1.3 2006/09/05 00:55:43 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/feeder_rate.c,v 1.4 2006/12/22 23:26:25 swildner Exp $"); #endif /* _KERNEL */ @@ -62,7 +62,7 @@ MALLOC_DEFINE(M_RATEFEEDER, "ratefeed", "pcm rate feeder"); #endif /* RATE_ASSERT */ #ifndef RATE_TRACE -#define RATE_TRACE(x...) /* printf(x) */ +#define RATE_TRACE(x...) /* kprintf(x) */ #endif /*****************************************************************************/ diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 727757427d..dde8eb0fd5 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -24,14 +24,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/vchan.c,v 1.5.2.4 2003/02/11 15:54:16 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/vchan.c,v 1.3 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/vchan.c,v 1.4 2006/12/22 23:26:25 swildner Exp $ */ #include #include #include "feeder_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/vchan.c,v 1.3 2006/09/05 00:55:43 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/vchan.c,v 1.4 2006/12/22 23:26:25 swildner Exp $"); struct vchinfo { u_int32_t spd, fmt, blksz, bps, run; @@ -58,11 +58,11 @@ vchan_mix_s16(int16_t *to, int16_t *tmp, unsigned int count) x = to[i]; x += tmp[i]; if (x < -32768) { - /* printf("%d + %d = %d (u)\n", to[i], tmp[i], x); */ + /* kprintf("%d + %d = %d (u)\n", to[i], tmp[i], x); */ x = -32768; } if (x > 32767) { - /* printf("%d + %d = %d (o)\n", to[i], tmp[i], x); */ + /* kprintf("%d + %d = %d (o)\n", to[i], tmp[i], x); */ x = 32767; } to[i] = x & 0x0000ffff; @@ -275,10 +275,10 @@ vchan_create(struct pcm_channel *parent) if (first && !err) { err = chn_reset(parent, AFMT_STEREO | AFMT_S16_LE); if (err) - printf("chn_reset: %d\n", err); + kprintf("chn_reset: %d\n", err); err = chn_setspeed(parent, 44100); if (err) - printf("chn_setspeed: %d\n", err); + kprintf("chn_setspeed: %d\n", err); } return err; diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index b70acfdd40..217f9eedf8 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1,6 +1,6 @@ /* $NetBSD: uaudio.c,v 1.41 2001/01/23 14:04:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/sound/usb/uaudio.c,v 1.6.2.2 2002/11/06 21:18:17 joe Exp $: */ -/* $DragonFly: src/sys/dev/sound/usb/uaudio.c,v 1.9 2006/12/20 18:14:41 dillon Exp $: */ +/* $DragonFly: src/sys/dev/sound/usb/uaudio.c,v 1.10 2006/12/22 23:26:25 swildner Exp $: */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -426,21 +426,21 @@ USB_ATTACH(uaudio) USB_ATTACH_SETUP; #if !defined(__DragonFly__) - printf(": %s\n", devinfo); + kprintf(": %s\n", devinfo); #endif sc->sc_udev = uaa->device; cdesc = usbd_get_config_descriptor(sc->sc_udev); if (cdesc == NULL) { - printf("%s: failed to get configuration descriptor\n", + kprintf("%s: failed to get configuration descriptor\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } err = uaudio_identify(sc, cdesc); if (err) { - printf("%s: audio descriptors make no sense, error=%d\n", + kprintf("%s: audio descriptors make no sense, error=%d\n", USBDEVNAME(sc->sc_dev), err); USB_ATTACH_ERROR_RETURN; } @@ -467,13 +467,13 @@ USB_ATTACH(uaudio) for (j = 0; j < sc->sc_nalts; j++) { if (sc->sc_alts[j].ifaceh == NULL) { - printf("%s: alt %d missing AS interface(s)\n", + kprintf("%s: alt %d missing AS interface(s)\n", USBDEVNAME(sc->sc_dev), j); USB_ATTACH_ERROR_RETURN; } } - printf("%s: audio rev %d.%02x\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: audio rev %d.%02x\n", USBDEVNAME(sc->sc_dev), sc->sc_audio_rev >> 8, sc->sc_audio_rev & 0xff); sc->sc_chan.sc = sc; @@ -484,7 +484,7 @@ USB_ATTACH(uaudio) #ifndef USB_DEBUG if (bootverbose) #endif - printf("%s: %d mixer controls\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %d mixer controls\n", USBDEVNAME(sc->sc_dev), sc->sc_nctls); #if !defined(__DragonFly__) @@ -500,7 +500,7 @@ USB_ATTACH(uaudio) #elif defined(__DragonFly__) sc->sc_dying = 0; if (audio_attach_mi(sc->sc_dev)) { - printf("audio_attach_mi failed\n"); + kprintf("audio_attach_mi failed\n"); USB_ATTACH_ERROR_RETURN; } #endif @@ -662,7 +662,7 @@ uaudio_mixer_add_ctl(struct uaudio_softc *sc, struct mixerctl *mc) krealloc(sc->sc_ctls, len, M_USBDEV, M_NOWAIT); if(nmc == NULL){ - printf("uaudio_mixer_add_ctl: no memory\n"); + kprintf("uaudio_mixer_add_ctl: no memory\n"); return; } sc->sc_ctls = nmc; @@ -782,7 +782,7 @@ uaudio_get_cluster(int id, usb_descriptor_t **dps) } } bad: - printf("uaudio_get_cluster: bad data\n"); + kprintf("uaudio_get_cluster: bad data\n"); memset(&r, 0, sizeof r); return (r); @@ -902,7 +902,7 @@ uaudio_add_selector(struct uaudio_softc *sc, usb_descriptor_t *v, DPRINTFN(2,("uaudio_add_selector: bUnitId=%d bNrInPins=%d\n", d->bUnitId, d->bNrInPins)); #endif - printf("uaudio_add_selector: NOT IMPLEMENTED\n"); + kprintf("uaudio_add_selector: NOT IMPLEMENTED\n"); } void @@ -1155,7 +1155,7 @@ uaudio_add_processing(struct uaudio_softc *sc, usb_descriptor_t *v, case DYN_RANGE_COMP_PROCESS: default: #ifdef USB_DEBUG - printf("uaudio_add_processing: unit %d, type=%d not impl.\n", + kprintf("uaudio_add_processing: unit %d, type=%d not impl.\n", d->bUnitId, ptype); #endif break; @@ -1214,7 +1214,7 @@ uaudio_add_alt(struct uaudio_softc *sc, struct as_info *ai) krealloc(sc->sc_alts, len, M_USBDEV, M_NOWAIT); if (nai == NULL) { - printf("uaudio_add_alt: no memory\n"); + kprintf("uaudio_add_alt: no memory\n"); return; } @@ -1253,7 +1253,7 @@ uaudio_process_as(struct uaudio_softc *sc, char *buf, int *offsp, return (USBD_INVAL); if (asf1d->bFormatType != FORMAT_TYPE_I) { - printf("%s: ignored setting with type %d format\n", + kprintf("%s: ignored setting with type %d format\n", USBDEVNAME(sc->sc_dev), UGETW(asid->wFormatTag)); return (USBD_NORMAL_COMPLETION); } @@ -1281,7 +1281,7 @@ uaudio_process_as(struct uaudio_softc *sc, char *buf, int *offsp, /* We can't handle endpoints that need a sync pipe yet. */ if (dir == UE_DIR_IN ? type == UE_ISO_ADAPT : type == UE_ISO_ASYNC) { - printf("%s: ignored %sput endpoint of type %s\n", + kprintf("%s: ignored %sput endpoint of type %s\n", USBDEVNAME(sc->sc_dev), dir == UE_DIR_IN ? "in" : "out", dir == UE_DIR_IN ? "adaptive" : "async"); @@ -1301,7 +1301,7 @@ uaudio_process_as(struct uaudio_softc *sc, char *buf, int *offsp, prec = asf1d->bBitResolution; if (prec != 8 && prec != 16) { #ifdef USB_DEBUG - printf("%s: ignored setting with precision %d\n", + kprintf("%s: ignored setting with precision %d\n", USBDEVNAME(sc->sc_dev), prec); #endif return (USBD_NORMAL_COMPLETION); @@ -1324,7 +1324,7 @@ uaudio_process_as(struct uaudio_softc *sc, char *buf, int *offsp, sc->sc_altflags |= HAS_MULAW; break; default: - printf("%s: ignored setting with format %d\n", + kprintf("%s: ignored setting with format %d\n", USBDEVNAME(sc->sc_dev), format); return (USBD_NORMAL_COMPLETION); } @@ -1377,7 +1377,7 @@ uaudio_identify_as(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) break; default: #ifdef USB_DEBUG - printf("%s: ignored audio interface with %d " + kprintf("%s: ignored audio interface with %d " "endpoints\n", USBDEVNAME(sc->sc_dev), id->bNumEndpoints); #endif @@ -1391,7 +1391,7 @@ uaudio_identify_as(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) return (USBD_INVAL); DPRINTF(("uaudio_identify_as: %d alts available\n", sc->sc_nalts)); if (sc->sc_chan.terminal < 0) { - printf("%s: no useable endpoint found\n", + kprintf("%s: no useable endpoint found\n", USBDEVNAME(sc->sc_dev)); return (USBD_INVAL); } @@ -1458,7 +1458,7 @@ uaudio_identify_ac(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) if (ibuf + dp->bLength > ibufend) return (USBD_INVAL); if (dp->bDescriptorType != UDESC_CS_INTERFACE) { - printf("uaudio_identify: skip desc type=0x%02x\n", + kprintf("uaudio_identify: skip desc type=0x%02x\n", dp->bDescriptorType); continue; } @@ -1477,7 +1477,7 @@ uaudio_identify_ac(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) dp->bDescriptorSubtype)); switch (dp->bDescriptorSubtype) { case UDESCSUB_AC_HEADER: - printf("uaudio_identify: unexpected AC header\n"); + kprintf("uaudio_identify: unexpected AC header\n"); break; case UDESCSUB_AC_INPUT: uaudio_add_input(sc, dp, dps); @@ -1501,7 +1501,7 @@ uaudio_identify_ac(struct uaudio_softc *sc, usb_config_descriptor_t *cdesc) uaudio_add_extension(sc, dp, dps); break; default: - printf("uaudio_identify: bad AC desc subtype=0x%02x\n", + kprintf("uaudio_identify: bad AC desc subtype=0x%02x\n", dp->bDescriptorSubtype); break; } @@ -1691,7 +1691,7 @@ uaudio_round_blocksize(void *addr, int blk) #ifdef DIAGNOSTIC if (blk <= 0) { - printf("uaudio_round_blocksize: blk=%d\n", blk); + kprintf("uaudio_round_blocksize: blk=%d\n", blk); blk = 512; } #endif @@ -2195,7 +2195,7 @@ uaudio_chan_pintr(usbd_xfer_handle xfer, usbd_private_handle priv, count, ch->transferred)); #ifdef DIAGNOSTIC if (count != cb->size) { - printf("uaudio_chan_pintr: count(%d) != size(%d)\n", + kprintf("uaudio_chan_pintr: count(%d) != size(%d)\n", count, cb->size); } #endif @@ -2286,7 +2286,7 @@ uaudio_chan_rintr(usbd_xfer_handle xfer, usbd_private_handle priv, #ifdef DIAGNOSTIC if (count != cb->size) { - printf("uaudio_chan_rintr: count(%d) != size(%d)\n", + kprintf("uaudio_chan_rintr: count(%d) != size(%d)\n", count, cb->size); } #endif @@ -2567,7 +2567,7 @@ uaudio_init_params(struct uaudio_softc *sc, struct chan *ch) default: enc = 0; ch->precision = 16; - printf("Unknown format %x\n", ch->format); + kprintf("Unknown format %x\n", ch->format); } if (ch->format & AFMT_STEREO) { diff --git a/sys/dev/usbmisc/ubsa/ubsa.c b/sys/dev/usbmisc/ubsa/ubsa.c index 8fc73dc0c5..9eee37d54b 100644 --- a/sys/dev/usbmisc/ubsa/ubsa.c +++ b/sys/dev/usbmisc/ubsa/ubsa.c @@ -60,7 +60,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/ubsa.c,v 1.11 2003/11/16 12:13:39 akiyama Exp $ - * $DragonFly: src/sys/dev/usbmisc/ubsa/ubsa.c,v 1.8 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ubsa/ubsa.c,v 1.9 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -310,7 +310,7 @@ USB_ATTACH(ubsa) ucom->sc_iface = uaa->iface; devname = USBDEVNAME(ucom->sc_dev); - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); DPRINTF(("ubsa attach: sc = %p\n", sc)); @@ -322,7 +322,7 @@ USB_ATTACH(ubsa) /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1); if (err) { - printf("%s: failed to set configuration: %s\n", + kprintf("%s: failed to set configuration: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -332,7 +332,7 @@ USB_ATTACH(ubsa) cdesc = usbd_get_config_descriptor(ucom->sc_udev); if (cdesc == NULL) { - printf("%s: failed to get configuration descriptor\n", + kprintf("%s: failed to get configuration descriptor\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; @@ -342,7 +342,7 @@ USB_ATTACH(ubsa) err = usbd_device2interface_handle(dev, UBSA_IFACE_INDEX, &ucom->sc_iface); if (err) { - printf("%s: failed to get interface: %s\n", + kprintf("%s: failed to get interface: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -356,7 +356,7 @@ USB_ATTACH(ubsa) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(ucom->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", + kprintf("%s: no endpoint descriptor for %d\n", USBDEVNAME(ucom->sc_dev), i); ucom->sc_dying = 1; goto error; @@ -378,7 +378,7 @@ USB_ATTACH(ubsa) } if (sc->sc_intr_number == -1) { - printf("%s: Could not find interrupt in\n", + kprintf("%s: Could not find interrupt in\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; @@ -388,14 +388,14 @@ USB_ATTACH(ubsa) sc->sc_intr_iface = ucom->sc_iface; if (ucom->sc_bulkin_no == -1) { - printf("%s: Could not find data bulk in\n", + kprintf("%s: Could not find data bulk in\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; } if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", + kprintf("%s: Could not find data bulk out\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; @@ -466,7 +466,7 @@ ubsa_request(struct ubsa_softc *sc, u_int8_t request, u_int16_t value) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, 0); if (err) - printf("%s: ubsa_request: %s\n", + kprintf("%s: ubsa_request: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -551,7 +551,7 @@ ubsa_baudrate(struct ubsa_softc *sc, speed_t speed) value = B230400 / speed; break; default: - printf("%s: ubsa_param: unsupported baudrate, " + kprintf("%s: ubsa_param: unsupported baudrate, " "forcing default of 9600\n", USBDEVNAME(sc->sc_ucom.sc_dev)); value = B230400 / B9600; @@ -594,7 +594,7 @@ ubsa_databits(struct ubsa_softc *sc, tcflag_t cflag) case CS7: value = 2; break; case CS8: value = 3; break; default: - printf("%s: ubsa_param: unsupported databits requested, " + kprintf("%s: ubsa_param: unsupported databits requested, " "forcing default of 8\n", USBDEVNAME(sc->sc_ucom.sc_dev)); value = 3; @@ -673,7 +673,7 @@ ubsa_open(void *addr, int portno) ubsa_intr, UBSA_INTR_INTERVAL); if (err) { - printf("%s: cannot open interrupt pipe (addr %d)\n", + kprintf("%s: cannot open interrupt pipe (addr %d)\n", USBDEVNAME(sc->sc_ucom.sc_dev), sc->sc_intr_number); return (EIO); @@ -698,12 +698,12 @@ ubsa_close(void *addr, int portno) if (sc->sc_intr_pipe != NULL) { err = usbd_abort_pipe(sc->sc_intr_pipe); if (err) - printf("%s: abort interrupt pipe failed: %s\n", + kprintf("%s: abort interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); err = usbd_close_pipe(sc->sc_intr_pipe); if (err) - printf("%s: close interrupt pipe failed: %s\n", + kprintf("%s: close interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); kfree(sc->sc_intr_buf, M_USBDEV); diff --git a/sys/dev/usbmisc/ucom/ucom.c b/sys/dev/usbmisc/ucom/ucom.c index 5352aa0fed..7b60cef2f7 100644 --- a/sys/dev/usbmisc/ucom/ucom.c +++ b/sys/dev/usbmisc/ucom/ucom.c @@ -2,7 +2,7 @@ * $NetBSD: ucom.c,v 1.39 2001/08/16 22:31:24 augustss Exp $ * $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ * $FreeBSD: src/sys/dev/usb/ucom.c,v 1.35 2003/11/16 11:58:21 akiyama Exp $ - * $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.21 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.22 2006/12/22 23:26:25 swildner Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -338,7 +338,7 @@ ucomopen(struct dev_open_args *ap) err = usbd_open_pipe(sc->sc_iface, sc->sc_bulkin_no, 0, &sc->sc_bulkin_pipe); if (err) { - printf("%s: open bulk in error (addr %d): %s\n", + kprintf("%s: open bulk in error (addr %d): %s\n", USBDEVNAME(sc->sc_dev), sc->sc_bulkin_no, usbd_errstr(err)); error = EIO; @@ -348,7 +348,7 @@ ucomopen(struct dev_open_args *ap) err = usbd_open_pipe(sc->sc_iface, sc->sc_bulkout_no, USBD_EXCLUSIVE_USE, &sc->sc_bulkout_pipe); if (err) { - printf("%s: open bulk out error (addr %d): %s\n", + kprintf("%s: open bulk out error (addr %d): %s\n", USBDEVNAME(sc->sc_dev), sc->sc_bulkout_no, usbd_errstr(err)); error = EIO; @@ -923,7 +923,7 @@ ucomstart(struct tty *tp) /* What can we do on error? */ err = usbd_transfer(sc->sc_oxfer); if (err != USBD_IN_PROGRESS) - printf("ucomstart: err=%s\n", usbd_errstr(err)); + kprintf("ucomstart: err=%s\n", usbd_errstr(err)); ttwwakeup(tp); @@ -977,7 +977,7 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) goto error; if (status != USBD_NORMAL_COMPLETION) { - printf("%s: ucomwritecb: %s\n", + kprintf("%s: ucomwritecb: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); @@ -993,7 +993,7 @@ ucomwritecb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) usbd_get_xfer_status(xfer, NULL, NULL, &cc, NULL); DPRINTF(("ucomwritecb: cc = %d\n", cc)); if (cc <= sc->sc_opkthdrlen) { - printf("%s: sent size too small, cc = %d\n", + kprintf("%s: sent size too small, cc = %d\n", USBDEVNAME(sc->sc_dev), cc); goto error; } @@ -1061,7 +1061,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) if (status != USBD_NORMAL_COMPLETION) { if (!(sc->sc_state & UCS_RXSTOP)) - printf("%s: ucomreadcb: %s\n", + kprintf("%s: ucomreadcb: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(status)); if (status == USBD_STALLED) usbd_clear_endpoint_stall_async(sc->sc_bulkin_pipe); @@ -1080,7 +1080,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) } if (cc > sc->sc_ibufsize) { - printf("%s: invalid receive data size, %d chars\n", + kprintf("%s: invalid receive data size, %d chars\n", USBDEVNAME(sc->sc_dev), cc); goto resubmit; } @@ -1115,7 +1115,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) ucomstart(tp); } if (lostcc > 0) - printf("%s: lost %d chars\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: lost %d chars\n", USBDEVNAME(sc->sc_dev), lostcc); } else { /* Give characters to tty layer. */ @@ -1123,7 +1123,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) DPRINTFN(7, ("ucomreadcb: char = 0x%02x\n", *cp)); if ((*rint)(*cp, tp) == -1) { /* XXX what should we do? */ - printf("%s: lost %d chars\n", + kprintf("%s: lost %d chars\n", USBDEVNAME(sc->sc_dev), cc); break; } @@ -1136,7 +1136,7 @@ ucomreadcb(usbd_xfer_handle xfer, usbd_private_handle p, usbd_status status) resubmit: err = ucomstartread(sc); if (err) { - printf("%s: read start failed\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: read start failed\n", USBDEVNAME(sc->sc_dev)); /* XXX what should we dow now? */ } diff --git a/sys/dev/usbmisc/udbp/udbp.c b/sys/dev/usbmisc/udbp/udbp.c index 34f4078352..ff13bfedf5 100644 --- a/sys/dev/usbmisc/udbp/udbp.c +++ b/sys/dev/usbmisc/udbp/udbp.c @@ -27,7 +27,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/udbp.c,v 1.24 2003/08/24 17:55:55 obrien Exp $ - * $DragonFly: src/sys/dev/usbmisc/udbp/Attic/udbp.c,v 1.9 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/udbp/Attic/udbp.c,v 1.10 2006/12/22 23:26:25 swildner Exp $ */ /* Driver for arbitrary double bulk pipe devices. @@ -271,14 +271,14 @@ USB_ATTACH(udbp) id = usbd_get_interface_descriptor(iface); usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), devinfo, id->bInterfaceClass, id->bInterfaceSubClass); /* Find the two first bulk endpoints */ for (i = 0 ; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(iface, i); if (!ed) { - printf("%s: could not read endpoint descriptor\n", + kprintf("%s: could not read endpoint descriptor\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -297,14 +297,14 @@ USB_ATTACH(udbp) /* Verify that we goething sensible */ if (ed_bulkin == NULL || ed_bulkout == NULL) { - printf("%s: bulk-in and/or bulk-out endpoint not found\n", + kprintf("%s: bulk-in and/or bulk-out endpoint not found\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } if (ed_bulkin->wMaxPacketSize[0] != ed_bulkout->wMaxPacketSize[0] || ed_bulkin->wMaxPacketSize[1] != ed_bulkout->wMaxPacketSize[1]) { - printf("%s: bulk-in and bulk-out have different packet sizes %d %d %d %d\n", + kprintf("%s: bulk-in and bulk-out have different packet sizes %d %d %d %d\n", USBDEVNAME(sc->sc_dev), ed_bulkin->wMaxPacketSize[0], ed_bulkout->wMaxPacketSize[0], @@ -344,14 +344,14 @@ USB_ATTACH(udbp) err = usbd_open_pipe(iface, sc->sc_bulkin, USBD_EXCLUSIVE_USE, &sc->sc_bulkin_pipe); if (err) { - printf("%s: cannot open bulk-in pipe (addr %d)\n", + kprintf("%s: cannot open bulk-in pipe (addr %d)\n", USBDEVNAME(sc->sc_dev), sc->sc_bulkin); goto bad; } err = usbd_open_pipe(iface, sc->sc_bulkout, USBD_EXCLUSIVE_USE, &sc->sc_bulkout_pipe); if (err) { - printf("%s: cannot open bulk-out pipe (addr %d)\n", + kprintf("%s: cannot open bulk-out pipe (addr %d)\n", USBDEVNAME(sc->sc_dev), sc->sc_bulkout); goto bad; } @@ -359,7 +359,7 @@ USB_ATTACH(udbp) if (!ngudbp_done_init){ ngudbp_done_init=1; if (ng_newtype(&ng_udbp_typestruct)) { - printf("ngudbp install failed\n"); + kprintf("ngudbp install failed\n"); goto bad; } } @@ -553,7 +553,7 @@ udbp_setup_out_transfer(udbp_p sc) pktlen = m->m_pkthdr.len; if (pktlen > sc->sc_bulkout_bufferlen) { - printf("%s: Packet too large, %d > %d\n", + kprintf("%s: Packet too large, %d > %d\n", USBDEVNAME(sc->sc_dev), pktlen, sc->sc_bulkout_bufferlen); return (USBD_IOERROR); diff --git a/sys/dev/usbmisc/ufm/ufm.c b/sys/dev/usbmisc/ufm/ufm.c index 1e74ec6609..f627ceb681 100644 --- a/sys/dev/usbmisc/ufm/ufm.c +++ b/sys/dev/usbmisc/ufm/ufm.c @@ -30,7 +30,7 @@ /* * $FreeBSD: src/sys/dev/usb/ufm.c,v 1.16 2003/10/04 21:41:01 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/ufm/ufm.c,v 1.11 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ufm/ufm.c,v 1.12 2006/12/22 23:26:25 swildner Exp $ */ #include @@ -160,7 +160,7 @@ USB_ATTACH(ufm) DPRINTFN(10,("ufm_attach: sc=%p\n", sc)); usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); + kprintf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); sc->sc_udev = udev = uaa->device; @@ -219,7 +219,7 @@ USB_ATTACH(ufm) USB_ATTACH_SUCCESS_RETURN; nobulk: - printf("%s: could not find %s\n", USBDEVNAME(sc->sc_dev),ermsg); + kprintf("%s: could not find %s\n", USBDEVNAME(sc->sc_dev),ermsg); USB_ATTACH_ERROR_RETURN; } @@ -279,7 +279,7 @@ ufm_do_req(struct ufm_softc *sc, u_int8_t reqtype, u_int8_t request, USBD_DEFAULT_TIMEOUT); crit_exit(); if (err) { - printf("usbd_do_request_flags returned %#x\n", err); + kprintf("usbd_do_request_flags returned %#x\n", err); return (EIO); } return (0); diff --git a/sys/dev/usbmisc/uftdi/uftdi.c b/sys/dev/usbmisc/uftdi/uftdi.c index 3f1a3653c1..368fc65b04 100644 --- a/sys/dev/usbmisc/uftdi/uftdi.c +++ b/sys/dev/usbmisc/uftdi/uftdi.c @@ -1,7 +1,7 @@ /* * $NetBSD: uftdi.c,v 1.13 2002/09/23 05:51:23 simonb Exp $ * $FreeBSD: src/sys/dev/usb/uftdi.c,v 1.10 2003/08/24 17:55:55 obrien Exp $ - * $DragonFly: src/sys/dev/usbmisc/uftdi/uftdi.c,v 1.8 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uftdi/uftdi.c,v 1.9 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -182,21 +182,21 @@ USB_ATTACH(uftdi) /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UFTDI_CONFIG_INDEX, 1); if (err) { - printf("\n%s: failed to set configuration, err=%s\n", + kprintf("\n%s: failed to set configuration, err=%s\n", devname, usbd_errstr(err)); goto bad; } err = usbd_device2interface_handle(dev, UFTDI_IFACE_INDEX, &iface); if (err) { - printf("\n%s: failed to get interface, err=%s\n", + kprintf("\n%s: failed to get interface, err=%s\n", devname, usbd_errstr(err)); goto bad; } usbd_devinfo(dev, 0, devinfo); /* USB_ATTACH_SETUP;*/ - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); id = usbd_get_interface_descriptor(iface); ucom->sc_iface = iface; @@ -220,7 +220,7 @@ USB_ATTACH(uftdi) int addr, dir, attr; ed = usbd_interface2endpoint_descriptor(iface, i); if (ed == NULL) { - printf("%s: could not read endpoint descriptor" + kprintf("%s: could not read endpoint descriptor" ": %s\n", devname, usbd_errstr(err)); goto bad; } @@ -233,17 +233,17 @@ USB_ATTACH(uftdi) else if (dir == UE_DIR_OUT && attr == UE_BULK) ucom->sc_bulkout_no = addr; else { - printf("%s: unexpected endpoint\n", devname); + kprintf("%s: unexpected endpoint\n", devname); goto bad; } } if (ucom->sc_bulkin_no == -1) { - printf("%s: Could not find data bulk in\n", + kprintf("%s: Could not find data bulk in\n", devname); goto bad; } if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", + kprintf("%s: Could not find data bulk out\n", devname); goto bad; } diff --git a/sys/dev/usbmisc/ugen/ugen.c b/sys/dev/usbmisc/ugen/ugen.c index f2a72eece8..e496b3b7c3 100644 --- a/sys/dev/usbmisc/ugen/ugen.c +++ b/sys/dev/usbmisc/ugen/ugen.c @@ -2,7 +2,7 @@ * $NetBSD: ugen.c,v 1.27 1999/10/28 12:08:38 augustss Exp $ * $NetBSD: ugen.c,v 1.59 2002/07/11 21:14:28 augustss Exp $ * $FreeBSD: src/sys/dev/usb/ugen.c,v 1.81 2003/11/09 09:17:22 tanimura Exp $ - * $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.22 2006/12/10 02:03:57 sephe Exp $ + * $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.23 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -218,7 +218,7 @@ USB_ATTACH(ugen) usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); + kprintf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); sc->sc_udev = udev = uaa->device; @@ -227,7 +227,7 @@ USB_ATTACH(ugen) /* First set configuration index 0, the default one for ugen. */ err = usbd_set_config_index(udev, 0, 0); if (err) { - printf("%s: setting configuration index 0 failed\n", + kprintf("%s: setting configuration index 0 failed\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; @@ -237,7 +237,7 @@ USB_ATTACH(ugen) /* Set up all the local state for this configuration. */ err = ugen_set_config(sc, conf); if (err) { - printf("%s: setting configuration %d failed\n", + kprintf("%s: setting configuration %d failed\n", USBDEVNAME(sc->sc_dev), conf); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; @@ -556,7 +556,7 @@ ugenclose(struct dev_close_args *ap) #ifdef DIAGNOSTIC if (!sc->sc_is_open[endpt]) { - printf("ugenclose: not open\n"); + kprintf("ugenclose: not open\n"); return (EINVAL); } #endif @@ -627,11 +627,11 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag) return (EINVAL); if (sce->edesc == NULL) { - printf("ugenread: no edesc\n"); + kprintf("ugenread: no edesc\n"); return (EIO); } if (sce->pipeh == NULL) { - printf("ugenread: no pipe\n"); + kprintf("ugenread: no pipe\n"); return (EIO); } @@ -795,11 +795,11 @@ ugen_do_write(struct ugen_softc *sc, int endpt, struct uio *uio, int flag) return (EINVAL); if (sce->edesc == NULL) { - printf("ugenwrite: no edesc\n"); + kprintf("ugenwrite: no edesc\n"); return (EIO); } if (sce->pipeh == NULL) { - printf("ugenwrite: no pipe\n"); + kprintf("ugenwrite: no pipe\n"); return (EIO); } @@ -1193,7 +1193,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, return (EINVAL); if (sce->pipeh == NULL) { - printf("ugenioctl: USB_SET_SHORT_XFER, no pipe\n"); + kprintf("ugenioctl: USB_SET_SHORT_XFER, no pipe\n"); return (EIO); } @@ -1467,11 +1467,11 @@ ugenpoll(struct dev_poll_args *ap) return (EINVAL); if (!sce->edesc) { - printf("ugenpoll: no edesc\n"); + kprintf("ugenpoll: no edesc\n"); return (EIO); } if (!sce->pipeh) { - printf("ugenpoll: no pipe\n"); + kprintf("ugenpoll: no pipe\n"); return (EIO); } diff --git a/sys/dev/usbmisc/uhid/uhid.c b/sys/dev/usbmisc/uhid/uhid.c index 7f5812db70..bbf69c76f7 100644 --- a/sys/dev/usbmisc/uhid/uhid.c +++ b/sys/dev/usbmisc/uhid/uhid.c @@ -1,7 +1,7 @@ /* * $NetBSD: uhid.c,v 1.46 2001/11/13 06:24:55 lukem Exp $ * $FreeBSD: src/sys/dev/usb/uhid.c,v 1.65 2003/11/09 09:17:22 tanimura Exp $ - * $DragonFly: src/sys/dev/usbmisc/uhid/uhid.c,v 1.19 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uhid/uhid.c,v 1.20 2006/12/22 23:26:26 swildner Exp $ */ /* Also already merged from NetBSD: @@ -205,12 +205,12 @@ USB_ATTACH(uhid) id = usbd_get_interface_descriptor(iface); usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), devinfo, id->bInterfaceClass, id->bInterfaceSubClass); ed = usbd_interface2endpoint_descriptor(iface, 0); if (ed == NULL) { - printf("%s: could not read endpoint descriptor\n", + kprintf("%s: could not read endpoint descriptor\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; @@ -227,7 +227,7 @@ USB_ATTACH(uhid) if (UE_GET_DIR(ed->bEndpointAddress) != UE_DIR_IN || (ed->bmAttributes & UE_XFERTYPE) != UE_INTERRUPT) { - printf("%s: unexpected endpoint\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: unexpected endpoint\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; } @@ -248,7 +248,7 @@ USB_ATTACH(uhid) } if (err) { - printf("%s: no report descriptor\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: no report descriptor\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; } diff --git a/sys/dev/usbmisc/ukbd/ukbd.c b/sys/dev/usbmisc/ukbd/ukbd.c index 2d53191242..399bdf2ceb 100644 --- a/sys/dev/usbmisc/ukbd/ukbd.c +++ b/sys/dev/usbmisc/ukbd/ukbd.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/dev/usb/ukbd.c,v 1.45 2003/10/04 21:41:01 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/ukbd/ukbd.c,v 1.16 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ukbd/ukbd.c,v 1.17 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -175,7 +175,7 @@ USB_ATTACH(ukbd) id = usbd_get_interface_descriptor(iface); usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), devinfo, id->bInterfaceClass, id->bInterfaceSubClass); arg[0] = (void *)uaa; @@ -1417,7 +1417,7 @@ init_keyboard(ukbd_state_t *state, int *type, int flags) ed = usbd_interface2endpoint_descriptor(state->ks_iface, 0); if (!ed) { - printf("ukbd: could not read endpoint descriptor\n"); + kprintf("ukbd: could not read endpoint descriptor\n"); return EIO; } @@ -1431,7 +1431,7 @@ bLength=%d bDescriptorType=%d bEndpointAddress=%d-%s bmAttributes=%d wMaxPacketS if (UE_GET_DIR(ed->bEndpointAddress) != UE_DIR_IN || UE_GET_XFERTYPE(ed->bmAttributes) != UE_INTERRUPT) { - printf("ukbd: unexpected endpoint\n"); + kprintf("ukbd: unexpected endpoint\n"); return EINVAL; } @@ -1439,7 +1439,7 @@ bLength=%d bDescriptorType=%d bEndpointAddress=%d-%s bmAttributes=%d wMaxPacketS err = usbd_set_protocol(state->ks_iface, 0); DPRINTFN(5, ("ukbd:init_keyboard: protocol set\n")); if (err) { - printf("ukbd: set protocol failed\n"); + kprintf("ukbd: set protocol failed\n"); return EIO; } } diff --git a/sys/dev/usbmisc/ulpt/ulpt.c b/sys/dev/usbmisc/ulpt/ulpt.c index c9edc201fe..72b947e255 100644 --- a/sys/dev/usbmisc/ulpt/ulpt.c +++ b/sys/dev/usbmisc/ulpt/ulpt.c @@ -1,7 +1,7 @@ /* * $NetBSD: ulpt.c,v 1.55 2002/10/23 09:14:01 jdolecek Exp $ * $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.59 2003/09/28 20:48:13 phk Exp $ - * $DragonFly: src/sys/dev/usbmisc/ulpt/ulpt.c,v 1.14 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ulpt/ulpt.c,v 1.15 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -206,7 +206,7 @@ USB_ATTACH(ulpt) DPRINTFN(10,("ulpt_attach: sc=%p\n", sc)); usbd_devinfo(dev, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), devinfo, ifcd->bInterfaceClass, ifcd->bInterfaceSubClass); /* XXX @@ -214,7 +214,7 @@ USB_ATTACH(ulpt) */ cdesc = usbd_get_config_descriptor(dev); if (cdesc == NULL) { - printf("%s: failed to get configuration descriptor\n", + kprintf("%s: failed to get configuration descriptor\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -246,7 +246,7 @@ USB_ATTACH(ulpt) DPRINTF(("ulpt_attach: set altno = %d\n", altno)); err = usbd_set_interface(iface, altno); if (err) { - printf("%s: setting alternate interface failed\n", + kprintf("%s: setting alternate interface failed\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; @@ -261,7 +261,7 @@ USB_ATTACH(ulpt) for (i = 0; i < epcount; i++) { ed = usbd_interface2endpoint_descriptor(iface, i); if (ed == NULL) { - printf("%s: couldn't get ep %d\n", + kprintf("%s: couldn't get ep %d\n", USBDEVNAME(sc->sc_dev), i); USB_ATTACH_ERROR_RETURN; } @@ -274,7 +274,7 @@ USB_ATTACH(ulpt) } } if (sc->sc_out == -1) { - printf("%s: could not find bulk out endpoint\n", + kprintf("%s: could not find bulk out endpoint\n", USBDEVNAME(sc->sc_dev)); sc->sc_dying = 1; USB_ATTACH_ERROR_RETURN; @@ -285,7 +285,7 @@ USB_ATTACH(ulpt) sc->sc_in = -1; } - printf("%s: using %s-directional mode\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: using %s-directional mode\n", USBDEVNAME(sc->sc_dev), sc->sc_in >= 0 ? "bi" : "uni"); DPRINTFN(10, ("ulpt_attach: bulk=%d\n", sc->sc_out)); @@ -313,9 +313,9 @@ USB_ATTACH(ulpt) err = usbd_do_request_flags(dev, &req, devinfo, USBD_SHORT_XFER_OK, &alen, USBD_DEFAULT_TIMEOUT); if (err) { - printf("%s: cannot get device id\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: cannot get device id\n", USBDEVNAME(sc->sc_dev)); } else if (alen <= 2) { - printf("%s: empty device id, no printer connected?\n", + kprintf("%s: empty device id, no printer connected?\n", USBDEVNAME(sc->sc_dev)); } else { /* devinfo now contains an IEEE-1284 device ID */ @@ -323,9 +323,9 @@ USB_ATTACH(ulpt) if (len > sizeof devinfo - 3) len = sizeof devinfo - 3; devinfo[len] = 0; - printf("%s: device id <", USBDEVNAME(sc->sc_dev)); + kprintf("%s: device id <", USBDEVNAME(sc->sc_dev)); ieee1284_print_id(devinfo+2); - printf(">\n"); + kprintf(">\n"); } } #endif @@ -390,10 +390,10 @@ USB_DETACH(ulpt) crit_enter(); --sc->sc_refcnt; if (sc->sc_refcnt >= 0) { - printf("%s: waiting for idle\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: waiting for idle\n", USBDEVNAME(sc->sc_dev)); while (sc->sc_refcnt >= 0) usb_detach_wait(USBDEV(sc->sc_dev)); - printf("%s: idle wait done\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: idle wait done\n", USBDEVNAME(sc->sc_dev)); } crit_exit(); @@ -512,7 +512,7 @@ ulptopen(struct dev_open_args *ap) #if defined(USB_DEBUG) && (defined(__FreeBSD__) || defined(__DragonFly__)) /* Ignoring these flags might not be a good idea */ if ((flags & ~ULPT_NOPRIME) != 0) - printf("ulptopen: flags ignored: %b\n", flags, + kprintf("ulptopen: flags ignored: %b\n", flags, "\20\3POS_INIT\4POS_ACK\6PRIME_OPEN\7AUTOLF\10BYPASS"); #endif @@ -747,7 +747,7 @@ ieee1284_print_id(char *str) strncmp(p, "MODEL:", 6) == 0) { q = strchr(p, ';'); if (q) - printf("%.*s", (int)(q - p + 1), p); + kprintf("%.*s", (int)(q - p + 1), p); } } } diff --git a/sys/dev/usbmisc/umass/umass.c b/sys/dev/usbmisc/umass/umass.c index 98a6208ee6..1f5e60089b 100644 --- a/sys/dev/usbmisc/umass/umass.c +++ b/sys/dev/usbmisc/umass/umass.c @@ -26,7 +26,7 @@ * * $NetBSD: umass.c,v 1.28 2000/04/02 23:46:53 augustss Exp $ * $FreeBSD: src/sys/dev/usb/umass.c,v 1.96 2003/12/19 12:19:11 sanpei Exp $ - * $DragonFly: src/sys/dev/usbmisc/umass/umass.c,v 1.19 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/umass/umass.c,v 1.20 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -729,7 +729,7 @@ umass_match_proto(struct umass_softc *sc, usbd_interface_handle iface, if (umass_devdescrs[i].vid == VID_WILDCARD && umass_devdescrs[i].pid == PID_WILDCARD && umass_devdescrs[i].rid == RID_WILDCARD) { - printf("umass: ignoring invalid wildcard quirk\n"); + kprintf("umass: ignoring invalid wildcard quirk\n"); continue; } if ((umass_devdescrs[i].vid == UGETW(dd->idVendor) || @@ -832,44 +832,44 @@ USB_ATTACH(umass) (void) umass_match_proto(sc, sc->iface, uaa->device); id = usbd_get_interface_descriptor(sc->iface); - printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); + kprintf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); #ifdef USB_DEBUG - printf("%s: ", USBDEVNAME(sc->sc_dev)); + kprintf("%s: ", USBDEVNAME(sc->sc_dev)); switch (sc->proto&UMASS_PROTO_COMMAND) { case UMASS_PROTO_SCSI: - printf("SCSI"); + kprintf("SCSI"); break; case UMASS_PROTO_ATAPI: - printf("8070i (ATAPI)"); + kprintf("8070i (ATAPI)"); break; case UMASS_PROTO_UFI: - printf("UFI"); + kprintf("UFI"); break; case UMASS_PROTO_RBC: - printf("RBC"); + kprintf("RBC"); break; default: - printf("(unknown 0x%02x)", sc->proto&UMASS_PROTO_COMMAND); + kprintf("(unknown 0x%02x)", sc->proto&UMASS_PROTO_COMMAND); break; } - printf(" over "); + kprintf(" over "); switch (sc->proto&UMASS_PROTO_WIRE) { case UMASS_PROTO_BBB: - printf("Bulk-Only"); + kprintf("Bulk-Only"); break; case UMASS_PROTO_CBI: /* uses Comand/Bulk pipes */ - printf("CBI"); + kprintf("CBI"); break; case UMASS_PROTO_CBI_I: /* uses Comand/Bulk/Interrupt pipes */ - printf("CBI with CCI"); + kprintf("CBI with CCI"); #ifndef CBI_I - printf(" (using CBI)"); + kprintf(" (using CBI)"); #endif break; default: - printf("(unknown 0x%02x)", sc->proto&UMASS_PROTO_WIRE); + kprintf("(unknown 0x%02x)", sc->proto&UMASS_PROTO_WIRE); } - printf("; quirks = 0x%04x\n", sc->quirks); + kprintf("; quirks = 0x%04x\n", sc->quirks); #endif #ifndef CBI_I @@ -904,7 +904,7 @@ USB_ATTACH(umass) for (i = 0 ; i < id->bNumEndpoints ; i++) { ed = usbd_interface2endpoint_descriptor(sc->iface, i); if (!ed) { - printf("%s: could not read endpoint descriptor\n", + kprintf("%s: could not read endpoint descriptor\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -1095,11 +1095,11 @@ USB_DETACH(umass) */ to = hz; while (sc->transfer_state != TSTATE_IDLE) { - printf("%s: state %d waiting for idle\n", + kprintf("%s: state %d waiting for idle\n", USBDEVNAME(sc->sc_dev), sc->transfer_state); tsleep(sc, 0, "umassidl", to); if (to >= hz * 10) { - printf("%s: state %d giving up!\n", + kprintf("%s: state %d giving up!\n", USBDEVNAME(sc->sc_dev), sc->transfer_state); break; } @@ -1580,7 +1580,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, /* Invalid CSW: Wrong signature or wrong tag might * indicate that the device is confused -> reset it. */ - printf("%s: Invalid CSW: sig 0x%08x should be 0x%08x\n", + kprintf("%s: Invalid CSW: sig 0x%08x should be 0x%08x\n", USBDEVNAME(sc->sc_dev), UGETDW(sc->csw.dCSWSignature), CSWSIGNATURE); @@ -1589,7 +1589,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, return; } else if (UGETDW(sc->csw.dCSWTag) != UGETDW(sc->cbw.dCBWTag)) { - printf("%s: Invalid CSW: tag %d should be %d\n", + kprintf("%s: Invalid CSW: tag %d should be %d\n", USBDEVNAME(sc->sc_dev), UGETDW(sc->csw.dCSWTag), UGETDW(sc->cbw.dCBWTag)); @@ -1599,7 +1599,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, /* CSW is valid here */ } else if (sc->csw.bCSWStatus > CSWSTATUS_PHASE) { - printf("%s: Invalid CSW: status %d > %d\n", + kprintf("%s: Invalid CSW: status %d > %d\n", USBDEVNAME(sc->sc_dev), sc->csw.bCSWStatus, CSWSTATUS_PHASE); @@ -1607,7 +1607,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, umass_bbb_reset(sc, STATUS_WIRE_FAILED); return; } else if (sc->csw.bCSWStatus == CSWSTATUS_PHASE) { - printf("%s: Phase Error, residue = %d\n", + kprintf("%s: Phase Error, residue = %d\n", USBDEVNAME(sc->sc_dev), Residue); umass_bbb_reset(sc, STATUS_WIRE_FAILED); @@ -1641,7 +1641,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, /***** Bulk Reset *****/ case TSTATE_BBB_RESET1: if (err) - printf("%s: BBB reset failed, %s\n", + kprintf("%s: BBB reset failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); umass_clear_endpoint_stall(sc, @@ -1651,7 +1651,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, return; case TSTATE_BBB_RESET2: if (err) /* should not occur */ - printf("%s: BBB bulk-in clear stall failed, %s\n", + kprintf("%s: BBB bulk-in clear stall failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); /* no error recovery, otherwise we end up in a loop */ @@ -1662,7 +1662,7 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv, return; case TSTATE_BBB_RESET3: if (err) /* should not occur */ - printf("%s: BBB bulk-out clear stall failed, %s\n", + kprintf("%s: BBB bulk-out clear stall failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); /* no error recovery, otherwise we end up in a loop */ @@ -1713,7 +1713,7 @@ umass_bbb_get_max_lun(struct umass_softc *sc) case USBD_SHORT_XFER: default: /* Device doesn't support Get Max Lun request. */ - printf("%s: Get Max Lun not supported (%s)\n", + kprintf("%s: Get Max Lun not supported (%s)\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); /* XXX Should we port_reset the device? */ break; @@ -2052,7 +2052,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, case TSTATE_CBI_DCLEAR: if (err) { /* should not occur */ - printf("%s: CBI bulk-in/out stall clear failed, %s\n", + kprintf("%s: CBI bulk-in/out stall clear failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); umass_cbi_reset(sc, STATUS_WIRE_FAILED); } @@ -2065,7 +2065,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, case TSTATE_CBI_SCLEAR: if (err) /* should not occur */ - printf("%s: CBI intr-in stall clear failed, %s\n", + kprintf("%s: CBI intr-in stall clear failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); /* Something really bad is going on. Reset the device */ @@ -2075,7 +2075,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, /***** CBI Reset *****/ case TSTATE_CBI_RESET1: if (err) - printf("%s: CBI reset failed, %s\n", + kprintf("%s: CBI reset failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); umass_clear_endpoint_stall(sc, @@ -2085,7 +2085,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, return; case TSTATE_CBI_RESET2: if (err) /* should not occur */ - printf("%s: CBI bulk-in stall clear failed, %s\n", + kprintf("%s: CBI bulk-in stall clear failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); /* no error recovery, otherwise we end up in a loop */ @@ -2096,7 +2096,7 @@ umass_cbi_state(usbd_xfer_handle xfer, usbd_private_handle priv, return; case TSTATE_CBI_RESET3: if (err) /* should not occur */ - printf("%s: CBI bulk-out stall clear failed, %s\n", + kprintf("%s: CBI bulk-out stall clear failed, %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); /* no error recovery, otherwise we end up in a loop */ @@ -2220,7 +2220,7 @@ umass_cam_attach(struct umass_softc *sc) #ifndef USB_DEBUG if (bootverbose) #endif - printf("%s:%d:%d:%d: Attached to scbus%d\n", + kprintf("%s:%d:%d:%d: Attached to scbus%d\n", USBDEVNAME(sc->sc_dev), cam_sim_path(sc->umass_sim), USBDEVUNIT(sc->sc_dev), CAM_LUN_WILDCARD, cam_sim_path(sc->umass_sim)); @@ -2287,7 +2287,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) * valid sc, because an existing target was referenced, or otherwise * the SIM is addressed. * - * This avoids bombing out at a printf and does give the CAM layer some + * This avoids bombing out at a kprintf and does give the CAM layer some * sensible feedback on errors. */ switch (ccb->ccb_h.func_code) { @@ -2298,7 +2298,7 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb) case XPT_CALC_GEOMETRY: /* the opcodes requiring a target. These should never occur. */ if (sc == NULL) { - printf("%s:%d:%d:%d:func_code 0x%04x: " + kprintf("%s:%d:%d:%d:func_code 0x%04x: " "Invalid target (target needed)\n", DEVNAME_SIM, cam_sim_path(sc->umass_sim), ccb->ccb_h.target_id, ccb->ccb_h.target_lun, @@ -2836,9 +2836,9 @@ umass_rbc_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, return 1; /* All other commands are not legal in RBC */ default: - printf("%s: Unsupported RBC command 0x%02x", + kprintf("%s: Unsupported RBC command 0x%02x", USBDEVNAME(sc->sc_dev), cmd[0]); - printf("\n"); + kprintf("\n"); return 0; /* failure */ } } @@ -2899,7 +2899,7 @@ umass_ufi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, */ default: - printf("%s: Unsupported UFI command 0x%02x\n", + kprintf("%s: Unsupported UFI command 0x%02x\n", USBDEVNAME(sc->sc_dev), cmd[0]); return 0; /* failure */ } @@ -2984,7 +2984,7 @@ umass_atapi_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, case READ_12: case WRITE_12: default: - printf("%s: Unsupported ATAPI command 0x%02x\n", + kprintf("%s: Unsupported ATAPI command 0x%02x\n", USBDEVNAME(sc->sc_dev), cmd[0]); return 0; /* failure */ } diff --git a/sys/dev/usbmisc/umct/umct.c b/sys/dev/usbmisc/umct/umct.c index 71ecabee3c..e6cbd281ec 100644 --- a/sys/dev/usbmisc/umct/umct.c +++ b/sys/dev/usbmisc/umct/umct.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/usb/umct.c,v 1.12 2006/09/07 00:06:42 imp Exp $ - * $DragonFly: src/sys/dev/usbmisc/umct/umct.c,v 1.6 2006/12/14 16:18:04 swildner Exp $ + * $DragonFly: src/sys/dev/usbmisc/umct/umct.c,v 1.7 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -178,7 +178,7 @@ USB_ATTACH(umct) usbd_devinfo(dev, 0, devinfo); device_set_desc_copy(self, devinfo); devname = USBDEVNAME(ucom->sc_dev); - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); ucom->sc_bulkout_no = -1; ucom->sc_bulkin_no = -1; @@ -187,7 +187,7 @@ USB_ATTACH(umct) err = usbd_set_config_index(dev, UMCT_CONFIG_INDEX, 1); if (err) { - printf("%s: failed to set configuration: %s\n", + kprintf("%s: failed to set configuration: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -195,7 +195,7 @@ USB_ATTACH(umct) cdesc = usbd_get_config_descriptor(ucom->sc_udev); if (cdesc == NULL) { - printf("%s: failed to get configuration descriptor\n", devname); + kprintf("%s: failed to get configuration descriptor\n", devname); ucom->sc_dying = 1; goto error; } @@ -203,7 +203,7 @@ USB_ATTACH(umct) err = usbd_device2interface_handle(dev, UMCT_IFACE_INDEX, &ucom->sc_iface); if (err) { - printf("%s: failed to get interface: %s\n", devname, + kprintf("%s: failed to get interface: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -215,7 +215,7 @@ USB_ATTACH(umct) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(ucom->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", + kprintf("%s: no endpoint descriptor for %d\n", devname, i); ucom->sc_dying = 1; goto error; @@ -246,12 +246,12 @@ USB_ATTACH(umct) continue; } - printf("%s: warning - unsupported endpoint 0x%x\n", devname, + kprintf("%s: warning - unsupported endpoint 0x%x\n", devname, ed->bEndpointAddress); } if (sc->sc_intr_number == -1) { - printf("%s: Could not find interrupt in\n", devname); + kprintf("%s: Could not find interrupt in\n", devname); ucom->sc_dying = 1; goto error; } @@ -259,7 +259,7 @@ USB_ATTACH(umct) sc->sc_intr_iface = ucom->sc_iface; if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", devname); + kprintf("%s: Could not find data bulk out\n", devname); ucom->sc_dying = 1; goto error; } @@ -312,7 +312,7 @@ umct_request(struct umct_softc *sc, uint8_t request, int len, uint32_t value) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, oval); if (err) - printf("%s: ubsa_request: %s\n", + kprintf("%s: ubsa_request: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -473,7 +473,7 @@ umct_open(void *addr, int portno) USBD_SHORT_XFER_OK, &sc->sc_intr_pipe, sc, sc->sc_intr_buf, sc->sc_isize, umct_intr, UMCT_INTR_INTERVAL); if (err) { - printf("%s: cannot open interrupt pipe (addr %d)\n", + kprintf("%s: cannot open interrupt pipe (addr %d)\n", USBDEVNAME(sc->sc_ucom.sc_dev), sc->sc_intr_number); kfree(sc->sc_intr_buf, M_USBDEV); @@ -497,11 +497,11 @@ umct_close(void *addr, int portno) if (sc->sc_intr_pipe != NULL) { err = usbd_abort_pipe(sc->sc_intr_pipe); if (err) - printf("%s: abort interrupt pipe failed: %s\n", + kprintf("%s: abort interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); err = usbd_close_pipe(sc->sc_intr_pipe); if (err) - printf("%s: close interrupt pipe failed: %s\n", + kprintf("%s: close interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); kfree(sc->sc_intr_buf, M_USBDEV); sc->sc_intr_pipe = NULL; diff --git a/sys/dev/usbmisc/umodem/umodem.c b/sys/dev/usbmisc/umodem/umodem.c index f2afa34ca5..7d8329235b 100644 --- a/sys/dev/usbmisc/umodem/umodem.c +++ b/sys/dev/usbmisc/umodem/umodem.c @@ -2,7 +2,7 @@ * $NetBSD: umodem.c,v 1.5 1999/01/08 11:58:25 augustss Exp $ * $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ * $FreeBSD: src/sys/dev/usb/umodem.c,v 1.48 2003/08/24 17:55:55 obrien Exp $ - * $DragonFly: src/sys/dev/usbmisc/umodem/umodem.c,v 1.11 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/umodem/umodem.c,v 1.12 2006/12/22 23:26:26 swildner Exp $ */ /*- @@ -266,7 +266,7 @@ USB_ATTACH(umodem) devname = USBDEVNAME(sc->sc_dev); /* XXX ? use something else ? XXX */ id = usbd_get_interface_descriptor(sc->sc_ctl_iface); - printf("%s: %s, iclass %d/%d\n", devname, devinfo, + kprintf("%s: %s, iclass %d/%d\n", devname, devinfo, id->bInterfaceClass, id->bInterfaceSubClass); sc->sc_ctl_iface_no = id->bInterfaceNumber; @@ -275,12 +275,12 @@ USB_ATTACH(umodem) /* Get the data interface no. */ cmd = umodem_get_desc(dev, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM); if (cmd == NULL) { - printf("%s: no CM descriptor\n", devname); + kprintf("%s: no CM descriptor\n", devname); goto bad; } sc->sc_data_iface_no = data_ifcno = cmd->bDataInterface; - printf("%s: data interface %d, has %sCM over data, has %sbreak\n", + kprintf("%s: data interface %d, has %sCM over data, has %sbreak\n", devname, data_ifcno, sc->sc_cm_cap & USB_CDC_CM_OVER_DATA ? "" : "no ", sc->sc_acm_cap & USB_CDC_ACM_HAS_BREAK ? "" : "no "); @@ -296,7 +296,7 @@ USB_ATTACH(umodem) } } if (sc->sc_data_iface == NULL) { - printf("%s: no data interface\n", devname); + kprintf("%s: no data interface\n", devname); goto bad; } ucom->sc_iface = sc->sc_data_iface; @@ -311,7 +311,7 @@ USB_ATTACH(umodem) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_data_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", devname, + kprintf("%s: no endpoint descriptor for %d\n", devname, i); goto bad; } @@ -325,11 +325,11 @@ USB_ATTACH(umodem) } if (ucom->sc_bulkin_no == -1) { - printf("%s: Could not find data bulk in\n", devname); + kprintf("%s: Could not find data bulk in\n", devname); goto bad; } if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", devname); + kprintf("%s: Could not find data bulk out\n", devname); goto bad; } @@ -344,7 +344,7 @@ USB_ATTACH(umodem) else err = 0; if (err) { - printf("%s: could not set data multiplex mode\n", + kprintf("%s: could not set data multiplex mode\n", devname); goto bad; } @@ -370,7 +370,7 @@ USB_ATTACH(umodem) if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { - printf("%s: status change notification available\n", + kprintf("%s: status change notification available\n", devname); sc->sc_ctl_notify = ed->bEndpointAddress; } @@ -433,11 +433,11 @@ umodem_close(void *addr, int portno) if (sc->sc_notify_pipe != NULL) { err = usbd_abort_pipe(sc->sc_notify_pipe); if (err) - printf("%s: abort notify pipe failed: %s\n", + kprintf("%s: abort notify pipe failed: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); err = usbd_close_pipe(sc->sc_notify_pipe); if (err) - printf("%s: close notify pipe failed: %s\n", + kprintf("%s: close notify pipe failed: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(err)); sc->sc_notify_pipe = NULL; } @@ -455,7 +455,7 @@ umodem_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (status != USBD_NORMAL_COMPLETION) { if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; - printf("%s: abnormal status: %s\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: abnormal status: %s\n", USBDEVNAME(sc->sc_dev), usbd_errstr(status)); return; } @@ -474,7 +474,7 @@ umodem_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) * the bits from the notify message */ if (UGETW(sc->sc_notify_buf.wLength) != 2) { - printf("%s: Invalid notification length! (%d)\n", + kprintf("%s: Invalid notification length! (%d)\n", USBDEVNAME(sc->sc_dev), UGETW(sc->sc_notify_buf.wLength)); break; diff --git a/sys/dev/usbmisc/ums/ums.c b/sys/dev/usbmisc/ums/ums.c index 1b6d06a32e..71ce0958f3 100644 --- a/sys/dev/usbmisc/ums/ums.c +++ b/sys/dev/usbmisc/ums/ums.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/dev/usb/ums.c,v 1.64 2003/11/09 09:17:22 tanimura Exp $ - * $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.20 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.21 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -212,11 +212,11 @@ USB_ATTACH(ums) id = usbd_get_interface_descriptor(iface); usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %s, iclass %d/%d\n", USBDEVNAME(sc->sc_dev), devinfo, id->bInterfaceClass, id->bInterfaceSubClass); ed = usbd_interface2endpoint_descriptor(iface, 0); if (!ed) { - printf("%s: could not read endpoint descriptor\n", + kprintf("%s: could not read endpoint descriptor\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -232,7 +232,7 @@ USB_ATTACH(ums) if (UE_GET_DIR(ed->bEndpointAddress) != UE_DIR_IN || UE_GET_XFERTYPE(ed->bmAttributes) != UE_INTERRUPT) { - printf("%s: unexpected endpoint\n", + kprintf("%s: unexpected endpoint\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -243,22 +243,22 @@ USB_ATTACH(ums) if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X), hid_input, &sc->sc_loc_x, &flags)) { - printf("%s: mouse has no X report\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: mouse has no X report\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { - printf("%s: X report 0x%04x not supported\n", + kprintf("%s: X report 0x%04x not supported\n", USBDEVNAME(sc->sc_dev), flags); USB_ATTACH_ERROR_RETURN; } if (!hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_Y), hid_input, &sc->sc_loc_y, &flags)) { - printf("%s: mouse has no Y report\n", USBDEVNAME(sc->sc_dev)); + kprintf("%s: mouse has no Y report\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } if ((flags & MOUSE_FLAGS_MASK) != MOUSE_FLAGS) { - printf("%s: Y report 0x%04x not supported\n", + kprintf("%s: Y report 0x%04x not supported\n", USBDEVNAME(sc->sc_dev), flags); USB_ATTACH_ERROR_RETURN; } @@ -284,7 +284,7 @@ USB_ATTACH(ums) sc->sc_loc_btn = kmalloc(sizeof(struct hid_location)*sc->nbuttons, M_USBDEV, M_INTWAIT); - printf("%s: %d buttons%s\n", USBDEVNAME(sc->sc_dev), + kprintf("%s: %d buttons%s\n", USBDEVNAME(sc->sc_dev), sc->nbuttons, sc->flags & UMS_Z? " and Z dir." : ""); for (i = 1; i <= sc->nbuttons; i++) diff --git a/sys/dev/usbmisc/uplcom/uplcom.c b/sys/dev/usbmisc/uplcom/uplcom.c index 34eaa89cd7..2ecae34c81 100644 --- a/sys/dev/usbmisc/uplcom/uplcom.c +++ b/sys/dev/usbmisc/uplcom/uplcom.c @@ -1,7 +1,7 @@ /* * $NetBSD: uplcom.c,v 1.21 2001/11/13 06:24:56 lukem Exp $ * $FreeBSD: src/sys/dev/usb/uplcom.c,v 1.39 2006/09/07 00:06:42 imp Exp $ - * $DragonFly: src/sys/dev/usbmisc/uplcom/uplcom.c,v 1.9 2006/11/13 21:39:19 swildner Exp $ + * $DragonFly: src/sys/dev/usbmisc/uplcom/uplcom.c,v 1.10 2006/12/22 23:26:26 swildner Exp $ */ /*- @@ -363,7 +363,7 @@ USB_ATTACH(uplcom) ucom->sc_iface = uaa->iface; devname = USBDEVNAME(ucom->sc_dev); - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); DPRINTF(("uplcom attach: sc = %p\n", sc)); @@ -383,7 +383,7 @@ USB_ATTACH(uplcom) * don't get here without matching device */ if (uplcom_products[i].vendor == 0) { - printf("%s: didn't match\n", devname); + kprintf("%s: didn't match\n", devname); ucom->sc_dying = 1; goto error; } @@ -405,7 +405,7 @@ USB_ATTACH(uplcom) /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UPLCOM_CONFIG_INDEX, 1); if (err) { - printf("%s: failed to set configuration: %s\n", + kprintf("%s: failed to set configuration: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -415,7 +415,7 @@ USB_ATTACH(uplcom) cdesc = usbd_get_config_descriptor(ucom->sc_udev); if (cdesc == NULL) { - printf("%s: failed to get configuration descriptor\n", + kprintf("%s: failed to get configuration descriptor\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; @@ -425,7 +425,7 @@ USB_ATTACH(uplcom) err = usbd_device2interface_handle(dev, UPLCOM_IFACE_INDEX, &ucom->sc_iface); if (err) { - printf("%s: failed to get interface: %s\n", + kprintf("%s: failed to get interface: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -439,7 +439,7 @@ USB_ATTACH(uplcom) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(ucom->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", + kprintf("%s: no endpoint descriptor for %d\n", USBDEVNAME(ucom->sc_dev), i); ucom->sc_dying = 1; goto error; @@ -453,7 +453,7 @@ USB_ATTACH(uplcom) } if (sc->sc_intr_number == -1) { - printf("%s: Could not find interrupt in\n", + kprintf("%s: Could not find interrupt in\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; @@ -479,7 +479,7 @@ USB_ATTACH(uplcom) UPLCOM_SECOND_IFACE_INDEX, &ucom->sc_iface); if (err) { - printf("%s: failed to get second interface: %s\n", + kprintf("%s: failed to get second interface: %s\n", devname, usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -494,7 +494,7 @@ USB_ATTACH(uplcom) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(ucom->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", + kprintf("%s: no endpoint descriptor for %d\n", USBDEVNAME(ucom->sc_dev), i); ucom->sc_dying = 1; goto error; @@ -510,14 +510,14 @@ USB_ATTACH(uplcom) } if (ucom->sc_bulkin_no == -1) { - printf("%s: Could not find data bulk in\n", + kprintf("%s: Could not find data bulk in\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; } if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", + kprintf("%s: Could not find data bulk out\n", USBDEVNAME(ucom->sc_dev)); ucom->sc_dying = 1; goto error; @@ -536,7 +536,7 @@ USB_ATTACH(uplcom) err = uplcom_reset(sc); if (err) { - printf("%s: reset failed: %s\n", + kprintf("%s: reset failed: %s\n", USBDEVNAME(ucom->sc_dev), usbd_errstr(err)); ucom->sc_dying = 1; goto error; @@ -591,7 +591,7 @@ uplcom_reset(struct uplcom_softc *sc) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, 0); if (err) { - printf("%s: uplcom_reset: %s\n", + kprintf("%s: uplcom_reset: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (EIO); } @@ -638,7 +638,7 @@ uplcom_pl2303x_init(struct uplcom_softc *sc) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, 0); if (err) { - printf("%s: uplcom_pl2303x_init: %d: %s\n", + kprintf("%s: uplcom_pl2303x_init: %d: %s\n", device_get_nameunit(sc->sc_ucom.sc_dev), i, usbd_errstr(err)); return (EIO); @@ -665,7 +665,7 @@ uplcom_set_line_state(struct uplcom_softc *sc) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, 0); if (err) - printf("%s: uplcom_set_line_status: %s\n", + kprintf("%s: uplcom_set_line_status: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); } @@ -729,7 +729,7 @@ uplcom_break(struct uplcom_softc *sc, int onoff) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, 0); if (err) - printf("%s: uplcom_break: %s\n", + kprintf("%s: uplcom_break: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); } @@ -752,7 +752,7 @@ uplcom_set_crtscts(struct uplcom_softc *sc) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, 0); if (err) { - printf("%s: uplcom_set_crtscts: %s\n", + kprintf("%s: uplcom_set_crtscts: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -784,7 +784,7 @@ uplcom_set_line_coding(struct uplcom_softc *sc, usb_cdc_line_state_t *state) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, state); if (err) { - printf("%s: uplcom_set_line_coding: %s\n", + kprintf("%s: uplcom_set_line_coding: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -888,7 +888,7 @@ uplcom_open(void *addr, int portno) uplcom_intr, uplcominterval); if (err) { - printf("%s: cannot open interrupt pipe (addr %d)\n", + kprintf("%s: cannot open interrupt pipe (addr %d)\n", USBDEVNAME(sc->sc_ucom.sc_dev), sc->sc_intr_number); return (EIO); @@ -915,12 +915,12 @@ uplcom_close(void *addr, int portno) if (sc->sc_intr_pipe != NULL) { err = usbd_abort_pipe(sc->sc_intr_pipe); if (err) - printf("%s: abort interrupt pipe failed: %s\n", + kprintf("%s: abort interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); err = usbd_close_pipe(sc->sc_intr_pipe); if (err) - printf("%s: close interrupt pipe failed: %s\n", + kprintf("%s: close interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); kfree(sc->sc_intr_buf, M_USBDEV); diff --git a/sys/dev/usbmisc/urio/urio.c b/sys/dev/usbmisc/urio/urio.c index 29d3a484f5..0a103ff41f 100644 --- a/sys/dev/usbmisc/urio/urio.c +++ b/sys/dev/usbmisc/urio/urio.c @@ -30,7 +30,7 @@ /* * $FreeBSD: src/sys/dev/usb/urio.c,v 1.28 2003/08/25 22:01:06 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/urio/urio.c,v 1.14 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/urio/urio.c,v 1.15 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -196,7 +196,7 @@ USB_ATTACH(urio) DPRINTFN(10,("urio_attach: sc=%p\n", sc)); usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); + kprintf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); sc->sc_udev = udev = uaa->device; @@ -272,7 +272,7 @@ USB_ATTACH(urio) USB_ATTACH_SUCCESS_RETURN; nobulk: - printf("%s: could not find %s\n", USBDEVNAME(sc->sc_dev),ermsg); + kprintf("%s: could not find %s\n", USBDEVNAME(sc->sc_dev),ermsg); USB_ATTACH_ERROR_RETURN; } diff --git a/sys/dev/usbmisc/uscanner/uscanner.c b/sys/dev/usbmisc/uscanner/uscanner.c index 6b43244f69..e923517d30 100644 --- a/sys/dev/usbmisc/uscanner/uscanner.c +++ b/sys/dev/usbmisc/uscanner/uscanner.c @@ -1,7 +1,7 @@ /* * $NetBSD: uscanner.c,v 1.30 2002/07/11 21:14:36 augustss Exp $ * $FreeBSD: src/sys/dev/usb/uscanner.c,v 1.48 2003/12/22 19:58:27 sanpei Exp $ - * $DragonFly: src/sys/dev/usbmisc/uscanner/uscanner.c,v 1.14 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uscanner/uscanner.c,v 1.15 2006/12/22 23:26:26 swildner Exp $ */ /* Also already merged from NetBSD: @@ -305,7 +305,7 @@ USB_ATTACH(uscanner) usbd_devinfo(uaa->device, 0, devinfo); USB_ATTACH_SETUP; - printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); + kprintf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); sc->sc_dev_flags = uscanner_lookup(uaa->vendor, uaa->product)->flags; @@ -313,7 +313,7 @@ USB_ATTACH(uscanner) err = usbd_set_config_no(uaa->device, 1, 1); /* XXX */ if (err) { - printf("%s: setting config no failed\n", + kprintf("%s: setting config no failed\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -323,7 +323,7 @@ USB_ATTACH(uscanner) if (!err && sc->sc_iface) id = usbd_get_interface_descriptor(sc->sc_iface); if (err || id == 0) { - printf("%s: could not get interface descriptor, err=%d,id=%p\n", + kprintf("%s: could not get interface descriptor, err=%d,id=%p\n", USBDEVNAME(sc->sc_dev), err, id); USB_ATTACH_ERROR_RETURN; } @@ -332,7 +332,7 @@ USB_ATTACH(uscanner) for (i = 0 ; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i); if (ed == 0) { - printf("%s: could not read endpoint descriptor\n", + kprintf("%s: could not read endpoint descriptor\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -351,7 +351,7 @@ USB_ATTACH(uscanner) /* Verify that we goething sensible */ if (ed_bulkin == NULL || ed_bulkout == NULL) { - printf("%s: bulk-in and/or bulk-out endpoint not found\n", + kprintf("%s: bulk-in and/or bulk-out endpoint not found\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } @@ -405,7 +405,7 @@ uscanneropen(struct dev_open_args *ap) err = usbd_open_pipe(sc->sc_iface, sc->sc_bulkin, USBD_EXCLUSIVE_USE, &sc->sc_bulkin_pipe); if (err) { - printf("%s: cannot open bulk-in pipe (addr %d)\n", + kprintf("%s: cannot open bulk-in pipe (addr %d)\n", USBDEVNAME(sc->sc_dev), sc->sc_bulkin); uscanner_do_close(sc); return (EIO); @@ -415,7 +415,7 @@ uscanneropen(struct dev_open_args *ap) err = usbd_open_pipe(sc->sc_iface, sc->sc_bulkout, USBD_EXCLUSIVE_USE, &sc->sc_bulkout_pipe); if (err) { - printf("%s: cannot open bulk-out pipe (addr %d)\n", + kprintf("%s: cannot open bulk-out pipe (addr %d)\n", USBDEVNAME(sc->sc_dev), sc->sc_bulkout); uscanner_do_close(sc); return (EIO); @@ -449,7 +449,7 @@ uscannerclose(struct dev_close_args *ap) #ifdef DIAGNOSTIC if (!(sc->sc_state & USCANNER_OPEN)) { - printf("uscannerclose: not open\n"); + kprintf("uscannerclose: not open\n"); return (EINVAL); } #endif diff --git a/sys/dev/usbmisc/uvisor/uvisor.c b/sys/dev/usbmisc/uvisor/uvisor.c index 546f31d747..5dba5bbd49 100644 --- a/sys/dev/usbmisc/uvisor/uvisor.c +++ b/sys/dev/usbmisc/uvisor/uvisor.c @@ -1,7 +1,7 @@ /* * $NetBSD: uvisor.c,v 1.9 2001/01/23 14:04:14 augustss Exp $ * $FreeBSD: src/sys/dev/usb/uvisor.c,v 1.16 2003/11/08 11:23:07 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/uvisor/uvisor.c,v 1.8 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uvisor/uvisor.c,v 1.9 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -80,8 +80,8 @@ #include "../ucom/ucomvar.h" #ifdef USB_DEBUG -#define DPRINTF(x) if (uvisordebug) printf x -#define DPRINTFN(n,x) if (uvisordebug>(n)) printf x +#define DPRINTF(x) if (uvisordebug) kprintf x +#define DPRINTFN(n,x) if (uvisordebug>(n)) kprintf x int uvisordebug = 0; SYSCTL_NODE(_hw_usb, OID_AUTO, uvisor, CTLFLAG_RW, 0, "USB uvisor"); SYSCTL_INT(_hw_usb_uvisor, OID_AUTO, debug, CTLFLAG_RW, @@ -269,26 +269,26 @@ USB_ATTACH(uvisor) ucom->sc_iface = uaa->iface; devname = USBDEVNAME(ucom->sc_dev); - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); DPRINTFN(10,("\nuvisor_attach: sc=%p\n", sc)); /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UVISOR_CONFIG_INDEX, 1); if (err) { - printf("\n%s: failed to set configuration, err=%s\n", + kprintf("\n%s: failed to set configuration, err=%s\n", devname, usbd_errstr(err)); goto bad; } err = usbd_device2interface_handle(dev, UVISOR_IFACE_INDEX, &iface); if (err) { - printf("\n%s: failed to get interface, err=%s\n", + kprintf("\n%s: failed to get interface, err=%s\n", devname, usbd_errstr(err)); goto bad; } - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); sc->sc_flags = uvisor_lookup(uaa->vendor, uaa->product)->uv_flags; @@ -302,7 +302,7 @@ USB_ATTACH(uvisor) int addr, dir, attr; ed = usbd_interface2endpoint_descriptor(iface, i); if (ed == NULL) { - printf("%s: could not read endpoint descriptor" + kprintf("%s: could not read endpoint descriptor" ": %s\n", devname, usbd_errstr(err)); goto bad; } @@ -315,17 +315,17 @@ USB_ATTACH(uvisor) else if (dir == UE_DIR_OUT && attr == UE_BULK) ucom->sc_bulkout_no = addr; else { - printf("%s: unexpected endpoint\n", devname); + kprintf("%s: unexpected endpoint\n", devname); goto bad; } } if (ucom->sc_bulkin_no == -1) { - printf("%s: Could not find data bulk in\n", + kprintf("%s: Could not find data bulk in\n", USBDEVNAME(ucom->sc_dev)); goto bad; } if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", + kprintf("%s: Could not find data bulk out\n", USBDEVNAME(ucom->sc_dev)); goto bad; } @@ -341,7 +341,7 @@ USB_ATTACH(uvisor) err = uvisor_init(sc); if (err) { - printf("%s: init failed, %s\n", USBDEVNAME(ucom->sc_dev), + kprintf("%s: init failed, %s\n", USBDEVNAME(ucom->sc_dev), usbd_errstr(err)); goto bad; } @@ -427,7 +427,7 @@ uvisor_init(struct uvisor_softc *sc) char *string; np = UGETW(coninfo.num_ports); - printf("%s: Number of ports: %d\n", USBDEVNAME(sc->sc_ucom.sc_dev), np); + kprintf("%s: Number of ports: %d\n", USBDEVNAME(sc->sc_ucom.sc_dev), np); for (i = 0; i < np; ++i) { switch (coninfo.connections[i].port_function_id) { case UVISOR_FUNCTION_GENERIC: @@ -446,7 +446,7 @@ uvisor_init(struct uvisor_softc *sc) string = "unknown"; break; } - printf("%s: port %d, is for %s\n", + kprintf("%s: port %d, is for %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), coninfo.connections[i].port, string); } diff --git a/sys/dev/usbmisc/uvscom/uvscom.c b/sys/dev/usbmisc/uvscom/uvscom.c index 9b03064377..45fb7477a4 100644 --- a/sys/dev/usbmisc/uvscom/uvscom.c +++ b/sys/dev/usbmisc/uvscom/uvscom.c @@ -25,7 +25,7 @@ * * $NetBSD: usb/uvscom.c,v 1.1 2002/03/19 15:08:42 augustss Exp $ * $FreeBSD: src/sys/dev/usb/uvscom.c,v 1.19 2003/11/16 12:26:10 akiyama Exp $ - * $DragonFly: src/sys/dev/usbmisc/uvscom/uvscom.c,v 1.8 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uvscom/uvscom.c,v 1.9 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -281,7 +281,7 @@ USB_ATTACH(uvscom) ucom->sc_iface = uaa->iface; devname = USBDEVNAME(ucom->sc_dev); - printf("%s: %s\n", devname, devinfo); + kprintf("%s: %s\n", devname, devinfo); DPRINTF(("uvscom attach: sc = %p\n", sc)); @@ -293,7 +293,7 @@ USB_ATTACH(uvscom) /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UVSCOM_CONFIG_INDEX, 1); if (err) { - printf("%s: failed to set configuration, err=%s\n", + kprintf("%s: failed to set configuration, err=%s\n", devname, usbd_errstr(err)); goto error; } @@ -302,7 +302,7 @@ USB_ATTACH(uvscom) cdesc = usbd_get_config_descriptor(ucom->sc_udev); if (cdesc == NULL) { - printf("%s: failed to get configuration descriptor\n", + kprintf("%s: failed to get configuration descriptor\n", USBDEVNAME(ucom->sc_dev)); goto error; } @@ -311,7 +311,7 @@ USB_ATTACH(uvscom) err = usbd_device2interface_handle(dev, UVSCOM_IFACE_INDEX, &ucom->sc_iface); if (err) { - printf("%s: failed to get interface, err=%s\n", + kprintf("%s: failed to get interface, err=%s\n", devname, usbd_errstr(err)); goto error; } @@ -323,7 +323,7 @@ USB_ATTACH(uvscom) for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(ucom->sc_iface, i); if (ed == NULL) { - printf("%s: no endpoint descriptor for %d\n", + kprintf("%s: no endpoint descriptor for %d\n", USBDEVNAME(ucom->sc_dev), i); goto error; } @@ -342,17 +342,17 @@ USB_ATTACH(uvscom) } if (ucom->sc_bulkin_no == -1) { - printf("%s: Could not find data bulk in\n", + kprintf("%s: Could not find data bulk in\n", USBDEVNAME(ucom->sc_dev)); goto error; } if (ucom->sc_bulkout_no == -1) { - printf("%s: Could not find data bulk out\n", + kprintf("%s: Could not find data bulk out\n", USBDEVNAME(ucom->sc_dev)); goto error; } if (sc->sc_intr_number == -1) { - printf("%s: Could not find interrupt in\n", + kprintf("%s: Could not find interrupt in\n", USBDEVNAME(ucom->sc_dev)); goto error; } @@ -372,7 +372,7 @@ USB_ATTACH(uvscom) err = uvscom_reset(sc); if (err) { - printf("%s: reset failed, %s\n", USBDEVNAME(ucom->sc_dev), + kprintf("%s: reset failed, %s\n", USBDEVNAME(ucom->sc_dev), usbd_errstr(err)); goto error; } @@ -429,7 +429,7 @@ uvscom_readstat(struct uvscom_softc *sc) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, &r); if (err) { - printf("%s: uvscom_readstat: %s\n", + kprintf("%s: uvscom_readstat: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -456,7 +456,7 @@ uvscom_shutdown(struct uvscom_softc *sc) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, NULL); if (err) { - printf("%s: uvscom_shutdown: %s\n", + kprintf("%s: uvscom_shutdown: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -497,7 +497,7 @@ uvscom_set_line(struct uvscom_softc *sc, uint16_t line) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, NULL); if (err) { - printf("%s: uvscom_set_line: %s\n", + kprintf("%s: uvscom_set_line: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -522,7 +522,7 @@ uvscom_set_line_coding(struct uvscom_softc *sc, uint16_t lsp, uint16_t ls) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, NULL); if (err) { - printf("%s: uvscom_set_line_coding: %s\n", + kprintf("%s: uvscom_set_line_coding: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -535,7 +535,7 @@ uvscom_set_line_coding(struct uvscom_softc *sc, uint16_t lsp, uint16_t ls) err = usbd_do_request(sc->sc_ucom.sc_udev, &req, NULL); if (err) { - printf("%s: uvscom_set_line_coding: %s\n", + kprintf("%s: uvscom_set_line_coding: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); return (err); } @@ -740,7 +740,7 @@ uvscom_open(void *addr, int portno) uvscom_intr, UVSCOM_INTR_INTERVAL); if (err) { - printf("%s: cannot open interrupt pipe (addr %d)\n", + kprintf("%s: cannot open interrupt pipe (addr %d)\n", USBDEVNAME(sc->sc_ucom.sc_dev), sc->sc_intr_number); return (ENXIO); @@ -790,12 +790,12 @@ uvscom_close(void *addr, int portno) if (sc->sc_intr_pipe != NULL) { err = usbd_abort_pipe(sc->sc_intr_pipe); if (err) - printf("%s: abort interrupt pipe failed: %s\n", + kprintf("%s: abort interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); err = usbd_close_pipe(sc->sc_intr_pipe); if (err) - printf("%s: close interrupt pipe failed: %s\n", + kprintf("%s: close interrupt pipe failed: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(err)); kfree(sc->sc_intr_buf, M_USBDEV); @@ -817,7 +817,7 @@ uvscom_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) return; - printf("%s: uvscom_intr: abnormal status: %s\n", + kprintf("%s: uvscom_intr: abnormal status: %s\n", USBDEVNAME(sc->sc_ucom.sc_dev), usbd_errstr(status)); usbd_clear_endpoint_stall_async(sc->sc_intr_pipe); diff --git a/sys/dev/video/bktr/bktr_audio.c b/sys/dev/video/bktr/bktr_audio.c index ac26f65f25..bce0eefffb 100644 --- a/sys/dev/video/bktr/bktr_audio.c +++ b/sys/dev/video/bktr/bktr_audio.c @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_audio.c,v 1.13 2003/12/08 07:59:18 obrien Exp $ - * $DragonFly: src/sys/dev/video/bktr/bktr_audio.c,v 1.8 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_audio.c,v 1.9 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -141,7 +141,7 @@ set_audio( bktr_ptr_t bktr, int cmd ) bktr->audio_mute_state = FALSE; /* clear mute */ break; default: - printf("%s: audio cmd error %02x\n", bktr_name(bktr), + kprintf("%s: audio cmd error %02x\n", bktr_name(bktr), cmd); return( -1 ); } @@ -186,7 +186,7 @@ set_audio( bktr_ptr_t bktr, int cmd ) temp = INL(bktr, BKTR_GPIO_DATA) & ~bktr->card.gpio_mux_bits; #if defined( AUDIOMUX_DISCOVER ) OUTL(bktr, BKTR_GPIO_DATA, temp | (cmd & 0xff)); - printf("%s: cmd: %d audio mux %x temp %x \n", bktr_name(bktr), + kprintf("%s: cmd: %d audio mux %x temp %x \n", bktr_name(bktr), cmd, bktr->card.audiomuxs[ idx ], temp ); #else OUTL(bktr, BKTR_GPIO_DATA, temp | bktr->card.audiomuxs[ idx ]); @@ -512,7 +512,7 @@ void msp_autodetect( bktr_ptr_t bktr ) { auto_detect = msp_dpl_read(bktr, bktr->msp_addr, 0x10, 0x007e); loops++; } while (auto_detect > 0xff && loops < 50); - if (bootverbose)printf ("%s: Result of autodetect after %dms: %d\n", + if (bootverbose)kprintf ("%s: Result of autodetect after %dms: %d\n", bktr_name(bktr), loops*10, auto_detect); /* Now set the audio baseband processing */ @@ -525,15 +525,15 @@ void msp_autodetect( bktr_ptr_t bktr ) { /* Read the stereo detection value from DSP reg 0x0018 */ DELAY(20000); stereo = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x0018); - if (bootverbose)printf ("%s: Stereo reg 0x18 a: %d\n", + if (bootverbose)kprintf ("%s: Stereo reg 0x18 a: %d\n", bktr_name(bktr), stereo); DELAY(20000); stereo = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x0018); - if (bootverbose)printf ("%s: Stereo reg 0x18 b: %d\n", + if (bootverbose)kprintf ("%s: Stereo reg 0x18 b: %d\n", bktr_name(bktr), stereo); DELAY(20000); stereo = msp_dpl_read(bktr, bktr->msp_addr, 0x12, 0x0018); - if (bootverbose)printf ("%s: Stereo reg 0x18 c: %d\n", + if (bootverbose)kprintf ("%s: Stereo reg 0x18 c: %d\n", bktr_name(bktr), stereo); if (stereo > 0x0100 && stereo < 0x8000) { /* Seems to be stereo */ msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0020);/* Loudspeaker set stereo*/ @@ -543,7 +543,7 @@ void msp_autodetect( bktr_ptr_t bktr ) { */ msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0005,0x3f28); } else if (stereo > 0x8000) { /* bilingual mode */ - if (bootverbose) printf ("%s: Bilingual mode detected\n", + if (bootverbose) kprintf ("%s: Bilingual mode detected\n", bktr_name(bktr)); msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0008,0x0000);/* Loudspeaker */ msp_dpl_write(bktr, bktr->msp_addr, 0x12, 0x0005,0x0000);/* all spatial effects off */ @@ -575,7 +575,7 @@ void msp_autodetect( bktr_ptr_t bktr ) { case 10: /* i-FM NICAM */ break; default: - if (bootverbose) printf ("%s: Unknown autodetection result value: %d\n", + if (bootverbose) kprintf ("%s: Unknown autodetection result value: %d\n", bktr_name(bktr), auto_detect); } diff --git a/sys/dev/video/bktr/bktr_card.c b/sys/dev/video/bktr/bktr_card.c index 3603a589ca..54a87306b7 100644 --- a/sys/dev/video/bktr/bktr_card.c +++ b/sys/dev/video/bktr/bktr_card.c @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_card.c,v 1.32 2005/02/10 22:38:51 julian Exp $ - * $DragonFly: src/sys/dev/video/bktr/bktr_card.c,v 1.9 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_card.c,v 1.10 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -594,7 +594,7 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit ) /* Select all GPIO bits as inputs */ OUTL(bktr, BKTR_GPIO_OUT_EN, 0); if (bootverbose) - printf("%s: GPIO is 0x%08x\n", bktr_name(bktr), + kprintf("%s: GPIO is 0x%08x\n", bktr_name(bktr), INL(bktr, BKTR_GPIO_DATA)); #ifdef HAUPPAUGE_MSP_RESET @@ -659,7 +659,7 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit ) subsystem_vendor_id = (byte_254 << 8) | byte_255; if ( bootverbose ) - printf("%s: subsystem 0x%04x 0x%04x\n", bktr_name(bktr), + kprintf("%s: subsystem 0x%04x 0x%04x\n", bktr_name(bktr), subsystem_vendor_id, subsystem_id); if (subsystem_vendor_id == PCI_VENDOR_AVERMEDIA) { @@ -733,12 +733,12 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit ) /* Vendor is unknown. We will use the standard probe code */ /* which may not give best results */ - printf("%s: Warning - card vendor 0x%04x (model 0x%04x) unknown.\n", + kprintf("%s: Warning - card vendor 0x%04x (model 0x%04x) unknown.\n", bktr_name(bktr), subsystem_vendor_id, subsystem_id); } else { - printf("%s: Card has no configuration EEPROM. Cannot determine card make.\n", + kprintf("%s: Card has no configuration EEPROM. Cannot determine card make.\n", bktr_name(bktr)); } } /* end of bt878/bt879 card detection code */ @@ -788,9 +788,9 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit ) bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); goto checkTuner; } - printf("%s: Warning: Unknown card type. EEPROM data not recognised\n", + kprintf("%s: Warning: Unknown card type. EEPROM data not recognised\n", bktr_name(bktr)); - printf("%s: %x %x %x %x\n", bktr_name(bktr), + kprintf("%s: %x %x %x %x\n", bktr_name(bktr), eeprom[0],eeprom[1],eeprom[2],eeprom[3]); } @@ -807,11 +807,11 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit ) signCard( bktr, 1, 128, (u_char *) &probe_signature ); if (bootverbose) { - printf("%s: card signature: ", bktr_name(bktr)); + kprintf("%s: card signature: ", bktr_name(bktr)); for (j = 0; j < Bt848_MAX_SIGN; j++) { - printf(" %02x ", probe_signature[j]); + kprintf(" %02x ", probe_signature[j]); } - printf("\n\n"); + kprintf("\n\n"); } for (i = 0; i < (sizeof bt848_card_signature)/ sizeof (struct bt848_card_sig); @@ -1003,7 +1003,7 @@ checkTuner: if (no_audio_mux) bktr->audio_mux_present = 0; if (verbose) - printf("%s: Hauppauge Model %d %c%c%c%c\n", + kprintf("%s: Hauppauge Model %d %c%c%c%c\n", bktr_name(bktr), model, ((revision >> 18) & 0x3f) + 32, @@ -1067,7 +1067,7 @@ checkTuner: goto checkDBX; default : - printf("%s: Warning - Unknown Hauppauge Tuner 0x%x\n", + kprintf("%s: Warning - Unknown Hauppauge Tuner 0x%x\n", bktr_name(bktr), tuner_code); } } @@ -1135,7 +1135,7 @@ checkTuner: goto checkDBX; } - printf("%s: Warning - Unknown AVerMedia Tuner Make %d Format %d\n", + kprintf("%s: Warning - Unknown AVerMedia Tuner Make %d Format %d\n", bktr_name(bktr), tuner_make, tuner_format); } break; @@ -1243,7 +1243,7 @@ checkMSPEnd: if (bktr->card.msp3400c) { bktr->msp_addr = MSP3400C_WADDR; msp_read_id( bktr ); - printf("%s: Detected a MSP%s at 0x%x\n", bktr_name(bktr), + kprintf("%s: Detected a MSP%s at 0x%x\n", bktr_name(bktr), bktr->msp_version_string, bktr->msp_addr); @@ -1257,7 +1257,7 @@ checkMSPEnd: if (bktr->card.dpl3518a) { bktr->dpl_addr = DPL3518A_WADDR; dpl_read_id( bktr ); - printf("%s: Detected a DPL%s at 0x%x\n", bktr_name(bktr), + kprintf("%s: Detected a DPL%s at 0x%x\n", bktr_name(bktr), bktr->dpl_version_string, bktr->dpl_addr); } @@ -1321,18 +1321,18 @@ checkPLLEnd: bktr->card.tuner_pllAddr = tuner_i2c_address; if ( verbose ) { - printf( "%s: %s", bktr_name(bktr), bktr->card.name ); + kprintf( "%s: %s", bktr_name(bktr), bktr->card.name ); if ( bktr->card.tuner ) - printf( ", %s tuner", bktr->card.tuner->name ); + kprintf( ", %s tuner", bktr->card.tuner->name ); if ( bktr->card.dbx ) - printf( ", dbx stereo" ); + kprintf( ", dbx stereo" ); if ( bktr->card.msp3400c ) - printf( ", msp3400c stereo" ); + kprintf( ", msp3400c stereo" ); if ( bktr->card.dpl3518a ) - printf( ", dpl3518a dolby" ); + kprintf( ", dpl3518a dolby" ); if ( bktr->remote_control ) - printf( ", remote control" ); - printf( ".\n" ); + kprintf( ", remote control" ); + kprintf( ".\n" ); } } diff --git a/sys/dev/video/bktr/bktr_core.c b/sys/dev/video/bktr/bktr_core.c index 34c3d0eea3..438a978479 100644 --- a/sys/dev/video/bktr/bktr_core.c +++ b/sys/dev/video/bktr/bktr_core.c @@ -62,7 +62,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.138 2005/01/09 17:42:03 cognet Exp - * $DragonFly: src/sys/dev/video/bktr/bktr_core.c,v 1.19 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_core.c,v 1.20 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -433,7 +433,7 @@ bktr_store_address(unit, BKTR_MEM_BUF, buf); if ( bootverbose ) { - printf("%s: buffer size %d, addr %p\n", + kprintf("%s: buffer size %d, addr %p\n", bktr_name(bktr), BROOKTREE_ALLOC, (void *)(uintptr_t)vtophys(buf)); } @@ -617,7 +617,7 @@ common_bktr_intr( void *arg ) status_sum |= (bktr_status & ~(BT848_INT_RSV0|BT848_INT_RSV1)); status_sum |= ((dstatus & (BT848_DSTATUS_COF|BT848_DSTATUS_LOF)) << 6); #endif /* STATUS_SUM */ - /* printf( "%s: STATUS %x %x %x \n", bktr_name(bktr), + /* kprintf( "%s: STATUS %x %x %x \n", bktr_name(bktr), dstatus, bktr_status, INL(bktr, BKTR_RISC_COUNT) ); */ @@ -677,7 +677,7 @@ common_bktr_intr( void *arg ) return 0; /** - printf( "%s: intr status %x %x %x\n", bktr_name(bktr), + kprintf( "%s: intr status %x %x %x\n", bktr_name(bktr), bktr_status, dstatus, INL(bktr, BKTR_RISC_COUNT) ); */ @@ -1120,7 +1120,7 @@ video_read(bktr_ptr_t bktr, int unit, cdev_t dev, struct uio *uio) if (!status) /* successful capture */ status = uiomove((caddr_t)bktr->bigbuf, count, uio); else - printf ("%s: read: tsleep error %d\n", + kprintf ("%s: read: tsleep error %d\n", bktr_name(bktr), status); bktr->flags &= ~(METEOR_SINGLE | METEOR_WANT_MASK); @@ -1544,7 +1544,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr if (error && (error != ERESTART)) { /* Here if we didn't get complete frame */ #ifdef DIAGNOSTIC - printf( "%s: ioctl: tsleep error %d %x\n", + kprintf( "%s: ioctl: tsleep error %d %x\n", bktr_name(bktr), error, INL(bktr, BKTR_RISC_COUNT)); #endif @@ -1611,7 +1611,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr /* Either even or odd, if even & odd, then these a zero */ if ((geo->oformat & METEOR_GEO_ODD_ONLY) && (geo->oformat & METEOR_GEO_EVEN_ONLY)) { - printf( "%s: ioctl: Geometry odd or even only.\n", + kprintf( "%s: ioctl: Geometry odd or even only.\n", bktr_name(bktr)); return( EINVAL ); } @@ -1627,20 +1627,20 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr bktr->flags &= ~METEOR_ONLY_EVEN_FIELDS; if (geo->columns <= 0) { - printf( + kprintf( "%s: ioctl: %d: columns must be greater than zero.\n", bktr_name(bktr), geo->columns); error = EINVAL; } else if ((geo->columns & 0x3fe) != geo->columns) { - printf( + kprintf( "%s: ioctl: %d: columns too large or not even.\n", bktr_name(bktr), geo->columns); error = EINVAL; } if (geo->rows <= 0) { - printf( + kprintf( "%s: ioctl: %d: rows must be greater than zero.\n", bktr_name(bktr), geo->rows); error = EINVAL; @@ -1648,14 +1648,14 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr else if (((geo->rows & 0x7fe) != geo->rows) || ((geo->oformat & METEOR_GEO_FIELD_MASK) && ((geo->rows & 0x3fe) != geo->rows)) ) { - printf( + kprintf( "%s: ioctl: %d: rows too large or not even.\n", bktr_name(bktr), geo->rows); error = EINVAL; } if (geo->frames > 32) { - printf("%s: ioctl: too many frames.\n", + kprintf("%s: ioctl: too many frames.\n", bktr_name(bktr)); error = EINVAL; @@ -1687,7 +1687,7 @@ video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr bktr->bigbuf = buf; bktr->alloc_pages = temp; if (bootverbose) - printf( + kprintf( "%s: ioctl: Allocating %d bytes\n", bktr_name(bktr), temp*PAGE_SIZE); } @@ -2155,7 +2155,7 @@ tuner_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr temp=(int)*(unsigned long *)arg; #ifdef BKTR_RADIO_DEBUG - printf("%s: arg=%d temp=%d\n", bktr_name(bktr), + kprintf("%s: arg=%d temp=%d\n", bktr_name(bktr), (int)*(unsigned long *)arg, temp); #endif @@ -2163,7 +2163,7 @@ tuner_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr /* According to the spec. sheet the band: 87.5MHz-108MHz */ /* is supported. */ if(temp<8750 || temp>10800) { - printf("%s: Radio frequency out of range\n", bktr_name(bktr)); + kprintf("%s: Radio frequency out of range\n", bktr_name(bktr)); return(EINVAL); } #endif @@ -2172,7 +2172,7 @@ tuner_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thr temp_mute( bktr, FALSE ); #ifdef BKTR_RADIO_DEBUG if(temp) - printf("%s: tv_freq returned: %d\n", bktr_name(bktr), temp); + kprintf("%s: tv_freq returned: %d\n", bktr_name(bktr), temp); #endif if ( temp < 0 ) return( EINVAL ); @@ -2414,7 +2414,7 @@ dump_bt848( bktr_ptr_t bktr ) int i; for (i = 0; i < 40; i+=4) { - printf("%s: Reg:value : \t%x:%x \t%x:%x \t %x:%x \t %x:%x\n", + kprintf("%s: Reg:value : \t%x:%x \t%x:%x \t %x:%x \t %x:%x\n", bktr_name(bktr), r[i], INL(bktr, r[i]), r[i+1], INL(bktr, r[i+1]), @@ -2422,11 +2422,11 @@ dump_bt848( bktr_ptr_t bktr ) r[i+3], INL(bktr, r[i+3]])); } - printf("%s: INT STAT %x \n", bktr_name(bktr), + kprintf("%s: INT STAT %x \n", bktr_name(bktr), INL(bktr, BKTR_INT_STAT)); - printf("%s: Reg INT_MASK %x \n", bktr_name(bktr), + kprintf("%s: Reg INT_MASK %x \n", bktr_name(bktr), INL(bktr, BKTR_INT_MASK)); - printf("%s: Reg GPIO_DMA_CTL %x \n", bktr_name(bktr), + kprintf("%s: Reg GPIO_DMA_CTL %x \n", bktr_name(bktr), INW(bktr, BKTR_GPIO_DMA_CTL)); return( 0 ); @@ -3342,7 +3342,7 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag ) temp = ((quad_t ) fp->htotal* (quad_t) fp->scaled_hactive * 4096 / fp->scaled_htotal / bktr->cols) - 4096; - /* printf("%s: HSCALE value is %d\n", bktr_name(bktr), temp); */ + /* kprintf("%s: HSCALE value is %d\n", bktr_name(bktr), temp); */ OUTB(bktr, BKTR_E_HSCALE_LO, temp & 0xff); OUTB(bktr, BKTR_O_HSCALE_LO, temp & 0xff); OUTB(bktr, BKTR_E_HSCALE_HI, (temp >> 8) & 0xff); @@ -3350,7 +3350,7 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag ) /* horizontal active */ temp = bktr->cols; - /* printf("%s: HACTIVE value is %d\n", bktr_name(bktr), temp); */ + /* kprintf("%s: HACTIVE value is %d\n", bktr_name(bktr), temp); */ OUTB(bktr, BKTR_E_HACTIVE_LO, temp & 0xff); OUTB(bktr, BKTR_O_HACTIVE_LO, temp & 0xff); OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0x3); @@ -3367,7 +3367,7 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag ) temp = temp & 0x3fe; - /* printf("%s: HDELAY value is %d\n", bktr_name(bktr), temp); */ + /* kprintf("%s: HDELAY value is %d\n", bktr_name(bktr), temp); */ OUTB(bktr, BKTR_E_DELAY_LO, temp & 0xff); OUTB(bktr, BKTR_O_DELAY_LO, temp & 0xff); OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0xc); @@ -3398,7 +3398,7 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag ) } tmp_int &= 0x1fff; - /* printf("%s: VSCALE value is %d\n", bktr_name(bktr), tmp_int); */ + /* kprintf("%s: VSCALE value is %d\n", bktr_name(bktr), tmp_int); */ OUTB(bktr, BKTR_E_VSCALE_LO, tmp_int & 0xff); OUTB(bktr, BKTR_O_VSCALE_LO, tmp_int & 0xff); OUTB(bktr, BKTR_E_VSCALE_HI, INB(bktr, BKTR_E_VSCALE_HI) & ~0x1f); @@ -3412,7 +3412,7 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag ) temp = bktr->capture_area_y_size; else temp = fp->vactive; - /* printf("%s: VACTIVE is %d\n", bktr_name(bktr), temp); */ + /* kprintf("%s: VACTIVE is %d\n", bktr_name(bktr), temp); */ OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0x30); OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) | ((temp >> 4) & 0x30)); OUTB(bktr, BKTR_E_VACTIVE_LO, temp & 0xff); @@ -3425,7 +3425,7 @@ build_dma_prog( bktr_ptr_t bktr, char i_flag ) temp = fp->vdelay + (bktr->capture_area_y_offset); else temp = fp->vdelay; - /* printf("%s: VDELAY is %d\n", bktr_name(bktr), temp); */ + /* kprintf("%s: VDELAY is %d\n", bktr_name(bktr), temp); */ OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) & ~0xC0); OUTB(bktr, BKTR_E_CROP, INB(bktr, BKTR_E_CROP) | ((temp >> 2) & 0xC0)); OUTB(bktr, BKTR_E_VDELAY_LO, temp & 0xff); diff --git a/sys/dev/video/bktr/bktr_core.h b/sys/dev/video/bktr/bktr_core.h index 8aeb62c42f..dfd38315f3 100644 --- a/sys/dev/video/bktr/bktr_core.h +++ b/sys/dev/video/bktr/bktr_core.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/bktr/bktr_core.h,v 1.5 2001/09/12 08:37:02 julian Exp $ */ -/* $DragonFly: src/sys/dev/video/bktr/bktr_core.h,v 1.5 2006/09/10 01:26:37 dillon Exp $ */ +/* $DragonFly: src/sys/dev/video/bktr/bktr_core.h,v 1.6 2006/12/22 23:26:26 swildner Exp $ */ /* * This is part of the Driver for Video Capture Cards (Frame grabbers) @@ -69,7 +69,7 @@ void msp_dpl_write( bktr_ptr_t bktr, int i2c_addr, unsigned char dev, #define VBI_SLEEP ((caddr_t)bktr + 1) -/* device name for printf */ +/* device name for kprintf */ const char *bktr_name(bktr_ptr_t bktr); /* Prototypes for attatch and interrupt functions */ diff --git a/sys/dev/video/bktr/bktr_i2c.c b/sys/dev/video/bktr/bktr_i2c.c index ad9cf7a2f8..0ed1bd9524 100644 --- a/sys/dev/video/bktr/bktr_i2c.c +++ b/sys/dev/video/bktr/bktr_i2c.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_i2c.c,v 1.25 2003/12/08 07:59:18 obrien Exp $ - * $DragonFly: src/sys/dev/video/bktr/bktr_i2c.c,v 1.8 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_i2c.c,v 1.9 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -235,7 +235,7 @@ bti2c_write(struct bktr_softc *sc, u_long data) /* clear status bits */ OUTL(sc, BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE)); - BTI2C_DEBUG(printf("w%lx", data)); + BTI2C_DEBUG(kprintf("w%lx", data)); /* write the address and data */ OUTL(sc, BKTR_I2C_DATA_CTL, data); @@ -248,11 +248,11 @@ bti2c_write(struct bktr_softc *sc, u_long data) /* check for ACK */ if ( !x || !( INL(sc, BKTR_INT_STAT) & BT848_INT_RACK) ) { - BTI2C_DEBUG(printf("%c%c", (!x)?'+':'-', + BTI2C_DEBUG(kprintf("%c%c", (!x)?'+':'-', (!( INL(sc, BKTR_INT_STAT) & BT848_INT_RACK))?'+':'-')); return (SMB_ENOACK); } - BTI2C_DEBUG(printf("+")); + BTI2C_DEBUG(kprintf("+")); /* return OK */ return( 0 ); @@ -303,7 +303,7 @@ bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte) OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd); - BTI2C_DEBUG(printf("r%lx/", (u_long)(((slave & 0xff) << 24) | (u_char)cmd))); + BTI2C_DEBUG(kprintf("r%lx/", (u_long)(((slave & 0xff) << 24) | (u_char)cmd))); /* wait for completion */ for ( x = 0x7fffffff; x; --x ) { /* safety valve */ @@ -313,13 +313,13 @@ bti2c_smb_readb(device_t dev, u_char slave, char cmd, char *byte) /* check for ACK */ if ( !x || !(INL(sc,BKTR_INT_STAT) & BT848_INT_RACK) ) { - BTI2C_DEBUG(printf("r%c%c", (!x)?'+':'-', + BTI2C_DEBUG(kprintf("r%c%c", (!x)?'+':'-', (!( INL(sc,BKTR_INT_STAT) & BT848_INT_RACK))?'+':'-')); return (SMB_ENOACK); } *byte = (char)((INL(sc,BKTR_I2C_DATA_CTL) >> 8) & 0xff); - BTI2C_DEBUG(printf("r%x+", *byte)); + BTI2C_DEBUG(kprintf("r%x+", *byte)); return (0); } diff --git a/sys/dev/video/bktr/bktr_mem.c b/sys/dev/video/bktr/bktr_mem.c index 5a1f636ceb..c111d62292 100644 --- a/sys/dev/video/bktr/bktr_mem.c +++ b/sys/dev/video/bktr/bktr_mem.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/bktr/bktr_mem.c,v 1.13 2005/01/27 01:40:12 imp Exp */ -/* $DragonFly: src/sys/dev/video/bktr/bktr_mem.c,v 1.6 2005/03/12 11:35:27 corecode Exp $ */ +/* $DragonFly: src/sys/dev/video/bktr/bktr_mem.c,v 1.7 2006/12/22 23:26:26 swildner Exp $ */ /* * This is prt of the Driver for Video Capture Cards (Frame grabbers) @@ -71,13 +71,13 @@ bktr_mem_modevent(module_t mod, int type, void *unused){ switch (type) { case MOD_LOAD: { - printf("bktr_mem: memory holder loaded\n"); + kprintf("bktr_mem: memory holder loaded\n"); bzero(memory_list, sizeof(memory_list)); return 0; } case MOD_UNLOAD: { - printf("bktr_mem: memory holder cannot be unloaded\n"); + kprintf("bktr_mem: memory holder cannot be unloaded\n"); return EBUSY; } default: @@ -92,7 +92,7 @@ int bktr_has_stored_addresses(int unit) { if ((unit < 0) || (unit >= BKTR_MEM_MAX_DEVICES)) { - printf("bktr_mem: Unit number %d invalid\n",unit); + kprintf("bktr_mem: Unit number %d invalid\n",unit); return 0; } @@ -105,7 +105,7 @@ void bktr_store_address(int unit, int type, vm_offset_t addr) { if ((unit < 0) || (unit >= BKTR_MEM_MAX_DEVICES)) { - printf("bktr_mem: Unit number %d invalid for memory type %d, address %p\n" + kprintf("bktr_mem: Unit number %d invalid for memory type %d, address %p\n" ,unit,type,(void *)addr); return; } @@ -126,7 +126,7 @@ bktr_store_address(int unit, int type, vm_offset_t addr) { case BKTR_MEM_BUF: memory_list[unit].buf = addr; memory_list[unit].addresses_stored = 1; break; - default: printf("bktr_mem: Invalid memory type %d for bktr%d, address %p\n", + default: kprintf("bktr_mem: Invalid memory type %d for bktr%d, address %p\n", type,unit,(void *)addr); break; } @@ -138,7 +138,7 @@ vm_offset_t bktr_retrieve_address(int unit, int type) { if ((unit < 0) || (unit >= BKTR_MEM_MAX_DEVICES)) { - printf("bktr_mem: Unit number %d too large for memory type %d\n",unit,type); + kprintf("bktr_mem: Unit number %d too large for memory type %d\n",unit,type); return NULL; } switch (type) { @@ -147,7 +147,7 @@ bktr_retrieve_address(int unit, int type) { case BKTR_MEM_VBIDATA: return memory_list[unit].vbidata; case BKTR_MEM_VBIBUFFER: return memory_list[unit].vbibuffer; case BKTR_MEM_BUF: return memory_list[unit].buf; - default: printf("bktr_mem: Invalid memory type %d for bktr%d",type,unit); + default: kprintf("bktr_mem: Invalid memory type %d for bktr%d",type,unit); return NULL; } } diff --git a/sys/dev/video/bktr/bktr_os.c b/sys/dev/video/bktr/bktr_os.c index 78c519b9d7..3179cd524e 100644 --- a/sys/dev/video/bktr/bktr_os.c +++ b/sys/dev/video/bktr/bktr_os.c @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.45 2004/03/17 17:50:28 njl Exp $ - * $DragonFly: src/sys/dev/video/bktr/bktr_os.c,v 1.17 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_os.c,v 1.18 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -272,7 +272,7 @@ bktr_attach( device_t dev ) old_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); pci_conf_write(tag, PCI_INTERRUPT_REG, BROOKTREE_IRQ); new_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); - printf("bktr%d: attach: irq changed from %d to %d\n", + kprintf("bktr%d: attach: irq changed from %d to %d\n", unit, (old_irq & 0xff), (new_irq & 0xff)); #endif @@ -303,12 +303,12 @@ bktr_attach( device_t dev ) fun = fun | 1; /* Enable writes to the sub-system vendor ID */ #if defined( BKTR_430_FX_MODE ) - if (bootverbose) printf("Using 430 FX chipset compatibilty mode\n"); + if (bootverbose) kprintf("Using 430 FX chipset compatibilty mode\n"); fun = fun | 2; /* Enable Intel 430 FX compatibility mode */ #endif #if defined( BKTR_SIS_VIA_MODE ) - if (bootverbose) printf("Using SiS/VIA chipset compatibilty mode\n"); + if (bootverbose) kprintf("Using SiS/VIA chipset compatibilty mode\n"); fun = fun | 4; /* Enable SiS/VIA compatibility mode (usefull for OPTi chipset motherboards too */ #endif @@ -316,7 +316,7 @@ bktr_attach( device_t dev ) #if defined(BKTR_USE_FREEBSD_SMBUS) if (bt848_i2c_attach(dev)) - printf("bktr%d: i2c_attach: can't attach\n", unit); + kprintf("bktr%d: i2c_attach: can't attach\n", unit); #endif /* @@ -330,9 +330,9 @@ bktr_attach( device_t dev ) latency = (latency >> 8) & 0xff; if ( bootverbose ) { if (latency) - printf("brooktree%d: PCI bus latency is", unit); + kprintf("brooktree%d: PCI bus latency is", unit); else - printf("brooktree%d: PCI bus latency was 0 changing to", + kprintf("brooktree%d: PCI bus latency was 0 changing to", unit); } if ( !latency ) { @@ -340,7 +340,7 @@ bktr_attach( device_t dev ) pci_write_config(dev, PCI_LATENCY_TIMER, latency<<8, 4); } if ( bootverbose ) { - printf(" %d.\n", (int) latency); + kprintf(" %d.\n", (int) latency); } /* read the pci device id and revision id */ @@ -388,7 +388,7 @@ bktr_detach( device_t dev ) #if defined(BKTR_USE_FREEBSD_SMBUS) if (bt848_i2c_detach(dev)) - printf("bktr%d: i2c_attach: can't attach\n", + kprintf("bktr%d: i2c_attach: can't attach\n", device_get_unit(dev)); #endif #ifdef USE_VBIMUTEX @@ -442,7 +442,7 @@ get_bktr_mem( int unit, unsigned size ) addr = (vm_offset_t)contigmalloc(size, M_DEVBUF, M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0); if (addr == 0) { - printf("bktr%d: Unable to allocate %d bytes of memory.\n", + kprintf("bktr%d: Unable to allocate %d bytes of memory.\n", unit, size); } diff --git a/sys/dev/video/bktr/bktr_tuner.c b/sys/dev/video/bktr/bktr_tuner.c index 0e559036ef..54801616d0 100644 --- a/sys/dev/video/bktr/bktr_tuner.c +++ b/sys/dev/video/bktr/bktr_tuner.c @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_tuner.c,v 1.18 2005/01/23 07:13:09 julian Exp - * $DragonFly: src/sys/dev/video/bktr/bktr_tuner.c,v 1.8 2006/10/25 20:56:02 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_tuner.c,v 1.9 2006/12/22 23:26:26 swildner Exp $ */ @@ -835,7 +835,7 @@ tv_freq( bktr_ptr_t bktr, int frequency, int type ) /* AFC failed, restore requested frequency */ N = frequency + TBL_IF; #if defined( TEST_TUNER_AFC ) - printf("%s: do_afc: failed to lock\n", + kprintf("%s: do_afc: failed to lock\n", bktr_name(bktr)); #endif i2cWrite( bktr, addr, (N>>8) & 0x7f, N & 0xff ); @@ -843,9 +843,9 @@ tv_freq( bktr_ptr_t bktr, int frequency, int type ) else frequency = N - TBL_IF; #if defined( TEST_TUNER_AFC ) - printf("%s: do_afc: returned freq %d (%d %% %d)\n", bktr_name(bktr), frequency, frequency / 16, frequency % 16); + kprintf("%s: do_afc: returned freq %d (%d %% %d)\n", bktr_name(bktr), frequency, frequency / 16, frequency % 16); afcDelta = frequency - oldFrequency; - printf("%s: changed by: %d clicks (%d mod %d)\n", bktr_name(bktr), afcDelta, afcDelta / 16, afcDelta % 16); + kprintf("%s: changed by: %d clicks (%d mod %d)\n", bktr_name(bktr), afcDelta, afcDelta / 16, afcDelta % 16); #endif } #endif /* TUNER_AFC */ @@ -914,14 +914,14 @@ do_afc( bktr_ptr_t bktr, int addr, int frequency ) return( -1 ); #if defined( TEST_TUNER_AFC ) - printf( "%s: Original freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); + kprintf( "%s: Original freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); #endif for ( step = 0; step < AFC_MAX_STEP; ++step ) { if ( (status = i2cRead( bktr, addr + 1 )) < 0 ) goto fubar; if ( !(status & 0x40) ) { #if defined( TEST_TUNER_AFC ) - printf( "%s: no lock!\n", bktr_name(bktr) ); + kprintf( "%s: no lock!\n", bktr_name(bktr) ); #endif goto fubar; } @@ -929,14 +929,14 @@ do_afc( bktr_ptr_t bktr, int addr, int frequency ) switch( status & AFC_BITS ) { case AFC_FREQ_CENTERED: #if defined( TEST_TUNER_AFC ) - printf( "%s: Centered, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); + kprintf( "%s: Centered, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); #endif return( frequency ); case AFC_FREQ_MINUS_125: case AFC_FREQ_MINUS_62: #if defined( TEST_TUNER_AFC ) - printf( "%s: Low, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); + kprintf( "%s: Low, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); #endif --frequency; break; @@ -944,7 +944,7 @@ do_afc( bktr_ptr_t bktr, int addr, int frequency ) case AFC_FREQ_PLUS_62: case AFC_FREQ_PLUS_125: #if defined( TEST_TUNER_AFC ) - printf( "%s: Hi, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); + kprintf( "%s: Hi, freq: %d, status: 0x%02x\n", bktr_name(bktr), frequency, status ); #endif ++frequency; break; @@ -1054,13 +1054,13 @@ _MT2032_GetRegister(bktr_ptr_t bktr, u_char regNum) if (i2cWrite(bktr, MT2032_ADDR, regNum, -1) == -1) { if (bootverbose) - printf("%s: MT2032 write failed (i2c addr %#x)\n", + kprintf("%s: MT2032 write failed (i2c addr %#x)\n", bktr_name(bktr), MT2032_ADDR); return -1; } if ((ch = i2cRead(bktr, MT2032_ADDR + 1)) == -1) { if (bootverbose) - printf("%s: MT2032 get register %d failed\n", + kprintf("%s: MT2032 get register %d failed\n", bktr_name(bktr), regNum); return -1; } @@ -1095,11 +1095,11 @@ mt2032_init(bktr_ptr_t bktr) if (i < 21) return -1; - printf("%s: MT2032: Companycode=%02x%02x Part=%02x Revision=%02x\n", + kprintf("%s: MT2032: Companycode=%02x%02x Part=%02x Revision=%02x\n", bktr_name(bktr), rdbuf[0x11], rdbuf[0x12], rdbuf[0x13], rdbuf[0x14]); if (rdbuf[0x13] != 4) { - printf("%s: MT2032 not found or unknown type\n", bktr_name(bktr)); + kprintf("%s: MT2032 not found or unknown type\n", bktr_name(bktr)); return -1; } @@ -1246,7 +1246,7 @@ MT2032_ComputeFreq( if (lo1a < 0 || lo1a > 7 || lo1n < 17 || lo1n > 48 || lo2a < 0 || lo2a > 7 || lo2n < 17 || lo2n > 30) { - printf("MT2032: parameter out of range\n"); + kprintf("MT2032: parameter out of range\n"); return -1; } /* set up MT2032 register map for transfer over i2c */ @@ -1357,7 +1357,7 @@ MT2032_SetIFFreq(bktr_ptr_t bktr, int rfin, int if1, int if2, int from, int to) MT2032_SetRegister(7, 8 + MT2032_XOGC); } if (lock != 6) - printf("%s: PLL didn't lock\n", bktr_name(bktr)); + kprintf("%s: PLL didn't lock\n", bktr_name(bktr)); MT2032_SetRegister(2, 0x20); @@ -1387,7 +1387,7 @@ mt2032_set_tv_freq(bktr_ptr_t bktr, unsigned int freq) stat = MT2032_GetRegister(0x0e); tad = MT2032_GetRegister(0x0f); if (bootverbose) - printf("%s: frequency set to %d, st = %#x, tad = %#x\n", + kprintf("%s: frequency set to %d, st = %#x, tad = %#x\n", bktr_name(bktr), freq*62500, stat, tad); } } diff --git a/sys/dev/video/bktr/msp34xx.c b/sys/dev/video/bktr/msp34xx.c index b658d5ca8a..189610db67 100644 --- a/sys/dev/video/bktr/msp34xx.c +++ b/sys/dev/video/bktr/msp34xx.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/msp34xx.c,v 1.5 2004/12/16 23:19:57 julian Exp - * $DragonFly: src/sys/dev/video/bktr/msp34xx.c,v 1.6 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/msp34xx.c,v 1.7 2006/12/22 23:26:26 swildner Exp $ */ /* @@ -143,8 +143,8 @@ struct msp3400c { #define dprintk(args) do { \ if (bootverbose) { \ - printf("%s: ", bktr_name(client)); \ - printf args; \ + kprintf("%s: ", bktr_name(client)); \ + kprintf args; \ } \ } while (0) @@ -532,22 +532,22 @@ static void msp3400c_print_mode(struct msp3400c *msp) { if (msp->main == msp->second) { - printf("bktr: msp3400: mono sound carrier: %d.%03d MHz\n", + kprintf("bktr: msp3400: mono sound carrier: %d.%03d MHz\n", msp->main/910000,(msp->main/910)%1000); } else { - printf("bktr: msp3400: main sound carrier: %d.%03d MHz\n", + kprintf("bktr: msp3400: main sound carrier: %d.%03d MHz\n", msp->main/910000,(msp->main/910)%1000); } if (msp->mode == MSP_MODE_FM_NICAM1 || msp->mode == MSP_MODE_FM_NICAM2) - printf("bktr: msp3400: NICAM/FM carrier : %d.%03d MHz\n", + kprintf("bktr: msp3400: NICAM/FM carrier : %d.%03d MHz\n", msp->second/910000,(msp->second/910)%1000); if (msp->mode == MSP_MODE_AM_NICAM) - printf("bktr: msp3400: NICAM/AM carrier : %d.%03d MHz\n", + kprintf("bktr: msp3400: NICAM/AM carrier : %d.%03d MHz\n", msp->second/910000,(msp->second/910)%1000); if (msp->mode == MSP_MODE_FM_TERRA && msp->main != msp->second) { - printf("bktr: msp3400: FM-stereo carrier : %d.%03d MHz\n", + kprintf("bktr: msp3400: FM-stereo carrier : %d.%03d MHz\n", msp->second/910000,(msp->second/910)%1000); } } @@ -1161,7 +1161,7 @@ int msp_attach(bktr_ptr_t bktr) kfree(msp->threaddesc, M_DEVBUF); kfree(msp, M_DEVBUF); bktr->msp3400c_info = NULL; - printf("%s: msp3400: error while reading chip version\n", bktr_name(bktr)); + kprintf("%s: msp3400: error while reading chip version\n", bktr_name(bktr)); return ENXIO; } @@ -1185,17 +1185,17 @@ int msp_attach(bktr_ptr_t bktr) /* hello world :-) */ if (bootverbose) { - printf("%s: msp34xx: init: chip=%s", bktr_name(bktr), buf); + kprintf("%s: msp34xx: init: chip=%s", bktr_name(bktr), buf); if (msp->nicam) - printf(", has NICAM support"); - printf("\n"); + kprintf(", has NICAM support"); + kprintf("\n"); } /* startup control thread */ err = kthread_create(msp->simple ? msp3410d_thread : msp3400c_thread, bktr, &msp->kthread, msp->threaddesc); if (err) { - printf("%s: Error returned by kthread_create: %d", bktr_name(bktr), err); + kprintf("%s: Error returned by kthread_create: %d", bktr_name(bktr), err); kfree(msp->threaddesc, M_DEVBUF); kfree(msp, M_DEVBUF); bktr->msp3400c_info = NULL; diff --git a/sys/dev/video/fb/bmp/splash_bmp.c b/sys/dev/video/fb/bmp/splash_bmp.c index 418d3eb4f6..951fff6bda 100644 --- a/sys/dev/video/fb/bmp/splash_bmp.c +++ b/sys/dev/video/fb/bmp/splash_bmp.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/modules/splash/bmp/splash_bmp.c,v 1.10.2.3 2000/10/31 08:00:06 nyan Exp $ - * $DragonFly: src/sys/dev/video/fb/bmp/splash_bmp.c,v 1.8 2005/07/29 21:17:08 swildner Exp $ + * $DragonFly: src/sys/dev/video/fb/bmp/splash_bmp.c,v 1.9 2006/12/22 23:26:27 swildner Exp $ */ #include @@ -78,7 +78,7 @@ bmp_start(video_adapter_t *adp) int i; if ((bmp_decoder.data == NULL) || (bmp_decoder.data_size <= 0)) { - printf("splash_bmp: No bitmap file found\n"); + kprintf("splash_bmp: No bitmap file found\n"); return ENODEV; } for (i = 0; modes[i] >= 0; ++i) { @@ -89,9 +89,9 @@ bmp_start(video_adapter_t *adp) } splash_mode = modes[i]; if (splash_mode < 0) - printf("splash_bmp: No appropriate video mode found\n"); + kprintf("splash_bmp: No appropriate video mode found\n"); if (bootverbose) - printf("bmp_start(): splash_mode:%d\n", splash_mode); + kprintf("bmp_start(): splash_mode:%d\n", splash_mode); return ((splash_mode < 0) ? ENODEV : 0); } @@ -485,13 +485,13 @@ bmp_Init(const char *data, int swidth, int sheight, int sdepth) /* check file ID */ if (bmf->bmfh.bfType != 0x4d42) { - printf("splash_bmp: not a BMP file\n"); + kprintf("splash_bmp: not a BMP file\n"); return(1); /* XXX check word ordering for big-endian ports? */ } /* do we understand this bitmap format? */ if (bmf->bmfi.bmiHeader.biSize > sizeof(bmf->bmfi.bmiHeader)) { - printf("splash_bmp: unsupported BMP format (size=%d)\n", + kprintf("splash_bmp: unsupported BMP format (size=%d)\n", bmf->bmfi.bmiHeader.biSize); return(1); } @@ -516,7 +516,7 @@ bmp_Init(const char *data, int swidth, int sheight, int sdepth) case BI_RLE8: break; default: - printf("splash_bmp: unsupported compression format\n"); + kprintf("splash_bmp: unsupported compression format\n"); return(1); /* unsupported compression format */ } @@ -530,7 +530,7 @@ bmp_Init(const char *data, int swidth, int sheight, int sdepth) (bmp_info.width > bmp_info.swidth) || (bmp_info.ncols > (1 << sdepth))) { if (bootverbose) - printf("splash_bmp: beyond screen capacity (%dx%d, %d colors)\n", + kprintf("splash_bmp: beyond screen capacity (%dx%d, %d colors)\n", bmp_info.width, bmp_info.height, bmp_info.ncols); return(1); } diff --git a/sys/dev/video/fb/fb.c b/sys/dev/video/fb/fb.c index 2ed9c3b3d9..55f3a49e7f 100644 --- a/sys/dev/video/fb/fb.c +++ b/sys/dev/video/fb/fb.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/fb.c,v 1.11.2.2 2000/08/02 22:35:22 peter Exp $ - * $DragonFly: src/sys/dev/video/fb/fb.c,v 1.16 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/fb.c,v 1.17 2006/12/22 23:26:27 swildner Exp $ */ #include "opt_fb.h" @@ -115,7 +115,7 @@ vid_realloc_array(void) crit_exit(); if (bootverbose) - printf("fb: new array size %d\n", adapters); + kprintf("fb: new array size %d\n", adapters); return 0; } @@ -341,7 +341,7 @@ fbprobe(device_t dev) static int fbattach(device_t dev) { - printf("fbattach: about to attach children\n"); + kprintf("fbattach: about to attach children\n"); bus_generic_attach(dev); return 0; } @@ -392,7 +392,7 @@ fb_attach(cdev_t dev, video_adapter_t *adp) vidcdevsw[adp->va_index] = dev; crit_exit(); - printf("fb%d at %s%d\n", adp->va_index, adp->va_name, adp->va_unit); + kprintf("fb%d at %s%d\n", adp->va_index, adp->va_name, adp->va_unit); return 0; } @@ -557,17 +557,17 @@ fb_dump_adp_info(char *driver, video_adapter_t *adp, int level) if (level <= 0) return; - printf("%s%d: %s%d, %s, type:%s (%d), flags:0x%x\n", + kprintf("%s%d: %s%d, %s, type:%s (%d), flags:0x%x\n", FB_DRIVER_NAME, adp->va_index, driver, adp->va_unit, adp->va_name, adapter_name(adp->va_type), adp->va_type, adp->va_flags); - printf("%s%d: port:0x%x-0x%x, crtc:0x%x, mem:0x%x 0x%x\n", + kprintf("%s%d: port:0x%x-0x%x, crtc:0x%x, mem:0x%x 0x%x\n", FB_DRIVER_NAME, adp->va_index, adp->va_io_base, adp->va_io_base + adp->va_io_size - 1, adp->va_crtc_addr, adp->va_mem_base, adp->va_mem_size); - printf("%s%d: init mode:%d, bios mode:%d, current mode:%d\n", + kprintf("%s%d: init mode:%d, bios mode:%d, current mode:%d\n", FB_DRIVER_NAME, adp->va_index, adp->va_initial_mode, adp->va_initial_bios_mode, adp->va_mode); - printf("%s%d: window:%p size:%dk gran:%dk, buf:%p size:%dk\n", + kprintf("%s%d: window:%p size:%dk gran:%dk, buf:%p size:%dk\n", FB_DRIVER_NAME, adp->va_index, (void *)adp->va_window, (int)adp->va_window_size/1024, (int)adp->va_window_gran/1024, (void *)adp->va_buffer, @@ -581,18 +581,18 @@ fb_dump_mode_info(char *driver, video_adapter_t *adp, video_info_t *info, if (level <= 0) return; - printf("%s%d: %s, mode:%d, flags:0x%x ", + kprintf("%s%d: %s, mode:%d, flags:0x%x ", driver, adp->va_unit, adp->va_name, info->vi_mode, info->vi_flags); if (info->vi_flags & V_INFO_GRAPHICS) - printf("G %dx%dx%d, %d plane(s), font:%dx%d, ", + kprintf("G %dx%dx%d, %d plane(s), font:%dx%d, ", info->vi_width, info->vi_height, info->vi_depth, info->vi_planes, info->vi_cwidth, info->vi_cheight); else - printf("T %dx%d, font:%dx%d, ", + kprintf("T %dx%d, font:%dx%d, ", info->vi_width, info->vi_height, info->vi_cwidth, info->vi_cheight); - printf("win:0x%x\n", info->vi_window); + kprintf("win:0x%x\n", info->vi_window); } int diff --git a/sys/dev/video/fb/pcx/splash_pcx.c b/sys/dev/video/fb/pcx/splash_pcx.c index 665321deb9..b9fcd9b598 100644 --- a/sys/dev/video/fb/pcx/splash_pcx.c +++ b/sys/dev/video/fb/pcx/splash_pcx.c @@ -28,7 +28,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/modules/splash/pcx/splash_pcx.c,v 1.4 1999/08/28 00:47:39 peter Exp $ - * $DragonFly: src/sys/dev/video/fb/pcx/splash_pcx.c,v 1.4 2005/07/29 21:17:08 swildner Exp $ + * $DragonFly: src/sys/dev/video/fb/pcx/splash_pcx.c,v 1.5 2006/12/22 23:26:27 swildner Exp $ */ #include @@ -83,7 +83,7 @@ pcx_start(video_adapter_t *adp) return ENODEV; if (bootverbose) - printf("splash_pcx: image good:\n" + kprintf("splash_pcx: image good:\n" " width = %d\n" " height = %d\n" " depth = %d\n" @@ -95,7 +95,7 @@ pcx_start(video_adapter_t *adp) if (get_mode_info(adp, modes[i], &info) != 0) continue; if (bootverbose) - printf("splash_pcx: considering mode %d:\n" + kprintf("splash_pcx: considering mode %d:\n" " vi_width = %d\n" " vi_height = %d\n" " vi_depth = %d\n" @@ -114,7 +114,7 @@ pcx_start(video_adapter_t *adp) if (splash_mode == -1) return ENODEV; if (bootverbose) - printf("pcx_splash: selecting mode %d\n", splash_mode); + kprintf("pcx_splash: selecting mode %d\n", splash_mode); return 0; } @@ -173,7 +173,7 @@ pcx_init(const char *data, int size) || hdr->bpp != 8 || hdr->bpsl > MAXSCANLINE || data[size-769] != 12) { - printf("splash_pcx: invalid PCX image\n"); + kprintf("splash_pcx: invalid PCX image\n"); return 1; } pcx_info.width = hdr->xmax - hdr->xmin + 1; diff --git a/sys/dev/video/fb/splash.c b/sys/dev/video/fb/splash.c index 47a66324f6..0bd6a0e44a 100644 --- a/sys/dev/video/fb/splash.c +++ b/sys/dev/video/fb/splash.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/splash.c,v 1.8 2000/01/29 14:42:57 peter Exp $ - * $DragonFly: src/sys/dev/video/fb/splash.c,v 1.5 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/splash.c,v 1.6 2006/12/22 23:26:27 swildner Exp $ */ #include @@ -70,7 +70,7 @@ splash_find_data(splash_decoder_t *decoder) return ENOENT; decoder->data_size = *(size_t *)p; if (bootverbose) - printf("splash: image@%p, size:%lu\n", + kprintf("splash: image@%p, size:%lu\n", (void *)decoder->data, (long)decoder->data_size); return 0; } @@ -86,7 +86,7 @@ splash_test(splash_decoder_t *decoder) return ENODEV; /* XXX */ } if (bootverbose) - printf("splash: image decoder found: %s\n", decoder->name); + kprintf("splash: image decoder found: %s\n", decoder->name); return 0; } diff --git a/sys/dev/video/fb/vga.c b/sys/dev/video/fb/vga.c index e40fd369f3..56aa936f0d 100644 --- a/sys/dev/video/fb/vga.c +++ b/sys/dev/video/fb/vga.c @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/vga.c,v 1.9.2.1 2001/08/11 02:58:44 yokota Exp $ - * $DragonFly: src/sys/dev/video/fb/vga.c,v 1.18 2006/09/10 01:26:37 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/vga.c,v 1.19 2006/12/22 23:26:27 swildner Exp $ */ #include "opt_vga.h" @@ -1524,7 +1524,7 @@ vga_set_mode(video_adapter_t *adp, int mode) return EINVAL; #if VGA_DEBUG > 1 - printf("vga_set_mode(): setting mode %d\n", mode); + kprintf("vga_set_mode(): setting mode %d\n", mode); #endif params.sig = V_STATE_SIG; @@ -2127,7 +2127,7 @@ vga_save_state(video_adapter_t *adp, void *p, size_t size) buf[2] = info.vi_cheight; /* POINTS */ } else { /* XXX: shouldn't be happening... */ - printf("vga%d: %s: failed to obtain mode info. (vga_save_state())\n", + kprintf("vga%d: %s: failed to obtain mode info. (vga_save_state())\n", adp->va_unit, adp->va_name); } #else @@ -2438,7 +2438,7 @@ vga_mmap_buf(video_adapter_t *adp, vm_offset_t offset, int prot) return -1; #if VGA_DEBUG > 0 - printf("vga_mmap_buf(): window:0x%x, offset:0x%x\n", + kprintf("vga_mmap_buf(): window:0x%x, offset:0x%x\n", adp->va_info.vi_window, offset); #endif @@ -2946,9 +2946,9 @@ dump_buffer(u_char *buf, size_t len) int i; for(i = 0; i < len;) { - printf("%02x ", buf[i]); + kprintf("%02x ", buf[i]); if ((++i % 16) == 0) - printf("\n"); + kprintf("\n"); } } @@ -2973,20 +2973,20 @@ vga_diag(video_adapter_t *adp, int level) #if FB_DEBUG > 1 #ifndef VGA_NO_BIOS - printf("vga: RTC equip. code:0x%02x, DCC code:0x%02x\n", + kprintf("vga: RTC equip. code:0x%02x, DCC code:0x%02x\n", rtcin(RTC_EQUIPMENT), readb(BIOS_PADDRTOVADDR(0x488))); - printf("vga: CRTC:0x%x, video option:0x%02x, ", + kprintf("vga: CRTC:0x%x, video option:0x%02x, ", readw(BIOS_PADDRTOVADDR(0x463)), readb(BIOS_PADDRTOVADDR(0x487))); - printf("rows:%d, cols:%d, font height:%d\n", + kprintf("rows:%d, cols:%d, font height:%d\n", readb(BIOS_PADDRTOVADDR(0x44a)), readb(BIOS_PADDRTOVADDR(0x484)) + 1, readb(BIOS_PADDRTOVADDR(0x485))); #endif /* VGA_NO_BIOS */ #if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE) - printf("vga: param table EGA/VGA:%p", video_mode_ptr); - printf(", CGA/MDA:%p\n", video_mode_ptr2); - printf("vga: rows_offset:%d\n", rows_offset); + kprintf("vga: param table EGA/VGA:%p", video_mode_ptr); + kprintf(", CGA/MDA:%p\n", video_mode_ptr2); + kprintf("vga: rows_offset:%d\n", rows_offset); #endif #endif /* FB_DEBUG > 1 */ @@ -3011,7 +3011,7 @@ vga_diag(video_adapter_t *adp, int level) return 0; #if !defined(VGA_NO_BIOS) && !defined(VGA_NO_MODE_CHANGE) if (video_mode_ptr == NULL) - printf("vga%d: %s: WARNING: video mode switching is not " + kprintf("vga%d: %s: WARNING: video mode switching is not " "fully supported on this adapter\n", adp->va_unit, adp->va_name); #endif @@ -3019,16 +3019,16 @@ vga_diag(video_adapter_t *adp, int level) return 0; if (adp->va_type == KD_VGA) { - printf("VGA parameters upon power-up\n"); + kprintf("VGA parameters upon power-up\n"); dump_buffer(adpstate.regs, sizeof(adpstate.regs)); - printf("VGA parameters in BIOS for mode %d\n", adp->va_initial_mode); + kprintf("VGA parameters in BIOS for mode %d\n", adp->va_initial_mode); dump_buffer(adpstate2.regs, sizeof(adpstate2.regs)); } mp = get_mode_param(adp->va_initial_mode); if (mp == NULL) /* this shouldn't be happening */ return 0; - printf("EGA/VGA parameters to be used for mode %d\n", adp->va_initial_mode); + kprintf("EGA/VGA parameters to be used for mode %d\n", adp->va_initial_mode); dump_buffer(mp, V_MODE_PARAM_SIZE); return 0; diff --git a/sys/dev/video/gsc/gsc.c b/sys/dev/video/gsc/gsc.c index a65377826d..ca7f4682c1 100644 --- a/sys/dev/video/gsc/gsc.c +++ b/sys/dev/video/gsc/gsc.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/gsc.c,v 1.35.2.1 2000/08/08 19:49:53 peter Exp $ - * $DragonFly: src/sys/dev/video/gsc/gsc.c,v 1.14 2006/12/20 18:14:41 dillon Exp $ + * $DragonFly: src/sys/dev/video/gsc/gsc.c,v 1.15 2006/12/22 23:26:27 swildner Exp $ * */ @@ -72,7 +72,7 @@ #define lprintf(args) \ do { \ if (scu->flags & FLAG_DEBUG) \ - printf args; \ + kprintf args; \ } while (0) #else #define lprintf(args) @@ -492,7 +492,7 @@ gscattach(struct isa_device *isdp) isdp->id_maddr, isdp->id_msize)); - printf("gsc%d: GeniScan GS-4500 at %ddpi\n", + kprintf("gsc%d: GeniScan GS-4500 at %ddpi\n", unit, geomtab[scu->geometry].dpi); /* @@ -551,7 +551,7 @@ gscopen (struct dev_open_args *ap) { #ifdef GSCDEBUG /* XXX lprintf isn't valid here since there is no scu. */ - printf("gsc%d.open: unconfigured unit number (max %d)\n", unit, NGSC); + kprintf("gsc%d.open: unconfigured unit number (max %d)\n", unit, NGSC); #endif return ENXIO; } diff --git a/sys/dev/video/i386/vesa/vesa.c b/sys/dev/video/i386/vesa/vesa.c index c037af2e2a..260ce63322 100644 --- a/sys/dev/video/i386/vesa/vesa.c +++ b/sys/dev/video/i386/vesa/vesa.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/vesa.c,v 1.32.2.1 2002/08/13 02:42:33 rwatson Exp $ - * $DragonFly: src/sys/dev/video/i386/vesa/vesa.c,v 1.15 2006/09/07 07:14:48 y0netan1 Exp $ + * $DragonFly: src/sys/dev/video/i386/vesa/vesa.c,v 1.16 2006/12/22 23:26:27 swildner Exp $ */ #include "opt_vga.h" @@ -217,9 +217,9 @@ dump_buffer(u_char *buf, size_t len) int i; for (i = 0; i < len;) { - printf("%02x ", buf[i]); + kprintf("%02x ", buf[i]); if ((++i % 16) == 0) - printf("\n"); + kprintf("\n"); } } @@ -483,7 +483,7 @@ vesa_bios_set_line_length(int pixel, int *bytes, int *lines) vmf.vmf_ecx = pixel; err = vm86_intcall(0x10, &vmf); #if VESA_DEBUG > 1 - printf("bx:%d, cx:%d, dx:%d\n", vmf.vmf_bx, vmf.vmf_cx, vmf.vmf_dx); + kprintf("bx:%d, cx:%d, dx:%d\n", vmf.vmf_bx, vmf.vmf_cx, vmf.vmf_dx); #endif if ((err != 0) || (vmf.vmf_ax != 0x4f)) return 1; @@ -649,11 +649,11 @@ vesa_bios_init(void) bcopy(vmbuf, buf, sizeof(buf)); vesa_adp_info = (struct vesa_info *)buf; if (bootverbose) { - printf("VESA: information block\n"); + kprintf("VESA: information block\n"); dump_buffer(buf, 64); } if (vesa_adp_info->v_version < 0x0102) { - printf("VESA: VBE version %d.%d is not supported; " + kprintf("VESA: VBE version %d.%d is not supported; " "version 1.2 or later is required.\n", ((vesa_adp_info->v_version & 0xf000) >> 12) * 10 + ((vesa_adp_info->v_version & 0x0f00) >> 8), @@ -699,7 +699,7 @@ vesa_bios_init(void) #else if ((vmode.v_modeattr & V_MODEOPTINFO) == 0) { #if VESA_DEBUG > 1 - printf("Rejecting VESA %s mode: %d x %d x %d bpp attr = %x\n", + kprintf("Rejecting VESA %s mode: %d x %d x %d bpp attr = %x\n", vmode.v_modeattr & V_MODEGRAPHICS ? "graphics" : "text", vmode.v_width, vmode.v_height, vmode.v_bpp, vmode.v_modeattr); @@ -714,7 +714,7 @@ vesa_bios_init(void) p = kmalloc(sizeof(*vesa_vmode)*(vesa_vmode_max + 1), M_DEVBUF, M_WAITOK); #if VESA_DEBUG > 1 - printf("vesa_bios_init(): modes:%d, vesa_mode_max:%d\n", + kprintf("vesa_bios_init(): modes:%d, vesa_mode_max:%d\n", modes, vesa_vmode_max); #endif if (modes > 0) { @@ -725,7 +725,7 @@ vesa_bios_init(void) } #if VESA_DEBUG > 1 - printf("Found VESA %s mode: %d x %d x %d bpp\n", + kprintf("Found VESA %s mode: %d x %d x %d bpp\n", vmode.v_modeattr & V_MODEGRAPHICS ? "graphics" : "text", vmode.v_width, vmode.v_height, vmode.v_bpp); #endif @@ -805,7 +805,7 @@ vesa_bios_init(void) } vesa_vmode[modes].vi_mode = EOT; if (bootverbose) - printf("VESA: %d mode(s) found\n", modes); + kprintf("VESA: %d mode(s) found\n", modes); has_vesa_bios = (modes > 0); if (!has_vesa_bios) @@ -833,7 +833,7 @@ vesa_map_buffer(u_int paddr, size_t size) off = paddr - trunc_page(paddr); vaddr = (vm_offset_t)pmap_mapdev(paddr - off, size + off); #if VESA_DEBUG > 1 - printf("vesa_map_buffer: paddr:%x vaddr:%x size:%x off:%x\n", + kprintf("vesa_map_buffer: paddr:%x vaddr:%x size:%x off:%x\n", paddr, vaddr, size, off); #endif return (vaddr + off); @@ -843,7 +843,7 @@ static void vesa_unmap_buffer(vm_offset_t vaddr, size_t size) { #if VESA_DEBUG > 1 - printf("vesa_unmap_buffer: vaddr:%x size:%x\n", vaddr, size); + kprintf("vesa_unmap_buffer: vaddr:%x size:%x\n", vaddr, size); #endif kmem_free(kernel_map, vaddr, size); } @@ -1017,7 +1017,7 @@ vesa_set_mode(video_adapter_t *adp, int mode) mode = vesa_map_gen_mode_num(adp->va_type, adp->va_flags & V_ADP_COLOR, mode); #if VESA_DEBUG > 0 - printf("VESA: set_mode(): %d(%x) -> %d(%x)\n", + kprintf("VESA: set_mode(): %d(%x) -> %d(%x)\n", adp->va_mode, adp->va_mode, mode, mode); #endif /* @@ -1051,7 +1051,7 @@ vesa_set_mode(video_adapter_t *adp, int mode) /* assert(VESA_MODE(mode)); */ #if VESA_DEBUG > 0 - printf("VESA: about to set a VESA mode...\n"); + kprintf("VESA: about to set a VESA mode...\n"); #endif /* don't use the linear frame buffer for text modes. XXX */ if (!(info.vi_flags & V_INFO_GRAPHICS)) @@ -1065,7 +1065,7 @@ vesa_set_mode(video_adapter_t *adp, int mode) vesa_adp_info->v_memsize*64*1024); #if VESA_DEBUG > 0 - printf("VESA: mode set!\n"); + kprintf("VESA: mode set!\n"); #endif vesa_adp->va_mode = mode; vesa_adp->va_flags &= ~V_ADP_COLOR; @@ -1075,7 +1075,7 @@ vesa_set_mode(video_adapter_t *adp, int mode) (vesa_adp->va_flags & V_ADP_COLOR) ? COLOR_CRTC : MONO_CRTC; if (info.vi_flags & V_INFO_LINEAR) { #if VESA_DEBUG > 1 - printf("VESA: setting up LFB\n"); + kprintf("VESA: setting up LFB\n"); #endif vesa_adp->va_buffer = vesa_map_buffer(info.vi_buffer, @@ -1117,7 +1117,7 @@ vesa_set_mode(video_adapter_t *adp, int mode) vesa_adp->va_disp_start.x = 0; vesa_adp->va_disp_start.y = 0; #if VESA_DEBUG > 0 - printf("vesa_set_mode(): vi_width:%d, len:%d, line_width:%d\n", + kprintf("vesa_set_mode(): vi_width:%d, len:%d, line_width:%d\n", info.vi_width, len, vesa_adp->va_line_width); #endif bcopy(&info, &vesa_adp->va_info, sizeof(vesa_adp->va_info)); @@ -1309,7 +1309,7 @@ static int vesa_mmap(video_adapter_t *adp, vm_offset_t offset, int prot) { #if VESA_DEBUG > 0 - printf("vesa_mmap(): window:0x%x, buffer:0x%x, offset:0x%x\n", + kprintf("vesa_mmap(): window:0x%x, buffer:0x%x, offset:0x%x\n", adp->va_info.vi_window, adp->va_info.vi_buffer, offset); #endif @@ -1452,7 +1452,7 @@ vesa_ioctl(video_adapter_t *adp, u_long cmd, caddr_t arg) return ENODEV; adp->va_line_width = bytes; #if VESA_DEBUG > 1 - printf("new line width:%d\n", adp->va_line_width); + kprintf("new line width:%d\n", adp->va_line_width); #endif return 0; @@ -1529,7 +1529,7 @@ vesa_bios_info(int level) if (bootverbose) { /* general adapter information */ - printf("VESA: v%d.%d, %dk memory, flags:0x%x, mode table:%p (%x)\n", + kprintf("VESA: v%d.%d, %dk memory, flags:0x%x, mode table:%p (%x)\n", ((vesa_adp_info->v_version & 0xf000) >> 12) * 10 + ((vesa_adp_info->v_version & 0x0f00) >> 8), ((vesa_adp_info->v_version & 0x00f0) >> 4) * 10 + @@ -1539,7 +1539,7 @@ vesa_bios_info(int level) /* OEM string */ if (vesa_oemstr != NULL) - printf("VESA: %s\n", vesa_oemstr); + kprintf("VESA: %s\n", vesa_oemstr); } if (level <= 0) @@ -1547,7 +1547,7 @@ vesa_bios_info(int level) if (vesa_adp_info->v_version >= 0x0200 && bootverbose) { /* vendor name, product name, product revision */ - printf("VESA: %s %s %s\n", + kprintf("VESA: %s %s %s\n", (vesa_vendorstr != NULL) ? vesa_vendorstr : "unknown", (vesa_prodstr != NULL) ? vesa_prodstr : "unknown", (vesa_revstr != NULL) ? vesa_revstr : "?"); @@ -1562,32 +1562,32 @@ vesa_bios_info(int level) continue; /* print something for diagnostic purpose */ - printf("VESA: mode:0x%03x, flags:0x%04x", + kprintf("VESA: mode:0x%03x, flags:0x%04x", vesa_vmodetab[i], vmode.v_modeattr); if (vmode.v_modeattr & V_MODEOPTINFO) { if (vmode.v_modeattr & V_MODEGRAPHICS) { - printf(", G %dx%dx%d %d, ", + kprintf(", G %dx%dx%d %d, ", vmode.v_width, vmode.v_height, vmode.v_bpp, vmode.v_planes); } else { - printf(", T %dx%d, ", + kprintf(", T %dx%d, ", vmode.v_width, vmode.v_height); } - printf("font:%dx%d, ", + kprintf("font:%dx%d, ", vmode.v_cwidth, vmode.v_cheight); - printf("pages:%d, mem:%d", + kprintf("pages:%d, mem:%d", vmode.v_ipages + 1, vmode.v_memmodel); } if (vmode.v_modeattr & V_MODELFB) { - printf("\nVESA: LFB:0x%x, off:0x%x, off_size:0x%x", + kprintf("\nVESA: LFB:0x%x, off:0x%x, off_size:0x%x", vmode.v_lfb, vmode.v_offscreen, vmode.v_offscreensize*1024); } - printf("\n"); - printf("VESA: window A:0x%x (%x), window B:0x%x (%x), ", + kprintf("\n"); + kprintf("VESA: window A:0x%x (%x), window B:0x%x (%x), ", vmode.v_waseg, vmode.v_waattr, vmode.v_wbseg, vmode.v_wbattr); - printf("size:%dk, gran:%dk\n", + kprintf("size:%dk, gran:%dk\n", vmode.v_wsize, vmode.v_wgran); } #endif /* VESA_DEBUG > 1 */ diff --git a/sys/dev/video/meteor/meteor.c b/sys/dev/video/meteor/meteor.c index 4e250bb251..fbd1b11d21 100644 --- a/sys/dev/video/meteor/meteor.c +++ b/sys/dev/video/meteor/meteor.c @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/meteor.c,v 1.49 1999/09/25 18:24:41 phk Exp $ - * $DragonFly: src/sys/dev/video/meteor/meteor.c,v 1.19 2006/09/10 01:26:38 dillon Exp $ + * $DragonFly: src/sys/dev/video/meteor/meteor.c,v 1.20 2006/12/22 23:26:27 swildner Exp $ */ /* Change History: @@ -491,7 +491,7 @@ int err = 0; /* 1ffff should be enough delay time for the i2c cycle to complete */ if(!wait_counter) { if(i2c_print_err) - printf("meteor%d: %d i2c %s transfer timeout 0x%x", + kprintf("meteor%d: %d i2c %s transfer timeout 0x%x", METEOR_NUM(mtr), slave, rw ? "read" : "write", *iic_write_loc); @@ -502,7 +502,7 @@ int err = 0; if(mtr->base->i2c_read & SAA7116_IIC_DIRECT_TRANSFER_ABORTED){ mtr->base->i2c_read |= SAA7116_IIC_DIRECT_TRANSFER_ABORTED; if(i2c_print_err) - printf("meteor%d: 0x%x i2c %s tranfer aborted", + kprintf("meteor%d: 0x%x i2c %s tranfer aborted", METEOR_NUM(mtr), slave, rw ? "read" : "write" ); err= 1; @@ -510,7 +510,7 @@ int err = 0; if(err) { if(i2c_print_err) - printf(" - reg=0x%x, value=0x%x.\n", reg, data); + kprintf(" - reg=0x%x, value=0x%x.\n", reg, data); } return err; @@ -560,12 +560,12 @@ meteor_intr(void *arg) #define METEOR_MASTER_ABORT 0x20000000 #define METEOR_TARGET_ABORT 0x10000000 if(pci_err & METEOR_MASTER_ABORT) { - printf("meteor%d: intr: pci bus master dma abort: 0x%x 0x%x.\n", + kprintf("meteor%d: intr: pci bus master dma abort: 0x%x 0x%x.\n", METEOR_NUM(mtr), *base, *(base+3)); pci_conf_write(mtr->tag, PCI_COMMAND_STATUS_REG, pci_err); } if(pci_err & METEOR_TARGET_ABORT) { - printf("meteor%d: intr: pci bus target dma abort: 0x%x 0x%x.\n", + kprintf("meteor%d: intr: pci bus target dma abort: 0x%x 0x%x.\n", METEOR_NUM(mtr), *base, *(base+3)); pci_conf_write(mtr->tag, PCI_COMMAND_STATUS_REG, pci_err); } @@ -576,16 +576,16 @@ meteor_intr(void *arg) if (cap_err) { if (cap_err & 0x300) { if(mtr->fifo_errors % 50 == 0) { - printf("meteor%d: capture error", METEOR_NUM(mtr)); - printf(": %s FIFO overflow.\n", + kprintf("meteor%d: capture error", METEOR_NUM(mtr)); + kprintf(": %s FIFO overflow.\n", cap_err&0x0100? "even" : "odd"); } mtr->fifo_errors++ ; /* increment fifo capture errors cnt */ } if (cap_err & 0xc00) { if(mtr->dma_errors % 50 == 0) { - printf("meteor%d: capture error", METEOR_NUM(mtr)); - printf(": %s DMA address.\n", + kprintf("meteor%d: capture error", METEOR_NUM(mtr)); + kprintf(": %s DMA address.\n", cap_err&0x0400? "even" : "odd"); } mtr->dma_errors++ ; /* increment DMA capture errors cnt */ @@ -859,7 +859,7 @@ vm_offset_t addr = 0; if(addr == 0) addr = vm_page_alloc_contig(size, 0, 0xffffffff, PAGE_SIZE); if(addr == 0) { - printf("meteor%d: Unable to allocate %d bytes of memory.\n", + kprintf("meteor%d: Unable to allocate %d bytes of memory.\n", unit, size); } @@ -960,12 +960,12 @@ meteor_init ( meteor_reg_t *mtr ) SAA7196_WRITE(mtr, SAA7196_STDC, SAA7196_REG(mtr, SAA7196_STDC) & ~0x02); SAA7196_READ(mtr); - printf("meteor%d: rev 0x%x\n", + kprintf("meteor%d: rev 0x%x\n", METEOR_NUM(mtr), (unsigned)((mtr->base->i2c_read & 0xff000000L) >> 28)); } else { i2c_print_err = 1; - printf("meteor%d: \n", + kprintf("meteor%d: \n", METEOR_NUM(mtr)); } /* @@ -974,7 +974,7 @@ meteor_init ( meteor_reg_t *mtr ) i2c_print_err = 0; if(i2c_write(mtr,PCF8574_DATA_I2C_ADDR,SAA7116_I2C_WRITE,0,0xff) == 0) { i2c_print_err = 1; - printf("meteor%d: \n", + kprintf("meteor%d: \n", METEOR_NUM(mtr)); /* does this have a rev #? */ bt254_init(mtr); /* Set up RGB module */ mtr->flags = METEOR_RGB; @@ -998,9 +998,9 @@ met_attach(pcici_t tag, int unit) u_long latency; if (unit >= NMETEOR) { - printf("meteor%d: attach: only %d units configured.\n", + kprintf("meteor%d: attach: only %d units configured.\n", unit, NMETEOR); - printf("meteor%d: attach: invalid unit number.\n", unit); + kprintf("meteor%d: attach: invalid unit number.\n", unit); return ; } @@ -1022,7 +1022,7 @@ met_attach(pcici_t tag, int unit) if (pci_conf_read(bridge_tag, PCI_ID_REG) == 0x00221014) { if ( bootverbose) - printf("meteor%d: PPB device detected, reprogramming IBM bridge.\n", unit); + kprintf("meteor%d: PPB device detected, reprogramming IBM bridge.\n", unit); /* disable SERR */ pci_cfgwrite(bridge_tag, 0x05, 0x00, 1); @@ -1044,7 +1044,7 @@ met_attach(pcici_t tag, int unit) old_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); pci_conf_write(tag, PCI_INTERRUPT_REG, METEOR_IRQ); new_irq = pci_conf_read(tag, PCI_INTERRUPT_REG); - printf("meteor%d: attach: irq changed from %d to %d\n", + kprintf("meteor%d: attach: irq changed from %d to %d\n", unit, (old_irq & 0xff), (new_irq & 0xff)); #endif /* METEOR_IRQ */ /* setup the interrupt handling routine */ @@ -1062,9 +1062,9 @@ met_attach(pcici_t tag, int unit) latency = (latency >> 8) & 0xff; if(bootverbose) { if(latency) - printf("meteor%d: PCI bus latency is", unit); + kprintf("meteor%d: PCI bus latency is", unit); else - printf("meteor%d: PCI bus latency was 0 changing to", + kprintf("meteor%d: PCI bus latency was 0 changing to", unit); } if(!latency) { @@ -1072,7 +1072,7 @@ met_attach(pcici_t tag, int unit) pci_conf_write(tag, PCI_LATENCY_TIMER, latency<<8); } if(bootverbose) { - printf(" %lu.\n", latency); + kprintf(" %lu.\n", latency); } meteor_init(mtr); /* set up saa7116, saa7196, and rgb module */ @@ -1082,7 +1082,7 @@ met_attach(pcici_t tag, int unit) else buf = 0; if(bootverbose) { - printf("meteor%d: buffer size %d, addr 0x%llx\n", + kprintf("meteor%d: buffer size %d, addr 0x%llx\n", unit, METEOR_ALLOC, vtophys(buf)); } @@ -1302,7 +1302,7 @@ meteor_read(struct dev_read_args *ap) if (!status) /* successful capture */ status = uiomove((caddr_t)mtr->bigbuf, count, uio); else - printf ("meteor%d: read: tsleep error %d\n", unit, status); + kprintf ("meteor%d: read: tsleep error %d\n", unit, status); mtr->flags &= ~(METEOR_SINGLE | METEOR_WANT_MASK); @@ -1616,7 +1616,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) /* wait for capture to complete */ error=tsleep((caddr_t)mtr, METPRI, "capturing", 0); if(error) - printf("meteor%d: ioctl: tsleep error %d\n", + kprintf("meteor%d: ioctl: tsleep error %d\n", unit, error); mtr->flags &= ~(METEOR_SINGLE|METEOR_WANT_MASK); break; @@ -1707,7 +1707,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) /* Either even or odd, if even & odd, then these a zero */ if((geo->oformat & METEOR_GEO_ODD_ONLY) && (geo->oformat & METEOR_GEO_EVEN_ONLY)) { - printf("meteor%d: ioctl: Geometry odd or even only.\n", + kprintf("meteor%d: ioctl: Geometry odd or even only.\n", unit); return EINVAL; } @@ -1726,7 +1726,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) return(EBUSY); if ((geo->columns & 0x3fe) != geo->columns) { - printf( + kprintf( "meteor%d: ioctl: %d: columns too large or not even.\n", unit, geo->columns); error = EINVAL; @@ -1734,13 +1734,13 @@ meteor_ioctl(struct dev_ioctl_args *ap) if (((geo->rows & 0x7fe) != geo->rows) || ((geo->oformat & METEOR_GEO_FIELD_MASK) && ((geo->rows & 0x3fe) != geo->rows)) ) { - printf( + kprintf( "meteor%d: ioctl: %d: rows too large or not even.\n", unit, geo->rows); error = EINVAL; } if (geo->frames > 32) { - printf("meteor%d: ioctl: too many frames.\n", unit); + kprintf("meteor%d: ioctl: too many frames.\n", unit); error = EINVAL; } if(error) return error; @@ -1764,7 +1764,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) mtr->bigbuf = buf; mtr->alloc_pages = temp; if(bootverbose) - printf( + kprintf( "meteor%d: ioctl: Allocating %d bytes\n", unit, temp*PAGE_SIZE); } else { @@ -2025,7 +2025,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) break; default: error = EINVAL; /* invalid argument */ - printf("meteor%d: ioctl: invalid output format\n",unit); + kprintf("meteor%d: ioctl: invalid output format\n",unit); break; } /* set cols */ @@ -2086,7 +2086,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) cnt->odd_fields_captured = mtr->odd_fields_captured; break; default: - printf("meteor%d: ioctl: invalid ioctl request\n", unit); + kprintf("meteor%d: ioctl: invalid ioctl request\n", unit); error = ENOTTY; break; } -- 2.41.0