Urgent patch for SX.
Hi Marcello,
Somone messed with the SX driver in 2.4.19. It now detects some cards twice (both as a V1 and as a V2 card). And as there end up being no "interlocks", the card is entered twice in the "list of cards".
This is fixed by adding a check for Version 1 when we really are really probing for a V1 card and the other way around.
It would be very nice if this could still be accepted into 2.4.20, as a bunch of people are bitten by this....
Honesty requires me to tell you that I haven't been able to fully test
this: I don't have a Version 1 card. But it has been tested with a Version 2 card and it fixes the double detection problem there. So, worst case, I think we'll hose support for version 1 cards, produced in the late nineteen-eighties, or early nineteen-nineties....
Roger.
Signature · 5 lines
** [email protected] ** http://www.BitWizard.nl/ ** +31-15-2600998 ** *-- BitWizard writes Linux device drivers for any device you may have! --* * The Worlds Ecosystem is a stable system. Stable systems may experience * * excursions from the stable situation. We are currently in such an * * excursion: The stable situation does not include humans. ***************
drivers/char/sx.c +17 -0
@@ -2216,6 +2216,23 @@ } } +/* Now we're pretty much convinced that there is an SI board here, +but to prevent trouble, we'd better double check that we don't +have an SI1 board when we're probing for an SI2 board.... */ + +write_sx_byte (board,SI2_ISA_ID_BASE ,0x10 ); +if (IS_SI1_BOARD (board)) { +/* This should be an SI1 board, which has this +location writable... */ +if (read_sx_byte (board,SI2_ISA_ID_BASE ) !=0x10 ) +return 0 ; + }else { +/* This should be an SI2 board, which has the bottom +3 bits non-writable... */ +if (read_sx_byte (board,SI2_ISA_ID_BASE ) ==0x10 ) +return 0 ; + } +printheader ();printk (KERN_DEBUG "sx: Found an SI board at %lx\n" , board->hw_base);