From f878f09673e30965da0d7932b28ee3afd799f8c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Tue, 23 Mar 2010 19:22:29 +0000 Subject: [PATCH] Less tracing by default... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35936 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp | 10 ++++++---- src/add-ons/kernel/drivers/ports/pc_serial/Driver.h | 5 +++++ .../kernel/drivers/ports/pc_serial/SerialDevice.cpp | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp index 55400b2aba..557bf0669f 100644 --- a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp +++ b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp @@ -57,7 +57,7 @@ static const uint32 sDefaultRates[] = { #if 0 static const uint32 sBeBoxRates[] = { 0, //B0 - //... + //... TODO }; #endif @@ -381,13 +381,13 @@ scan_bus(bus_type bus) if (irqdesc.d.m.mask & (1 << irq)) break; } - TRACE_ALWAYS("irq %d\n", irq); + //TRACE_ALWAYS("irq %d\n", irq); //TRACE_ALWAYS("irq: %lx,%lx,%lx\n", irqdesc.d.m.mask, irqdesc.d.m.flags, irqdesc.d.m.cookie); TRACE_ALWAYS("found %s device %Ld [%x|%x|%x] " - /*"ID: '%16.16s'"*/" flags: %08lx status: %s\n", + /*"ID: '%16.16s'"*/" irq: %d flags: %08lx status: %s\n", bus_name, cookie, dinfo.devtype.base, dinfo.devtype.subtype, - dinfo.devtype.interface, /*dinfo.id,*/ dinfo.flags, + dinfo.devtype.interface, /*dinfo.id,*/ irq, dinfo.flags, strerror(dinfo.config_status)); // force enable I/O ports on PCI devices @@ -466,9 +466,11 @@ scan_pci_alt() // sanity check if (info.header_type & PCI_header_type_mask != PCI_header_type_generic) continue; + /* TRACE_ALWAYS("probing PCI device %2d [%x|%x|%x] %04x:%04x\n", ix, info.class_base, info.class_sub, info.class_api, info.vendor_id, info.device_id); + */ const struct serial_support_descriptor *supported = NULL; for (int i = 0; sSupportedDevices[i].name; i++) { diff --git a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h index 8a01467fbd..f3e5a0709f 100644 --- a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h +++ b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h @@ -123,8 +123,13 @@ typedef struct pc_serial_line_coding_s { #define CLS_LINE_DTR 0x0001 #define CLS_LINE_RTS 0x0002 + + #ifndef __HAIKU__ +// All this mess is due to BeOS R5 and BONE having +// an incompatible module API for the same version + typedef bool (*beos_tty_service_func)(struct tty *tty, struct ddrover *rover, uint op); // this version is compatible with BeOS R5 diff --git a/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp b/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp index e9f4112c6a..b3b1e0c6f8 100644 --- a/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp +++ b/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp @@ -221,7 +221,7 @@ SerialDevice::Service(struct tty *ptty, struct ddrover *ddr, uint flags) if (&fTTY != ptty) return false; - TRACE_ALWAYS("%s(,,0x%08lx)\n", __FUNCTION__, flags); + TRACE("%s(,,0x%08lx)\n", __FUNCTION__, flags); if (flags <= TTYGETSIGNALS) { switch (flags) { @@ -230,7 +230,7 @@ SerialDevice::Service(struct tty *ptty, struct ddrover *ddr, uint flags) SetModes(); err = install_io_interrupt_handler(IRQ(), pc_serial_interrupt, this, 0); - TRACE_ALWAYS("installing irq handler for %d: %s\n", IRQ(), strerror(err)); + TRACE("installing irq handler for %d: %s\n", IRQ(), strerror(err)); msr = ReadReg8(MSR); gTTYModule->ttyhwsignal(ptty, ddr, TTYHWDCD, msr & MSR_DCD); gTTYModule->ttyhwsignal(ptty, ddr, TTYHWCTS, msr & MSR_CTS); @@ -390,7 +390,7 @@ SerialDevice::InterruptHandler() gTTYModule->ttyilock(&fTTY, &fRover, false); gTTYModule->ddrdone(&fRover); - dprintf("IRQ:r\n"); + TRACE_FUNCRET("< IRQ:%d\n", ret); return ret; }