Follow-up Comment #2, bug #31173 (project grub):

I looked at the patch. I like the solution a lot but, may I request a more
generous initial timeout? 
I just want to be sure, GRUB won't begin dropping characters, if iLO2 has to
host the UART_EMPTY_TRANSMITTER bit longer than the initial 100ms.

Also, how about going back to zero when the UART is not detected broken?

Thanks.

-----------
static void
serial_hw_put (struct grub_serial_port *port, const int c)
{
   grub_uint64_t endtime;

   do_real_config (port);
 
   if (port->broken > 5)
      endtime = grub_get_time_ms ();
   else if (port->broken > 1)
      endtime = grub_get_time_ms () + 50;
   else
      endtime = grub_get_time_ms () + 200;
   /* Wait until the transmitter holding register is empty.  */
   while ((grub_inb (port->port + UART_LSR) & UART_EMPTY_TRANSMITTER) == 0)
   {
      if (grub_get_time_ms () > endtime)
      {
          port->broken++;
          /* There is something wrong. But what can I do?  */
          return;
      }
   }
 
   if (port->broken)
      port->broken = 0;

   grub_outb (c, port->port + UART_TX);
}


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31173>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to