NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/50395: Loss of characters in serial port communication between gdb and kgdb_stub



The following reply was made to PR kern/50395; it has been noted by GNATS.

From: Vicente Chaves de Melo <vchaves%ymail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/50395: Loss of characters in serial port communication
 between gdb and kgdb_stub
Date: Mon, 2 Nov 2015 15:29:55 -0200

 Hey Christos,
 about fix in function comshutdown () I stand by my suggestion.
 
 I believe that changing the flag IER_ERXRDY to IER_ERLS we will obtain 
 the following two benefits
 
 1) there will be no more interruptions generated for this COM after the 
 shutdown. That would seem to be the intent of this part of the code.
 
 2) Allow the user to enter the debugger even after the shutdown, sending 
 a BREAK on the serial port.
 
 I also believe that it wasn't such a wise idea to mix the com_shutdown 
 subject in the same PR problem with kgdb.
 Wouldn't it be better if I open another PR to deal with this matter?
 
 Best regards
 Vicente.
 
 On 02/11/2015 14:25, Christos Zoulas wrote:
 > The following reply was made to PR kern/50395; it has been noted by GNATS.
 >
 > From: christos%zoulas.com@localhost (Christos Zoulas)
 > To: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
 > 	gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
 > Cc:
 > Subject: Re: kern/50395: Loss of characters in serial port communication between gdb and kgdb_stub
 > Date: Mon, 2 Nov 2015 11:24:00 -0500
 >
 >   On Nov 2,  4:10pm, vchaves%ymail.com@localhost (vchaves%ymail.com@localhost) wrote:
 >   -- Subject: kern/50395: Loss of characters in serial port communication betwe
 >   
 >   Perhaps this?
 >   
 >   --- com.c       4 May 2015 22:59:36 -0000       1.336
 >   +++ com.c       2 Nov 2015 16:23:11 -0000
 >   @@ -377,7 +377,7 @@
 >    {
 >    
 >           /* Turn on line break interrupt, set carrier. */
 >   -       sc->sc_ier = IER_ERXRDY;
 >   +       sc->sc_ier = IER_ERLS;
 >           if (sc->sc_type == COM_TYPE_PXA2x0)
 >                   sc->sc_ier |= IER_EUART | IER_ERXTOUT;
 >           if (sc->sc_type == COM_TYPE_INGENIC ||
 >   @@ -812,7 +812,10 @@
 >    
 >           /* Turn off interrupts. */
 >           if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) {
 >   -               sc->sc_ier = IER_ERXRDY; /* interrupt on break */
 >   +               if (ISSET(sc->sc_hwflags, COM_HW_KGDB))
 >   +                       sc->sc_ier = IER_ERLS; /* interrupt on line break */
 >   +               else
 >   +                       sc->sc_ier = IER_ERXRDY; /* interrupt on receive */
 >                   if ((sc->sc_type == COM_TYPE_PXA2x0) ||
 >                       (sc->sc_type == COM_TYPE_INGENIC) ||
 >                       (sc->sc_type == COM_TYPE_TEGRA))
 >   
 >   
 >   Or do we always want ERLS on shutdown?
 >   
 >   christos
 >   
 



Home | Main Index | Thread Index | Old Index