aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKomuro <komurojun@nifty.com>2007-08-12 20:45:41 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:42 -0400
commitdf950828b0ee51ff63c49c67d561bfd3d6096788 (patch)
tree0e74e4c664c4e6da6cdcdd7486259ff5aae33cfd /drivers
parentb6aec32a7774a398c4a194ad6b6392528b5a7a5b (diff)
dl2k: add Sundance/Tamarack TC902x Gigabit Ethernet Adapter support
Actually, D-Link modified the VendorID/ProductID of the TC902x. The TC902x is the original chipset. Signed-off-by: Komuro <komurojun-mbn@nifty.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/Kconfig7
-rw-r--r--drivers/net/dl2k.c23
-rw-r--r--drivers/net/dl2k.h1
3 files changed, 20 insertions, 11 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 502dd0eb8809..eeac2f49aae3 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -1995,14 +1995,15 @@ config ACENIC_OMIT_TIGON_I
1995 The safe and default value for this is N. 1995 The safe and default value for this is N.
1996 1996
1997config DL2K 1997config DL2K
1998 tristate "D-Link DL2000-based Gigabit Ethernet support" 1998 tristate "DL2000/TC902x-based Gigabit Ethernet support"
1999 depends on PCI 1999 depends on PCI
2000 select CRC32 2000 select CRC32
2001 help 2001 help
2002 This driver supports D-Link 2000-based gigabit ethernet cards, which 2002 This driver supports DL2000/TC902x-based Gigabit ethernet cards,
2003 includes 2003 which includes
2004 D-Link DGE-550T Gigabit Ethernet Adapter. 2004 D-Link DGE-550T Gigabit Ethernet Adapter.
2005 D-Link DL2000-based Gigabit Ethernet Adapter. 2005 D-Link DL2000-based Gigabit Ethernet Adapter.
2006 Sundance/Tamarack TC902x Gigabit Ethernet Adapter.
2006 2007
2007 To compile this driver as a module, choose M here: the 2008 To compile this driver as a module, choose M here: the
2008 module will be called dl2k. 2009 module will be called dl2k.
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index 04e3710c9082..ca21a1888ffa 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -10,9 +10,9 @@
10 (at your option) any later version. 10 (at your option) any later version.
11*/ 11*/
12 12
13#define DRV_NAME "D-Link DL2000-based linux driver" 13#define DRV_NAME "DL2000/TC902x-based linux driver"
14#define DRV_VERSION "v1.18" 14#define DRV_VERSION "v1.19"
15#define DRV_RELDATE "2006/06/27" 15#define DRV_RELDATE "2007/08/12"
16#include "dl2k.h" 16#include "dl2k.h"
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18 18
@@ -339,17 +339,24 @@ parse_eeprom (struct net_device *dev)
339#ifdef MEM_MAPPING 339#ifdef MEM_MAPPING
340 ioaddr = dev->base_addr; 340 ioaddr = dev->base_addr;
341#endif 341#endif
342 /* Check CRC */ 342 if (np->pdev->vendor == PCI_VENDOR_ID_DLINK) { /* D-Link Only */
343 crc = ~ether_crc_le (256 - 4, sromdata); 343 /* Check CRC */
344 if (psrom->crc != crc) { 344 crc = ~ether_crc_le (256 - 4, sromdata);
345 printk (KERN_ERR "%s: EEPROM data CRC error.\n", dev->name); 345 if (psrom->crc != crc) {
346 return -1; 346 printk (KERN_ERR "%s: EEPROM data CRC error.\n",
347 dev->name);
348 return -1;
349 }
347 } 350 }
348 351
349 /* Set MAC address */ 352 /* Set MAC address */
350 for (i = 0; i < 6; i++) 353 for (i = 0; i < 6; i++)
351 dev->dev_addr[i] = psrom->mac_addr[i]; 354 dev->dev_addr[i] = psrom->mac_addr[i];
352 355
356 if (np->pdev->vendor != PCI_VENDOR_ID_DLINK) {
357 return 0;
358 }
359
353 /* Parse Software Information Block */ 360 /* Parse Software Information Block */
354 i = 0x30; 361 i = 0x30;
355 psib = (u8 *) sromdata; 362 psib = (u8 *) sromdata;
diff --git a/drivers/net/dl2k.h b/drivers/net/dl2k.h
index e443065a452e..5b801775f42d 100644
--- a/drivers/net/dl2k.h
+++ b/drivers/net/dl2k.h
@@ -692,6 +692,7 @@ struct netdev_private {
692 692
693static const struct pci_device_id rio_pci_tbl[] = { 693static const struct pci_device_id rio_pci_tbl[] = {
694 {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, }, 694 {0x1186, 0x4000, PCI_ANY_ID, PCI_ANY_ID, },
695 {0x13f0, 0x1021, PCI_ANY_ID, PCI_ANY_ID, },
695 { } 696 { }
696}; 697};
697MODULE_DEVICE_TABLE (pci, rio_pci_tbl); 698MODULE_DEVICE_TABLE (pci, rio_pci_tbl);