IBM Bluetooth PC Card II - configuration problem

Dominik Brodowski linux at
Mon Jan 4 02:56:42 EST 2010


On Mon, Jan 04, 2010 at 12:39:28AM +0100, Szigetvári János wrote:
> These cards expose 16 IO ports, eight of which is the actual UART, and
> some registers take up the remaining eight IO ports.
> By default the kernel recognized the 16C950 UART correctly, but  the
> second "phantom" UART came to existence because of the other eight IO
> ports.
> In your patch you made the kernel treat the card the same as the other
> Oxford Semiconductor-based cards. In that case the first eight IO
> ports were used for the registers, and the last eight ports were used
> by the UART.
> In case of this TDK/IBM card, it's the opposite. (This could be seen
> by the fact that the UART of the type 16C950 was recognized first, and
> that it was at the beginning of the IO range mentioned in the CIS.)
> So I added a new braching  (specific to this card) to the code, and
> made the kernel use the first eight ports for the UART and the last
> eight for the registers.
> (Also there was no point in checking for the config table indexes, as
> the CIS for this card contains only one entry.)
> I also added the Product ID of this card to /include/pcmcia/ciscode.h
> for better readability.
> As a result of my modifications, the card now works as a HCI device!
> I attached the diff file, and the modified CIS to this message.
> Thanks again for the hints, ideas, and the guidance you provided!

Excellent news. Two comments about your patch, though:

diff -U 3 -r a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
--- a/drivers/serial/serial_cs.c	2009-10-05 17:38:08.000000000 +0200
+++ b/drivers/serial/serial_cs.c	2010-01-04 00:20:16.000000000 +0100
@@ -658,6 +658,22 @@
 		return 0;
+	if (info->manfid == MANFID_TDK && info->prodid == PRODID_TDK_BTPC01) {
+		// The CIS for this card only has one config entry.

Please use /* */ for comments in the kernel.

+		setup_serial(link, info, link->io.BasePort1,
+					link->irq.AssignedIRQ);
+		info->c950ctrl = base2;
+		/*
+		 * FIXME: We really should wake up the port prior to
+		 * handing it over to the serial layer.
+		 */
+		if (info->quirk && info->quirk->wakeup)
+			info->quirk->wakeup(link);

As you don't seem to need a wakeup quirk, you can leave out this check here.

Could you send me an updated patch, please, along with a proper
Signed-off-by: line so that either I or the maintainer at
linux-serial at (please send them the mail, too) can merge
this patch and push it upstream?

Thanks and best wishes,


More information about the linux-pcmcia mailing list