]> git.hungrycats.org Git - linux/commitdiff
[PATCH] specialix fix from 2.4 missing in 2.5
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Sat, 15 Feb 2003 04:30:45 +0000 (20:30 -0800)
committerJens Axboe <axboe@suse.de>
Sat, 15 Feb 2003 04:30:45 +0000 (20:30 -0800)
drivers/char/sx.c

index cc629ef0d9dcc8efe5d2b89d3e6d44c6c694b937..117aff1f56d6246529dd52ccb5cbe7032952c631 100644 (file)
@@ -2233,6 +2233,23 @@ static int probe_si (struct sx_board *board)
                        return 0; 
        }
 
+       /* 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);