lkml.org 
[lkml]   [2001]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch] serial.c ALI/SMSC/VIA high speed support
    Date
    From
    Theodore Tso wrote:
    > This patch hard codes magic divisor values for a specific motherboard

    It's not just one specific motherboard - several chips from different
    manufacturers use exactly the same magic divisor values, so this looks
    like some sort of "industry standard". The patch includes VT82C686A
    detection simply because it's a reasonably safe PCI probe. Other chips
    (SMSC, ALI) would need more dangerous ISA probes, but once you know what
    chip you have, high speed mode can be enabled even from user space, and
    the magic divisors will work the same way.

    > into the serial driver. The fact that the motherboard is using magic
    > divisor values is in incredible bad taste (unlike the motherboards

    I guess they did it that way for DOS/Win* backwards compatibility -
    lower speeds (max 115200 bps) work as usual, so the high speed mode
    could even be enabled by the BIOS if it cared enough. These magic
    values correspond to not very often used baud rates, about 3.5 bps ;)
    Other chips (NSC/Winbond) use baud_base 921600 which is cleaner but
    not very backwards-compatible...

    > If you're going to do something like this, then it must be conditional

    This would require a new version of setserial that recognizes a new
    UART type (16550A with magic divisors). If you can release it, I see
    no problem with making magic divisors conditional as you suggest.

    One more thing - these special features can't be auto-detected by
    simply looking at UART registers. These chips have programmable
    UART I/O base and IRQ which don't have to be standard COM1/COM2
    (or even COM3/COM4 for that matter - only the BIOS setup limits your
    choices, the chip allows any multiple of 8 as UART I/O base).

    Now, I can read the two I/O base addresses from the chip, but what to
    do next? Should I search rs_table[] for a matching I/O port address
    to change UART type (ALI/SMSC/VIA) or baud_base (NSC/Winbond) there?
    What if not found (non-standard I/O base set by the BIOS), should a new
    entry be added after the standard ones like for PCI ports?

    Of course, auto-detection is not something very important right now, but
    I'd like to see basic support for magic divisors (spd_cust is a kludge,
    the driver thinks the speed is very low, sets wrong FIFO trigger level
    and much too long timeout) at least for people who know how to enable
    high speed mode in their chips...

    Thanks,
    Marek

    -
    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: 2005-03-22 13:01    [W:0.026 / U:0.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site