Re: [Bluez-users] Once again: Socket CF card and Kernel 2.6

Mathias Adam
2005-03-05T19:25:39Z

[-- Attachment #1: Type: text/plain, Size: 893 bytes --]

Hi Marcel,

On 05.03.05 19:17:50, Marcel Holtmann wrote:
> I only have the old Socket cards (dtl1_cs driver) at hand and so I can't
> test it, but my Xircom card is still not working.

Is that Xircom card similar to the newer Socket cards? i.e. does it have
a 16C95x UART? If yes you could try this patch which I used while
investigating the problem, it includes some debug messages which might
help.

> For the Socket card the baud rate is 230400 and yes, this is to slow for
> the full bandwith of a piconet. However I never did any bandwith test
> with this card, but actually there are cards out there where the UART
> limits the total possible bandwidth.

Huh - but at least it's still a lot faster than a GPRS connection so it's
okay for me...

Regards,
Mathias

--
The first time you'll get a Microsoft product that doesn't suck,
will be the day they start producing vacuum cleaners.

[-- Attachment #2: debug-patch --]
[-- Type: text/plain, Size: 1736 bytes --]

--- 8250.c_2.6.11-org 2005-03-02 08:37:47.000000000 +0100
+++ 8250.c 2005-03-05 02:32:50.000000000 +0100
@@ -56,11 +56,11 @@
/*
* Debugging.
*/
-#if 0
+//#if 0
#define DEBUG_AUTOCONF(fmt...) printk(fmt)
-#else
-#define DEBUG_AUTOCONF(fmt...) do { } while (0)
-#endif
+//#else
+//#define DEBUG_AUTOCONF(fmt...) do { } while (0)
+//#endif

#if 0
#define DEBUG_INTR(fmt...) printk(fmt)
@@ -346,7 +346,7 @@
static inline void serial8250_clear_fifos(struct uart_8250_port *p)
{
if (p->capabilities & UART_CAP_FIFO) {
- serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO);
+//alskdfj serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO);
serial_outp(p, UART_FCR, UART_FCR_ENABLE_FIFO |
UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
serial_outp(p, UART_FCR, 0);
@@ -1636,9 +1636,25 @@
/*
* Ask the core to calculate the divisor for us.
*/
- baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
+ baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk /* /16 */);
quot = serial8250_get_divisor(port, baud);
+ printk(KERN_INFO "***** Serial: baud=%d quot=%d\n", baud, quot);

+ if (up->port.type == PORT_16C950) {
+ unsigned int baud_base = port->uartclk/16;
+ if (baud <= baud_base)
+ serial_icr_write(up, UART_TCR, 0);
+ else if (baud <= 2*baud_base) {
+ serial_icr_write(up, UART_TCR, 0x8);
+ baud_base = baud_base * 2;
+ } else if (baud <= 4*baud_base) {
+ serial_icr_write(up, UART_TCR, 0x4);
+ baud_base = baud_base * 4;
+ } else
+ serial_icr_write(up, UART_TCR, 0);
+ printk(KERN_INFO "***** Serial: baud_base=%d\n", baud_base);
+ }
+
/*
* Work around a bug in the Oxford Semiconductor 952 rev B
* chip which causes it to seriously miscalculate baud rates