ChangeSet 1.1713.7.9, 2004/04/08 14:37:07-07:00, greg@kroah.com USB: fix pl2303 handling of status bits. Patch originally from Kevin Watkins drivers/usb/serial/pl2303.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c --- a/drivers/usb/serial/pl2303.c Wed Apr 14 14:33:34 2004 +++ b/drivers/usb/serial/pl2303.c Wed Apr 14 14:33:34 2004 @@ -116,6 +116,7 @@ #define VENDOR_READ_REQUEST 0x01 #define UART_STATE 0x08 +#define UART_STATE_TRANSIENT_MASK 0x74 #define UART_DCD 0x01 #define UART_DSR 0x02 #define UART_BREAK_ERROR 0x04 @@ -662,6 +663,7 @@ unsigned char *data = urb->transfer_buffer; unsigned long flags; int status; + u8 uart_state; dbg("%s (%d)", __FUNCTION__, port->number); @@ -690,8 +692,10 @@ goto exit; /* Save off the uart status for others to look at */ + uart_state = data[UART_STATE]; spin_lock_irqsave(&priv->lock, flags); - priv->line_status = data[UART_STATE]; + uart_state |= (priv->line_status & UART_STATE_TRANSIENT_MASK); + priv->line_status = uart_state; spin_unlock_irqrestore(&priv->lock, flags); exit: @@ -752,6 +756,7 @@ spin_lock_irqsave(&priv->lock, flags); status = priv->line_status; + priv->line_status &= ~UART_STATE_TRANSIENT_MASK; spin_unlock_irqrestore(&priv->lock, flags); wake_up_interruptible (&priv->delta_msr_wait);