Skip to contentSkip to conversation

tty serial: xr17c15x driver

PATCH Michael Welling 1 participant 1 message Apr 25, 2014

lore
Share & tools
lore
#0 lore raw

I believe I found a related unresolved kernel bug:
"Bug 61961 – My Exar Corp. XR17C/D152 Dual PCI UART modem does not work with 3.8.0"

The issue appears to be the same and gave me a clue as to where to look.

Comparing the code from 3.5 to 3.8, I noticed that the UART_CAP_SLEEP flag was added to the XR17D15X Exar chip.

Then I noticed what appears to be a bug in the serial8250_set_sleep function:
.
.

        if ((p->port.type == PORT_XR17V35X) ||
           (p->port.type == PORT_XR17D15X)) {
                serial_out(p, UART_EXAR_SLEEP, 0xff);
                return;
        }

.
.

The if statement disregards the sleep parameter and always puts all of the ports to sleep.

Something like this would be more appropriate:
.
.

        if ((p->port.type == PORT_XR17V35X) ||
           (p->port.type == PORT_XR17D15X)) {
                serial_out(p, UART_EXAR_SLEEP, sleep ? 0xff : 0);
                return;
        }

.
.

Now I don't know that this is the problem yet and I would like someone to confirm that I am not crazy.

I can try the patch at work tomorrow and see if it fixes the issue. Then maybe we can close Bug 61961.