[haiku-commits] haiku: hrev51222 - src/add-ons/kernel/drivers/ports/pc_serial

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 24 Jun 2017 21:59:32 +0200 (CEST)

hrev51222 adds 1 changeset to branch 'master'
old head: ad25016cab0f70cc2b59d8f4f005440823eeb492
new head: 4c9ec29000770e44b7edca208c857d3391eb5f53
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=4c9ec2900077+%5Ead25016cab0f

----------------------------------------------------------------------------

4c9ec2900077: pc_serial: if kernel debugger is disabled, use the port
  
  This makes it a lot easier to use and test pc_serial, even on machines
  with a single serial port (COM2 is getting even more rare than COM1
  these days).

                                 [ Adrien Destugues <pulkomandy@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev51222
Commit:      4c9ec29000770e44b7edca208c857d3391eb5f53
URL:         http://cgit.haiku-os.org/haiku/commit/?id=4c9ec2900077
Author:      Adrien Destugues <pulkomandy@xxxxxxxxx>
Date:        Sat Jun 24 19:57:43 2017 UTC

----------------------------------------------------------------------------

1 file changed, 5 insertions(+), 1 deletion(-)
src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp | 6 +++++-

----------------------------------------------------------------------------

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 e5afb3b..ffcfa38 100644
--- a/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
+++ b/src/add-ons/kernel/drivers/ports/pc_serial/Driver.cpp
@@ -14,6 +14,7 @@
 #include <Drivers.h>
 #include <driver_settings.h>
 #include <image.h>
+#include <kernel/safemode.h>
 #include <malloc.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -523,10 +524,13 @@ scan_isa_hardcoded()
 {
 #ifdef HANDLE_ISA_COM
        int i;
+       bool serialDebug = true;
+
+       serialDebug = get_safemode_boolean("serial_debug_output", serialDebug);
 
        for (i = 0; i < 4; i++) {
                // skip the port used for kernel debugging...
-               if (sHardcodedPorts[i].ioBase == gKernelDebugPort) {
+               if (serialDebug && sHardcodedPorts[i].ioBase == 
gKernelDebugPort) {
                        TRACE_ALWAYS("Skipping port %d as it is used for kernel 
debug.\n", i);
                        continue;
                }


Other related posts:

  • » [haiku-commits] haiku: hrev51222 - src/add-ons/kernel/drivers/ports/pc_serial - pulkomandy