[haiku-commits] r35936 - haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial

  • From: revol@xxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 23 Mar 2010 20:22:29 +0100 (CET)

Author: mmu_man
Date: 2010-03-23 20:22:29 +0100 (Tue, 23 Mar 2010)
New Revision: 35936
Changeset: http://dev.haiku-os.org/changeset/35936/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
   haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h
   haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp
Log:
Less tracing by default...


Modified: haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp   
2010-03-23 16:49:49 UTC (rev 35935)
+++ haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp   
2010-03-23 19:22:29 UTC (rev 35936)
@@ -57,7 +57,7 @@
 #if 0
 static const uint32 sBeBoxRates[] = {
                0,              //B0
-               //...
+               //... TODO
 };
 #endif
 
@@ -381,13 +381,13 @@
                        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 @@
                // 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++) {

Modified: haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h     
2010-03-23 16:49:49 UTC (rev 35935)
+++ haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/Driver.h     
2010-03-23 19:22:29 UTC (rev 35936)
@@ -123,8 +123,13 @@
 #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

Modified: 
haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp     
2010-03-23 16:49:49 UTC (rev 35935)
+++ haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial/SerialDevice.cpp     
2010-03-23 19:22:29 UTC (rev 35936)
@@ -221,7 +221,7 @@
        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 @@
                                
                                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 @@
 
        gTTYModule->ttyilock(&fTTY, &fRover, false);
        gTTYModule->ddrdone(&fRover);
-       dprintf("IRQ:r\n");
+       TRACE_FUNCRET("< IRQ:%d\n", ret);
        return ret;
 }
 


Other related posts:

  • » [haiku-commits] r35936 - haiku/trunk/src/add-ons/kernel/drivers/ports/pc_serial - revol