--- /spare/tmp/linux-2.4.17-rc2/drivers/net/sis900.c Fri Dec 7 23:03:33 2001 +++ linux_2_4/drivers/net/sis900.c Fri Dec 7 23:02:51 2001 @@ -1,6 +1,6 @@ /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux. Copyright 1999 Silicon Integrated System Corporation - Revision: 1.08.01 Aug. 25 2001 + Revision: 1.08.02 Nov. 30 2001 Modified from the driver which is originally written by Donald Becker. @@ -18,6 +18,7 @@ preliminary Rev. 1.0 Jan. 18, 1998 http://www.sis.com.tw/support/databook.htm + Rev 1.08.02 Nov. 30 2001 Hui-Fen Hsu workaround for EDB & bug fix for dhcp problem Rev 1.08.01 Aug. 25 2001 Hui-Fen Hsu update for 630ET & workaround for ICS1893 PHY Rev 1.08.00 Jun. 11 2001 Hui-Fen Hsu workaround for RTL8201 PHY and some bug fix Rev 1.07.11 Apr. 2 2001 Hui-Fen Hsu updates PCI drivers to use the new pci_set_dma_mask for kernel 2.4.3 @@ -55,18 +56,23 @@ #include #include #include - #include #include +#include +#include + #include /* Processor type for cache alignment. */ #include #include -#include +#include /* User space memory access functions */ #include "sis900.h" +#define SIS900_MODULE_NAME "sis900" +#define SIS900_DRV_VERSION "v1.08.02 11/30/2001" + static char version[] __devinitdata = -KERN_INFO "sis900.c: v1.08.01 9/25/2001\n"; +KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n"; static int max_interrupt_work = 40; static int multicast_filter_limit = 128; @@ -870,6 +876,9 @@ netif_start_queue(net_dev); + /* Workaround for EDB */ + sis900_set_mode(ioaddr, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED); + /* Enable all known interrupts by setting the interrupt mask. */ outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr); outl(RxENA | inl(ioaddr + cr), ioaddr + cr); @@ -1126,6 +1135,7 @@ sis900_set_mode(net_dev->base_addr, speed, duplex); pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); sis630_set_eq(net_dev, revision); + netif_start_queue(net_dev); } sis_priv->timer.expires = jiffies + HZ; @@ -1409,6 +1419,12 @@ unsigned int entry; unsigned long flags; + /* Don't transmit data before the complete of auto-negotiation */ + if(!sis_priv->autong_complete){ + netif_stop_queue(net_dev); + return 1; + } + spin_lock_irqsave(&sis_priv->lock, flags); /* Calculate the next Tx descriptor entry. */ @@ -2091,8 +2144,6 @@ pci_release_regions(pci_dev); pci_set_drvdata(pci_dev, NULL); } - -#define SIS900_MODULE_NAME "sis900" static struct pci_driver sis900_pci_driver = { name: SIS900_MODULE_NAME,