diff --git a/ChangeLog b/ChangeLog index e61937fb0..ba6c2f542 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2012-06-08 Vladimir Serbinenko + + * grub-core/bus/usb/serial/ftdi.c (real_config): Handle 1.5 stop bits. + (ftdi_hw_configure): Likewise. + * grub-core/bus/usb/serial/pl2303.c (GRUB_PL2303_STOP_BITS_1_5): New + define. + (real_config): Handle 1.5 stop bits. + (pl2303_hw_configure): Likewise. + 2012-06-08 Vladimir Serbinenko * Makefile.am: Add ppc linux bootcheck. diff --git a/grub-core/bus/usb/serial/ftdi.c b/grub-core/bus/usb/serial/ftdi.c index cce26d9eb..15ea8fb89 100644 --- a/grub-core/bus/usb/serial/ftdi.c +++ b/grub-core/bus/usb/serial/ftdi.c @@ -82,6 +82,7 @@ real_config (struct grub_serial_port *port) }; const grub_uint16_t stop_bits[] = { [GRUB_SERIAL_STOP_BITS_1] = 0x0000, + [GRUB_SERIAL_STOP_BITS_1_5] = 0x0800, [GRUB_SERIAL_STOP_BITS_2] = 0x1000, }; @@ -148,6 +149,7 @@ ftdi_hw_configure (struct grub_serial_port *port, N_("unsupported serial port parity")); if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1 + && config->stop_bits != GRUB_SERIAL_STOP_BITS_1_5 && config->stop_bits != GRUB_SERIAL_STOP_BITS_2) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unsupported serial port stop bits number")); diff --git a/grub-core/bus/usb/serial/pl2303.c b/grub-core/bus/usb/serial/pl2303.c index f92172c1d..5433763e5 100644 --- a/grub-core/bus/usb/serial/pl2303.c +++ b/grub-core/bus/usb/serial/pl2303.c @@ -42,6 +42,7 @@ is_speed_supported (unsigned int speed) #define GRUB_PL2303_REQUEST_SET_CONFIG 0x20 #define GRUB_PL2303_STOP_BITS_1 0x0 +#define GRUB_PL2303_STOP_BITS_1_5 0x1 #define GRUB_PL2303_STOP_BITS_2 0x2 #define GRUB_PL2303_PARITY_NONE 0 @@ -97,6 +98,8 @@ real_config (struct grub_serial_port *port) if (port->config.stop_bits == GRUB_SERIAL_STOP_BITS_2) config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_2; + else if (port->config.stop_bits == GRUB_SERIAL_STOP_BITS_1_5) + config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_1_5; else config_pl2303.stop_bits = GRUB_PL2303_STOP_BITS_1; @@ -161,6 +164,7 @@ pl2303_hw_configure (struct grub_serial_port *port, N_("unsupported serial port parity")); if (config->stop_bits != GRUB_SERIAL_STOP_BITS_1 + && config->stop_bits != GRUB_SERIAL_STOP_BITS_1_5 && config->stop_bits != GRUB_SERIAL_STOP_BITS_2) return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("unsupported serial port stop bits number"));