Linux supports a pair of ioctls, TIOCGSERIAL and TIOCSSERIAL. Using these ioctls, baudrates without predefined symbols like B38400 can be used. On some USB serial adapters, high rates like 1Mbps are available.
With my patch, serialposix.Serial._reconfigurePort will prefer TIOCxSERIAL for baud rate configuration even if the requested baud rate is a standard rate. It will reject baud rates that have more than 1% error.
This patch on pyserial-2.2 is lightly tested on 64-bit Ubuntu 8.08 with an Arduino Diecimila (FT232 USB interface chip). It successfully communicates both at 38400 baud (a standard rate) and 1000000 baud (a nonstandard rate).
I do not have access to any non-Linux systems to test this patch. However, when TIOCxSERIAL is not avaiable in the FCNTL module, my new code should have no effect.
Thank you for considering this patch for inclusion.