From: Maciej Szmigiero Date: Thu, 1 Dec 2011 21:39:22 +0000 (+0100) Subject: serial: fix serial_cs I/O windows for Argosy RS-COM 2P X-Git-Tag: v3.3-rc1~154^2~24 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f97c000e87751fdca69d14cba2bbba795c1a972;p=pandora-kernel.git serial: fix serial_cs I/O windows for Argosy RS-COM 2P Current serial_cs driver has a problem when trying to detect whether a card has multiple ports: serial_config() calls pcmcia_loop_config() which iterates over card CIS configurations by calling serial_check_for_multi() for each of them. This function wants to check (and select) a configuration that has either one long I/O window spanning multiple ports or two 8-port windows for two serial ports. Problem is, that every pcmcia_loop_config() iteration only updates the windows (via pcmcia_do_loop_config() in resource[0] and resource[1]) when CONF_AUTO_SET_IO flag is set on the device, which is set only later in the code. Fix it by setting this flag earlier. In addition to this, when multi-port card is detected and it does not have an one, long I/O window multi_config_check_notpicky() tries to locate two I/O windows and assumes they are continuous without checking. On an Argosy RS-COM 2P this selects first configuration, which unfortunately has two non-continuous I/O windows. The net effect is that the second serial port on the card does not work. Fix it by checking whether the windows are really continuous. Signed-off-by: Maciej Szmigiero Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed