Messages in this thread | | | Date | Thu, 20 Jan 2000 00:29:51 -0500 | Subject | Re: [patch] Support for 3Com PCI modem + Generic PCI serials | From | tytso@MIT ... |
| |
Date: Wed, 19 Jan 2000 14:13:38 +0100 From: Vojtech Pavlik <vojtech@suse.cz>
> (I'm afraid that the BIOS knew what IOsize the card requested but that > this info isn't available in Linux right?)
It is available. You know where to stop.
It's available, but it's often not useful. Even on single port boards, the I/O region that's reported is typically 0x100 long. So all you could is probe the entire region every 8 blocks, and hope that you don't hit anything sensitive. If the NSA "super secure crypto" modem had in somewhere else in the I/O window a port which cause the thermit charge to go off, well.... :-)
> A problem arises if you measure a base_baud of about 15MHz. Then the > chip can be powered by a 14.31 MHz crystal, 15MHz or 16MHz.
You can get a very precise measurement with udelay() and/or PIT/TSC timing.
udelay() doesn't work; you'd have to use TSC and hope that you've accurately measured the clock crystal.
Measuring base_baud is possible, but it's a major complication. Probably the thing to do is to add an ioctl which turns on loopback mode (actually, probably we could use an extra bit out of TIOCMSET), and then let that be a user mode thing to deal with. If we can't get the accuracy we need in user mode, we can try doing it in kernel mode, but I'm not that thrilled to put that much complexity in the kernel.
(If you don't think it's too complicated for the kernel, send me a patch, and I'll take a look at....)
Yes, but we might also have crashed the machine. :(
Yup,that's the problem. It's also a pain to implement, and I'm not sure how useful it will be in the long run. But we'll see; as said, having to build a table for every single PCI serial/modem board also isn't pretty. So the alternative isn't pretty either.
- 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/
| |