Compex multiport
Danilo Godec
danci@kibla.org
Mon Dec 27 08:44:31 1999
Here is a patch that makes my Compex FL400TX work. It introduces a new
module parameter 'compex_mp', that is used to indicate that such card is
present.
This is probably a very dirty hack... If someone is willing to brush it
up, please do so.
D.
--- tulip.c.orig Mon Dec 27 22:14:30 1999
+++ tulip.c Mon Dec 27 22:29:57 1999
@@ -46,6 +46,8 @@
static int reverse_probe = 0;
#endif
+static int compex_mp = 0 ;
+
/* Keep the ring sizes a power of two for efficiency.
Making the Tx ring too large decreases the effectiveness of channel
bonding and packet priority.
@@ -142,6 +144,7 @@
MODULE_PARM(reverse_probe, "i");
MODULE_PARM(rx_copybreak, "i");
MODULE_PARM(csr0, "i");
+MODULE_PARM(compex_mp, "i");
MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i");
MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
#endif
@@ -537,6 +540,9 @@
#endif
static void set_rx_mode(struct device *dev);
+static u16 subsys_id;
+static u16 subsys_vendor_id;
+
/* A list of all installed Tulip devices. */
@@ -572,6 +578,20 @@
pcibios_read_config_word(pci_bus, pci_device_fn,
PCI_DEVICE_ID, &device);
+ pcibios_read_config_word(pci_bus, pci_device_fn,
+ PCI_SUBSYSTEM_ID, &subsys_id );
+
+ pcibios_read_config_word(pci_bus, pci_device_fn,
+ PCI_SUBSYSTEM_VENDOR_ID, &subsys_vendor_id );
+
+ if (debug > 2) {
+ printk(KERN_INFO "Subsys ID: %#x.\n",
+ subsys_id);
+ printk(KERN_INFO "Subsys vendor ID: %#x.\n",
+ subsys_vendor_id);
+ }
+
+
for (chip_idx = 0; pci_tbl[chip_idx].vendor_id; chip_idx++)
if (vendor == pci_tbl[chip_idx].vendor_id
&& (device & pci_tbl[chip_idx].device_id_mask) ==
@@ -761,6 +781,19 @@
#endif
}
+if ( compex_mp ) {
+
+ if ( subsys_vendor_id == 0x130 ) {
+ if ( multiport_cnt > 0 )
+ irq = last_irq;
+ multiport_cnt++;
+ if ( debug > 2 )
+ printk(KERN_INFO "\nMultiport count: %d\n",
+ multiport_cnt);
+ if ( multiport_cnt > 3 )
+ multiport_cnt=0;
+ }
+}
for (i = 0; i < 6; i++)
printk("%c%2.2X", i ? ':' : ' ', last_phys_addr[i] = dev->dev_addr[i]);
printk(", IRQ %d.\n", irq);