aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sis900.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-06-22 22:11:56 -0400
committerJeff Garzik <jeff@garzik.org>2006-06-22 22:11:56 -0400
commit71d530cd1b6d97094481002a04c77fea1c8e1c22 (patch)
treee786da7145d83c19a594adf76ed90d52c51058b1 /drivers/net/sis900.c
parentd7a80dad2fe19a2b8c119c8e9cba605474a75a2b (diff)
parentd588fcbe5a7ba8bba2cebf7799ab2d573717a806 (diff)
Merge branch 'master' into upstream
Conflicts: drivers/scsi/libata-core.c drivers/scsi/libata-scsi.c include/linux/pci_ids.h
Diffstat (limited to 'drivers/net/sis900.c')
-rw-r--r--drivers/net/sis900.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index f5a3bf4d959..d0587417220 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -1,6 +1,6 @@
1/* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux. 1/* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux.
2 Copyright 1999 Silicon Integrated System Corporation 2 Copyright 1999 Silicon Integrated System Corporation
3 Revision: 1.08.09 Sep. 19 2005 3 Revision: 1.08.10 Apr. 2 2006
4 4
5 Modified from the driver which is originally written by Donald Becker. 5 Modified from the driver which is originally written by Donald Becker.
6 6
@@ -17,9 +17,10 @@
17 SiS 7014 Single Chip 100BASE-TX/10BASE-T Physical Layer Solution, 17 SiS 7014 Single Chip 100BASE-TX/10BASE-T Physical Layer Solution,
18 preliminary Rev. 1.0 Jan. 18, 1998 18 preliminary Rev. 1.0 Jan. 18, 1998
19 19
20 Rev 1.08.10 Apr. 2 2006 Daniele Venzano add vlan (jumbo packets) support
20 Rev 1.08.09 Sep. 19 2005 Daniele Venzano add Wake on LAN support 21 Rev 1.08.09 Sep. 19 2005 Daniele Venzano add Wake on LAN support
21 Rev 1.08.08 Jan. 22 2005 Daniele Venzano use netif_msg for debugging messages 22 Rev 1.08.08 Jan. 22 2005 Daniele Venzano use netif_msg for debugging messages
22 Rev 1.08.07 Nov. 2 2003 Daniele Venzano <webvenza@libero.it> add suspend/resume support 23 Rev 1.08.07 Nov. 2 2003 Daniele Venzano <venza@brownhat.org> add suspend/resume support
23 Rev 1.08.06 Sep. 24 2002 Mufasa Yang bug fix for Tx timeout & add SiS963 support 24 Rev 1.08.06 Sep. 24 2002 Mufasa Yang bug fix for Tx timeout & add SiS963 support
24 Rev 1.08.05 Jun. 6 2002 Mufasa Yang bug fix for read_eeprom & Tx descriptor over-boundary 25 Rev 1.08.05 Jun. 6 2002 Mufasa Yang bug fix for read_eeprom & Tx descriptor over-boundary
25 Rev 1.08.04 Apr. 25 2002 Mufasa Yang <mufasa@sis.com.tw> added SiS962 support 26 Rev 1.08.04 Apr. 25 2002 Mufasa Yang <mufasa@sis.com.tw> added SiS962 support
@@ -77,7 +78,7 @@
77#include "sis900.h" 78#include "sis900.h"
78 79
79#define SIS900_MODULE_NAME "sis900" 80#define SIS900_MODULE_NAME "sis900"
80#define SIS900_DRV_VERSION "v1.08.09 Sep. 19 2005" 81#define SIS900_DRV_VERSION "v1.08.10 Apr. 2 2006"
81 82
82static char version[] __devinitdata = 83static char version[] __devinitdata =
83KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n"; 84KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n";
@@ -1402,6 +1403,11 @@ static void sis900_set_mode (long ioaddr, int speed, int duplex)
1402 rx_flags |= RxATX; 1403 rx_flags |= RxATX;
1403 } 1404 }
1404 1405
1406#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
1407 /* Can accept Jumbo packet */
1408 rx_flags |= RxAJAB;
1409#endif
1410
1405 outl (tx_flags, ioaddr + txcfg); 1411 outl (tx_flags, ioaddr + txcfg);
1406 outl (rx_flags, ioaddr + rxcfg); 1412 outl (rx_flags, ioaddr + rxcfg);
1407} 1413}
@@ -1714,18 +1720,26 @@ static int sis900_rx(struct net_device *net_dev)
1714 1720
1715 while (rx_status & OWN) { 1721 while (rx_status & OWN) {
1716 unsigned int rx_size; 1722 unsigned int rx_size;
1723 unsigned int data_size;
1717 1724
1718 if (--rx_work_limit < 0) 1725 if (--rx_work_limit < 0)
1719 break; 1726 break;
1720 1727
1721 rx_size = (rx_status & DSIZE) - CRC_SIZE; 1728 data_size = rx_status & DSIZE;
1729 rx_size = data_size - CRC_SIZE;
1730
1731#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
1732 /* ``TOOLONG'' flag means jumbo packet recived. */
1733 if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE)
1734 rx_status &= (~ ((unsigned int)TOOLONG));
1735#endif
1722 1736
1723 if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { 1737 if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) {
1724 /* corrupted packet received */ 1738 /* corrupted packet received */
1725 if (netif_msg_rx_err(sis_priv)) 1739 if (netif_msg_rx_err(sis_priv))
1726 printk(KERN_DEBUG "%s: Corrupted packet " 1740 printk(KERN_DEBUG "%s: Corrupted packet "
1727 "received, buffer status = 0x%8.8x.\n", 1741 "received, buffer status = 0x%8.8x/%d.\n",
1728 net_dev->name, rx_status); 1742 net_dev->name, rx_status, data_size);
1729 sis_priv->stats.rx_errors++; 1743 sis_priv->stats.rx_errors++;
1730 if (rx_status & OVERRUN) 1744 if (rx_status & OVERRUN)
1731 sis_priv->stats.rx_over_errors++; 1745 sis_priv->stats.rx_over_errors++;