Re: [patch] Support for 3Com PCI modem + Generic PCI serials

From: Theodore Y. Ts'o (tytso@MIT.EDU)
Date: Fri Jan 14 2000 - 17:00:10 EST


   Date: Fri, 14 Jan 2000 22:42:21 +0100
   From: Martin Mares <mj@suse.cz>

      The PCI specs (revision 2.2) say:

      For Hayes-compatible modems, the first base address register (at offset
      10h) maps the appropriate compatible (i.e., 16450, 16550, etc.) register
      set for the serial controller at the beginning of the mapped space. Note
      that these registers can be either memory or I/O mapped depending on
      what kind of BAR is used.

Well, this is why I talked about "standards fantasy land". There are
far too many devices which have some mysterious I/O memory mapped region
at the first base address register (i.e., PCI_BASE_ADDRESS_0). Indeed,
I as hoping that it was defined by the PCI specs; so many boards have
them I was starting to think it was a standard.

Then, a lot of boards use the 2nd (PCI_BASE_ADDRESS_1) I/O region to put
the UART.

Worse yet, most of the I/O mapped boards either require a baord-specific
magic I/O address set to enable interrupts, or use I/O maps where the
UART registers are addressed using the formula:

addr = base_addr + (uart_reg * magic_multiplier)

Oh yes.... and many serial boards use a non-standard clock crystal.
Many of them use a base_baud of 230400; but some use 460800, and some
921600. I was hoping the PCI standard would give some standard way of
determining that information, too.

Instead, the one bit of information they give us is absolutely useless,
since there are other reliable ways of determining what kind of UART the
board has. Sigh.

      If the devices you've seen behave sanely (i.e., they don't use the
   standard class numbers if they have non-standard interface), I think
   the following approach would be reliable enough to be used by the
   driver by default:

      If a device has class 0700 and prog-if 00 to 06 or class 0703 and
   prog-if 01 to 04, use the first resource not depending on whether
   it's memory or I/O. Maybe we could reject the device if it has more
   than one region defined.

Here's the problem I have. So far, my sample set of boards that obey
the PCI Specifications 2.2 exactly as you've presented them is exactly
one: The 3COM/USR #5610. If someone can give me other examples of PCI
modem/serial cards that actually pay attention to the standards, that
would be most helpful. Otherwise, we can code the hueristics, but I'm
not sure how much good it's going to do.

Sigh.... I repeat: PC hardware is sh*t.

                                                - Ted

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:25 EST