diff -urN linux-2.4.19-pre1/Documentation/Configure.help linux/Documentation/Configure.help --- linux-2.4.19-pre1/Documentation/Configure.help Mon Feb 25 18:15:45 2002 +++ linux/Documentation/Configure.help Wed Feb 27 19:56:12 2002 @@ -10265,6 +10265,12 @@ instead of an internal one. Disabling this option will save some memory by making the code size smaller. If unsure, say Y. +Support for Dreamcast Broad Band Adaptor +CONFIG_8139TOO_DREAMCAST + This enables support for the SEGA Broad Band Adaptor for Dreamcast. + It uses 16KB buffer and doesn't support mapping main memory to DMA. + If unsure, say N. + SiS 900/7016 PCI Fast Ethernet Adapter support CONFIG_SIS900 This is a driver for the Fast Ethernet PCI network cards based on diff -urN linux-2.4.19-pre1/drivers/net/8139too.c linux/drivers/net/8139too.c --- linux-2.4.19-pre1/drivers/net/8139too.c Mon Feb 25 18:15:00 2002 +++ linux/drivers/net/8139too.c Wed Feb 27 19:59:31 2002 @@ -109,9 +109,17 @@ #include #include #include + #include #include +#ifdef CONFIG_8139TOO_DREAMCAST +#define CONFIG_8139TOO_BUF16K 1 +#define USE_NO_DMAMAP 1 +#else +#define USE_NO_DMAMAP 0 +#endif + #define RTL8139_DRIVER_NAME DRV_NAME " Fast Ethernet driver " DRV_VERSION #define PFX DRV_NAME ": " @@ -163,7 +171,11 @@ static int debug = -1; /* Size of the in-memory receive ring. */ +#ifdef CONFIG_8139TOO_BUF16K +#define RX_BUF_LEN_IDX 1 /* 0==8K, 1==16K, 2==32K, 3==64K */ +#else #define RX_BUF_LEN_IDX 2 /* 0==8K, 1==16K, 2==32K, 3==64K */ +#endif #define RX_BUF_LEN (8192 << RX_BUF_LEN_IDX) #define RX_BUF_PAD 16 #define RX_BUF_WRAP_PAD 2048 /* spare padding to handle lack of packet wrap */ @@ -217,6 +229,7 @@ DFE690TXD, FE2000VX, ALLIED8139, + SEGABBA, RTL8129, } board_t; @@ -236,6 +249,7 @@ { "D-Link DFE-690TXD (RealTek RTL8139)", RTL8139_CAPS }, { "AboCom FE2000VX (RealTek RTL8139)", RTL8139_CAPS }, { "Allied Telesyn 8139 CardBus", RTL8139_CAPS }, + { "SEGA Broadband Adapter", RTL8139_CAPS }, { "RealTek RTL8129", RTL8129_CAPS }, }; @@ -251,6 +265,7 @@ {0x1186, 0x1340, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DFE690TXD }, {0x13d1, 0xab06, PCI_ANY_ID, PCI_ANY_ID, 0, 0, FE2000VX }, {0x1259, 0xa117, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ALLIED8139 }, + {0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SEGABBA }, #ifdef CONFIG_8139TOO_8129 {0x10ec, 0x8129, PCI_ANY_ID, PCI_ANY_ID, 0, 0, RTL8129 }, @@ -664,10 +679,17 @@ PCIErr | PCSTimeout | RxUnderrun | RxOverflow | RxFIFOOver | TxErr | TxOK | RxErr | RxOK; +#ifdef CONFIG_8139TOO_BUF16K +static const unsigned int rtl8139_rx_config = + RxCfgRcv16K | RxNoWrap | + (RX_FIFO_THRESH << RxCfgFIFOShift) | + (RX_DMA_BURST << RxCfgDMAShift); +#else static const unsigned int rtl8139_rx_config = RxCfgRcv32K | RxNoWrap | (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); +#endif static const unsigned int rtl8139_tx_config = (TX_DMA_BURST << TxDMAShift) | (TX_RETRY << TxRetryShift); @@ -1348,8 +1370,9 @@ tp->rx_config = rtl8139_rx_config | AcceptBroadcast | AcceptMyPhys; RTL_W32 (RxConfig, tp->rx_config); + - /* Check this value: the documentation for IFG contradicts ifself. */ + /* Check this value: the documentation for IFG contradicts itself. */ RTL_W32 (TxConfig, rtl8139_tx_config); tp->cur_rx = 0; @@ -1666,7 +1689,7 @@ /* Note: the chip doesn't have auto-pad! */ spin_lock_irq(&tp->lock); RTL_W32_F (TxStatus0 + (entry * sizeof (u32)), - tp->tx_flag | max(len, (unsigned int)ETH_ZLEN)); + tp->tx_flag | max(len, (unsigned int) ETH_ZLEN)); dev->trans_start = jiffies; diff -urN linux-2.4.19-pre1/drivers/net/Config.in linux/drivers/net/Config.in --- linux-2.4.19-pre1/drivers/net/Config.in Mon Feb 25 18:14:58 2002 +++ linux/drivers/net/Config.in Wed Feb 27 20:00:14 2002 @@ -185,6 +185,7 @@ dep_mbool ' Use PIO instead of MMIO' CONFIG_8139TOO_PIO $CONFIG_8139TOO dep_mbool ' Support for automatic channel equalization (EXPERIMENTAL)' CONFIG_8139TOO_TUNE_TWISTER $CONFIG_8139TOO $CONFIG_EXPERIMENTAL dep_mbool ' Support for older RTL-8129/8130 boards' CONFIG_8139TOO_8129 $CONFIG_8139TOO + dep_mbool ' Support for Dreamcast Broad Band Adaptor' CONFIG_8139TOO_DREAMCAST $CONFIG_8139TOO dep_mbool ' Experiment for better RX reset (EXPERIMENTAL)' CONFIG_8139_NEW_RX_RESET $CONFIG_8139TOO $CONFIG_EXPERIMENTAL dep_tristate ' SiS 900/7016 PCI Fast Ethernet Adapter support' CONFIG_SIS900 $CONFIG_PCI dep_tristate ' SMC EtherPower II' CONFIG_EPIC100 $CONFIG_PCI