summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/bitbake.conf5
-rw-r--r--conf/machine/fic-gta01.conf4
-rw-r--r--conf/machine/turbostation.conf15
-rw-r--r--packages/asterisk/asterisk_1.2.13.bb5
-rw-r--r--packages/asterisk/asterisk_1.2.14.bb5
-rw-r--r--packages/irssi/irssi_0.8.10.bb4
-rw-r--r--packages/irssi/irssi_svn.bb4
-rw-r--r--packages/linux/linux-turbostation/.mtn2git_empty0
-rw-r--r--packages/linux/linux-turbostation/001_r1000.diff2334
-rw-r--r--packages/linux/linux-turbostation/002_qnap-pic.diff407
-rw-r--r--packages/linux/linux-turbostation/2.6.20.1/.mtn2git_empty0
-rw-r--r--packages/linux/linux-turbostation/defconfig1435
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_platforms_Makefile13
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_platforms_sandpoint.c293
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_platforms_sandpoint.h52
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_Makefile13
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_mpc10x_common.c19
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_arch_ppc_syslib_open_pic.c14
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Kconfig17
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_i2c_chips_Makefile12
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_mtd_maps_physmap.c59
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_drivers_net_r8169.c13
-rw-r--r--packages/linux/linux-turbostation/linux-2.6.16_include_asm-ppc_mpc10x.h14
-rw-r--r--packages/linux/linux-turbostation_2.6.20.1.bb74
-rw-r--r--packages/madwifi/madwifi-ng_r.inc1
-rw-r--r--packages/ohand-tasks/.mtn2git_empty0
-rw-r--r--packages/ohand-tasks/tasks_0.2.bb12
-rw-r--r--packages/openmoko-base/files/session13
-rw-r--r--packages/openmoko-base/openmoko-session_svn.bb16
-rw-r--r--packages/openmoko-examples/openmoko-panel-demo-simple_svn.bb8
-rw-r--r--packages/openmoko-examples/openmoko-panel-demo_svn.bb2
-rw-r--r--packages/ossie/ossie-usrp-tx-control_svn.bb2
-rw-r--r--packages/tasks/task-base.bb4
-rw-r--r--packages/tasks/task-openmoko.bb6
-rw-r--r--packages/usrp/usrp_0.12.bb8
-rw-r--r--site/sparc-linux5
36 files changed, 4853 insertions, 35 deletions
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index ab9a28d628..8fddb25df6 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -124,7 +124,8 @@ FILES_${PN}-dev = "${includedir} ${libdir}/lib*.so ${libdir}/*.la \
/lib/*.a /lib/*.o ${datadir}/aclocal"
FILES_${PN}-locale = "${datadir}/locale"
FILES_${PN}-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
- /bin/.debug /sbin/.debug /lib/.debug ${libdir}/${PN}/.debug"
+ /bin/.debug /sbin/.debug /lib/.debug ${libdir}/${PN}/.debug \
+ ${libdir}/matchbox-panel/.debug"
# File manifest
@@ -448,6 +449,8 @@ OES_BITBAKE_CONF = "1"
MACHINE_FEATURES ?= "kernel26"
DISTRO_FEATURES ?= ""
+ROOT_FLASH_SIZE ?= "0"
+
GUI_MACHINE_CLASS ?= "smallscreen"
DISTRO_EXTRA_RDEPENDS ?= ""
diff --git a/conf/machine/fic-gta01.conf b/conf/machine/fic-gta01.conf
index b47c81d476..f6b35d721b 100644
--- a/conf/machine/fic-gta01.conf
+++ b/conf/machine/fic-gta01.conf
@@ -7,7 +7,7 @@
TARGET_ARCH = "arm"
PACKAGE_EXTRA_ARCHS = "armv4t"
-PREFERRED_PROVIDER_virtual/kernel = "gta01-kernel"
+PREFERRED_PROVIDER_virtual/kernel = "linux-gta01"
MACHINE_FEATURES = "kernel26 apm alsa bluetooth usbgadget usbhost"
@@ -26,7 +26,7 @@ MACHINE_TASK_PROVIDER = "task-base"
SERIAL_CONSOLE = "115200 ttySAC0"
# used by some images
-ROOT_FLASH_SIZE = "60M"
+ROOT_FLASH_SIZE = "60"
# extra jffs2 tweaks
EXTRA_IMAGECMD_jffs2 = "--eraseblock=0x4000 --pad -n"
diff --git a/conf/machine/turbostation.conf b/conf/machine/turbostation.conf
new file mode 100644
index 0000000000..d3952e1d4a
--- /dev/null
+++ b/conf/machine/turbostation.conf
@@ -0,0 +1,15 @@
+TARGET_ARCH = "powerpc"
+TARGET_OS = "linux"
+# TARGET_VENDOR = "oe"
+PACKAGE_EXTRA_ARCHS = "ppc ppc603e"
+# terminal specs - console, but no other ports
+SERIAL_CONSOLE="115200 console"
+USE_VT="0"
+
+MODUTILS=26
+MACHINE_TASK_PROVIDER = "task-base"
+MACHINE_FEATURES= "kernel26 usbhost"
+BOOTSTRAP_EXTRA_RDEPENDS = "udev mdadm"
+PREFERRED_PROVIDER_virtual/kernel = "linux-turbostation"
+
+require conf/machine/include/tune-ppc603e.conf
diff --git a/packages/asterisk/asterisk_1.2.13.bb b/packages/asterisk/asterisk_1.2.13.bb
index 42a3214f0a..3378f6e48b 100644
--- a/packages/asterisk/asterisk_1.2.13.bb
+++ b/packages/asterisk/asterisk_1.2.13.bb
@@ -2,7 +2,7 @@ DESCRIPTION="The Asterisk open source software PBX"
HOMEPAGE="www.asterisk.org"
LICENSE="GPL"
DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis popt"
-PR = "r1"
+PR = "r2"
SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \
file://uclibc-compat-getloadavg.patch;patch=1 \
@@ -15,8 +15,7 @@ export CROSS_COMPILE_BIN="${STAGING_BINDIR_CROSS}"
export CROSS_COMPILE_TARGET="${STAGING_DIR}/${HOST_SYS}"
export CROSS_ARCH="Linux"
-export CROSS_PROC="arm"
-export SUB_PROC="xscale"
+export CROSS_PROC="${TARGET_ARCH}"
export MAKECMDGOALS="dont-optimize"
diff --git a/packages/asterisk/asterisk_1.2.14.bb b/packages/asterisk/asterisk_1.2.14.bb
index 42a3214f0a..3378f6e48b 100644
--- a/packages/asterisk/asterisk_1.2.14.bb
+++ b/packages/asterisk/asterisk_1.2.14.bb
@@ -2,7 +2,7 @@ DESCRIPTION="The Asterisk open source software PBX"
HOMEPAGE="www.asterisk.org"
LICENSE="GPL"
DEPENDS="ncurses zlib openssl curl alsa-lib libogg libvorbis popt"
-PR = "r1"
+PR = "r2"
SRC_URI="http://ftp.digium.com/pub/asterisk/releases/asterisk-${PV}.tar.gz \
file://uclibc-compat-getloadavg.patch;patch=1 \
@@ -15,8 +15,7 @@ export CROSS_COMPILE_BIN="${STAGING_BINDIR_CROSS}"
export CROSS_COMPILE_TARGET="${STAGING_DIR}/${HOST_SYS}"
export CROSS_ARCH="Linux"
-export CROSS_PROC="arm"
-export SUB_PROC="xscale"
+export CROSS_PROC="${TARGET_ARCH}"
export MAKECMDGOALS="dont-optimize"
diff --git a/packages/irssi/irssi_0.8.10.bb b/packages/irssi/irssi_0.8.10.bb
index 2c8b226d0e..f67e8fe9c5 100644
--- a/packages/irssi/irssi_0.8.10.bb
+++ b/packages/irssi/irssi_0.8.10.bb
@@ -2,8 +2,8 @@ DESCRIPTION = "Irssi is a modular IRC client with Perl scripting."
HOMEPAGE = "http://irssi.org/"
SECTION = "console/network"
LICENSE = "GPL"
-DEPENDS += "ncurses glib-1.2"
-PR = "r0"
+DEPENDS += "ncurses glib-2.0"
+PR = "r2"
PACKAGES += "${PN}-common"
FILES_${PN} = "${bindir}/irssi"
diff --git a/packages/irssi/irssi_svn.bb b/packages/irssi/irssi_svn.bb
index 38f4d3fb26..3f4662017f 100644
--- a/packages/irssi/irssi_svn.bb
+++ b/packages/irssi/irssi_svn.bb
@@ -2,9 +2,9 @@ DESCRIPTION = "Irssi is a modular IRC client with Perl scripting."
HOMEPAGE = "http://irssi.org/"
SECTION = "console/network"
LICENSE = "GPL"
-DEPENDS += "ncurses glib-1.2"
+DEPENDS += "ncurses glib-2.0"
PV = "0.8.10+svn${SRCDATE}"
-PR = "r2"
+PR = "r3"
PACKAGES += "${PN}-common"
FILES_${PN} = "${bindir}/irssi"
diff --git a/packages/linux/linux-turbostation/.mtn2git_empty b/packages/linux/linux-turbostation/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-turbostation/.mtn2git_empty
diff --git a/packages/linux/linux-turbostation/001_r1000.diff b/packages/linux/linux-turbostation/001_r1000.diff
new file mode 100644
index 0000000000..0f94d685fa
--- /dev/null
+++ b/packages/linux/linux-turbostation/001_r1000.diff
@@ -0,0 +1,2334 @@
+Index: linux-2.6.20.1/drivers/net/Kconfig
+===================================================================
+--- linux-2.6.20.1.orig/drivers/net/Kconfig 2007-02-20 07:34:32.000000000 +0100
++++ linux-2.6.20.1/drivers/net/Kconfig 2007-02-28 20:29:04.000000000 +0100
+@@ -2085,6 +2085,16 @@
+
+ If in doubt, say Y.
+
++config R1000
++ tristate "Realtek 8169 gigabit ethernet support (R1000)"
++ depends on PCI
++ select CRC32
++ ---help---
++ Say Y here if you have a Realtek 8169 PCI Gigabit Ethernet adapter.
++
++ To compile this driver as a module, choose M here: the module
++ will be called r1000_n. This is recommended.
++
+ config SIS190
+ tristate "SiS190/SiS191 gigabit ethernet support"
+ depends on PCI
+Index: linux-2.6.20.1/drivers/net/Makefile
+===================================================================
+--- linux-2.6.20.1.orig/drivers/net/Makefile 2007-02-20 07:34:32.000000000 +0100
++++ linux-2.6.20.1/drivers/net/Makefile 2007-02-28 20:29:04.000000000 +0100
+@@ -188,6 +188,7 @@
+ obj-$(CONFIG_NET_NETX) += netx-eth.o
+ obj-$(CONFIG_DL2K) += dl2k.o
+ obj-$(CONFIG_R8169) += r8169.o
++obj-$(CONFIG_R1000) += r1000_n.o r1000_ioctl.o
+ obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
+ obj-$(CONFIG_IBMVETH) += ibmveth.o
+ obj-$(CONFIG_S2IO) += s2io.o
+Index: linux-2.6.20.1/drivers/net/r1000.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.20.1/drivers/net/r1000.h 2007-02-28 20:29:04.000000000 +0100
+@@ -0,0 +1,390 @@
++#include <linux/module.h>
++#include <linux/pci.h>
++#include <linux/netdevice.h>
++#include <linux/etherdevice.h>
++#include <linux/delay.h>
++#include <linux/version.h>
++#include <linux/types.h>
++#include <linux/errno.h>
++
++#include <linux/timer.h>
++#include <linux/init.h>
++#include <linux/ethtool.h>
++#include <linux/mii.h>
++#include <asm/uaccess.h>
++#include <linux/interrupt.h>
++#include <linux/spinlock.h>
++
++#define R1000_VERSION "1.05"
++#define RELEASE_DATE "2006/10/25"
++#define MODULENAME "r1000"
++#define R1000_DRIVER_NAME MODULENAME R1000_VERSION ", the Linux device driver for Realtek Ethernet Controllers"
++#define PFX MODULENAME ": "
++
++
++#undef R1000_DEBUG
++#undef R1000_JUMBO_FRAME_SUPPORT
++//#undef R1000_HW_FLOW_CONTROL_SUPPORT
++#define R1000_HW_FLOW_CONTROL_SUPPORT
++
++
++#undef R1000_IOCTL_SUPPORT
++#define R1000_USE_IO
++
++#define R1000_BOTTOM_HALVES
++//#undef R1000_BOTTOM_HALVES
++
++#ifdef R1000_DEBUG
++ #define assert(expr) \
++ if(!(expr)) { printk( "Assertion failed! %s,%s,%s,line=%d\n", #expr,__FILE__,__FUNCTION__,__LINE__); }
++ #define DBG_PRINT( fmt, args...) printk("r1000: " fmt, ## args);
++#else
++ #define assert(expr) do {} while (0)
++ #define DBG_PRINT( fmt, args...) ;
++#endif // end of #ifdef R1000_DEBUG
++
++/* media options */
++#define MAX_UNITS 8
++
++#define OPTION_UNSET -1
++#define OPTION_DISABLED 0
++#define OPTION_ENABLED 1
++
++/* MAC address length*/
++#define MAC_ADDR_LEN 6
++
++#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */
++#define RX_DMA_BURST 7 /* Maximum PCI burst, '6' is 1024 */
++#define TX_DMA_BURST 7 /* Maximum PCI burst, '6' is 1024 */
++#define ETTh 0x3F /* 0x3F means NO threshold */
++
++#define ETH_HDR_LEN 14
++#define DEFAULT_MTU 1500
++#define DEFAULT_RX_BUF_LEN 1536
++
++
++#ifdef R1000_JUMBO_FRAME_SUPPORT
++#define MAX_JUMBO_FRAME_MTU ( 10000 )
++#define MAX_RX_SKBDATA_SIZE ( MAX_JUMBO_FRAME_MTU + ETH_HDR_LEN )
++#else
++//#define MAX_RX_SKBDATA_SIZE 1600
++#define MAX_RX_SKBDATA_SIZE 1608
++#endif //end #ifdef R1000_JUMBO_FRAME_SUPPORT
++
++
++#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */
++
++#define NUM_TX_DESC 1024 /* Number of Tx descriptor registers*/
++#define NUM_RX_DESC 1024 /* Number of Rx descriptor registers*/
++
++#define RTL_MIN_IO_SIZE 0x80
++#define TX_TIMEOUT (6*HZ)
++#define R1000_TIMER_EXPIRE_TIME 100 //100
++
++#ifdef R1000_USE_IO
++#define RTL_W8(reg, val8) outb ((val8), ioaddr + (reg))
++#define RTL_W16(reg, val16) outw ((val16), ioaddr + (reg))
++#define RTL_W32(reg, val32) outl ((val32), ioaddr + (reg))
++#define RTL_R8(reg) inb (ioaddr + (reg))
++#define RTL_R16(reg) inw (ioaddr + (reg))
++#define RTL_R32(reg) ((unsigned long) inl (ioaddr + (reg)))
++#else //R1000_USE_IO
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,6)
++/* write/read MMIO register for Linux kernel 2.4.x*/
++#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg))
++#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg))
++#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg))
++#define RTL_R8(reg) readb (ioaddr + (reg))
++#define RTL_R16(reg) readw (ioaddr + (reg))
++#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg)))
++#else
++/* write/read MMIO register for Linux kernel 2.6.x*/
++#define RTL_W8(reg, val8) iowrite8 ((val8), (void *)(ioaddr + (reg)))
++#define RTL_W16(reg, val16) iowrite16 ((val16), (void *)(ioaddr + (reg)))
++#define RTL_W32(reg, val32) iowrite32 ((val32), (void *)(ioaddr + (reg)))
++#define RTL_R8(reg) ioread8 ((void *)(ioaddr + (reg)))
++#define RTL_R16(reg) ioread16 ((void *)(ioaddr + (reg)))
++#define RTL_R32(reg) ((unsigned long) ioread32 ((void *)(ioaddr + (reg))))
++#endif
++#endif //R1000_USE_IO
++
++#define MCFG_METHOD_1 0x01
++#define MCFG_METHOD_2 0x02
++#define MCFG_METHOD_3 0x03
++#define MCFG_METHOD_4 0x04
++#define MCFG_METHOD_5 0x05
++#define MCFG_METHOD_11 0x0B
++#define MCFG_METHOD_12 0x0C
++#define MCFG_METHOD_13 0x0D
++#define MCFG_METHOD_14 0x0E
++#define MCFG_METHOD_15 0x0F
++
++#define PCFG_METHOD_1 0x01 //PHY Reg 0x03 bit0-3 == 0x0000
++#define PCFG_METHOD_2 0x02 //PHY Reg 0x03 bit0-3 == 0x0001
++#define PCFG_METHOD_3 0x03 //PHY Reg 0x03 bit0-3 == 0x0002
++
++enum pci_config_header_registers {
++ VID = 0x00,
++ DID = 0x02,
++ Command = 0x04,
++ Status = 0x06,
++ Rev_ID = 0x08,
++ Class_Code = 0x09,
++ Cache_Line_Size = 0x0C,
++ Latency_Timer = 0x0D,
++ Header_type = 0x0E,
++ BIST = 0x0F,
++ IOAR = 0x10,
++ MEMAR = 0x14,
++ CIS_Pointer = 0x28,
++ Sub_VID = 0x2C,
++ Sub_DID = 0x2E,
++ BMAR = 0x30,
++ Interrupt_Line = 0x3C,
++ Interrutp_Pin = 0x3D,
++ Min_Gnt = 0x3E,
++ Max_Lat = 0x3F,
++};
++
++enum r1000_registers {
++ MAC0 = 0x00,
++ MAR0 = 0x08,
++ TxDescStartAddr = 0x20,
++ TxHDescStartAddr = 0x28,
++ FLASH = 0x30,
++ ERSR = 0x36,
++ ChipCmd = 0x37,
++ TxPoll = 0x38,
++ IntrMask = 0x3C,
++ IntrStatus = 0x3E,
++ TxConfig = 0x40,
++ RxConfig = 0x44,
++ TCTR = 0x48,
++ RxMissed = 0x4C,
++ Cfg9346 = 0x50,
++ Config0 = 0x51,
++ Config1 = 0x52,
++ Config2 = 0x53,
++ Config3 = 0x54,
++ Config4 = 0x55,
++ Config5 = 0x56,
++ TimerInt = 0x58,
++ MultiIntr = 0x5C,
++ PHYAR = 0x60,
++ TBICSR = 0x64,
++ TBI_ANAR = 0x68,
++ TBI_LPAR = 0x6A,
++ PHYstatus = 0x6C,
++ Off7Ch = 0x7C,
++ RxMaxSize = 0xDA,
++ CPlusCmd = 0xE0,
++ RxDescStartAddr = 0xE4,
++ ETThReg = 0xEC,
++ FuncEvent = 0xF0,
++ FuncEventMask = 0xF4,
++ FuncPresetState = 0xF8,
++ FuncForceEvent = 0xFC,
++};
++
++enum r1000_register_content {
++ /*InterruptStatusBits*/
++ SYSErr = 0x8000,
++ PCSTimeout = 0x4000,
++ SWInt = 0x0100,
++ TxDescUnavail = 0x80,
++ RxFIFOOver = 0x40,
++ LinkChg = 0x20,
++ RxDescUnavail = 0x10,
++ TxErr = 0x08,
++ TxOK = 0x04,
++ RxErr = 0x02,
++ RxOK = 0x01,
++
++ //TCTR/TimerInt contetn
++ CLK_tick = 0x1770, //for PCI clock=33MHz 0x1770=200usec
++
++ /*RxStatusDesc*/
++ RxRES = 0x00200000,
++ RxCRC = 0x00080000,
++ RxRUNT = 0x00100000,
++ RxRWT = 0x00400000,
++
++ /*ChipCmdBits*/
++ CmdReset = 0x10,
++ CmdRxEnb = 0x08,
++ CmdTxEnb = 0x04,
++ RxBufEmpty = 0x01,
++
++ /*Cfg9346Bits*/
++ Cfg9346_Lock = 0x00,
++ Cfg9346_Unlock = 0xC0,
++
++ /*rx_mode_bits*/
++ AcceptErr = 0x20,
++ AcceptRunt = 0x10,
++ AcceptBroadcast = 0x08,
++ AcceptMulticast = 0x04,
++ AcceptMyPhys = 0x02,
++ AcceptAllPhys = 0x01,
++
++ /*RxConfigBits*/
++ RxCfgFIFOShift = 13,
++ RxCfgDMAShift = 8,
++
++ /*TxConfigBits*/
++ TxInterFrameGapShift = 24,
++ TxDMAShift = 8,
++
++ //C+ Command Register
++ CPCR_MulRW_Enable = 0x0008,
++
++ /*rtl8169_PHYstatus (MAC offset 0x6C)*/
++ TBI_Enable = 0x80,
++ TxFlowCtrl = 0x40,
++ RxFlowCtrl = 0x20,
++ _1000Mbps = 0x10,
++ _100Mbps = 0x08,
++ _10Mbps = 0x04,
++ LinkStatus = 0x02,
++ FullDup = 0x01,
++
++ /*GIGABIT_PHY_registers*/
++ PHY_CTRL_REG = 0,
++ PHY_STAT_REG = 1,
++ PHY_AUTO_NEGO_REG = 4,
++ PHY_1000_CTRL_REG = 9,
++
++ /*GIGABIT_PHY_REG_BIT*/
++ PHY_Restart_Auto_Nego = 0x0200,
++ PHY_Enable_Auto_Nego = 0x1000,
++
++ //PHY_STAT_REG = 1;
++ PHY_Auto_Neco_Comp = 0x0020,
++
++ //PHY_AUTO_NEGO_REG = 4;
++ PHY_Cap_10_Half = 0x0020,
++ PHY_Cap_10_Full = 0x0040,
++ PHY_Cap_100_Half = 0x0080,
++ PHY_Cap_100_Full = 0x0100,
++
++ //PHY_1000_CTRL_REG = 9;
++ PHY_Cap_1000_Full = 0x0200,
++ PHY_Cap_1000_Half = 0x0100,
++
++ PHY_Cap_PAUSE = 0x0400,
++ PHY_Cap_ASYM_PAUSE = 0x0800,
++
++ PHY_Cap_Null = 0x0,
++
++ /*_MediaType*/
++ _10_Half = 0x01,
++ _10_Full = 0x02,
++ _100_Half = 0x04,
++ _100_Full = 0x08,
++ _1000_Full = 0x10,
++
++ /*_TBICSRBit*/
++ TBILinkOK = 0x02000000,
++};
++
++
++
++enum _DescStatusBit {
++ OWNbit = 0x80000000,
++ EORbit = 0x40000000,
++ FSbit = 0x20000000,
++ LSbit = 0x10000000,
++};
++
++
++struct TxDesc {
++ u32 status;
++ u32 vlan_tag;
++ u32 buf_addr;
++ u32 buf_Haddr;
++};
++
++struct RxDesc {
++ u32 status;
++ u32 vlan_tag;
++ u32 buf_addr;
++ u32 buf_Haddr;
++};
++
++#define r1000_request_timer( timer, timer_expires, timer_func, timer_data ) \
++{ \
++ init_timer(timer); \
++ timer->expires = (unsigned long)(jiffies + timer_expires); \
++ timer->data = (unsigned long)(timer_data); \
++ timer->function = (void *)(timer_func); \
++ add_timer(timer); \
++ DBG_PRINT("request_timer at 0x%08lx\n", (unsigned long)timer); \
++}
++
++#define r1000_delete_timer( del_timer_t ) \
++{ \
++ del_timer(del_timer_t); \
++ DBG_PRINT("delete_timer at 0x%08lx\n", (unsigned long)del_timer_t); \
++}
++
++#define r1000_mod_timer( timer, timer_expires ) \
++{ \
++ mod_timer( timer, jiffies + timer_expires ); \
++}
++
++typedef struct timer_list rt_timer_t;
++
++struct r1000_private {
++ unsigned long ioaddr; /* memory map physical address*/
++ struct pci_dev *pci_dev; /* Index of PCI device */
++ struct net_device_stats stats; /* statistics of net device */
++ spinlock_t lock; /* spin lock flag */
++ spinlock_t tx_lock; /* tx spin lock flag */
++ spinlock_t rx_lock; /* rx spin lock flag */
++ int chipset;
++ int mcfg;
++ int pcfg;
++ rt_timer_t r1000_timer;
++ unsigned long expire_time;
++
++#ifdef R1000_BOTTOM_HALVES
++ struct tasklet_struct r1000_rx_tasklet;
++ struct tasklet_struct r1000_tx_tasklet;
++#endif //R1000_BOTTOM_HALVES
++
++ unsigned int tx_cnt;
++
++ unsigned long phy_link_down_cnt;
++ unsigned long cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */
++ unsigned long cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */
++ unsigned long dirty_tx;
++ struct TxDesc *TxDescArray; /* Index of 256-alignment Tx Descriptor buffer */
++ struct RxDesc *RxDescArray; /* Index of 256-alignment Rx Descriptor buffer */
++ struct sk_buff *Tx_skbuff[NUM_TX_DESC];/* Index of Transmit data buffer */
++ struct sk_buff *Rx_skbuff[NUM_RX_DESC];/* Receive data buffer */
++ unsigned char drvinit_fail;
++
++ dma_addr_t txdesc_array_dma_addr[NUM_TX_DESC];
++ dma_addr_t rxdesc_array_dma_addr[NUM_RX_DESC];
++ dma_addr_t rx_skbuff_dma_addr[NUM_RX_DESC];
++
++ void *txdesc_space;
++ dma_addr_t txdesc_phy_dma_addr;
++ int sizeof_txdesc_space;
++
++ void *rxdesc_space;
++ dma_addr_t rxdesc_phy_dma_addr;
++ int sizeof_rxdesc_space;
++
++ int curr_mtu_size;
++ int tx_pkt_len;
++ int rx_pkt_len;
++
++ int hw_rx_pkt_len;
++
++ u16 speed;
++ u8 duplex;
++ u8 autoneg;
++};
++
++
+Index: linux-2.6.20.1/drivers/net/r1000_ioctl.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.20.1/drivers/net/r1000_ioctl.c 2007-02-28 20:29:04.000000000 +0100
+@@ -0,0 +1,129 @@
++#include "r1000.h"
++
++extern int R1000_READ_GMII_REG(unsigned long ioaddr, int RegAddr);
++extern int R1000_WRITE_GMII_REG(unsigned long ioaddr, int RegAddr, int value);
++extern int r1000_set_medium(struct net_device *netdev,u16 speed,u8 duplex,u8 autoneg);
++
++static int ethtool_get_settings(struct net_device *netdev,struct ethtool_cmd *ecmd){
++ struct r1000_private *priv = (struct r1000_private *)(netdev->priv);
++ unsigned long ioaddr = priv->ioaddr;
++ unsigned int bmcr = R1000_READ_GMII_REG(ioaddr,PHY_STAT_REG);
++ unsigned int bmsr = R1000_READ_GMII_REG(ioaddr,PHY_AUTO_NEGO_REG);
++ unsigned int gbcr = R1000_READ_GMII_REG(ioaddr,PHY_1000_CTRL_REG);
++
++ ecmd->supported = (SUPPORTED_10baseT_Half|
++ SUPPORTED_10baseT_Full|
++ SUPPORTED_100baseT_Half|
++ SUPPORTED_100baseT_Full|
++ SUPPORTED_1000baseT_Full|
++ SUPPORTED_Autoneg|
++ SUPPORTED_TP);
++
++ ecmd->advertising = ADVERTISED_TP;
++
++ if(bmsr&ADVERTISE_10HALF)
++ ecmd->advertising |= ADVERTISED_10baseT_Half;
++ if(bmsr&ADVERTISE_10FULL)
++ ecmd->advertising |= ADVERTISED_10baseT_Full;
++ if(bmsr&ADVERTISE_100HALF)
++ ecmd->advertising |= ADVERTISED_100baseT_Half;
++ if(bmsr&ADVERTISE_100FULL)
++ ecmd->advertising |= ADVERTISED_100baseT_Full;
++ if(gbcr&PHY_Cap_1000_Full)
++ ecmd->advertising |= ADVERTISED_1000baseT_Full;
++ if(bmcr&PHY_Enable_Auto_Nego)
++ ecmd->advertising |= ADVERTISED_Autoneg;
++
++ ecmd->port = PORT_TP;
++
++ if(priv->mcfg == MCFG_METHOD_1)
++ ecmd->transceiver = XCVR_EXTERNAL;
++ else
++ ecmd->transceiver = XCVR_INTERNAL;
++
++ if(RTL_R8(PHYstatus)&LinkStatus){
++ if(RTL_R8(PHYstatus)&_1000Mbps)
++ ecmd->speed = SPEED_1000;
++ else if(RTL_R8(PHYstatus)&_100Mbps)
++ ecmd->speed = SPEED_100;
++ else if(RTL_R8(PHYstatus)&_10Mbps)
++ ecmd->speed = SPEED_10;
++
++ if(RTL_R8(PHYstatus)&FullDup)
++ ecmd->duplex = DUPLEX_FULL;
++ else
++ ecmd->duplex = DUPLEX_HALF;
++
++ }else{
++ ecmd->speed = -1;
++ ecmd->duplex = -1;
++ }
++ ecmd->autoneg = AUTONEG_ENABLE;
++ return 0;
++}
++
++static int ethtool_set_settings(struct net_device *netdev,struct ethtool_cmd *ecmd){
++ return r1000_set_medium(netdev,ecmd->speed,ecmd->duplex,ecmd->autoneg);
++}
++
++static void ethtool_get_drvinfo(struct net_device *netdev,struct ethtool_drvinfo *drvinfo){
++ struct r1000_private *priv = netdev_priv(netdev);
++
++ strncpy(drvinfo->driver, MODULENAME,32);
++ strncpy(drvinfo->version, R1000_VERSION,32);
++ strncpy(drvinfo->fw_version, "N/A", 32);
++ strncpy(drvinfo->bus_info, pci_name(priv->pci_dev), 32);
++}
++
++static int ethtool_nway_reset(struct net_device *netdev){
++// struct r1000_private *priv = netdev_priv(netdev);
++
++ if(netif_running(netdev)){
++ }
++
++ return 0;
++}
++
++uint32_t ethtool_get_link(struct net_device *netdev){
++ return netif_carrier_ok(netdev) ? 1 : 0;
++}
++
++int ethtool_ioctl(struct ifreq *ifr){
++ struct net_device *netdev=__dev_get_by_name(ifr->ifr_name);
++ void *useraddr=(void *)ifr->ifr_data;
++ uint32_t ethcmd;
++
++ if(!capable(CAP_NET_ADMIN))
++ return -EPERM;
++
++ if(!netdev || !netif_device_present(netdev))
++ return -ENODEV;
++ if(copy_from_user(&ethcmd, useraddr, sizeof(ethcmd)))
++ return -EFAULT;
++
++ switch (ethcmd){
++ case ETHTOOL_GSET:
++ return ethtool_get_settings(netdev,useraddr);
++ case ETHTOOL_SSET:
++ return ethtool_set_settings(netdev,useraddr);
++ case ETHTOOL_GDRVINFO:
++ ethtool_get_drvinfo(netdev,useraddr);
++ case ETHTOOL_NWAY_RST:
++ return ethtool_nway_reset(netdev);
++ case ETHTOOL_GLINK:
++ return ethtool_get_link(netdev);
++ default:
++ return -EOPNOTSUPP;
++ }
++ return -EOPNOTSUPP;
++}
++
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
++struct ethtool_ops r1000_ethtool_ops = {
++ .get_settings = ethtool_get_settings,
++ .set_settings = ethtool_set_settings,
++ .get_drvinfo = ethtool_get_drvinfo,
++ .nway_reset = ethtool_nway_reset,
++ .get_link = ethtool_get_link,
++};
++#endif
+Index: linux-2.6.20.1/drivers/net/r1000_n.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ linux-2.6.20.1/drivers/net/r1000_n.c 2007-02-28 20:29:04.000000000 +0100
+@@ -0,0 +1,1767 @@
++//=========================================================================
++//Realtek Ethernet driver for Linux kernel 2.4.x. and 2.6.x
++//=========================================================================
++
++#include "r1000.h"
++
++#ifdef MODULE_PARM
++static int speed[MAX_UNITS] = {-1,-1,-1,-1,-1,-1,-1,-1};
++
++static int duplex[MAX_UNITS] = {-1,-1,-1,-1,-1,-1,-1,-1};
++
++static int autoneg[MAX_UNITS] = {-1,-1,-1,-1,-1,-1,-1,-1};
++#endif //MODULE_PARM
++
++/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
++static int max_interrupt_work = 20;
++
++/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
++ The RTL chips use a 64 element hash table based on the Ethernet CRC. */
++static int multicast_filter_limit = 32;
++
++const static struct {
++ const char *name;
++ u8 mcfg; /* depend on documents of Realtek */
++ u32 RxConfigMask; /* should clear the bits supported by this chip */
++} rtl_chip_info[] = {
++ { "RTL8169", MCFG_METHOD_1, 0xff7e1880 },
++ { "RTL8169S/8110S", MCFG_METHOD_2, 0xff7e1880 },
++ { "RTL8169S/8110S", MCFG_METHOD_3, 0xff7e1880 },
++ { "RTL8169SB/8110SB", MCFG_METHOD_4, 0xff7e1880 },
++ { "RTL8110SC", MCFG_METHOD_5, 0xff7e1880 },
++ { "RTL8168B/8111B", MCFG_METHOD_11, 0xff7e1880 },
++ { "RTL8168B/8111B", MCFG_METHOD_12, 0xff7e1880 },
++ { "RTL8101E", MCFG_METHOD_13, 0xff7e1880 },
++ { "RTL8100E", MCFG_METHOD_14, 0xff7e1880 },
++ { "RTL8100E", MCFG_METHOD_15, 0xff7e1880 },
++ { 0 }
++};
++
++
++static struct pci_device_id r1000_pci_tbl[] __devinitdata = {
++ { 0x10ec, 0x8169, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
++ { 0x10ec, 0x8167, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
++ { 0x10ec, 0x8168, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
++ { 0x10ec, 0x8136, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
++ {0,}
++};
++
++
++MODULE_DEVICE_TABLE (pci, r1000_pci_tbl);
++MODULE_AUTHOR ("Realtek");
++MODULE_DESCRIPTION ("Linux device driver for Realtek Ethernet Controllers");
++
++#ifdef MODULE_PARM
++MODULE_PARM (speed, "1-" __MODULE_STRING(MAX_UNITS) "i");
++MODULE_PARM_DESC(speed,"Link speed");
++MODULE_PARM (duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
++MODULE_PARM_DESC(duplex,"Link duplex");
++MODULE_PARM (autoneg, "1-" __MODULE_STRING(MAX_UNITS) "i");
++MODULE_PARM_DESC(autoneg,"Autonegotiation");
++#else //MODULE_PARM
++/* Module Parameters are always initialized to -1, so that the driver
++ * can tell the difference between no user specified value or the
++ * user asking for the default value.
++ * The true default values are loaded in when e1000_check_options is called.
++ *
++ * This is a GCC extension to ANSI C.
++ * See the item "Labeled Elements in Initializers" in the section
++ * "Extensions to the C Language Family" of the GCC documentation.
++ */
++#define R1000_PARAM_INIT { [0 ... MAX_UNITS] = OPTION_UNSET }
++/* All parameters are treated the same, as an integer array of values.
++ * This macro just reduces the need to repeat the same declaration code
++ * over and over (plus this helps to avoid typo bugs).
++ */
++#define R1000_PARAM(X, S) \
++ static int __devinitdata X[MAX_UNITS+