lkml.org 
[lkml]   [2006]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: moxa serial driver testing
    From
    Date
    osv@javad.com wrote:
    > Hi Jiri,
    >
    > I've figured out that both old and new mxser drivers have two similar
    > problems:
    >
    > 1. When there are data coming to a port, sometimes opening of the port
    > entirely locks the box. This is quite reproducible. Any idea what's
    > wrong and how can I help to debug it?

    Could you test the patch below, if something changes?

    ---

    drivers/char/mxser_new.c | 6 ++++--
    1 files changed, 4 insertions(+), 2 deletions(-)

    diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
    index a2bca5d..c0af201 100644
    --- a/drivers/char/mxser_new.c
    +++ b/drivers/char/mxser_new.c
    @@ -2268,6 +2268,8 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
    if (bits & irqbits)
    continue;
    port = &brd->ports[i];
    + if (!(port->flags & ASYNC_INITIALIZED))
    + continue;

    int_cnt = 0;
    do {
    @@ -2320,9 +2322,9 @@ static irqreturn_t mxser_interrupt(int irq, void *dev_id)
    if (status & UART_LSR_THRE)
    mxser_transmit_chars(port);
    }
    - } while (int_cnt++ < MXSER_ISR_PASS_LIMIT);
    + } while (int_cnt++ < 256);
    }
    - if (pass_counter++ > MXSER_ISR_PASS_LIMIT)
    + if (pass_counter++ > 64)
    break; /* Prevent infinite loops */
    }

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2006-12-23 02:39    [W:0.028 / U:214.736 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site