summaryrefslogtreecommitdiff
path: root/tor2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tor2.c')
-rwxr-xr-xtor2.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tor2.c b/tor2.c
index cb93702..40f59f4 100755
--- a/tor2.c
+++ b/tor2.c
@@ -135,12 +135,15 @@ static void tor2_tasklet(unsigned long data);
#define LEDREG 0x402
#define STATREG 0x400
#define SWREG 0x401
+#define CTLREG1 0x404
#define INTENA (1 + ((loopback & 3) << 5))
#define OUTBIT (2 + ((loopback & 3) << 5))
#define E1DIV 0x10
#define INTACK (0x80 + ((loopback & 3) << 5))
#define INTACTIVE 2
+/* un-define this if you dont want NON-REV A hardware support */
+/* #define NONREVA 1 */
#define SYNCSELF 0
#define SYNC1 1
@@ -474,7 +477,17 @@ static int __devinit tor2_probe(struct pci_dev *pdev, const struct pci_device_id
tor->mem8[SYNCREG] = 0;
tor->mem8[CTLREG] = 0;
+ tor->mem8[CTLREG1] = 0;
tor->mem8[LEDREG] = 0;
+
+ /* check part revision data */
+ x = t1in(tor,1,0xf) & 15;
+#ifdef NONREVA
+ if (x > 3)
+ {
+ tor->mem8[CTLREG1] = NONREVA;
+ }
+#endif
for(x = 0; x < 256; x++) tor->mem32[x] = 0x7f7f7f7f;