From: Olaf Hartmann <olaf.hartmann@s1...> - 2007-10-15 17:59:42
The patch called "removing undocumented bits handling" occasionally =20
causes an infinite loop in the stir4200 driver, rendering the device =20
useless until plugged out and in again.
I can reproduce this behavior on three different PCs and with two =20
stir4200 devices from different manufacturers. On one of the PC the =20
driver almost always breaks for the first IrDA connection attempt, the =20
other two work a little bit better.
While the function fifo_txwait() is waiting for the FIFO to get empty, =20
my devices sometimes misbehave by setting the RXERR flag and start =20
incrementing the counter values instead decrementing. Note: the =20
direction flag is still set for transmit mode.
Normal debug output:
fifo status 0x90 count 29
fifo status 0x90 count 3
fifo status 0x84 count 0
fifo status 0xd0 count 29
fifo status 0xd0 count 3
fifo status 0xc4 count 0
fifo status 0xd0 count 31
fifo status 0xd2 count 5
fifo status 0xd2 count 8
fifo status 0xd2 count 11
fifo status 0xd2 count 14
So it seems like the stir4200 data sheet is incomplete. Well, at least =20
the "undocumented bits" have names in a table, so we can guess what =20
An alternative fix that does not rely on the "undocumented bits" might =20
simply check for an increasing count value, or for really hardware =20
paranoid minds a timeout. But i would prefer the old version (before =20
the patch), since it nicely counts errors.