mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 20:04:05 +02:00
Upgrade to Linux 2.6.19
- Includes large parts of the patch from #1021 by dpalffy - Includes RB532 NAND driver changes by n0-1 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5789 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a8131d4638
commit
c92885c466
@ -15,9 +15,9 @@ define Target/Description
|
||||
Build firmware images for Aruba boards
|
||||
endef
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
DEFAULT_PACKAGES += kmod-madwifi
|
||||
|
File diff suppressed because it is too large
Load Diff
204
target/linux/aruba-2.6/config-diff
Normal file
204
target/linux/aruba-2.6/config-diff
Normal file
@ -0,0 +1,204 @@
|
||||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
# CONFIG_64BIT_PHYS_ADDR is not set
|
||||
# CONFIG_8139TOO is not set
|
||||
CONFIG_AR2313=y
|
||||
# CONFIG_B44 is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
# CONFIG_CPU_LITTLE_ENDIAN is not set
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
# CONFIG_DDB5477 is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_E100 is not set
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_HERMES is not set
|
||||
# CONFIG_HOSTAP is not set
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
# CONFIG_HZ_1024 is not set
|
||||
# CONFIG_HZ_128 is not set
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_256 is not set
|
||||
# CONFIG_HZ_48 is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_IDE is not set
|
||||
CONFIG_IDT_RC32434_ETH=y
|
||||
# CONFIG_IEEE80211 is not set
|
||||
# CONFIG_IEEE80211_SOFTMAC is not set
|
||||
# CONFIG_IPW2100 is not set
|
||||
# CONFIG_IPW2200 is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
# CONFIG_LAN_SAA9730 is not set
|
||||
CONFIG_MACH_ARUBA=y
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
CONFIG_MINI_FO=m
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_BOSPORUS is not set
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MIPS_DB1000 is not set
|
||||
# CONFIG_MIPS_DB1100 is not set
|
||||
# CONFIG_MIPS_DB1200 is not set
|
||||
# CONFIG_MIPS_DB1500 is not set
|
||||
# CONFIG_MIPS_DB1550 is not set
|
||||
# CONFIG_MIPS_EV64120 is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_MIRAGE is not set
|
||||
# CONFIG_MIPS_MTX1 is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_PB1000 is not set
|
||||
# CONFIG_MIPS_PB1100 is not set
|
||||
# CONFIG_MIPS_PB1200 is not set
|
||||
# CONFIG_MIPS_PB1500 is not set
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MIPS_VPE_LOADER is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
# CONFIG_MOMENCO_OCELOT is not set
|
||||
# CONFIG_MOMENCO_OCELOT_3 is not set
|
||||
# CONFIG_MOMENCO_OCELOT_C is not set
|
||||
# CONFIG_MOMENCO_OCELOT_G is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
|
||||
CONFIG_MTD_CFI_NOSWAP=y
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_CFI_UTIL=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_COMPLEX_MAPPINGS=y
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
CONFIG_MTD_GEN_PROBE=y
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
# CONFIG_MTD_OTP is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_PCI is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_PHYSMAP_BANKWIDTH=1
|
||||
CONFIG_MTD_PHYSMAP_LEN=0x400000
|
||||
CONFIG_MTD_PHYSMAP_START=0x1fc00000
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
CONFIG_NATSEMI=y
|
||||
# CONFIG_NE2K_PCI is not set
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
# CONFIG_PAGE_SIZE_8KB is not set
|
||||
# CONFIG_PCIPCWATCHDOG is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
# CONFIG_PCMCIA is not set
|
||||
# CONFIG_PCMCIA_ATMEL is not set
|
||||
# CONFIG_PCI_ATMEL is not set
|
||||
# CONFIG_PCI_HERMES is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_V2PCI is not set
|
||||
# CONFIG_RTC is not set
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
# CONFIG_SGI_IP22 is not set
|
||||
# CONFIG_SGI_IP27 is not set
|
||||
# CONFIG_SGI_IP32 is not set
|
||||
# CONFIG_SIBYTE_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_PTSWARM is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
# CONFIG_SOFT_WATCHDOG is not set
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
# CONFIG_TOSHIBA_JMR3927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4938 is not set
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
# CONFIG_USB_EHCI_SPLIT_ISO is not set
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
CONFIG_USB_UHCI_HCD=m
|
||||
# CONFIG_VIA_RHINE is not set
|
@ -570,7 +570,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/nvram/nvram434.h linux-2.6.17-owrt/arch/m
|
||||
diff -Nur linux-2.6.17/arch/mips/aruba/prom.c linux-2.6.17-owrt/arch/mips/aruba/prom.c
|
||||
--- linux-2.6.17/arch/mips/aruba/prom.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/arch/mips/aruba/prom.c 2006-06-18 12:44:28.000000000 +0200
|
||||
@@ -0,0 +1,111 @@
|
||||
@@ -0,0 +1,114 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
+ * BRIEF MODULE DESCRIPTION
|
||||
@ -609,7 +609,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/prom.c linux-2.6.17-owrt/arch/mips/aruba/
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/module.h>
|
||||
@ -629,7 +629,10 @@ diff -Nur linux-2.6.17/arch/mips/aruba/prom.c linux-2.6.17-owrt/arch/mips/aruba/
|
||||
+unsigned int arch_has_pci=0;
|
||||
+
|
||||
+/* Kernel Boot parameters */
|
||||
+static unsigned char bootparm[] = "console=ttyS0,9600 root=/dev/mtdblock1 rootfstype=jffs2";
|
||||
+static unsigned char bootparm[] =
|
||||
+ "mtdparts=physmap-flash.0:3520k@0x080000(zImage),2880k@0x120000(JFFS2),8k@0x3f8000(NVRAM) "
|
||||
+ "console=ttyS0,9600 root=/dev/mtdblock1 rootfstype=jffs2 ";
|
||||
+
|
||||
+
|
||||
+extern unsigned long mips_machgroup;
|
||||
+extern unsigned long mips_machtype;
|
||||
@ -725,7 +728,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/serial.c linux-2.6.17-owrt/arch/mips/arub
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/pci.h>
|
||||
@ -783,7 +786,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/serial.c linux-2.6.17-owrt/arch/mips/arub
|
||||
diff -Nur linux-2.6.17/arch/mips/aruba/setup.c linux-2.6.17-owrt/arch/mips/aruba/setup.c
|
||||
--- linux-2.6.17/arch/mips/aruba/setup.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/arch/mips/aruba/setup.c 2006-06-18 12:44:28.000000000 +0200
|
||||
@@ -0,0 +1,134 @@
|
||||
@@ -0,0 +1,128 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
+ * BRIEF MODULE DESCRIPTION
|
||||
@ -840,9 +843,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/setup.c linux-2.6.17-owrt/arch/mips/aruba
|
||||
+extern char *__init prom_getcmdline(void);
|
||||
+
|
||||
+extern void (*board_time_init) (void);
|
||||
+extern void (*board_timer_setup) (struct irqaction * irq);
|
||||
+extern void aruba_time_init(void);
|
||||
+extern void aruba_timer_setup(struct irqaction *irq);
|
||||
+extern void aruba_reset(void);
|
||||
+
|
||||
+#define epldMask ((volatile unsigned char *)0xB900000d)
|
||||
@ -874,12 +875,10 @@ diff -Nur linux-2.6.17/arch/mips/aruba/setup.c linux-2.6.17-owrt/arch/mips/aruba
|
||||
+extern char * getenv(char *e);
|
||||
+extern void unlock_ap60_70_flash(void);
|
||||
+
|
||||
+void __init plat_setup(void)
|
||||
+void __init plat_mem_setup(void)
|
||||
+{
|
||||
+ board_time_init = aruba_time_init;
|
||||
+
|
||||
+ board_timer_setup = aruba_timer_setup;
|
||||
+
|
||||
+ _machine_restart = aruba_machine_restart;
|
||||
+ _machine_halt = aruba_machine_halt;
|
||||
+ pm_power_off = aruba_machine_halt;
|
||||
@ -894,8 +893,6 @@ diff -Nur linux-2.6.17/arch/mips/aruba/setup.c linux-2.6.17-owrt/arch/mips/aruba
|
||||
+ unlock_ap60_70_flash();
|
||||
+
|
||||
+ printk("BOARD - %s\n",getenv("boardname"));
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+int page_is_ram(unsigned long pagenr)
|
||||
@ -960,7 +957,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/time.c linux-2.6.17-owrt/arch/mips/aruba/
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/kernel_stat.h>
|
||||
+#include <linux/sched.h>
|
||||
@ -1011,7 +1008,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/time.c linux-2.6.17-owrt/arch/mips/aruba/
|
||||
+
|
||||
+}
|
||||
+
|
||||
+void __init aruba_timer_setup(struct irqaction *irq)
|
||||
+void __init plat_timer_setup(struct irqaction *irq)
|
||||
+{
|
||||
+ /* we are using the cpu counter for timer interrupts */
|
||||
+ setup_irq(MIPS_CPU_TIMER_IRQ, irq);
|
||||
@ -1029,7 +1026,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/time.c linux-2.6.17-owrt/arch/mips/aruba/
|
||||
+ irq_enter();
|
||||
+ kstat_this_cpu.irqs[irq]++;
|
||||
+
|
||||
+ timer_interrupt(irq, NULL, regs);
|
||||
+ timer_interrupt(irq, NULL);
|
||||
+ irq_exit();
|
||||
+}
|
||||
diff -Nur linux-2.6.17/arch/mips/Kconfig linux-2.6.17-owrt/arch/mips/Kconfig
|
||||
@ -1243,7 +1240,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
@ -1849,7 +1846,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r
|
||||
+#ifdef RC32434_REVISION
|
||||
+/* Ethernet Rx Overflow interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_ovr_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_ovr_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local *lp;
|
||||
@ -1882,7 +1879,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r
|
||||
+
|
||||
+/* Ethernet Tx Underflow interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_und_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_und_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local *lp;
|
||||
@ -1915,7 +1912,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r
|
||||
+
|
||||
+/* Ethernet Rx DMA interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_rx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_rx_dma_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local* lp;
|
||||
@ -2129,7 +2126,7 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.c linux-2.6.17-owrt/drivers/net/r
|
||||
+
|
||||
+/* Ethernet Tx DMA interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_tx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_tx_dma_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local *lp;
|
||||
@ -2630,11 +2627,11 @@ diff -Nur linux-2.6.17/drivers/net/rc32434_eth.h linux-2.6.17-owrt/drivers/net/r
|
||||
+static int rc32434_open(struct net_device *dev);
|
||||
+static int rc32434_send_packet(struct sk_buff *skb, struct net_device *dev);
|
||||
+static void rc32434_mii_handler(unsigned long data);
|
||||
+static irqreturn_t rc32434_und_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_rx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_tx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_und_interrupt(int irq, void *dev_id);
|
||||
+static irqreturn_t rc32434_rx_dma_interrupt(int irq, void *dev_id);
|
||||
+static irqreturn_t rc32434_tx_dma_interrupt(int irq, void *dev_id);
|
||||
+#ifdef RC32434_REVISION
|
||||
+static irqreturn_t rc32434_ovr_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_ovr_interrupt(int irq, void *dev_id);
|
||||
+#endif
|
||||
+static int rc32434_close(struct net_device *dev);
|
||||
+static struct net_device_stats *rc32434_get_stats(struct net_device *dev);
|
||||
@ -6769,7 +6766,7 @@ diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32434/rc32434.h linux-2.6.1
|
||||
+#ifndef _RC32434_H_
|
||||
+#define _RC32434_H_
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/idt-boards/rc32434/rc32434_timer.h>
|
||||
@ -9582,7 +9579,7 @@ diff -Nur linux-2.6.17/include/asm-mips/idt-boards/rc32438/rc32438.h linux-2.6.1
|
||||
+
|
||||
+#ifndef __IDT_RC32438_H__
|
||||
+#define __IDT_RC32438_H__
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/idt-boards/rc32438/rc32438_timer.h>
|
||||
|
@ -118,42 +118,4 @@ diff -Nur linux-2.6.15/drivers/mtd/chips/cfi_probe.c linux-2.6.15-openwrt/driver
|
||||
cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL);
|
||||
cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL);
|
||||
cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL);
|
||||
diff -Nur linux-2.6.15/drivers/mtd/maps/physmap.c linux-2.6.15-openwrt/drivers/mtd/maps/physmap.c
|
||||
--- linux-2.6.15/drivers/mtd/maps/physmap.c 2006-01-03 04:21:10.000000000 +0100
|
||||
+++ linux-2.6.15-openwrt/drivers/mtd/maps/physmap.c 2006-01-10 00:32:32.000000000 +0100
|
||||
@@ -34,15 +34,31 @@
|
||||
static struct mtd_partition *mtd_parts;
|
||||
static int mtd_parts_nb;
|
||||
|
||||
-static int num_physmap_partitions;
|
||||
-static struct mtd_partition *physmap_partitions;
|
||||
+static int num_physmap_partitions = 3;
|
||||
+static struct mtd_partition physmap_partitions[] = {
|
||||
+ {
|
||||
+ name: "zImage",
|
||||
+ size: 0x3f0000-0x80000,
|
||||
+ offset: 0x80000,
|
||||
+ },
|
||||
+ {
|
||||
+ name: "JFFS2",
|
||||
+ size: 0x3f0000-0x120000,
|
||||
+ offset: 0x120000,
|
||||
+ },
|
||||
+ {
|
||||
+ name: "NVRAM",
|
||||
+ size: 0x2000,
|
||||
+ offset: 0x3f8000,
|
||||
+ }
|
||||
+};
|
||||
|
||||
static const char *part_probes[] __initdata = {"cmdlinepart", "RedBoot", NULL};
|
||||
|
||||
void physmap_set_partitions(struct mtd_partition *parts, int num_parts)
|
||||
{
|
||||
- physmap_partitions=parts;
|
||||
- num_physmap_partitions=num_parts;
|
||||
+// physmap_partitions=parts;
|
||||
+// num_physmap_partitions=num_parts;
|
||||
}
|
||||
#endif /* CONFIG_MTD_PARTITIONS */
|
||||
|
||||
|
||||
|
@ -220,7 +220,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/irq.c linux-2.6.17-openwrt/arch/mips/arub
|
||||
+ irq_desc[i].status = IRQ_DISABLED;
|
||||
+ irq_desc[i].action = NULL;
|
||||
+ irq_desc[i].depth = 1;
|
||||
+ irq_desc[i].handler = &aruba_irq_type;
|
||||
+ irq_desc[i].chip = &aruba_irq_type;
|
||||
+ spin_lock_init(&irq_desc[i].lock);
|
||||
+ }
|
||||
+}
|
||||
@ -263,7 +263,7 @@ diff -Nur linux-2.6.17/arch/mips/aruba/irq.c linux-2.6.17-openwrt/arch/mips/arub
|
||||
+ pend = READ_PEND_MUSCAT(addr);
|
||||
+ pend &= ~READ_MASK_MUSCAT(addr); // only unmasked interrupts
|
||||
+ pend = 39 - rc32434_clz(pend);
|
||||
+ do_IRQ(pend + (group << 5), regs);
|
||||
+ do_IRQ(pend + (group << 5));
|
||||
+ }
|
||||
+ break;
|
||||
+ case MACH_ARUBA_AP65:
|
||||
@ -278,11 +278,11 @@ diff -Nur linux-2.6.17/arch/mips/aruba/irq.c linux-2.6.17-openwrt/arch/mips/arub
|
||||
+ pend = READ_PEND_MERLOT(addr);
|
||||
+ pend &= READ_MASK_MERLOT(addr); // only unmasked interrupts
|
||||
+ pend = 31 - rc32434_clz(pend);
|
||||
+ do_IRQ(pend + GROUP0_IRQ_BASE, regs);
|
||||
+ do_IRQ(pend + GROUP0_IRQ_BASE);
|
||||
+ }
|
||||
+ if ((ip = (cp0_cause & 0x3c00))) { // irq 2-5
|
||||
+ pend = 31 - rc32434_clz(ip);
|
||||
+ do_IRQ(pend - GROUP0_IRQ_BASE, regs);
|
||||
+ do_IRQ(pend - GROUP0_IRQ_BASE);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
|
@ -40,7 +40,7 @@ diff -Nur linux-2.6.15/arch/mips/pci/fixup-aruba.c linux-2.6.15-openwrt/arch/mip
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/kernel.h>
|
||||
@ -120,10 +120,10 @@ diff -Nur linux-2.6.15/arch/mips/pci/fixup-aruba.c linux-2.6.15-openwrt/arch/mip
|
||||
diff -Nur linux-2.6.15/arch/mips/pci/Makefile linux-2.6.15-openwrt/arch/mips/pci/Makefile
|
||||
--- linux-2.6.15/arch/mips/pci/Makefile 2006-01-03 04:21:10.000000000 +0100
|
||||
+++ linux-2.6.15-openwrt/arch/mips/pci/Makefile 2006-01-10 00:32:32.000000000 +0100
|
||||
@@ -56,3 +56,4 @@
|
||||
obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o
|
||||
@@ -53,3 +53,4 @@
|
||||
obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o
|
||||
obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o
|
||||
obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
|
||||
+obj-$(CONFIG_MACH_ARUBA) += fixup-aruba.o ops-aruba.o pci-aruba.o
|
||||
diff -Nur linux-2.6.15/arch/mips/pci/ops-aruba.c linux-2.6.15-openwrt/arch/mips/pci/ops-aruba.c
|
||||
--- linux-2.6.15/arch/mips/pci/ops-aruba.c 1970-01-01 01:00:00.000000000 +0100
|
||||
@ -167,7 +167,7 @@ diff -Nur linux-2.6.15/arch/mips/pci/ops-aruba.c linux-2.6.15-openwrt/arch/mips/
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/types.h>
|
||||
@ -375,7 +375,7 @@ diff -Nur linux-2.6.15/arch/mips/pci/pci-aruba.c linux-2.6.15-openwrt/arch/mips/
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/kernel.h>
|
||||
|
@ -2,7 +2,7 @@ diff -Nur linux-2.6.15.1/drivers/char/watchdog/wdt_merlot.c linux-2.6.15.1-openw
|
||||
--- linux-2.6.15.1/drivers/char/watchdog/wdt_merlot.c 2006-01-26 21:14:02.204626250 -0800
|
||||
+++ linux-2.6.15.1-openwrt/drivers/char/watchdog/wdt_merlot.c 2006-02-02 20:31:43.000000000 -0800
|
||||
@@ -0,0 +1,110 @@
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/miscdevice.h>
|
||||
|
@ -21,7 +21,7 @@ diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.c linux-2.6.17-owrt/drivers/net
|
||||
+ * modified for the AR2313.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/types.h>
|
||||
@ -1188,7 +1188,7 @@ diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.c linux-2.6.17-owrt/drivers/net
|
||||
+ tasklet_hi_schedule(&sp->rx_tasklet);
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t ar2313_interrupt(int irq, void *dev_id, struct pt_regs *ptregs)
|
||||
+static irqreturn_t ar2313_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct ar2313_private *sp = dev->priv;
|
||||
@ -1658,7 +1658,7 @@ diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.h linux-2.6.17-owrt/drivers/net
|
||||
+#ifndef _AR2313_H_
|
||||
+#define _AR2313_H_
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <asm/bootinfo.h>
|
||||
+#include "platform.h"
|
||||
+
|
||||
@ -1834,7 +1834,7 @@ diff -Nur linux-2.6.17/drivers/net/ar2313/ar2313.h linux-2.6.17-owrt/drivers/net
|
||||
+static void ar2313_dump_regs(struct net_device *dev);
|
||||
+#endif
|
||||
+static void ar2313_load_rx_ring(struct net_device *dev, int bufs);
|
||||
+static irqreturn_t ar2313_interrupt(int irq, void *dev_id, struct pt_regs *regs);
|
||||
+static irqreturn_t ar2313_interrupt(int irq, void *dev_id);
|
||||
+static int ar2313_open(struct net_device *dev);
|
||||
+static int ar2313_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
+static int ar2313_close(struct net_device *dev);
|
||||
|
@ -6,9 +6,9 @@ diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci.h linux-patched/drivers/usb/host
|
||||
|
||||
struct timer_list watchdog;
|
||||
+ struct timer_list softirq;
|
||||
struct notifier_block reboot_notifier;
|
||||
unsigned long actions;
|
||||
unsigned stamp;
|
||||
unsigned long next_statechange;
|
||||
diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci-hcd.c linux-patched/drivers/usb/host/ehci-hcd.c
|
||||
--- linux-2.6.16.1/drivers/usb/host/ehci-hcd.c 2006-03-27 22:49:02.000000000 -0800
|
||||
+++ linux-patched/drivers/usb/host/ehci-hcd.c 2006-04-07 13:20:13.000000000 -0700
|
||||
@ -24,13 +24,13 @@ diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci-hcd.c linux-patched/drivers/usb/
|
||||
#include "ehci-sched.c"
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
+static irqreturn_t ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs);
|
||||
+static irqreturn_t ehci_irq (struct usb_hcd *hcd);
|
||||
+
|
||||
+static void ehci_softirq (unsigned long param)
|
||||
+{
|
||||
+ struct ehci_hcd *ehci = (struct ehci_hcd *) param;
|
||||
+
|
||||
+ if (ehci_irq(ehci_to_hcd(ehci),0) != IRQ_NONE)
|
||||
+ if (ehci_irq(ehci_to_hcd(ehci)) != IRQ_NONE)
|
||||
+ set_bit(HCD_FLAG_SAW_IRQ, &(ehci_to_hcd(ehci))->flags);
|
||||
+ mod_timer (&ehci->softirq, jiffies + EHCI_SOFTIRQ);
|
||||
+}
|
||||
|
@ -16,9 +16,9 @@ define Target/Description
|
||||
(e.g. 4G-Systems Mesh/Access Cube ...)
|
||||
endef
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
config interface loopback
|
||||
option ifname lo
|
||||
option proto static
|
||||
option ipaddr 127.0.0.1
|
||||
option netmask 255.0.0.0
|
||||
|
||||
config interface lan
|
||||
option type bridge
|
||||
option ifname "eth0 ath0"
|
||||
option proto static
|
||||
option ipaddr 192.168.1.1
|
||||
option netmask 255.255.255.0
|
@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
|
||||
mount none /proc -t proc
|
||||
size=$(awk '/Mem:/ {l=5242880;print((s=$2/2)<l)?$2-l:s}' /proc/meminfo)
|
||||
mount none /tmp -t tmpfs -o size=$size
|
||||
|
||||
if [ "$1" != "failsafe" ]; then
|
||||
mtd unlock filesystem
|
||||
mount | grep jffs2 >&-
|
||||
if [ $? = 0 ] ; then
|
||||
if [ $(cat /proc/mtd | wc -l) = 6 ]; then
|
||||
mtd erase filesystem
|
||||
jffs2root --move
|
||||
else
|
||||
mount -o remount,rw /dev/root /
|
||||
fi
|
||||
else
|
||||
. /bin/firstboot
|
||||
fi
|
||||
fi
|
||||
|
||||
mount none /tmp -t tmpfs -o remount,nosuid,nodev,mode=1777
|
||||
mkdir -p /dev/pts
|
||||
mount none /dev/pts -t devpts
|
||||
mount -t sysfs none /sys 2>&-
|
File diff suppressed because it is too large
Load Diff
221
target/linux/au1000-2.6/config-diff
Normal file
221
target/linux/au1000-2.6/config-diff
Normal file
@ -0,0 +1,221 @@
|
||||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_64BIT_PHYS_ADDR=y
|
||||
# CONFIG_8139TOO is not set
|
||||
# CONFIG_ATM is not set
|
||||
# CONFIG_B44 is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
|
||||
CONFIG_CHR_DEV_SG=m
|
||||
CONFIG_CMDLINE="root=/dev/mtdblock0 rootfstype=jffs2"
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
CONFIG_CRAMFS=m
|
||||
CONFIG_CRC16=y
|
||||
# CONFIG_DDB5477 is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DUMMY=m
|
||||
CONFIG_ELF_CORE=y
|
||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
# CONFIG_FIXED_PHY is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=250
|
||||
# CONFIG_HZ_100 is not set
|
||||
# CONFIG_HZ_1024 is not set
|
||||
# CONFIG_HZ_128 is not set
|
||||
CONFIG_HZ_250=y
|
||||
# CONFIG_HZ_256 is not set
|
||||
# CONFIG_HZ_48 is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_IDE is not set
|
||||
CONFIG_IFB=m
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
# CONFIG_LAN_SAA9730 is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MINI_FO=y
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
CONFIG_MIPS_AU1X00_ENET=y
|
||||
# CONFIG_MIPS_BOSPORUS is not set
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MIPS_DB1000 is not set
|
||||
# CONFIG_MIPS_DB1100 is not set
|
||||
# CONFIG_MIPS_DB1200 is not set
|
||||
# CONFIG_MIPS_DB1500 is not set
|
||||
# CONFIG_MIPS_DB1550 is not set
|
||||
# CONFIG_MIPS_EV64120 is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_MIRAGE is not set
|
||||
CONFIG_MIPS_MTX1=y
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_PB1000 is not set
|
||||
# CONFIG_MIPS_PB1100 is not set
|
||||
# CONFIG_MIPS_PB1200 is not set
|
||||
# CONFIG_MIPS_PB1500 is not set
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MIPS_VPE_LOADER is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
CONFIG_MODULE_FORCE_UNLOAD=y
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
# CONFIG_MOMENCO_OCELOT is not set
|
||||
# CONFIG_MOMENCO_OCELOT_3 is not set
|
||||
# CONFIG_MOMENCO_OCELOT_C is not set
|
||||
# CONFIG_MOMENCO_OCELOT_G is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
# CONFIG_MTD_ALCHEMY is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
CONFIG_MTD_CFI=y
|
||||
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_CFI_UTIL=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
CONFIG_MTD_CONCAT=y
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
CONFIG_MTD_GEN_PROBE=y
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
CONFIG_MTD_MTX1=y
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_PHYSMAP is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
CONFIG_MTX1_WATCHDOG=y
|
||||
# CONFIG_NATSEMI is not set
|
||||
# CONFIG_NE2K_PCI is not set
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_NEW_LEDS is not set
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
# CONFIG_PAGE_SIZE_8KB is not set
|
||||
# CONFIG_PCCARD is not set
|
||||
# CONFIG_PCIPCWATCHDOG is not set
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PM is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_V2PCI is not set
|
||||
# CONFIG_PPP_MPPE is not set
|
||||
# CONFIG_PREVENT_FIRMWARE_BUILD is not set
|
||||
# CONFIG_QEMU is not set
|
||||
# CONFIG_QSEMI_PHY is not set
|
||||
# CONFIG_R8169 is not set
|
||||
# CONFIG_RTC is not set
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_SERIAL_8250_AU1X00=y
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
CONFIG_SERIAL_8250_NR_UARTS=4
|
||||
CONFIG_SERIAL_8250_PCI=m
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
|
||||
# CONFIG_SGI_IP22 is not set
|
||||
# CONFIG_SGI_IP27 is not set
|
||||
# CONFIG_SGI_IP32 is not set
|
||||
# CONFIG_SIBYTE_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_PTSWARM is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
# CONFIG_SIS190 is not set
|
||||
# CONFIG_SIS900 is not set
|
||||
# CONFIG_SMC91X is not set
|
||||
# CONFIG_SMSC_PHY is not set
|
||||
# CONFIG_SND_AU1X00 is not set
|
||||
# CONFIG_SNI_RM200_PCI is not set
|
||||
CONFIG_SOC_AU1500=y
|
||||
CONFIG_SOC_AU1X00=y
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_STANDALONE is not set
|
||||
CONFIG_STRIP=m
|
||||
CONFIG_SYN_COOKIES=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
# CONFIG_TMD_HERMES is not set
|
||||
# CONFIG_TOSHIBA_JMR3927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4938 is not set
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
# CONFIG_VIA_RHINE is not set
|
@ -61,7 +61,7 @@ diff -urN linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c linux-2.6.16.7.n
|
||||
+ * it is opened for the first time. After the first open
|
||||
+ * it MUST be triggered every 2..95 seconds.
|
||||
+ */
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/types.h>
|
||||
|
@ -47,7 +47,7 @@ diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c linux-2.6.16.7.ne
|
||||
+ * that can be read. It returns one char '1' if the button
|
||||
+ * has been pressed an '0' if it has been released.
|
||||
+ */
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/version.h>
|
||||
+#include <linux/types.h>
|
||||
@ -108,7 +108,7 @@ diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c linux-2.6.16.7.ne
|
||||
+//---------[ Interrupt handling ]-----------------
|
||||
+
|
||||
+
|
||||
+static void mtx1_btn_interrupt (int irq, void *private, struct pt_regs *regs)
|
||||
+static void mtx1_btn_interrupt (int irq, void *private)
|
||||
+{
|
||||
+ char value = mtx1_getbtn(0);
|
||||
+ if (last_value != value)
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -ur linux.old/arch/mips/pci/ops-au1000.c linux.dev/arch/mips/pci/ops-au1000.c
|
||||
--- linux.old/arch/mips/pci/ops-au1000.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/arch/mips/pci/ops-au1000.c 2006-12-09 20:51:29.000000000 +0100
|
||||
@@ -111,7 +111,7 @@
|
||||
if (first_cfg) {
|
||||
/* reserve a wired entry for pci config accesses */
|
||||
first_cfg = 0;
|
||||
- pci_cfg_vm = get_vm_area(0x2000, 0);
|
||||
+ pci_cfg_vm = get_vm_area(0x2000, VM_IOREMAP);
|
||||
if (!pci_cfg_vm)
|
||||
panic (KERN_ERR "PCI unable to get vm area\n");
|
||||
pci_cfg_wired_entry = read_c0_wired();
|
@ -20,9 +20,9 @@ define Target/Description
|
||||
with TFTP client too.
|
||||
endef
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
DEFAULT_PACKAGES += kmod-switch
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Automatically generated make config: don't edit
|
||||
# Linux kernel version: 2.6.17
|
||||
# Thu Nov 16 16:04:49 2006
|
||||
# Linux kernel version: 2.6.19
|
||||
# Wed Dec 13 05:41:57 2006
|
||||
#
|
||||
CONFIG_MIPS=y
|
||||
|
||||
@ -21,18 +21,17 @@ CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_DB1550 is not set
|
||||
# CONFIG_MIPS_DB1200 is not set
|
||||
# CONFIG_MIPS_MIRAGE is not set
|
||||
# CONFIG_BASLER_EXCITE is not set
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MIPS_EV64120 is not set
|
||||
# CONFIG_MIPS_EV96100 is not set
|
||||
# CONFIG_MIPS_IVR is not set
|
||||
# CONFIG_MIPS_ITE8172 is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
CONFIG_BCM947XX=y
|
||||
# CONFIG_LASAT is not set
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_WR_PPMC is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
# CONFIG_MOMENCO_OCELOT is not set
|
||||
@ -42,12 +41,11 @@ CONFIG_BCM947XX=y
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
# CONFIG_PNX8550_V2PCI is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_DDB5074 is not set
|
||||
# CONFIG_DDB5476 is not set
|
||||
# CONFIG_DDB5477 is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_QEMU is not set
|
||||
# CONFIG_MARKEINS is not set
|
||||
# CONFIG_SGI_IP22 is not set
|
||||
# CONFIG_SGI_IP27 is not set
|
||||
# CONFIG_SGI_IP32 is not set
|
||||
@ -68,6 +66,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_HWEIGHT=y
|
||||
CONFIG_GENERIC_CALIBRATE_DELAY=y
|
||||
CONFIG_GENERIC_TIME=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
@ -115,7 +114,10 @@ CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
# CONFIG_MIPS_MT is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_VPE_LOADER is not set
|
||||
# CONFIG_64BIT_PHYS_ADDR is not set
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
@ -131,9 +133,22 @@ CONFIG_FLATMEM=y
|
||||
CONFIG_FLAT_NODE_MEM_MAP=y
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SPLIT_PTLOCK_CPUS=4
|
||||
# CONFIG_RESOURCES_64BIT is not set
|
||||
# CONFIG_HZ_48 is not set
|
||||
# CONFIG_HZ_100 is not set
|
||||
# CONFIG_HZ_128 is not set
|
||||
CONFIG_HZ_250=y
|
||||
# CONFIG_HZ_256 is not set
|
||||
# CONFIG_HZ_1000 is not set
|
||||
# CONFIG_HZ_1024 is not set
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_HZ=250
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
# CONFIG_PREEMPT_VOLUNTARY is not set
|
||||
# CONFIG_PREEMPT is not set
|
||||
CONFIG_LOCKDEP_SUPPORT=y
|
||||
CONFIG_STACKTRACE_SUPPORT=y
|
||||
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
|
||||
|
||||
#
|
||||
# Code maturity level options
|
||||
@ -149,15 +164,19 @@ CONFIG_LOCALVERSION=""
|
||||
CONFIG_LOCALVERSION_AUTO=y
|
||||
CONFIG_SWAP=y
|
||||
CONFIG_SYSVIPC=y
|
||||
# CONFIG_IPC_NS is not set
|
||||
# CONFIG_POSIX_MQUEUE is not set
|
||||
# CONFIG_BSD_PROCESS_ACCT is not set
|
||||
CONFIG_SYSCTL=y
|
||||
# CONFIG_TASKSTATS is not set
|
||||
# CONFIG_UTS_NS is not set
|
||||
# CONFIG_AUDIT is not set
|
||||
# CONFIG_IKCONFIG is not set
|
||||
# CONFIG_RELAY is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_SYSCTL=y
|
||||
CONFIG_EMBEDDED=y
|
||||
CONFIG_SYSCTL_SYSCALL=y
|
||||
# CONFIG_KALLSYMS is not set
|
||||
CONFIG_HOTPLUG=y
|
||||
CONFIG_PRINTK=y
|
||||
@ -168,10 +187,11 @@ CONFIG_FUTEX=y
|
||||
CONFIG_EPOLL=y
|
||||
CONFIG_SHMEM=y
|
||||
CONFIG_SLAB=y
|
||||
# CONFIG_VM_EVENT_COUNTERS is not set
|
||||
CONFIG_RT_MUTEXES=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_SLOB is not set
|
||||
CONFIG_OBSOLETE_INTERMODULE=y
|
||||
|
||||
#
|
||||
# Loadable module support
|
||||
@ -186,6 +206,7 @@ CONFIG_MODULE_UNLOAD=y
|
||||
#
|
||||
# Block layer
|
||||
#
|
||||
CONFIG_BLOCK=y
|
||||
# CONFIG_LBD is not set
|
||||
# CONFIG_BLK_DEV_IO_TRACE is not set
|
||||
# CONFIG_LSF is not set
|
||||
@ -258,6 +279,7 @@ CONFIG_PACKET_MMAP=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_XFRM=y
|
||||
CONFIG_XFRM_USER=m
|
||||
# CONFIG_XFRM_SUB_POLICY is not set
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
@ -283,13 +305,12 @@ CONFIG_INET_ESP=m
|
||||
CONFIG_INET_IPCOMP=m
|
||||
CONFIG_INET_XFRM_TUNNEL=m
|
||||
CONFIG_INET_TUNNEL=m
|
||||
CONFIG_INET_XFRM_MODE_TRANSPORT=y
|
||||
CONFIG_INET_XFRM_MODE_TUNNEL=y
|
||||
CONFIG_INET_XFRM_MODE_BEET=y
|
||||
CONFIG_INET_DIAG=m
|
||||
CONFIG_INET_TCP_DIAG=m
|
||||
CONFIG_TCP_CONG_ADVANCED=y
|
||||
|
||||
#
|
||||
# TCP congestion control
|
||||
#
|
||||
CONFIG_TCP_CONG_BIC=m
|
||||
CONFIG_TCP_CONG_CUBIC=m
|
||||
CONFIG_TCP_CONG_WESTWOOD=m
|
||||
@ -298,6 +319,15 @@ CONFIG_TCP_CONG_HSTCP=m
|
||||
CONFIG_TCP_CONG_HYBLA=m
|
||||
CONFIG_TCP_CONG_VEGAS=y
|
||||
CONFIG_TCP_CONG_SCALABLE=m
|
||||
CONFIG_TCP_CONG_LP=m
|
||||
CONFIG_TCP_CONG_VENO=m
|
||||
# CONFIG_DEFAULT_BIC is not set
|
||||
# CONFIG_DEFAULT_CUBIC is not set
|
||||
# CONFIG_DEFAULT_HTCP is not set
|
||||
CONFIG_DEFAULT_VEGAS=y
|
||||
# CONFIG_DEFAULT_WESTWOOD is not set
|
||||
# CONFIG_DEFAULT_RENO is not set
|
||||
CONFIG_DEFAULT_TCP_CONG="vegas"
|
||||
|
||||
#
|
||||
# IP: Virtual Server Configuration
|
||||
@ -310,9 +340,17 @@ CONFIG_IPV6_ROUTER_PREF=y
|
||||
CONFIG_INET6_AH=m
|
||||
CONFIG_INET6_ESP=m
|
||||
CONFIG_INET6_IPCOMP=m
|
||||
# CONFIG_IPV6_MIP6 is not set
|
||||
CONFIG_INET6_XFRM_TUNNEL=m
|
||||
CONFIG_INET6_TUNNEL=m
|
||||
CONFIG_INET6_XFRM_MODE_TRANSPORT=m
|
||||
CONFIG_INET6_XFRM_MODE_TUNNEL=m
|
||||
CONFIG_INET6_XFRM_MODE_BEET=m
|
||||
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
|
||||
CONFIG_IPV6_SIT=m
|
||||
# CONFIG_IPV6_TUNNEL is not set
|
||||
# CONFIG_IPV6_MULTIPLE_TABLES is not set
|
||||
# CONFIG_NETWORK_SECMARK is not set
|
||||
CONFIG_NETFILTER=y
|
||||
# CONFIG_NETFILTER_DEBUG is not set
|
||||
# CONFIG_BRIDGE_NETFILTER is not set
|
||||
@ -324,6 +362,7 @@ CONFIG_NETFILTER=y
|
||||
CONFIG_NETFILTER_XTABLES=y
|
||||
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
|
||||
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
|
||||
CONFIG_NETFILTER_XT_TARGET_DSCP=m
|
||||
CONFIG_NETFILTER_XT_TARGET_MARK=m
|
||||
# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
|
||||
# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
|
||||
@ -332,6 +371,7 @@ CONFIG_NETFILTER_XT_TARGET_MARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
|
||||
# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
|
||||
CONFIG_NETFILTER_XT_MATCH_DSCP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_ESP=m
|
||||
CONFIG_NETFILTER_XT_MATCH_HELPER=m
|
||||
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
|
||||
@ -341,9 +381,11 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m
|
||||
CONFIG_NETFILTER_XT_MATCH_POLICY=m
|
||||
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
|
||||
# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_REALM is not set
|
||||
# CONFIG_NETFILTER_XT_MATCH_SCTP is not set
|
||||
CONFIG_NETFILTER_XT_MATCH_STATE=y
|
||||
# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set
|
||||
CONFIG_NETFILTER_XT_MATCH_STRING=m
|
||||
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
|
||||
|
||||
@ -371,7 +413,6 @@ CONFIG_IP_NF_MATCH_TOS=m
|
||||
CONFIG_IP_NF_MATCH_TIME=m
|
||||
CONFIG_IP_NF_MATCH_RECENT=m
|
||||
CONFIG_IP_NF_MATCH_ECN=m
|
||||
CONFIG_IP_NF_MATCH_DSCP=m
|
||||
CONFIG_IP_NF_MATCH_AH=m
|
||||
CONFIG_IP_NF_MATCH_TTL=m
|
||||
CONFIG_IP_NF_MATCH_OWNER=m
|
||||
@ -403,7 +444,6 @@ CONFIG_IP_NF_NAT_SIP=m
|
||||
CONFIG_IP_NF_MANGLE=y
|
||||
CONFIG_IP_NF_TARGET_TOS=m
|
||||
CONFIG_IP_NF_TARGET_ECN=m
|
||||
CONFIG_IP_NF_TARGET_DSCP=m
|
||||
CONFIG_IP_NF_TARGET_TTL=m
|
||||
# CONFIG_IP_NF_TARGET_CLUSTERIP is not set
|
||||
CONFIG_IP_NF_RAW=m
|
||||
@ -496,7 +536,6 @@ CONFIG_LLC=y
|
||||
# CONFIG_ATALK is not set
|
||||
# CONFIG_X25 is not set
|
||||
# CONFIG_LAPB is not set
|
||||
# CONFIG_NET_DIVERT is not set
|
||||
# CONFIG_ECONET is not set
|
||||
# CONFIG_WAN_ROUTER is not set
|
||||
|
||||
@ -604,6 +643,7 @@ CONFIG_IEEE80211_CRYPT_TKIP=m
|
||||
CONFIG_IEEE80211_SOFTMAC=m
|
||||
# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
|
||||
CONFIG_WIRELESS_EXT=y
|
||||
CONFIG_FIB_RULES=y
|
||||
|
||||
#
|
||||
# Device Drivers
|
||||
@ -615,6 +655,7 @@ CONFIG_WIRELESS_EXT=y
|
||||
CONFIG_STANDALONE=y
|
||||
CONFIG_PREVENT_FIRMWARE_BUILD=y
|
||||
CONFIG_FW_LOADER=y
|
||||
# CONFIG_SYS_HYPERVISOR is not set
|
||||
|
||||
#
|
||||
# Connector - unified userspace <-> kernelspace linker
|
||||
@ -640,6 +681,7 @@ CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_NFTL is not set
|
||||
# CONFIG_INFTL is not set
|
||||
# CONFIG_RFD_FTL is not set
|
||||
# CONFIG_SSFDC is not set
|
||||
|
||||
#
|
||||
# RAM/ROM/Flash chip drivers
|
||||
@ -729,6 +771,12 @@ CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_CDROM_PKTCDVD is not set
|
||||
# CONFIG_ATA_OVER_ETH is not set
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
#
|
||||
# CONFIG_SGI_IOC4 is not set
|
||||
# CONFIG_TIFM_CORE is not set
|
||||
|
||||
#
|
||||
# ATA/ATAPI/MFM/RLL support
|
||||
#
|
||||
@ -739,6 +787,7 @@ CONFIG_BLK_DEV_INITRD=y
|
||||
#
|
||||
# CONFIG_RAID_ATTRS is not set
|
||||
CONFIG_SCSI=m
|
||||
# CONFIG_SCSI_NETLINK is not set
|
||||
CONFIG_SCSI_PROC_FS=y
|
||||
|
||||
#
|
||||
@ -759,12 +808,13 @@ CONFIG_BLK_DEV_SD=m
|
||||
# CONFIG_SCSI_LOGGING is not set
|
||||
|
||||
#
|
||||
# SCSI Transport Attributes
|
||||
# SCSI Transports
|
||||
#
|
||||
# CONFIG_SCSI_SPI_ATTRS is not set
|
||||
# CONFIG_SCSI_FC_ATTRS is not set
|
||||
# CONFIG_SCSI_ISCSI_ATTRS is not set
|
||||
# CONFIG_SCSI_SAS_ATTRS is not set
|
||||
# CONFIG_SCSI_SAS_LIBSAS is not set
|
||||
|
||||
#
|
||||
# SCSI low-level drivers
|
||||
@ -777,20 +827,23 @@ CONFIG_BLK_DEV_SD=m
|
||||
# CONFIG_SCSI_AIC7XXX is not set
|
||||
# CONFIG_SCSI_AIC7XXX_OLD is not set
|
||||
# CONFIG_SCSI_AIC79XX is not set
|
||||
# CONFIG_SCSI_AIC94XX is not set
|
||||
# CONFIG_SCSI_DPT_I2O is not set
|
||||
# CONFIG_SCSI_ARCMSR is not set
|
||||
# CONFIG_MEGARAID_NEWGEN is not set
|
||||
# CONFIG_MEGARAID_LEGACY is not set
|
||||
# CONFIG_MEGARAID_SAS is not set
|
||||
# CONFIG_SCSI_SATA is not set
|
||||
# CONFIG_SCSI_HPTIOP is not set
|
||||
# CONFIG_SCSI_DMX3191D is not set
|
||||
# CONFIG_SCSI_FUTURE_DOMAIN is not set
|
||||
# CONFIG_SCSI_IPS is not set
|
||||
# CONFIG_SCSI_INITIO is not set
|
||||
# CONFIG_SCSI_INIA100 is not set
|
||||
# CONFIG_SCSI_STEX is not set
|
||||
# CONFIG_SCSI_SYM53C8XX_2 is not set
|
||||
# CONFIG_SCSI_IPR is not set
|
||||
# CONFIG_SCSI_QLOGIC_1280 is not set
|
||||
# CONFIG_SCSI_QLA_FC is not set
|
||||
# CONFIG_SCSI_QLA_ISCSI is not set
|
||||
# CONFIG_SCSI_LPFC is not set
|
||||
# CONFIG_SCSI_DC395x is not set
|
||||
# CONFIG_SCSI_DC390T is not set
|
||||
@ -806,6 +859,11 @@ CONFIG_BLK_DEV_SD=m
|
||||
# CONFIG_PCMCIA_QLOGIC is not set
|
||||
# CONFIG_PCMCIA_SYM53C500 is not set
|
||||
|
||||
#
|
||||
# Serial ATA (prod) and Parallel ATA (experimental) drivers
|
||||
#
|
||||
# CONFIG_ATA is not set
|
||||
|
||||
#
|
||||
# Multi-device support (RAID and LVM)
|
||||
#
|
||||
@ -908,6 +966,7 @@ CONFIG_B44=y
|
||||
# CONFIG_VIA_VELOCITY is not set
|
||||
# CONFIG_TIGON3 is not set
|
||||
# CONFIG_BNX2 is not set
|
||||
# CONFIG_QLA3XXX is not set
|
||||
|
||||
#
|
||||
# Ethernet (10000 Mbit)
|
||||
@ -915,6 +974,7 @@ CONFIG_B44=y
|
||||
# CONFIG_CHELSIO_T1 is not set
|
||||
# CONFIG_IXGB is not set
|
||||
# CONFIG_S2IO is not set
|
||||
# CONFIG_MYRI10GE is not set
|
||||
|
||||
#
|
||||
# Token Ring devices
|
||||
@ -947,7 +1007,9 @@ CONFIG_IPW2100_MONITOR=y
|
||||
# CONFIG_IPW2100_DEBUG is not set
|
||||
CONFIG_IPW2200=m
|
||||
CONFIG_IPW2200_MONITOR=y
|
||||
CONFIG_IPW_QOS=y
|
||||
# CONFIG_IPW2200_RADIOTAP is not set
|
||||
# CONFIG_IPW2200_PROMISCUOUS is not set
|
||||
CONFIG_IPW2200_QOS=y
|
||||
# CONFIG_IPW2200_DEBUG is not set
|
||||
CONFIG_HERMES=m
|
||||
CONFIG_PLX_HERMES=m
|
||||
@ -968,6 +1030,7 @@ CONFIG_AIRO_CS=m
|
||||
# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
|
||||
#
|
||||
CONFIG_PRISM54=m
|
||||
CONFIG_USB_ZD1201=m
|
||||
CONFIG_HOSTAP=m
|
||||
CONFIG_HOSTAP_FIRMWARE=y
|
||||
CONFIG_HOSTAP_FIRMWARE_NVRAM=y
|
||||
@ -981,6 +1044,8 @@ CONFIG_BCM43XX_PIO=y
|
||||
CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
|
||||
# CONFIG_BCM43XX_DMA_MODE is not set
|
||||
# CONFIG_BCM43XX_PIO_MODE is not set
|
||||
CONFIG_ZD1211RW=m
|
||||
# CONFIG_ZD1211RW_DEBUG is not set
|
||||
CONFIG_NET_WIRELESS=y
|
||||
|
||||
#
|
||||
@ -1022,6 +1087,7 @@ CONFIG_PPP_MPPE=m
|
||||
CONFIG_PPPOE=m
|
||||
CONFIG_PPPOATM=m
|
||||
# CONFIG_SLIP is not set
|
||||
CONFIG_SLHC=m
|
||||
# CONFIG_NET_FC is not set
|
||||
# CONFIG_SHAPER is not set
|
||||
# CONFIG_NETCONSOLE is not set
|
||||
@ -1042,6 +1108,7 @@ CONFIG_PPPOATM=m
|
||||
# Input device support
|
||||
#
|
||||
CONFIG_INPUT=m
|
||||
# CONFIG_INPUT_FF_MEMLESS is not set
|
||||
|
||||
#
|
||||
# Userland interfaces
|
||||
@ -1106,6 +1173,7 @@ CONFIG_UNIX98_PTYS=y
|
||||
# Watchdog Cards
|
||||
#
|
||||
# CONFIG_WATCHDOG is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_DTLK is not set
|
||||
@ -1129,7 +1197,6 @@ CONFIG_UNIX98_PTYS=y
|
||||
# TPM devices
|
||||
#
|
||||
# CONFIG_TCG_TPM is not set
|
||||
# CONFIG_TELCLOCK is not set
|
||||
|
||||
#
|
||||
# I2C support
|
||||
@ -1153,10 +1220,6 @@ CONFIG_UNIX98_PTYS=y
|
||||
# CONFIG_HWMON is not set
|
||||
# CONFIG_HWMON_VID is not set
|
||||
|
||||
#
|
||||
# Misc devices
|
||||
#
|
||||
|
||||
#
|
||||
# Multimedia devices
|
||||
#
|
||||
@ -1173,13 +1236,38 @@ CONFIG_VIDEO_V4L2=y
|
||||
# Video Capture Adapters
|
||||
#
|
||||
# CONFIG_VIDEO_ADV_DEBUG is not set
|
||||
# CONFIG_VIDEO_VIVI is not set
|
||||
# CONFIG_VIDEO_CPIA2 is not set
|
||||
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
|
||||
|
||||
#
|
||||
# Encoders and Decoders
|
||||
# Encoders/decoders and other helper chips
|
||||
#
|
||||
|
||||
#
|
||||
# Audio decoders
|
||||
#
|
||||
|
||||
#
|
||||
# Video decoders
|
||||
#
|
||||
|
||||
#
|
||||
# Video and audio decoders
|
||||
#
|
||||
|
||||
#
|
||||
# MPEG video encoders
|
||||
#
|
||||
# CONFIG_VIDEO_CX2341X is not set
|
||||
|
||||
#
|
||||
# Video encoders
|
||||
#
|
||||
|
||||
#
|
||||
# Video improvement chips
|
||||
#
|
||||
# CONFIG_VIDEO_VIVI is not set
|
||||
|
||||
#
|
||||
# V4L USB devices
|
||||
#
|
||||
@ -1187,6 +1275,10 @@ CONFIG_VIDEO_V4L2=y
|
||||
#
|
||||
# Radio Adapters
|
||||
#
|
||||
# CONFIG_RADIO_GEMTEK_PCI is not set
|
||||
# CONFIG_RADIO_MAXIRADIO is not set
|
||||
# CONFIG_RADIO_MAESTRO is not set
|
||||
# CONFIG_USB_DSBR is not set
|
||||
|
||||
#
|
||||
# Digital Video Broadcasting Devices
|
||||
@ -1197,7 +1289,9 @@ CONFIG_VIDEO_V4L2=y
|
||||
#
|
||||
# Graphics support
|
||||
#
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
# CONFIG_FB is not set
|
||||
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
|
||||
|
||||
#
|
||||
# Sound
|
||||
@ -1246,6 +1340,18 @@ CONFIG_SND_VERBOSE_PROCFS=y
|
||||
# CONFIG_SND_CMIPCI is not set
|
||||
# CONFIG_SND_CS4281 is not set
|
||||
# CONFIG_SND_CS46XX is not set
|
||||
# CONFIG_SND_DARLA20 is not set
|
||||
# CONFIG_SND_GINA20 is not set
|
||||
# CONFIG_SND_LAYLA20 is not set
|
||||
# CONFIG_SND_DARLA24 is not set
|
||||
# CONFIG_SND_GINA24 is not set
|
||||
# CONFIG_SND_LAYLA24 is not set
|
||||
# CONFIG_SND_MONA is not set
|
||||
# CONFIG_SND_MIA is not set
|
||||
# CONFIG_SND_ECHO3G is not set
|
||||
# CONFIG_SND_INDIGO is not set
|
||||
# CONFIG_SND_INDIGOIO is not set
|
||||
# CONFIG_SND_INDIGODJ is not set
|
||||
# CONFIG_SND_EMU10K1 is not set
|
||||
# CONFIG_SND_EMU10K1X is not set
|
||||
# CONFIG_SND_ENS1370 is not set
|
||||
@ -1319,6 +1425,7 @@ CONFIG_USB_DEVICEFS=y
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
CONFIG_USB_EHCI_SPLIT_ISO=y
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
# CONFIG_USB_ISP116X_HCD is not set
|
||||
CONFIG_USB_OHCI_HCD=m
|
||||
# CONFIG_USB_OHCI_BIG_ENDIAN is not set
|
||||
@ -1350,6 +1457,7 @@ CONFIG_USB_STORAGE=m
|
||||
# CONFIG_USB_STORAGE_JUMPSHOT is not set
|
||||
# CONFIG_USB_STORAGE_ALAUDA is not set
|
||||
# CONFIG_USB_STORAGE_ONETOUCH is not set
|
||||
# CONFIG_USB_STORAGE_KARMA is not set
|
||||
# CONFIG_USB_LIBUSUAL is not set
|
||||
|
||||
#
|
||||
@ -1388,8 +1496,8 @@ CONFIG_USB_STORAGE=m
|
||||
# CONFIG_USB_KAWETH is not set
|
||||
# CONFIG_USB_PEGASUS is not set
|
||||
# CONFIG_USB_RTL8150 is not set
|
||||
# CONFIG_USB_USBNET_MII is not set
|
||||
# CONFIG_USB_USBNET is not set
|
||||
# CONFIG_USB_ZD1201 is not set
|
||||
# CONFIG_USB_MON is not set
|
||||
|
||||
#
|
||||
@ -1401,8 +1509,8 @@ CONFIG_USB_STORAGE=m
|
||||
#
|
||||
CONFIG_USB_SERIAL=m
|
||||
# CONFIG_USB_SERIAL_GENERIC is not set
|
||||
# CONFIG_USB_SERIAL_AIRCABLE is not set
|
||||
# CONFIG_USB_SERIAL_AIRPRIME is not set
|
||||
# CONFIG_USB_SERIAL_ANYDATA is not set
|
||||
# CONFIG_USB_SERIAL_ARK3116 is not set
|
||||
CONFIG_USB_SERIAL_BELKIN=m
|
||||
# CONFIG_USB_SERIAL_WHITEHEAT is not set
|
||||
@ -1424,10 +1532,13 @@ CONFIG_USB_SERIAL_VISOR=m
|
||||
# CONFIG_USB_SERIAL_KLSI is not set
|
||||
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
|
||||
# CONFIG_USB_SERIAL_MCT_U232 is not set
|
||||
# CONFIG_USB_SERIAL_MOS7720 is not set
|
||||
# CONFIG_USB_SERIAL_MOS7840 is not set
|
||||
# CONFIG_USB_SERIAL_NAVMAN is not set
|
||||
CONFIG_USB_SERIAL_PL2303=m
|
||||
# CONFIG_USB_SERIAL_HP4X is not set
|
||||
# CONFIG_USB_SERIAL_SAFE is not set
|
||||
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
|
||||
# CONFIG_USB_SERIAL_TI is not set
|
||||
# CONFIG_USB_SERIAL_CYBERJACK is not set
|
||||
# CONFIG_USB_SERIAL_XIRCOM is not set
|
||||
@ -1439,17 +1550,21 @@ CONFIG_USB_SERIAL_PL2303=m
|
||||
#
|
||||
# CONFIG_USB_EMI62 is not set
|
||||
# CONFIG_USB_EMI26 is not set
|
||||
# CONFIG_USB_ADUTUX is not set
|
||||
# CONFIG_USB_AUERSWALD is not set
|
||||
# CONFIG_USB_RIO500 is not set
|
||||
# CONFIG_USB_LEGOTOWER is not set
|
||||
# CONFIG_USB_LCD is not set
|
||||
# CONFIG_USB_LED is not set
|
||||
# CONFIG_USB_CYPRESS_CY7C63 is not set
|
||||
# CONFIG_USB_CYTHERM is not set
|
||||
# CONFIG_USB_PHIDGETKIT is not set
|
||||
# CONFIG_USB_PHIDGETSERVO is not set
|
||||
# CONFIG_USB_PHIDGET is not set
|
||||
# CONFIG_USB_IDMOUSE is not set
|
||||
# CONFIG_USB_FTDI_ELAN is not set
|
||||
# CONFIG_USB_APPLEDISPLAY is not set
|
||||
# CONFIG_USB_SISUSBVGA is not set
|
||||
# CONFIG_USB_LD is not set
|
||||
# CONFIG_USB_TRANCEVIBRATOR is not set
|
||||
# CONFIG_USB_TEST is not set
|
||||
|
||||
#
|
||||
@ -1486,6 +1601,7 @@ CONFIG_LEDS_CLASS=y
|
||||
#
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
|
||||
#
|
||||
# InfiniBand support
|
||||
@ -1501,6 +1617,19 @@ CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
#
|
||||
# CONFIG_RTC_CLASS is not set
|
||||
|
||||
#
|
||||
# DMA Engine support
|
||||
#
|
||||
# CONFIG_DMA_ENGINE is not set
|
||||
|
||||
#
|
||||
# DMA Clients
|
||||
#
|
||||
|
||||
#
|
||||
# DMA Devices
|
||||
#
|
||||
|
||||
#
|
||||
# File systems
|
||||
#
|
||||
@ -1509,6 +1638,7 @@ CONFIG_EXT2_FS=m
|
||||
# CONFIG_EXT2_FS_XIP is not set
|
||||
CONFIG_EXT3_FS=m
|
||||
# CONFIG_EXT3_FS_XATTR is not set
|
||||
# CONFIG_EXT4DEV_FS is not set
|
||||
CONFIG_JBD=m
|
||||
# CONFIG_JBD_DEBUG is not set
|
||||
CONFIG_REISERFS_FS=m
|
||||
@ -1526,11 +1656,13 @@ CONFIG_XFS_FS=m
|
||||
# CONFIG_XFS_SECURITY is not set
|
||||
# CONFIG_XFS_POSIX_ACL is not set
|
||||
# CONFIG_XFS_RT is not set
|
||||
# CONFIG_GFS2_FS is not set
|
||||
# CONFIG_OCFS2_FS is not set
|
||||
CONFIG_MINI_FO=y
|
||||
CONFIG_MINIX_FS=m
|
||||
# CONFIG_ROMFS_FS is not set
|
||||
CONFIG_INOTIFY=y
|
||||
CONFIG_INOTIFY_USER=y
|
||||
# CONFIG_QUOTA is not set
|
||||
# CONFIG_DNOTIFY is not set
|
||||
# CONFIG_AUTOFS_FS is not set
|
||||
@ -1562,11 +1694,13 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
|
||||
#
|
||||
CONFIG_PROC_FS=y
|
||||
# CONFIG_PROC_KCORE is not set
|
||||
CONFIG_PROC_SYSCTL=y
|
||||
CONFIG_DEVFS_FS=y
|
||||
CONFIG_DEVFS_MOUNT=y
|
||||
# CONFIG_DEVFS_DEBUG is not set
|
||||
CONFIG_SYSFS=y
|
||||
CONFIG_TMPFS=y
|
||||
# CONFIG_TMPFS_POSIX_ACL is not set
|
||||
# CONFIG_HUGETLB_PAGE is not set
|
||||
CONFIG_RAMFS=y
|
||||
# CONFIG_CONFIGFS_FS is not set
|
||||
@ -1586,6 +1720,7 @@ CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
CONFIG_JFFS2_FS_WRITEBUFFER=y
|
||||
# CONFIG_JFFS2_SUMMARY is not set
|
||||
# CONFIG_JFFS2_FS_XATTR is not set
|
||||
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
|
||||
CONFIG_JFFS2_ZLIB=y
|
||||
CONFIG_JFFS2_RTIME=y
|
||||
@ -1624,7 +1759,9 @@ CONFIG_SMB_FS=m
|
||||
# CONFIG_SMB_NLS_DEFAULT is not set
|
||||
CONFIG_CIFS=m
|
||||
# CONFIG_CIFS_STATS is not set
|
||||
# CONFIG_CIFS_WEAK_PW_HASH is not set
|
||||
# CONFIG_CIFS_XATTR is not set
|
||||
# CONFIG_CIFS_DEBUG2 is not set
|
||||
# CONFIG_CIFS_EXPERIMENTAL is not set
|
||||
# CONFIG_NCP_FS is not set
|
||||
# CONFIG_CODA_FS is not set
|
||||
@ -1704,11 +1841,15 @@ CONFIG_NLS_UTF8=m
|
||||
#
|
||||
# Kernel hacking
|
||||
#
|
||||
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
|
||||
# CONFIG_PRINTK_TIME is not set
|
||||
CONFIG_ENABLE_MUST_CHECK=y
|
||||
# CONFIG_MAGIC_SYSRQ is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_DEBUG_KERNEL is not set
|
||||
CONFIG_LOG_BUF_SHIFT=14
|
||||
# CONFIG_DEBUG_FS is not set
|
||||
# CONFIG_HEADERS_CHECK is not set
|
||||
CONFIG_CROSSCOMPILE=y
|
||||
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
|
||||
|
||||
@ -1722,6 +1863,10 @@ CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit
|
||||
# Cryptographic options
|
||||
#
|
||||
CONFIG_CRYPTO=y
|
||||
CONFIG_CRYPTO_ALGAPI=y
|
||||
CONFIG_CRYPTO_BLKCIPHER=m
|
||||
CONFIG_CRYPTO_HASH=y
|
||||
CONFIG_CRYPTO_MANAGER=y
|
||||
CONFIG_CRYPTO_HMAC=y
|
||||
# CONFIG_CRYPTO_NULL is not set
|
||||
# CONFIG_CRYPTO_MD4 is not set
|
||||
@ -1731,6 +1876,8 @@ CONFIG_CRYPTO_SHA1=m
|
||||
# CONFIG_CRYPTO_SHA512 is not set
|
||||
# CONFIG_CRYPTO_WP512 is not set
|
||||
# CONFIG_CRYPTO_TGR192 is not set
|
||||
CONFIG_CRYPTO_ECB=m
|
||||
CONFIG_CRYPTO_CBC=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
# CONFIG_CRYPTO_BLOWFISH is not set
|
||||
# CONFIG_CRYPTO_TWOFISH is not set
|
||||
@ -1764,3 +1911,4 @@ CONFIG_TEXTSEARCH=y
|
||||
CONFIG_TEXTSEARCH_KMP=m
|
||||
CONFIG_TEXTSEARCH_BM=m
|
||||
CONFIG_TEXTSEARCH_FSM=m
|
||||
CONFIG_PLIST=y
|
||||
|
186
target/linux/brcm-2.6/config-diff
Normal file
186
target/linux/brcm-2.6/config-diff
Normal file
@ -0,0 +1,186 @@
|
||||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
# CONFIG_64BIT_PHYS_ADDR is not set
|
||||
CONFIG_B44=y
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_BCM947XX=y
|
||||
CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
# CONFIG_DDB5477 is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
# CONFIG_HZ_1024 is not set
|
||||
# CONFIG_HZ_128 is not set
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_256 is not set
|
||||
# CONFIG_HZ_48 is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_IDE is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQ_CPU=y
|
||||
# CONFIG_LAN_SAA9730 is not set
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
CONFIG_MINI_FO=y
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_BOSPORUS is not set
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MIPS_DB1000 is not set
|
||||
# CONFIG_MIPS_DB1100 is not set
|
||||
# CONFIG_MIPS_DB1200 is not set
|
||||
# CONFIG_MIPS_DB1500 is not set
|
||||
# CONFIG_MIPS_DB1550 is not set
|
||||
# CONFIG_MIPS_EV64120 is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_MIRAGE is not set
|
||||
# CONFIG_MIPS_MTX1 is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_PB1000 is not set
|
||||
# CONFIG_MIPS_PB1100 is not set
|
||||
# CONFIG_MIPS_PB1200 is not set
|
||||
# CONFIG_MIPS_PB1500 is not set
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MIPS_VPE_LOADER is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
# CONFIG_MOMENCO_OCELOT is not set
|
||||
# CONFIG_MOMENCO_OCELOT_3 is not set
|
||||
# CONFIG_MOMENCO_OCELOT_C is not set
|
||||
# CONFIG_MOMENCO_OCELOT_G is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
CONFIG_MTD_CHAR=y
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
CONFIG_MTD_BCM47XX=y
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
CONFIG_MTD_CFI=y
|
||||
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_CFI_UTIL=y
|
||||
CONFIG_MTD_COMPLEX_MAPPINGS=y
|
||||
CONFIG_MTD_GEN_PROBE=y
|
||||
# CONFIG_MTD_PCI is not set
|
||||
# CONFIG_MTD_PHYSMAP is not set
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
# CONFIG_PAGE_SIZE_8KB is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_V2PCI is not set
|
||||
# CONFIG_PPP_MULTILINK is not set
|
||||
# CONFIG_PPP_SYNC_TTY is not set
|
||||
# CONFIG_PROC_KCORE is not set
|
||||
# CONFIG_QEMU is not set
|
||||
# CONFIG_RTC is not set
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SCSI_MULTI_LUN is not set
|
||||
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
# CONFIG_SERIAL_8250_MANY_PORTS is not set
|
||||
# CONFIG_SERIAL_8250_RSA is not set
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
# CONFIG_SGI_IP22 is not set
|
||||
# CONFIG_SGI_IP27 is not set
|
||||
# CONFIG_SGI_IP32 is not set
|
||||
# CONFIG_SIBYTE_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_PTSWARM is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
# CONFIG_TOSHIBA_JMR3927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4938 is not set
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
CONFIG_USB_EHCI_SPLIT_ISO=y
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
CONFIG_USB_OHCI_HCD=m
|
||||
CONFIG_USB_UHCI_HCD=m
|
||||
# CONFIG_WATCHDOG is not set
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/bcm47xx-flash.c
|
||||
--- linux.old/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/drivers/mtd/maps/bcm47xx-flash.c 2006-06-23 19:54:06.000000000 +0200
|
||||
diff -urN linux-2.6.19.ref/drivers/mtd/maps/bcm47xx-flash.c linux-2.6.19/drivers/mtd/maps/bcm47xx-flash.c
|
||||
--- linux-2.6.19.ref/drivers/mtd/maps/bcm47xx-flash.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/mtd/maps/bcm47xx-flash.c 2006-12-04 21:33:58.000000000 +0100
|
||||
@@ -0,0 +1,490 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
|
||||
@ -45,7 +45,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/wait.h>
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/map.h>
|
||||
+#ifdef CONFIG_MTD_PARTITIONS
|
||||
@ -133,7 +133,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+ /*
|
||||
+ * Read into buffer
|
||||
+ */
|
||||
+ if (MTD_READ(mtd, off, sizeof(buf), &len, buf) ||
|
||||
+ if (mtd->read(mtd, off, sizeof(buf), &len, buf) ||
|
||||
+ len != sizeof(buf))
|
||||
+ continue;
|
||||
+
|
||||
@ -195,7 +195,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+ set_current_state(TASK_INTERRUPTIBLE);
|
||||
+ add_wait_queue(&wait_q, &wait);
|
||||
+
|
||||
+ ret = MTD_ERASE(mtd, &erase);
|
||||
+ ret = mtd->erase(mtd, &erase);
|
||||
+ if (ret) {
|
||||
+ set_current_state(TASK_RUNNING);
|
||||
+ remove_wait_queue(&wait_q, &wait);
|
||||
@ -212,7 +212,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+ * Next, writhe data to flash.
|
||||
+ */
|
||||
+
|
||||
+ ret = MTD_WRITE (mtd, pos, len, &retlen, buf);
|
||||
+ ret = mtd->write(mtd, pos, len, &retlen, buf);
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+ if (retlen != len)
|
||||
@ -243,7 +243,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+ /*
|
||||
+ * Read into buffer
|
||||
+ */
|
||||
+ if (MTD_READ(mtd, off, sizeof(trx), &len, (char *) &trx) ||
|
||||
+ if (mtd->read(mtd, off, sizeof(trx), &len, (char *) &trx) ||
|
||||
+ len != sizeof(trx))
|
||||
+ continue;
|
||||
+
|
||||
@ -269,7 +269,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+ if (part->size == 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (MTD_READ(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
|
||||
+ if (mtd->read(mtd, part->offset, sizeof(buf), &len, buf) || len != sizeof(buf))
|
||||
+ return 0;
|
||||
+
|
||||
+ if (*((__u32 *) buf) == SQUASHFS_MAGIC) {
|
||||
@ -297,7 +297,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+
|
||||
+ /* Update the trx crc32 */
|
||||
+ for (i = (u32) &(((struct trx_header *)NULL)->flag_version); i <= trx.len; i += sizeof(buf)) {
|
||||
+ if (MTD_READ(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf))
|
||||
+ if (mtd->read(mtd, off + i, sizeof(buf), &len, buf) || len != sizeof(buf))
|
||||
+ return 0;
|
||||
+ crc = crc32_le(crc, buf, min(sizeof(buf), trx.len - i));
|
||||
+ }
|
||||
@ -306,7 +306,7 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+ /* read first eraseblock from the trx */
|
||||
+ block = kmalloc(mtd->erasesize, GFP_KERNEL);
|
||||
+ trx2 = (struct trx_header *) block;
|
||||
+ if (MTD_READ(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) {
|
||||
+ if (mtd->read(mtd, off, mtd->erasesize, &len, block) || len != mtd->erasesize) {
|
||||
+ printk("Error accessing the first trx eraseblock\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
@ -492,9 +492,9 @@ diff -urN linux.old/drivers/mtd/maps/bcm47xx-flash.c linux.dev/drivers/mtd/maps/
|
||||
+
|
||||
+module_init(init_bcm947xx_map);
|
||||
+module_exit(cleanup_bcm947xx_map);
|
||||
diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
|
||||
--- linux.old/drivers/mtd/maps/Kconfig 2006-06-23 19:13:51.000000000 +0200
|
||||
+++ linux.dev/drivers/mtd/maps/Kconfig 2006-06-23 18:47:58.000000000 +0200
|
||||
diff -urN linux-2.6.19.ref/drivers/mtd/maps/Kconfig linux-2.6.19/drivers/mtd/maps/Kconfig
|
||||
--- linux-2.6.19.ref/drivers/mtd/maps/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/mtd/maps/Kconfig 2006-12-04 21:33:58.000000000 +0100
|
||||
@@ -299,6 +299,12 @@
|
||||
Mapping for the Flaga digital module. If you don't have one, ignore
|
||||
this setting.
|
||||
@ -508,10 +508,10 @@ diff -urN linux.old/drivers/mtd/maps/Kconfig linux.dev/drivers/mtd/maps/Kconfig
|
||||
config MTD_BEECH
|
||||
tristate "CFI Flash device mapped on IBM 405LP Beech"
|
||||
depends on MTD_CFI && BEECH
|
||||
diff -urN linux.old/drivers/mtd/maps/Makefile linux.dev/drivers/mtd/maps/Makefile
|
||||
--- linux.old/drivers/mtd/maps/Makefile 2006-06-23 19:13:51.000000000 +0200
|
||||
+++ linux.dev/drivers/mtd/maps/Makefile 2006-06-23 18:47:58.000000000 +0200
|
||||
@@ -30,6 +30,7 @@
|
||||
diff -urN linux-2.6.19.ref/drivers/mtd/maps/Makefile linux-2.6.19/drivers/mtd/maps/Makefile
|
||||
--- linux-2.6.19.ref/drivers/mtd/maps/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/mtd/maps/Makefile 2006-12-04 21:33:58.000000000 +0100
|
||||
@@ -29,6 +29,7 @@
|
||||
obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
|
||||
obj-$(CONFIG_MTD_RPXLITE) += rpxlite.o
|
||||
obj-$(CONFIG_MTD_TQM8XXL) += tqm8xxl.o
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -ur linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S
|
||||
--- linux.old/arch/mips/kernel/genex.S 2006-10-16 19:09:36.000000000 +0200
|
||||
+++ linux.dev/arch/mips/kernel/genex.S 2006-10-16 19:06:50.000000000 +0200
|
||||
diff -urN linux-2.6.19.ref/arch/mips/kernel/genex.S linux-2.6.19/arch/mips/kernel/genex.S
|
||||
--- linux-2.6.19.ref/arch/mips/kernel/genex.S 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/kernel/genex.S 2006-12-04 21:34:09.000000000 +0100
|
||||
@@ -73,6 +73,10 @@
|
||||
.set push
|
||||
.set mips3
|
||||
@ -12,10 +12,10 @@ diff -ur linux.old/arch/mips/kernel/genex.S linux.dev/arch/mips/kernel/genex.S
|
||||
mfc0 k1, CP0_CAUSE
|
||||
li k0, 31<<2
|
||||
andi k1, k1, 0x7c
|
||||
diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
|
||||
--- linux.old/arch/mips/mm/c-r4k.c 2006-10-16 19:09:36.000000000 +0200
|
||||
+++ linux.dev/arch/mips/mm/c-r4k.c 2006-10-16 19:08:46.000000000 +0200
|
||||
@@ -14,6 +14,15 @@
|
||||
diff -urN linux-2.6.19.ref/arch/mips/mm/c-r4k.c linux-2.6.19/arch/mips/mm/c-r4k.c
|
||||
--- linux-2.6.19.ref/arch/mips/mm/c-r4k.c 2006-12-04 21:34:04.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/mm/c-r4k.c 2006-12-04 21:34:09.000000000 +0100
|
||||
@@ -13,6 +13,15 @@
|
||||
#include <linux/mm.h>
|
||||
#include <linux/bitops.h>
|
||||
|
||||
@ -31,7 +31,7 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
|
||||
#include <asm/bcache.h>
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/cache.h>
|
||||
@@ -30,6 +39,9 @@
|
||||
@@ -29,6 +38,9 @@
|
||||
#include <asm/cacheflush.h> /* for run_uncached() */
|
||||
|
||||
|
||||
@ -41,40 +41,37 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
|
||||
/*
|
||||
* Special Variant of smp_call_function for use by cache functions:
|
||||
*
|
||||
@@ -94,7 +106,9 @@
|
||||
@@ -93,6 +105,9 @@
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
- if (dc_lsize == 16)
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page = blast_dcache_page;
|
||||
+ else if (dc_lsize == 16)
|
||||
r4k_blast_dcache_page = blast_dcache16_page;
|
||||
else if (dc_lsize == 32)
|
||||
r4k_blast_dcache_page = r4k_blast_dcache_page_dc32;
|
||||
@@ -106,7 +120,9 @@
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_page = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -107,6 +122,9 @@
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
- if (dc_lsize == 16)
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache_page_indexed = blast_dcache_page_indexed;
|
||||
+ else if (dc_lsize == 16)
|
||||
r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed;
|
||||
else if (dc_lsize == 32)
|
||||
r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed;
|
||||
@@ -118,7 +134,9 @@
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache_page_indexed = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -121,6 +139,9 @@
|
||||
{
|
||||
unsigned long dc_lsize = cpu_dcache_line_size();
|
||||
|
||||
- if (dc_lsize == 16)
|
||||
+ if (bcm4710)
|
||||
+ r4k_blast_dcache = blast_dcache;
|
||||
+ else if (dc_lsize == 16)
|
||||
r4k_blast_dcache = blast_dcache16;
|
||||
else if (dc_lsize == 32)
|
||||
r4k_blast_dcache = blast_dcache32;
|
||||
@@ -527,6 +545,9 @@
|
||||
+ else
|
||||
if (dc_lsize == 0)
|
||||
r4k_blast_dcache = (void *)cache_noop;
|
||||
else if (dc_lsize == 16)
|
||||
@@ -538,6 +559,9 @@
|
||||
r4k_blast_icache();
|
||||
else
|
||||
protected_blast_icache_range(start, end);
|
||||
@ -84,17 +81,17 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
|
||||
}
|
||||
|
||||
static void r4k_flush_icache_range(unsigned long start, unsigned long end)
|
||||
@@ -683,6 +704,8 @@
|
||||
@@ -618,6 +642,8 @@
|
||||
unsigned long addr = (unsigned long) arg;
|
||||
|
||||
R4600_HIT_CACHEOP_WAR_IMPL;
|
||||
+ BCM4710_PROTECTED_FILL_TLB(addr);
|
||||
+ BCM4710_PROTECTED_FILL_TLB(addr + 4);
|
||||
protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
|
||||
if (dc_lsize)
|
||||
protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
|
||||
if (!cpu_icache_snoops_remote_store && scache_size)
|
||||
protected_writeback_scache_line(addr & ~(sc_lsize - 1));
|
||||
@@ -1189,6 +1212,16 @@
|
||||
static inline void coherency_setup(void)
|
||||
@@ -1135,6 +1161,16 @@
|
||||
static void __init coherency_setup(void)
|
||||
{
|
||||
change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT);
|
||||
+#ifdef CONFIG_BCM947XX
|
||||
@ -110,7 +107,7 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
|
||||
|
||||
/*
|
||||
* c0_status.cu=0 specifies that updates by the sc instruction use
|
||||
@@ -1227,6 +1260,15 @@
|
||||
@@ -1173,6 +1209,15 @@
|
||||
|
||||
/* Default cache error handler for R4000 and R5000 family */
|
||||
set_uncached_handler (0x100, &except_vec2_generic, 0x80);
|
||||
@ -126,21 +123,21 @@ diff -ur linux.old/arch/mips/mm/c-r4k.c linux.dev/arch/mips/mm/c-r4k.c
|
||||
|
||||
probe_pcache();
|
||||
setup_scache();
|
||||
diff -ur linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
|
||||
--- linux.old/arch/mips/mm/tlbex.c 2006-10-16 19:09:36.000000000 +0200
|
||||
+++ linux.dev/arch/mips/mm/tlbex.c 2006-10-16 19:06:50.000000000 +0200
|
||||
@@ -38,6 +38,10 @@
|
||||
|
||||
/* #define DEBUG_TLB */
|
||||
diff -urN linux-2.6.19.ref/arch/mips/mm/tlbex.c linux-2.6.19/arch/mips/mm/tlbex.c
|
||||
--- linux-2.6.19.ref/arch/mips/mm/tlbex.c 2006-12-04 21:33:48.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/mm/tlbex.c 2006-12-04 21:34:09.000000000 +0100
|
||||
@@ -1174,6 +1174,10 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_BCM947XX
|
||||
+extern int bcm4710;
|
||||
+#endif
|
||||
+
|
||||
static __init int __attribute__((unused)) r45k_bvahwbug(void)
|
||||
static void __init build_r4000_tlb_refill_handler(void)
|
||||
{
|
||||
/* XXX: We should probe for the presence of this bug, but we don't. */
|
||||
@@ -1184,6 +1188,12 @@
|
||||
u32 *p = tlb_handler;
|
||||
@@ -1188,6 +1192,12 @@
|
||||
memset(relocs, 0, sizeof(relocs));
|
||||
memset(final_handler, 0, sizeof(final_handler));
|
||||
|
||||
@ -153,9 +150,9 @@ diff -ur linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
|
||||
/*
|
||||
* create the plain linear handler
|
||||
*/
|
||||
diff -ur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcache.h
|
||||
--- linux.old/include/asm-mips/r4kcache.h 2006-10-16 19:09:36.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/r4kcache.h 2006-10-16 19:09:11.000000000 +0200
|
||||
diff -urN linux-2.6.19.ref/include/asm-mips/r4kcache.h linux-2.6.19/include/asm-mips/r4kcache.h
|
||||
--- linux-2.6.19.ref/include/asm-mips/r4kcache.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/include/asm-mips/r4kcache.h 2006-12-04 21:34:09.000000000 +0100
|
||||
@@ -17,6 +17,18 @@
|
||||
#include <asm/cpu-features.h>
|
||||
#include <asm/mipsmtregs.h>
|
||||
@ -356,10 +353,10 @@ diff -ur linux.old/include/asm-mips/r4kcache.h linux.dev/include/asm-mips/r4kcac
|
||||
+__BUILD_BLAST_CACHE_RANGE(inv_s, scache, Hit_Invalidate_SD,,, )
|
||||
|
||||
#endif /* _ASM_R4KCACHE_H */
|
||||
diff -ur linux.old/include/asm-mips/stackframe.h linux.dev/include/asm-mips/stackframe.h
|
||||
--- linux.old/include/asm-mips/stackframe.h 2006-10-16 19:09:36.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/stackframe.h 2006-10-16 19:06:50.000000000 +0200
|
||||
@@ -361,6 +361,10 @@
|
||||
diff -urN linux-2.6.19.ref/include/asm-mips/stackframe.h linux-2.6.19/include/asm-mips/stackframe.h
|
||||
--- linux-2.6.19.ref/include/asm-mips/stackframe.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/include/asm-mips/stackframe.h 2006-12-04 21:34:09.000000000 +0100
|
||||
@@ -334,6 +334,10 @@
|
||||
.macro RESTORE_SP_AND_RET
|
||||
LONG_L sp, PT_R29(sp)
|
||||
.set mips3
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
--- linux-2.6.17/drivers/net/b44.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/drivers/net/b44.c 2006-06-18 16:24:14.000000000 +0200
|
||||
diff -urN linux-2.6.19.ref/drivers/net/b44.c linux-2.6.19/drivers/net/b44.c
|
||||
--- linux-2.6.19.ref/drivers/net/b44.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/net/b44.c 2006-12-04 21:34:14.000000000 +0100
|
||||
@@ -1,7 +1,9 @@
|
||||
-/* b44.c: Broadcom 4400 device driver.
|
||||
+/* b44.c: Broadcom 4400/47xx device driver.
|
||||
@ -14,8 +14,8 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
*
|
||||
* Distribute under GPL.
|
||||
@@ -32,6 +34,28 @@
|
||||
#define DRV_MODULE_VERSION "1.00"
|
||||
#define DRV_MODULE_RELDATE "Apr 7, 2006"
|
||||
#define DRV_MODULE_VERSION "1.01"
|
||||
#define DRV_MODULE_RELDATE "Jun 16, 2006"
|
||||
|
||||
+#ifdef CONFIG_BCM947XX
|
||||
+extern char *nvram_get(char *name);
|
||||
@ -42,7 +42,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
#define B44_DEF_MSG_ENABLE \
|
||||
(NETIF_MSG_DRV | \
|
||||
NETIF_MSG_PROBE | \
|
||||
@@ -78,8 +102,8 @@
|
||||
@@ -87,8 +111,8 @@
|
||||
static char version[] __devinitdata =
|
||||
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
|
||||
|
||||
@ -53,7 +53,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_VERSION(DRV_MODULE_VERSION);
|
||||
|
||||
@@ -94,6 +118,10 @@
|
||||
@@ -103,6 +127,10 @@
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
|
||||
{ PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_BCM4401B1,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
|
||||
@ -64,7 +64,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
{ } /* terminate list with empty entry */
|
||||
};
|
||||
|
||||
@@ -132,17 +160,6 @@
|
||||
@@ -141,17 +169,6 @@
|
||||
dma_desc_sync_size, dir);
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
static int b44_wait_bit(struct b44 *bp, unsigned long reg,
|
||||
u32 bit, unsigned long timeout, const int clear)
|
||||
{
|
||||
@@ -269,6 +286,10 @@
|
||||
@@ -278,6 +295,10 @@
|
||||
break;
|
||||
};
|
||||
#endif
|
||||
@ -93,7 +93,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -278,6 +299,30 @@
|
||||
@@ -287,6 +308,30 @@
|
||||
== SBTMSLOW_CLOCK);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index)
|
||||
{
|
||||
u32 val;
|
||||
@@ -314,14 +359,14 @@
|
||||
@@ -323,14 +368,14 @@
|
||||
bw32(bp, B44_IMASK, bp->imask);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
(reg << MDIO_DATA_RA_SHIFT) |
|
||||
(MDIO_TA_VALID << MDIO_DATA_TA_SHIFT)));
|
||||
err = b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0);
|
||||
@@ -330,18 +375,34 @@
|
||||
@@ -339,18 +384,34 @@
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
/* miilib interface */
|
||||
/* FIXME FIXME: phy_id is ignored, bp->phy_addr use is unconditional
|
||||
* due to code existing before miilib use was added to this driver.
|
||||
@@ -370,6 +431,8 @@
|
||||
@@ -379,6 +440,8 @@
|
||||
u32 val;
|
||||
int err;
|
||||
|
||||
@ -187,7 +187,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
err = b44_writephy(bp, MII_BMCR, BMCR_RESET);
|
||||
if (err)
|
||||
return err;
|
||||
@@ -433,6 +496,22 @@
|
||||
@@ -442,6 +505,22 @@
|
||||
u32 val;
|
||||
int err;
|
||||
|
||||
@ -210,7 +210,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
if ((err = b44_readphy(bp, B44_MII_ALEDCTRL, &val)) != 0)
|
||||
goto out;
|
||||
if ((err = b44_writephy(bp, B44_MII_ALEDCTRL,
|
||||
@@ -528,6 +607,19 @@
|
||||
@@ -537,6 +616,19 @@
|
||||
{
|
||||
u32 bmsr, aux;
|
||||
|
||||
@ -230,7 +230,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
if (!b44_readphy(bp, MII_BMSR, &bmsr) &&
|
||||
!b44_readphy(bp, B44_MII_AUXCTRL, &aux) &&
|
||||
(bmsr != 0xffff)) {
|
||||
@@ -1282,9 +1374,10 @@
|
||||
@@ -1292,9 +1384,10 @@
|
||||
bw32(bp, B44_DMARX_CTRL, 0);
|
||||
bp->rx_prod = bp->rx_cons = 0;
|
||||
} else {
|
||||
@ -244,7 +244,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
}
|
||||
|
||||
ssb_core_reset(bp);
|
||||
@@ -1292,8 +1385,14 @@
|
||||
@@ -1302,8 +1395,14 @@
|
||||
b44_clear_stats(bp);
|
||||
|
||||
/* Make PHY accessible. */
|
||||
@ -260,7 +260,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
br32(bp, B44_MDIO_CTRL);
|
||||
|
||||
if (!(br32(bp, B44_DEVCTRL) & DEVCTRL_IPP)) {
|
||||
@@ -1837,18 +1936,297 @@
|
||||
@@ -2034,18 +2133,297 @@
|
||||
.get_perm_addr = ethtool_op_get_perm_addr,
|
||||
};
|
||||
|
||||
@ -447,7 +447,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
+
|
||||
+ b44_halt(bp);
|
||||
+ b44_init_rings(bp);
|
||||
+ b44_init_hw(bp);
|
||||
+ b44_init_hw(bp, 1);
|
||||
+ netif_wake_queue(bp->dev);
|
||||
+ spin_unlock_irq(&bp->lock);
|
||||
+
|
||||
@ -490,7 +490,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
+ if (bp->flags & B44_FLAG_PAUSE_AUTO) {
|
||||
+ b44_halt(bp);
|
||||
+ b44_init_rings(bp);
|
||||
+ b44_init_hw(bp);
|
||||
+ b44_init_hw(bp, 1);
|
||||
+ } else {
|
||||
+ __b44_set_flow_ctrl(bp, bp->flags);
|
||||
+ }
|
||||
@ -562,7 +562,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
@@ -1868,27 +2246,60 @@
|
||||
@@ -2065,27 +2443,60 @@
|
||||
static int __devinit b44_get_invariants(struct b44 *bp)
|
||||
{
|
||||
u8 eeprom[128];
|
||||
@ -639,7 +639,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
|
||||
/* With this, plus the rx_header prepended to the data by the
|
||||
* hardware, we'll land the ethernet header on a 2-byte boundary.
|
||||
@@ -1898,7 +2309,6 @@
|
||||
@@ -2095,7 +2506,6 @@
|
||||
bp->imask = IMASK_DEF;
|
||||
|
||||
bp->core_unit = ssb_core_unit(bp);
|
||||
@ -647,7 +647,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
|
||||
/* XXX - really required?
|
||||
bp->flags |= B44_FLAG_BUGGY_TXPTR;
|
||||
@@ -2048,11 +2458,17 @@
|
||||
@@ -2246,11 +2656,17 @@
|
||||
*/
|
||||
b44_chip_reset(bp);
|
||||
|
||||
@ -666,10 +666,10 @@ diff -Nur linux-2.6.17/drivers/net/b44.c linux-2.6.17-owrt/drivers/net/b44.c
|
||||
return 0;
|
||||
|
||||
err_out_iounmap:
|
||||
diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
|
||||
--- linux-2.6.17/drivers/net/b44.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/drivers/net/b44.h 2006-06-18 16:01:10.000000000 +0200
|
||||
@@ -292,6 +292,10 @@
|
||||
diff -urN linux-2.6.19.ref/drivers/net/b44.h linux-2.6.19/drivers/net/b44.h
|
||||
--- linux-2.6.19.ref/drivers/net/b44.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/net/b44.h 2006-12-04 21:34:14.000000000 +0100
|
||||
@@ -297,6 +297,10 @@
|
||||
#define SSB_PCI_MASK1 0xfc000000
|
||||
#define SSB_PCI_MASK2 0xc0000000
|
||||
|
||||
@ -680,7 +680,7 @@ diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
|
||||
/* 4400 PHY registers */
|
||||
#define B44_MII_AUXCTRL 24 /* Auxiliary Control */
|
||||
#define MII_AUXCTRL_DUPLEX 0x0001 /* Full Duplex */
|
||||
@@ -345,6 +349,8 @@
|
||||
@@ -350,6 +354,8 @@
|
||||
};
|
||||
|
||||
#define B44_MCAST_TABLE_SIZE 32
|
||||
@ -689,11 +689,11 @@ diff -Nur linux-2.6.17/drivers/net/b44.h linux-2.6.17-owrt/drivers/net/b44.h
|
||||
|
||||
#define B44_STAT_REG_DECLARE \
|
||||
_B44(tx_good_octets) \
|
||||
@@ -420,6 +426,7 @@
|
||||
|
||||
u32 dma_offset;
|
||||
u32 flags;
|
||||
+#define B44_FLAG_INIT_COMPLETE 0x00000001
|
||||
@@ -428,6 +434,7 @@
|
||||
#define B44_FLAG_B0_ANDLATER 0x00000001
|
||||
#define B44_FLAG_BUGGY_TXPTR 0x00000002
|
||||
#define B44_FLAG_REORDER_BUG 0x00000004
|
||||
+#define B44_FLAG_INIT_COMPLETE 0x00000008
|
||||
#define B44_FLAG_PAUSE_AUTO 0x00008000
|
||||
#define B44_FLAG_FULL_DUPLEX 0x00010000
|
||||
#define B44_FLAG_100_BASE_T 0x00020000
|
||||
|
94
target/linux/brcm-2.6/patches/005-remove_scache.patch
Normal file
94
target/linux/brcm-2.6/patches/005-remove_scache.patch
Normal file
@ -0,0 +1,94 @@
|
||||
diff -urN linux-2.6.19.ref/arch/mips/Kconfig linux-2.6.19/arch/mips/Kconfig
|
||||
--- linux-2.6.19.ref/arch/mips/Kconfig 2006-12-04 21:33:48.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/Kconfig 2006-12-04 21:34:04.000000000 +0100
|
||||
@@ -283,7 +283,6 @@
|
||||
select I8259
|
||||
select MIPS_BOARDS_GEN
|
||||
select MIPS_BONITO64
|
||||
- select MIPS_CPU_SCACHE
|
||||
select MIPS_GT64120
|
||||
select MIPS_MSC
|
||||
select SWAP_IO_SPACE
|
||||
@@ -1434,13 +1433,6 @@
|
||||
bool
|
||||
select BOARD_SCACHE
|
||||
|
||||
-#
|
||||
-# Support for a MIPS32 / MIPS64 style S-caches
|
||||
-#
|
||||
-config MIPS_CPU_SCACHE
|
||||
- bool
|
||||
- select BOARD_SCACHE
|
||||
-
|
||||
config R5000_CPU_SCACHE
|
||||
bool
|
||||
select BOARD_SCACHE
|
||||
diff -urN linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c linux-2.6.19/arch/mips/kernel/cpu-probe.c
|
||||
--- linux-2.6.19.ref/arch/mips/kernel/cpu-probe.c 2006-12-04 21:33:48.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-12-04 21:34:04.000000000 +0100
|
||||
@@ -631,6 +631,8 @@
|
||||
break;
|
||||
case PRID_IMP_25KF:
|
||||
c->cputype = CPU_25KF;
|
||||
+ /* Probe for L2 cache */
|
||||
+ c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
|
||||
break;
|
||||
case PRID_IMP_34K:
|
||||
c->cputype = CPU_34K;
|
||||
diff -urN linux-2.6.19.ref/arch/mips/mm/c-r4k.c linux-2.6.19/arch/mips/mm/c-r4k.c
|
||||
--- linux-2.6.19.ref/arch/mips/mm/c-r4k.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/mm/c-r4k.c 2006-12-04 21:34:04.000000000 +0100
|
||||
@@ -1038,7 +1038,6 @@
|
||||
|
||||
extern int r5k_sc_init(void);
|
||||
extern int rm7k_sc_init(void);
|
||||
-extern int mips_sc_init(void);
|
||||
|
||||
static void __init setup_scache(void)
|
||||
{
|
||||
@@ -1086,29 +1085,17 @@
|
||||
return;
|
||||
|
||||
default:
|
||||
- if (c->isa_level == MIPS_CPU_ISA_M32R1 ||
|
||||
- c->isa_level == MIPS_CPU_ISA_M32R2 ||
|
||||
- c->isa_level == MIPS_CPU_ISA_M64R1 ||
|
||||
- c->isa_level == MIPS_CPU_ISA_M64R2) {
|
||||
-#ifdef CONFIG_MIPS_CPU_SCACHE
|
||||
- if (mips_sc_init ()) {
|
||||
- scache_size = c->scache.ways * c->scache.sets * c->scache.linesz;
|
||||
- printk("MIPS secondary cache %ldkB, %s, linesize %d bytes.\n",
|
||||
- scache_size >> 10,
|
||||
- way_string[c->scache.ways], c->scache.linesz);
|
||||
- }
|
||||
-#else
|
||||
- if (!(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
|
||||
- panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
|
||||
-#endif
|
||||
- return;
|
||||
- }
|
||||
sc_present = 0;
|
||||
}
|
||||
|
||||
if (!sc_present)
|
||||
return;
|
||||
|
||||
+ if ((c->isa_level == MIPS_CPU_ISA_M32R1 ||
|
||||
+ c->isa_level == MIPS_CPU_ISA_M64R1) &&
|
||||
+ !(c->scache.flags & MIPS_CACHE_NOT_PRESENT))
|
||||
+ panic("Dunno how to handle MIPS32 / MIPS64 second level cache");
|
||||
+
|
||||
/* compute a couple of other cache variables */
|
||||
c->scache.waysize = scache_size / c->scache.ways;
|
||||
|
||||
diff -urN linux-2.6.19.ref/arch/mips/mm/Makefile linux-2.6.19/arch/mips/mm/Makefile
|
||||
--- linux-2.6.19.ref/arch/mips/mm/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19/arch/mips/mm/Makefile 2006-12-04 21:34:04.000000000 +0100
|
||||
@@ -30,7 +30,6 @@
|
||||
obj-$(CONFIG_IP22_CPU_SCACHE) += sc-ip22.o
|
||||
obj-$(CONFIG_R5000_CPU_SCACHE) += sc-r5k.o
|
||||
obj-$(CONFIG_RM7000_CPU_SCACHE) += sc-rm7k.o
|
||||
-obj-$(CONFIG_MIPS_CPU_SCACHE) += sc-mips.o
|
||||
|
||||
#
|
||||
# Choose one DMA coherency model
|
@ -1,16 +1,7 @@
|
||||
--- linux-2.6.17.orig/drivers/net/b44.h 2006-09-19 19:56:03.000000000 +0200
|
||||
+++ linux-2.6.17/drivers/net/b44.h 2006-09-19 19:58:01.000000000 +0200
|
||||
@@ -122,6 +122,7 @@
|
||||
#define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
|
||||
#define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
|
||||
#define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
|
||||
+#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
|
||||
#define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
|
||||
#define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
|
||||
#define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
|
||||
--- linux-2.6.17.orig/drivers/net/b44.c 2006-09-19 19:56:03.000000000 +0200
|
||||
+++ linux-2.6.17/drivers/net/b44.c 2006-09-19 20:08:22.000000000 +0200
|
||||
@@ -1435,6 +1435,7 @@
|
||||
diff -urN linux-2.6.19.ref/drivers/net/b44.c linux-2.6.19/drivers/net/b44.c
|
||||
--- linux-2.6.19.ref/drivers/net/b44.c 2006-12-04 21:34:14.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/net/b44.c 2006-12-04 21:34:19.000000000 +0100
|
||||
@@ -1445,6 +1445,7 @@
|
||||
{
|
||||
struct b44 *bp = netdev_priv(dev);
|
||||
struct sockaddr *addr = p;
|
||||
@ -18,20 +9,20 @@
|
||||
|
||||
if (netif_running(dev))
|
||||
return -EBUSY;
|
||||
@@ -1445,7 +1446,11 @@
|
||||
@@ -1455,7 +1456,11 @@
|
||||
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
|
||||
|
||||
spin_lock_irq(&bp->lock);
|
||||
- __b44_set_mac_addr(bp);
|
||||
+
|
||||
+
|
||||
+ val = br32(bp, B44_RXCONFIG);
|
||||
+ if (!(val & RXCONFIG_CAM_ABSENT))
|
||||
+ __b44_set_mac_addr(bp);
|
||||
+
|
||||
+
|
||||
spin_unlock_irq(&bp->lock);
|
||||
|
||||
return 0;
|
||||
@@ -1641,7 +1646,7 @@
|
||||
@@ -1797,7 +1802,7 @@
|
||||
|
||||
val = br32(bp, B44_RXCONFIG);
|
||||
val &= ~(RXCONFIG_PROMISC | RXCONFIG_ALLMULTI);
|
||||
@ -40,3 +31,14 @@
|
||||
val |= RXCONFIG_PROMISC;
|
||||
bw32(bp, B44_RXCONFIG, val);
|
||||
} else {
|
||||
diff -urN linux-2.6.19.ref/drivers/net/b44.h linux-2.6.19/drivers/net/b44.h
|
||||
--- linux-2.6.19.ref/drivers/net/b44.h 2006-12-04 21:34:14.000000000 +0100
|
||||
+++ linux-2.6.19/drivers/net/b44.h 2006-12-04 21:34:19.000000000 +0100
|
||||
@@ -129,6 +129,7 @@
|
||||
#define RXCONFIG_FLOW 0x00000020 /* Flow Control Enable */
|
||||
#define RXCONFIG_FLOW_ACCEPT 0x00000040 /* Accept Unicast Flow Control Frame */
|
||||
#define RXCONFIG_RFILT 0x00000080 /* Reject Filter */
|
||||
+#define RXCONFIG_CAM_ABSENT 0x00000100 /* CAM Absent */
|
||||
#define B44_RXMAXLEN 0x0404UL /* EMAC RX Max Packet Length */
|
||||
#define B44_TXMAXLEN 0x0408UL /* EMAC TX Max Packet Length */
|
||||
#define B44_MDIO_CTRL 0x0410UL /* EMAC MDIO Control */
|
||||
|
@ -16,9 +16,9 @@ define Target/Description
|
||||
(e.g. Inventel Livebox, Siemens SE515)
|
||||
endef
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
|
||||
|
@ -710,7 +710,7 @@ diff -urN linux.old/arch/mips/bcm963xx/board.c linux.dev/arch/mips/bcm963xx/boar
|
||||
+
|
||||
+/* DyingGasp function prototype */
|
||||
+static void __init kerSysDyingGaspMapIntr(void);
|
||||
+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id);
|
||||
+static void __init kerSysInitDyingGaspHandler( void );
|
||||
+static void __exit kerSysDeinitDyingGaspHandler( void );
|
||||
+/* -DyingGasp function prototype - */
|
||||
@ -982,7 +982,7 @@ diff -urN linux.old/arch/mips/bcm963xx/board.c linux.dev/arch/mips/bcm963xx/boar
|
||||
+}
|
||||
+
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
|
||||
+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id, struct pt_regs * regs)
|
||||
+static irqreturn_t kerSysDyingGaspIsr(int irq, void * dev_id)
|
||||
+#else
|
||||
+static unsigned int kerSysDyingGaspIsr(void)
|
||||
+#endif
|
||||
@ -5577,7 +5577,7 @@ diff -urN linux.old/arch/mips/bcm963xx/include/bcm_intr.h linux.dev/arch/mips/bc
|
||||
+
|
||||
+/* defines */
|
||||
+struct pt_regs;
|
||||
+typedef int (*FN_HANDLER) (int, void *, struct pt_regs *);
|
||||
+typedef int (*FN_HANDLER) (int, void *);
|
||||
+
|
||||
+/* prototypes */
|
||||
+extern void enable_brcm_irq(unsigned int irq);
|
||||
@ -6454,7 +6454,7 @@ diff -urN linux.old/arch/mips/bcm963xx/int-handler.S linux.dev/arch/mips/bcm963x
|
||||
+ * Generic interrupt handler for Broadcom MIPS boards
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+
|
||||
+#include <asm/asm.h>
|
||||
+#include <asm/mipsregs.h>
|
||||
@ -6555,13 +6555,13 @@ diff -urN linux.old/arch/mips/bcm963xx/irq.c linux.dev/arch/mips/bcm963xx/irq.c
|
||||
+ }
|
||||
+ if (pendingIrqs & irqBit) {
|
||||
+ PERF->IrqMask &= ~irqBit; // mask
|
||||
+ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET, regs);
|
||||
+ do_IRQ(isrNumber + INTERNAL_ISR_TABLE_OFFSET);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void irq_dispatch_ext(uint32 irq, struct pt_regs *regs)
|
||||
+static void irq_dispatch_ext(uint32 irq)
|
||||
+{
|
||||
+ if (!(PERF->ExtIrqCfg & (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT)))) {
|
||||
+ printk("**** Ext IRQ mask. Should not dispatch ****\n");
|
||||
@ -6569,7 +6569,7 @@ diff -urN linux.old/arch/mips/bcm963xx/irq.c linux.dev/arch/mips/bcm963xx/irq.c
|
||||
+ /* disable and clear interrupt in the controller */
|
||||
+ PERF->ExtIrqCfg |= (1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_CLEAR_SHFT));
|
||||
+ PERF->ExtIrqCfg &= ~(1 << (irq - INTERRUPT_ID_EXTERNAL_0 + EI_MASK_SHFT));
|
||||
+ do_IRQ(irq, regs);
|
||||
+ do_IRQ(irq);
|
||||
+}
|
||||
+
|
||||
+
|
||||
@ -6584,13 +6584,13 @@ diff -urN linux.old/arch/mips/bcm963xx/irq.c linux.dev/arch/mips/bcm963xx/irq.c
|
||||
+ else if (cause & CAUSEF_IP2)
|
||||
+ irq_dispatch_int(regs);
|
||||
+ else if (cause & CAUSEF_IP3)
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0, regs);
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_0);
|
||||
+ else if (cause & CAUSEF_IP4)
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1, regs);
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_1);
|
||||
+ else if (cause & CAUSEF_IP5)
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2, regs);
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_2);
|
||||
+ else if (cause & CAUSEF_IP6)
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3, regs);
|
||||
+ irq_dispatch_ext(INTERRUPT_ID_EXTERNAL_3);
|
||||
+ local_irq_disable();
|
||||
+ }
|
||||
+}
|
||||
@ -7095,7 +7095,7 @@ diff -urN linux.old/arch/mips/bcm963xx/ser_init.c linux.dev/arch/mips/bcm963xx/s
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/kernel.h>
|
||||
@ -7277,7 +7277,7 @@ diff -urN linux.old/arch/mips/bcm963xx/setup.c linux.dev/arch/mips/bcm963xx/setu
|
||||
+ * Generic setup routines for Broadcom 963xx MIPS boards
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/interrupt.h>
|
||||
+#include <linux/kernel.h>
|
||||
@ -7812,7 +7812,7 @@ diff -urN linux.old/arch/mips/bcm963xx/time.c linux.dev/arch/mips/bcm963xx/time.
|
||||
+ * Setup time for Broadcom 963xx MIPS boards
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/kernel_stat.h>
|
||||
+#include <linux/sched.h>
|
||||
@ -8732,7 +8732,7 @@ diff -urN linux.old/drivers/serial/bcm63xx_cons.c linux.dev/drivers/serial/bcm63
|
||||
+ * ------------------------------------------------------------
|
||||
+ */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
+static irqreturn_t bcm_interrupt (int irq, void * dev, struct pt_regs * regs)
|
||||
+static irqreturn_t bcm_interrupt (int irq, void * dev)
|
||||
+#else
|
||||
+static void bcm_interrupt (int irq, void * dev, struct pt_regs * regs)
|
||||
+#endif
|
||||
|
1191
target/linux/generic-2.6/config-template
Normal file
1191
target/linux/generic-2.6/config-template
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,718 +0,0 @@
|
||||
diff -ur linux-2.6.15-rc5/drivers/mtd/mtd_blkdevs.c linux-2.6.15-rc5-openwrt/drivers/mtd/mtd_blkdevs.c
|
||||
--- linux-2.6.15-rc5/drivers/mtd/mtd_blkdevs.c 2005-12-04 06:10:42.000000000 +0100
|
||||
+++ linux-2.6.15-rc5-openwrt/drivers/mtd/mtd_blkdevs.c 2005-12-15 07:53:20.000000000 +0100
|
||||
@@ -21,6 +21,9 @@
|
||||
#include <linux/init.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include <asm/uaccess.h>
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
+#endif
|
||||
|
||||
static LIST_HEAD(blktrans_majors);
|
||||
|
||||
@@ -302,6 +305,11 @@
|
||||
snprintf(gd->disk_name, sizeof(gd->disk_name),
|
||||
"%s%d", tr->name, new->devnum);
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ snprintf(gd->devfs_name, sizeof(gd->devfs_name),
|
||||
+ "%s/%c", tr->name, (tr->part_bits?'a':'0') + new->devnum);
|
||||
+#endif
|
||||
+
|
||||
/* 2.5 has capacity in units of 512 bytes while still
|
||||
having BLOCK_SIZE_BITS set to 10. Just to keep us amused. */
|
||||
set_capacity(gd, (new->size * new->blksize) >> 9);
|
||||
@@ -418,6 +426,10 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ devfs_mk_dir(tr->name);
|
||||
+#endif
|
||||
+
|
||||
INIT_LIST_HEAD(&tr->devs);
|
||||
list_add(&tr->list, &blktrans_majors);
|
||||
|
||||
@@ -450,6 +462,10 @@
|
||||
tr->remove_dev(dev);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ devfs_remove(tr->name);
|
||||
+#endif
|
||||
+
|
||||
blk_cleanup_queue(tr->blkcore_priv->rq);
|
||||
unregister_blkdev(tr->major, tr->name);
|
||||
|
||||
diff -ur linux-2.6.15-rc5/drivers/mtd/mtdchar.c linux-2.6.15-rc5-openwrt/drivers/mtd/mtdchar.c
|
||||
--- linux-2.6.15-rc5/drivers/mtd/mtdchar.c 2005-12-04 06:10:42.000000000 +0100
|
||||
+++ linux-2.6.15-rc5-openwrt/drivers/mtd/mtdchar.c 2005-12-15 07:49:15.000000000 +0100
|
||||
@@ -19,19 +18,33 @@
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
+#else
|
||||
+#include <linux/device.h>
|
||||
+
|
||||
static struct class *mtd_class;
|
||||
+#endif
|
||||
|
||||
static void mtd_notify_add(struct mtd_info* mtd)
|
||||
{
|
||||
if (!mtd)
|
||||
return;
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ devfs_mk_cdev(MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
|
||||
+ S_IFCHR | S_IRUGO | S_IWUGO, "mtd/%d", mtd->index);
|
||||
+
|
||||
+ devfs_mk_cdev(MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
|
||||
+ S_IFCHR | S_IRUGO, "mtd/%dro", mtd->index);
|
||||
+#else
|
||||
class_device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2),
|
||||
NULL, "mtd%d", mtd->index);
|
||||
|
||||
class_device_create(mtd_class, NULL,
|
||||
MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1),
|
||||
NULL, "mtd%dro", mtd->index);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void mtd_notify_remove(struct mtd_info* mtd)
|
||||
@@ -39,8 +52,13 @@
|
||||
if (!mtd)
|
||||
return;
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ devfs_remove("mtd/%d", mtd->index);
|
||||
+ devfs_remove("mtd/%dro", mtd->index);
|
||||
+#else
|
||||
class_device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2));
|
||||
class_device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1));
|
||||
+#endif
|
||||
}
|
||||
|
||||
static struct mtd_notifier notifier = {
|
||||
@@ -48,6 +66,22 @@
|
||||
.remove = mtd_notify_remove,
|
||||
};
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ static inline void mtdchar_devfs_init(void)
|
||||
+ {
|
||||
+ devfs_mk_dir("mtd");
|
||||
+ register_mtd_user(¬ifier);
|
||||
+ }
|
||||
+ static inline void mtdchar_devfs_exit(void)
|
||||
+ {
|
||||
+ unregister_mtd_user(¬ifier);
|
||||
+ devfs_remove("mtd");
|
||||
+ }
|
||||
+ #else /* !DEVFS */
|
||||
+ #define mtdchar_devfs_init() do { } while(0)
|
||||
+ #define mtdchar_devfs_exit() do { } while(0)
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* We use file->private_data to store a pointer to the MTDdevice.
|
||||
* Since alighment is at least 32 bits, we have 2 bits free for OTP
|
||||
@@ -643,6 +677,9 @@
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ mtdchar_devfs_init();
|
||||
+#else
|
||||
mtd_class = class_create(THIS_MODULE, "mtd");
|
||||
|
||||
if (IS_ERR(mtd_class)) {
|
||||
@@ -652,13 +689,19 @@
|
||||
}
|
||||
|
||||
register_mtd_user(¬ifier);
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit cleanup_mtdchar(void)
|
||||
{
|
||||
+
|
||||
+#ifdef CONFIG_DEVFS_FS
|
||||
+ mtdchar_devfs_exit();
|
||||
+#else
|
||||
unregister_mtd_user(¬ifier);
|
||||
class_destroy(mtd_class);
|
||||
+#endif
|
||||
unregister_chrdev(MTD_CHAR_MAJOR, "mtd");
|
||||
}
|
||||
|
||||
diff -ur linux-2.6.15-rc5/fs/Kconfig linux-2.6.15-rc5-openwrt/fs/Kconfig
|
||||
--- linux-2.6.15-rc5/fs/Kconfig 2005-12-04 06:10:42.000000000 +0100
|
||||
+++ linux-2.6.15-rc5-openwrt/fs/Kconfig 2005-12-15 07:44:01.000000000 +0100
|
||||
@@ -772,6 +772,56 @@
|
||||
help
|
||||
Exports the dump image of crashed kernel in ELF format.
|
||||
|
||||
+config DEVFS_FS
|
||||
+ bool "/dev file system support (OBSOLETE)"
|
||||
+ depends on EXPERIMENTAL
|
||||
+ help
|
||||
+ This is support for devfs, a virtual file system (like /proc) which
|
||||
+ provides the file system interface to device drivers, normally found
|
||||
+ in /dev. Devfs does not depend on major and minor number
|
||||
+ allocations. Device drivers register entries in /dev which then
|
||||
+ appear automatically, which means that the system administrator does
|
||||
+ not have to create character and block special device files in the
|
||||
+ /dev directory using the mknod command (or MAKEDEV script) anymore.
|
||||
+
|
||||
+ This is work in progress. If you want to use this, you *must* read
|
||||
+ the material in <file:Documentation/filesystems/devfs/>, especially
|
||||
+ the file README there.
|
||||
+
|
||||
+ Note that devfs no longer manages /dev/pts! If you are using UNIX98
|
||||
+ ptys, you will also need to mount the /dev/pts filesystem (devpts).
|
||||
+
|
||||
+ Note that devfs has been obsoleted by udev,
|
||||
+ <http://www.kernel.org/pub/linux/utils/kernel/hotplug/>.
|
||||
+ It has been stripped down to a bare minimum and is only provided for
|
||||
+ legacy installations that use its naming scheme which is
|
||||
+ unfortunately different from the names normal Linux installations
|
||||
+ use.
|
||||
+
|
||||
+ If unsure, say N.
|
||||
+
|
||||
+config DEVFS_MOUNT
|
||||
+ bool "Automatically mount at boot"
|
||||
+ depends on DEVFS_FS
|
||||
+ help
|
||||
+ This option appears if you have CONFIG_DEVFS_FS enabled. Setting
|
||||
+ this to 'Y' will make the kernel automatically mount devfs onto /dev
|
||||
+ when the system is booted, before the init thread is started.
|
||||
+ You can override this with the "devfs=nomount" boot option.
|
||||
+
|
||||
+ If unsure, say N.
|
||||
+
|
||||
+config DEVFS_DEBUG
|
||||
+ bool "Debug devfs"
|
||||
+ depends on DEVFS_FS
|
||||
+ help
|
||||
+ If you say Y here, then the /dev file system code will generate
|
||||
+ debugging messages. See the file
|
||||
+ <file:Documentation/filesystems/devfs/boot-options> for more
|
||||
+ details.
|
||||
+
|
||||
+ If unsure, say N.
|
||||
+
|
||||
config SYSFS
|
||||
bool "sysfs file system support" if EMBEDDED
|
||||
default y
|
||||
diff -ur linux-2.6.17/drivers/ieee1394/dv1394.c linux-2.6.17-devfs/drivers/ieee1394/dv1394.c
|
||||
--- linux-2.6.17/drivers/ieee1394/dv1394.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/ieee1394/dv1394.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -73,7 +73,7 @@
|
||||
- fix all XXX showstoppers
|
||||
- disable IR/IT DMA interrupts on shutdown
|
||||
- flush pci writes to the card by issuing a read
|
||||
- - character device dispatching
|
||||
+ - devfs and character device dispatching (* needs testing with Linux 2.2.x)
|
||||
- switch over to the new kernel DMA API (pci_map_*()) (* needs testing on platforms with IOMMU!)
|
||||
- keep all video_cards in a list (for open() via chardev), set file->private_data = video
|
||||
- dv1394_poll should indicate POLLIN when receiving buffers are available
|
||||
@@ -1096,6 +1096,7 @@
|
||||
|
||||
init.api_version = DV1394_API_VERSION;
|
||||
init.n_frames = DV1394_MAX_FRAMES / 4;
|
||||
+ /* the following are now set via devfs */
|
||||
init.channel = video->channel;
|
||||
init.format = video->pal_or_ntsc;
|
||||
init.cip_n = video->cip_n;
|
||||
@@ -1790,6 +1791,8 @@
|
||||
{
|
||||
struct video_card *video = NULL;
|
||||
|
||||
+ /* if the device was opened through devfs, then file->private_data
|
||||
+ has already been set to video by devfs */
|
||||
if (file->private_data) {
|
||||
video = (struct video_card*) file->private_data;
|
||||
|
||||
@@ -2208,7 +2211,7 @@
|
||||
video = kzalloc(sizeof(*video), GFP_KERNEL);
|
||||
if (!video) {
|
||||
printk(KERN_ERR "dv1394: cannot allocate video_card\n");
|
||||
- return -1;
|
||||
+ goto err;
|
||||
}
|
||||
|
||||
video->ohci = ohci;
|
||||
@@ -2263,14 +2266,37 @@
|
||||
list_add_tail(&video->list, &dv1394_cards);
|
||||
spin_unlock_irqrestore(&dv1394_cards_lock, flags);
|
||||
|
||||
+ if (devfs_mk_cdev(MKDEV(IEEE1394_MAJOR,
|
||||
+ IEEE1394_MINOR_BLOCK_DV1394*16 + video->id),
|
||||
+ S_IFCHR|S_IRUGO|S_IWUGO,
|
||||
+ "ieee1394/dv/host%d/%s/%s",
|
||||
+ (video->id>>2),
|
||||
+ (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"),
|
||||
+ (video->mode == MODE_RECEIVE ? "in" : "out")) < 0)
|
||||
+ goto err_free;
|
||||
+
|
||||
debug_printk("dv1394: dv1394_init() OK on ID %d\n", video->id);
|
||||
+
|
||||
return 0;
|
||||
+
|
||||
+ err_free:
|
||||
+ kfree(video);
|
||||
+ err:
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
static void dv1394_un_init(struct video_card *video)
|
||||
{
|
||||
+ char buf[32];
|
||||
+
|
||||
/* obviously nobody has the driver open at this point */
|
||||
do_dv1394_shutdown(video, 1);
|
||||
+ snprintf(buf, sizeof(buf), "dv/host%d/%s/%s", (video->id >> 2),
|
||||
+ (video->pal_or_ntsc == DV1394_NTSC ? "NTSC" : "PAL"),
|
||||
+ (video->mode == MODE_RECEIVE ? "in" : "out")
|
||||
+ );
|
||||
+
|
||||
+ devfs_remove("ieee1394/%s", buf);
|
||||
kfree(video);
|
||||
}
|
||||
|
||||
@@ -2307,6 +2333,9 @@
|
||||
|
||||
class_device_destroy(hpsb_protocol_class,
|
||||
MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)));
|
||||
+ devfs_remove("ieee1394/dv/host%d/NTSC", id);
|
||||
+ devfs_remove("ieee1394/dv/host%d/PAL", id);
|
||||
+ devfs_remove("ieee1394/dv/host%d", id);
|
||||
}
|
||||
|
||||
static void dv1394_add_host (struct hpsb_host *host)
|
||||
@@ -2323,6 +2352,9 @@
|
||||
class_device_create(hpsb_protocol_class, NULL, MKDEV(
|
||||
IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_DV1394 * 16 + (id<<2)),
|
||||
NULL, "dv1394-%d", id);
|
||||
+ devfs_mk_dir("ieee1394/dv/host%d", id);
|
||||
+ devfs_mk_dir("ieee1394/dv/host%d/NTSC", id);
|
||||
+ devfs_mk_dir("ieee1394/dv/host%d/PAL", id);
|
||||
|
||||
dv1394_init(ohci, DV1394_NTSC, MODE_RECEIVE);
|
||||
dv1394_init(ohci, DV1394_NTSC, MODE_TRANSMIT);
|
||||
@@ -2579,8 +2611,10 @@
|
||||
static void __exit dv1394_exit_module(void)
|
||||
{
|
||||
hpsb_unregister_protocol(&dv1394_driver);
|
||||
+
|
||||
hpsb_unregister_highlevel(&dv1394_highlevel);
|
||||
cdev_del(&dv1394_cdev);
|
||||
+ devfs_remove("ieee1394/dv");
|
||||
}
|
||||
|
||||
static int __init dv1394_init_module(void)
|
||||
@@ -2596,12 +2630,15 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ devfs_mk_dir("ieee1394/dv");
|
||||
+
|
||||
hpsb_register_highlevel(&dv1394_highlevel);
|
||||
|
||||
ret = hpsb_register_protocol(&dv1394_driver);
|
||||
if (ret) {
|
||||
printk(KERN_ERR "dv1394: failed to register protocol\n");
|
||||
hpsb_unregister_highlevel(&dv1394_highlevel);
|
||||
+ devfs_remove("ieee1394/dv");
|
||||
cdev_del(&dv1394_cdev);
|
||||
return ret;
|
||||
}
|
||||
diff -ur linux-2.6.17/drivers/ieee1394/ieee1394_core.c linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.c
|
||||
--- linux-2.6.17/drivers/ieee1394/ieee1394_core.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -1078,10 +1078,17 @@
|
||||
goto exit_release_kernel_thread;
|
||||
}
|
||||
|
||||
+ /* actually this is a non-fatal error */
|
||||
+ ret = devfs_mk_dir("ieee1394");
|
||||
+ if (ret < 0) {
|
||||
+ HPSB_ERR("unable to make devfs dir for device major %d!\n", IEEE1394_MAJOR);
|
||||
+ goto release_chrdev;
|
||||
+ }
|
||||
+
|
||||
ret = bus_register(&ieee1394_bus_type);
|
||||
if (ret < 0) {
|
||||
HPSB_INFO("bus register failed");
|
||||
- goto release_chrdev;
|
||||
+ goto release_devfs;
|
||||
}
|
||||
|
||||
for (i = 0; fw_bus_attrs[i]; i++) {
|
||||
@@ -1092,7 +1099,7 @@
|
||||
fw_bus_attrs[i--]);
|
||||
}
|
||||
bus_unregister(&ieee1394_bus_type);
|
||||
- goto release_chrdev;
|
||||
+ goto release_devfs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1145,6 +1152,8 @@
|
||||
for (i = 0; fw_bus_attrs[i]; i++)
|
||||
bus_remove_file(&ieee1394_bus_type, fw_bus_attrs[i]);
|
||||
bus_unregister(&ieee1394_bus_type);
|
||||
+release_devfs:
|
||||
+ devfs_remove("ieee1394");
|
||||
release_chrdev:
|
||||
unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
|
||||
exit_release_kernel_thread:
|
||||
@@ -1182,6 +1191,7 @@
|
||||
hpsb_cleanup_config_roms();
|
||||
|
||||
unregister_chrdev_region(IEEE1394_CORE_DEV, 256);
|
||||
+ devfs_remove("ieee1394");
|
||||
}
|
||||
|
||||
module_init(ieee1394_init);
|
||||
diff -ur linux-2.6.17/drivers/ieee1394/ieee1394_core.h linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.h
|
||||
--- linux-2.6.17/drivers/ieee1394/ieee1394_core.h 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/ieee1394/ieee1394_core.h 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -3,6 +3,7 @@
|
||||
#define _IEEE1394_CORE_H
|
||||
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/semaphore.h>
|
||||
#include "hosts.h"
|
||||
diff -ur linux-2.6.17/drivers/ieee1394/raw1394.c linux-2.6.17-devfs/drivers/ieee1394/raw1394.c
|
||||
--- linux-2.6.17/drivers/ieee1394/raw1394.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/ieee1394/raw1394.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <linux/cdev.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/atomic.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/compat.h>
|
||||
|
||||
#include "csr1212.h"
|
||||
@@ -2998,6 +2999,9 @@
|
||||
goto out_unreg;
|
||||
}
|
||||
|
||||
+ devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, IEEE1394_MINOR_BLOCK_RAW1394 * 16),
|
||||
+ S_IFCHR | S_IRUSR | S_IWUSR, RAW1394_DEVICE_NAME);
|
||||
+
|
||||
cdev_init(&raw1394_cdev, &raw1394_fops);
|
||||
raw1394_cdev.owner = THIS_MODULE;
|
||||
kobject_set_name(&raw1394_cdev.kobj, RAW1394_DEVICE_NAME);
|
||||
@@ -3019,6 +3023,7 @@
|
||||
goto out;
|
||||
|
||||
out_dev:
|
||||
+ devfs_remove(RAW1394_DEVICE_NAME);
|
||||
class_device_destroy(hpsb_protocol_class,
|
||||
MKDEV(IEEE1394_MAJOR,
|
||||
IEEE1394_MINOR_BLOCK_RAW1394 * 16));
|
||||
@@ -3034,6 +3039,7 @@
|
||||
MKDEV(IEEE1394_MAJOR,
|
||||
IEEE1394_MINOR_BLOCK_RAW1394 * 16));
|
||||
cdev_del(&raw1394_cdev);
|
||||
+ devfs_remove(RAW1394_DEVICE_NAME);
|
||||
hpsb_unregister_highlevel(&raw1394_highlevel);
|
||||
hpsb_unregister_protocol(&raw1394_driver);
|
||||
}
|
||||
diff -ur linux-2.6.17/drivers/ieee1394/video1394.c linux-2.6.17-devfs/drivers/ieee1394/video1394.c
|
||||
--- linux-2.6.17/drivers/ieee1394/video1394.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/ieee1394/video1394.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <linux/poll.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/delay.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/vmalloc.h>
|
||||
@@ -1321,6 +1322,9 @@
|
||||
class_device_create(hpsb_protocol_class, NULL, MKDEV(
|
||||
IEEE1394_MAJOR, minor),
|
||||
NULL, "%s-%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
|
||||
+ devfs_mk_cdev(MKDEV(IEEE1394_MAJOR, minor),
|
||||
+ S_IFCHR | S_IRUSR | S_IWUSR,
|
||||
+ "%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
|
||||
}
|
||||
|
||||
|
||||
@@ -1328,9 +1332,12 @@
|
||||
{
|
||||
struct ti_ohci *ohci = hpsb_get_hostinfo(&video1394_highlevel, host);
|
||||
|
||||
- if (ohci)
|
||||
+ if (ohci) {
|
||||
class_device_destroy(hpsb_protocol_class, MKDEV(IEEE1394_MAJOR,
|
||||
IEEE1394_MINOR_BLOCK_VIDEO1394 * 16 + ohci->host->id));
|
||||
+ devfs_remove("%s/%d", VIDEO1394_DRIVER_NAME, ohci->host->id);
|
||||
+ }
|
||||
+
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1471,8 +1478,12 @@
|
||||
static void __exit video1394_exit_module (void)
|
||||
{
|
||||
hpsb_unregister_protocol(&video1394_driver);
|
||||
+
|
||||
hpsb_unregister_highlevel(&video1394_highlevel);
|
||||
+
|
||||
+ devfs_remove(VIDEO1394_DRIVER_NAME);
|
||||
cdev_del(&video1394_cdev);
|
||||
+
|
||||
PRINT_G(KERN_INFO, "Removed " VIDEO1394_DRIVER_NAME " module");
|
||||
}
|
||||
|
||||
@@ -1489,12 +1500,15 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
+ devfs_mk_dir(VIDEO1394_DRIVER_NAME);
|
||||
+
|
||||
hpsb_register_highlevel(&video1394_highlevel);
|
||||
|
||||
ret = hpsb_register_protocol(&video1394_driver);
|
||||
if (ret) {
|
||||
PRINT_G(KERN_ERR, "video1394: failed to register protocol");
|
||||
hpsb_unregister_highlevel(&video1394_highlevel);
|
||||
+ devfs_remove(VIDEO1394_DRIVER_NAME);
|
||||
cdev_del(&video1394_cdev);
|
||||
return ret;
|
||||
}
|
||||
diff -ur linux-2.6.17/drivers/scsi/osst.c linux-2.6.17-devfs/drivers/scsi/osst.c
|
||||
--- linux-2.6.17/drivers/scsi/osst.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/osst.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/moduleparam.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <asm/uaccess.h>
|
||||
@@ -5721,7 +5722,7 @@
|
||||
struct st_partstat * STps;
|
||||
struct osst_buffer * buffer;
|
||||
struct gendisk * drive;
|
||||
- int i, dev_num;
|
||||
+ int i, mode, dev_num;
|
||||
|
||||
if (SDp->type != TYPE_TAPE || !osst_supports(SDp))
|
||||
return -ENODEV;
|
||||
@@ -5857,6 +5858,18 @@
|
||||
snprintf(name, 8, "%s%s", "n", tape_name(tpnt));
|
||||
osst_sysfs_add(MKDEV(OSST_MAJOR, dev_num + 128), dev, tpnt, name);
|
||||
}
|
||||
+ for (mode = 0; mode < ST_NBR_MODES; ++mode) {
|
||||
+ /* Rewind entry */
|
||||
+ devfs_mk_cdev(MKDEV(OSST_MAJOR, dev_num + (mode << 5)),
|
||||
+ S_IFCHR | S_IRUGO | S_IWUGO,
|
||||
+ "%s/ot%s", SDp->devfs_name, osst_formats[mode]);
|
||||
+
|
||||
+ /* No-rewind entry */
|
||||
+ devfs_mk_cdev(MKDEV(OSST_MAJOR, dev_num + (mode << 5) + 128),
|
||||
+ S_IFCHR | S_IRUGO | S_IWUGO,
|
||||
+ "%s/ot%sn", SDp->devfs_name, osst_formats[mode]);
|
||||
+ }
|
||||
+ drive->number = devfs_register_tape(SDp->devfs_name);
|
||||
|
||||
sdev_printk(KERN_INFO, SDp,
|
||||
"osst :I: Attached OnStream %.5s tape as %s\n",
|
||||
@@ -5873,7 +5886,7 @@
|
||||
{
|
||||
struct scsi_device * SDp = to_scsi_device(dev);
|
||||
struct osst_tape * tpnt;
|
||||
- int i;
|
||||
+ int i, mode;
|
||||
|
||||
if ((SDp->type != TYPE_TAPE) || (osst_nr_dev <= 0))
|
||||
return 0;
|
||||
@@ -5884,6 +5897,11 @@
|
||||
osst_sysfs_destroy(MKDEV(OSST_MAJOR, i));
|
||||
osst_sysfs_destroy(MKDEV(OSST_MAJOR, i+128));
|
||||
tpnt->device = NULL;
|
||||
+ for (mode = 0; mode < ST_NBR_MODES; ++mode) {
|
||||
+ devfs_remove("%s/ot%s", SDp->devfs_name, osst_formats[mode]);
|
||||
+ devfs_remove("%s/ot%sn", SDp->devfs_name, osst_formats[mode]);
|
||||
+ }
|
||||
+ devfs_unregister_tape(tpnt->drive->number);
|
||||
put_disk(tpnt->drive);
|
||||
os_scsi_tapes[i] = NULL;
|
||||
osst_nr_dev--;
|
||||
diff -ur linux-2.6.17/drivers/scsi/scsi.c linux-2.6.17-devfs/drivers/scsi/scsi.c
|
||||
--- linux-2.6.17/drivers/scsi/scsi.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/scsi.c 2006-08-25 11:07:42.000000000 -0700
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/completion.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/kmod.h>
|
||||
@@ -1247,6 +1248,7 @@
|
||||
for_each_possible_cpu(i)
|
||||
INIT_LIST_HEAD(&per_cpu(scsi_done_q, i));
|
||||
|
||||
+ devfs_mk_dir("scsi");
|
||||
printk(KERN_NOTICE "SCSI subsystem initialized\n");
|
||||
return 0;
|
||||
|
||||
@@ -1271,6 +1273,7 @@
|
||||
scsi_exit_sysctl();
|
||||
scsi_exit_hosts();
|
||||
scsi_exit_devinfo();
|
||||
+ devfs_remove("scsi");
|
||||
scsi_exit_procfs();
|
||||
scsi_exit_queue();
|
||||
}
|
||||
diff -ur linux-2.6.17/drivers/scsi/scsi_scan.c linux-2.6.17-devfs/drivers/scsi/scsi_scan.c
|
||||
--- linux-2.6.17/drivers/scsi/scsi_scan.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/scsi_scan.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -716,8 +716,12 @@
|
||||
if (inq_result[7] & 0x10)
|
||||
sdev->sdtr = 1;
|
||||
|
||||
+ sprintf(sdev->devfs_name, "scsi/host%d/bus%d/target%d/lun%d",
|
||||
+ sdev->host->host_no, sdev->channel,
|
||||
+ sdev->id, sdev->lun);
|
||||
+
|
||||
/*
|
||||
- * End sysfs code.
|
||||
+ * End driverfs/devfs code.
|
||||
*/
|
||||
|
||||
if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) &&
|
||||
diff -ur linux-2.6.17/drivers/scsi/sd.c linux-2.6.17-devfs/drivers/scsi/sd.c
|
||||
--- linux-2.6.17/drivers/scsi/sd.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/sd.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -1683,6 +1683,8 @@
|
||||
'a' + m1, 'a' + m2, 'a' + m3);
|
||||
}
|
||||
|
||||
+ strcpy(gd->devfs_name, sdp->devfs_name);
|
||||
+
|
||||
gd->private_data = &sdkp->driver;
|
||||
gd->queue = sdkp->device->request_queue;
|
||||
|
||||
diff -ur linux-2.6.17/drivers/scsi/sg.c linux-2.6.17-devfs/drivers/scsi/sg.c
|
||||
--- linux-2.6.17/drivers/scsi/sg.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/sg.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -44,6 +44,7 @@
|
||||
#include <linux/poll.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/moduleparam.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/blkdev.h>
|
||||
@@ -1427,10 +1428,14 @@
|
||||
k = error;
|
||||
sdp = sg_dev_arr[k];
|
||||
|
||||
+ devfs_mk_cdev(MKDEV(SCSI_GENERIC_MAJOR, k),
|
||||
+ S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
|
||||
+ "%s/generic", scsidp->devfs_name);
|
||||
error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, k), 1);
|
||||
- if (error)
|
||||
+ if (error) {
|
||||
+ devfs_remove("%s/generic", scsidp->devfs_name);
|
||||
goto out;
|
||||
-
|
||||
+ }
|
||||
sdp->cdev = cdev;
|
||||
if (sg_sysfs_valid) {
|
||||
struct class_device * sg_class_member;
|
||||
@@ -1520,6 +1525,7 @@
|
||||
class_device_destroy(sg_sysfs_class, MKDEV(SCSI_GENERIC_MAJOR, k));
|
||||
cdev_del(sdp->cdev);
|
||||
sdp->cdev = NULL;
|
||||
+ devfs_remove("%s/generic", scsidp->devfs_name);
|
||||
put_disk(sdp->disk);
|
||||
sdp->disk = NULL;
|
||||
if (NULL == sdp->headfp)
|
||||
diff -ur linux-2.6.17/drivers/scsi/sr.c linux-2.6.17-devfs/drivers/scsi/sr.c
|
||||
--- linux-2.6.17/drivers/scsi/sr.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/sr.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -592,6 +592,8 @@
|
||||
get_capabilities(cd);
|
||||
sr_vendor_init(cd);
|
||||
|
||||
+ snprintf(disk->devfs_name, sizeof(disk->devfs_name),
|
||||
+ "%s/cd", sdev->devfs_name);
|
||||
disk->driverfs_dev = &sdev->sdev_gendev;
|
||||
set_capacity(disk, cd->capacity);
|
||||
disk->private_data = &cd->driver;
|
||||
diff -ur linux-2.6.17/drivers/scsi/st.c linux-2.6.17-devfs/drivers/scsi/st.c
|
||||
--- linux-2.6.17/drivers/scsi/st.c 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/drivers/scsi/st.c 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/blkdev.h>
|
||||
#include <linux/moduleparam.h>
|
||||
+#include <linux/devfs_fs_kernel.h>
|
||||
#include <linux/cdev.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mutex.h>
|
||||
@@ -4053,8 +4054,23 @@
|
||||
do_create_class_files(tpnt, dev_num, mode);
|
||||
}
|
||||
|
||||
+ for (mode = 0; mode < ST_NBR_MODES; ++mode) {
|
||||
+ /* Make sure that the minor numbers corresponding to the four
|
||||
+ first modes always get the same names */
|
||||
+ i = mode << (4 - ST_NBR_MODE_BITS);
|
||||
+ /* Rewind entry */
|
||||
+ devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 0)),
|
||||
+ S_IFCHR | S_IRUGO | S_IWUGO,
|
||||
+ "%s/mt%s", SDp->devfs_name, st_formats[i]);
|
||||
+ /* No-rewind entry */
|
||||
+ devfs_mk_cdev(MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, mode, 1)),
|
||||
+ S_IFCHR | S_IRUGO | S_IWUGO,
|
||||
+ "%s/mt%sn", SDp->devfs_name, st_formats[i]);
|
||||
+ }
|
||||
+ disk->number = devfs_register_tape(SDp->devfs_name);
|
||||
+
|
||||
sdev_printk(KERN_WARNING, SDp,
|
||||
"Attached scsi tape %s\n", tape_name(tpnt));
|
||||
printk(KERN_WARNING "%s: try direct i/o: %s (alignment %d B)\n",
|
||||
tape_name(tpnt), tpnt->try_dio ? "yes" : "no",
|
||||
queue_dma_alignment(SDp->request_queue) + 1);
|
||||
@@ -4106,9 +4122,13 @@
|
||||
scsi_tapes[i] = NULL;
|
||||
st_nr_dev--;
|
||||
write_unlock(&st_dev_arr_lock);
|
||||
+ devfs_unregister_tape(tpnt->disk->number);
|
||||
sysfs_remove_link(&tpnt->device->sdev_gendev.kobj,
|
||||
"tape");
|
||||
for (mode = 0; mode < ST_NBR_MODES; ++mode) {
|
||||
+ j = mode << (4 - ST_NBR_MODE_BITS);
|
||||
+ devfs_remove("%s/mt%s", SDp->devfs_name, st_formats[j]);
|
||||
+ devfs_remove("%s/mt%sn", SDp->devfs_name, st_formats[j]);
|
||||
for (j=0; j < 2; j++) {
|
||||
class_device_destroy(st_sysfs_class,
|
||||
MKDEV(SCSI_TAPE_MAJOR,
|
||||
diff -ur linux-2.6.17/include/scsi/scsi_device.h linux-2.6.17-devfs/include/scsi/scsi_device.h
|
||||
--- linux-2.6.17/include/scsi/scsi_device.h 2006-06-17 18:49:35.000000000 -0700
|
||||
+++ linux-2.6.17-devfs/include/scsi/scsi_device.h 2006-08-25 11:06:18.000000000 -0700
|
||||
@@ -74,6 +74,7 @@
|
||||
unsigned sector_size; /* size in bytes */
|
||||
|
||||
void *hostdata; /* available to low-level driver */
|
||||
+ char devfs_name[256]; /* devfs junk */
|
||||
char type;
|
||||
char scsi_level;
|
||||
char inq_periph_qual; /* PQ from INQUIRY data */
|
12377
target/linux/generic-2.6/patches/000-reinstate-devfs.patch
Normal file
12377
target/linux/generic-2.6/patches/000-reinstate-devfs.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
diff --new-file -urp linux-2.6.15/fs/Kconfig linux-2.6.15-squashfs3.0/fs/Kconfig
|
||||
--- linux-2.6.15/fs/Kconfig 2006-03-01 22:37:27.000000000 +0000
|
||||
+++ linux-2.6.15-squashfs3.0/fs/Kconfig 2006-03-07 21:12:37.000000000 +0000
|
||||
@@ -1151,6 +1151,71 @@ config CRAMFS
|
||||
diff -urN linux-2.6.19.old/fs/Kconfig linux-2.6.19.dev/fs/Kconfig
|
||||
--- linux-2.6.19.old/fs/Kconfig 2006-12-14 03:13:16.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/Kconfig 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -1457,6 +1457,71 @@
|
||||
|
||||
If unsure, say N.
|
||||
|
||||
@ -32,7 +32,7 @@ diff --new-file -urp linux-2.6.15/fs/Kconfig linux-2.6.15-squashfs3.0/fs/Kconfig
|
||||
+
|
||||
+config SQUASHFS_EMBEDDED
|
||||
+
|
||||
+ bool "Additional options for memory-constrained systems"
|
||||
+ bool "Additional options for memory-constrained systems"
|
||||
+ depends on SQUASHFS
|
||||
+ default n
|
||||
+ help
|
||||
@ -72,22 +72,22 @@ diff --new-file -urp linux-2.6.15/fs/Kconfig linux-2.6.15-squashfs3.0/fs/Kconfig
|
||||
+
|
||||
config VXFS_FS
|
||||
tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
|
||||
help
|
||||
diff --new-file -urp linux-2.6.15/fs/Makefile linux-2.6.15-squashfs3.0/fs/Makefile
|
||||
--- linux-2.6.15/fs/Makefile 2006-03-01 22:37:27.000000000 +0000
|
||||
+++ linux-2.6.15-squashfs3.0/fs/Makefile 2006-03-07 21:12:37.000000000 +0000
|
||||
@@ -55,6 +55,7 @@ obj-$(CONFIG_EXT3_FS) += ext3/ # Before
|
||||
obj-$(CONFIG_JBD) += jbd/
|
||||
depends on BLOCK
|
||||
diff -urN linux-2.6.19.old/fs/Makefile linux-2.6.19.dev/fs/Makefile
|
||||
--- linux-2.6.19.old/fs/Makefile 2006-12-14 03:13:16.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/Makefile 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -67,6 +67,7 @@
|
||||
obj-$(CONFIG_JBD2) += jbd2/
|
||||
obj-$(CONFIG_EXT2_FS) += ext2/
|
||||
obj-$(CONFIG_CRAMFS) += cramfs/
|
||||
+obj-$(CONFIG_SQUASHFS) += squashfs/
|
||||
obj-$(CONFIG_RAMFS) += ramfs/
|
||||
obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
|
||||
obj-$(CONFIG_CODA_FS) += coda/
|
||||
diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/fs/squashfs/inode.c
|
||||
--- linux-2.6.15/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/fs/squashfs/inode.c 2006-03-07 21:12:37.000000000 +0000
|
||||
@@ -0,0 +1,2127 @@
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/inode.c linux-2.6.19.dev/fs/squashfs/inode.c
|
||||
--- linux-2.6.19.old/fs/squashfs/inode.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/inode.c 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,2124 @@
|
||||
+/*
|
||||
+ * Squashfs - a compressed read only filesystem for Linux
|
||||
+ *
|
||||
@ -135,7 +135,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+#include "squashfs.h"
|
||||
+
|
||||
+static void squashfs_put_super(struct super_block *);
|
||||
+static int squashfs_statfs(struct super_block *, struct kstatfs *);
|
||||
+static int squashfs_statfs(struct dentry *, struct kstatfs *);
|
||||
+static int squashfs_symlink_readpage(struct file *file, struct page *page);
|
||||
+static int squashfs_readpage(struct file *file, struct page *page);
|
||||
+static int squashfs_readpage4K(struct file *file, struct page *page);
|
||||
@ -150,8 +150,8 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+static long long read_blocklist(struct inode *inode, int index,
|
||||
+ int readahead_blks, char *block_list,
|
||||
+ unsigned short **block_p, unsigned int *bsize);
|
||||
+static struct super_block *squashfs_get_sb(struct file_system_type *, int,
|
||||
+ const char *, void *);
|
||||
+static int squashfs_get_sb(struct file_system_type *, int,
|
||||
+ const char *, void *, struct vfsmount *);
|
||||
+
|
||||
+
|
||||
+static z_stream stream;
|
||||
@ -219,10 +219,10 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ goto out;
|
||||
+ if (msblk->swap)
|
||||
+ ((unsigned char *) &temp)[0] = *((unsigned char *)
|
||||
+ bh->b_data);
|
||||
+ bh->b_data);
|
||||
+ else
|
||||
+ ((unsigned char *) &temp)[1] = *((unsigned char *)
|
||||
+ bh->b_data);
|
||||
+ bh->b_data);
|
||||
+ *c_byte = temp;
|
||||
+ *offset = 1;
|
||||
+ } else {
|
||||
@ -230,12 +230,12 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ ((unsigned char *) &temp)[1] = *((unsigned char *)
|
||||
+ (bh->b_data + *offset));
|
||||
+ ((unsigned char *) &temp)[0] = *((unsigned char *)
|
||||
+ (bh->b_data + *offset + 1));
|
||||
+ (bh->b_data + *offset + 1));
|
||||
+ } else {
|
||||
+ ((unsigned char *) &temp)[0] = *((unsigned char *)
|
||||
+ (bh->b_data + *offset));
|
||||
+ ((unsigned char *) &temp)[1] = *((unsigned char *)
|
||||
+ (bh->b_data + *offset + 1));
|
||||
+ (bh->b_data + *offset + 1));
|
||||
+ }
|
||||
+ *c_byte = temp;
|
||||
+ *offset += 2;
|
||||
@ -353,7 +353,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ bytes = 0;
|
||||
+ } else
|
||||
+ bytes = stream.total_out;
|
||||
+
|
||||
+
|
||||
+ up(&msblk->read_data_mutex);
|
||||
+ }
|
||||
+
|
||||
@ -385,10 +385,10 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ TRACE("Entered squashfs_get_cached_block [%llx:%x]\n", block, offset);
|
||||
+
|
||||
+ while ( 1 ) {
|
||||
+ for (i = 0; i < SQUASHFS_CACHED_BLKS; i++)
|
||||
+ for (i = 0; i < SQUASHFS_CACHED_BLKS; i++)
|
||||
+ if (msblk->block_cache[i].block == block)
|
||||
+ break;
|
||||
+
|
||||
+ break;
|
||||
+
|
||||
+ down(&msblk->block_cache_mutex);
|
||||
+
|
||||
+ if (i == SQUASHFS_CACHED_BLKS) {
|
||||
@ -425,7 +425,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ goto out;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ msblk->block_cache[i].block = SQUASHFS_USED_BLK;
|
||||
+ up(&msblk->block_cache_mutex);
|
||||
+
|
||||
@ -564,7 +564,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ }
|
||||
+ msblk->next_fragment = (msblk->next_fragment + 1) %
|
||||
+ SQUASHFS_CACHED_FRAGMENTS;
|
||||
+
|
||||
+
|
||||
+ if (msblk->fragment[i].data == NULL)
|
||||
+ if (!(msblk->fragment[i].data = SQUASHFS_ALLOC
|
||||
+ (SQUASHFS_FILE_MAX_SIZE))) {
|
||||
@ -668,7 +668,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ long long frag_blk;
|
||||
+ struct squashfs_reg_inode_header *inodep = &id.reg;
|
||||
+ struct squashfs_reg_inode_header *sinodep = &sid.reg;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ sinodep, block, offset,
|
||||
@ -688,7 +688,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ !get_fragment_location(s,
|
||||
+ inodep->fragment, &frag_blk, &frag_size))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ if((i = squashfs_new_inode(s, inodeb)) == NULL)
|
||||
+ goto failed_read1;
|
||||
+
|
||||
@ -697,7 +697,6 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ i->i_fop = &generic_ro_fops;
|
||||
+ i->i_mode |= S_IFREG;
|
||||
+ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
|
||||
+ i->i_blksize = PAGE_CACHE_SIZE;
|
||||
+ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
|
||||
+ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
|
||||
+ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
|
||||
@ -721,7 +720,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ long long frag_blk;
|
||||
+ struct squashfs_lreg_inode_header *inodep = &id.lreg;
|
||||
+ struct squashfs_lreg_inode_header *sinodep = &sid.lreg;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ sinodep, block, offset,
|
||||
@ -741,7 +740,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ !get_fragment_location(s,
|
||||
+ inodep->fragment, &frag_blk, &frag_size))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ if((i = squashfs_new_inode(s, inodeb)) == NULL)
|
||||
+ goto failed_read1;
|
||||
+
|
||||
@ -750,7 +749,6 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ i->i_fop = &generic_ro_fops;
|
||||
+ i->i_mode |= S_IFREG;
|
||||
+ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
|
||||
+ i->i_blksize = PAGE_CACHE_SIZE;
|
||||
+ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
|
||||
+ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
|
||||
+ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
|
||||
@ -853,7 +851,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ &id.symlink;
|
||||
+ struct squashfs_symlink_inode_header *sinodep =
|
||||
+ &sid.symlink;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ sinodep, block, offset,
|
||||
@ -898,7 +896,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+ SQUASHFS_SWAP_DEV_INODE_HEADER(inodep, sinodep);
|
||||
+ } else
|
||||
+ } else
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ inodep, block, offset,
|
||||
+ sizeof(*inodep), &next_block,
|
||||
@ -932,7 +930,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+ SQUASHFS_SWAP_IPC_INODE_HEADER(inodep, sinodep);
|
||||
+ } else
|
||||
+ } else
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ inodep, block, offset,
|
||||
+ sizeof(*inodep), &next_block,
|
||||
@ -953,7 +951,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ inodeb->inode_type);
|
||||
+ goto failed_read1;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ insert_inode_hash(i);
|
||||
+ return i;
|
||||
+
|
||||
@ -976,7 +974,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ ERROR("Failed to allocate uid/gid table\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (SQUASHFS_FRAGMENT_INDEX_BYTES(sblk->fragments) &&
|
||||
+ !squashfs_read_data(s, (char *)
|
||||
+ msblk->fragment_index,
|
||||
@ -1058,7 +1056,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ memset(s->s_fs_info, 0, sizeof(struct squashfs_sb_info));
|
||||
+ msblk = s->s_fs_info;
|
||||
+ sblk = &msblk->sblk;
|
||||
+
|
||||
+
|
||||
+ msblk->devblksize = sb_min_blocksize(s, BLOCK_SIZE);
|
||||
+ msblk->devblksize_log2 = ffz(~msblk->devblksize);
|
||||
+
|
||||
@ -1067,7 +1065,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ init_MUTEX(&msblk->block_cache_mutex);
|
||||
+ init_MUTEX(&msblk->fragment_mutex);
|
||||
+ init_MUTEX(&msblk->meta_index_mutex);
|
||||
+
|
||||
+
|
||||
+ init_waitqueue_head(&msblk->waitq);
|
||||
+ init_waitqueue_head(&msblk->fragment_wait_queue);
|
||||
+
|
||||
@ -1163,7 +1161,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ goto failed_mount;
|
||||
+ }
|
||||
+ msblk->guid = msblk->uid + sblk->no_uids;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ unsigned int suid[sblk->no_uids + sblk->no_guids];
|
||||
+
|
||||
@ -1238,9 +1236,9 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int squashfs_statfs(struct super_block *s, struct kstatfs *buf)
|
||||
+static int squashfs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
||||
+{
|
||||
+ struct squashfs_sb_info *msblk = s->s_fs_info;
|
||||
+ struct squashfs_sb_info *msblk = dentry->d_inode->i_sb->s_fs_info;
|
||||
+ struct squashfs_super_block *sblk = &msblk->sblk;
|
||||
+
|
||||
+ TRACE("Entered squashfs_statfs\n");
|
||||
@ -1402,7 +1400,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ struct squashfs_sb_info *msblk = s->s_fs_info;
|
||||
+ unsigned int *block_listp;
|
||||
+ int block = 0;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ char sblock_list[blocks << 2];
|
||||
+
|
||||
@ -1455,7 +1453,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ int cur_offset = SQUASHFS_I(inode)->offset;
|
||||
+ long long cur_data_block = SQUASHFS_I(inode)->start_block;
|
||||
+ int i;
|
||||
+
|
||||
+
|
||||
+ index /= SQUASHFS_META_INDEXES * skip;
|
||||
+
|
||||
+ while ( offset < index ) {
|
||||
@ -1578,7 +1576,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ void *pageaddr;
|
||||
+ struct squashfs_fragment_cache *fragment = NULL;
|
||||
+ char *data_ptr = msblk->read_page;
|
||||
+
|
||||
+
|
||||
+ int mask = (1 << (sblk->block_log - PAGE_CACHE_SHIFT)) - 1;
|
||||
+ int start_index = page->index & ~mask;
|
||||
+ int end_index = start_index | mask;
|
||||
@ -1599,7 +1597,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ goto skip_read;
|
||||
+
|
||||
+ down(&msblk->read_page_mutex);
|
||||
+
|
||||
+
|
||||
+ if (!(bytes = squashfs_read_data(inode->i_sb, msblk->read_page,
|
||||
+ block, bsize, NULL))) {
|
||||
+ ERROR("Unable to read page, block %llx, size %x\n", block,
|
||||
@ -1692,7 +1690,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ long long block;
|
||||
+ unsigned int bsize, bytes = 0;
|
||||
+ void *pageaddr;
|
||||
+
|
||||
+
|
||||
+ TRACE("Entered squashfs_readpage4K, page index %lx, start block %llx\n",
|
||||
+ page->index,
|
||||
+ SQUASHFS_I(inode)->start_block);
|
||||
@ -1749,7 +1747,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int get_dir_index_using_offset(struct super_block *s, long long
|
||||
+static int get_dir_index_using_offset(struct super_block *s, long long
|
||||
+ *next_block, unsigned int *next_offset,
|
||||
+ long long index_start,
|
||||
+ unsigned int index_offset, int i_count,
|
||||
@ -1848,7 +1846,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ return length + 3;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
|
||||
+{
|
||||
+ struct inode *i = file->f_dentry->d_inode;
|
||||
@ -1902,7 +1900,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ /* read directory header */
|
||||
+ if (msblk->swap) {
|
||||
+ struct squashfs_dir_header sdirh;
|
||||
+
|
||||
+
|
||||
+ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
|
||||
+ next_block, next_offset, sizeof(sdirh),
|
||||
+ &next_block, &next_offset))
|
||||
@ -1928,7 +1926,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ sizeof(sdire), &next_block,
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ length += sizeof(sdire);
|
||||
+ SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
|
||||
+ } else {
|
||||
@ -2040,7 +2038,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ sizeof(sdire), &next_block,
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ length += sizeof(sdire);
|
||||
+ SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
|
||||
+ } else {
|
||||
@ -2104,7 +2102,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ SQUASHFS_INVALID_BLK)
|
||||
+ kfree(sbi->block_cache[i].data);
|
||||
+ if (sbi->fragment)
|
||||
+ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++)
|
||||
+ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++)
|
||||
+ SQUASHFS_FREE(sbi->fragment[i].data);
|
||||
+ kfree(sbi->fragment);
|
||||
+ kfree(sbi->block_cache);
|
||||
@ -2120,10 +2118,11 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static struct super_block *squashfs_get_sb(struct file_system_type *fs_type,
|
||||
+ int flags, const char *dev_name, void *data)
|
||||
+static int squashfs_get_sb(struct file_system_type *fs_type,
|
||||
+ int flags, const char *dev_name, void *data,
|
||||
+ struct vfsmount *mnt)
|
||||
+{
|
||||
+ return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super);
|
||||
+ return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super, mnt);
|
||||
+}
|
||||
+
|
||||
+
|
||||
@ -2188,7 +2187,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+ SLAB_CTOR_CONSTRUCTOR)
|
||||
+ inode_init_once(&ei->vfs_inode);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static int __init init_inodecache(void)
|
||||
+{
|
||||
@ -2204,9 +2203,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+
|
||||
+static void destroy_inodecache(void)
|
||||
+{
|
||||
+ if (kmem_cache_destroy(squashfs_inode_cachep))
|
||||
+ printk(KERN_INFO "squashfs_inode_cache: not all structures "
|
||||
+ "were freed\n");
|
||||
+ kmem_cache_destroy(squashfs_inode_cachep);
|
||||
+}
|
||||
+
|
||||
+
|
||||
@ -2215,9 +2212,9 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/inode.c linux-2.6.15-squashfs3.0/f
|
||||
+MODULE_DESCRIPTION("squashfs, a compressed read-only filesystem");
|
||||
+MODULE_AUTHOR("Phillip Lougher <phillip@lougher.org.uk>");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff --new-file -urp linux-2.6.15/fs/squashfs/Makefile linux-2.6.15-squashfs3.0/fs/squashfs/Makefile
|
||||
--- linux-2.6.15/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/fs/squashfs/Makefile 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/Makefile linux-2.6.19.dev/fs/squashfs/Makefile
|
||||
--- linux-2.6.19.old/fs/squashfs/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/Makefile 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,7 @@
|
||||
+#
|
||||
+# Makefile for the linux squashfs routines.
|
||||
@ -2226,9 +2223,9 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/Makefile linux-2.6.15-squashfs3.0/
|
||||
+obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
+squashfs-y += inode.o
|
||||
+squashfs-y += squashfs2_0.o
|
||||
diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashfs3.0/fs/squashfs/squashfs2_0.c
|
||||
--- linux-2.6.15/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/fs/squashfs/squashfs2_0.c 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/squashfs2_0.c linux-2.6.19.dev/fs/squashfs/squashfs2_0.c
|
||||
--- linux-2.6.19.old/fs/squashfs/squashfs2_0.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/squashfs2_0.c 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,758 @@
|
||||
+/*
|
||||
+ * Squashfs - a compressed read only filesystem for Linux
|
||||
@ -2302,7 +2299,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ ERROR("Failed to allocate uid/gid table\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (SQUASHFS_FRAGMENT_INDEX_BYTES_2(sblk->fragments) &&
|
||||
+ !squashfs_read_data(s, (char *)
|
||||
+ msblk->fragment_index_2,
|
||||
@ -2429,7 +2426,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ struct squashfs_reg_inode_header_2 *sinodep = &sid.reg;
|
||||
+ long long frag_blk;
|
||||
+ unsigned int frag_size;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ sinodep, block, offset,
|
||||
@ -2449,7 +2446,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ !get_fragment_location_2(s,
|
||||
+ inodep->fragment, &frag_blk, &frag_size))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ if((i = squashfs_new_inode(s, inodeb, ino)) == NULL)
|
||||
+ goto failed_read1;
|
||||
+
|
||||
@ -2567,7 +2564,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ &id.symlink;
|
||||
+ struct squashfs_symlink_inode_header_2 *sinodep =
|
||||
+ &sid.symlink;
|
||||
+
|
||||
+
|
||||
+ if (msblk->swap) {
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ sinodep, block, offset,
|
||||
@ -2611,7 +2608,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+ SQUASHFS_SWAP_DEV_INODE_HEADER_2(inodep, sinodep);
|
||||
+ } else
|
||||
+ } else
|
||||
+ if (!squashfs_get_cached_block(s, (char *)
|
||||
+ inodep, block, offset,
|
||||
+ sizeof(*inodep), &next_block,
|
||||
@ -2647,7 +2644,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ inodeb->inode_type);
|
||||
+ goto failed_read1;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ insert_inode_hash(i);
|
||||
+ return i;
|
||||
+
|
||||
@ -2659,7 +2656,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static int get_dir_index_using_offset(struct super_block *s, long long
|
||||
+static int get_dir_index_using_offset(struct super_block *s, long long
|
||||
+ *next_block, unsigned int *next_offset,
|
||||
+ long long index_start,
|
||||
+ unsigned int index_offset, int i_count,
|
||||
@ -2757,7 +2754,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ return length;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir)
|
||||
+{
|
||||
+ struct inode *i = file->f_dentry->d_inode;
|
||||
@ -2783,7 +2780,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ /* read directory header */
|
||||
+ if (msblk->swap) {
|
||||
+ struct squashfs_dir_header_2 sdirh;
|
||||
+
|
||||
+
|
||||
+ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
|
||||
+ next_block, next_offset, sizeof(sdirh),
|
||||
+ &next_block, &next_offset))
|
||||
@ -2809,7 +2806,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ sizeof(sdire), &next_block,
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ length += sizeof(sdire);
|
||||
+ SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire);
|
||||
+ } else {
|
||||
@ -2921,7 +2918,7 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+ sizeof(sdire), &next_block,
|
||||
+ &next_offset))
|
||||
+ goto failed_read;
|
||||
+
|
||||
+
|
||||
+ length += sizeof(sdire);
|
||||
+ SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire);
|
||||
+ } else {
|
||||
@ -2988,9 +2985,9 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs2_0.c linux-2.6.15-squashf
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs.h linux-2.6.15-squashfs3.0/fs/squashfs/squashfs.h
|
||||
--- linux-2.6.15/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/fs/squashfs/squashfs.h 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/squashfs.h linux-2.6.19.dev/fs/squashfs/squashfs.h
|
||||
--- linux-2.6.19.old/fs/squashfs/squashfs.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/squashfs.h 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,86 @@
|
||||
+/*
|
||||
+ * Squashfs - a compressed read only filesystem for Linux
|
||||
@ -3078,9 +3075,9 @@ diff --new-file -urp linux-2.6.15/fs/squashfs/squashfs.h linux-2.6.15-squashfs3.
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squashfs3.0/include/linux/squashfs_fs.h
|
||||
--- linux-2.6.15/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/include/linux/squashfs_fs.h 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/include/linux/squashfs_fs.h linux-2.6.19.dev/include/linux/squashfs_fs.h
|
||||
--- linux-2.6.19.old/include/linux/squashfs_fs.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/squashfs_fs.h 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,911 @@
|
||||
+#ifndef SQUASHFS_FS
|
||||
+#define SQUASHFS_FS
|
||||
@ -3119,7 +3116,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+#define SQUASHFS_ALLOC(a) kmalloc(a, GFP_KERNEL)
|
||||
+#define SQUASHFS_FREE(a) kfree(a)
|
||||
+#endif
|
||||
+#define SQUASHFS_CACHED_FRAGMENTS CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE
|
||||
+#define SQUASHFS_CACHED_FRAGMENTS CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE
|
||||
+#define SQUASHFS_MAJOR 3
|
||||
+#define SQUASHFS_MINOR 0
|
||||
+#define SQUASHFS_MAGIC 0x73717368
|
||||
@ -3351,7 +3348,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+ unsigned int nlink;
|
||||
+ unsigned short rdev;
|
||||
+} __attribute__ ((packed));
|
||||
+
|
||||
+
|
||||
+struct squashfs_symlink_inode_header {
|
||||
+ SQUASHFS_BASE_INODE_HEADER;
|
||||
+ unsigned int nlink;
|
||||
@ -3408,7 +3405,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+ struct squashfs_ldir_inode_header ldir;
|
||||
+ struct squashfs_ipc_inode_header ipc;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+struct squashfs_dir_entry {
|
||||
+ unsigned int offset:13;
|
||||
+ unsigned int type:3;
|
||||
@ -3658,7 +3655,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+ unsigned int guid:4; /* index into guid table */
|
||||
+ unsigned short rdev;
|
||||
+} __attribute__ ((packed));
|
||||
+
|
||||
+
|
||||
+struct squashfs_symlink_inode_header_1 {
|
||||
+ unsigned int inode_type:4;
|
||||
+ unsigned int mode:12; /* protection */
|
||||
@ -3775,7 +3772,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+ unsigned int guid:8; /* index into guid table */
|
||||
+ unsigned short rdev;
|
||||
+} __attribute__ ((packed));
|
||||
+
|
||||
+
|
||||
+struct squashfs_symlink_inode_header_2 {
|
||||
+ unsigned int inode_type:4;
|
||||
+ unsigned int mode:12; /* protection */
|
||||
@ -3831,7 +3828,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+ struct squashfs_ldir_inode_header_2 ldir;
|
||||
+ struct squashfs_ipc_inode_header_2 ipc;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+struct squashfs_dir_header_2 {
|
||||
+ unsigned int count:8;
|
||||
+ unsigned int start_block:24;
|
||||
@ -3974,7 +3971,7 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \
|
||||
+ tbits, b_pos)
|
||||
+#else
|
||||
+ /* convert from big endian to little endian */
|
||||
+ /* convert from big endian to little endian */
|
||||
+#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \
|
||||
+ tbits, 64 - tbits - b_pos)
|
||||
+#endif
|
||||
@ -3993,9 +3990,9 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs.h linux-2.6.15-squas
|
||||
+
|
||||
+#endif
|
||||
+#endif
|
||||
diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs_i.h linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_i.h
|
||||
--- linux-2.6.15/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_i.h 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/include/linux/squashfs_fs_i.h linux-2.6.19.dev/include/linux/squashfs_fs_i.h
|
||||
--- linux-2.6.19.old/include/linux/squashfs_fs_i.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/squashfs_fs_i.h 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,45 @@
|
||||
+#ifndef SQUASHFS_FS_I
|
||||
+#define SQUASHFS_FS_I
|
||||
@ -4042,9 +4039,9 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs_i.h linux-2.6.15-squ
|
||||
+ struct inode vfs_inode;
|
||||
+};
|
||||
+#endif
|
||||
diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs_sb.h linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_sb.h
|
||||
--- linux-2.6.15/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-squashfs3.0/include/linux/squashfs_fs_sb.h 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/include/linux/squashfs_fs_sb.h linux-2.6.19.dev/include/linux/squashfs_fs_sb.h
|
||||
--- linux-2.6.19.old/include/linux/squashfs_fs_sb.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/squashfs_fs_sb.h 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -0,0 +1,74 @@
|
||||
+#ifndef SQUASHFS_FS_SB
|
||||
+#define SQUASHFS_FS_SB
|
||||
@ -4120,9 +4117,9 @@ diff --new-file -urp linux-2.6.15/include/linux/squashfs_fs_sb.h linux-2.6.15-sq
|
||||
+ int (*read_fragment_index_table)(struct super_block *s);
|
||||
+};
|
||||
+#endif
|
||||
diff --new-file -urp linux-2.6.15/init/do_mounts_rd.c linux-2.6.15-squashfs3.0/init/do_mounts_rd.c
|
||||
--- linux-2.6.15/init/do_mounts_rd.c 2006-03-01 22:37:27.000000000 +0000
|
||||
+++ linux-2.6.15-squashfs3.0/init/do_mounts_rd.c 2006-03-07 21:12:37.000000000 +0000
|
||||
diff -urN linux-2.6.19.old/init/do_mounts_rd.c linux-2.6.19.dev/init/do_mounts_rd.c
|
||||
--- linux-2.6.19.old/init/do_mounts_rd.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/init/do_mounts_rd.c 2006-12-14 03:13:16.000000000 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <linux/ext2_fs.h>
|
||||
#include <linux/romfs_fs.h>
|
||||
@ -4131,7 +4128,7 @@ diff --new-file -urp linux-2.6.15/init/do_mounts_rd.c linux-2.6.15-squashfs3.0/i
|
||||
#include <linux/initrd.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
@@ -39,6 +40,7 @@ static int __init crd_load(int in_fd, in
|
||||
@@ -39,6 +40,7 @@
|
||||
* numbers could not be found.
|
||||
*
|
||||
* We currently check for the following magic numbers:
|
||||
@ -4139,7 +4136,7 @@ diff --new-file -urp linux-2.6.15/init/do_mounts_rd.c linux-2.6.15-squashfs3.0/i
|
||||
* minix
|
||||
* ext2
|
||||
* romfs
|
||||
@@ -53,6 +55,7 @@ identify_ramdisk_image(int fd, int start
|
||||
@@ -53,6 +55,7 @@
|
||||
struct ext2_super_block *ext2sb;
|
||||
struct romfs_super_block *romfsb;
|
||||
struct cramfs_super *cramfsb;
|
||||
@ -4147,7 +4144,7 @@ diff --new-file -urp linux-2.6.15/init/do_mounts_rd.c linux-2.6.15-squashfs3.0/i
|
||||
int nblocks = -1;
|
||||
unsigned char *buf;
|
||||
|
||||
@@ -64,6 +67,7 @@ identify_ramdisk_image(int fd, int start
|
||||
@@ -64,6 +67,7 @@
|
||||
ext2sb = (struct ext2_super_block *) buf;
|
||||
romfsb = (struct romfs_super_block *) buf;
|
||||
cramfsb = (struct cramfs_super *) buf;
|
||||
@ -4155,7 +4152,7 @@ diff --new-file -urp linux-2.6.15/init/do_mounts_rd.c linux-2.6.15-squashfs3.0/i
|
||||
memset(buf, 0xe5, size);
|
||||
|
||||
/*
|
||||
@@ -101,6 +105,15 @@ identify_ramdisk_image(int fd, int start
|
||||
@@ -101,6 +105,15 @@
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
|
||||
--- linux-2.6.16/fs/squashfs/inode.c 2006-03-21 10:55:59.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/fs/squashfs/inode.c 2006-03-21 12:24:37.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/inode.c linux-2.6.19.dev/fs/squashfs/inode.c
|
||||
--- linux-2.6.19.old/fs/squashfs/inode.c 2006-12-14 03:13:20.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/inode.c 2006-12-14 03:13:20.000000000 +0100
|
||||
@@ -4,6 +4,9 @@
|
||||
* Copyright (c) 2002, 2003, 2004, 2005, 2006
|
||||
* Phillip Lougher <phillip@lougher.org.uk>
|
||||
@ -37,10 +37,10 @@ diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
|
||||
+#endif
|
||||
+
|
||||
static void squashfs_put_super(struct super_block *);
|
||||
static int squashfs_statfs(struct super_block *, struct kstatfs *);
|
||||
static int squashfs_statfs(struct dentry *, struct kstatfs *);
|
||||
static int squashfs_symlink_readpage(struct file *file, struct page *page);
|
||||
@@ -64,7 +81,11 @@
|
||||
const char *, void *);
|
||||
const char *, void *, struct vfsmount *);
|
||||
|
||||
|
||||
+#ifdef SQUASHFS_LZMA
|
||||
@ -56,8 +56,8 @@ diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
|
||||
int zlib_err;
|
||||
|
||||
+#ifdef SQUASHFS_LZMA
|
||||
+ if ((zlib_err = LzmaDecode(lzma_workspace,
|
||||
+ LZMA_WORKSPACE_SIZE, LZMA_LC, LZMA_LP, LZMA_PB,
|
||||
+ if ((zlib_err = LzmaDecode(lzma_workspace,
|
||||
+ LZMA_WORKSPACE_SIZE, LZMA_LC, LZMA_LP, LZMA_PB,
|
||||
+ c_buffer, c_byte, buffer, msblk->read_size, &bytes)) != LZMA_RESULT_OK)
|
||||
+ {
|
||||
+ ERROR("lzma returned unexpected result 0x%x\n", zlib_err);
|
||||
@ -67,15 +67,16 @@ diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
|
||||
stream.next_in = c_buffer;
|
||||
stream.avail_in = c_byte;
|
||||
stream.next_out = buffer;
|
||||
@@ -263,6 +293,7 @@
|
||||
@@ -263,7 +293,7 @@
|
||||
bytes = 0;
|
||||
} else
|
||||
bytes = stream.total_out;
|
||||
-
|
||||
+#endif
|
||||
|
||||
up(&msblk->read_data_mutex);
|
||||
}
|
||||
@@ -2046,15 +2077,19 @@
|
||||
|
||||
@@ -2045,15 +2075,19 @@
|
||||
printk(KERN_INFO "squashfs: version 3.0 (2006/03/15) "
|
||||
"Phillip Lougher\n");
|
||||
|
||||
@ -95,7 +96,7 @@ diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
|
||||
destroy_inodecache();
|
||||
}
|
||||
|
||||
@@ -2065,7 +2100,9 @@
|
||||
@@ -2064,7 +2098,9 @@
|
||||
|
||||
static void __exit exit_squashfs_fs(void)
|
||||
{
|
||||
@ -105,28 +106,28 @@ diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
|
||||
unregister_filesystem(&squashfs_fs_type);
|
||||
destroy_inodecache();
|
||||
}
|
||||
diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/LzmaDecode.c
|
||||
--- linux-2.6.16/fs/squashfs/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/fs/squashfs/LzmaDecode.c 2006-03-21 10:56:57.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/LzmaDecode.c linux-2.6.19.dev/fs/squashfs/LzmaDecode.c
|
||||
--- linux-2.6.19.old/fs/squashfs/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/LzmaDecode.c 2006-12-14 03:13:20.000000000 +0100
|
||||
@@ -0,0 +1,663 @@
|
||||
+/*
|
||||
+ LzmaDecode.c
|
||||
+ LZMA Decoder
|
||||
+
|
||||
+
|
||||
+ LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
|
||||
+ http://www.7-zip.org/
|
||||
+
|
||||
+ LZMA SDK is licensed under two licenses:
|
||||
+ 1) GNU Lesser General Public License (GNU LGPL)
|
||||
+ 2) Common Public License (CPL)
|
||||
+ It means that you can select one of these two licenses and
|
||||
+ It means that you can select one of these two licenses and
|
||||
+ follow rules of that license.
|
||||
+
|
||||
+ SPECIAL EXCEPTION:
|
||||
+ Igor Pavlov, as the author of this code, expressly permits you to
|
||||
+ statically or dynamically link your code (or bind by name) to the
|
||||
+ interfaces of this file without subjecting your linked code to the
|
||||
+ terms of the CPL or GNU LGPL. Any modifications or additions
|
||||
+ Igor Pavlov, as the author of this code, expressly permits you to
|
||||
+ statically or dynamically link your code (or bind by name) to the
|
||||
+ interfaces of this file without subjecting your linked code to the
|
||||
+ terms of the CPL or GNU LGPL. Any modifications or additions
|
||||
+ to this file, however, are subject to the LGPL or CPL terms.
|
||||
+*/
|
||||
+
|
||||
@ -200,7 +201,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ rd->Code = (rd->Code << 8) | ReadByte;
|
||||
+}
|
||||
+
|
||||
+#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
|
||||
+#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
|
||||
+#define RC_FLUSH_VAR rd->Range = range; rd->Code = code;
|
||||
+#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; }
|
||||
+
|
||||
@ -268,7 +269,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
|
||||
+ RC_NORMALIZE
|
||||
+
|
||||
+#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
|
||||
+#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
|
||||
+
|
||||
+int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
|
||||
+{
|
||||
@ -318,7 +319,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+}
|
||||
+
|
||||
+Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
|
||||
+{
|
||||
+{
|
||||
+ int symbol = 1;
|
||||
+ #ifdef _LZMA_LOC_OPT
|
||||
+ RC_INIT_VAR
|
||||
@ -340,7 +341,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+}
|
||||
+
|
||||
+Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte)
|
||||
+{
|
||||
+{
|
||||
+ int symbol = 1;
|
||||
+ #ifdef _LZMA_LOC_OPT
|
||||
+ RC_INIT_VAR
|
||||
@ -395,7 +396,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+#define LenLow (LenChoice2 + 1)
|
||||
+#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
|
||||
+#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
|
||||
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
||||
+#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
|
||||
+
|
||||
+int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState)
|
||||
+{
|
||||
@ -405,7 +406,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0)
|
||||
+ return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid +
|
||||
+ (posState << kLenNumMidBits), kLenNumMidBits, rd);
|
||||
+ return kLenNumLowSymbols + kLenNumMidSymbols +
|
||||
+ return kLenNumLowSymbols + kLenNumMidSymbols +
|
||||
+ RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd);
|
||||
+}
|
||||
+
|
||||
@ -488,8 +489,8 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ vs->RemainLen = 0;
|
||||
+ dictionary[dictionarySize - 1] = 0;
|
||||
+ for (i = 0; i < numProbs; i++)
|
||||
+ p[i] = kBitModelTotal >> 1;
|
||||
+ RangeDecoderInit(&vs->RangeDecoder,
|
||||
+ p[i] = kBitModelTotal >> 1;
|
||||
+ RangeDecoderInit(&vs->RangeDecoder,
|
||||
+ #ifdef _LZMA_IN_CB
|
||||
+ inCallback
|
||||
+ #else
|
||||
@ -499,7 +500,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ return LZMA_RESULT_OK;
|
||||
+}
|
||||
+
|
||||
+int LzmaDecode(unsigned char *buffer,
|
||||
+int LzmaDecode(unsigned char *buffer,
|
||||
+ unsigned char *outStream, UInt32 outSize,
|
||||
+ UInt32 *outSizeProcessed)
|
||||
+{
|
||||
@ -569,8 +570,8 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ if (bufferSize < numProbs * sizeof(CProb))
|
||||
+ return LZMA_RESULT_NOT_ENOUGH_MEM;
|
||||
+ for (i = 0; i < numProbs; i++)
|
||||
+ p[i] = kBitModelTotal >> 1;
|
||||
+ RangeDecoderInit(&rd,
|
||||
+ p[i] = kBitModelTotal >> 1;
|
||||
+ RangeDecoderInit(&rd,
|
||||
+ #ifdef _LZMA_IN_CB
|
||||
+ inCallback
|
||||
+ #else
|
||||
@ -583,7 +584,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ while(nowPos < outSize)
|
||||
+ {
|
||||
+ int posState = (int)(
|
||||
+ (nowPos
|
||||
+ (nowPos
|
||||
+ #ifdef _LZMA_OUT_READ
|
||||
+ + globalPos
|
||||
+ #endif
|
||||
@ -597,9 +598,9 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ return LZMA_RESULT_DATA_ERROR;
|
||||
+ if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0)
|
||||
+ {
|
||||
+ CProb *probs = p + Literal + (LZMA_LIT_SIZE *
|
||||
+ CProb *probs = p + Literal + (LZMA_LIT_SIZE *
|
||||
+ (((
|
||||
+ (nowPos
|
||||
+ (nowPos
|
||||
+ #ifdef _LZMA_OUT_READ
|
||||
+ + globalPos
|
||||
+ #endif
|
||||
@ -632,7 +633,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ dictionaryPos = 0;
|
||||
+ #endif
|
||||
+ }
|
||||
+ else
|
||||
+ else
|
||||
+ {
|
||||
+ previousIsMatch = 1;
|
||||
+ if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1)
|
||||
@ -645,7 +646,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ UInt32 pos;
|
||||
+ #endif
|
||||
+ if (
|
||||
+ (nowPos
|
||||
+ (nowPos
|
||||
+ #ifdef _LZMA_OUT_READ
|
||||
+ + globalPos
|
||||
+ #endif
|
||||
@ -673,7 +674,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ UInt32 distance;
|
||||
+ if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0)
|
||||
+ distance = rep1;
|
||||
+ else
|
||||
+ else
|
||||
+ {
|
||||
+ if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0)
|
||||
+ distance = rep2;
|
||||
@ -699,7 +700,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ state = state < 7 ? 7 : 10;
|
||||
+ len = LzmaLenDecode(p + LenCoder, &rd, posState);
|
||||
+ posSlot = RangeDecoderBitTreeDecode(p + PosSlot +
|
||||
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
|
||||
+ ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
|
||||
+ kNumPosSlotBits), kNumPosSlotBits, &rd);
|
||||
+ if (posSlot >= kStartPosModelIndex)
|
||||
+ {
|
||||
@ -712,7 +713,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ rep0 += RangeDecoderDecodeDirectBits(&rd,
|
||||
+ rep0 += RangeDecoderDecodeDirectBits(&rd,
|
||||
+ numDirectBits - kNumAlignBits) << kNumAlignBits;
|
||||
+ rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd);
|
||||
+ }
|
||||
@ -727,7 +728,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ len = -1;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (rep0 > nowPos
|
||||
+ if (rep0 > nowPos
|
||||
+ #ifdef _LZMA_OUT_READ
|
||||
+ + globalPos
|
||||
+ #endif
|
||||
@ -772,11 +773,11 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ *outSizeProcessed = nowPos;
|
||||
+ return LZMA_RESULT_OK;
|
||||
+}
|
||||
diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/LzmaDecode.h
|
||||
--- linux-2.6.16/fs/squashfs/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/fs/squashfs/LzmaDecode.h 2006-03-21 10:56:57.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/LzmaDecode.h linux-2.6.19.dev/fs/squashfs/LzmaDecode.h
|
||||
--- linux-2.6.19.old/fs/squashfs/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/LzmaDecode.h 2006-12-14 03:13:20.000000000 +0100
|
||||
@@ -0,0 +1,100 @@
|
||||
+/*
|
||||
+/*
|
||||
+ LzmaDecode.h
|
||||
+ LZMA Decoder interface
|
||||
+
|
||||
@ -786,14 +787,14 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ LZMA SDK is licensed under two licenses:
|
||||
+ 1) GNU Lesser General Public License (GNU LGPL)
|
||||
+ 2) Common Public License (CPL)
|
||||
+ It means that you can select one of these two licenses and
|
||||
+ It means that you can select one of these two licenses and
|
||||
+ follow rules of that license.
|
||||
+
|
||||
+ SPECIAL EXCEPTION:
|
||||
+ Igor Pavlov, as the author of this code, expressly permits you to
|
||||
+ statically or dynamically link your code (or bind by name) to the
|
||||
+ interfaces of this file without subjecting your linked code to the
|
||||
+ terms of the CPL or GNU LGPL. Any modifications or additions
|
||||
+ Igor Pavlov, as the author of this code, expressly permits you to
|
||||
+ statically or dynamically link your code (or bind by name) to the
|
||||
+ interfaces of this file without subjecting your linked code to the
|
||||
+ terms of the CPL or GNU LGPL. Any modifications or additions
|
||||
+ to this file, however, are subject to the LGPL or CPL terms.
|
||||
+*/
|
||||
+
|
||||
@ -807,7 +808,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+/* Use read function for output data */
|
||||
+
|
||||
+/* #define _LZMA_PROB32 */
|
||||
+/* It can increase speed on some 32-bit CPUs,
|
||||
+/* It can increase speed on some 32-bit CPUs,
|
||||
+ but memory usage will be doubled in that case */
|
||||
+
|
||||
+/* #define _LZMA_LOC_OPT */
|
||||
@ -841,10 +842,10 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+#define LZMA_BASE_SIZE 1846
|
||||
+#define LZMA_LIT_SIZE 768
|
||||
+
|
||||
+/*
|
||||
+/*
|
||||
+bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
|
||||
+bufferSize += 100 in case of _LZMA_OUT_READ
|
||||
+by default CProb is unsigned short,
|
||||
+by default CProb is unsigned short,
|
||||
+but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
|
||||
+*/
|
||||
+
|
||||
@ -862,7 +863,7 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+#endif
|
||||
+
|
||||
+int LzmaDecode(
|
||||
+ unsigned char *buffer,
|
||||
+ unsigned char *buffer,
|
||||
+ #ifndef _LZMA_OUT_READ
|
||||
+ UInt32 bufferSize,
|
||||
+ int lc, int lp, int pb,
|
||||
@ -876,9 +877,9 @@ diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/Lz
|
||||
+ UInt32 *outSizeProcessed);
|
||||
+
|
||||
+#endif
|
||||
diff -Nur linux-2.6.16/fs/squashfs/Makefile linux-2.6.16-owrt/fs/squashfs/Makefile
|
||||
--- linux-2.6.16/fs/squashfs/Makefile 2006-03-21 10:55:59.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/fs/squashfs/Makefile 2006-03-21 10:57:08.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/Makefile linux-2.6.19.dev/fs/squashfs/Makefile
|
||||
--- linux-2.6.19.old/fs/squashfs/Makefile 2006-12-14 03:13:20.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/Makefile 2006-12-14 03:13:20.000000000 +0100
|
||||
@@ -5,3 +5,4 @@
|
||||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += inode.o
|
||||
|
@ -1,6 +1,7 @@
|
||||
--- linux-2.6.12.5/Makefile.old 2005-10-23 22:56:29.017270000 +0200
|
||||
+++ linux-2.6.12.5/Makefile 2005-10-23 22:57:23.226138500 +0200
|
||||
@@ -533,6 +533,9 @@
|
||||
diff -urN linux-2.6.19.old/Makefile linux-2.6.19.dev/Makefile
|
||||
--- linux-2.6.19.old/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/Makefile 2006-12-14 03:13:23.000000000 +0100
|
||||
@@ -513,6 +513,9 @@
|
||||
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
|
||||
CHECKFLAGS += $(NOSTDINC_FLAGS)
|
||||
|
||||
|
@ -1,221 +0,0 @@
|
||||
diff -ruN linux-2.6.15.1/include/asm-ppc/libgcc.h linux-2.6.15.1-openwrt/include/asm-ppc/libgcc.h
|
||||
--- linux-2.6.15.1/include/asm-ppc/libgcc.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/include/asm-ppc/libgcc.h 2006-02-01 15:47:53.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef __ASM_LIBGCC_H
|
||||
+#define __ASM_LIBGCC_H
|
||||
+
|
||||
+#undef ARCH_NEEDS_ashldi3
|
||||
+#undef ARCH_NEEDS_ashrdi3
|
||||
+#undef ARCH_NEEDS_lshrdi3
|
||||
+
|
||||
+#endif /* __ASM_LIBGCC_H */
|
||||
diff -ruN linux-2.6.15.1/include/asm-i386/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h
|
||||
--- linux-2.6.15.1/include/asm-i386/libgcc.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h 2006-02-01 15:47:53.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef __ASM_LIBGCC_H
|
||||
+#define __ASM_LIBGCC_H
|
||||
+
|
||||
+#undef ARCH_NEEDS_ashldi3
|
||||
+#undef ARCH_NEEDS_ashrdi3
|
||||
+#undef ARCH_NEEDS_lshrdi3
|
||||
+
|
||||
+#endif /* __ASM_LIBGCC_H */
|
||||
diff -ruN linux-2.6.15.1/include/asm-um/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h
|
||||
--- linux-2.6.15.1/include/asm-um/libgcc.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/include/asm-um/libgcc.h 2006-02-01 15:47:53.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef __ASM_LIBGCC_H
|
||||
+#define __ASM_LIBGCC_H
|
||||
+
|
||||
+#undef ARCH_NEEDS_ashldi3
|
||||
+#undef ARCH_NEEDS_ashrdi3
|
||||
+#undef ARCH_NEEDS_lshrdi3
|
||||
+
|
||||
+#endif /* __ASM_LIBGCC_H */
|
||||
diff -Nur linux-2.6.15.1/include/asm-mips/libgcc.h linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h
|
||||
--- linux-2.6.15.1/include/asm-mips/libgcc.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h 2006-01-20 10:32:28.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef __ASM_LIBGCC_H
|
||||
+#define __ASM_LIBGCC_H
|
||||
+
|
||||
+#define ARCH_NEEDS_ashldi3
|
||||
+#define ARCH_NEEDS_ashrdi3
|
||||
+#define ARCH_NEEDS_lshrdi3
|
||||
+
|
||||
+#endif /* __ASM_LIBGCC_H */
|
||||
diff -Nur linux-2.6.15.1/include/linux/libgcc.h linux-2.6.15.1-openwrt/include/linux/libgcc.h
|
||||
--- linux-2.6.15.1/include/linux/libgcc.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/include/linux/libgcc.h 2006-01-20 10:33:38.000000000 +0100
|
||||
@@ -0,0 +1,32 @@
|
||||
+#ifndef __LINUX_LIBGCC_H
|
||||
+#define __LINUX_LIBGCC_H
|
||||
+
|
||||
+#include <asm/byteorder.h>
|
||||
+#include <asm/libgcc.h>
|
||||
+
|
||||
+typedef long long DWtype;
|
||||
+typedef int Wtype;
|
||||
+typedef unsigned int UWtype;
|
||||
+typedef int word_type __attribute__ ((mode (__word__)));
|
||||
+
|
||||
+#define BITS_PER_UNIT 8
|
||||
+
|
||||
+#ifdef __BIG_ENDIAN
|
||||
+struct DWstruct {
|
||||
+ Wtype high, low;
|
||||
+};
|
||||
+#elif defined(__LITTLE_ENDIAN)
|
||||
+struct DWstruct {
|
||||
+ Wtype low, high;
|
||||
+};
|
||||
+#else
|
||||
+#error I feel sick.
|
||||
+#endif
|
||||
+
|
||||
+typedef union
|
||||
+{
|
||||
+ struct DWstruct s;
|
||||
+ DWtype ll;
|
||||
+} DWunion;
|
||||
+
|
||||
+#endif /* __LINUX_LIBGCC_H */
|
||||
diff -Nur linux-2.6.15.1/lib/ashldi3.c linux-2.6.15.1-openwrt/lib/ashldi3.c
|
||||
--- linux-2.6.15.1/lib/ashldi3.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/lib/ashldi3.c 2006-01-20 10:38:41.000000000 +0100
|
||||
@@ -0,0 +1,32 @@
|
||||
+#include <linux/libgcc.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#ifdef ARCH_NEEDS_ashldi3
|
||||
+
|
||||
+DWtype __ashldi3(DWtype u, word_type b)
|
||||
+{
|
||||
+ DWunion uu, w;
|
||||
+ word_type bm;
|
||||
+
|
||||
+ if (b == 0)
|
||||
+ return u;
|
||||
+
|
||||
+ uu.ll = u;
|
||||
+ bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
|
||||
+
|
||||
+ if (bm <= 0) {
|
||||
+ w.s.low = 0;
|
||||
+ w.s.high = (UWtype) uu.s.low << -bm;
|
||||
+ } else {
|
||||
+ const UWtype carries = (UWtype) uu.s.low >> bm;
|
||||
+
|
||||
+ w.s.low = (UWtype) uu.s.low << b;
|
||||
+ w.s.high = ((UWtype) uu.s.high << b) | carries;
|
||||
+ }
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(__ashldi3);
|
||||
+
|
||||
+#endif /* ARCH_NEEDS_ashldi3 */
|
||||
diff -Nur linux-2.6.15.1/lib/ashrdi3.c linux-2.6.15.1-openwrt/lib/ashrdi3.c
|
||||
--- linux-2.6.15.1/lib/ashrdi3.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/lib/ashrdi3.c 2006-01-20 10:39:29.000000000 +0100
|
||||
@@ -0,0 +1,36 @@
|
||||
+#include <linux/libgcc.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+/* Unless shift functions are defined with full ANSI prototypes,
|
||||
+ parameter b will be promoted to int if word_type is smaller than an int. */
|
||||
+#ifdef ARCH_NEEDS_ashrdi3
|
||||
+
|
||||
+DWtype __ashrdi3(DWtype u, word_type b)
|
||||
+{
|
||||
+ DWunion uu, w;
|
||||
+ word_type bm;
|
||||
+
|
||||
+ if (b == 0)
|
||||
+ return u;
|
||||
+
|
||||
+ uu.ll = u;
|
||||
+ bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
|
||||
+
|
||||
+ if (bm <= 0) {
|
||||
+ /* w.s.high = 1..1 or 0..0 */
|
||||
+ w.s.high =
|
||||
+ uu.s.high >> (sizeof(Wtype) * BITS_PER_UNIT - 1);
|
||||
+ w.s.low = uu.s.high >> -bm;
|
||||
+ } else {
|
||||
+ const UWtype carries = (UWtype) uu.s.high << bm;
|
||||
+
|
||||
+ w.s.high = uu.s.high >> b;
|
||||
+ w.s.low = ((UWtype) uu.s.low >> b) | carries;
|
||||
+ }
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(__ashrdi3);
|
||||
+
|
||||
+#endif /* ARCH_NEEDS_ashrdi3 */
|
||||
diff -Nur linux-2.6.15.1/lib/lshrdi3.c linux-2.6.15.1-openwrt/lib/lshrdi3.c
|
||||
--- linux-2.6.15.1/lib/lshrdi3.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/lib/lshrdi3.c 2006-01-20 10:40:10.000000000 +0100
|
||||
@@ -0,0 +1,34 @@
|
||||
+#include <linux/libgcc.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+/* Unless shift functions are defined with full ANSI prototypes,
|
||||
+ parameter b will be promoted to int if word_type is smaller than an int. */
|
||||
+#ifdef ARCH_NEEDS_lshrdi3
|
||||
+
|
||||
+DWtype __lshrdi3(DWtype u, word_type b)
|
||||
+{
|
||||
+ DWunion uu, w;
|
||||
+ word_type bm;
|
||||
+
|
||||
+ if (b == 0)
|
||||
+ return u;
|
||||
+
|
||||
+ uu.ll = u;
|
||||
+ bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
|
||||
+
|
||||
+ if (bm <= 0) {
|
||||
+ w.s.high = 0;
|
||||
+ w.s.low = (UWtype) uu.s.high >> -bm;
|
||||
+ } else {
|
||||
+ const UWtype carries = (UWtype) uu.s.high << bm;
|
||||
+
|
||||
+ w.s.high = (UWtype) uu.s.high >> b;
|
||||
+ w.s.low = ((UWtype) uu.s.low >> b) | carries;
|
||||
+ }
|
||||
+
|
||||
+ return w.ll;
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(__lshrdi3);
|
||||
+
|
||||
+#endif /* ARCH_NEEDS_lshrdi3 */
|
||||
diff -Nur linux-2.6.15.1/lib/Makefile linux-2.6.15.1-openwrt/lib/Makefile
|
||||
--- linux-2.6.15.1/lib/Makefile 2006-01-15 07:16:02.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/lib/Makefile 2006-01-20 10:34:19.000000000 +0100
|
||||
@@ -8,6 +8,7 @@
|
||||
sha1.o
|
||||
|
||||
lib-y += kobject.o kref.o kobject_uevent.o klist.o
|
||||
+obj-y += ashldi3.o ashrdi3.o lshrdi3.o
|
||||
|
||||
obj-y += sort.o parser.o halfmd4.o
|
||||
|
||||
diff -Nur linux-2.6.15.1/include/asm-arm/libgcc.h linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h
|
||||
--- linux-2.6.15.1/include/asm-arm/libgcc.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h 2006-04-12 23:01:18.000000000 +0200
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef __ASM_LIBGCC_H
|
||||
+#define __ASM_LIBGCC_H
|
||||
+
|
||||
+#undef ARCH_NEEDS_ashldi3
|
||||
+#undef ARCH_NEEDS_ashrdi3
|
||||
+#undef ARCH_NEEDS_lshrdi3
|
||||
+
|
||||
+#endif /* __ASM_LIBGCC_H */
|
@ -1,6 +1,7 @@
|
||||
--- linux-2.6.15.1.old/include/asm-mips/system.h 2006-01-28 15:02:54.481032280 +0100
|
||||
+++ linux-2.6.15.1.dev/include/asm-mips/system.h 2006-01-28 14:47:51.634285848 +0100
|
||||
@@ -273,7 +273,7 @@
|
||||
diff -urN linux-2.6.19.old/include/asm-mips/system.h linux-2.6.19.dev/include/asm-mips/system.h
|
||||
--- linux-2.6.19.old/include/asm-mips/system.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/asm-mips/system.h 2006-12-14 03:13:28.000000000 +0100
|
||||
@@ -311,7 +311,7 @@
|
||||
if something tries to do an invalid xchg(). */
|
||||
extern void __xchg_called_with_bad_pointer(void);
|
||||
|
||||
@ -8,4 +9,4 @@
|
||||
+static __always_inline unsigned long __xchg(unsigned long x, volatile void * ptr, int size)
|
||||
{
|
||||
switch (size) {
|
||||
case 4:
|
||||
case 4:
|
||||
|
@ -1,25 +1,24 @@
|
||||
--- linux.old/drivers/mtd/chips/cfi_cmdset_0002.c 2006-10-23 21:14:11.618024794 +0200
|
||||
+++ linux.dev/drivers/mtd/chips/cfi_cmdset_0002.c 2006-10-24 07:47:52.267007586 +0200
|
||||
@@ -49,6 +49,7 @@
|
||||
#define MANUFACTURER_SST 0x00BF
|
||||
diff -urN linux-2.6.19.old/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.19.dev/drivers/mtd/chips/cfi_cmdset_0002.c
|
||||
--- linux-2.6.19.old/drivers/mtd/chips/cfi_cmdset_0002.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/drivers/mtd/chips/cfi_cmdset_0002.c 2006-12-14 03:13:30.000000000 +0100
|
||||
@@ -50,6 +50,7 @@
|
||||
#define SST49LF004B 0x0060
|
||||
#define SST49LF008A 0x005a
|
||||
#define AT49BV6416 0x00d6
|
||||
+#define MANUFACTURER_SAMSUNG 0x00ec
|
||||
|
||||
static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
|
||||
static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
|
||||
@@ -254,13 +255,20 @@
|
||||
}
|
||||
@@ -293,12 +294,19 @@
|
||||
|
||||
if (extp->MajorVersion != '1' ||
|
||||
- (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
|
||||
(extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
|
||||
- printk(KERN_ERR " Unknown Amd/Fujitsu Extended Query "
|
||||
- "version %c.%c.\n", extp->MajorVersion,
|
||||
- extp->MinorVersion);
|
||||
- kfree(extp);
|
||||
- kfree(mtd);
|
||||
- return NULL;
|
||||
+ (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
|
||||
+ if (cfi->mfr == MANUFACTURER_SAMSUNG &&
|
||||
+ (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
|
||||
+ printk(KERN_NOTICE " Newer Samsung flash detected, "
|
||||
|
@ -1,15 +1,15 @@
|
||||
diff -Nur linux-2.6.16/fs/squashfs/Makefile linux-2.6.16-owrt/fs/squashfs/Makefile
|
||||
--- linux-2.6.16/fs/squashfs/Makefile 2006-03-21 13:50:31.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/fs/squashfs/Makefile 2006-03-21 13:51:09.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/Makefile linux-2.6.19.dev/fs/squashfs/Makefile
|
||||
--- linux-2.6.19.old/fs/squashfs/Makefile 2006-12-14 03:13:22.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/Makefile 2006-12-14 03:13:31.000000000 +0100
|
||||
@@ -4,5 +4,4 @@
|
||||
|
||||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += inode.o
|
||||
-squashfs-y += squashfs2_0.o
|
||||
squashfs-y += LzmaDecode.o
|
||||
diff -Nur linux-2.6.16/fs/squashfs/squashfs.h linux-2.6.16-owrt/fs/squashfs/squashfs.h
|
||||
--- linux-2.6.16/fs/squashfs/squashfs.h 2006-03-21 10:55:59.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/fs/squashfs/squashfs.h 2006-03-21 13:50:58.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/squashfs/squashfs.h linux-2.6.19.dev/fs/squashfs/squashfs.h
|
||||
--- linux-2.6.19.old/fs/squashfs/squashfs.h 2006-12-14 03:13:20.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/squashfs/squashfs.h 2006-12-14 03:13:31.000000000 +0100
|
||||
@@ -24,6 +24,9 @@
|
||||
#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
|
||||
#undef CONFIG_SQUASHFS_1_0_COMPATIBILITY
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nur linux-cvs/arch/mips/kernel/head.S linux-aruba/arch/mips/kernel/head.S
|
||||
--- linux-cvs/arch/mips/kernel/head.S 2004-12-23 00:21:39.000000000 -0800
|
||||
+++ linux-aruba/arch/mips/kernel/head.S 2005-10-20 09:16:08.000000000 -0700
|
||||
@@ -122,6 +122,10 @@
|
||||
diff -urN linux-2.6.19.old/arch/mips/kernel/head.S linux-2.6.19.dev/arch/mips/kernel/head.S
|
||||
--- linux-2.6.19.old/arch/mips/kernel/head.S 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/arch/mips/kernel/head.S 2006-12-14 03:13:33.000000000 +0100
|
||||
@@ -129,6 +129,10 @@
|
||||
#endif
|
||||
.endm
|
||||
|
||||
@ -12,4 +12,3 @@ diff -Nur linux-cvs/arch/mips/kernel/head.S linux-aruba/arch/mips/kernel/head.S
|
||||
/*
|
||||
* Reserved space for exception handlers.
|
||||
* Necessary for machines which link their kernels at KSEG0.
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
--- linux-2.6.18/drivers/mtd/redboot.c.orig 2006-10-23 11:41:56.000000000 -0400
|
||||
+++ linux-2.6.18/drivers/mtd/redboot.c 2006-10-23 11:42:09.000000000 -0400
|
||||
diff -urN linux-2.6.19.old/drivers/mtd/redboot.c linux-2.6.19.dev/drivers/mtd/redboot.c
|
||||
--- linux-2.6.19.old/drivers/mtd/redboot.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/drivers/mtd/redboot.c 2006-12-14 03:13:35.000000000 +0100
|
||||
@@ -92,22 +92,47 @@
|
||||
* swab32(erasesize) then we know we are looking at
|
||||
* a byte swapped FIS directory - swap all the entries!
|
||||
@ -32,7 +33,9 @@
|
||||
+ for (j = 0; j < numslots; ++j) {
|
||||
/* The unsigned long fields were written with the
|
||||
* wrong byte sex, name and pad have no byte sex.
|
||||
- */
|
||||
+ *
|
||||
+ * Only process non-deleted entries. Don't exit early.
|
||||
*/
|
||||
- swab32s(&buf[j].flash_base);
|
||||
- swab32s(&buf[j].mem_base);
|
||||
- swab32s(&buf[j].size);
|
||||
@ -40,9 +43,6 @@
|
||||
- swab32s(&buf[j].data_length);
|
||||
- swab32s(&buf[j].desc_cksum);
|
||||
- swab32s(&buf[j].file_cksum);
|
||||
+ *
|
||||
+ * Only process non-deleted entries. Don't exit early.
|
||||
+ */
|
||||
+ if (buf[j].name[0] != 0xff) {
|
||||
+ swab32s(&buf[j].flash_base);
|
||||
+ swab32s(&buf[j].mem_base);
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_conntrack.h
|
||||
--- linux-2.6.17/include/linux/netfilter_ipv4/ip_conntrack.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_conntrack.h 2006-06-18 12:29:04.000000000 +0200
|
||||
@@ -124,6 +124,15 @@
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_conntrack.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_conntrack.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_conntrack.h 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -127,6 +127,15 @@
|
||||
/* Traversed often, so hopefully in different cacheline to top */
|
||||
/* These are my tuples; original and reply */
|
||||
struct ip_conntrack_tuple_hash tuplehash[IP_CT_DIR_MAX];
|
||||
@ -17,11 +17,11 @@ diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.17-
|
||||
};
|
||||
|
||||
struct ip_conntrack_expect
|
||||
diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_layer7.h
|
||||
--- linux-2.6.17/include/linux/netfilter_ipv4/ipt_layer7.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_layer7.h 2006-06-18 12:29:04.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_layer7.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_layer7.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_layer7.h 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -0,0 +1,27 @@
|
||||
+/*
|
||||
+/*
|
||||
+ By Matthew Strait <quadong@users.sf.net>, Dec 2003.
|
||||
+ http://l7-filter.sf.net
|
||||
+
|
||||
@ -48,10 +48,10 @@ diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ipt_layer7.h linux-2.6.17-ow
|
||||
+};
|
||||
+
|
||||
+#endif /* _IPT_LAYER7_H */
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_core.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ip_conntrack_core.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_core.c 2006-06-18 12:29:04.000000000 +0200
|
||||
@@ -339,6 +339,13 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.19.dev/net/ipv4/netfilter/ip_conntrack_core.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ip_conntrack_core.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ip_conntrack_core.c 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -337,6 +337,13 @@
|
||||
* too. */
|
||||
ip_ct_remove_expectations(ct);
|
||||
|
||||
@ -65,10 +65,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_conntrack_core.c linux-2.6.17-owrt/
|
||||
/* We overload first tuple to link into unconfirmed list. */
|
||||
if (!is_confirmed(ct)) {
|
||||
BUG_ON(list_empty(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list));
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_standalone.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-06-18 12:29:04.000000000 +0200
|
||||
@@ -189,6 +189,12 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.19.dev/net/ipv4/netfilter/ip_conntrack_standalone.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ip_conntrack_standalone.c 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -192,6 +192,12 @@
|
||||
return -ENOSPC;
|
||||
#endif
|
||||
|
||||
@ -81,14 +81,14 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_conntrack_standalone.c linux-2.6.17
|
||||
if (seq_printf(s, "use=%u\n", atomic_read(&conntrack->ct_general.use)))
|
||||
return -ENOSPC;
|
||||
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv4/netfilter/ipt_layer7.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ipt_layer7.c 2006-06-18 12:29:04.000000000 +0200
|
||||
@@ -0,0 +1,592 @@
|
||||
+/*
|
||||
+ Kernel module to match application layer (OSI layer 7)
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_layer7.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_layer7.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ipt_layer7.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_layer7.c 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -0,0 +1,586 @@
|
||||
+/*
|
||||
+ Kernel module to match application layer (OSI layer 7)
|
||||
+ data in connections.
|
||||
+
|
||||
+
|
||||
+ http://l7-filter.sf.net
|
||||
+
|
||||
+ By Matthew Strait and Ethan Sommer, 2003-2005.
|
||||
@ -147,24 +147,24 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+
|
||||
+/* I'm new to locking. Here are my assumptions:
|
||||
+
|
||||
+- No one will write to /proc/net/layer7_numpackets over and over very fast;
|
||||
+- No one will write to /proc/net/layer7_numpackets over and over very fast;
|
||||
+ if they did, nothing awful would happen.
|
||||
+
|
||||
+- This code will never be processing the same packet twice at the same time,
|
||||
+ because iptables rules are traversed in order.
|
||||
+
|
||||
+- It doesn't matter if two packets from different connections are in here at
|
||||
+- It doesn't matter if two packets from different connections are in here at
|
||||
+ the same time, because they don't share any data.
|
||||
+
|
||||
+- It _does_ matter if two packets from the same connection are here at the same
|
||||
+ time. In this case, we have to protect the conntracks and the list of
|
||||
+ time. In this case, we have to protect the conntracks and the list of
|
||||
+ compiled patterns.
|
||||
+*/
|
||||
+DEFINE_RWLOCK(ct_lock);
|
||||
+DEFINE_SPINLOCK(list_lock);
|
||||
+
|
||||
+#ifdef CONFIG_IP_NF_MATCH_LAYER7_DEBUG
|
||||
+/* Converts an unfriendly string into a friendly one by
|
||||
+/* Converts an unfriendly string into a friendly one by
|
||||
+replacing unprintables with periods and all whitespace with " ". */
|
||||
+static char * friendly_print(unsigned char * s)
|
||||
+{
|
||||
@ -172,7 +172,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ int i;
|
||||
+
|
||||
+ if(!f) {
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in friendly_print, bailing.\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
@ -196,7 +196,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ return (char)(i - 10 + 'a');
|
||||
+ break;
|
||||
+ default:
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk("Problem in dec2hex\n");
|
||||
+ return '\0';
|
||||
+ }
|
||||
@ -208,7 +208,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ int i;
|
||||
+
|
||||
+ if(!g) {
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in hex_print, bailing.\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
@ -226,7 +226,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+
|
||||
+/* Use instead of regcomp. As we expect to be seeing the same regexps over and
|
||||
+over again, it make sense to cache the results. */
|
||||
+static regexp * compile_and_cache(char * regex_string, char * protocol)
|
||||
+static regexp * compile_and_cache(char * regex_string, char * protocol)
|
||||
+{
|
||||
+ struct pattern_cache * node = first_pattern_cache;
|
||||
+ struct pattern_cache * last_pattern_cache = first_pattern_cache;
|
||||
@ -234,7 +234,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ unsigned int len;
|
||||
+
|
||||
+ while (node != NULL) {
|
||||
+ if (!strcmp(node->regex_string, regex_string))
|
||||
+ if (!strcmp(node->regex_string, regex_string))
|
||||
+ return node->pattern;
|
||||
+
|
||||
+ last_pattern_cache = node;/* points at the last non-NULL node */
|
||||
@ -242,12 +242,12 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ }
|
||||
+
|
||||
+ /* If we reach the end of the list, then we have not yet cached
|
||||
+ the pattern for this regex. Let's do that now.
|
||||
+ the pattern for this regex. Let's do that now.
|
||||
+ Be paranoid about running out of memory to avoid list corruption. */
|
||||
+ tmp = kmalloc(sizeof(struct pattern_cache), GFP_ATOMIC);
|
||||
+
|
||||
+ if(!tmp) {
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in compile_and_cache, bailing.\n");
|
||||
+ return NULL;
|
||||
+ }
|
||||
@ -257,7 +257,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ tmp->next = NULL;
|
||||
+
|
||||
+ if(!tmp->regex_string || !tmp->pattern) {
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in compile_and_cache, bailing.\n");
|
||||
+ kfree(tmp->regex_string);
|
||||
+ kfree(tmp->pattern);
|
||||
@ -278,7 +278,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ DPRINTK("About to compile this: \"%s\"\n", regex_string);
|
||||
+ node->pattern = regcomp(regex_string, &len);
|
||||
+ if ( !node->pattern ) {
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: Error compiling regexp \"%s\" (%s)\n", regex_string, protocol);
|
||||
+ /* pattern is now cached as NULL, so we won't try again. */
|
||||
+ }
|
||||
@ -301,14 +301,14 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+/* Returns offset the into the skb->data that the application data starts */
|
||||
+static int app_data_offset(const struct sk_buff *skb)
|
||||
+{
|
||||
+ /* In case we are ported somewhere (ebtables?) where skb->nh.iph
|
||||
+ /* In case we are ported somewhere (ebtables?) where skb->nh.iph
|
||||
+ isn't set, this can be gotten from 4*(skb->data[0] & 0x0f) as well. */
|
||||
+ int ip_hl = 4*skb->nh.iph->ihl;
|
||||
+
|
||||
+ if( skb->nh.iph->protocol == IPPROTO_TCP ) {
|
||||
+ /* 12 == offset into TCP header for the header length field.
|
||||
+ Can't get this with skb->h.th->doff because the tcphdr
|
||||
+ struct doesn't get set when routing (this is confirmed to be
|
||||
+ /* 12 == offset into TCP header for the header length field.
|
||||
+ Can't get this with skb->h.th->doff because the tcphdr
|
||||
+ struct doesn't get set when routing (this is confirmed to be
|
||||
+ true in Netfilter as well as QoS.) */
|
||||
+ int tcp_hl = 4*(skb->data[ip_hl + 12] >> 4);
|
||||
+
|
||||
@ -318,7 +318,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ } else if( skb->nh.iph->protocol == IPPROTO_ICMP ) {
|
||||
+ return ip_hl + 8; /* ICMP header is 8 bytes */
|
||||
+ } else {
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: tried to handle unknown protocol!\n");
|
||||
+ return ip_hl + 8; /* something reasonable */
|
||||
+ }
|
||||
@ -337,10 +337,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ if(!master_conntrack->layer7.app_proto) {
|
||||
+ char * f = friendly_print(master_conntrack->layer7.app_data);
|
||||
+ char * g = hex_print(master_conntrack->layer7.app_data);
|
||||
+ DPRINTK("\nl7-filter gave up after %d bytes (%llu packets):\n%s\n",
|
||||
+ strlen(f),
|
||||
+ DPRINTK("\nl7-filter gave up after %d bytes (%llu packets):\n%s\n",
|
||||
+ strlen(f),
|
||||
+ TOTAL_PACKETS, f);
|
||||
+ kfree(f);
|
||||
+ kfree(f);
|
||||
+ DPRINTK("In hex: %s\n", g);
|
||||
+ kfree(g);
|
||||
+ }
|
||||
@ -357,7 +357,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ if(!conntrack->layer7.app_proto) {
|
||||
+ conntrack->layer7.app_proto = kmalloc(strlen(master_conntrack->layer7.app_proto)+1, GFP_ATOMIC);
|
||||
+ if(!conntrack->layer7.app_proto){
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in match_no_append, bailing.\n");
|
||||
+ write_unlock(&ct_lock);
|
||||
+ return 1;
|
||||
@ -365,16 +365,16 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ strcpy(conntrack->layer7.app_proto, master_conntrack->layer7.app_proto);
|
||||
+ }
|
||||
+ write_unlock(&ct_lock);
|
||||
+
|
||||
+
|
||||
+ return (!strcmp(master_conntrack->layer7.app_proto, info->protocol));
|
||||
+ }
|
||||
+ else {
|
||||
+ /* If not classified, set to "unknown" to distinguish from
|
||||
+ /* If not classified, set to "unknown" to distinguish from
|
||||
+ connections that are still being tested. */
|
||||
+ write_lock(&ct_lock);
|
||||
+ master_conntrack->layer7.app_proto = kmalloc(strlen("unknown")+1, GFP_ATOMIC);
|
||||
+ if(!master_conntrack->layer7.app_proto){
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in match_no_append, bailing.\n");
|
||||
+ write_unlock(&ct_lock);
|
||||
+ return 1;
|
||||
@ -393,7 +393,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ do case insensitivity). Add it to the end of the current data. */
|
||||
+ for(i = 0; i < maxdatalen-offset-1 && i < len; i++) {
|
||||
+ if(app_data[i] != '\0') {
|
||||
+ target[length+offset] =
|
||||
+ target[length+offset] =
|
||||
+ /* the kernel version of tolower mungs 'upper ascii' */
|
||||
+ isascii(app_data[i])? tolower(app_data[i]) : app_data[i];
|
||||
+ length++;
|
||||
@ -405,11 +405,11 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+}
|
||||
+
|
||||
+/* add the new app data to the conntrack. Return number of bytes added. */
|
||||
+static int add_data(struct ip_conntrack * master_conntrack,
|
||||
+static int add_data(struct ip_conntrack * master_conntrack,
|
||||
+ char * app_data, int appdatalen)
|
||||
+{
|
||||
+ int length;
|
||||
+
|
||||
+
|
||||
+ length = add_datastr(master_conntrack->layer7.app_data, master_conntrack->layer7.app_data_len, app_data, appdatalen);
|
||||
+ master_conntrack->layer7.app_data_len += length;
|
||||
+
|
||||
@ -417,42 +417,44 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+}
|
||||
+
|
||||
+/* Returns true on match and false otherwise. */
|
||||
+static int match(/* const */struct sk_buff *skb, const struct net_device *in,
|
||||
+ const struct net_device *out, const void *matchinfo,
|
||||
+ int offset, int *hotdrop)
|
||||
+static int match(const struct sk_buff *skb_t, const struct net_device *in,
|
||||
+ const struct net_device *out, const struct xt_match *match,
|
||||
+ const void *matchinfo, int offset,
|
||||
+ unsigned int protoff, int *hotdrop)
|
||||
+{
|
||||
+ struct ipt_layer7_info * info = (struct ipt_layer7_info *)matchinfo;
|
||||
+ enum ip_conntrack_info master_ctinfo, ctinfo;
|
||||
+ struct ip_conntrack *master_conntrack, *conntrack;
|
||||
+ unsigned char *app_data, *tmp_data;
|
||||
+ unsigned char *app_data, *tmp_data;
|
||||
+ unsigned int pattern_result, appdatalen;
|
||||
+ regexp * comppattern;
|
||||
+ struct sk_buff *skb = skb_t; /* to leave warning - FIXME */
|
||||
+
|
||||
+ if(!can_handle(skb)){
|
||||
+ DPRINTK("layer7: This is some protocol I can't handle.\n");
|
||||
+ return info->invert;
|
||||
+ }
|
||||
+
|
||||
+ /* Treat parent & all its children together as one connection, except
|
||||
+ for the purpose of setting conntrack->layer7.app_proto in the actual
|
||||
+ /* Treat parent & all its children together as one connection, except
|
||||
+ for the purpose of setting conntrack->layer7.app_proto in the actual
|
||||
+ connection. This makes /proc/net/ip_conntrack more satisfying. */
|
||||
+ if(!(conntrack = ip_conntrack_get((struct sk_buff *)skb, &ctinfo)) ||
|
||||
+ !(master_conntrack = ip_conntrack_get((struct sk_buff *)skb, &master_ctinfo))) {
|
||||
+ //DPRINTK("layer7: packet is not from a known connection, giving up.\n");
|
||||
+ return info->invert;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* Try to get a master conntrack (and its master etc) for FTP, etc. */
|
||||
+ while (master_ct(master_conntrack) != NULL)
|
||||
+ master_conntrack = master_ct(master_conntrack);
|
||||
+
|
||||
+ /* if we've classified it or seen too many packets */
|
||||
+ if(!info->pkt && (TOTAL_PACKETS > num_packets ||
|
||||
+ if(!info->pkt && (TOTAL_PACKETS > num_packets ||
|
||||
+ master_conntrack->layer7.app_proto)) {
|
||||
+
|
||||
+
|
||||
+ pattern_result = match_no_append(conntrack, master_conntrack, ctinfo, master_ctinfo, info);
|
||||
+
|
||||
+ /* skb->cb[0] == seen. Avoid doing things twice if there are two l7
|
||||
+
|
||||
+ /* skb->cb[0] == seen. Avoid doing things twice if there are two l7
|
||||
+ rules. I'm not sure that using cb for this purpose is correct, although
|
||||
+ it says "put your private variables there". But it doesn't look like it
|
||||
+ is being used for anything else in the skbs that make it here. How can
|
||||
@ -463,13 +465,13 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ }
|
||||
+
|
||||
+ if(skb_is_nonlinear(skb)){
|
||||
+ if(skb_linearize(skb, GFP_ATOMIC) != 0){
|
||||
+ if (net_ratelimit())
|
||||
+ if(skb_linearize(skb) != 0){
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: failed to linearize packet, bailing.\n");
|
||||
+ return info->invert;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* now that the skb is linearized, it's safe to set these. */
|
||||
+ app_data = skb->data + app_data_offset(skb);
|
||||
+ appdatalen = skb->tail - app_data;
|
||||
@ -486,22 +488,22 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ printk(KERN_ERR "layer7: out of memory in match, bailing.\n");
|
||||
+ return info->invert;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ tmp_data[0] = '\0';
|
||||
+ add_datastr(tmp_data, 0, app_data, appdatalen);
|
||||
+ pattern_result = ((comppattern && regexec(comppattern, tmp_data)) ? 1 : 0);
|
||||
+ kfree(tmp_data);
|
||||
+ tmp_data = NULL;
|
||||
+
|
||||
+
|
||||
+ return (pattern_result ^ info->invert);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* On the first packet of a connection, allocate space for app data */
|
||||
+ write_lock(&ct_lock);
|
||||
+ if(TOTAL_PACKETS == 1 && !skb->cb[0] && !master_conntrack->layer7.app_data) {
|
||||
+ master_conntrack->layer7.app_data = kmalloc(maxdatalen, GFP_ATOMIC);
|
||||
+ if(!master_conntrack->layer7.app_data){
|
||||
+ if (net_ratelimit())
|
||||
+ if(!master_conntrack->layer7.app_data){
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in match, bailing.\n");
|
||||
+ write_unlock(&ct_lock);
|
||||
+ return info->invert;
|
||||
@ -511,7 +513,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ }
|
||||
+ write_unlock(&ct_lock);
|
||||
+
|
||||
+ /* Can be here, but unallocated, if numpackets is increased near
|
||||
+ /* Can be here, but unallocated, if numpackets is increased near
|
||||
+ the beginning of a connection */
|
||||
+ if(master_conntrack->layer7.app_data == NULL)
|
||||
+ return (info->invert); /* unmatched */
|
||||
@ -543,7 +545,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ write_lock(&ct_lock);
|
||||
+ master_conntrack->layer7.app_proto = kmalloc(strlen(info->protocol)+1, GFP_ATOMIC);
|
||||
+ if(!master_conntrack->layer7.app_proto){
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory in match, bailing.\n");
|
||||
+ write_unlock(&ct_lock);
|
||||
+ return (pattern_result ^ info->invert);
|
||||
@ -558,19 +560,11 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ return (pattern_result ^ info->invert);
|
||||
+}
|
||||
+
|
||||
+static int checkentry(const char *tablename, const struct ipt_ip *ip,
|
||||
+ void *matchinfo, unsigned int matchsize, unsigned int hook_mask)
|
||||
+{
|
||||
+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_layer7_info)))
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static struct ipt_match layer7_match = {
|
||||
+ .name = "layer7",
|
||||
+ .match = &match,
|
||||
+ .checkentry = &checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+static struct ipt_match layer7_match = {
|
||||
+ .name = "layer7",
|
||||
+ .match = &match,
|
||||
+ .matchsize = sizeof(struct ipt_layer7_info),
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
+
|
||||
+/* taken from drivers/video/modedb.c */
|
||||
@ -590,30 +584,30 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+}
|
||||
+
|
||||
+/* write out num_packets to userland. */
|
||||
+static int layer7_read_proc(char* page, char ** start, off_t off, int count,
|
||||
+ int* eof, void * data)
|
||||
+static int layer7_read_proc(char* page, char ** start, off_t off, int count,
|
||||
+ int* eof, void * data)
|
||||
+{
|
||||
+ if(num_packets > 99 && net_ratelimit())
|
||||
+ if(num_packets > 99 && net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: NOT REACHED. num_packets too big\n");
|
||||
+
|
||||
+
|
||||
+ page[0] = num_packets/10 + '0';
|
||||
+ page[1] = num_packets%10 + '0';
|
||||
+ page[2] = '\n';
|
||||
+ page[3] = '\0';
|
||||
+
|
||||
+
|
||||
+ *eof=1;
|
||||
+
|
||||
+ return 3;
|
||||
+}
|
||||
+
|
||||
+/* Read in num_packets from userland */
|
||||
+static int layer7_write_proc(struct file* file, const char* buffer,
|
||||
+ unsigned long count, void *data)
|
||||
+static int layer7_write_proc(struct file* file, const char* buffer,
|
||||
+ unsigned long count, void *data)
|
||||
+{
|
||||
+ char * foo = kmalloc(count, GFP_ATOMIC);
|
||||
+
|
||||
+ if(!foo){
|
||||
+ if (net_ratelimit())
|
||||
+ if (net_ratelimit())
|
||||
+ printk(KERN_ERR "layer7: out of memory, bailing. num_packets unchanged.\n");
|
||||
+ return count;
|
||||
+ }
|
||||
@ -621,12 +615,12 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ if(copy_from_user(foo, buffer, count)) {
|
||||
+ return -EFAULT;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+
|
||||
+ num_packets = my_atoi(foo);
|
||||
+ kfree (foo);
|
||||
+
|
||||
+ /* This has an arbitrary limit to make the math easier. I'm lazy.
|
||||
+ /* This has an arbitrary limit to make the math easier. I'm lazy.
|
||||
+ But anyway, 99 is a LOT! If you want more, you're doing it wrong! */
|
||||
+ if(num_packets > 99) {
|
||||
+ printk(KERN_WARNING "layer7: num_packets can't be > 99.\n");
|
||||
@ -635,7 +629,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ printk(KERN_WARNING "layer7: num_packets can't be < 1.\n");
|
||||
+ num_packets = 1;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return count;
|
||||
+}
|
||||
+
|
||||
@ -660,12 +654,12 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+ printk(KERN_WARNING "layer7: maxdatalen can't be < 1, using 1\n");
|
||||
+ maxdatalen = 1;
|
||||
+ }
|
||||
+ /* This is not a hard limit. It's just here to prevent people from
|
||||
+ /* This is not a hard limit. It's just here to prevent people from
|
||||
+ bringing their slow machines to a grinding halt. */
|
||||
+ else if(maxdatalen > 65536) {
|
||||
+ printk(KERN_WARNING "layer7: maxdatalen can't be > 65536, using 65536\n");
|
||||
+ maxdatalen = 65536;
|
||||
+ }
|
||||
+ maxdatalen = 65536;
|
||||
+ }
|
||||
+ return ipt_register_match(&layer7_match);
|
||||
+}
|
||||
+
|
||||
@ -677,10 +671,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_layer7.c linux-2.6.17-owrt/net/ipv
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/Kconfig linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.17/net/ipv4/netfilter/Kconfig 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig 2006-06-18 12:32:58.000000000 +0200
|
||||
@@ -314,6 +314,24 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Kconfig linux-2.6.19.dev/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -329,6 +329,24 @@
|
||||
destination IP' or `500pps from any given source IP' with a single
|
||||
IPtables rule.
|
||||
|
||||
@ -705,10 +699,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/Kconfig linux-2.6.17-owrt/net/ipv4/net
|
||||
# `filter', generic and specific targets
|
||||
config IP_NF_FILTER
|
||||
tristate "Packet filtering"
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/Makefile linux-2.6.17-owrt/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.17/net/ipv4/netfilter/Makefile 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/Makefile 2006-06-18 12:29:04.000000000 +0200
|
||||
@@ -62,6 +62,8 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Makefile linux-2.6.19.dev/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Makefile 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -63,6 +63,8 @@
|
||||
obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
|
||||
|
||||
@ -717,9 +711,9 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/Makefile linux-2.6.17-owrt/net/ipv4/ne
|
||||
# targets
|
||||
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.c 2006-06-18 12:29:04.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/regexp/regexp.c linux-2.6.19.dev/net/ipv4/netfilter/regexp/regexp.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/regexp/regexp.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/regexp/regexp.c 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -0,0 +1,1195 @@
|
||||
+/*
|
||||
+ * regcomp and regexec -- regsub and regerror are elsewhere
|
||||
@ -748,7 +742,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/
|
||||
+ *
|
||||
+ * This code was modified by Ethan Sommer to work within the kernel
|
||||
+ * (it now uses kmalloc etc..)
|
||||
+ *
|
||||
+ *
|
||||
+ * Modified slightly by Matthew Strait to use more modern C.
|
||||
+ */
|
||||
+
|
||||
@ -1076,7 +1070,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/
|
||||
+ }
|
||||
+
|
||||
+ /* Make a closing node, and hook it on the end. */
|
||||
+ ender = regnode((paren) ? CLOSE+parno : END);
|
||||
+ ender = regnode((paren) ? CLOSE+parno : END);
|
||||
+ regtail(ret, ender);
|
||||
+
|
||||
+ /* Hook the tails of the branches to the closing node. */
|
||||
@ -1767,7 +1761,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/
|
||||
+/*
|
||||
+ - regnext - dig the "next" pointer out of a node
|
||||
+ */
|
||||
+static char*
|
||||
+static char*
|
||||
+regnext(char *p)
|
||||
+{
|
||||
+ register int offset;
|
||||
@ -1808,7 +1802,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/
|
||||
+ next = regnext(s);
|
||||
+ if (next == NULL) /* Next ptr. */
|
||||
+ printf("(0)");
|
||||
+ else
|
||||
+ else
|
||||
+ printf("(%d)", (s-r->program)+(next-s));
|
||||
+ s += 3;
|
||||
+ if (op == ANYOF || op == ANYBUT || op == EXACTLY) {
|
||||
@ -1916,9 +1910,9 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.c linux-2.6.17-owrt/net/
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.h linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.h
|
||||
--- linux-2.6.17/net/ipv4/netfilter/regexp/regexp.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regexp.h 2006-06-18 12:29:04.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/regexp/regexp.h linux-2.6.19.dev/net/ipv4/netfilter/regexp/regexp.h
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/regexp/regexp.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/regexp/regexp.h 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*
|
||||
+ * Definitions etc. for regexp(3) routines.
|
||||
@ -1931,8 +1925,8 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.h linux-2.6.17-owrt/net/
|
||||
+#define REGEXP_H
|
||||
+
|
||||
+
|
||||
+/*
|
||||
+http://www.opensource.apple.com/darwinsource/10.3/expect-1/expect/expect.h ,
|
||||
+/*
|
||||
+http://www.opensource.apple.com/darwinsource/10.3/expect-1/expect/expect.h ,
|
||||
+which contains a version of this library, says:
|
||||
+
|
||||
+ *
|
||||
@ -1961,18 +1955,18 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regexp.h linux-2.6.17-owrt/net/
|
||||
+void regerror(char *s);
|
||||
+
|
||||
+#endif
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regmagic.h linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regmagic.h
|
||||
--- linux-2.6.17/net/ipv4/netfilter/regexp/regmagic.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regmagic.h 2006-06-18 12:29:04.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/regexp/regmagic.h linux-2.6.19.dev/net/ipv4/netfilter/regexp/regmagic.h
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/regexp/regmagic.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/regexp/regmagic.h 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -0,0 +1,5 @@
|
||||
+/*
|
||||
+ * The first byte of the regexp internal "program" is actually this magic
|
||||
+ * number; the start node begins in the second byte.
|
||||
+ */
|
||||
+#define MAGIC 0234
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regsub.c linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regsub.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/regexp/regsub.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/regexp/regsub.c 2006-06-18 12:29:04.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/regexp/regsub.c linux-2.6.19.dev/net/ipv4/netfilter/regexp/regsub.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/regexp/regsub.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/regexp/regsub.c 2006-12-14 03:13:37.000000000 +0100
|
||||
@@ -0,0 +1,95 @@
|
||||
+/*
|
||||
+ * regsub
|
||||
@ -2030,7 +2024,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/regexp/regsub.c linux-2.6.17-owrt/net/
|
||||
+ register char c;
|
||||
+ register int no;
|
||||
+ register int len;
|
||||
+
|
||||
+
|
||||
+ /* Not necessary and gcc doesn't like it -MLS */
|
||||
+ /*extern char *strncpy();*/
|
||||
+
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ipt_ipp2p.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_ipp2p.h
|
||||
--- linux-2.6.17/include/linux/netfilter_ipv4/ipt_ipp2p.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ipt_ipp2p.h 2006-06-18 12:37:14.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_ipp2p.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_ipp2p.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_ipp2p.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_ipp2p.h 2006-12-14 03:13:39.000000000 +0100
|
||||
@@ -0,0 +1,31 @@
|
||||
+#ifndef __IPT_IPP2P_H
|
||||
+#define __IPT_IPP2P_H
|
||||
@ -33,10 +33,10 @@ diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ipt_ipp2p.h linux-2.6.17-owr
|
||||
+#define IPP2P_MUTE (1 << 14)
|
||||
+#define IPP2P_WASTE (1 << 15)
|
||||
+#define IPP2P_XDCC (1 << 16)
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4/netfilter/ipt_ipp2p.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ipt_ipp2p.c 2006-06-18 12:37:14.000000000 +0200
|
||||
@@ -0,0 +1,868 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_ipp2p.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ipt_ipp2p.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_ipp2p.c 2006-12-14 03:13:39.000000000 +0100
|
||||
@@ -0,0 +1,881 @@
|
||||
+#if defined(MODVERSIONS)
|
||||
+#include <linux/modversions.h>
|
||||
+#endif
|
||||
@ -64,12 +64,12 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ t += 8;
|
||||
+
|
||||
+ switch (t[0]) {
|
||||
+ case 0xe3:
|
||||
+ case 0xe3:
|
||||
+ { /*edonkey*/
|
||||
+ switch (t[1])
|
||||
+ switch (t[1])
|
||||
+ {
|
||||
+ /* client -> server status request */
|
||||
+ case 0x96:
|
||||
+ case 0x96:
|
||||
+ if (packet_len == 14) return ((IPP2P_EDK * 100) + 50);
|
||||
+ break;
|
||||
+ /* server -> client status request */
|
||||
@ -91,9 +91,9 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ case 0xe4:
|
||||
+ case 0xe4:
|
||||
+ {
|
||||
+ switch (t[1])
|
||||
+ switch (t[1])
|
||||
+ {
|
||||
+ /* e4 20 .. | size == 43 */
|
||||
+ case 0x20: if ((packet_len == 43) && (t[2] != 0x00) && (t[34] != 0x00)) return ((IPP2P_EDK * 100) + 60);
|
||||
@ -139,7 +139,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+{
|
||||
+ unsigned char *t = haystack;
|
||||
+ t += 8;
|
||||
+
|
||||
+
|
||||
+ if (memcmp(t, "GND", 3) == 0) return ((IPP2P_GNU * 100) + 51);
|
||||
+ if (memcmp(t, "GNUTELLA ", 9) == 0) return ((IPP2P_GNU * 100) + 52);
|
||||
+ return 0;
|
||||
@ -151,12 +151,12 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+udp_search_kazaa (unsigned char *haystack, int packet_len)
|
||||
+{
|
||||
+ unsigned char *t = haystack;
|
||||
+
|
||||
+
|
||||
+ if (t[packet_len-1] == 0x00){
|
||||
+ t += (packet_len - 6);
|
||||
+ if (memcmp(t, "KaZaA", 5) == 0) return (IPP2P_KAZAA * 100 +50);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ return 0;
|
||||
+}/*udp_search_kazaa*/
|
||||
+
|
||||
@ -183,33 +183,33 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ {
|
||||
+ case 24:
|
||||
+ /* ^ 00 00 04 17 27 10 19 80 */
|
||||
+ if ((ntohl(get_u32(haystack, 8)) == 0x00000417) && (ntohl(get_u32(haystack, 12)) == 0x27101980))
|
||||
+ if ((ntohl(get_u32(haystack, 8)) == 0x00000417) && (ntohl(get_u32(haystack, 12)) == 0x27101980))
|
||||
+ return (IPP2P_BIT * 100 + 50);
|
||||
+ break;
|
||||
+ case 44:
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000400) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000400) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ return (IPP2P_BIT * 100 + 51);
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000400))
|
||||
+ return (IPP2P_BIT * 100 + 61);
|
||||
+ break;
|
||||
+ case 65:
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000404) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000404) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ return (IPP2P_BIT * 100 + 52);
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000404))
|
||||
+ return (IPP2P_BIT * 100 + 62);
|
||||
+ break;
|
||||
+ case 67:
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000406) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000406) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ return (IPP2P_BIT * 100 + 53);
|
||||
+ if (get_u32(haystack, 16) == __constant_htonl(0x00000406))
|
||||
+ return (IPP2P_BIT * 100 + 63);
|
||||
+ break;
|
||||
+ case 211:
|
||||
+ if (get_u32(haystack, 8) == __constant_htonl(0x00000405))
|
||||
+ if (get_u32(haystack, 8) == __constant_htonl(0x00000405))
|
||||
+ return (IPP2P_BIT * 100 + 54);
|
||||
+ break;
|
||||
+ case 29:
|
||||
+ if ((get_u32(haystack, 8) == __constant_htonl(0x00000401)))
|
||||
+ if ((get_u32(haystack, 8) == __constant_htonl(0x00000401)))
|
||||
+ return (IPP2P_BIT * 100 + 55);
|
||||
+ break;
|
||||
+ case 52:
|
||||
@ -219,11 +219,11 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ break;
|
||||
+ default:
|
||||
+ /* this packet does not have a constant size */
|
||||
+ if (packet_len >= 40 && get_u32(haystack, 16) == __constant_htonl(0x00000402) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ if (packet_len >= 40 && get_u32(haystack, 16) == __constant_htonl(0x00000402) && get_u32(haystack, 36) == __constant_htonl(0x00000104))
|
||||
+ return (IPP2P_BIT * 100 + 56);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* some extra-bitcomet rules:
|
||||
+ * "d1:" [a|r] "d2:id20:"
|
||||
+ */
|
||||
@ -235,7 +235,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ return (IPP2P_BIT * 100 + 57);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+#if 0
|
||||
+ /* bitlord rules */
|
||||
+ /* packetlen must be bigger than 40 */
|
||||
@ -243,18 +243,18 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ if (packet_len > 40 && get_u32(haystack, 8) == 0x00000000)
|
||||
+ {
|
||||
+ /* first rule: 00 00 00 00 01 00 00 xx xx xx xx 00 00 00 00*/
|
||||
+ if (get_u32(haystack, 12) == 0x00000000 &&
|
||||
+ if (get_u32(haystack, 12) == 0x00000000 &&
|
||||
+ get_u32(haystack, 16) == 0x00010000 &&
|
||||
+ get_u32(haystack, 24) == 0x00000000 )
|
||||
+ return (IPP2P_BIT * 100 + 71);
|
||||
+
|
||||
+
|
||||
+ /* 00 01 00 00 0d 00 00 xx xx xx xx 00 00 00 00*/
|
||||
+ if (get_u32(haystack, 12) == 0x00000001 &&
|
||||
+ if (get_u32(haystack, 12) == 0x00000001 &&
|
||||
+ get_u32(haystack, 16) == 0x000d0000 &&
|
||||
+ get_u32(haystack, 24) == 0x00000000 )
|
||||
+ return (IPP2P_BIT * 100 + 71);
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
@ -270,7 +270,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+//int search_ares (unsigned char *haystack, int packet_len, int head_len)
|
||||
+{
|
||||
+// const unsigned char *t = haystack + head_len;
|
||||
+
|
||||
+
|
||||
+ /* all ares packets start with */
|
||||
+ if (payload[1] == 0 && (plen - payload[0]) == 3)
|
||||
+ {
|
||||
@ -293,7 +293,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+#if 0
|
||||
+#if 0
|
||||
+ /* found connect packet: 03 00 5a 04 03 05 */
|
||||
+ /* new version ares 1.8: 03 00 5a xx xx 05 */
|
||||
+ if ((plen) == 6){ /* possible connect command*/
|
||||
@ -327,7 +327,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+#endif /* IPP2P_DEBUG_SOUL */
|
||||
+ return ((IPP2P_SOUL * 100) + 1);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* next match: 01 yy 00 00 | yy can be everything */
|
||||
+ if ( get_u8(payload, 4) == 0x01 && get_u16(payload, 6) == 0x0000 )
|
||||
+ {
|
||||
@ -336,7 +336,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+#endif /* IPP2P_DEBUG_SOUL */
|
||||
+ return ((IPP2P_SOUL * 100) + 2);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* other soulseek commandos are: 1-5,7,9,13-18,22,23,26,28,35-37,40-46,50,51,60,62-69,91,92,1001 */
|
||||
+ /* try to do this in an intelligent way */
|
||||
+ /* get all small commandos */
|
||||
@ -359,8 +359,8 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+#endif /* IPP2P_DEBUG_SOUL */
|
||||
+ return ((IPP2P_SOUL * 100) + 3);
|
||||
+ }
|
||||
+
|
||||
+ if (m > 0 && m < 6 )
|
||||
+
|
||||
+ if (m > 0 && m < 6 )
|
||||
+ {
|
||||
+#ifdef IPP2P_DEBUG_SOUL
|
||||
+ printk(KERN_DEBUG "3: Soulseek command 0x%x recognized\n",get_u16(payload, 4));
|
||||
@ -391,7 +391,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ return ((IPP2P_SOUL * 100) + 7);
|
||||
+ }
|
||||
+
|
||||
+ if (m > 61 && m < 70 )
|
||||
+ if (m > 61 && m < 70 )
|
||||
+ {
|
||||
+#ifdef IPP2P_DEBUG_SOUL
|
||||
+ printk(KERN_DEBUG "7: Soulseek command 0x%x recognized\n",get_u16(payload, 4));
|
||||
@ -403,7 +403,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ printk(KERN_DEBUG "unknown SOULSEEK command: 0x%x, first 16 bit: 0x%x, first 8 bit: 0x%x ,soulseek ???\n",get_u32(payload, 4),get_u16(payload, 4) >> 16,get_u8(payload, 4) >> 24);
|
||||
+#endif /* IPP2P_DEBUG_SOUL */
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* match 14 00 00 00 01 yy 00 00 00 STRING(YY) 01 00 00 00 00 46|50 00 00 00 00 */
|
||||
+ /* without size at the beginning !!! */
|
||||
+ if ( get_u32(payload, 0) == 0x14 && get_u8(payload, 4) == 0x01 )
|
||||
@ -433,7 +433,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ if (((plen) == 3) && (memcmp(payload, "GET", 3) == 0)) return ((IPP2P_WINMX * 100) + 2);
|
||||
+ //if (packet_len < (head_len + 10)) return 0;
|
||||
+ if (plen < 10) return 0;
|
||||
+
|
||||
+
|
||||
+ if ((memcmp(payload, "SEND", 4) == 0) || (memcmp(payload, "GET", 3) == 0)){
|
||||
+ u16 c=4;
|
||||
+ const u16 end=plen-2;
|
||||
@ -449,7 +449,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ c++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if ( plen == 149 && payload[0] == '8' )
|
||||
+ {
|
||||
+#ifdef IPP2P_DEBUG_WINMX
|
||||
@ -459,7 +459,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+// get_u32(payload,33) == __constant_htonl(0x71182b1a) && get_u32(payload,37) == __constant_htonl(0x05050000) &&
|
||||
+// get_u32(payload,133) == __constant_htonl(0x31097edf) && get_u32(payload,145) == __constant_htonl(0xdcb8f792))
|
||||
+ get_u16(payload,39) == 0 && get_u16(payload,135) == __constant_htons(0x7edf) && get_u16(payload,147) == __constant_htons(0xf792))
|
||||
+
|
||||
+
|
||||
+ {
|
||||
+#ifdef IPP2P_DEBUG_WINMX
|
||||
+ printk(KERN_INFO "got WinMX\n");
|
||||
@ -476,7 +476,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+search_apple (const unsigned char *payload, const u16 plen)
|
||||
+{
|
||||
+ if ( (plen > 7) && (payload[6] == 0x0d) && (payload[7] == 0x0a) && (memcmp(payload, "ajprot", 6) == 0)) return (IPP2P_APPLE * 100);
|
||||
+
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
@ -488,11 +488,11 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ if (plen > 20)
|
||||
+ {
|
||||
+ /* test for match 0x13+"BitTorrent protocol" */
|
||||
+ if (payload[0] == 0x13)
|
||||
+ if (payload[0] == 0x13)
|
||||
+ {
|
||||
+ if (memcmp(payload+1, "BitTorrent protocol", 19) == 0) return (IPP2P_BIT * 100);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* get tracker commandos, all starts with GET /
|
||||
+ * then it can follow: scrape| announce
|
||||
+ * and then ?hash_info=
|
||||
@ -504,14 +504,14 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ /* message announce */
|
||||
+ if ( memcmp(payload+5,"announce?info_hash=",19)==0 ) return (IPP2P_BIT * 100 + 2);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* bitcomet encryptes the first packet, so we have to detect another
|
||||
+ /* bitcomet encryptes the first packet, so we have to detect another
|
||||
+ * one later in the flow */
|
||||
+ /* first try failed, too many missdetections */
|
||||
+ //if ( size == 5 && get_u32(t,0) == __constant_htonl(1) && t[4] < 3) return (IPP2P_BIT * 100 + 3);
|
||||
+
|
||||
+
|
||||
+ /* second try: block request packets */
|
||||
+ if ( plen == 17 && get_u32(payload,0) == __constant_htonl(0x0d) && payload[4] == 0x06 && get_u32(payload,13) == __constant_htonl(0x4000) ) return (IPP2P_BIT * 100 + 3);
|
||||
+ }
|
||||
@ -540,7 +540,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ if ((payload[plen-2] == 0x0d) && (payload[plen-1] == 0x0a))
|
||||
+ {
|
||||
+ if (memcmp(payload, "GET /get/", 9) == 0) return ((IPP2P_DATA_GNU * 100) + 1);
|
||||
+ if (memcmp(payload, "GET /uri-res/", 13) == 0) return ((IPP2P_DATA_GNU * 100) + 2);
|
||||
+ if (memcmp(payload, "GET /uri-res/", 13) == 0) return ((IPP2P_DATA_GNU * 100) + 2);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
@ -550,20 +550,20 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+int
|
||||
+search_all_gnu (const unsigned char *payload, const u16 plen)
|
||||
+{
|
||||
+
|
||||
+
|
||||
+ if ((payload[plen-2] == 0x0d) && (payload[plen-1] == 0x0a))
|
||||
+ {
|
||||
+
|
||||
+
|
||||
+ if (memcmp(payload, "GNUTELLA CONNECT/", 17) == 0) return ((IPP2P_GNU * 100) + 1);
|
||||
+ if (memcmp(payload, "GNUTELLA/", 9) == 0) return ((IPP2P_GNU * 100) + 2);
|
||||
+
|
||||
+
|
||||
+ if (memcmp(payload, "GNUTELLA/", 9) == 0) return ((IPP2P_GNU * 100) + 2);
|
||||
+
|
||||
+
|
||||
+ if ((memcmp(payload, "GET /get/", 9) == 0) || (memcmp(payload, "GET /uri-res/", 13) == 0))
|
||||
+ {
|
||||
+ {
|
||||
+ u16 c=8;
|
||||
+ const u16 end=plen-22;
|
||||
+ while (c < end) {
|
||||
+ if ( payload[c] == 0x0a && payload[c+1] == 0x0d && ((memcmp(&payload[c+2], "X-Gnutella-", 11) == 0) || (memcmp(&payload[c+2], "X-Queue:", 8) == 0)))
|
||||
+ if ( payload[c] == 0x0a && payload[c+1] == 0x0d && ((memcmp(&payload[c+2], "X-Gnutella-", 11) == 0) || (memcmp(&payload[c+2], "X-Queue:", 8) == 0)))
|
||||
+ return ((IPP2P_GNU * 100) + 3);
|
||||
+ c++;
|
||||
+ }
|
||||
@ -581,7 +581,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ {
|
||||
+
|
||||
+ if (memcmp(payload, "GIVE ", 5) == 0) return ((IPP2P_KAZAA * 100) + 1);
|
||||
+
|
||||
+
|
||||
+ if (memcmp(payload, "GET /", 5) == 0) {
|
||||
+ u16 c = 8;
|
||||
+ const u16 end=plen-22;
|
||||
@ -599,12 +599,12 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+int
|
||||
+search_edk (const unsigned char *payload, const u16 plen)
|
||||
+{
|
||||
+ if (payload[0] != 0xe3)
|
||||
+ if (payload[0] != 0xe3)
|
||||
+ return 0;
|
||||
+ else {
|
||||
+ if (payload[5] == 0x47)
|
||||
+ if (payload[5] == 0x47)
|
||||
+ return (IPP2P_DATA_EDK * 100);
|
||||
+ else
|
||||
+ else
|
||||
+ return 0;
|
||||
+ }
|
||||
+}
|
||||
@ -615,10 +615,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+int
|
||||
+search_all_edk (const unsigned char *payload, const u16 plen)
|
||||
+{
|
||||
+ if (payload[0] != 0xe3)
|
||||
+ if (payload[0] != 0xe3)
|
||||
+ return 0;
|
||||
+ else {
|
||||
+ //t += head_len;
|
||||
+ //t += head_len;
|
||||
+ const u16 cmd = get_u16(payload, 1);
|
||||
+ if (cmd == (plen - 5)) {
|
||||
+ switch (payload[5]) {
|
||||
@ -636,14 +636,14 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+search_dc (const unsigned char *payload, const u16 plen)
|
||||
+{
|
||||
+
|
||||
+ if (payload[0] != 0x24 )
|
||||
+ if (payload[0] != 0x24 )
|
||||
+ return 0;
|
||||
+ else {
|
||||
+ if (memcmp(&payload[1], "Send|", 5) == 0)
|
||||
+ return (IPP2P_DATA_DC * 100);
|
||||
+ else
|
||||
+ return 0;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+}
|
||||
+
|
||||
@ -654,13 +654,13 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+{
|
||||
+// unsigned char *t = haystack;
|
||||
+
|
||||
+ if (payload[0] == 0x24 && payload[plen-1] == 0x7c)
|
||||
+ if (payload[0] == 0x24 && payload[plen-1] == 0x7c)
|
||||
+ {
|
||||
+ const unsigned char *t=&payload[1];
|
||||
+ /* Client-Hub-Protocol */
|
||||
+ if (memcmp(t, "Lock ", 5) == 0) return ((IPP2P_DC * 100) + 1);
|
||||
+ /* Client-Client-Protocol, some are already recognized by client-hub (like lock) */
|
||||
+ if (memcmp(t, "MyNick ", 7) == 0) return ((IPP2P_DC * 100) + 38);
|
||||
+ if (memcmp(t, "MyNick ", 7) == 0) return ((IPP2P_DC * 100) + 38);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
@ -673,13 +673,13 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ {
|
||||
+ //printk(KERN_DEBUG "size hit: %u",size);
|
||||
+ if (memcmp(payload,"PublicKey: ",11) == 0 )
|
||||
+ {
|
||||
+ {
|
||||
+ return ((IPP2P_MUTE * 100) + 0);
|
||||
+
|
||||
+
|
||||
+/* if (memcmp(t+size-14,"\x0aEndPublicKey\x0a",14) == 0)
|
||||
+ {
|
||||
+ printk(KERN_DEBUG "end pubic key hit: %u",size);
|
||||
+
|
||||
+
|
||||
+ }*/
|
||||
+ }
|
||||
+ }
|
||||
@ -694,10 +694,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ /* search in small packets only */
|
||||
+ if (plen > 20 && plen < 200 && payload[plen-1] == 0x0a && payload[plen-2] == 0x0d && memcmp(payload,"PRIVMSG ",8) == 0)
|
||||
+ {
|
||||
+
|
||||
+
|
||||
+ u16 x=10;
|
||||
+ const u16 end=plen - 13;
|
||||
+
|
||||
+
|
||||
+ /* is seems to be a irc private massage, chedck for xdcc command */
|
||||
+ while (x < end)
|
||||
+ {
|
||||
@ -758,7 +758,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ {IPP2P_BIT,SHORT_HAND_IPP2P,23, &udp_search_bit},
|
||||
+ {IPP2P_GNU,SHORT_HAND_IPP2P,11, &udp_search_gnu},
|
||||
+ {IPP2P_EDK,SHORT_HAND_IPP2P,9, &udp_search_edk},
|
||||
+ {IPP2P_DC,SHORT_HAND_IPP2P,12, &udp_search_directconnect},
|
||||
+ {IPP2P_DC,SHORT_HAND_IPP2P,12, &udp_search_directconnect},
|
||||
+ {0,0,0,NULL}
|
||||
+};
|
||||
+
|
||||
@ -767,14 +767,17 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+match(const struct sk_buff *skb,
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ const struct xt_match *match,
|
||||
+#endif
|
||||
+ const void *matchinfo,
|
||||
+ int offset,
|
||||
+
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ unsigned int protoff,
|
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
||||
+ const void *hdr,
|
||||
+ u_int16_t datalen,
|
||||
+#endif
|
||||
+
|
||||
+ int *hotdrop)
|
||||
+{
|
||||
+ const struct ipt_p2p_info *info = matchinfo;
|
||||
@ -789,7 +792,7 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ if (info->debug) printk("IPP2P.match: offset found %i \n",offset);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /*make sure that skb is linear*/
|
||||
+ if(skb_is_nonlinear(skb)){
|
||||
+ if (info->debug) printk("IPP2P.match: nonlinear skb found\n");
|
||||
@ -803,11 +806,11 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ case IPPROTO_TCP: /*what to do with a TCP packet*/
|
||||
+ {
|
||||
+ struct tcphdr *tcph = (void *) ip + ip->ihl * 4;
|
||||
+
|
||||
+
|
||||
+ if (tcph->fin) return 0; /*if FIN bit is set bail out*/
|
||||
+ if (tcph->syn) return 0; /*if SYN bit is set bail out*/
|
||||
+ if (tcph->rst) return 0; /*if RST bit is set bail out*/
|
||||
+
|
||||
+
|
||||
+ haystack += tcph->doff * 4; /*get TCP-Header-Size*/
|
||||
+ hlen -= tcph->doff * 4;
|
||||
+ while (matchlist[i].command) {
|
||||
@ -815,9 +818,9 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ ((info->cmd & matchlist[i].short_hand) == matchlist[i].short_hand)) &&
|
||||
+ (hlen > matchlist[i].packet_len)) {
|
||||
+ p2p_result = matchlist[i].function_name(haystack, hlen);
|
||||
+ if (p2p_result)
|
||||
+ if (p2p_result)
|
||||
+ {
|
||||
+ if (info->debug) printk("IPP2P.debug:TCP-match: %i from: %u.%u.%u.%u:%i to: %u.%u.%u.%u:%i Length: %i\n",
|
||||
+ if (info->debug) printk("IPP2P.debug:TCP-match: %i from: %u.%u.%u.%u:%i to: %u.%u.%u.%u:%i Length: %i\n",
|
||||
+ p2p_result, NIPQUAD(ip->saddr),ntohs(tcph->source), NIPQUAD(ip->daddr),ntohs(tcph->dest),hlen);
|
||||
+ return p2p_result;
|
||||
+ }
|
||||
@ -826,27 +829,27 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ }
|
||||
+ return p2p_result;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ case IPPROTO_UDP: /*what to do with an UDP packet*/
|
||||
+ {
|
||||
+ struct udphdr *udph = (void *) ip + ip->ihl * 4;
|
||||
+
|
||||
+
|
||||
+ while (udp_list[i].command){
|
||||
+ if ((((info->cmd & udp_list[i].command) == udp_list[i].command) ||
|
||||
+ ((info->cmd & udp_list[i].short_hand) == udp_list[i].short_hand)) &&
|
||||
+ (hlen > udp_list[i].packet_len)) {
|
||||
+ p2p_result = udp_list[i].function_name(haystack, hlen);
|
||||
+ if (p2p_result){
|
||||
+ if (info->debug) printk("IPP2P.debug:UDP-match: %i from: %u.%u.%u.%u:%i to: %u.%u.%u.%u:%i Length: %i\n",
|
||||
+ if (info->debug) printk("IPP2P.debug:UDP-match: %i from: %u.%u.%u.%u:%i to: %u.%u.%u.%u:%i Length: %i\n",
|
||||
+ p2p_result, NIPQUAD(ip->saddr),ntohs(udph->source), NIPQUAD(ip->daddr),ntohs(udph->dest),hlen);
|
||||
+ return p2p_result;
|
||||
+ }
|
||||
+ }
|
||||
+ i++;
|
||||
+ }
|
||||
+ }
|
||||
+ return p2p_result;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ default: return 0;
|
||||
+ }
|
||||
+}
|
||||
@ -855,9 +858,16 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+
|
||||
+static int
|
||||
+checkentry(const char *tablename,
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ const void *ip,
|
||||
+ const struct xt_match *match,
|
||||
+#else
|
||||
+ const struct ipt_ip *ip,
|
||||
+#endif
|
||||
+ void *matchinfo,
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
|
||||
+ unsigned int matchsize,
|
||||
+#endif
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ /* Must specify -p tcp */
|
||||
@ -867,22 +877,25 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ * }*/
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+static struct ipt_match ipp2p_match = {
|
||||
+
|
||||
+static struct ipt_match ipp2p_match = {
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
||||
+ { NULL, NULL },
|
||||
+ "ipp2p",
|
||||
+ &match,
|
||||
+ &checkentry,
|
||||
+ NULL,
|
||||
+ { NULL, NULL },
|
||||
+ "ipp2p",
|
||||
+ &match,
|
||||
+ &checkentry,
|
||||
+ NULL,
|
||||
+ THIS_MODULE
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
+ .name = "ipp2p",
|
||||
+ .match = &match,
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ .matchsize = sizeof(struct ipt_p2p_info),
|
||||
+#endif
|
||||
+ .checkentry = &checkentry,
|
||||
+ .me = THIS_MODULE,
|
||||
+#endif
|
||||
@ -894,21 +907,21 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_ipp2p.c linux-2.6.17-owrt/net/ipv4
|
||||
+ printk(KERN_INFO "IPP2P v%s loading\n", IPP2P_VERSION);
|
||||
+ return ipt_register_match(&ipp2p_match);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void __exit fini(void)
|
||||
+{
|
||||
+ ipt_unregister_match(&ipp2p_match);
|
||||
+ printk(KERN_INFO "IPP2P v%s unloaded\n", IPP2P_VERSION);
|
||||
+ printk(KERN_INFO "IPP2P v%s unloaded\n", IPP2P_VERSION);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
+
|
||||
+
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/Kconfig linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.17/net/ipv4/netfilter/Kconfig 2006-06-18 12:36:55.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/Kconfig 2006-06-18 12:37:14.000000000 +0200
|
||||
@@ -222,6 +222,12 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Kconfig linux-2.6.19.dev/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:39.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:39.000000000 +0100
|
||||
@@ -248,6 +248,12 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
@ -921,10 +934,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/Kconfig linux-2.6.17-owrt/net/ipv4/net
|
||||
config IP_NF_MATCH_TOS
|
||||
tristate "TOS match support"
|
||||
depends on IP_NF_IPTABLES
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/Makefile linux-2.6.17-owrt/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.17/net/ipv4/netfilter/Makefile 2006-06-18 12:36:55.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/Makefile 2006-06-18 12:38:11.000000000 +0200
|
||||
@@ -61,7 +61,7 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Makefile linux-2.6.19.dev/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Makefile 2006-12-14 03:13:39.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Makefile 2006-12-14 03:13:39.000000000 +0100
|
||||
@@ -62,7 +62,7 @@
|
||||
obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nur linux-2.6.16/include/net/xfrmudp.h linux-2.6.16-owrt/include/net/xfrmudp.h
|
||||
--- linux-2.6.16/include/net/xfrmudp.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/include/net/xfrmudp.h 2006-03-22 21:39:54.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/include/net/xfrmudp.h linux-2.6.19.dev/include/net/xfrmudp.h
|
||||
--- linux-2.6.19.old/include/net/xfrmudp.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/net/xfrmudp.h 2006-12-14 03:13:41.000000000 +0100
|
||||
@@ -0,0 +1,10 @@
|
||||
+/*
|
||||
+ * pointer to function for type that xfrm4_input wants, to permit
|
||||
@ -12,10 +12,10 @@ diff -Nur linux-2.6.16/include/net/xfrmudp.h linux-2.6.16-owrt/include/net/xfrmu
|
||||
+extern int udp4_register_esp_rcvencap(xfrm4_rcv_encap_t func
|
||||
+ , xfrm4_rcv_encap_t *oldfunc);
|
||||
+extern int udp4_unregister_esp_rcvencap(xfrm4_rcv_encap_t func);
|
||||
diff -Nur linux-2.6.16/net/ipv4/Kconfig linux-2.6.16-owrt/net/ipv4/Kconfig
|
||||
--- linux-2.6.16/net/ipv4/Kconfig 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv4/Kconfig 2006-03-22 21:49:04.000000000 +0100
|
||||
@@ -271,6 +271,12 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/Kconfig linux-2.6.19.dev/net/ipv4/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv4/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/Kconfig 2006-12-14 03:13:41.000000000 +0100
|
||||
@@ -273,6 +273,12 @@
|
||||
Network), but can be distributed all over the Internet. If you want
|
||||
to do that, say Y here and to "IP multicast routing" below.
|
||||
|
||||
@ -28,10 +28,10 @@ diff -Nur linux-2.6.16/net/ipv4/Kconfig linux-2.6.16-owrt/net/ipv4/Kconfig
|
||||
config IP_MROUTE
|
||||
bool "IP: multicast routing"
|
||||
depends on IP_MULTICAST
|
||||
diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
--- linux-2.6.16/net/ipv4/udp.c 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv4/udp.c 2006-03-22 21:39:54.000000000 +0100
|
||||
@@ -109,11 +109,14 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/udp.c linux-2.6.19.dev/net/ipv4/udp.c
|
||||
--- linux-2.6.19.old/net/ipv4/udp.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/udp.c 2006-12-14 03:13:41.000000000 +0100
|
||||
@@ -108,11 +108,14 @@
|
||||
#include <net/inet_common.h>
|
||||
#include <net/checksum.h>
|
||||
#include <net/xfrm.h>
|
||||
@ -46,7 +46,7 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
DEFINE_SNMP_STAT(struct udp_mib, udp_statistics) __read_mostly;
|
||||
|
||||
struct hlist_head udp_hash[UDP_HTABLE_SIZE];
|
||||
@@ -882,6 +885,42 @@
|
||||
@@ -917,6 +920,42 @@
|
||||
sk_common_release(sk);
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
/* return:
|
||||
* 1 if the the UDP system should process it
|
||||
* 0 if we should drop this packet
|
||||
@@ -889,9 +928,9 @@
|
||||
@@ -924,9 +963,9 @@
|
||||
*/
|
||||
static int udp_encap_rcv(struct sock * sk, struct sk_buff *skb)
|
||||
{
|
||||
@ -99,12 +99,12 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
-#else
|
||||
+#else /* either CONFIG_XFRM or CONFIG_IPSEC_NAT_TRAVERSAL */
|
||||
struct udp_sock *up = udp_sk(sk);
|
||||
struct udphdr *uh = skb->h.uh;
|
||||
struct udphdr *uh;
|
||||
struct iphdr *iph;
|
||||
@@ -903,11 +942,11 @@
|
||||
|
||||
@@ -939,11 +978,11 @@
|
||||
/* if we're overly short, let UDP handle it */
|
||||
if (udpdata > skb->tail)
|
||||
len = skb->len - sizeof(struct udphdr);
|
||||
if (len <= 0)
|
||||
- return 1;
|
||||
+ return 2;
|
||||
|
||||
@ -113,9 +113,9 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
- return 1;
|
||||
+ return 3;
|
||||
|
||||
len = skb->tail - udpdata;
|
||||
|
||||
@@ -922,7 +961,7 @@
|
||||
/* If this is a paged skb, make sure we pull up
|
||||
* whatever data we need to look at. */
|
||||
@@ -966,7 +1005,7 @@
|
||||
len = sizeof(struct udphdr);
|
||||
} else
|
||||
/* Must be an IKE packet.. pass it through */
|
||||
@ -124,7 +124,7 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
break;
|
||||
case UDP_ENCAP_ESPINUDP_NON_IKE:
|
||||
/* Check if this is a keepalive packet. If so, eat it. */
|
||||
@@ -935,7 +974,7 @@
|
||||
@@ -979,7 +1018,7 @@
|
||||
len = sizeof(struct udphdr) + 2 * sizeof(u32);
|
||||
} else
|
||||
/* Must be an IKE packet.. pass it through */
|
||||
@ -133,7 +133,7 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -946,6 +985,8 @@
|
||||
@@ -990,6 +1029,8 @@
|
||||
*/
|
||||
if (skb_cloned(skb) && pskb_expand_head(skb, 0, 0, GFP_ATOMIC))
|
||||
return 0;
|
||||
@ -142,7 +142,7 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
|
||||
/* Now we can update and verify the packet length... */
|
||||
iph = skb->nh.iph;
|
||||
@@ -1010,9 +1051,13 @@
|
||||
@@ -1055,9 +1096,13 @@
|
||||
return 0;
|
||||
}
|
||||
if (ret < 0) {
|
||||
@ -159,7 +159,7 @@ diff -Nur linux-2.6.16/net/ipv4/udp.c linux-2.6.16-owrt/net/ipv4/udp.c
|
||||
return -ret;
|
||||
}
|
||||
/* FALLTHROUGH -- it's a UDP Packet */
|
||||
@@ -1559,3 +1604,9 @@
|
||||
@@ -1639,3 +1684,9 @@
|
||||
EXPORT_SYMBOL(udp_proc_register);
|
||||
EXPORT_SYMBOL(udp_proc_unregister);
|
||||
#endif
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,28 @@
|
||||
diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c linux-2.6.15-rc6/net/ipv4/netfilter/ipt_time.c
|
||||
--- linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-rc6/net/ipv4/netfilter/ipt_time.c 2006-01-07 13:02:59.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_time.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_time.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_time.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_time.h 2006-12-14 03:13:45.000000000 +0100
|
||||
@@ -0,0 +1,18 @@
|
||||
+#ifndef __ipt_time_h_included__
|
||||
+#define __ipt_time_h_included__
|
||||
+
|
||||
+
|
||||
+struct ipt_time_info {
|
||||
+ u_int8_t days_match; /* 1 bit per day. -SMTWTFS */
|
||||
+ u_int16_t time_start; /* 0 < time_start < 23*60+59 = 1439 */
|
||||
+ u_int16_t time_stop; /* 0:0 < time_stat < 23:59 */
|
||||
+
|
||||
+ /* FIXME: Keep this one for userspace iptables binary compability: */
|
||||
+ u_int8_t kerneltime; /* ignore skb time (and use kerneltime) or not. */
|
||||
+
|
||||
+ time_t date_start;
|
||||
+ time_t date_stop;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+#endif /* __ipt_time_h_included__ */
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_time.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_time.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ipt_time.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_time.c 2006-12-14 03:13:45.000000000 +0100
|
||||
@@ -0,0 +1,178 @@
|
||||
+/*
|
||||
+ This is a module which is used for time matching
|
||||
@ -50,8 +72,10 @@ diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c linux-2.6.15-rc6/n
|
||||
+match(const struct sk_buff *skb,
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ const struct xt_match *match,
|
||||
+ const void *matchinfo,
|
||||
+ int offset,
|
||||
+ unsigned int protoff,
|
||||
+ int *hotdrop)
|
||||
+{
|
||||
+ const struct ipt_time_info *info = matchinfo; /* match info for rule */
|
||||
@ -85,9 +109,9 @@ diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c linux-2.6.15-rc6/n
|
||||
+
|
||||
+static int
|
||||
+checkentry(const char *tablename,
|
||||
+ const struct ipt_ip *ip,
|
||||
+ const void *ip,
|
||||
+ const struct xt_match *match,
|
||||
+ void *matchinfo,
|
||||
+ unsigned int matchsize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ struct ipt_time_info *info = matchinfo; /* match info for rule */
|
||||
@ -100,9 +124,6 @@ diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c linux-2.6.15-rc6/n
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Check the size */
|
||||
+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_time_info)))
|
||||
+ return 0;
|
||||
+ /* Now check the coherence of the data ... */
|
||||
+ if ((info->time_start > 1439) || /* 23*60+59 = 1439*/
|
||||
+ (info->time_stop > 1439))
|
||||
@ -117,6 +138,7 @@ diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c linux-2.6.15-rc6/n
|
||||
+static struct ipt_match time_match = {
|
||||
+ .name = "time",
|
||||
+ .match = &match,
|
||||
+ .matchsize = sizeof(struct ipt_time_info),
|
||||
+ .checkentry = &checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
@ -180,14 +202,14 @@ diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/ipt_time.c linux-2.6.15-rc6/n
|
||||
+ r->tm_mon=i;
|
||||
+ r->tm_mday=work-__spm[i]+1;
|
||||
+}
|
||||
diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/Kconfig linux-2.6.15-rc6/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.15-rc6.orig/net/ipv4/netfilter/Kconfig 2006-01-07 13:00:21.000000000 +0100
|
||||
+++ linux-2.6.15-rc6/net/ipv4/netfilter/Kconfig 2006-01-07 13:05:07.000000000 +0100
|
||||
@@ -278,6 +278,22 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Kconfig linux-2.6.19.dev/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:45.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:45.000000000 +0100
|
||||
@@ -263,6 +263,22 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+
|
||||
+
|
||||
+config IP_NF_MATCH_TIME
|
||||
+ tristate 'TIME match support'
|
||||
+ depends on IP_NF_IPTABLES
|
||||
@ -196,46 +218,24 @@ diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/Kconfig linux-2.6.15-rc6/net/
|
||||
+ to match based on the packet arrival time/date
|
||||
+ (arrival time/date at the machine which netfilter is running on) or
|
||||
+ departure time/date (for locally generated packets).
|
||||
+
|
||||
+
|
||||
+ If you say Y here, try iptables -m time --help for more information.
|
||||
+ If you want to compile it as a module, say M here and read
|
||||
+
|
||||
+
|
||||
+ Documentation/modules.txt. If unsure, say `N'.
|
||||
+
|
||||
+
|
||||
config IP_NF_MATCH_RECENT
|
||||
tristate "recent match support"
|
||||
depends on IP_NF_IPTABLES
|
||||
diff -urN linux-2.6.15-rc6.orig/net/ipv4/netfilter/Makefile linux-2.6.15-rc6/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.15-rc6.orig/net/ipv4/netfilter/Makefile 2006-01-07 13:00:21.000000000 +0100
|
||||
+++ linux-2.6.15-rc6/net/ipv4/netfilter/Makefile 2006-01-07 13:03:50.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Makefile linux-2.6.19.dev/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Makefile 2006-12-14 03:13:45.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Makefile 2006-12-14 03:13:45.000000000 +0100
|
||||
@@ -58,6 +58,7 @@
|
||||
obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o
|
||||
+obj-$(CONFIG_IP_NF_MATCH_TIME) += ipt_time.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
|
||||
obj-$(CONFIG_IP_NF_MATCH_DSCP) += ipt_dscp.o
|
||||
diff -urN linux-2.6.15-rc6.orig/include/linux/netfilter_ipv4/ipt_time.h linux-2.6.15-rc6/include/linux/netfilter_ipv4/ipt_time.h
|
||||
--- linux-2.6.15-rc6.orig/include/linux/netfilter_ipv4/ipt_time.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.15-rc6/include/linux/netfilter_ipv4/ipt_time.h 2006-01-07 13:02:14.000000000 +0100
|
||||
@@ -0,0 +1,18 @@
|
||||
+#ifndef __ipt_time_h_included__
|
||||
+#define __ipt_time_h_included__
|
||||
+
|
||||
+
|
||||
+struct ipt_time_info {
|
||||
+ u_int8_t days_match; /* 1 bit per day. -SMTWTFS */
|
||||
+ u_int16_t time_start; /* 0 < time_start < 23*60+59 = 1439 */
|
||||
+ u_int16_t time_stop; /* 0:0 < time_stat < 23:59 */
|
||||
+
|
||||
+ /* FIXME: Keep this one for userspace iptables binary compability: */
|
||||
+ u_int8_t kerneltime; /* ignore skb time (and use kerneltime) or not. */
|
||||
+
|
||||
+ time_t date_start;
|
||||
+ time_t date_stop;
|
||||
+};
|
||||
+
|
||||
+
|
||||
+#endif /* __ipt_time_h_included__ */
|
||||
obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nur linux-2.6.16/drivers/net/imq.c linux-2.6.16-owrt/drivers/net/imq.c
|
||||
--- linux-2.6.16/drivers/net/imq.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/drivers/net/imq.c 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -0,0 +1,403 @@
|
||||
diff -urN linux-2.6.19.old/drivers/net/imq.c linux-2.6.19.dev/drivers/net/imq.c
|
||||
--- linux-2.6.19.old/drivers/net/imq.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/drivers/net/imq.c 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -0,0 +1,400 @@
|
||||
+/*
|
||||
+ * Pseudo-driver for the intermediate queue device.
|
||||
+ *
|
||||
@ -29,31 +29,31 @@ diff -Nur linux-2.6.16/drivers/net/imq.c linux-2.6.16-owrt/drivers/net/imq.c
|
||||
+ * the following changes:
|
||||
+ *
|
||||
+ * - Correction of ipv6 support "+"s issue (Hasso Tepper)
|
||||
+ * - Correction of imq_init_devs() issue that resulted in
|
||||
+ * - Correction of imq_init_devs() issue that resulted in
|
||||
+ * kernel OOPS unloading IMQ as module (Norbert Buchmuller)
|
||||
+ * - Addition of functionality to choose number of IMQ devices
|
||||
+ * during kernel config (Andre Correa)
|
||||
+ * - Addition of functionality to choose how IMQ hooks on
|
||||
+ * - Addition of functionality to choose how IMQ hooks on
|
||||
+ * PRE and POSTROUTING (after or before NAT) (Andre Correa)
|
||||
+ * - Cosmetic corrections (Norbert Buchmuller) (Andre Correa)
|
||||
+ *
|
||||
+ *
|
||||
+ * 2005/12/16 - IMQ versions between 2.6.7 and 2.6.13 were
|
||||
+ * released with almost no problems. 2.6.14-x was released
|
||||
+ * with some important changes: nfcache was removed; After
|
||||
+ * some weeks of trouble we figured out that some IMQ fields
|
||||
+ * 2005/12/16 - IMQ versions between 2.6.7 and 2.6.13 were
|
||||
+ * released with almost no problems. 2.6.14-x was released
|
||||
+ * with some important changes: nfcache was removed; After
|
||||
+ * some weeks of trouble we figured out that some IMQ fields
|
||||
+ * in skb were missing in skbuff.c - skb_clone and copy_skb_header.
|
||||
+ * These functions are correctly patched by this new patch version.
|
||||
+ *
|
||||
+ * Thanks for all who helped to figure out all the problems with
|
||||
+ * Thanks for all who helped to figure out all the problems with
|
||||
+ * 2.6.14.x: Patrick McHardy, Rune Kock, VeNoMouS, Max CtRiX,
|
||||
+ * Kevin Shanahan, Richard Lucassen, Valery Dachev (hopefully
|
||||
+ * Kevin Shanahan, Richard Lucassen, Valery Dachev (hopefully
|
||||
+ * I didn't forget anybody). I apologize again for my lack of time.
|
||||
+ *
|
||||
+ * More info at: http://www.linuximq.net/ (Andre Correa)
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/moduleparam.h>
|
||||
@ -172,7 +172,7 @@ diff -Nur linux-2.6.16/drivers/net/imq.c linux-2.6.16-owrt/drivers/net/imq.c
|
||||
+ unsigned int index = skb->imq_flags&IMQ_F_IFMASK;
|
||||
+ int ret = -1;
|
||||
+
|
||||
+ if (index > numdevs)
|
||||
+ if (index > numdevs)
|
||||
+ return -1;
|
||||
+
|
||||
+ dev = imq_devs + index;
|
||||
@ -205,13 +205,10 @@ diff -Nur linux-2.6.16/drivers/net/imq.c linux-2.6.16-owrt/drivers/net/imq.c
|
||||
+ ret = 0;
|
||||
+ }
|
||||
+ }
|
||||
+ if (spin_is_locked(&dev->xmit_lock))
|
||||
+ if (spin_is_locked(&dev->_xmit_lock))
|
||||
+ netif_schedule(dev);
|
||||
+ else
|
||||
+
|
||||
+ while (!netif_queue_stopped(dev) &&
|
||||
+ qdisc_restart(dev)<0)
|
||||
+ /* NOTHING */;
|
||||
+ qdisc_run(dev);
|
||||
+
|
||||
+ spin_unlock_bh(&dev->queue_lock);
|
||||
+
|
||||
@ -405,10 +402,10 @@ diff -Nur linux-2.6.16/drivers/net/imq.c linux-2.6.16-owrt/drivers/net/imq.c
|
||||
+MODULE_AUTHOR("http://www.linuximq.net");
|
||||
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Nur linux-2.6.16/drivers/net/Kconfig linux-2.6.16-owrt/drivers/net/Kconfig
|
||||
--- linux-2.6.16/drivers/net/Kconfig 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/drivers/net/Kconfig 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -93,6 +93,129 @@
|
||||
diff -urN linux-2.6.19.old/drivers/net/Kconfig linux-2.6.19.dev/drivers/net/Kconfig
|
||||
--- linux-2.6.19.old/drivers/net/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/drivers/net/Kconfig 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -96,6 +96,129 @@
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called eql. If unsure, say N.
|
||||
|
||||
@ -526,7 +523,7 @@ diff -Nur linux-2.6.16/drivers/net/Kconfig linux-2.6.16-owrt/drivers/net/Kconfig
|
||||
+ default "2"
|
||||
+ help
|
||||
+
|
||||
+ This settings defines how many IMQ devices will be
|
||||
+ This settings defines how many IMQ devices will be
|
||||
+ created.
|
||||
+
|
||||
+ The default value is 2.
|
||||
@ -538,20 +535,20 @@ diff -Nur linux-2.6.16/drivers/net/Kconfig linux-2.6.16-owrt/drivers/net/Kconfig
|
||||
config TUN
|
||||
tristate "Universal TUN/TAP device driver support"
|
||||
select CRC32
|
||||
diff -Nur linux-2.6.16/drivers/net/Makefile linux-2.6.16-owrt/drivers/net/Makefile
|
||||
--- linux-2.6.16/drivers/net/Makefile 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/drivers/net/Makefile 2006-03-20 13:00:13.000000000 +0100
|
||||
@@ -125,6 +125,7 @@
|
||||
endif
|
||||
diff -urN linux-2.6.19.old/drivers/net/Makefile linux-2.6.19.dev/drivers/net/Makefile
|
||||
--- linux-2.6.19.old/drivers/net/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/drivers/net/Makefile 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -124,6 +124,7 @@
|
||||
obj-$(CONFIG_SLHC) += slhc.o
|
||||
|
||||
obj-$(CONFIG_DUMMY) += dummy.o
|
||||
+obj-$(CONFIG_IMQ) += imq.o
|
||||
obj-$(CONFIG_IFB) += ifb.o
|
||||
obj-$(CONFIG_DE600) += de600.o
|
||||
obj-$(CONFIG_DE620) += de620.o
|
||||
diff -Nur linux-2.6.16/include/linux/imq.h linux-2.6.16-owrt/include/linux/imq.h
|
||||
--- linux-2.6.16/include/linux/imq.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/include/linux/imq.h 2006-03-20 12:59:23.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/include/linux/imq.h linux-2.6.19.dev/include/linux/imq.h
|
||||
--- linux-2.6.19.old/include/linux/imq.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/imq.h 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -0,0 +1,9 @@
|
||||
+#ifndef _IMQ_H
|
||||
+#define _IMQ_H
|
||||
@ -562,9 +559,9 @@ diff -Nur linux-2.6.16/include/linux/imq.h linux-2.6.16-owrt/include/linux/imq.h
|
||||
+#define IMQ_F_ENQUEUE 0x80
|
||||
+
|
||||
+#endif /* _IMQ_H */
|
||||
diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ipt_IMQ.h
|
||||
--- linux-2.6.16/include/linux/netfilter_ipv4/ipt_IMQ.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ipt_IMQ.h 2006-03-20 12:59:23.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_IMQ.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_IMQ.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_IMQ.h 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _IPT_IMQ_H
|
||||
+#define _IPT_IMQ_H
|
||||
@ -574,9 +571,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ipt_IMQ.h linux-2.6.16-owrt/
|
||||
+};
|
||||
+
|
||||
+#endif /* _IPT_IMQ_H */
|
||||
diff -Nur linux-2.6.16/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.16-owrt/include/linux/netfilter_ipv6/ip6t_IMQ.h
|
||||
--- linux-2.6.16/include/linux/netfilter_ipv6/ip6t_IMQ.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/include/linux/netfilter_ipv6/ip6t_IMQ.h 2006-03-20 12:59:23.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.19.dev/include/linux/netfilter_ipv6/ip6t_IMQ.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv6/ip6t_IMQ.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv6/ip6t_IMQ.h 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef _IP6T_IMQ_H
|
||||
+#define _IP6T_IMQ_H
|
||||
@ -586,10 +583,10 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv6/ip6t_IMQ.h linux-2.6.16-owrt
|
||||
+};
|
||||
+
|
||||
+#endif /* _IP6T_IMQ_H */
|
||||
diff -Nur linux-2.6.16/include/linux/skbuff.h linux-2.6.16-owrt/include/linux/skbuff.h
|
||||
--- linux-2.6.16/include/linux/skbuff.h 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/include/linux/skbuff.h 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -275,6 +275,10 @@
|
||||
diff -urN linux-2.6.19.old/include/linux/skbuff.h linux-2.6.19.dev/include/linux/skbuff.h
|
||||
--- linux-2.6.19.old/include/linux/skbuff.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/skbuff.h 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -292,6 +292,10 @@
|
||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||
struct sk_buff *nfct_reasm;
|
||||
#endif
|
||||
@ -600,10 +597,10 @@ diff -Nur linux-2.6.16/include/linux/skbuff.h linux-2.6.16-owrt/include/linux/sk
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
struct nf_bridge_info *nf_bridge;
|
||||
#endif
|
||||
diff -Nur linux-2.6.16/net/core/skbuff.c linux-2.6.16-owrt/net/core/skbuff.c
|
||||
--- linux-2.6.16/net/core/skbuff.c 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/core/skbuff.c 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -425,6 +425,10 @@
|
||||
diff -urN linux-2.6.19.old/net/core/skbuff.c linux-2.6.19.dev/net/core/skbuff.c
|
||||
--- linux-2.6.19.old/net/core/skbuff.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/core/skbuff.c 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -482,6 +482,10 @@
|
||||
C(nfct_reasm);
|
||||
nf_conntrack_get_reasm(skb->nfct_reasm);
|
||||
#endif
|
||||
@ -614,7 +611,7 @@ diff -Nur linux-2.6.16/net/core/skbuff.c linux-2.6.16-owrt/net/core/skbuff.c
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
C(nf_bridge);
|
||||
nf_bridge_get(skb->nf_bridge);
|
||||
@@ -489,6 +493,10 @@
|
||||
@@ -546,6 +550,10 @@
|
||||
#if defined(CONFIG_IP_VS) || defined(CONFIG_IP_VS_MODULE)
|
||||
new->ipvs_property = old->ipvs_property;
|
||||
#endif
|
||||
@ -625,10 +622,10 @@ diff -Nur linux-2.6.16/net/core/skbuff.c linux-2.6.16-owrt/net/core/skbuff.c
|
||||
#ifdef CONFIG_BRIDGE_NETFILTER
|
||||
new->nf_bridge = old->nf_bridge;
|
||||
nf_bridge_get(old->nf_bridge);
|
||||
diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.16-owrt/net/ipv4/netfilter/ipt_IMQ.c
|
||||
--- linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv4/netfilter/ipt_IMQ.c 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -0,0 +1,80 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_IMQ.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ipt_IMQ.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_IMQ.c 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * This target marks packets to be enqueued to an imq device
|
||||
+ */
|
||||
@ -642,8 +639,8 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.16-owrt/net/ipv4/n
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ unsigned int hooknum,
|
||||
+ const void *targinfo,
|
||||
+ void *userdata)
|
||||
+ const struct xt_target *target,
|
||||
+ const void *targinfo)
|
||||
+{
|
||||
+ struct ipt_imq_info *mr = (struct ipt_imq_info*)targinfo;
|
||||
+
|
||||
@ -653,17 +650,13 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.16-owrt/net/ipv4/n
|
||||
+}
|
||||
+
|
||||
+static int imq_checkentry(const char *tablename,
|
||||
+ const struct ipt_entry *e,
|
||||
+ const void *e,
|
||||
+ const struct xt_target *target,
|
||||
+ void *targinfo,
|
||||
+ unsigned int targinfosize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ struct ipt_imq_info *mr;
|
||||
+
|
||||
+ if (targinfosize != IPT_ALIGN(sizeof(struct ipt_imq_info))) {
|
||||
+ printk(KERN_WARNING "IMQ: invalid targinfosize\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ mr = (struct ipt_imq_info*)targinfo;
|
||||
+
|
||||
+ if (strcmp(tablename, "mangle") != 0) {
|
||||
@ -686,6 +679,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.16-owrt/net/ipv4/n
|
||||
+static struct ipt_target ipt_imq_reg = {
|
||||
+ .name = "IMQ",
|
||||
+ .target = imq_target,
|
||||
+ .targetsize = sizeof(struct ipt_imq_info),
|
||||
+ .checkentry = imq_checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
@ -709,10 +703,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_IMQ.c linux-2.6.16-owrt/net/ipv4/n
|
||||
+MODULE_AUTHOR("http://www.linuximq.net");
|
||||
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Nur linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-owrt/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.16/net/ipv4/netfilter/Kconfig 2006-03-20 12:58:53.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv4/netfilter/Kconfig 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -351,6 +351,17 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Kconfig linux-2.6.19.dev/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:47.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -390,6 +390,17 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
@ -730,21 +724,21 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-owrt/net/ipv4/net
|
||||
config IP_NF_TARGET_LOG
|
||||
tristate "LOG target support"
|
||||
depends on IP_NF_IPTABLES
|
||||
diff -Nur linux-2.6.16/net/ipv4/netfilter/Makefile linux-2.6.16-owrt/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.16/net/ipv4/netfilter/Makefile 2006-03-20 12:58:53.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv4/netfilter/Makefile 2006-03-20 13:01:12.000000000 +0100
|
||||
@@ -67,6 +67,7 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Makefile linux-2.6.19.dev/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Makefile 2006-12-14 03:13:47.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Makefile 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -71,6 +71,7 @@
|
||||
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_DSCP) += ipt_DSCP.o
|
||||
+obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
|
||||
diff -Nur linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.16-owrt/net/ipv6/netfilter/ip6t_IMQ.c
|
||||
--- linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv6/netfilter/ip6t_IMQ.c 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -0,0 +1,80 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.19.dev/net/ipv6/netfilter/ip6t_IMQ.c
|
||||
--- linux-2.6.19.old/net/ipv6/netfilter/ip6t_IMQ.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/netfilter/ip6t_IMQ.c 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -0,0 +1,77 @@
|
||||
+/*
|
||||
+ * This target marks packets to be enqueued to an imq device
|
||||
+ */
|
||||
@ -755,11 +749,11 @@ diff -Nur linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.16-owrt/net/ipv6/
|
||||
+#include <linux/imq.h>
|
||||
+
|
||||
+static unsigned int imq_target(struct sk_buff **pskb,
|
||||
+ unsigned int hooknum,
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ const void *targinfo,
|
||||
+ void *userdata)
|
||||
+ unsigned int hooknum,
|
||||
+ const struct xt_target *target,
|
||||
+ const void *targinfo)
|
||||
+{
|
||||
+ struct ip6t_imq_info *mr = (struct ip6t_imq_info*)targinfo;
|
||||
+
|
||||
@ -769,17 +763,13 @@ diff -Nur linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.16-owrt/net/ipv6/
|
||||
+}
|
||||
+
|
||||
+static int imq_checkentry(const char *tablename,
|
||||
+ const struct ip6t_entry *e,
|
||||
+ const void *e,
|
||||
+ const struct xt_target *target,
|
||||
+ void *targinfo,
|
||||
+ unsigned int targinfosize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ struct ip6t_imq_info *mr;
|
||||
+
|
||||
+ if (targinfosize != IP6T_ALIGN(sizeof(struct ip6t_imq_info))) {
|
||||
+ printk(KERN_WARNING "IMQ: invalid targinfosize\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ mr = (struct ip6t_imq_info*)targinfo;
|
||||
+
|
||||
+ if (strcmp(tablename, "mangle") != 0) {
|
||||
@ -802,6 +792,7 @@ diff -Nur linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.16-owrt/net/ipv6/
|
||||
+static struct ip6t_target ip6t_imq_reg = {
|
||||
+ .name = "IMQ",
|
||||
+ .target = imq_target,
|
||||
+ .targetsize = sizeof(struct ip6t_imq_info),
|
||||
+ .checkentry = imq_checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
@ -825,10 +816,10 @@ diff -Nur linux-2.6.16/net/ipv6/netfilter/ip6t_IMQ.c linux-2.6.16-owrt/net/ipv6/
|
||||
+MODULE_AUTHOR("http://www.linuximq.net");
|
||||
+MODULE_DESCRIPTION("Pseudo-driver for the intermediate queue device. See http://www.linuximq.net/ for more information.");
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Nur linux-2.6.16/net/ipv6/netfilter/Kconfig linux-2.6.16-owrt/net/ipv6/netfilter/Kconfig
|
||||
--- linux-2.6.16/net/ipv6/netfilter/Kconfig 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv6/netfilter/Kconfig 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -154,6 +154,15 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv6/netfilter/Kconfig linux-2.6.19.dev/net/ipv6/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv6/netfilter/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/netfilter/Kconfig 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -134,6 +134,15 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
@ -844,21 +835,21 @@ diff -Nur linux-2.6.16/net/ipv6/netfilter/Kconfig linux-2.6.16-owrt/net/ipv6/net
|
||||
config IP6_NF_TARGET_LOG
|
||||
tristate "LOG target support"
|
||||
depends on IP6_NF_FILTER
|
||||
diff -Nur linux-2.6.16/net/ipv6/netfilter/Makefile linux-2.6.16-owrt/net/ipv6/netfilter/Makefile
|
||||
--- linux-2.6.16/net/ipv6/netfilter/Makefile 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/ipv6/netfilter/Makefile 2006-03-20 13:02:14.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/net/ipv6/netfilter/Makefile linux-2.6.19.dev/net/ipv6/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv6/netfilter/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/netfilter/Makefile 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
# Link order matters here.
|
||||
obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o
|
||||
+obj-$(CONFIG_IP6_NF_TARGET_IMQ) += ip6t_IMQ.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o ip6t_dst.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o
|
||||
diff -Nur linux-2.6.16/net/sched/sch_generic.c linux-2.6.16-owrt/net/sched/sch_generic.c
|
||||
--- linux-2.6.16/net/sched/sch_generic.c 2006-03-20 06:53:29.000000000 +0100
|
||||
+++ linux-2.6.16-owrt/net/sched/sch_generic.c 2006-03-20 12:59:23.000000000 +0100
|
||||
@@ -29,6 +29,9 @@
|
||||
diff -urN linux-2.6.19.old/net/sched/sch_generic.c linux-2.6.19.dev/net/sched/sch_generic.c
|
||||
--- linux-2.6.19.old/net/sched/sch_generic.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/sched/sch_generic.c 2006-12-14 03:13:47.000000000 +0100
|
||||
@@ -28,6 +28,9 @@
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
@ -868,18 +859,10 @@ diff -Nur linux-2.6.16/net/sched/sch_generic.c linux-2.6.16-owrt/net/sched/sch_g
|
||||
#include <linux/init.h>
|
||||
#include <linux/rcupdate.h>
|
||||
#include <linux/list.h>
|
||||
@@ -136,7 +139,13 @@
|
||||
|
||||
if (!netif_queue_stopped(dev)) {
|
||||
int ret;
|
||||
- if (netdev_nit)
|
||||
+
|
||||
+ if (netdev_nit
|
||||
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
|
||||
+ && !(skb->imq_flags & IMQ_F_ENQUEUE)
|
||||
+#endif
|
||||
+ )
|
||||
+
|
||||
dev_queue_xmit_nit(skb, dev);
|
||||
|
||||
ret = dev->hard_start_xmit(skb, dev);
|
||||
@@ -615,5 +618,6 @@
|
||||
EXPORT_SYMBOL(qdisc_alloc);
|
||||
EXPORT_SYMBOL(qdisc_destroy);
|
||||
EXPORT_SYMBOL(qdisc_reset);
|
||||
+EXPORT_SYMBOL(__qdisc_run);
|
||||
EXPORT_SYMBOL(qdisc_lock_tree);
|
||||
EXPORT_SYMBOL(qdisc_unlock_tree);
|
||||
|
@ -1,830 +0,0 @@
|
||||
diff -urN linux-2.6.16.4/net/ipv4/netfilter/ip_conntrack_sip.c linux-2.6.16.4.new/net/ipv4/netfilter/ip_conntrack_sip.c
|
||||
--- linux-2.6.16.4/net/ipv4/netfilter/ip_conntrack_sip.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.4.new/net/ipv4/netfilter/ip_conntrack_sip.c 2006-04-12 17:31:44.000000000 +0200
|
||||
@@ -0,0 +1,414 @@
|
||||
+/* SIP extension for IP connection tracking.
|
||||
+ *
|
||||
+ * (C) 2005 by Christian Hentschel <chentschel@arnet.com.ar>
|
||||
+ * based on RR's ip_conntrack_ftp.c and other modules.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/netfilter.h>
|
||||
+#include <linux/ip.h>
|
||||
+#include <linux/ctype.h>
|
||||
+#include <linux/in.h>
|
||||
+#include <linux/udp.h>
|
||||
+#include <net/checksum.h>
|
||||
+#include <net/udp.h>
|
||||
+
|
||||
+#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
|
||||
+#include <linux/netfilter_ipv4/ip_conntrack_sip.h>
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Christian Hentschel <chentschel@arnet.com.ar>");
|
||||
+MODULE_DESCRIPTION("SIP connection tracking helper");
|
||||
+
|
||||
+static DEFINE_SPINLOCK(sipbf_lock);
|
||||
+
|
||||
+
|
||||
+#define MAX_PORTS 8
|
||||
+static int ports[MAX_PORTS];
|
||||
+static int ports_c;
|
||||
+module_param_array(ports, int, &ports_c, 0400);
|
||||
+MODULE_PARM_DESC(ports, " port numbers of sip servers");
|
||||
+
|
||||
+static unsigned int sip_timeout = SIP_TIMEOUT;
|
||||
+
|
||||
+module_param(sip_timeout, int, 0600);
|
||||
+MODULE_PARM_DESC(sip_timeout, "timeout for the master sip session");
|
||||
+
|
||||
+unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ const char **dptr);
|
||||
+EXPORT_SYMBOL_GPL(ip_nat_sip_hook);
|
||||
+
|
||||
+unsigned int (*ip_nat_sdp_hook)(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack_expect *exp,
|
||||
+ const char *dptr);
|
||||
+EXPORT_SYMBOL_GPL(ip_nat_sdp_hook);
|
||||
+
|
||||
+int ct_sip_get_info(const char *dptr, size_t dlen,
|
||||
+ unsigned int *matchoff,
|
||||
+ unsigned int *matchlen,
|
||||
+ struct sip_header_nfo *hnfo);
|
||||
+EXPORT_SYMBOL(ct_sip_get_info);
|
||||
+
|
||||
+#if 0
|
||||
+#define DEBUGP printk
|
||||
+#else
|
||||
+#define DEBUGP(format, args...)
|
||||
+#endif
|
||||
+
|
||||
+static int digits_len(const char *dptr, const char *limit, int *shift);
|
||||
+static int epaddr_len(const char *dptr, const char *limit, int *shift);
|
||||
+static int skp_digits_len(const char *dptr, const char *limit, int *shift);
|
||||
+static int skp_epaddr_len(const char *dptr, const char *limit, int *shift);
|
||||
+
|
||||
+struct sip_header_nfo ct_sip_hdrs[] = {
|
||||
+ { /* Via header */
|
||||
+ "Via:", sizeof("Via:") - 1,
|
||||
+ "\r\nv:", sizeof("\r\nv:") - 1, /* rfc3261 "\r\n" */
|
||||
+ "UDP ", sizeof("UDP ") - 1,
|
||||
+ epaddr_len
|
||||
+ },
|
||||
+ { /* Contact header */
|
||||
+ "Contact:", sizeof("Contact:") - 1,
|
||||
+ "\r\nm:", sizeof("\r\nm:") - 1,
|
||||
+ "sip:", sizeof("sip:") - 1,
|
||||
+ skp_epaddr_len
|
||||
+ },
|
||||
+ { /* Content length header */
|
||||
+ "Content-Length:", sizeof("Content-Length:") - 1,
|
||||
+ "\r\nl:", sizeof("\r\nl:") - 1,
|
||||
+ ":", sizeof(":") - 1,
|
||||
+ skp_digits_len
|
||||
+ },
|
||||
+ { /* SDP media info */
|
||||
+ "\nm=", sizeof("\nm=") - 1,
|
||||
+ "\rm=", sizeof("\rm=") - 1,
|
||||
+ "audio ", sizeof("audio ") - 1,
|
||||
+ digits_len
|
||||
+ },
|
||||
+ { /* SDP owner address*/
|
||||
+ "\no=", sizeof("\no=") - 1,
|
||||
+ "\ro=", sizeof("\ro=") - 1,
|
||||
+ "IN IP4 ", sizeof("IN IP4 ") - 1,
|
||||
+ epaddr_len
|
||||
+ },
|
||||
+ { /* SDP connection info */
|
||||
+ "\nc=", sizeof("\nc=") - 1,
|
||||
+ "\rc=", sizeof("\rc=") - 1,
|
||||
+ "IN IP4 ", sizeof("IN IP4 ") - 1,
|
||||
+ epaddr_len
|
||||
+ },
|
||||
+ { /* Requests headers */
|
||||
+ "sip:", sizeof("sip:") - 1,
|
||||
+ "sip:", sizeof("sip:") - 1, /* yes, i know.. ;) */
|
||||
+ "@", sizeof("@") - 1,
|
||||
+ epaddr_len
|
||||
+ },
|
||||
+ { /* SDP version header */
|
||||
+ "\nv=", sizeof("\nv=") - 1,
|
||||
+ "\rv=", sizeof("\rv=") - 1,
|
||||
+ "=", sizeof("=") - 1,
|
||||
+ digits_len
|
||||
+ }
|
||||
+};
|
||||
+EXPORT_SYMBOL(ct_sip_hdrs);
|
||||
+
|
||||
+
|
||||
+static int digits_len(const char *dptr, const char *limit, int *shift)
|
||||
+{
|
||||
+ int len = 0;
|
||||
+ while (dptr <= limit && isdigit(*dptr)) {
|
||||
+ dptr++;
|
||||
+ len++;
|
||||
+ }
|
||||
+ return len;
|
||||
+}
|
||||
+
|
||||
+/* get digits lenght, skiping blank spaces. */
|
||||
+static int skp_digits_len(const char *dptr, const char *limit, int *shift)
|
||||
+{
|
||||
+ for (; dptr <= limit && *dptr == ' '; dptr++)
|
||||
+ (*shift)++;
|
||||
+
|
||||
+ return digits_len(dptr, limit, shift);
|
||||
+}
|
||||
+
|
||||
+/* Simple ipaddr parser.. */
|
||||
+static int parse_ipaddr(const char *cp, const char **endp,
|
||||
+ uint32_t *ipaddr, const char *limit)
|
||||
+{
|
||||
+ unsigned long int val;
|
||||
+ int i, digit = 0;
|
||||
+
|
||||
+ for (i = 0, *ipaddr = 0; cp <= limit && i < 4; i++) {
|
||||
+ digit = 0;
|
||||
+ if (!isdigit(*cp))
|
||||
+ break;
|
||||
+
|
||||
+ val = simple_strtoul(cp, (char **)&cp, 10);
|
||||
+ if (val > 0xFF)
|
||||
+ return -1;
|
||||
+
|
||||
+ ((uint8_t *)ipaddr)[i] = val;
|
||||
+ digit = 1;
|
||||
+
|
||||
+ if (*cp != '.')
|
||||
+ break;
|
||||
+ cp++;
|
||||
+ }
|
||||
+ if (!digit)
|
||||
+ return -1;
|
||||
+
|
||||
+ if (endp)
|
||||
+ *endp = cp;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* skip ip address. returns it lenght. */
|
||||
+static int epaddr_len(const char *dptr, const char *limit, int *shift)
|
||||
+{
|
||||
+ const char *aux = dptr;
|
||||
+ uint32_t ip;
|
||||
+
|
||||
+ if (parse_ipaddr(dptr, &dptr, &ip, limit) < 0) {
|
||||
+ DEBUGP("ip: %s parse failed.!\n", dptr);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Port number */
|
||||
+ if (*dptr == ':') {
|
||||
+ dptr++;
|
||||
+ dptr += digits_len(dptr, limit, shift);
|
||||
+ }
|
||||
+ return dptr - aux;
|
||||
+}
|
||||
+
|
||||
+/* get address lenght, skiping user info. */
|
||||
+static int skp_epaddr_len(const char *dptr, const char *limit, int *shift)
|
||||
+{
|
||||
+ for (; dptr <= limit && *dptr != '@'; dptr++)
|
||||
+ (*shift)++;
|
||||
+
|
||||
+ if (*dptr == '@') {
|
||||
+ dptr++;
|
||||
+ (*shift)++;
|
||||
+ return epaddr_len(dptr, limit, shift);
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/* Returns 0 if not found, -1 error parsing. */
|
||||
+int ct_sip_get_info(const char *dptr, size_t dlen,
|
||||
+ unsigned int *matchoff,
|
||||
+ unsigned int *matchlen,
|
||||
+ struct sip_header_nfo *hnfo)
|
||||
+{
|
||||
+ const char *limit, *aux, *k = dptr;
|
||||
+ int shift = 0;
|
||||
+
|
||||
+ limit = dptr + (dlen - hnfo->lnlen);
|
||||
+
|
||||
+ while (dptr <= limit) {
|
||||
+ if ((strncmp(dptr, hnfo->lname, hnfo->lnlen) != 0) &&
|
||||
+ (strncmp(dptr, hnfo->sname, hnfo->snlen) != 0))
|
||||
+ {
|
||||
+ dptr++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ aux = ct_sip_search(hnfo->ln_str, dptr, hnfo->ln_strlen,
|
||||
+ ct_sip_lnlen(dptr, limit));
|
||||
+ if (!aux) {
|
||||
+ DEBUGP("'%s' not found in '%s'.\n", hnfo->ln_str, hnfo->lname);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ aux += hnfo->ln_strlen;
|
||||
+
|
||||
+ *matchlen = hnfo->match_len(aux, limit, &shift);
|
||||
+ if (!*matchlen)
|
||||
+ return -1;
|
||||
+
|
||||
+ *matchoff = (aux - k) + shift;
|
||||
+
|
||||
+ DEBUGP("%s match succeeded! - len: %u\n", hnfo->lname, *matchlen);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ DEBUGP("%s header not found.\n", hnfo->lname);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int set_expected_rtp(struct sk_buff **pskb,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ uint32_t ipaddr, uint16_t port,
|
||||
+ const char *dptr)
|
||||
+{
|
||||
+ struct ip_conntrack_expect *exp;
|
||||
+ int ret;
|
||||
+
|
||||
+ exp = ip_conntrack_expect_alloc(ct);
|
||||
+ if (exp == NULL)
|
||||
+ return NF_DROP;
|
||||
+
|
||||
+ exp->tuple = ((struct ip_conntrack_tuple)
|
||||
+ { { ct->tuplehash[IP_CT_DIR_REPLY].tuple.src.ip, { 0 } },
|
||||
+ { ipaddr, { .udp = { htons(port) } }, IPPROTO_UDP }});
|
||||
+
|
||||
+ exp->mask = ((struct ip_conntrack_tuple)
|
||||
+ { { 0xFFFFFFFF, { 0 } },
|
||||
+ { 0xFFFFFFFF, { .udp = { 0xFFFF } }, 0xFF }});
|
||||
+
|
||||
+ exp->expectfn = NULL;
|
||||
+
|
||||
+ if (ip_nat_sdp_hook)
|
||||
+ ret = ip_nat_sdp_hook(pskb, ctinfo, exp, dptr);
|
||||
+ else {
|
||||
+ if (ip_conntrack_expect_related(exp) != 0)
|
||||
+ ret = NF_DROP;
|
||||
+ else
|
||||
+ ret = NF_ACCEPT;
|
||||
+ }
|
||||
+ ip_conntrack_expect_put(exp);
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static int sip_help(struct sk_buff **pskb,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ enum ip_conntrack_info ctinfo)
|
||||
+{
|
||||
+ unsigned int dataoff, datalen;
|
||||
+ const char *dptr;
|
||||
+ int ret = NF_ACCEPT;
|
||||
+ int matchoff, matchlen;
|
||||
+ uint32_t ipaddr;
|
||||
+ uint16_t port;
|
||||
+
|
||||
+ /* No Data ? */
|
||||
+ dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr);
|
||||
+ if (dataoff >= (*pskb)->len) {
|
||||
+ DEBUGP("skb->len = %u\n", (*pskb)->len);
|
||||
+ return NF_ACCEPT;
|
||||
+ }
|
||||
+
|
||||
+ ip_ct_refresh(ct, *pskb, sip_timeout * HZ);
|
||||
+
|
||||
+ spin_lock_bh(&sipbf_lock);
|
||||
+
|
||||
+ if ((dataoff + (*pskb)->len - dataoff) <= skb_headlen(*pskb))
|
||||
+ dptr = (*pskb)->data + dataoff;
|
||||
+ else {
|
||||
+ DEBUGP("Copy of skbuff not supported yet.\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ if (ip_nat_sip_hook) {
|
||||
+ if (!ip_nat_sip_hook(pskb, ctinfo, ct, &dptr)) {
|
||||
+ ret = NF_DROP;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if ((ctinfo) >= IP_CT_IS_REPLY)
|
||||
+ goto out;
|
||||
+
|
||||
+ /* After this point NAT, could have mangled skb, so
|
||||
+ we need to recalculate payload lenght. */
|
||||
+ datalen = (*pskb)->len - dataoff;
|
||||
+
|
||||
+ if (datalen < (sizeof("SIP/2.0 200") - 1))
|
||||
+ goto out;
|
||||
+
|
||||
+ /* RTP info only in some SDP pkts */
|
||||
+ if (memcmp(dptr, "INVITE", sizeof("INVITE") - 1) != 0 &&
|
||||
+ memcmp(dptr, "SIP/2.0 200", sizeof("SIP/2.0 200") - 1) != 0) {
|
||||
+ goto out;
|
||||
+ }
|
||||
+ /* Get ip and port address from SDP packet. */
|
||||
+ if (ct_sip_get_info(dptr, datalen, &matchoff, &matchlen,
|
||||
+ &ct_sip_hdrs[POS_CONECTION]) > 0) {
|
||||
+
|
||||
+ /* We'll drop only if there are parse problems. */
|
||||
+ if (parse_ipaddr(dptr + matchoff, NULL, &ipaddr,
|
||||
+ dptr + datalen) < 0) {
|
||||
+ ret = NF_DROP;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (ct_sip_get_info(dptr, datalen, &matchoff, &matchlen,
|
||||
+ &ct_sip_hdrs[POS_MEDIA]) > 0) {
|
||||
+
|
||||
+ port = simple_strtoul(dptr + matchoff, NULL, 10);
|
||||
+ if (port < 1024) {
|
||||
+ ret = NF_DROP;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ ret = set_expected_rtp(pskb, ct, ctinfo,
|
||||
+ ipaddr, port, dptr);
|
||||
+ }
|
||||
+ }
|
||||
+out: spin_unlock_bh(&sipbf_lock);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static struct ip_conntrack_helper sip[MAX_PORTS];
|
||||
+static char sip_names[MAX_PORTS][10];
|
||||
+
|
||||
+static void fini(void)
|
||||
+{
|
||||
+ int i = 0;
|
||||
+ for (; i < ports_c; i++) {
|
||||
+ DEBUGP("unregistering helper for port %d\n", ports[i]);
|
||||
+ ip_conntrack_helper_unregister(&sip[i]);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int __init init(void)
|
||||
+{
|
||||
+ int i, ret;
|
||||
+ char *tmpname;
|
||||
+
|
||||
+ if (ports_c == 0)
|
||||
+ ports[ports_c++] = SIP_PORT;
|
||||
+
|
||||
+ for (i = 0; i < ports_c; i++) {
|
||||
+ /* Create helper structure */
|
||||
+ memset(&sip[i], 0, sizeof(struct ip_conntrack_helper));
|
||||
+
|
||||
+ sip[i].tuple.dst.protonum = IPPROTO_UDP;
|
||||
+ sip[i].tuple.src.u.udp.port = htons(ports[i]);
|
||||
+ sip[i].mask.src.u.udp.port = 0xFFFF;
|
||||
+ sip[i].mask.dst.protonum = 0xFF;
|
||||
+ sip[i].max_expected = 1;
|
||||
+ sip[i].timeout = 3 * 60; /* 3 minutes */
|
||||
+ sip[i].me = THIS_MODULE;
|
||||
+ sip[i].help = sip_help;
|
||||
+
|
||||
+ tmpname = &sip_names[i][0];
|
||||
+ if (ports[i] == SIP_PORT)
|
||||
+ sprintf(tmpname, "sip");
|
||||
+ else
|
||||
+ sprintf(tmpname, "sip-%d", i);
|
||||
+ sip[i].name = tmpname;
|
||||
+
|
||||
+ DEBUGP("port #%d: %d\n", i, ports[i]);
|
||||
+
|
||||
+ ret=ip_conntrack_helper_register(&sip[i]);
|
||||
+ if (ret) {
|
||||
+ printk("ERROR registering helper for port %d\n",
|
||||
+ ports[i]);
|
||||
+ fini();
|
||||
+ return(ret);
|
||||
+ }
|
||||
+ }
|
||||
+ return(0);
|
||||
+}
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
diff -urN linux-2.6.16.4/net/ipv4/netfilter/ip_nat_sip.c linux-2.6.16.4.new/net/ipv4/netfilter/ip_nat_sip.c
|
||||
--- linux-2.6.16.4/net/ipv4/netfilter/ip_nat_sip.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.4.new/net/ipv4/netfilter/ip_nat_sip.c 2006-04-12 17:31:53.000000000 +0200
|
||||
@@ -0,0 +1,249 @@
|
||||
+/* SIP extension for UDP NAT alteration.
|
||||
+ *
|
||||
+ * (C) 2005 by Christian Hentschel <chentschel@arnet.com.ar>
|
||||
+ * based on RR's ip_nat_ftp.c and other modules.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License version 2 as
|
||||
+ * published by the Free Software Foundation.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/netfilter_ipv4.h>
|
||||
+#include <linux/ip.h>
|
||||
+#include <linux/udp.h>
|
||||
+#include <net/udp.h>
|
||||
+
|
||||
+#include <linux/netfilter_ipv4/ip_nat.h>
|
||||
+#include <linux/netfilter_ipv4/ip_nat_helper.h>
|
||||
+#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
|
||||
+#include <linux/netfilter_ipv4/ip_conntrack_sip.h>
|
||||
+
|
||||
+MODULE_LICENSE("GPL");
|
||||
+MODULE_AUTHOR("Christian Hentschel <chentschel@arnet.com.ar>");
|
||||
+MODULE_DESCRIPTION("SIP NAT helper");
|
||||
+
|
||||
+#if 0
|
||||
+#define DEBUGP printk
|
||||
+#else
|
||||
+#define DEBUGP(format, args...)
|
||||
+#endif
|
||||
+
|
||||
+extern struct sip_header_nfo ct_sip_hdrs[];
|
||||
+
|
||||
+static unsigned int mangle_sip_packet(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ const char **dptr, size_t dlen,
|
||||
+ char *buffer, int bufflen,
|
||||
+ struct sip_header_nfo *hnfo)
|
||||
+{
|
||||
+ unsigned int matchlen, matchoff;
|
||||
+
|
||||
+ if (ct_sip_get_info(*dptr, dlen, &matchoff, &matchlen, hnfo) <= 0)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (!ip_nat_mangle_udp_packet(pskb, ct, ctinfo,
|
||||
+ matchoff, matchlen, buffer, bufflen)) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* We need to reload this. Thanks Patrick. */
|
||||
+ *dptr = (*pskb)->data + (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr);
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static unsigned int ip_nat_sip(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ const char **dptr)
|
||||
+{
|
||||
+ char buffer[sizeof("nnn.nnn.nnn.nnn:nnnnn")];
|
||||
+ unsigned int bufflen, dataoff;
|
||||
+ uint32_t ip;
|
||||
+ uint16_t port;
|
||||
+
|
||||
+ dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr);
|
||||
+
|
||||
+ if ((ctinfo) >= IP_CT_IS_REPLY) {
|
||||
+ ip = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.ip;
|
||||
+ port = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.udp.port;
|
||||
+ } else {
|
||||
+ ip = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip;
|
||||
+ port = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.u.udp.port;
|
||||
+ }
|
||||
+ bufflen = sprintf(buffer, "%u.%u.%u.%u:%u", NIPQUAD(ip), ntohs(port));
|
||||
+
|
||||
+ /* short packet ? */
|
||||
+ if (((*pskb)->len - dataoff) < (sizeof("SIP/2.0") - 1))
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Basic rules: requests and responses. */
|
||||
+ if (memcmp(*dptr, "SIP/2.0", sizeof("SIP/2.0") - 1) == 0) {
|
||||
+
|
||||
+ if ((ctinfo) < IP_CT_IS_REPLY) {
|
||||
+ mangle_sip_packet(pskb, ctinfo, ct, dptr,
|
||||
+ (*pskb)->len - dataoff, buffer, bufflen,
|
||||
+ &ct_sip_hdrs[POS_CONTACT]);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ if (!mangle_sip_packet(pskb, ctinfo, ct, dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_VIA])) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* This search should ignore case, but later.. */
|
||||
+ const char *aux = ct_sip_search("CSeq:", *dptr, sizeof("CSeq:") - 1,
|
||||
+ (*pskb)->len - dataoff);
|
||||
+ if (!aux)
|
||||
+ return 0;
|
||||
+
|
||||
+ if (!ct_sip_search("REGISTER", aux, sizeof("REGISTER"),
|
||||
+ ct_sip_lnlen(aux, *dptr + (*pskb)->len - dataoff))) {
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return mangle_sip_packet(pskb, ctinfo, ct, dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_CONTACT]);
|
||||
+ }
|
||||
+ if ((ctinfo) < IP_CT_IS_REPLY) {
|
||||
+ if (!mangle_sip_packet(pskb, ctinfo, ct, dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_VIA])) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Mangle Contact if exists only. - watch udp_nat_mangle()! */
|
||||
+ mangle_sip_packet(pskb, ctinfo, ct, dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_CONTACT]);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ /* This mangle requests headers. */
|
||||
+ return mangle_sip_packet(pskb, ctinfo, ct, dptr,
|
||||
+ ct_sip_lnlen(*dptr, *dptr + (*pskb)->len - dataoff),
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_REQ_HEADER]);
|
||||
+}
|
||||
+
|
||||
+static int mangle_content_len(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ const char *dptr)
|
||||
+{
|
||||
+ unsigned int dataoff, matchoff, matchlen;
|
||||
+ char buffer[sizeof("65536")];
|
||||
+ int bufflen;
|
||||
+
|
||||
+ dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr);
|
||||
+
|
||||
+ /* Get actual SDP lenght */
|
||||
+ if (ct_sip_get_info(dptr, (*pskb)->len - dataoff, &matchoff,
|
||||
+ &matchlen, &ct_sip_hdrs[POS_SDP_HEADER]) > 0) {
|
||||
+
|
||||
+ /* since ct_sip_get_info() give us a pointer passing 'v='
|
||||
+ we need to add 2 bytes in this count. */
|
||||
+ int c_len = (*pskb)->len - dataoff - matchoff + 2;
|
||||
+
|
||||
+ /* Now, update SDP lenght */
|
||||
+ if (ct_sip_get_info(dptr, (*pskb)->len - dataoff, &matchoff,
|
||||
+ &matchlen, &ct_sip_hdrs[POS_CONTENT]) > 0) {
|
||||
+
|
||||
+ bufflen = sprintf(buffer, "%u", c_len);
|
||||
+
|
||||
+ return ip_nat_mangle_udp_packet(pskb, ct, ctinfo, matchoff,
|
||||
+ matchlen, buffer, bufflen);
|
||||
+ }
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static unsigned int mangle_sdp(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ uint32_t newip, uint16_t port,
|
||||
+ const char *dptr)
|
||||
+{
|
||||
+ char buffer[sizeof("nnn.nnn.nnn.nnn")];
|
||||
+ unsigned int dataoff, bufflen;
|
||||
+
|
||||
+ dataoff = (*pskb)->nh.iph->ihl*4 + sizeof(struct udphdr);
|
||||
+
|
||||
+ /* Mangle owner and contact info. */
|
||||
+ bufflen = sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(newip));
|
||||
+ if (!mangle_sip_packet(pskb, ctinfo, ct, &dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_OWNER])) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (!mangle_sip_packet(pskb, ctinfo, ct, &dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_CONECTION])) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ /* Mangle media port. */
|
||||
+ bufflen = sprintf(buffer, "%u", port);
|
||||
+ if (!mangle_sip_packet(pskb, ctinfo, ct, &dptr, (*pskb)->len - dataoff,
|
||||
+ buffer, bufflen, &ct_sip_hdrs[POS_MEDIA])) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return mangle_content_len(pskb, ctinfo, ct, dptr);
|
||||
+}
|
||||
+
|
||||
+/* So, this packet has hit the connection tracking matching code.
|
||||
+ Mangle it, and change the expectation to match the new version. */
|
||||
+static unsigned int ip_nat_sdp(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack_expect *exp,
|
||||
+ const char *dptr)
|
||||
+{
|
||||
+ struct ip_conntrack *ct = exp->master;
|
||||
+ uint32_t newip;
|
||||
+ uint16_t port;
|
||||
+
|
||||
+ DEBUGP("ip_nat_sdp():\n");
|
||||
+
|
||||
+ /* Connection will come from reply */
|
||||
+ newip = ct->tuplehash[IP_CT_DIR_REPLY].tuple.dst.ip;
|
||||
+
|
||||
+ exp->tuple.dst.ip = newip;
|
||||
+ exp->saved_proto.udp.port = exp->tuple.dst.u.udp.port;
|
||||
+ exp->dir = IP_CT_DIR_REPLY;
|
||||
+
|
||||
+ /* When you see the packet, we need to NAT it the same as the
|
||||
+ this one. */
|
||||
+ exp->expectfn = ip_nat_follow_master;
|
||||
+
|
||||
+ /* Try to get same port: if not, try to change it. */
|
||||
+ for (port = ntohs(exp->saved_proto.udp.port); port != 0; port++) {
|
||||
+ exp->tuple.dst.u.udp.port = htons(port);
|
||||
+ if (ip_conntrack_expect_related(exp) == 0)
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (port == 0)
|
||||
+ return NF_DROP;
|
||||
+
|
||||
+ if (!mangle_sdp(pskb, ctinfo, ct, newip, port, dptr)) {
|
||||
+ ip_conntrack_unexpect_related(exp);
|
||||
+ return NF_DROP;
|
||||
+ }
|
||||
+ return NF_ACCEPT;
|
||||
+}
|
||||
+
|
||||
+static void __exit fini(void)
|
||||
+{
|
||||
+ ip_nat_sip_hook = NULL;
|
||||
+ ip_nat_sdp_hook = NULL;
|
||||
+ /* Make sure noone calls it, meanwhile. */
|
||||
+ synchronize_net();
|
||||
+}
|
||||
+
|
||||
+static int __init init(void)
|
||||
+{
|
||||
+ BUG_ON(ip_nat_sip_hook);
|
||||
+ BUG_ON(ip_nat_sdp_hook);
|
||||
+ ip_nat_sip_hook = ip_nat_sip;
|
||||
+ ip_nat_sdp_hook = ip_nat_sdp;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
diff -urN linux-2.6.16.4/net/ipv4/netfilter/Kconfig linux-2.6.16.4.new/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.16.4/net/ipv4/netfilter/Kconfig 2006-04-12 17:29:19.000000000 +0200
|
||||
+++ linux-2.6.16.4.new/net/ipv4/netfilter/Kconfig 2006-04-12 17:32:53.000000000 +0200
|
||||
@@ -168,6 +168,19 @@
|
||||
If you want to compile it as a module, say M here and read
|
||||
Documentation/modules.txt. If unsure, say `N'.
|
||||
|
||||
+config IP_NF_SIP
|
||||
+ tristate 'SIP support'
|
||||
+ depends on IP_NF_CONNTRACK
|
||||
+ help
|
||||
+ SIP is an application-layer control protocol that can establish,
|
||||
+ modify, and terminate multimedia sessions (conferences) such as
|
||||
+ Internet telephony calls. With the ip_conntrack_sip and
|
||||
+ the ip_nat_sip modules you can support the protocol on a connection
|
||||
+ tracking/NATing firewall.
|
||||
+
|
||||
+ If you want to compile it as a module, say 'M' here and read
|
||||
+ Documentation/modules.txt. If unsure, say 'N'.
|
||||
+
|
||||
config IP_NF_QUEUE
|
||||
tristate "IP Userspace queueing via NETLINK (OBSOLETE)"
|
||||
help
|
||||
@@ -545,6 +558,12 @@
|
||||
default IP_NF_NAT if IP_NF_PPTP=y
|
||||
default m if IP_NF_PPTP=m
|
||||
|
||||
+config IP_NF_NAT_SIP
|
||||
+ tristate
|
||||
+ depends on IP_NF_CONNTRACK!=n && IP_NF_NAT!=n
|
||||
+ default IP_NF_NAT if IP_NF_SIP=y
|
||||
+ default m if IP_NF_SIP=m
|
||||
+
|
||||
# mangle + specific targets
|
||||
config IP_NF_MANGLE
|
||||
tristate "Packet mangling"
|
||||
diff -urN linux-2.6.16.4/net/ipv4/netfilter/Makefile linux-2.6.16.4.new/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.16.4/net/ipv4/netfilter/Makefile 2006-04-12 17:29:19.000000000 +0200
|
||||
+++ linux-2.6.16.4.new/net/ipv4/netfilter/Makefile 2006-04-12 17:33:39.000000000 +0200
|
||||
@@ -28,6 +28,7 @@
|
||||
obj-$(CONFIG_IP_NF_FTP) += ip_conntrack_ftp.o
|
||||
obj-$(CONFIG_IP_NF_IRC) += ip_conntrack_irc.o
|
||||
obj-$(CONFIG_IP_NF_NETBIOS_NS) += ip_conntrack_netbios_ns.o
|
||||
+obj-$(CONFIG_IP_NF_SIP) += ip_conntrack_sip.o
|
||||
|
||||
# NAT helpers
|
||||
obj-$(CONFIG_IP_NF_NAT_PPTP) += ip_nat_pptp.o
|
||||
@@ -35,6 +36,7 @@
|
||||
obj-$(CONFIG_IP_NF_NAT_TFTP) += ip_nat_tftp.o
|
||||
obj-$(CONFIG_IP_NF_NAT_FTP) += ip_nat_ftp.o
|
||||
obj-$(CONFIG_IP_NF_NAT_IRC) += ip_nat_irc.o
|
||||
+obj-$(CONFIG_IP_NF_NAT_SIP) += ip_nat_sip.o
|
||||
|
||||
# generic IP tables
|
||||
obj-$(CONFIG_IP_NF_IPTABLES) += ip_tables.o
|
||||
diff -urN linux-2.6.16.4/include/linux/netfilter_ipv4/ip_conntrack.h linux-2.6.16.4.new/include/linux/netfilter_ipv4/ip_conntrack.h
|
||||
--- linux-2.6.16.4/include/linux/netfilter_ipv4/ip_conntrack.h 2006-04-12 17:29:19.000000000 +0200
|
||||
+++ linux-2.6.16.4.new/include/linux/netfilter_ipv4/ip_conntrack.h 2006-04-12 17:30:38.000000000 +0200
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <linux/netfilter_ipv4/ip_conntrack_amanda.h>
|
||||
#include <linux/netfilter_ipv4/ip_conntrack_ftp.h>
|
||||
#include <linux/netfilter_ipv4/ip_conntrack_irc.h>
|
||||
+#include <linux/netfilter_ipv4/ip_conntrack_sip.h>
|
||||
|
||||
/* per conntrack: application helper private data */
|
||||
union ip_conntrack_help {
|
||||
@@ -40,6 +41,7 @@
|
||||
struct ip_ct_pptp_master ct_pptp_info;
|
||||
struct ip_ct_ftp_master ct_ftp_info;
|
||||
struct ip_ct_irc_master ct_irc_info;
|
||||
+ struct ip_ct_sip_master ct_sip_info;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_IP_NF_NAT_NEEDED
|
||||
diff -urN linux-2.6.16.4/include/linux/netfilter_ipv4/ip_conntrack_sip.h linux-2.6.16.4.new/include/linux/netfilter_ipv4/ip_conntrack_sip.h
|
||||
--- linux-2.6.16.4/include/linux/netfilter_ipv4/ip_conntrack_sip.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.4.new/include/linux/netfilter_ipv4/ip_conntrack_sip.h 2006-04-12 17:31:12.000000000 +0200
|
||||
@@ -0,0 +1,81 @@
|
||||
+#ifndef __IP_CONNTRACK_SIP_H__
|
||||
+#define __IP_CONNTRACK_SIP_H__
|
||||
+/* SIP tracking. */
|
||||
+
|
||||
+#ifdef __KERNEL__
|
||||
+
|
||||
+#define SIP_PORT 5060
|
||||
+#define SIP_TIMEOUT 3600
|
||||
+
|
||||
+#define POS_VIA 0
|
||||
+#define POS_CONTACT 1
|
||||
+#define POS_CONTENT 2
|
||||
+#define POS_MEDIA 3
|
||||
+#define POS_OWNER 4
|
||||
+#define POS_CONECTION 5
|
||||
+#define POS_REQ_HEADER 6
|
||||
+#define POS_SDP_HEADER 7
|
||||
+
|
||||
+struct ip_ct_sip_master {
|
||||
+};
|
||||
+
|
||||
+struct sip_header_nfo {
|
||||
+ const char *lname;
|
||||
+ size_t lnlen;
|
||||
+ const char *sname;
|
||||
+ size_t snlen;
|
||||
+ const char *ln_str;
|
||||
+ size_t ln_strlen;
|
||||
+ int (*match_len)(const char *, const char *, int *);
|
||||
+
|
||||
+};
|
||||
+
|
||||
+extern unsigned int (*ip_nat_sip_hook)(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack *ct,
|
||||
+ const char **dptr);
|
||||
+
|
||||
+/* For NAT to hook in when on expect. */
|
||||
+extern unsigned int (*ip_nat_sdp_hook)(struct sk_buff **pskb,
|
||||
+ enum ip_conntrack_info ctinfo,
|
||||
+ struct ip_conntrack_expect *exp,
|
||||
+ const char *dptr);
|
||||
+
|
||||
+extern int ct_sip_get_info(const char *dptr, size_t dlen,
|
||||
+ unsigned int *matchoff,
|
||||
+ unsigned int *matchlen,
|
||||
+ struct sip_header_nfo *hnfo);
|
||||
+
|
||||
+/* get line lenght until first CR or LF seen. */
|
||||
+static __inline__ int ct_sip_lnlen(const char *line, const char *limit)
|
||||
+{
|
||||
+ const char *k = line;
|
||||
+
|
||||
+ while ((line <= limit) && (*line == '\r' || *line == '\n'))
|
||||
+ line++;
|
||||
+
|
||||
+ while (line <= limit) {
|
||||
+ if (*line == '\r' || *line == '\n')
|
||||
+ break;
|
||||
+ line++;
|
||||
+ }
|
||||
+ return line - k;
|
||||
+}
|
||||
+
|
||||
+/* Linear string search, case sensitive. */
|
||||
+static __inline__
|
||||
+const char *ct_sip_search(const char *needle, const char *haystack,
|
||||
+ size_t needle_len, size_t haystack_len)
|
||||
+{
|
||||
+ const char *limit = haystack + (haystack_len - needle_len);
|
||||
+
|
||||
+ while (haystack <= limit) {
|
||||
+ if (memcmp(haystack, needle, needle_len) == 0)
|
||||
+ return haystack;
|
||||
+ haystack++;
|
||||
+ }
|
||||
+ return NULL;
|
||||
+}
|
||||
+#endif /* __KERNEL__ */
|
||||
+
|
||||
+#endif /* __IP_CONNTRACK_SIP_H__ */
|
@ -1,6 +1,6 @@
|
||||
diff -u'rNF^function' linux-2.6.16.7/include/linux/netfilter_ipv4/ipt_ROUTE.h linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv4/ipt_ROUTE.h
|
||||
--- linux-2.6.16.7/include/linux/netfilter_ipv4/ipt_ROUTE.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv4/ipt_ROUTE.h 2006-06-14 16:40:49.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_ROUTE.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_ROUTE.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_ROUTE.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_ROUTE.h 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* Header file for iptables ipt_ROUTE target
|
||||
+ *
|
||||
@ -25,9 +25,9 @@ diff -u'rNF^function' linux-2.6.16.7/include/linux/netfilter_ipv4/ipt_ROUTE.h li
|
||||
+#define IPT_ROUTE_TEE 0x02
|
||||
+
|
||||
+#endif /*_IPT_ROUTE_H_target*/
|
||||
diff -u'rNF^function' linux-2.6.16.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv6/ip6t_ROUTE.h
|
||||
--- linux-2.6.16.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.7-ROUTE/include/linux/netfilter_ipv6/ip6t_ROUTE.h 2006-06-14 16:41:08.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv6/ip6t_ROUTE.h linux-2.6.19.dev/include/linux/netfilter_ipv6/ip6t_ROUTE.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv6/ip6t_ROUTE.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv6/ip6t_ROUTE.h 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -0,0 +1,23 @@
|
||||
+/* Header file for iptables ip6t_ROUTE target
|
||||
+ *
|
||||
@ -52,48 +52,10 @@ diff -u'rNF^function' linux-2.6.16.7/include/linux/netfilter_ipv6/ip6t_ROUTE.h l
|
||||
+#define IP6T_ROUTE_TEE 0x02
|
||||
+
|
||||
+#endif /*_IP6T_ROUTE_H_target*/
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/Kconfig linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.16.7/net/ipv4/netfilter/Kconfig 2006-06-14 16:05:44.000000000 +0200
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Kconfig 2006-06-14 16:46:40.000000000 +0200
|
||||
@@ -491,6 +491,23 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+config IP_NF_TARGET_ROUTE
|
||||
+ tristate 'ROUTE target support'
|
||||
+ depends on IP_NF_MANGLE
|
||||
+ help
|
||||
+ This option adds a `ROUTE' target, which enables you to setup unusual
|
||||
+ routes. For example, the ROUTE lets you route a received packet through
|
||||
+ an interface or towards a host, even if the regular destination of the
|
||||
+ packet is the router itself. The ROUTE target is also able to change the
|
||||
+ incoming interface of a packet.
|
||||
+
|
||||
+ The target can be or not a final target. It has to be used inside the
|
||||
+ mangle table.
|
||||
+
|
||||
+ If you want to compile it as a module, say M here and read
|
||||
+ Documentation/modules.txt. The module will be called ipt_ROUTE.o.
|
||||
+ If unsure, say `N'.
|
||||
+
|
||||
config IP_NF_TARGET_NETMAP
|
||||
tristate "NETMAP target support"
|
||||
depends on IP_NF_NAT
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/Makefile linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.16.7/net/ipv4/netfilter/Makefile 2006-06-14 16:05:44.000000000 +0200
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv4/netfilter/Makefile 2006-06-14 16:44:02.000000000 +0200
|
||||
@@ -74,6 +74,7 @@
|
||||
obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
|
||||
+obj-$(CONFIG_IP_NF_TARGET_ROUTE) += ipt_ROUTE.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o
|
||||
obj-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += ip_nat_snmp_basic.o
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16.7-ROUTE/net/ipv4/netfilter/ipt_ROUTE.c
|
||||
--- linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv4/netfilter/ipt_ROUTE.c 2006-06-14 16:42:23.000000000 +0200
|
||||
@@ -0,0 +1,461 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_ROUTE.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ipt_ROUTE.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_ROUTE.c 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -0,0 +1,455 @@
|
||||
+/*
|
||||
+ * This implements the ROUTE target, which enables you to setup unusual
|
||||
+ * routes not supported by the standard kernel routing table.
|
||||
@ -376,8 +338,8 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ unsigned int hooknum,
|
||||
+ const void *targinfo,
|
||||
+ void *userinfo)
|
||||
+ const struct xt_target *target,
|
||||
+ const void *targinfo)
|
||||
+{
|
||||
+ const struct ipt_route_target_info *route_info = targinfo;
|
||||
+ struct sk_buff *skb = *pskb;
|
||||
@ -497,8 +459,8 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16
|
||||
+
|
||||
+static int ipt_route_checkentry(const char *tablename,
|
||||
+ const void *e,
|
||||
+ const struct xt_target *target,
|
||||
+ void *targinfo,
|
||||
+ unsigned int targinfosize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ if (strcmp(tablename, "mangle") != 0) {
|
||||
@ -516,13 +478,6 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (targinfosize != IPT_ALIGN(sizeof(struct ipt_route_target_info))) {
|
||||
+ printk(KERN_WARNING "ipt_ROUTE: targinfosize %u != %Zu\n",
|
||||
+ targinfosize,
|
||||
+ IPT_ALIGN(sizeof(struct ipt_route_target_info)));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
@ -530,6 +485,7 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16
|
||||
+static struct ipt_target ipt_route_reg = {
|
||||
+ .name = "ROUTE",
|
||||
+ .target = ipt_route_target,
|
||||
+ .targetsize = sizeof(struct ipt_route_target_info),
|
||||
+ .checkentry = ipt_route_checkentry,
|
||||
+ .me = THIS_MODULE,
|
||||
+};
|
||||
@ -555,10 +511,48 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv4/netfilter/ipt_ROUTE.c linux-2.6.16
|
||||
+
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv6/ipv6_syms.c linux-2.6.16.7-ROUTE/net/ipv6/ipv6_syms.c
|
||||
--- linux-2.6.16.7/net/ipv6/ipv6_syms.c 2006-04-17 23:53:25.000000000 +0200
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv6/ipv6_syms.c 2006-06-14 17:02:32.000000000 +0200
|
||||
@@ -12,6 +12,7 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Kconfig linux-2.6.19.dev/net/ipv4/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:49.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -494,6 +494,23 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+config IP_NF_TARGET_ROUTE
|
||||
+ tristate 'ROUTE target support'
|
||||
+ depends on IP_NF_MANGLE
|
||||
+ help
|
||||
+ This option adds a `ROUTE' target, which enables you to setup unusual
|
||||
+ routes. For example, the ROUTE lets you route a received packet through
|
||||
+ an interface or towards a host, even if the regular destination of the
|
||||
+ packet is the router itself. The ROUTE target is also able to change the
|
||||
+ incoming interface of a packet.
|
||||
+
|
||||
+ The target can be or not a final target. It has to be used inside the
|
||||
+ mangle table.
|
||||
+
|
||||
+ If you want to compile it as a module, say M here and read
|
||||
+ Documentation/modules.txt. The module will be called ipt_ROUTE.o.
|
||||
+ If unsure, say `N'.
|
||||
+
|
||||
config IP_NF_TARGET_NETMAP
|
||||
tristate "NETMAP target support"
|
||||
depends on IP_NF_NAT
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/Makefile linux-2.6.19.dev/net/ipv4/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/Makefile 2006-12-14 03:13:49.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/Makefile 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -74,6 +74,7 @@
|
||||
obj-$(CONFIG_IP_NF_TARGET_IMQ) += ipt_IMQ.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
|
||||
+obj-$(CONFIG_IP_NF_TARGET_ROUTE) += ipt_ROUTE.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
|
||||
obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o
|
||||
obj-$(CONFIG_IP_NF_NAT_SNMP_BASIC) += ip_nat_snmp_basic.o
|
||||
diff -urN linux-2.6.19.old/net/ipv6/ipv6_syms.c linux-2.6.19.dev/net/ipv6/ipv6_syms.c
|
||||
--- linux-2.6.19.old/net/ipv6/ipv6_syms.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/ipv6_syms.c 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
EXPORT_SYMBOL(icmpv6_statistics);
|
||||
EXPORT_SYMBOL(icmpv6_err_convert);
|
||||
EXPORT_SYMBOL(ndisc_mc_map);
|
||||
@ -566,44 +560,10 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv6/ipv6_syms.c linux-2.6.16.7-ROUTE/n
|
||||
EXPORT_SYMBOL(register_inet6addr_notifier);
|
||||
EXPORT_SYMBOL(unregister_inet6addr_notifier);
|
||||
EXPORT_SYMBOL(ip6_route_output);
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/Kconfig linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Kconfig
|
||||
--- linux-2.6.16.7/net/ipv6/netfilter/Kconfig 2006-06-14 16:05:44.000000000 +0200
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Kconfig 2006-06-14 16:45:45.000000000 +0200
|
||||
@@ -182,6 +182,19 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+config IP6_NF_TARGET_ROUTE
|
||||
+ tristate ' ROUTE target support'
|
||||
+ depends on IP6_NF_MANGLE
|
||||
+ help
|
||||
+ This option adds a `ROUTE' target, which enables you to setup unusual
|
||||
+ routes. The ROUTE target is also able to change the incoming interface
|
||||
+ of a packet.
|
||||
+
|
||||
+ The target can be or not a final target. It has to be used inside the
|
||||
+ mangle table.
|
||||
+
|
||||
+ Not working as a module.
|
||||
+
|
||||
config IP6_NF_MANGLE
|
||||
tristate "Packet mangling"
|
||||
depends on IP6_NF_IPTABLES
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/Makefile linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Makefile
|
||||
--- linux-2.6.16.7/net/ipv6/netfilter/Makefile 2006-06-14 16:05:44.000000000 +0200
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv6/netfilter/Makefile 2006-06-14 16:45:00.000000000 +0200
|
||||
@@ -22,6 +22,7 @@
|
||||
obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o
|
||||
obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o
|
||||
+obj-$(CONFIG_IP6_NF_TARGET_ROUTE) += ip6t_ROUTE.o
|
||||
|
||||
# objects for l3 independent conntrack
|
||||
nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o nf_conntrack_reasm.o
|
||||
diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.16.7-ROUTE/net/ipv6/netfilter/ip6t_ROUTE.c
|
||||
--- linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.16.7-ROUTE/net/ipv6/netfilter/ip6t_ROUTE.c 2006-06-14 16:42:44.000000000 +0200
|
||||
@@ -0,0 +1,308 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.19.dev/net/ipv6/netfilter/ip6t_ROUTE.c
|
||||
--- linux-2.6.19.old/net/ipv6/netfilter/ip6t_ROUTE.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/netfilter/ip6t_ROUTE.c 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -0,0 +1,302 @@
|
||||
+/*
|
||||
+ * This implements the ROUTE v6 target, which enables you to setup unusual
|
||||
+ * routes not supported by the standard kernel routing table.
|
||||
@ -798,8 +758,8 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.1
|
||||
+ const struct net_device *in,
|
||||
+ const struct net_device *out,
|
||||
+ unsigned int hooknum,
|
||||
+ const void *targinfo,
|
||||
+ void *userinfo)
|
||||
+ const struct xt_target *target,
|
||||
+ const void *targinfo)
|
||||
+{
|
||||
+ const struct ip6t_route_target_info *route_info = targinfo;
|
||||
+ struct sk_buff *skb = *pskb;
|
||||
@ -865,9 +825,9 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.1
|
||||
+
|
||||
+static int
|
||||
+ip6t_route_checkentry(const char *tablename,
|
||||
+ const struct ip6t_entry *e,
|
||||
+ const void *e,
|
||||
+ const struct xt_target *target,
|
||||
+ void *targinfo,
|
||||
+ unsigned int targinfosize,
|
||||
+ unsigned int hook_mask)
|
||||
+{
|
||||
+ if (strcmp(tablename, "mangle") != 0) {
|
||||
@ -875,13 +835,6 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.1
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if (targinfosize != IP6T_ALIGN(sizeof(struct ip6t_route_target_info))) {
|
||||
+ printk(KERN_WARNING "ip6t_ROUTE: targinfosize %u != %Zu\n",
|
||||
+ targinfosize,
|
||||
+ IP6T_ALIGN(sizeof(struct ip6t_route_target_info)));
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
@ -889,6 +842,7 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.1
|
||||
+static struct ip6t_target ip6t_route_reg = {
|
||||
+ .name = "ROUTE",
|
||||
+ .target = ip6t_route_target,
|
||||
+ .targetsize = sizeof(struct ip6t_route_target_info),
|
||||
+ .checkentry = ip6t_route_checkentry,
|
||||
+ .me = THIS_MODULE
|
||||
+};
|
||||
@ -912,3 +866,37 @@ diff -u'rNF^function' linux-2.6.16.7/net/ipv6/netfilter/ip6t_ROUTE.c linux-2.6.1
|
||||
+module_init(init);
|
||||
+module_exit(fini);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -urN linux-2.6.19.old/net/ipv6/netfilter/Kconfig linux-2.6.19.dev/net/ipv6/netfilter/Kconfig
|
||||
--- linux-2.6.19.old/net/ipv6/netfilter/Kconfig 2006-12-14 03:13:49.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/netfilter/Kconfig 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -162,6 +162,19 @@
|
||||
|
||||
To compile it as a module, choose M here. If unsure, say N.
|
||||
|
||||
+config IP6_NF_TARGET_ROUTE
|
||||
+ tristate "ROUTE target support"
|
||||
+ depends on IP6_NF_MANGLE
|
||||
+ help
|
||||
+ This option adds a `ROUTE' target, which enables you to setup unusual
|
||||
+ routes. The ROUTE target is also able to change the incoming interface
|
||||
+ of a packet.
|
||||
+
|
||||
+ The target can be or not a final target. It has to be used inside the
|
||||
+ mangle table.
|
||||
+
|
||||
+ Not working as a module.
|
||||
+
|
||||
config IP6_NF_MANGLE
|
||||
tristate "Packet mangling"
|
||||
depends on IP6_NF_IPTABLES
|
||||
diff -urN linux-2.6.19.old/net/ipv6/netfilter/Makefile linux-2.6.19.dev/net/ipv6/netfilter/Makefile
|
||||
--- linux-2.6.19.old/net/ipv6/netfilter/Makefile 2006-12-14 03:13:49.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv6/netfilter/Makefile 2006-12-14 03:13:49.000000000 +0100
|
||||
@@ -20,6 +20,7 @@
|
||||
obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
|
||||
obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o
|
||||
obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o
|
||||
+obj-$(CONFIG_IP6_NF_TARGET_ROUTE) += ip6t_ROUTE.o
|
||||
|
||||
# objects for l3 independent conntrack
|
||||
nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o nf_conntrack_reasm.o
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Naur linux-2.6.15.1.orig/include/linux/pkt_sched.h linux-2.6.15.1/include/linux/pkt_sched.h
|
||||
--- linux-2.6.15.1.orig/include/linux/pkt_sched.h 2006-01-14 22:16:02.000000000 -0800
|
||||
+++ linux-2.6.15.1/include/linux/pkt_sched.h 2006-01-30 16:02:32.000000000 -0800
|
||||
diff -urN linux-2.6.19.old/include/linux/pkt_sched.h linux-2.6.19.dev/include/linux/pkt_sched.h
|
||||
--- linux-2.6.19.old/include/linux/pkt_sched.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/pkt_sched.h 2006-12-14 03:13:51.000000000 +0100
|
||||
@@ -146,8 +146,35 @@
|
||||
*
|
||||
* The only reason for this is efficiency, it is possible
|
||||
@ -37,9 +37,9 @@ diff -Naur linux-2.6.15.1.orig/include/linux/pkt_sched.h linux-2.6.15.1/include/
|
||||
/* RED section */
|
||||
|
||||
enum
|
||||
diff -Naur linux-2.6.15.1.orig/net/sched/Kconfig linux-2.6.15.1/net/sched/Kconfig
|
||||
--- linux-2.6.15.1.orig/net/sched/Kconfig 2006-01-14 22:16:02.000000000 -0800
|
||||
+++ linux-2.6.15.1/net/sched/Kconfig 2006-01-30 16:02:32.000000000 -0800
|
||||
diff -urN linux-2.6.19.old/net/sched/Kconfig linux-2.6.19.dev/net/sched/Kconfig
|
||||
--- linux-2.6.19.old/net/sched/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/sched/Kconfig 2006-12-14 03:13:51.000000000 +0100
|
||||
@@ -185,6 +185,28 @@
|
||||
To compile this code as a module, choose M here: the
|
||||
module will be called sch_sfq.
|
||||
@ -69,9 +69,9 @@ diff -Naur linux-2.6.15.1.orig/net/sched/Kconfig linux-2.6.15.1/net/sched/Kconfi
|
||||
config NET_SCH_TEQL
|
||||
tristate "True Link Equalizer (TEQL)"
|
||||
---help---
|
||||
diff -Naur linux-2.6.15.1.orig/net/sched/Makefile linux-2.6.15.1/net/sched/Makefile
|
||||
--- linux-2.6.15.1.orig/net/sched/Makefile 2006-01-14 22:16:02.000000000 -0800
|
||||
+++ linux-2.6.15.1/net/sched/Makefile 2006-01-30 16:02:32.000000000 -0800
|
||||
diff -urN linux-2.6.19.old/net/sched/Makefile linux-2.6.19.dev/net/sched/Makefile
|
||||
--- linux-2.6.19.old/net/sched/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/sched/Makefile 2006-12-14 03:13:51.000000000 +0100
|
||||
@@ -23,6 +23,7 @@
|
||||
obj-$(CONFIG_NET_SCH_INGRESS) += sch_ingress.o
|
||||
obj-$(CONFIG_NET_SCH_DSMARK) += sch_dsmark.o
|
||||
@ -80,9 +80,9 @@ diff -Naur linux-2.6.15.1.orig/net/sched/Makefile linux-2.6.15.1/net/sched/Makef
|
||||
obj-$(CONFIG_NET_SCH_TBF) += sch_tbf.o
|
||||
obj-$(CONFIG_NET_SCH_TEQL) += sch_teql.o
|
||||
obj-$(CONFIG_NET_SCH_PRIO) += sch_prio.o
|
||||
diff -Naur linux-2.6.15.1.orig/net/sched/sch_esfq.c linux-2.6.15.1/net/sched/sch_esfq.c
|
||||
--- linux-2.6.15.1.orig/net/sched/sch_esfq.c 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ linux-2.6.15.1/net/sched/sch_esfq.c 2006-01-30 16:12:29.000000000 -0800
|
||||
diff -urN linux-2.6.19.old/net/sched/sch_esfq.c linux-2.6.19.dev/net/sched/sch_esfq.c
|
||||
--- linux-2.6.19.old/net/sched/sch_esfq.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/sched/sch_esfq.c 2006-12-14 03:13:51.000000000 +0100
|
||||
@@ -0,0 +1,644 @@
|
||||
+/*
|
||||
+ * net/sched/sch_esfq.c Extended Stochastic Fairness Queueing discipline.
|
||||
@ -108,7 +108,7 @@ diff -Naur linux-2.6.15.1.orig/net/sched/sch_esfq.c linux-2.6.15.1/net/sched/sch
|
||||
+ *
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <asm/uaccess.h>
|
||||
+#include <asm/system.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ip_nat.h linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_nat.h
|
||||
--- linux-2.6.17/include/linux/netfilter_ipv4/ip_nat.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/linux/netfilter_ipv4/ip_nat.h 2006-06-18 16:53:21.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_nat.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_nat.h
|
||||
--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_nat.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_nat.h 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -63,6 +63,13 @@
|
||||
|
||||
struct ip_conntrack;
|
||||
@ -15,9 +15,9 @@ diff -Nur linux-2.6.17/include/linux/netfilter_ipv4/ip_nat.h linux-2.6.17-owrt/i
|
||||
/* Set up the info structure to map into this range. */
|
||||
extern unsigned int ip_nat_setup_info(struct ip_conntrack *conntrack,
|
||||
const struct ip_nat_range *range,
|
||||
diff -Nur linux-2.6.17/include/linux/rtnetlink.h linux-2.6.17-owrt/include/linux/rtnetlink.h
|
||||
--- linux-2.6.17/include/linux/rtnetlink.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/linux/rtnetlink.h 2006-06-18 16:53:21.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/linux/rtnetlink.h linux-2.6.19.dev/include/linux/rtnetlink.h
|
||||
--- linux-2.6.19.old/include/linux/rtnetlink.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/rtnetlink.h 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -293,6 +293,8 @@
|
||||
#define RTNH_F_DEAD 1 /* Nexthop is dead (used by multipath) */
|
||||
#define RTNH_F_PERVASIVE 2 /* Do recursive gateway lookup */
|
||||
@ -27,19 +27,19 @@ diff -Nur linux-2.6.17/include/linux/rtnetlink.h linux-2.6.17-owrt/include/linux
|
||||
|
||||
/* Macros to handle hexthops */
|
||||
|
||||
diff -Nur linux-2.6.17/include/net/flow.h linux-2.6.17-owrt/include/net/flow.h
|
||||
--- linux-2.6.17/include/net/flow.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/net/flow.h 2006-06-18 16:53:21.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/net/flow.h linux-2.6.19.dev/include/net/flow.h
|
||||
--- linux-2.6.19.old/include/net/flow.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/net/flow.h 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -19,6 +19,8 @@
|
||||
__u32 daddr;
|
||||
__u32 saddr;
|
||||
__be32 daddr;
|
||||
__be32 saddr;
|
||||
__u32 fwmark;
|
||||
+ __u32 lsrc;
|
||||
+ __u32 gw;
|
||||
__u8 tos;
|
||||
__u8 scope;
|
||||
} ip4_u;
|
||||
@@ -46,6 +48,8 @@
|
||||
@@ -48,6 +50,8 @@
|
||||
#define fl4_dst nl_u.ip4_u.daddr
|
||||
#define fl4_src nl_u.ip4_u.saddr
|
||||
#define fl4_fwmark nl_u.ip4_u.fwmark
|
||||
@ -48,10 +48,10 @@ diff -Nur linux-2.6.17/include/net/flow.h linux-2.6.17-owrt/include/net/flow.h
|
||||
#define fl4_tos nl_u.ip4_u.tos
|
||||
#define fl4_scope nl_u.ip4_u.scope
|
||||
|
||||
diff -Nur linux-2.6.17/include/net/ip_fib.h linux-2.6.17-owrt/include/net/ip_fib.h
|
||||
--- linux-2.6.17/include/net/ip_fib.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/net/ip_fib.h 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -195,7 +195,8 @@
|
||||
diff -urN linux-2.6.19.old/include/net/ip_fib.h linux-2.6.19.dev/include/net/ip_fib.h
|
||||
--- linux-2.6.19.old/include/net/ip_fib.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/net/ip_fib.h 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -196,7 +196,8 @@
|
||||
|
||||
static inline void fib_select_default(const struct flowi *flp, struct fib_result *res)
|
||||
{
|
||||
@ -61,53 +61,56 @@ diff -Nur linux-2.6.17/include/net/ip_fib.h linux-2.6.17-owrt/include/net/ip_fib
|
||||
ip_fib_main_table->tb_select_default(ip_fib_main_table, flp, res);
|
||||
}
|
||||
|
||||
@@ -207,6 +208,7 @@
|
||||
extern int fib_lookup(const struct flowi *flp, struct fib_result *res);
|
||||
extern struct fib_table *__fib_new_table(int id);
|
||||
extern void fib_rule_put(struct fib_rule *r);
|
||||
+extern int fib_result_table(struct fib_result *res);
|
||||
@@ -212,6 +213,8 @@
|
||||
|
||||
static inline struct fib_table *fib_get_table(int id)
|
||||
{
|
||||
@@ -302,4 +304,6 @@
|
||||
#endif /* CONFIG_IP_MULTIPLE_TABLES */
|
||||
|
||||
+extern int fib_result_table(struct fib_result *res);
|
||||
+
|
||||
/* Exported by fib_frontend.c */
|
||||
extern struct nla_policy rtm_ipv4_policy[];
|
||||
extern void ip_fib_init(void);
|
||||
@@ -284,4 +287,6 @@
|
||||
extern void fib_proc_exit(void);
|
||||
#endif
|
||||
|
||||
+extern rwlock_t fib_nhflags_lock;
|
||||
+
|
||||
#endif /* _NET_FIB_H */
|
||||
diff -Nur linux-2.6.17/include/net/route.h linux-2.6.17-owrt/include/net/route.h
|
||||
--- linux-2.6.17/include/net/route.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/net/route.h 2006-06-18 16:53:21.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/net/route.h linux-2.6.19.dev/include/net/route.h
|
||||
--- linux-2.6.19.old/include/net/route.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/net/route.h 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -117,6 +117,7 @@
|
||||
extern int ip_route_output_key(struct rtable **, struct flowi *flp);
|
||||
extern int ip_route_output_flow(struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
|
||||
extern int ip_route_input(struct sk_buff*, u32 dst, u32 src, u8 tos, struct net_device *devin);
|
||||
extern int ip_route_input(struct sk_buff*, __be32 dst, __be32 src, u8 tos, struct net_device *devin);
|
||||
+extern int ip_route_input_lookup(struct sk_buff*, u32 dst, u32 src, u8 tos, struct net_device *devin, u32 lsrc);
|
||||
extern unsigned short ip_rt_frag_needed(struct iphdr *iph, unsigned short new_mtu);
|
||||
extern void ip_rt_send_redirect(struct sk_buff *skb);
|
||||
|
||||
diff -Nur linux-2.6.17/net/ipv4/fib_frontend.c linux-2.6.17-owrt/net/ipv4/fib_frontend.c
|
||||
--- linux-2.6.17/net/ipv4/fib_frontend.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/fib_frontend.c 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -56,6 +56,8 @@
|
||||
struct fib_table *ip_fib_local_table;
|
||||
struct fib_table *ip_fib_main_table;
|
||||
diff -urN linux-2.6.19.old/net/ipv4/fib_frontend.c linux-2.6.19.dev/net/ipv4/fib_frontend.c
|
||||
--- linux-2.6.19.old/net/ipv4/fib_frontend.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/fib_frontend.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -58,6 +58,8 @@
|
||||
#define FIB_TABLE_HASHSZ 1
|
||||
static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
|
||||
|
||||
+#define FIB_RES_TABLE(r) (RT_TABLE_MAIN)
|
||||
+
|
||||
#else
|
||||
|
||||
#define RT_TABLE_MIN 1
|
||||
@@ -73,6 +75,7 @@
|
||||
return tb;
|
||||
#define FIB_TABLE_HASHSZ 256
|
||||
@@ -100,6 +102,9 @@
|
||||
rcu_read_unlock();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+
|
||||
+#define FIB_RES_TABLE(r) (fib_result_table(r))
|
||||
|
||||
+
|
||||
#endif /* CONFIG_IP_MULTIPLE_TABLES */
|
||||
|
||||
@@ -170,6 +173,9 @@
|
||||
static void fib_flush(void)
|
||||
@@ -190,6 +195,9 @@
|
||||
.tos = tos } },
|
||||
.iif = oif };
|
||||
struct fib_result res;
|
||||
@ -117,7 +120,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_frontend.c linux-2.6.17-owrt/net/ipv4/fib_fr
|
||||
int no_addr, rpf;
|
||||
int ret;
|
||||
|
||||
@@ -191,31 +197,35 @@
|
||||
@@ -211,31 +219,35 @@
|
||||
goto e_inval_res;
|
||||
*spec_dst = FIB_RES_PREFSRC(res);
|
||||
fib_combine_itag(itag, &res);
|
||||
@ -160,7 +163,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_frontend.c linux-2.6.17-owrt/net/ipv4/fib_fr
|
||||
return ret;
|
||||
|
||||
last_resort:
|
||||
@@ -589,9 +599,7 @@
|
||||
@@ -836,9 +848,7 @@
|
||||
switch (event) {
|
||||
case NETDEV_UP:
|
||||
fib_add_ifaddr(ifa);
|
||||
@ -170,7 +173,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_frontend.c linux-2.6.17-owrt/net/ipv4/fib_fr
|
||||
rt_cache_flush(-1);
|
||||
break;
|
||||
case NETDEV_DOWN:
|
||||
@@ -627,9 +635,7 @@
|
||||
@@ -874,9 +884,7 @@
|
||||
for_ifa(in_dev) {
|
||||
fib_add_ifaddr(ifa);
|
||||
} endfor_ifa(in_dev);
|
||||
@ -180,10 +183,10 @@ diff -Nur linux-2.6.17/net/ipv4/fib_frontend.c linux-2.6.17-owrt/net/ipv4/fib_fr
|
||||
rt_cache_flush(-1);
|
||||
break;
|
||||
case NETDEV_DOWN:
|
||||
diff -Nur linux-2.6.17/net/ipv4/fib_hash.c linux-2.6.17-owrt/net/ipv4/fib_hash.c
|
||||
--- linux-2.6.17/net/ipv4/fib_hash.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/fib_hash.c 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -277,30 +277,38 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/fib_hash.c linux-2.6.19.dev/net/ipv4/fib_hash.c
|
||||
--- linux-2.6.19.old/net/ipv4/fib_hash.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/fib_hash.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -275,30 +275,38 @@
|
||||
return err;
|
||||
}
|
||||
|
||||
@ -227,7 +230,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_hash.c linux-2.6.17-owrt/net/ipv4/fib_hash.c
|
||||
list_for_each_entry(fa, &f->fn_alias, fa_list) {
|
||||
struct fib_info *next_fi = fa->fa_info;
|
||||
|
||||
@@ -308,41 +316,52 @@
|
||||
@@ -306,41 +314,52 @@
|
||||
fa->fa_type != RTN_UNICAST)
|
||||
continue;
|
||||
|
||||
@ -292,7 +295,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_hash.c linux-2.6.17-owrt/net/ipv4/fib_hash.c
|
||||
goto out;
|
||||
}
|
||||
|
||||
@@ -352,8 +371,11 @@
|
||||
@@ -350,8 +369,11 @@
|
||||
res->fi = last_resort;
|
||||
if (last_resort)
|
||||
atomic_inc(&last_resort->fib_clntref);
|
||||
@ -305,25 +308,25 @@ diff -Nur linux-2.6.17/net/ipv4/fib_hash.c linux-2.6.17-owrt/net/ipv4/fib_hash.c
|
||||
out:
|
||||
read_unlock(&fib_hash_lock);
|
||||
}
|
||||
@@ -452,6 +474,7 @@
|
||||
@@ -447,6 +469,7 @@
|
||||
write_lock_bh(&fib_hash_lock);
|
||||
fi_drop = fa->fa_info;
|
||||
fa->fa_info = fi;
|
||||
+ fa->fa_last_dflt = -1;
|
||||
fa->fa_type = type;
|
||||
fa->fa_scope = r->rtm_scope;
|
||||
fa->fa_type = cfg->fc_type;
|
||||
fa->fa_scope = cfg->fc_scope;
|
||||
state = fa->fa_state;
|
||||
@@ -511,6 +534,7 @@
|
||||
new_fa->fa_type = type;
|
||||
new_fa->fa_scope = r->rtm_scope;
|
||||
@@ -506,6 +529,7 @@
|
||||
new_fa->fa_type = cfg->fc_type;
|
||||
new_fa->fa_scope = cfg->fc_scope;
|
||||
new_fa->fa_state = 0;
|
||||
+ new_fa->fa_last_dflt = -1;
|
||||
|
||||
/*
|
||||
* Insert new entry to the list.
|
||||
diff -Nur linux-2.6.17/net/ipv4/fib_lookup.h linux-2.6.17-owrt/net/ipv4/fib_lookup.h
|
||||
--- linux-2.6.17/net/ipv4/fib_lookup.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/fib_lookup.h 2006-06-18 16:53:21.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/net/ipv4/fib_lookup.h linux-2.6.19.dev/net/ipv4/fib_lookup.h
|
||||
--- linux-2.6.19.old/net/ipv4/fib_lookup.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/fib_lookup.h 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -9,6 +9,7 @@
|
||||
struct list_head fa_list;
|
||||
struct rcu_head rcu;
|
||||
@ -332,7 +335,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_lookup.h linux-2.6.17-owrt/net/ipv4/fib_look
|
||||
u8 fa_tos;
|
||||
u8 fa_type;
|
||||
u8 fa_scope;
|
||||
@@ -40,6 +41,7 @@
|
||||
@@ -35,6 +36,7 @@
|
||||
u8 tos, u32 prio);
|
||||
extern int fib_detect_death(struct fib_info *fi, int order,
|
||||
struct fib_info **last_resort,
|
||||
@ -341,34 +344,34 @@ diff -Nur linux-2.6.17/net/ipv4/fib_lookup.h linux-2.6.17-owrt/net/ipv4/fib_look
|
||||
+ const struct flowi *flp);
|
||||
|
||||
#endif /* _FIB_LOOKUP_H */
|
||||
diff -Nur linux-2.6.17/net/ipv4/fib_rules.c linux-2.6.17-owrt/net/ipv4/fib_rules.c
|
||||
--- linux-2.6.17/net/ipv4/fib_rules.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/fib_rules.c 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -296,6 +296,11 @@
|
||||
}
|
||||
diff -urN linux-2.6.19.old/net/ipv4/fib_rules.c linux-2.6.19.dev/net/ipv4/fib_rules.c
|
||||
--- linux-2.6.19.old/net/ipv4/fib_rules.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/fib_rules.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -89,6 +89,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+int fib_result_table(struct fib_result *res)
|
||||
+{
|
||||
+ return res->r->r_table;
|
||||
+ return res->r->table;
|
||||
+}
|
||||
+
|
||||
int fib_lookup(const struct flowi *flp, struct fib_result *res)
|
||||
int fib_lookup(struct flowi *flp, struct fib_result *res)
|
||||
{
|
||||
int err;
|
||||
@@ -361,7 +366,8 @@
|
||||
struct fib_lookup_arg arg = {
|
||||
@@ -140,7 +145,8 @@
|
||||
void fib_select_default(const struct flowi *flp, struct fib_result *res)
|
||||
{
|
||||
if (res->r && res->r->r_action == RTN_UNICAST &&
|
||||
if (res->r && res->r->action == FR_ACT_TO_TBL &&
|
||||
- FIB_RES_GW(*res) && FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK) {
|
||||
+ ((FIB_RES_GW(*res) && FIB_RES_NH(*res).nh_scope == RT_SCOPE_LINK) ||
|
||||
+ FIB_RES_NH(*res).nh_scope == RT_SCOPE_HOST)) {
|
||||
+ FIB_RES_NH(*res).nh_scope == RT_SCOPE_HOST)) {
|
||||
struct fib_table *tb;
|
||||
if ((tb = fib_get_table(res->r->r_table)) != NULL)
|
||||
if ((tb = fib_get_table(res->r->table)) != NULL)
|
||||
tb->tb_select_default(tb, flp, res);
|
||||
diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_semantics.c
|
||||
--- linux-2.6.17/net/ipv4/fib_semantics.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/fib_semantics.c 2006-06-18 16:53:21.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/net/ipv4/fib_semantics.c linux-2.6.19.dev/net/ipv4/fib_semantics.c
|
||||
--- linux-2.6.19.old/net/ipv4/fib_semantics.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/fib_semantics.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -55,6 +55,7 @@
|
||||
static struct hlist_head *fib_info_laddrhash;
|
||||
static unsigned int fib_hash_size;
|
||||
@ -482,7 +485,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IP_ROUTE_MULTIPATH
|
||||
@@ -509,8 +554,11 @@
|
||||
@@ -508,8 +553,11 @@
|
||||
return -EINVAL;
|
||||
if ((dev = __dev_get_by_index(nh->nh_oif)) == NULL)
|
||||
return -ENODEV;
|
||||
@ -496,7 +499,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
nh->nh_dev = dev;
|
||||
dev_hold(dev);
|
||||
nh->nh_scope = RT_SCOPE_LINK;
|
||||
@@ -525,24 +573,48 @@
|
||||
@@ -529,24 +577,48 @@
|
||||
/* It is not necessary, but requires a bit of thinking */
|
||||
if (fl.fl4_scope < RT_SCOPE_LINK)
|
||||
fl.fl4_scope = RT_SCOPE_LINK;
|
||||
@ -561,7 +564,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
} else {
|
||||
struct in_device *in_dev;
|
||||
|
||||
@@ -553,8 +625,11 @@
|
||||
@@ -557,8 +629,11 @@
|
||||
if (in_dev == NULL)
|
||||
return -ENODEV;
|
||||
if (!(in_dev->dev->flags&IFF_UP)) {
|
||||
@ -575,7 +578,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
}
|
||||
nh->nh_dev = in_dev->dev;
|
||||
dev_hold(nh->nh_dev);
|
||||
@@ -892,8 +967,12 @@
|
||||
@@ -881,8 +956,12 @@
|
||||
for_nexthops(fi) {
|
||||
if (nh->nh_flags&RTNH_F_DEAD)
|
||||
continue;
|
||||
@ -590,7 +593,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
}
|
||||
#ifdef CONFIG_IP_ROUTE_MULTIPATH
|
||||
if (nhsel < fi->fib_nhs) {
|
||||
@@ -1199,18 +1278,29 @@
|
||||
@@ -1056,18 +1135,29 @@
|
||||
prev_fi = fi;
|
||||
dead = 0;
|
||||
change_nexthops(fi) {
|
||||
@ -628,7 +631,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
}
|
||||
#ifdef CONFIG_IP_ROUTE_MULTIPATH
|
||||
if (force > 1 && nh->nh_dev == dev) {
|
||||
@@ -1229,11 +1319,8 @@
|
||||
@@ -1086,11 +1176,8 @@
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -641,7 +644,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
*/
|
||||
|
||||
int fib_sync_up(struct net_device *dev)
|
||||
@@ -1243,8 +1330,10 @@
|
||||
@@ -1100,8 +1187,10 @@
|
||||
struct hlist_head *head;
|
||||
struct hlist_node *node;
|
||||
struct fib_nh *nh;
|
||||
@ -653,7 +656,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
if (!(dev->flags&IFF_UP))
|
||||
return 0;
|
||||
|
||||
@@ -1252,6 +1341,7 @@
|
||||
@@ -1109,6 +1198,7 @@
|
||||
hash = fib_devindex_hashfn(dev->ifindex);
|
||||
head = &fib_info_devhash[hash];
|
||||
ret = 0;
|
||||
@ -661,7 +664,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
|
||||
hlist_for_each_entry(nh, node, head, nh_hash) {
|
||||
struct fib_info *fi = nh->nh_parent;
|
||||
@@ -1264,19 +1354,37 @@
|
||||
@@ -1121,19 +1211,37 @@
|
||||
prev_fi = fi;
|
||||
alive = 0;
|
||||
change_nexthops(fi) {
|
||||
@ -702,7 +705,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
} endfor_nexthops(fi)
|
||||
|
||||
if (alive > 0) {
|
||||
@@ -1284,10 +1392,14 @@
|
||||
@@ -1141,10 +1249,14 @@
|
||||
ret++;
|
||||
}
|
||||
}
|
||||
@ -717,7 +720,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
/*
|
||||
The algorithm is suboptimal, but it provides really
|
||||
fair weighted route distribution.
|
||||
@@ -1296,24 +1408,45 @@
|
||||
@@ -1153,24 +1265,45 @@
|
||||
void fib_select_multipath(const struct flowi *flp, struct fib_result *res)
|
||||
{
|
||||
struct fib_info *fi = res->fi;
|
||||
@ -771,7 +774,7 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
}
|
||||
|
||||
|
||||
@@ -1323,20 +1456,40 @@
|
||||
@@ -1180,20 +1313,40 @@
|
||||
|
||||
w = jiffies % fi->fib_power;
|
||||
|
||||
@ -815,10 +818,10 @@ diff -Nur linux-2.6.17/net/ipv4/fib_semantics.c linux-2.6.17-owrt/net/ipv4/fib_s
|
||||
spin_unlock_bh(&fib_multipath_lock);
|
||||
}
|
||||
#endif
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_nat_core.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_core.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ip_nat_core.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_core.c 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -589,6 +589,53 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_nat_core.c linux-2.6.19.dev/net/ipv4/netfilter/ip_nat_core.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ip_nat_core.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ip_nat_core.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -573,6 +573,53 @@
|
||||
EXPORT_SYMBOL_GPL(ip_nat_port_range_to_nfattr);
|
||||
#endif
|
||||
|
||||
@ -872,10 +875,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_nat_core.c linux-2.6.17-owrt/net/ip
|
||||
static int __init ip_nat_init(void)
|
||||
{
|
||||
size_t i;
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_nat_standalone.c linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_standalone.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ip_nat_standalone.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ip_nat_standalone.c 2006-06-18 17:12:03.000000000 +0200
|
||||
@@ -334,6 +334,14 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_nat_standalone.c linux-2.6.19.dev/net/ipv4/netfilter/ip_nat_standalone.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ip_nat_standalone.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ip_nat_standalone.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -325,6 +325,14 @@
|
||||
.hooknum = NF_IP_LOCAL_OUT,
|
||||
.priority = NF_IP_PRI_NAT_DST,
|
||||
},
|
||||
@ -890,10 +893,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ip_nat_standalone.c linux-2.6.17-owrt/
|
||||
/* After packet filtering, change source */
|
||||
{
|
||||
.hook = ip_nat_fn,
|
||||
diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_MASQUERADE.c linux-2.6.17-owrt/net/ipv4/netfilter/ipt_MASQUERADE.c
|
||||
--- linux-2.6.17/net/ipv4/netfilter/ipt_MASQUERADE.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/netfilter/ipt_MASQUERADE.c 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -88,13 +88,31 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_MASQUERADE.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_MASQUERADE.c
|
||||
--- linux-2.6.19.old/net/ipv4/netfilter/ipt_MASQUERADE.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_MASQUERADE.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -85,13 +85,31 @@
|
||||
return NF_ACCEPT;
|
||||
|
||||
mr = targinfo;
|
||||
@ -930,10 +933,10 @@ diff -Nur linux-2.6.17/net/ipv4/netfilter/ipt_MASQUERADE.c linux-2.6.17-owrt/net
|
||||
write_lock_bh(&masq_lock);
|
||||
ct->nat.masq_index = out->ifindex;
|
||||
write_unlock_bh(&masq_lock);
|
||||
diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
--- linux-2.6.17/net/ipv4/route.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/net/ipv4/route.c 2006-06-18 16:53:21.000000000 +0200
|
||||
@@ -1195,6 +1195,7 @@
|
||||
diff -urN linux-2.6.19.old/net/ipv4/route.c linux-2.6.19.dev/net/ipv4/route.c
|
||||
--- linux-2.6.19.old/net/ipv4/route.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/net/ipv4/route.c 2006-12-14 03:13:53.000000000 +0100
|
||||
@@ -1211,6 +1211,7 @@
|
||||
|
||||
/* Gateway is different ... */
|
||||
rt->rt_gateway = new_gw;
|
||||
@ -941,7 +944,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
|
||||
/* Redirect received -> path was valid */
|
||||
dst_confirm(&rth->u.dst);
|
||||
@@ -1626,6 +1627,7 @@
|
||||
@@ -1647,6 +1648,7 @@
|
||||
rth->fl.fl4_fwmark= skb->nfmark;
|
||||
#endif
|
||||
rth->fl.fl4_src = saddr;
|
||||
@ -949,7 +952,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
rth->rt_src = saddr;
|
||||
#ifdef CONFIG_NET_CLS_ROUTE
|
||||
rth->u.dst.tclassid = itag;
|
||||
@@ -1636,6 +1638,7 @@
|
||||
@@ -1657,6 +1659,7 @@
|
||||
dev_hold(rth->u.dst.dev);
|
||||
rth->idev = in_dev_get(rth->u.dst.dev);
|
||||
rth->fl.oif = 0;
|
||||
@ -957,16 +960,16 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
rth->rt_gateway = daddr;
|
||||
rth->rt_spec_dst= spec_dst;
|
||||
rth->rt_type = RTN_MULTICAST;
|
||||
@@ -1700,7 +1703,7 @@
|
||||
@@ -1721,7 +1724,7 @@
|
||||
struct fib_result* res,
|
||||
struct in_device *in_dev,
|
||||
u32 daddr, u32 saddr, u32 tos,
|
||||
__be32 daddr, __be32 saddr, u32 tos,
|
||||
- struct rtable **result)
|
||||
+ u32 lsrc, struct rtable **result)
|
||||
{
|
||||
|
||||
struct rtable *rth;
|
||||
@@ -1733,6 +1736,7 @@
|
||||
@@ -1755,6 +1758,7 @@
|
||||
flags |= RTCF_DIRECTSRC;
|
||||
|
||||
if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) &&
|
||||
@ -974,7 +977,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
(IN_DEV_SHARED_MEDIA(out_dev) ||
|
||||
inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
|
||||
flags |= RTCF_DOREDIRECT;
|
||||
@@ -1772,6 +1776,7 @@
|
||||
@@ -1794,6 +1798,7 @@
|
||||
#endif
|
||||
rth->fl.fl4_src = saddr;
|
||||
rth->rt_src = saddr;
|
||||
@ -982,7 +985,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
rth->rt_gateway = daddr;
|
||||
rth->rt_iif =
|
||||
rth->fl.iif = in_dev->dev->ifindex;
|
||||
@@ -1779,6 +1784,7 @@
|
||||
@@ -1801,6 +1806,7 @@
|
||||
dev_hold(rth->u.dst.dev);
|
||||
rth->idev = in_dev_get(rth->u.dst.dev);
|
||||
rth->fl.oif = 0;
|
||||
@ -990,12 +993,13 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
rth->rt_spec_dst= spec_dst;
|
||||
|
||||
rth->u.dst.input = ip_forward;
|
||||
@@ -1800,19 +1806,20 @@
|
||||
@@ -1822,19 +1828,21 @@
|
||||
struct fib_result* res,
|
||||
const struct flowi *fl,
|
||||
struct in_device *in_dev,
|
||||
- u32 daddr, u32 saddr, u32 tos)
|
||||
+ u32 daddr, u32 saddr, u32 tos, u32 lsrc)
|
||||
- __be32 daddr, __be32 saddr, u32 tos)
|
||||
+ __be32 daddr, __be32 saddr, u32 tos,
|
||||
+ u32 lsrc)
|
||||
{
|
||||
struct rtable* rth = NULL;
|
||||
int err;
|
||||
@ -1014,16 +1018,17 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1825,7 +1832,7 @@
|
||||
@@ -1847,7 +1855,8 @@
|
||||
struct fib_result* res,
|
||||
const struct flowi *fl,
|
||||
struct in_device *in_dev,
|
||||
- u32 daddr, u32 saddr, u32 tos)
|
||||
+ u32 daddr, u32 saddr, u32 tos, u32 lsrc)
|
||||
- __be32 daddr, __be32 saddr, u32 tos)
|
||||
+ __be32 daddr, __be32 saddr, u32 tos,
|
||||
+ u32 lsrc)
|
||||
{
|
||||
#ifdef CONFIG_IP_ROUTE_MULTIPATH_CACHED
|
||||
struct rtable* rth = NULL, *rtres;
|
||||
@@ -1841,7 +1848,7 @@
|
||||
@@ -1863,7 +1872,7 @@
|
||||
/* distinguish between multipath and singlepath */
|
||||
if (hopcount < 2)
|
||||
return ip_mkroute_input_def(skb, res, fl, in_dev, daddr,
|
||||
@ -1032,7 +1037,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
|
||||
/* add all alternatives to the routing cache */
|
||||
for (hop = 0; hop < hopcount; hop++) {
|
||||
@@ -1853,7 +1860,7 @@
|
||||
@@ -1875,7 +1884,7 @@
|
||||
|
||||
/* create a routing cache entry */
|
||||
err = __mkroute_input(skb, res, in_dev, daddr, saddr, tos,
|
||||
@ -1041,7 +1046,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
@@ -1873,7 +1880,7 @@
|
||||
@@ -1895,7 +1904,7 @@
|
||||
skb->dst = &rtres->u.dst;
|
||||
return err;
|
||||
#else /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */
|
||||
@ -1050,10 +1055,10 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
#endif /* CONFIG_IP_ROUTE_MULTIPATH_CACHED */
|
||||
}
|
||||
|
||||
@@ -1889,20 +1896,20 @@
|
||||
@@ -1911,20 +1920,20 @@
|
||||
*/
|
||||
|
||||
static int ip_route_input_slow(struct sk_buff *skb, u32 daddr, u32 saddr,
|
||||
static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
||||
- u8 tos, struct net_device *dev)
|
||||
+ u8 tos, struct net_device *dev, u32 lsrc)
|
||||
{
|
||||
@ -1074,7 +1079,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
unsigned flags = 0;
|
||||
u32 itag = 0;
|
||||
struct rtable * rth;
|
||||
@@ -1935,6 +1942,12 @@
|
||||
@@ -1957,6 +1966,12 @@
|
||||
if (BADCLASS(daddr) || ZERONET(daddr) || LOOPBACK(daddr))
|
||||
goto martian_destination;
|
||||
|
||||
@ -1087,7 +1092,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
/*
|
||||
* Now we are ready to route packet.
|
||||
*/
|
||||
@@ -1944,6 +1957,10 @@
|
||||
@@ -1966,6 +1981,10 @@
|
||||
goto no_route;
|
||||
}
|
||||
free_res = 1;
|
||||
@ -1098,7 +1103,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
|
||||
RT_CACHE_STAT_INC(in_slow_tot);
|
||||
|
||||
@@ -1968,7 +1985,7 @@
|
||||
@@ -1990,7 +2009,7 @@
|
||||
if (res.type != RTN_UNICAST)
|
||||
goto martian_destination;
|
||||
|
||||
@ -1107,7 +1112,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
if (err == -ENOBUFS)
|
||||
goto e_nobufs;
|
||||
if (err == -EINVAL)
|
||||
@@ -1983,6 +2000,8 @@
|
||||
@@ -2005,6 +2024,8 @@
|
||||
brd_input:
|
||||
if (skb->protocol != htons(ETH_P_IP))
|
||||
goto e_inval;
|
||||
@ -1116,7 +1121,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
|
||||
if (ZERONET(saddr))
|
||||
spec_dst = inet_select_addr(dev, 0, RT_SCOPE_LINK);
|
||||
@@ -2025,6 +2044,7 @@
|
||||
@@ -2047,6 +2068,7 @@
|
||||
rth->u.dst.dev = &loopback_dev;
|
||||
dev_hold(rth->u.dst.dev);
|
||||
rth->idev = in_dev_get(rth->u.dst.dev);
|
||||
@ -1124,19 +1129,19 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
rth->rt_gateway = daddr;
|
||||
rth->rt_spec_dst= spec_dst;
|
||||
rth->u.dst.input= ip_local_deliver;
|
||||
@@ -2074,8 +2094,9 @@
|
||||
@@ -2096,8 +2118,9 @@
|
||||
goto e_inval;
|
||||
}
|
||||
|
||||
-int ip_route_input(struct sk_buff *skb, u32 daddr, u32 saddr,
|
||||
-int ip_route_input(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
||||
- u8 tos, struct net_device *dev)
|
||||
+static inline int
|
||||
+ip_route_input_cached(struct sk_buff *skb, u32 daddr, u32 saddr,
|
||||
+ u8 tos, struct net_device *dev, u32 lsrc)
|
||||
+ip_route_input_cached(struct sk_buff *skb, __be32 daddr, __be32 saddr,
|
||||
+ u8 tos, struct net_device *dev, u32 lsrc)
|
||||
{
|
||||
struct rtable * rth;
|
||||
unsigned hash;
|
||||
@@ -2090,6 +2111,7 @@
|
||||
@@ -2112,6 +2135,7 @@
|
||||
if (rth->fl.fl4_dst == daddr &&
|
||||
rth->fl.fl4_src == saddr &&
|
||||
rth->fl.iif == iif &&
|
||||
@ -1144,7 +1149,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
rth->fl.oif == 0 &&
|
||||
#ifdef CONFIG_IP_ROUTE_FWMARK
|
||||
rth->fl.fl4_fwmark == skb->nfmark &&
|
||||
@@ -2138,7 +2160,19 @@
|
||||
@@ -2160,7 +2184,19 @@
|
||||
rcu_read_unlock();
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -1165,7 +1170,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
}
|
||||
|
||||
static inline int __mkroute_output(struct rtable **result,
|
||||
@@ -2217,6 +2251,7 @@
|
||||
@@ -2239,6 +2275,7 @@
|
||||
rth->fl.fl4_tos = tos;
|
||||
rth->fl.fl4_src = oldflp->fl4_src;
|
||||
rth->fl.oif = oldflp->oif;
|
||||
@ -1173,7 +1178,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
#ifdef CONFIG_IP_ROUTE_FWMARK
|
||||
rth->fl.fl4_fwmark= oldflp->fl4_fwmark;
|
||||
#endif
|
||||
@@ -2361,6 +2396,7 @@
|
||||
@@ -2381,6 +2418,7 @@
|
||||
struct flowi fl = { .nl_u = { .ip4_u =
|
||||
{ .daddr = oldflp->fl4_dst,
|
||||
.saddr = oldflp->fl4_src,
|
||||
@ -1181,7 +1186,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
.tos = tos & IPTOS_RT_MASK,
|
||||
.scope = ((tos & RTO_ONLINK) ?
|
||||
RT_SCOPE_LINK :
|
||||
@@ -2466,6 +2502,7 @@
|
||||
@@ -2486,6 +2524,7 @@
|
||||
dev_out = &loopback_dev;
|
||||
dev_hold(dev_out);
|
||||
fl.oif = loopback_dev.ifindex;
|
||||
@ -1189,7 +1194,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
res.type = RTN_LOCAL;
|
||||
flags |= RTCF_LOCAL;
|
||||
goto make_route;
|
||||
@@ -2473,7 +2510,7 @@
|
||||
@@ -2493,7 +2532,7 @@
|
||||
|
||||
if (fib_lookup(&fl, &res)) {
|
||||
res.fi = NULL;
|
||||
@ -1198,7 +1203,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
/* Apparently, routing tables are wrong. Assume,
|
||||
that the destination is on link.
|
||||
|
||||
@@ -2513,6 +2550,7 @@
|
||||
@@ -2533,6 +2572,7 @@
|
||||
dev_out = &loopback_dev;
|
||||
dev_hold(dev_out);
|
||||
fl.oif = dev_out->ifindex;
|
||||
@ -1206,7 +1211,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
if (res.fi)
|
||||
fib_info_put(res.fi);
|
||||
res.fi = NULL;
|
||||
@@ -2520,13 +2558,12 @@
|
||||
@@ -2540,13 +2580,12 @@
|
||||
goto make_route;
|
||||
}
|
||||
|
||||
@ -1223,7 +1228,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
|
||||
if (!fl.fl4_src)
|
||||
fl.fl4_src = FIB_RES_PREFSRC(res);
|
||||
@@ -2563,6 +2600,7 @@
|
||||
@@ -2583,6 +2622,7 @@
|
||||
rth->fl.fl4_src == flp->fl4_src &&
|
||||
rth->fl.iif == 0 &&
|
||||
rth->fl.oif == flp->oif &&
|
||||
@ -1231,7 +1236,7 @@ diff -Nur linux-2.6.17/net/ipv4/route.c linux-2.6.17-owrt/net/ipv4/route.c
|
||||
#ifdef CONFIG_IP_ROUTE_FWMARK
|
||||
rth->fl.fl4_fwmark == flp->fl4_fwmark &&
|
||||
#endif
|
||||
@@ -3199,3 +3237,4 @@
|
||||
@@ -3221,3 +3261,4 @@
|
||||
EXPORT_SYMBOL(__ip_select_ident);
|
||||
EXPORT_SYMBOL(ip_route_input);
|
||||
EXPORT_SYMBOL(ip_route_output_key);
|
||||
|
@ -1,6 +1,7 @@
|
||||
--- linux-2.6.17/arch/mips/Makefile 2006-06-19 15:12:09.000000000 -0700
|
||||
+++ linux-2.6.17/arch/mips/Makefile 2006-06-19 15:11:59.000000000 -0700
|
||||
@@ -602,6 +602,9 @@
|
||||
diff -urN linux-2.6.19.old/arch/mips/Makefile linux-2.6.19.dev/arch/mips/Makefile
|
||||
--- linux-2.6.19.old/arch/mips/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/arch/mips/Makefile 2006-12-14 03:13:55.000000000 +0100
|
||||
@@ -600,6 +600,9 @@
|
||||
core-$(CONFIG_TOSHIBA_RBTX4938) += arch/mips/tx4938/common/
|
||||
load-$(CONFIG_TOSHIBA_RBTX4938) += 0xffffffff80100000
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -Nurb linux-2.6.17/usr/Makefile linux-2.6.17/usr/Makefile
|
||||
--- linux-2.6.17/usr/Makefile 2006-06-20 11:51:27.000000000 -0700
|
||||
+++ linux-2.6.17/usr/Makefile 2006-06-20 11:51:34.000000000 -0700
|
||||
@@ -21,8 +21,7 @@
|
||||
$(CONFIG_INITRAMFS_SOURCE),-d)
|
||||
ramfs-args := \
|
||||
$(if $(CONFIG_INITRAMFS_ROOT_UID), -u $(CONFIG_INITRAMFS_ROOT_UID)) \
|
||||
- $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID)) \
|
||||
- $(ramfs-input)
|
||||
+ $(if $(CONFIG_INITRAMFS_ROOT_GID), -g $(CONFIG_INITRAMFS_ROOT_GID))
|
||||
|
||||
# .initramfs_data.cpio.gz.d is used to identify all files included
|
||||
# in initramfs and to detect if any files are added/removed.
|
@ -1,6 +1,6 @@
|
||||
diff -urN linux.old/fs/jffs2/build.c linux.dev/fs/jffs2/build.c
|
||||
--- linux.old/fs/jffs2/build.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/fs/jffs2/build.c 2006-06-23 21:46:48.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/fs/jffs2/build.c linux-2.6.19.dev/fs/jffs2/build.c
|
||||
--- linux-2.6.19.old/fs/jffs2/build.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/jffs2/build.c 2006-12-14 03:13:57.000000000 +0100
|
||||
@@ -107,6 +107,17 @@
|
||||
dbg_fsbuild("scanned flash completely\n");
|
||||
jffs2_dbg_dump_block_lists_nolock(c);
|
||||
@ -19,10 +19,10 @@ diff -urN linux.old/fs/jffs2/build.c linux.dev/fs/jffs2/build.c
|
||||
dbg_fsbuild("pass 1 starting\n");
|
||||
c->flags |= JFFS2_SB_FLAG_BUILDING;
|
||||
/* Now scan the directory tree, increasing nlink according to every dirent found. */
|
||||
diff -urN linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c
|
||||
--- linux.old/fs/jffs2/scan.c 2006-06-23 21:39:38.000000000 +0200
|
||||
+++ linux.dev/fs/jffs2/scan.c 2006-06-23 21:42:18.000000000 +0200
|
||||
@@ -119,9 +119,12 @@
|
||||
diff -urN linux-2.6.19.old/fs/jffs2/scan.c linux-2.6.19.dev/fs/jffs2/scan.c
|
||||
--- linux-2.6.19.old/fs/jffs2/scan.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/jffs2/scan.c 2006-12-14 03:13:57.000000000 +0100
|
||||
@@ -141,9 +141,12 @@
|
||||
|
||||
/* reset summary info for next eraseblock scan */
|
||||
jffs2_sum_reset_collected(s);
|
||||
@ -38,7 +38,7 @@ diff -urN linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c
|
||||
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
@@ -389,6 +392,17 @@
|
||||
@@ -540,6 +543,17 @@
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -1,235 +0,0 @@
|
||||
diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/devices/block2mtd.c
|
||||
--- linux.old/drivers/mtd/devices/block2mtd.c 2006-07-29 19:53:54.000000000 +0200
|
||||
+++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-07-29 19:47:03.000000000 +0200
|
||||
@@ -4,11 +4,10 @@
|
||||
* block2mtd.c - create an mtd from a block device
|
||||
*
|
||||
* Copyright (C) 2001,2002 Simon Evans <spse@secret.org.uk>
|
||||
- * Copyright (C) 2004,2005 Jörn Engel <joern@wh.fh-wedel.de>
|
||||
+ * Copyright (C) 2004-2006 Jörn Engel <joern@wh.fh-wedel.de>
|
||||
*
|
||||
* Licence: GPL
|
||||
*/
|
||||
-#include <linux/config.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/blkdev.h>
|
||||
@@ -19,6 +18,7 @@ #include <linux/init.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/mutex.h>
|
||||
+#include <linux/mount.h>
|
||||
|
||||
#define VERSION "$Revision: 1.30 $"
|
||||
|
||||
@@ -62,10 +61,8 @@
|
||||
read_lock_irq(&mapping->tree_lock);
|
||||
for (i = 0; i < PAGE_READAHEAD; i++) {
|
||||
pagei = index + i;
|
||||
- if (pagei > end_index) {
|
||||
- INFO("Overrun end of disk in cache readahead\n");
|
||||
+ if (pagei > end_index)
|
||||
break;
|
||||
- }
|
||||
page = radix_tree_lookup(&mapping->page_tree, pagei);
|
||||
if (page && (!i))
|
||||
break;
|
||||
@@ -237,6 +237,8 @@ static int _block2mtd_write(struct block
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+
|
||||
static int block2mtd_write(struct mtd_info *mtd, loff_t to, size_t len,
|
||||
size_t *retlen, const u_char *buf)
|
||||
{
|
||||
@@ -300,6 +302,19 @@ static struct block2mtd_dev *add_device(
|
||||
|
||||
/* Get a handle on the device */
|
||||
bdev = open_bdev_excl(devname, O_RDWR, NULL);
|
||||
+#ifndef MODULE
|
||||
+ if (IS_ERR(bdev)) {
|
||||
+
|
||||
+ /* We might not have rootfs mounted at this point. Try
|
||||
+ to resolve the device name by other means. */
|
||||
+
|
||||
+ dev_t dev = name_to_dev_t(devname);
|
||||
+ if (dev != 0) {
|
||||
+ bdev = open_by_devnum(dev, FMODE_WRITE | FMODE_READ);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (IS_ERR(bdev)) {
|
||||
ERROR("error: cannot open device %s", devname);
|
||||
goto devinit_err;
|
||||
@@ -331,7 +347,6 @@ static struct block2mtd_dev *add_device(
|
||||
dev->mtd.writev = default_mtd_writev;
|
||||
dev->mtd.sync = block2mtd_sync;
|
||||
dev->mtd.read = block2mtd_read;
|
||||
- dev->mtd.readv = default_mtd_readv;
|
||||
dev->mtd.priv = dev;
|
||||
dev->mtd.owner = THIS_MODULE;
|
||||
|
||||
@@ -351,6 +366,12 @@ devinit_err:
|
||||
}
|
||||
|
||||
|
||||
+/* This function works similar to reguler strtoul. In addition, it
|
||||
+ * allows some suffixes for a more human-readable number format:
|
||||
+ * ki, Ki, kiB, KiB - multiply result with 1024
|
||||
+ * Mi, MiB - multiply result with 1024^2
|
||||
+ * Gi, GiB - multiply result with 1024^3
|
||||
+ */
|
||||
static int ustrtoul(const char *cp, char **endp, unsigned int base)
|
||||
{
|
||||
unsigned long result = simple_strtoul(cp, endp, base);
|
||||
@@ -359,11 +380,16 @@ static int ustrtoul(const char *cp, char
|
||||
result *= 1024;
|
||||
case 'M':
|
||||
result *= 1024;
|
||||
+ case 'K':
|
||||
case 'k':
|
||||
result *= 1024;
|
||||
/* By dwmw2 editorial decree, "ki", "Mi" or "Gi" are to be used. */
|
||||
- if ((*endp)[1] == 'i')
|
||||
- (*endp) += 2;
|
||||
+ if ((*endp)[1] == 'i') {
|
||||
+ if ((*endp)[2] == 'B')
|
||||
+ (*endp) += 3;
|
||||
+ else
|
||||
+ (*endp) += 2;
|
||||
+ }
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -383,26 +409,6 @@ static int parse_num(size_t *num, const
|
||||
}
|
||||
|
||||
|
||||
-static int parse_name(char **pname, const char *token, size_t limit)
|
||||
-{
|
||||
- size_t len;
|
||||
- char *name;
|
||||
-
|
||||
- len = strlen(token) + 1;
|
||||
- if (len > limit)
|
||||
- return -ENOSPC;
|
||||
-
|
||||
- name = kmalloc(len, GFP_KERNEL);
|
||||
- if (!name)
|
||||
- return -ENOMEM;
|
||||
-
|
||||
- strcpy(name, token);
|
||||
-
|
||||
- *pname = name;
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
static inline void kill_final_newline(char *str)
|
||||
{
|
||||
char *newline = strrchr(str, '\n');
|
||||
@@ -416,9 +422,16 @@ #define parse_err(fmt, args...) do { \
|
||||
return 0; \
|
||||
} while (0)
|
||||
|
||||
-static int block2mtd_setup(const char *val, struct kernel_param *kp)
|
||||
+#ifndef MODULE
|
||||
+static int block2mtd_init_called = 0;
|
||||
+static __initdata char block2mtd_paramline[80 + 12]; /* 80 for device, 12 for erase size */
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+static int block2mtd_setup2(const char *val)
|
||||
{
|
||||
- char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */
|
||||
+ char buf[80 + 12]; /* 80 for device, 12 for erase size */
|
||||
+ char *str = buf;
|
||||
char *token[2];
|
||||
char *name;
|
||||
size_t erase_size = PAGE_SIZE;
|
||||
@@ -430,7 +443,7 @@ static int block2mtd_setup(const char *v
|
||||
strcpy(str, val);
|
||||
kill_final_newline(str);
|
||||
|
||||
- for (i=0; i<2; i++)
|
||||
+ for (i = 0; i < 2; i++)
|
||||
token[i] = strsep(&str, ",");
|
||||
|
||||
if (str)
|
||||
@@ -439,18 +452,16 @@ static int block2mtd_setup(const char *v
|
||||
if (!token[0])
|
||||
parse_err("no argument");
|
||||
|
||||
- ret = parse_name(&name, token[0], 80);
|
||||
- if (ret == -ENOMEM)
|
||||
- parse_err("out of memory");
|
||||
- if (ret == -ENOSPC)
|
||||
- parse_err("name too long");
|
||||
- if (ret)
|
||||
- return 0;
|
||||
+ name = token[0];
|
||||
+ if (strlen(name) + 1 > 80)
|
||||
+ parse_err("device name too long");
|
||||
|
||||
if (token[1]) {
|
||||
ret = parse_num(&erase_size, token[1]);
|
||||
- if (ret)
|
||||
+ if (ret) {
|
||||
+ kfree(name);
|
||||
parse_err("illegal erase size");
|
||||
+ }
|
||||
}
|
||||
|
||||
add_device(name, erase_size);
|
||||
@@ -459,13 +470,48 @@ static int block2mtd_setup(const char *v
|
||||
}
|
||||
|
||||
|
||||
+static int block2mtd_setup(const char *val, struct kernel_param *kp)
|
||||
+{
|
||||
+#ifdef MODULE
|
||||
+ return block2mtd_setup2(val);
|
||||
+#else
|
||||
+ /* If more parameters are later passed in via
|
||||
+ /sys/module/block2mtd/parameters/block2mtd
|
||||
+ and block2mtd_init() has already been called,
|
||||
+ we can parse the argument now. */
|
||||
+
|
||||
+ if (block2mtd_init_called)
|
||||
+ return block2mtd_setup2(val);
|
||||
+
|
||||
+ /* During early boot stage, we only save the parameters
|
||||
+ here. We must parse them later: if the param passed
|
||||
+ from kernel boot command line, block2mtd_setup() is
|
||||
+ called so early that it is not possible to resolve
|
||||
+ the device (even kmalloc() fails). Deter that work to
|
||||
+ block2mtd_setup2(). */
|
||||
+
|
||||
+ strlcpy(block2mtd_paramline, val, sizeof(block2mtd_paramline));
|
||||
+
|
||||
+ return 0;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+
|
||||
module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
|
||||
MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\"");
|
||||
|
||||
static int __init block2mtd_init(void)
|
||||
{
|
||||
+ int ret = 0;
|
||||
INFO("version " VERSION);
|
||||
- return 0;
|
||||
+
|
||||
+#ifndef MODULE
|
||||
+ if (strlen(block2mtd_paramline))
|
||||
+ ret = block2mtd_setup2(block2mtd_paramline);
|
||||
+ block2mtd_init_called = 1;
|
||||
+#endif
|
||||
+
|
||||
+ return ret;
|
||||
}
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- linux-2.6.17/drivers/net/pppoe.c.old 2006-10-10 13:47:56.000000000 +0200
|
||||
+++ linux-2.6.17/drivers/net/pppoe.c 2006-10-10 13:52:02.000000000 +0200
|
||||
@@ -600,6 +600,9 @@
|
||||
po->chan.hdrlen = (sizeof(struct pppoe_hdr) +
|
||||
dev->hard_header_len);
|
||||
|
||||
+ if (po->chan.mtu > dev->mtu - sizeof(struct pppoe_hdr))
|
||||
+ po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr);
|
||||
+
|
||||
po->chan.private = sk;
|
||||
po->chan.ops = &pppoe_chan_ops;
|
||||
|
@ -1,6 +1,6 @@
|
||||
diff -ruN linux-2.6.17-orig/include/asm-powerpc/segment.h linux-2.6.17/include/asm-powerpc/segment.h
|
||||
--- linux-2.6.17-orig/include/asm-powerpc/segment.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17/include/asm-powerpc/segment.h 2006-06-18 03:49:35.000000000 +0200
|
||||
diff -urN linux-2.6.19.old/include/asm-powerpc/segment.h linux-2.6.19.dev/include/asm-powerpc/segment.h
|
||||
--- linux-2.6.19.old/include/asm-powerpc/segment.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/asm-powerpc/segment.h 2006-12-14 03:13:59.000000000 +0100
|
||||
@@ -0,0 +1,6 @@
|
||||
+#ifndef _ASM_SEGMENT_H
|
||||
+#define _ASM_SEGMENT_H
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nur linux-2.6.17/drivers/net/r8169.c linux-2.6.17-owrt/drivers/net/r8169.c
|
||||
--- linux-2.6.17/drivers/net/r8169.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/drivers/net/r8169.c 2006-10-27 13:18:46.000000000 +0200
|
||||
@@ -483,7 +483,7 @@
|
||||
diff -urN linux-2.6.19.old/drivers/net/r8169.c linux-2.6.19.dev/drivers/net/r8169.c
|
||||
--- linux-2.6.19.old/drivers/net/r8169.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/drivers/net/r8169.c 2006-12-14 03:14:01.000000000 +0100
|
||||
@@ -491,7 +491,7 @@
|
||||
#endif
|
||||
|
||||
static const u16 rtl8169_intr_mask =
|
||||
@ -10,17 +10,7 @@ diff -Nur linux-2.6.17/drivers/net/r8169.c linux-2.6.17-owrt/drivers/net/r8169.c
|
||||
static const u16 rtl8169_napi_event =
|
||||
RxOK | RxOverflow | RxFIFOOver | TxOK | TxErr;
|
||||
static const unsigned int rtl8169_rx_config =
|
||||
@@ -1832,8 +1832,8 @@
|
||||
*/
|
||||
RTL_W16(IntrMitigate, 0x0000);
|
||||
|
||||
- RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
|
||||
RTL_W32(TxDescStartAddrHigh, ((u64) tp->TxPhyAddr >> 32));
|
||||
+ RTL_W32(TxDescStartAddrLow, ((u64) tp->TxPhyAddr & DMA_32BIT_MASK));
|
||||
RTL_W32(RxDescAddrLow, ((u64) tp->RxPhyAddr & DMA_32BIT_MASK));
|
||||
RTL_W32(RxDescAddrHigh, ((u64) tp->RxPhyAddr >> 32));
|
||||
RTL_W8(Cfg9346, Cfg9346_Lock);
|
||||
@@ -2535,10 +2535,12 @@
|
||||
@@ -2584,10 +2584,12 @@
|
||||
if (!(status & rtl8169_intr_mask))
|
||||
break;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
diff -urN linux.old/fs/Kconfig linux.dev/fs/Kconfig
|
||||
--- linux.old/fs/Kconfig 2006-11-17 03:10:00.000000000 +0100
|
||||
+++ linux.dev/fs/Kconfig 2006-11-17 03:12:36.000000000 +0100
|
||||
@@ -356,6 +356,9 @@
|
||||
- POSIX ACLs
|
||||
- readpages / writepages (not user visible)
|
||||
diff -urN linux-2.6.19.old/fs/Kconfig linux-2.6.19.dev/fs/Kconfig
|
||||
--- linux-2.6.19.old/fs/Kconfig 2006-12-14 03:13:20.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/Kconfig 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -468,6 +468,9 @@
|
||||
This option will enlarge your kernel, but it allows debugging of
|
||||
ocfs2 filesystem issues.
|
||||
|
||||
+config MINI_FO
|
||||
+ tristate "Mini fanout overlay filesystem"
|
||||
@ -11,10 +11,10 @@ diff -urN linux.old/fs/Kconfig linux.dev/fs/Kconfig
|
||||
config MINIX_FS
|
||||
tristate "Minix fs support"
|
||||
help
|
||||
diff -urN linux.old/fs/Makefile linux.dev/fs/Makefile
|
||||
--- linux.old/fs/Makefile 2006-11-17 03:10:00.000000000 +0100
|
||||
+++ linux.dev/fs/Makefile 2006-11-17 03:13:05.000000000 +0100
|
||||
@@ -60,6 +60,7 @@
|
||||
diff -urN linux-2.6.19.old/fs/Makefile linux-2.6.19.dev/fs/Makefile
|
||||
--- linux-2.6.19.old/fs/Makefile 2006-12-14 03:13:20.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/Makefile 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -71,6 +71,7 @@
|
||||
obj-$(CONFIG_RAMFS) += ramfs/
|
||||
obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
|
||||
obj-$(CONFIG_CODA_FS) += coda/
|
||||
@ -22,9 +22,9 @@ diff -urN linux.old/fs/Makefile linux.dev/fs/Makefile
|
||||
obj-$(CONFIG_MINIX_FS) += minix/
|
||||
obj-$(CONFIG_FAT_FS) += fat/
|
||||
obj-$(CONFIG_MSDOS_FS) += msdos/
|
||||
diff -urN linux.old/fs/mini_fo/aux.c linux.dev/fs/mini_fo/aux.c
|
||||
--- linux.old/fs/mini_fo/aux.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/aux.c 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/aux.c linux-2.6.19.dev/fs/mini_fo/aux.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/aux.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/aux.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,580 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
@ -606,9 +606,9 @@ diff -urN linux.old/fs/mini_fo/aux.c linux.dev/fs/mini_fo/aux.c
|
||||
+
|
||||
+#endif /* unused */
|
||||
+
|
||||
diff -urN linux.old/fs/mini_fo/ChangeLog linux.dev/fs/mini_fo/ChangeLog
|
||||
--- linux.old/fs/mini_fo/ChangeLog 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/ChangeLog 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/ChangeLog linux-2.6.19.dev/fs/mini_fo/ChangeLog
|
||||
--- linux-2.6.19.old/fs/mini_fo/ChangeLog 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/ChangeLog 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,281 @@
|
||||
+2006-01-24 Markus Klotzbuecher <mk@mary.denx.de>
|
||||
+
|
||||
@ -891,9 +891,9 @@ diff -urN linux.old/fs/mini_fo/ChangeLog linux.dev/fs/mini_fo/ChangeLog
|
||||
+ * Implementation of mini_fo_mknod and mini_fo_rename, support
|
||||
+ for device files.
|
||||
+
|
||||
diff -urN linux.old/fs/mini_fo/dentry.c linux.dev/fs/mini_fo/dentry.c
|
||||
--- linux.old/fs/mini_fo/dentry.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/dentry.c 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/dentry.c linux-2.6.19.dev/fs/mini_fo/dentry.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/dentry.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/dentry.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,244 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
@ -1139,10 +1139,10 @@ diff -urN linux.old/fs/mini_fo/dentry.c linux.dev/fs/mini_fo/dentry.c
|
||||
+ d_delete: mini_fo_d_delete,
|
||||
+ d_iput: mini_fo_d_iput,
|
||||
+};
|
||||
diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
--- linux.old/fs/mini_fo/file.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/file.c 2006-11-17 03:11:48.000000000 +0100
|
||||
@@ -0,0 +1,690 @@
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/file.c linux-2.6.19.dev/fs/mini_fo/file.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/file.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/file.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,713 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
+ * Copyright (c) 2001-2003 Stony Brook University
|
||||
@ -1382,12 +1382,15 @@ diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
+
|
||||
+/* mainly copied from fs/readdir.c */
|
||||
+STATIC int
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+mini_fo_filldir(void * __buf, const char * name, int namlen, loff_t offset,
|
||||
+ u64 ino, unsigned int d_type)
|
||||
+#else
|
||||
+mini_fo_filldir(void * __buf, const char * name, int namlen, loff_t offset,
|
||||
+ ino_t ino, unsigned int d_type)
|
||||
+#endif
|
||||
+{
|
||||
+ struct linux_dirent *dirent, d;
|
||||
+ struct getdents_callback * buf = (struct getdents_callback *) __buf;
|
||||
+ int reclen;
|
||||
+ file_t* file = mini_fo_filldir_file;
|
||||
+
|
||||
+ /* In theses states we filter meta files in storage (WOL) */
|
||||
@ -1640,7 +1643,11 @@ diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
+ /* If the base file has been opened, we need to close it here */
|
||||
+ if(ftohf(file)) {
|
||||
+ if (hidden_file->f_op && hidden_file->f_op->flush)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ hidden_file->f_op->flush(hidden_file, NULL);
|
||||
+#else
|
||||
+ hidden_file->f_op->flush(hidden_file);
|
||||
+#endif
|
||||
+ dput(hidden_dentry);
|
||||
+ }
|
||||
+ goto out;
|
||||
@ -1658,7 +1665,11 @@ diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
+ /* close base file if open */
|
||||
+ if(ftohf(file)) {
|
||||
+ if (hidden_file->f_op && hidden_file->f_op->flush)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ hidden_file->f_op->flush(hidden_file, NULL);
|
||||
+#else
|
||||
+ hidden_file->f_op->flush(hidden_file);
|
||||
+#endif
|
||||
+ dput(hidden_dentry);
|
||||
+ }
|
||||
+ goto out;
|
||||
@ -1673,7 +1684,11 @@ diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
+}
|
||||
+
|
||||
+STATIC int
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+mini_fo_flush(file_t *file, fl_owner_t id)
|
||||
+#else
|
||||
+mini_fo_flush(file_t *file)
|
||||
+#endif
|
||||
+{
|
||||
+ int err1 = 0; /* assume ok (see open.c:close_fp) */
|
||||
+ int err2 = 0;
|
||||
@ -1688,12 +1703,20 @@ diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
+ if(ftohf(file) != NULL) {
|
||||
+ hidden_file = ftohf(file);
|
||||
+ if (hidden_file->f_op && hidden_file->f_op->flush)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ err1 = hidden_file->f_op->flush(hidden_file, id);
|
||||
+#else
|
||||
+ err1 = hidden_file->f_op->flush(hidden_file);
|
||||
+#endif
|
||||
+ }
|
||||
+ if(ftohf2(file) != NULL) {
|
||||
+ hidden_file = ftohf2(file);
|
||||
+ if (hidden_file->f_op && hidden_file->f_op->flush)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ err2 = hidden_file->f_op->flush(hidden_file, id);
|
||||
+#else
|
||||
+ err2 = hidden_file->f_op->flush(hidden_file);
|
||||
+#endif
|
||||
+ }
|
||||
+ }
|
||||
+ return (err1 | err2);
|
||||
@ -1833,10 +1856,10 @@ diff -urN linux.old/fs/mini_fo/file.c linux.dev/fs/mini_fo/file.c
|
||||
+ /* not implemented: sendpage */
|
||||
+ /* not implemented: get_unmapped_area */
|
||||
+ };
|
||||
diff -urN linux.old/fs/mini_fo/fist.h linux.dev/fs/mini_fo/fist.h
|
||||
--- linux.old/fs/mini_fo/fist.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/fist.h 2006-11-17 03:11:48.000000000 +0100
|
||||
@@ -0,0 +1,248 @@
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/fist.h linux-2.6.19.dev/fs/mini_fo/fist.h
|
||||
--- linux-2.6.19.old/fs/mini_fo/fist.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/fist.h 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,252 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
+ * Copyright (c) 2001-2003 Stony Brook University
|
||||
@ -1868,8 +1891,12 @@ diff -urN linux.old/fs/mini_fo/fist.h linux.dev/fs/mini_fo/fist.h
|
||||
+ * KERNEL ONLY CODE:
|
||||
+ */
|
||||
+#ifdef __KERNEL__
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/version.h>
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
|
||||
+#include <linux/autoconf.h>
|
||||
+#else
|
||||
+#include <linux/config.h>
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
||||
+#ifdef CONFIG_MODVERSIONS
|
||||
+# define MODVERSIONS
|
||||
@ -2085,9 +2112,9 @@ diff -urN linux.old/fs/mini_fo/fist.h linux.dev/fs/mini_fo/fist.h
|
||||
+# define FIST_IOCTL_SET_DEBUG_VALUE _IOW(0x15, 2, int)
|
||||
+
|
||||
+#endif /* not __FIST_H_ */
|
||||
diff -urN linux.old/fs/mini_fo/inode.c linux.dev/fs/mini_fo/inode.c
|
||||
--- linux.old/fs/mini_fo/inode.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/inode.c 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/inode.c linux-2.6.19.dev/fs/mini_fo/inode.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/inode.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/inode.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,1573 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
@ -3662,10 +3689,10 @@ diff -urN linux.old/fs/mini_fo/inode.c linux.dev/fs/mini_fo/inode.c
|
||||
+ removexattr: mini_fo_removexattr
|
||||
+# endif /* XATTR && LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,20) */
|
||||
+ };
|
||||
diff -urN linux.old/fs/mini_fo/main.c linux.dev/fs/mini_fo/main.c
|
||||
--- linux.old/fs/mini_fo/main.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/main.c 2006-11-17 03:11:48.000000000 +0100
|
||||
@@ -0,0 +1,414 @@
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/main.c linux-2.6.19.dev/fs/mini_fo/main.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/main.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/main.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,423 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
+ * Copyright (c) 2001-2003 Stony Brook University
|
||||
@ -4023,12 +4050,21 @@ diff -urN linux.old/fs/mini_fo/main.c linux.dev/fs/mini_fo/main.c
|
||||
+}
|
||||
+
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+static int mini_fo_get_sb(struct file_system_type *fs_type,
|
||||
+ int flags, const char *dev_name,
|
||||
+ void *raw_data, struct vfsmount *mnt)
|
||||
+{
|
||||
+ return get_sb_nodev(fs_type, flags, raw_data, mini_fo_read_super, mnt);
|
||||
+}
|
||||
+#else
|
||||
+static struct super_block *mini_fo_get_sb(struct file_system_type *fs_type,
|
||||
+ int flags, const char *dev_name,
|
||||
+ void *raw_data)
|
||||
+{
|
||||
+ return get_sb_nodev(fs_type, flags, raw_data, mini_fo_read_super);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+void mini_fo_kill_block_super(struct super_block *sb)
|
||||
+{
|
||||
@ -4080,9 +4116,9 @@ diff -urN linux.old/fs/mini_fo/main.c linux.dev/fs/mini_fo/main.c
|
||||
+
|
||||
+module_init(init_mini_fo_fs)
|
||||
+module_exit(exit_mini_fo_fs)
|
||||
diff -urN linux.old/fs/mini_fo/Makefile linux.dev/fs/mini_fo/Makefile
|
||||
--- linux.old/fs/mini_fo/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/Makefile 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/Makefile linux-2.6.19.dev/fs/mini_fo/Makefile
|
||||
--- linux-2.6.19.old/fs/mini_fo/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/Makefile 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,17 @@
|
||||
+#
|
||||
+# Makefile for mini_fo 2.4 and 2.6 Linux kernels
|
||||
@ -4101,9 +4137,9 @@ diff -urN linux.old/fs/mini_fo/Makefile linux.dev/fs/mini_fo/Makefile
|
||||
+# dependencies
|
||||
+${mini_fo-objs}: mini_fo.h fist.h
|
||||
+
|
||||
diff -urN linux.old/fs/mini_fo/meta.c linux.dev/fs/mini_fo/meta.c
|
||||
--- linux.old/fs/mini_fo/meta.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/meta.c 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/meta.c linux-2.6.19.dev/fs/mini_fo/meta.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/meta.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/meta.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,1000 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2004, 2005 Markus Klotzbuecher <mk@creamnet.de>
|
||||
@ -5105,10 +5141,10 @@ diff -urN linux.old/fs/mini_fo/meta.c linux.dev/fs/mini_fo/meta.c
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
diff -urN linux.old/fs/mini_fo/mini_fo.h linux.dev/fs/mini_fo/mini_fo.h
|
||||
--- linux.old/fs/mini_fo/mini_fo.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/mini_fo.h 2006-11-17 03:11:48.000000000 +0100
|
||||
@@ -0,0 +1,503 @@
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/mini_fo.h linux-2.6.19.dev/fs/mini_fo/mini_fo.h
|
||||
--- linux-2.6.19.old/fs/mini_fo/mini_fo.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/mini_fo.h 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,510 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
+ * Copyright (c) 2001-2003 Stony Brook University
|
||||
@ -5308,8 +5344,13 @@ diff -urN linux.old/fs/mini_fo/mini_fo.h linux.dev/fs/mini_fo/mini_fo.h
|
||||
+# define ftohf2(file) ((ftopd(file))->wfi_file2)
|
||||
+
|
||||
+/* inode TO private_data */
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+# define itopd(ino) ((struct mini_fo_inode_info *)(ino)->i_private)
|
||||
+# define __itopd(ino) ((ino)->i_private)
|
||||
+#else
|
||||
+# define itopd(ino) ((struct mini_fo_inode_info *)(ino)->u.generic_ip)
|
||||
+# define __itopd(ino) ((ino)->u.generic_ip)
|
||||
+#endif
|
||||
+/* inode TO hidden_inode */
|
||||
+# define itohi(ino) (itopd(ino)->wii_inode)
|
||||
+# define itohi2(ino) (itopd(ino)->wii_inode2)
|
||||
@ -5530,7 +5571,9 @@ diff -urN linux.old/fs/mini_fo/mini_fo.h linux.dev/fs/mini_fo/mini_fo.h
|
||||
+ dest->i_atime = src->i_atime;
|
||||
+ dest->i_mtime = src->i_mtime;
|
||||
+ dest->i_ctime = src->i_ctime;
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
|
||||
+ dest->i_blksize = src->i_blksize;
|
||||
+#endif
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,12)
|
||||
+ dest->i_blkbits = src->i_blkbits;
|
||||
+# endif /* linux 2.4.12 and newer */
|
||||
@ -5612,9 +5655,9 @@ diff -urN linux.old/fs/mini_fo/mini_fo.h linux.dev/fs/mini_fo/mini_fo.h
|
||||
+/* ioctls */
|
||||
+
|
||||
+#endif /* not __MINI_FO_H_ */
|
||||
diff -urN linux.old/fs/mini_fo/mini_fo-merge linux.dev/fs/mini_fo/mini_fo-merge
|
||||
--- linux.old/fs/mini_fo/mini_fo-merge 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/mini_fo-merge 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/mini_fo-merge linux-2.6.19.dev/fs/mini_fo/mini_fo-merge
|
||||
--- linux-2.6.19.old/fs/mini_fo/mini_fo-merge 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/mini_fo-merge 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,180 @@
|
||||
+#!/bin/bash
|
||||
+#
|
||||
@ -5796,9 +5839,9 @@ diff -urN linux.old/fs/mini_fo/mini_fo-merge linux.dev/fs/mini_fo/mini_fo-merge
|
||||
+#rm $TMP/$SKIP_DEL_LIST
|
||||
+
|
||||
+echo "Done!"
|
||||
diff -urN linux.old/fs/mini_fo/mini_fo-overlay linux.dev/fs/mini_fo/mini_fo-overlay
|
||||
--- linux.old/fs/mini_fo/mini_fo-overlay 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/mini_fo-overlay 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/mini_fo-overlay linux-2.6.19.dev/fs/mini_fo/mini_fo-overlay
|
||||
--- linux-2.6.19.old/fs/mini_fo/mini_fo-overlay 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/mini_fo-overlay 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,130 @@
|
||||
+#!/bin/bash
|
||||
+#
|
||||
@ -5930,9 +5973,9 @@ diff -urN linux.old/fs/mini_fo/mini_fo-overlay linux.dev/fs/mini_fo/mini_fo-over
|
||||
+if [ $? -ne 0 ]; then
|
||||
+ echo "Error, mounting failed, maybe no permisson to mount?"
|
||||
+fi
|
||||
diff -urN linux.old/fs/mini_fo/mmap.c linux.dev/fs/mini_fo/mmap.c
|
||||
--- linux.old/fs/mini_fo/mmap.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/mmap.c 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/mmap.c linux-2.6.19.dev/fs/mini_fo/mmap.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/mmap.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/mmap.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,637 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
@ -6571,9 +6614,9 @@ diff -urN linux.old/fs/mini_fo/mmap.c linux.dev/fs/mini_fo/mmap.c
|
||||
+ print_exit_status(err);
|
||||
+ return err;
|
||||
+}
|
||||
diff -urN linux.old/fs/mini_fo/README linux.dev/fs/mini_fo/README
|
||||
--- linux.old/fs/mini_fo/README 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/README 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/README linux-2.6.19.dev/fs/mini_fo/README
|
||||
--- linux-2.6.19.old/fs/mini_fo/README 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/README 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,163 @@
|
||||
+README for the mini_fo overlay file system
|
||||
+=========================================
|
||||
@ -6738,9 +6781,9 @@ diff -urN linux.old/fs/mini_fo/README linux.dev/fs/mini_fo/README
|
||||
+2 of the License, or (at your option) any later version.
|
||||
+
|
||||
+
|
||||
diff -urN linux.old/fs/mini_fo/RELEASE_NOTES linux.dev/fs/mini_fo/RELEASE_NOTES
|
||||
--- linux.old/fs/mini_fo/RELEASE_NOTES 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/RELEASE_NOTES 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/RELEASE_NOTES linux-2.6.19.dev/fs/mini_fo/RELEASE_NOTES
|
||||
--- linux-2.6.19.old/fs/mini_fo/RELEASE_NOTES 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/RELEASE_NOTES 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,111 @@
|
||||
+Release: mini_fo-0.6.1 (v0-6-1)
|
||||
+Date: 21.09.2005
|
||||
@ -6853,9 +6896,9 @@ diff -urN linux.old/fs/mini_fo/RELEASE_NOTES linux.dev/fs/mini_fo/RELEASE_NOTES
|
||||
+original state. I hope to fix this someday. Please note that this does
|
||||
+not effect the special hard links '.' and '..', that are handled
|
||||
+seperately by the lower fs.
|
||||
diff -urN linux.old/fs/mini_fo/state.c linux.dev/fs/mini_fo/state.c
|
||||
--- linux.old/fs/mini_fo/state.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/state.c 2006-11-17 03:11:48.000000000 +0100
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/state.c linux-2.6.19.dev/fs/mini_fo/state.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/state.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/state.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,620 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Markus Klotzbuecher <mk@creamnet.de>
|
||||
@ -7477,10 +7520,10 @@ diff -urN linux.old/fs/mini_fo/state.c linux.dev/fs/mini_fo/state.c
|
||||
+ return err;
|
||||
+}
|
||||
+
|
||||
diff -urN linux.old/fs/mini_fo/super.c linux.dev/fs/mini_fo/super.c
|
||||
--- linux.old/fs/mini_fo/super.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/fs/mini_fo/super.c 2006-11-17 03:11:48.000000000 +0100
|
||||
@@ -0,0 +1,259 @@
|
||||
diff -urN linux-2.6.19.old/fs/mini_fo/super.c linux-2.6.19.dev/fs/mini_fo/super.c
|
||||
--- linux-2.6.19.old/fs/mini_fo/super.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.19.dev/fs/mini_fo/super.c 2006-12-14 03:14:03.000000000 +0100
|
||||
@@ -0,0 +1,281 @@
|
||||
+/*
|
||||
+ * Copyright (c) 1997-2003 Erez Zadok
|
||||
+ * Copyright (c) 2001-2003 Stony Brook University
|
||||
@ -7640,17 +7683,26 @@ diff -urN linux.old/fs/mini_fo/super.c linux.dev/fs/mini_fo/super.c
|
||||
+
|
||||
+
|
||||
+STATIC int
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+mini_fo_statfs(struct dentry *d, struct kstatfs *buf)
|
||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
+mini_fo_statfs(super_block_t *sb, struct kstatfs *buf)
|
||||
+#else
|
||||
+mini_fo_statfs(super_block_t *sb, struct statfs *buf)
|
||||
+#endif
|
||||
+{
|
||||
+ int err = 0;
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+ struct dentry *hidden_d;
|
||||
+
|
||||
+ hidden_d = dtohd(d);
|
||||
+ err = vfs_statfs(hidden_d, buf);
|
||||
+#else
|
||||
+ super_block_t *hidden_sb;
|
||||
+
|
||||
+ hidden_sb = stohs(sb);
|
||||
+ err = vfs_statfs(hidden_sb, buf);
|
||||
+#endif
|
||||
+
|
||||
+ return err;
|
||||
+}
|
||||
@ -7712,6 +7764,18 @@ diff -urN linux.old/fs/mini_fo/super.c linux.dev/fs/mini_fo/super.c
|
||||
+ * dies.
|
||||
+ */
|
||||
+STATIC void
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
|
||||
+mini_fo_umount_begin(struct vfsmount *mnt, int flags)
|
||||
+{
|
||||
+ struct vfsmount *hidden_mnt;
|
||||
+
|
||||
+ hidden_mnt = stopd(mnt->mnt_sb)->hidden_mnt;
|
||||
+
|
||||
+ if (hidden_mnt->mnt_sb->s_op->umount_begin)
|
||||
+ hidden_mnt->mnt_sb->s_op->umount_begin(hidden_mnt, flags);
|
||||
+
|
||||
+}
|
||||
+#else
|
||||
+mini_fo_umount_begin(super_block_t *sb)
|
||||
+{
|
||||
+ super_block_t *hidden_sb;
|
||||
@ -7722,6 +7786,7 @@ diff -urN linux.old/fs/mini_fo/super.c linux.dev/fs/mini_fo/super.c
|
||||
+ hidden_sb->s_op->umount_begin(hidden_sb);
|
||||
+
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
+struct super_operations mini_fo_sops =
|
||||
|
@ -1,8 +1,6 @@
|
||||
Taken from Debian linux-kernel-headers package
|
||||
Update 2005-05-05 gotom, add __extension__ for linux/types.h.
|
||||
|
||||
--- linux.old/include/linux/time.h 2006-06-05 13:18:23.000000000 -0400
|
||||
+++ linux.dev/include/linux/time.h 2006-06-10 00:16:51.962628154 -0400
|
||||
diff -urN linux-2.6.19.old/include/linux/time.h linux-2.6.19.dev/include/linux/time.h
|
||||
--- linux-2.6.19.old/include/linux/time.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/time.h 2006-12-14 03:14:05.000000000 +0100
|
||||
@@ -1,6 +1,10 @@
|
||||
#ifndef _LINUX_TIME_H
|
||||
#define _LINUX_TIME_H
|
||||
@ -14,15 +12,16 @@ Update 2005-05-05 gotom, add __extension__ for linux/types.h.
|
||||
#include <linux/types.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
@@ -196,4 +200,6 @@
|
||||
@@ -223,4 +227,6 @@
|
||||
*/
|
||||
#define TIMER_ABSTIME 0x01
|
||||
|
||||
+#endif /* __KERNEL__ DEBIAN */
|
||||
+
|
||||
#endif
|
||||
--- linux.old/include/linux/types.h 2006-06-05 13:18:23.000000000 -0400
|
||||
+++ linux.dev/include/linux/types.h 2006-06-10 00:16:51.962628154 -0400
|
||||
diff -urN linux-2.6.19.old/include/linux/types.h linux-2.6.19.dev/include/linux/types.h
|
||||
--- linux-2.6.19.old/include/linux/types.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/linux/types.h 2006-12-14 03:14:05.000000000 +0100
|
||||
@@ -1,6 +1,14 @@
|
||||
#ifndef _LINUX_TYPES_H
|
||||
#define _LINUX_TYPES_H
|
||||
@ -36,9 +35,9 @@ Update 2005-05-05 gotom, add __extension__ for linux/types.h.
|
||||
+#else
|
||||
+
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/config.h>
|
||||
|
||||
@@ -147,6 +157,8 @@
|
||||
#define BITS_TO_LONGS(bits) \
|
||||
@@ -156,6 +164,8 @@
|
||||
|
||||
#endif /* __KERNEL_STRICT_NAMES */
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
--- linux.old/include/asm-mips/bitops.h 2006-12-08 17:09:09.035003456 +0100
|
||||
+++ linux.dev/include/asm-mips/bitops.h 2006-12-08 17:09:25.539494392 +0100
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/config.h>
|
||||
diff -urN linux-2.6.19.old/include/asm-mips/bitops.h linux-2.6.19.dev/include/asm-mips/bitops.h
|
||||
--- linux-2.6.19.old/include/asm-mips/bitops.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux-2.6.19.dev/include/asm-mips/bitops.h 2006-12-14 03:14:07.000000000 +0100
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
+#include <asm/war.h>
|
||||
|
@ -14,10 +14,9 @@ FEATURES:=jffs2
|
||||
define Target/Description
|
||||
endef
|
||||
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
$(eval $(call BuildKernel))
|
||||
|
@ -750,7 +750,7 @@ diff -Nur linux-2.6.17/drivers/net/ixp4xx/ixp4xx_qmgr.c linux-2.6.17-owrt/driver
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t irq_qm1(int irq, void *dev_id, struct pt_regs *regs)
|
||||
+static irqreturn_t irq_qm1(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct qm_qmgr *qmgr = dev_id;
|
||||
+ int offs, reg;
|
||||
|
@ -11,9 +11,9 @@ BOARD:=magicbox
|
||||
BOARDNAME:=Magicbox
|
||||
FEATURES:=jffs2
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
$(eval $(call BuildKernel))
|
||||
|
File diff suppressed because it is too large
Load Diff
152
target/linux/magicbox-2.6/config-diff
Normal file
152
target/linux/magicbox-2.6/config-diff
Normal file
@ -0,0 +1,152 @@
|
||||
CONFIG_405EP=y
|
||||
CONFIG_40x=y
|
||||
# CONFIG_44x is not set
|
||||
CONFIG_4xx=y
|
||||
# CONFIG_6xx is not set
|
||||
# CONFIG_8139TOO is not set
|
||||
# CONFIG_8xx is not set
|
||||
# CONFIG_ADVANCED_OPTIONS is not set
|
||||
# CONFIG_AGP is not set
|
||||
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
# CONFIG_B44 is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_BIOS_FIXUP=y
|
||||
# CONFIG_BLK_DEV_FD is not set
|
||||
# CONFIG_BOOKE_WDT is not set
|
||||
CONFIG_BOOT_LOAD=0x00400000
|
||||
# CONFIG_BT is not set
|
||||
# CONFIG_BUBINGA is not set
|
||||
CONFIG_CMDLINE="console=ttyS0,115200"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_CONSISTENT_SIZE=0x00200000
|
||||
CONFIG_CONSISTENT_START=0xff100000
|
||||
# CONFIG_CPCI405 is not set
|
||||
# CONFIG_CPU_FREQ is not set
|
||||
# CONFIG_E200 is not set
|
||||
# CONFIG_E500 is not set
|
||||
# CONFIG_EP405 is not set
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
CONFIG_GENERIC_NVRAM=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
# CONFIG_HIGHMEM is not set
|
||||
CONFIG_HIGHMEM_START=0xfe000000
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_I2C is not set
|
||||
CONFIG_IBM_EMAC=y
|
||||
# CONFIG_IBM_EMAC_DEBUG is not set
|
||||
# CONFIG_IBM_EMAC_PHY_RX_CLK_FIX is not set
|
||||
CONFIG_IBM_EMAC_POLL_WEIGHT=32
|
||||
CONFIG_IBM_EMAC_RXB=64
|
||||
CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
|
||||
CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0
|
||||
CONFIG_IBM_EMAC_TXB=8
|
||||
CONFIG_IBM_OCP=y
|
||||
# CONFIG_IDE is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_ISA_DMA_API=y
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
CONFIG_KERNEL_START=0xc0000000
|
||||
# CONFIG_KEXEC is not set
|
||||
CONFIG_LOWMEM_SIZE=0x30000000
|
||||
CONFIG_MAGICBOX=y
|
||||
CONFIG_MATH_EMULATION=y
|
||||
CONFIG_MINI_FO=y
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
# CONFIG_MTD_BLOCK2MTD is not set
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
|
||||
CONFIG_MTD_CFI_NOSWAP=y
|
||||
# CONFIG_MTD_CFI_STAA is not set
|
||||
CONFIG_MTD_CFI_UTIL=y
|
||||
CONFIG_MTD_CHAR=y
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
CONFIG_MTD_COMPLEX_MAPPINGS=y
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
CONFIG_MTD_GEN_PROBE=y
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_MAGICMAP=y
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
# CONFIG_MTD_OTP is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_PCI is not set
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_PHYSMAP is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_NATSEMI is not set
|
||||
# CONFIG_NE2K_PCI is not set
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
CONFIG_NOT_COHERENT_CACHE=y
|
||||
# CONFIG_NVRAM is not set
|
||||
# CONFIG_PCIPCWATCHDOG is not set
|
||||
CONFIG_PCI_DOMAINS=y
|
||||
# CONFIG_PCMCIA_ATMEL is not set
|
||||
# CONFIG_PC_KEYBOARD is not set
|
||||
# CONFIG_PM is not set
|
||||
CONFIG_PPC=y
|
||||
CONFIG_PPC32=y
|
||||
CONFIG_PPC4xx_DMA=y
|
||||
CONFIG_PPC4xx_EDMA=y
|
||||
CONFIG_PPC_GEN550=y
|
||||
# CONFIG_PPC_I8259 is not set
|
||||
CONFIG_PPC_INDIRECT_PCI=y
|
||||
CONFIG_PPC_OCP=y
|
||||
# CONFIG_REDWOOD_5 is not set
|
||||
# CONFIG_REDWOOD_6 is not set
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SCSI_BUSLOGIC is not set
|
||||
# CONFIG_SCSI_EATA is not set
|
||||
# CONFIG_SCSI_GDTH is not set
|
||||
# CONFIG_SECCOMP is not set
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
# CONFIG_SERIAL_TEXT_DEBUG is not set
|
||||
# CONFIG_SOFT_WATCHDOG is not set
|
||||
# CONFIG_SOUND is not set
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
# CONFIG_SYCAMORE is not set
|
||||
CONFIG_TASK_SIZE=0x80000000
|
||||
CONFIG_UART0_TTYS0=y
|
||||
# CONFIG_UART0_TTYS1 is not set
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_USB is not set
|
||||
# CONFIG_VIA_RHINE is not set
|
||||
# CONFIG_WALNUT is not set
|
||||
CONFIG_WANT_EARLY_SERIAL=y
|
||||
# CONFIG_WINDFARM is not set
|
||||
# CONFIG_XILINX_ML300 is not set
|
||||
# CONFIG_XILINX_ML403 is not set
|
@ -1,6 +1,6 @@
|
||||
diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Kconfig linux-2.6.17-owrt/arch/ppc/platforms/4xx/Kconfig
|
||||
--- linux-2.6.17/arch/ppc/platforms/4xx/Kconfig 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/Kconfig 2006-08-25 23:33:05.000000000 +0200
|
||||
diff -urN linux.old/arch/ppc/platforms/4xx/Kconfig linux.dev/arch/ppc/platforms/4xx/Kconfig
|
||||
--- linux.old/arch/ppc/platforms/4xx/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/arch/ppc/platforms/4xx/Kconfig 2006-12-14 08:49:18.000000000 +0100
|
||||
@@ -52,6 +52,12 @@
|
||||
help
|
||||
This option enables support for the IBM PPC405GP evaluation board.
|
||||
@ -27,8 +27,8 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Kconfig linux-2.6.17-owrt/arch/ppc
|
||||
|
||||
config BIOS_FIXUP
|
||||
bool
|
||||
- depends on BUBINGA || EP405 || SYCAMORE || WALNUT
|
||||
+ depends on BUBINGA || EP405 || SYCAMORE || WALNUT || MAGICBOX
|
||||
- depends on BUBINGA || EP405 || SYCAMORE || WALNUT || CPCI405
|
||||
+ depends on BUBINGA || EP405 || SYCAMORE || WALNUT || CPCI405 || MAGICBOX
|
||||
default y
|
||||
|
||||
# OAK doesn't exist but wanted to keep this around for any future 403GCX boards
|
||||
@ -41,9 +41,9 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Kconfig linux-2.6.17-owrt/arch/ppc
|
||||
default y
|
||||
|
||||
config 405GP
|
||||
diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.c linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.c
|
||||
--- linux-2.6.17/arch/ppc/platforms/4xx/magicbox.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.c 2006-08-25 23:33:05.000000000 +0200
|
||||
diff -urN linux.old/arch/ppc/platforms/4xx/magicbox.c linux.dev/arch/ppc/platforms/4xx/magicbox.c
|
||||
--- linux.old/arch/ppc/platforms/4xx/magicbox.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/ppc/platforms/4xx/magicbox.c 2006-12-14 08:48:56.000000000 +0100
|
||||
@@ -0,0 +1,249 @@
|
||||
+/*
|
||||
+ * Support for IBM PPC 405EP-based MagicBox board
|
||||
@ -60,7 +60,7 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.c linux-2.6.17-owrt/arch/
|
||||
+ * or implied.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/smp.h>
|
||||
+#include <linux/threads.h>
|
||||
@ -294,9 +294,9 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.c linux-2.6.17-owrt/arch/
|
||||
+#endif
|
||||
+
|
||||
+}
|
||||
diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.h linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.h
|
||||
--- linux-2.6.17/arch/ppc/platforms/4xx/magicbox.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/magicbox.h 2006-08-25 23:33:05.000000000 +0200
|
||||
diff -urN linux.old/arch/ppc/platforms/4xx/magicbox.h linux.dev/arch/ppc/platforms/4xx/magicbox.h
|
||||
--- linux.old/arch/ppc/platforms/4xx/magicbox.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/ppc/platforms/4xx/magicbox.h 2006-12-14 08:48:56.000000000 +0100
|
||||
@@ -0,0 +1,47 @@
|
||||
+/*
|
||||
+ * Support for IBM PPC 405EP-based MagicBox board
|
||||
@ -317,7 +317,7 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.h linux-2.6.17-owrt/arch/
|
||||
+#ifndef __MAGICBOX_H__
|
||||
+#define __MAGICBOX_H__
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <platforms/4xx/ibm405ep.h>
|
||||
+#include <asm/ppcboot.h>
|
||||
+
|
||||
@ -345,9 +345,9 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/magicbox.h linux-2.6.17-owrt/arch/
|
||||
+
|
||||
+#endif /* __MAGICBOX_H__ */
|
||||
+#endif /* __KERNEL__ */
|
||||
diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Makefile linux-2.6.17-owrt/arch/ppc/platforms/4xx/Makefile
|
||||
--- linux-2.6.17/arch/ppc/platforms/4xx/Makefile 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/arch/ppc/platforms/4xx/Makefile 2006-08-25 23:33:05.000000000 +0200
|
||||
diff -urN linux.old/arch/ppc/platforms/4xx/Makefile linux.dev/arch/ppc/platforms/4xx/Makefile
|
||||
--- linux.old/arch/ppc/platforms/4xx/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/arch/ppc/platforms/4xx/Makefile 2006-12-14 08:48:56.000000000 +0100
|
||||
@@ -13,6 +13,7 @@
|
||||
obj-$(CONFIG_REDWOOD_6) += redwood6.o
|
||||
obj-$(CONFIG_SYCAMORE) += sycamore.o
|
||||
@ -356,10 +356,10 @@ diff -Nur linux-2.6.17/arch/ppc/platforms/4xx/Makefile linux-2.6.17-owrt/arch/pp
|
||||
obj-$(CONFIG_XILINX_ML300) += xilinx_ml300.o
|
||||
obj-$(CONFIG_XILINX_ML403) += xilinx_ml403.o
|
||||
|
||||
diff -Nur linux-2.6.17/include/asm-ppc/ibm4xx.h linux-2.6.17-owrt/include/asm-ppc/ibm4xx.h
|
||||
--- linux-2.6.17/include/asm-ppc/ibm4xx.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux-2.6.17-owrt/include/asm-ppc/ibm4xx.h 2006-08-25 23:33:05.000000000 +0200
|
||||
@@ -19,6 +19,10 @@
|
||||
diff -urN linux.old/include/asm-ppc/ibm4xx.h linux.dev/include/asm-ppc/ibm4xx.h
|
||||
--- linux.old/include/asm-ppc/ibm4xx.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/include/asm-ppc/ibm4xx.h 2006-12-14 08:48:56.000000000 +0100
|
||||
@@ -18,6 +18,10 @@
|
||||
|
||||
#ifdef CONFIG_40x
|
||||
|
||||
|
@ -43,7 +43,7 @@ diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magic
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/map.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <asm/io.h>
|
||||
+
|
||||
+static struct mtd_info *flash;
|
||||
@ -91,7 +91,7 @@ diff -urN linux.old/drivers/mtd/maps/magicmap.c linux.dev/drivers/mtd/maps/magic
|
||||
+ flash = do_map_probe("cfi_probe", &magic_map);
|
||||
+ if (flash) {
|
||||
+ flash->owner = THIS_MODULE;
|
||||
+ if (MTD_READ(flash, 12, sizeof(u32), &len, (char *) &size) ||
|
||||
+ if (flash->read(flash, 12, sizeof(u32), &len, (char *) &size) ||
|
||||
+ len != 4)
|
||||
+ return -ENXIO;
|
||||
+ size += 0x40; /* header size of the uImage */
|
||||
|
@ -11,9 +11,9 @@ BOARD:=rb532
|
||||
BOARDNAME:=Mikrotik RouterBoard 532
|
||||
FEATURES:=jffs2
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
$(eval $(call BuildKernel))
|
||||
|
File diff suppressed because it is too large
Load Diff
193
target/linux/rb532-2.6/config-diff
Normal file
193
target/linux/rb532-2.6/config-diff
Normal file
@ -0,0 +1,193 @@
|
||||
CONFIG_32BIT=y
|
||||
# CONFIG_64BIT is not set
|
||||
# CONFIG_64BIT_PHYS_ADDR is not set
|
||||
# CONFIG_8139TOO is not set
|
||||
# CONFIG_B44 is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_BLK_DEV_CF_MIPS=y
|
||||
# CONFIG_CPU_BIG_ENDIAN is not set
|
||||
CONFIG_CPU_HAS_LLSC=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_LITTLE_ENDIAN=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
# CONFIG_CPU_MIPS32_R2 is not set
|
||||
# CONFIG_CPU_MIPS64_R1 is not set
|
||||
# CONFIG_CPU_MIPS64_R2 is not set
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
# CONFIG_CPU_NEVADA is not set
|
||||
# CONFIG_CPU_R10000 is not set
|
||||
# CONFIG_CPU_R3000 is not set
|
||||
# CONFIG_CPU_R4300 is not set
|
||||
# CONFIG_CPU_R4X00 is not set
|
||||
# CONFIG_CPU_R5000 is not set
|
||||
# CONFIG_CPU_R5432 is not set
|
||||
# CONFIG_CPU_R6000 is not set
|
||||
# CONFIG_CPU_R8000 is not set
|
||||
# CONFIG_CPU_RM7000 is not set
|
||||
# CONFIG_CPU_RM9000 is not set
|
||||
# CONFIG_CPU_SB1 is not set
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
# CONFIG_CPU_TX39XX is not set
|
||||
# CONFIG_CPU_TX49XX is not set
|
||||
# CONFIG_CPU_VR41XX is not set
|
||||
# CONFIG_DDB5477 is not set
|
||||
# CONFIG_DM9000 is not set
|
||||
CONFIG_DMA_NEED_PCI_MAP_STATE=y
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
CONFIG_GENERIC_FIND_NEXT_BIT=y
|
||||
# CONFIG_GEN_RTC is not set
|
||||
CONFIG_HW_HAS_PCI=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
# CONFIG_HZ_1024 is not set
|
||||
# CONFIG_HZ_128 is not set
|
||||
# CONFIG_HZ_250 is not set
|
||||
# CONFIG_HZ_256 is not set
|
||||
# CONFIG_HZ_48 is not set
|
||||
# CONFIG_I2C is not set
|
||||
# CONFIG_IDE is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IRQ_CPU=y
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
CONFIG_KORINA=y
|
||||
# CONFIG_LAN_SAA9730 is not set
|
||||
# CONFIG_MACH_DECSTATION is not set
|
||||
# CONFIG_MACH_JAZZ is not set
|
||||
# CONFIG_MACH_VR41XX is not set
|
||||
CONFIG_MIKROTIK_RB500=y
|
||||
CONFIG_MINI_FO=m
|
||||
CONFIG_MIPS=y
|
||||
# CONFIG_MIPS_ATLAS is not set
|
||||
# CONFIG_MIPS_BOSPORUS is not set
|
||||
# CONFIG_MIPS_COBALT is not set
|
||||
# CONFIG_MIPS_DB1000 is not set
|
||||
# CONFIG_MIPS_DB1100 is not set
|
||||
# CONFIG_MIPS_DB1200 is not set
|
||||
# CONFIG_MIPS_DB1500 is not set
|
||||
# CONFIG_MIPS_DB1550 is not set
|
||||
# CONFIG_MIPS_EV64120 is not set
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=4
|
||||
# CONFIG_MIPS_MALTA is not set
|
||||
# CONFIG_MIPS_MIRAGE is not set
|
||||
# CONFIG_MIPS_MTX1 is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
# CONFIG_MIPS_MT_SMP is not set
|
||||
# CONFIG_MIPS_MT_SMTC is not set
|
||||
# CONFIG_MIPS_PB1000 is not set
|
||||
# CONFIG_MIPS_PB1100 is not set
|
||||
# CONFIG_MIPS_PB1200 is not set
|
||||
# CONFIG_MIPS_PB1500 is not set
|
||||
# CONFIG_MIPS_PB1550 is not set
|
||||
# CONFIG_MIPS_SEAD is not set
|
||||
# CONFIG_MIPS_SIM is not set
|
||||
# CONFIG_MIPS_VPE_LOADER is not set
|
||||
# CONFIG_MIPS_XXS1500 is not set
|
||||
# CONFIG_MOMENCO_JAGUAR_ATX is not set
|
||||
# CONFIG_MOMENCO_OCELOT is not set
|
||||
# CONFIG_MOMENCO_OCELOT_3 is not set
|
||||
# CONFIG_MOMENCO_OCELOT_C is not set
|
||||
# CONFIG_MOMENCO_OCELOT_G is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_BLOCK2MTD=y
|
||||
# CONFIG_MTD_CFI is not set
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
CONFIG_MTD_CHAR=y
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
CONFIG_MTD_NAND=y
|
||||
# CONFIG_MTD_NAND_DISKONCHIP is not set
|
||||
# CONFIG_MTD_NAND_ECC_SMC is not set
|
||||
CONFIG_MTD_NAND_IDS=y
|
||||
# CONFIG_MTD_NAND_NANDSIM is not set
|
||||
CONFIG_MTD_NAND_RB500=y
|
||||
CONFIG_MTD_NAND_VERIFY_WRITE=y
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_NATSEMI is not set
|
||||
# CONFIG_NE2K_PCI is not set
|
||||
# CONFIG_NET_VENDOR_3COM is not set
|
||||
# CONFIG_PAGE_SIZE_16KB is not set
|
||||
CONFIG_PAGE_SIZE_4KB=y
|
||||
# CONFIG_PAGE_SIZE_64KB is not set
|
||||
# CONFIG_PAGE_SIZE_8KB is not set
|
||||
# CONFIG_PCIPCWATCHDOG is not set
|
||||
# CONFIG_PCMCIA_ATMEL is not set
|
||||
# CONFIG_PMC_YOSEMITE is not set
|
||||
# CONFIG_PNX8550_JBS is not set
|
||||
# CONFIG_PNX8550_V2PCI is not set
|
||||
# CONFIG_RTC is not set
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
# CONFIG_SGI_IP22 is not set
|
||||
# CONFIG_SGI_IP27 is not set
|
||||
# CONFIG_SGI_IP32 is not set
|
||||
# CONFIG_SIBYTE_BIGSUR is not set
|
||||
# CONFIG_SIBYTE_CARMEL is not set
|
||||
# CONFIG_SIBYTE_CRHINE is not set
|
||||
# CONFIG_SIBYTE_CRHONE is not set
|
||||
# CONFIG_SIBYTE_LITTLESUR is not set
|
||||
# CONFIG_SIBYTE_PTSWARM is not set
|
||||
# CONFIG_SIBYTE_RHONE is not set
|
||||
# CONFIG_SIBYTE_SENTOSA is not set
|
||||
# CONFIG_SIBYTE_SWARM is not set
|
||||
# CONFIG_SOFT_WATCHDOG is not set
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SWAP_IO_SPACE=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
|
||||
# CONFIG_TOSHIBA_JMR3927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4927 is not set
|
||||
# CONFIG_TOSHIBA_RBTX4938 is not set
|
||||
CONFIG_TRAD_SIGNALS=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
# CONFIG_USB_EHCI_HCD is not set
|
||||
# CONFIG_USB_UHCI_HCD is not set
|
||||
CONFIG_VIA_RHINE=y
|
||||
# CONFIG_VIA_RHINE_MMIO is not set
|
||||
CONFIG_VIA_RHINE_NAPI=y
|
||||
CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED=y
|
||||
CONFIG_YAFFS_AUTO_YAFFS2=y
|
||||
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
|
||||
# CONFIG_YAFFS_DISABLE_WIDE_TNODES is not set
|
||||
CONFIG_YAFFS_DOES_ECC=y
|
||||
CONFIG_YAFFS_ECC_WRONG_ORDER=y
|
||||
CONFIG_YAFFS_FS=y
|
||||
CONFIG_YAFFS_SHORT_NAMES_IN_RAM=y
|
||||
CONFIG_YAFFS_YAFFS1=y
|
||||
CONFIG_YAFFS_YAFFS2=y
|
@ -1,7 +1,7 @@
|
||||
diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
|
||||
--- linux.old/arch/mips/Kconfig 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/arch/mips/Kconfig 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -742,6 +742,19 @@
|
||||
--- linux.old/arch/mips/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/arch/mips/Kconfig 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -728,6 +728,19 @@
|
||||
select SYS_SUPPORTS_BIG_ENDIAN
|
||||
select TOSHIBA_BOARDS
|
||||
|
||||
@ -21,7 +21,7 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
|
||||
config TOSHIBA_RBTX4927
|
||||
bool "Toshiba TBTX49[23]7 board"
|
||||
select DMA_NONCOHERENT
|
||||
@@ -1028,7 +1041,7 @@
|
||||
@@ -1015,7 +1028,7 @@
|
||||
|
||||
config MIPS_L1_CACHE_SHIFT
|
||||
int
|
||||
@ -31,9 +31,9 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig
|
||||
default "5"
|
||||
|
||||
diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
|
||||
--- linux.old/arch/mips/Makefile 2006-10-11 21:55:59.000000000 +0200
|
||||
+++ linux.dev/arch/mips/Makefile 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -580,6 +580,13 @@
|
||||
--- linux.old/arch/mips/Makefile 2006-12-14 03:13:55.000000000 +0100
|
||||
+++ linux.dev/arch/mips/Makefile 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -586,6 +586,13 @@
|
||||
load-$(CONFIG_TOSHIBA_JMR3927) += 0xffffffff80050000
|
||||
|
||||
#
|
||||
@ -48,9 +48,9 @@ diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile
|
||||
# Toshiba RBTX4937 board
|
||||
#
|
||||
diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
|
||||
--- linux.old/arch/mips/mm/tlbex.c 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/arch/mips/mm/tlbex.c 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -876,7 +876,6 @@
|
||||
--- linux.old/arch/mips/mm/tlbex.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/arch/mips/mm/tlbex.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -874,7 +874,6 @@
|
||||
case CPU_R10000:
|
||||
case CPU_R12000:
|
||||
case CPU_R14000:
|
||||
@ -58,7 +58,7 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
|
||||
case CPU_SB1:
|
||||
case CPU_SB1A:
|
||||
case CPU_4KSC:
|
||||
@@ -904,6 +903,7 @@
|
||||
@@ -902,6 +901,7 @@
|
||||
tlbw(p);
|
||||
break;
|
||||
|
||||
@ -68,7 +68,7 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c
|
||||
case CPU_34K:
|
||||
diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb500.c
|
||||
--- linux.old/arch/mips/pci/fixup-rb500.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/pci/fixup-rb500.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,49 @@
|
||||
+/*
|
||||
+ * Copyright 2001 MontaVista Software Inc.
|
||||
@ -96,7 +96,7 @@ diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb
|
||||
+ * 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/kernel.h>
|
||||
@ -120,16 +120,16 @@ diff -urN linux.old/arch/mips/pci/fixup-rb500.c linux.dev/arch/mips/pci/fixup-rb
|
||||
+}
|
||||
+
|
||||
diff -urN linux.old/arch/mips/pci/Makefile linux.dev/arch/mips/pci/Makefile
|
||||
--- linux.old/arch/mips/pci/Makefile 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/arch/mips/pci/Makefile 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -57,3 +57,4 @@
|
||||
obj-$(CONFIG_TOSHIBA_RBTX4938) += fixup-tx4938.o ops-tx4938.o
|
||||
--- linux.old/arch/mips/pci/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/arch/mips/pci/Makefile 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -53,3 +53,4 @@
|
||||
obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o
|
||||
obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o
|
||||
obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
|
||||
+obj-$(CONFIG_MIKROTIK_RB500) += pci-rc32434.o ops-rc32434.o fixup-rb500.o
|
||||
diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32434.c
|
||||
--- linux.old/arch/mips/pci/ops-rc32434.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/pci/ops-rc32434.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,195 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -169,7 +169,7 @@ diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/types.h>
|
||||
@ -328,7 +328,7 @@ diff -urN linux.old/arch/mips/pci/ops-rc32434.c linux.dev/arch/mips/pci/ops-rc32
|
||||
+};
|
||||
diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32434.c
|
||||
--- linux.old/arch/mips/pci/pci-rc32434.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/pci/pci-rc32434.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,234 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -368,7 +368,7 @@ diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/kernel.h>
|
||||
@ -566,8 +566,24 @@ diff -urN linux.old/arch/mips/pci/pci-rc32434.c linux.dev/arch/mips/pci/pci-rc32
|
||||
+
|
||||
diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices.c
|
||||
--- linux.old/arch/mips/rb500/devices.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/devices.c 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -0,0 +1,198 @@
|
||||
+++ linux.dev/arch/mips/rb500/devices.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,214 @@
|
||||
+/*
|
||||
+ * RouterBoard 500 Platform devices
|
||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * $Id$
|
||||
+ */
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/module.h>
|
||||
@ -768,7 +784,7 @@ diff -urN linux.old/arch/mips/rb500/devices.c linux.dev/arch/mips/rb500/devices.
|
||||
+#endif
|
||||
diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/early_serial.c
|
||||
--- linux.old/arch/mips/rb500/early_serial.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/early_serial.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/rb500/early_serial.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,199 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -971,7 +987,7 @@ diff -urN linux.old/arch/mips/rb500/early_serial.c linux.dev/arch/mips/rb500/ear
|
||||
+}
|
||||
diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c
|
||||
--- linux.old/arch/mips/rb500/irq.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/irq.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/rb500/irq.c 2006-12-14 04:14:16.000000000 +0100
|
||||
@@ -0,0 +1,264 @@
|
||||
+/*
|
||||
+ * BRIEF MODULE DESCRIPTION
|
||||
@ -1212,7 +1228,7 @@ diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c
|
||||
+ irq_desc[i].status = IRQ_DISABLED;
|
||||
+ irq_desc[i].action = NULL;
|
||||
+ irq_desc[i].depth = 1;
|
||||
+ irq_desc[i].handler = &rc32434_irq_type;
|
||||
+ irq_desc[i].chip = &rc32434_irq_type;
|
||||
+ spin_lock_init(&irq_desc[i].lock);
|
||||
+ }
|
||||
+}
|
||||
@ -1225,7 +1241,7 @@ diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c
|
||||
+ unsigned int cp0_cause = read_c0_cause() & read_c0_status();
|
||||
+
|
||||
+ if (cp0_cause & CAUSEF_IP7) {
|
||||
+ ll_timer_interrupt(7, regs);
|
||||
+ ll_timer_interrupt(7);
|
||||
+ } else if ((ip = (cp0_cause & 0x7c00))) {
|
||||
+ group = 21 - rc32434_clz(ip);
|
||||
+
|
||||
@ -1234,12 +1250,12 @@ diff -urN linux.old/arch/mips/rb500/irq.c linux.dev/arch/mips/rb500/irq.c
|
||||
+ pend = READ_PEND(addr);
|
||||
+ pend &= ~READ_MASK(addr); // only unmasked interrupts
|
||||
+ pend = 39 - rc32434_clz(pend);
|
||||
+ do_IRQ((group << 5) + pend, regs);
|
||||
+ do_IRQ((group << 5) + pend);
|
||||
+ }
|
||||
+}
|
||||
diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile
|
||||
--- linux.old/arch/mips/rb500/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/Makefile 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/rb500/Makefile 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,5 @@
|
||||
+#
|
||||
+# Makefile for the RB500 board specific parts of the kernel
|
||||
@ -1248,7 +1264,7 @@ diff -urN linux.old/arch/mips/rb500/Makefile linux.dev/arch/mips/rb500/Makefile
|
||||
+obj-y += irq.o time.o setup.o serial.o early_serial.o prom.o misc.o devices.o
|
||||
diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c
|
||||
--- linux.old/arch/mips/rb500/misc.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/misc.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/rb500/misc.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,56 @@
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h> /* printk() */
|
||||
@ -1308,7 +1324,7 @@ diff -urN linux.old/arch/mips/rb500/misc.c linux.dev/arch/mips/rb500/misc.c
|
||||
+EXPORT_SYMBOL(changeLatchU5);
|
||||
diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c
|
||||
--- linux.old/arch/mips/rb500/prom.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/prom.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/rb500/prom.c 2006-12-14 05:15:05.000000000 +0100
|
||||
@@ -0,0 +1,181 @@
|
||||
+/*
|
||||
+* prom.c
|
||||
@ -1337,7 +1353,7 @@ diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c
|
||||
+
|
||||
+*/
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/module.h>
|
||||
@ -1493,7 +1509,7 @@ diff -urN linux.old/arch/mips/rb500/prom.c linux.dev/arch/mips/rb500/prom.c
|
||||
+
|
||||
diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c
|
||||
--- linux.old/arch/mips/rb500/serial.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/serial.c 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/arch/mips/rb500/serial.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,79 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -1534,7 +1550,7 @@ diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/pci.h>
|
||||
@ -1576,8 +1592,8 @@ diff -urN linux.old/arch/mips/rb500/serial.c linux.dev/arch/mips/rb500/serial.c
|
||||
+}
|
||||
diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c
|
||||
--- linux.old/arch/mips/rb500/setup.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/setup.c 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -0,0 +1,84 @@
|
||||
+++ linux.dev/arch/mips/rb500/setup.c 2006-12-14 04:51:12.000000000 +0100
|
||||
@@ -0,0 +1,81 @@
|
||||
+/*
|
||||
+ * setup.c - boot time setup code
|
||||
+ */
|
||||
@ -1586,22 +1602,20 @@ diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c
|
||||
+#include <linux/mm.h>
|
||||
+#include <linux/sched.h>
|
||||
+#include <linux/irq.h>
|
||||
+#include <asm/bootinfo.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <linux/ioport.h>
|
||||
+#include <linux/pm.h>
|
||||
+#include <asm/bootinfo.h>
|
||||
+#include <asm/mipsregs.h>
|
||||
+#include <asm/pgtable.h>
|
||||
+#include <asm/reboot.h>
|
||||
+#include <asm/addrspace.h> /* for KSEG1ADDR() */
|
||||
+#include <asm/time.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/rc32434/rc32434.h>
|
||||
+#include <linux/pm.h>
|
||||
+#include <asm/rc32434/pci.h>
|
||||
+
|
||||
+extern void (*board_time_init)(void);
|
||||
+extern void (*board_timer_setup)(struct irqaction *irq);
|
||||
+extern void rc32434_time_init(void);
|
||||
+extern void rc32434_timer_setup(struct irqaction *irq);
|
||||
+#ifdef CONFIG_PCI
|
||||
+extern void *rc32434_time_init(void);
|
||||
+extern int __init rc32434_pcibridge_init(void);
|
||||
+#endif
|
||||
+
|
||||
@ -1629,12 +1643,11 @@ diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+void __init plat_setup(void)
|
||||
+void __init plat_mem_setup(void)
|
||||
+{
|
||||
+ unsigned int pciCntlVal;
|
||||
+
|
||||
+ board_time_init = rc32434_time_init;
|
||||
+ board_timer_setup = rc32434_timer_setup;
|
||||
+
|
||||
+#ifdef CONFIG_CPU_HAS_WB
|
||||
+ __wbflush = rb_write_buffer_flush;
|
||||
@ -1664,8 +1677,8 @@ diff -urN linux.old/arch/mips/rb500/setup.c linux.dev/arch/mips/rb500/setup.c
|
||||
+}
|
||||
diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c
|
||||
--- linux.old/arch/mips/rb500/time.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/arch/mips/rb500/time.c 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -0,0 +1,94 @@
|
||||
+++ linux.dev/arch/mips/rb500/time.c 2006-12-14 04:48:33.000000000 +0100
|
||||
@@ -0,0 +1,93 @@
|
||||
+/*
|
||||
+****************************************************************************
|
||||
+* Carsten Langgaard, carstenl@mips.com
|
||||
@ -1699,7 +1712,7 @@ diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c
|
||||
+****************************************************************************
|
||||
+*/
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/kernel_stat.h>
|
||||
+#include <linux/sched.h>
|
||||
@ -1715,7 +1728,6 @@ diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c
|
||||
+
|
||||
+static unsigned long r4k_offset; /* Amount to incr compare reg each time */
|
||||
+static unsigned long r4k_cur; /* What counter should be at next timer irq */
|
||||
+extern void ll_timer_interrupt(int irq, struct pt_regs *regs);
|
||||
+extern unsigned int mips_hpt_frequency;
|
||||
+extern unsigned int idt_cpu_freq;
|
||||
+
|
||||
@ -1750,7 +1762,7 @@ diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c
|
||||
+ local_irq_restore(flags);
|
||||
+}
|
||||
+
|
||||
+void __init rc32434_timer_setup(struct irqaction *irq)
|
||||
+void __init plat_timer_setup(struct irqaction *irq)
|
||||
+{
|
||||
+ /* we are using the cpu counter for timer interrupts */
|
||||
+ setup_irq(MIPS_CPU_TIMER_IRQ, irq);
|
||||
@ -1761,8 +1773,8 @@ diff -urN linux.old/arch/mips/rb500/time.c linux.dev/arch/mips/rb500/time.c
|
||||
+}
|
||||
+
|
||||
diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/devices/block2mtd.c
|
||||
--- linux.old/drivers/mtd/devices/block2mtd.c 2006-10-11 21:55:59.000000000 +0200
|
||||
+++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-10-11 22:24:51.000000000 +0200
|
||||
--- linux.old/drivers/mtd/devices/block2mtd.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/drivers/mtd/devices/block2mtd.c 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -26,7 +26,6 @@
|
||||
#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
|
||||
#define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args)
|
||||
@ -1771,7 +1783,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
/* Info for the block device */
|
||||
struct block2mtd_dev {
|
||||
struct list_head list;
|
||||
@@ -104,7 +103,7 @@
|
||||
@@ -106,7 +105,7 @@
|
||||
|
||||
while (pages) {
|
||||
page = page_readahead(mapping, index);
|
||||
@ -1780,7 +1792,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
return -ENOMEM;
|
||||
if (IS_ERR(page))
|
||||
return PTR_ERR(page);
|
||||
@@ -285,7 +284,7 @@
|
||||
@@ -287,7 +286,7 @@
|
||||
|
||||
|
||||
/* FIXME: ensure that mtd->size % erase_size == 0 */
|
||||
@ -1789,7 +1801,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
{
|
||||
struct block_device *bdev;
|
||||
struct block2mtd_dev *dev;
|
||||
@@ -328,14 +327,15 @@
|
||||
@@ -330,14 +329,15 @@
|
||||
|
||||
/* Setup the MTD structure */
|
||||
/* make the name contain the block device in */
|
||||
@ -1805,9 +1817,9 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
|
||||
+ dev->mtd.size -= dev->mtd.size % erase_size;
|
||||
dev->mtd.erasesize = erase_size;
|
||||
dev->mtd.writesize = 1;
|
||||
dev->mtd.type = MTD_RAM;
|
||||
dev->mtd.flags = MTD_CAP_RAM;
|
||||
@@ -353,7 +353,7 @@
|
||||
@@ -356,7 +356,7 @@
|
||||
}
|
||||
list_add(&dev->list, &blkmtd_device_list);
|
||||
INFO("mtd%d: [%s] erase_size = %dKiB [%d]", dev->mtd.index,
|
||||
@ -1816,7 +1828,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
dev->mtd.erasesize >> 10, dev->mtd.erasesize);
|
||||
return dev;
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
@@ -432,7 +432,7 @@
|
||||
{
|
||||
char buf[80 + 12]; /* 80 for device, 12 for erase size */
|
||||
char *str = buf;
|
||||
@ -1825,7 +1837,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
char *name;
|
||||
size_t erase_size = PAGE_SIZE;
|
||||
int i, ret;
|
||||
@@ -440,7 +440,7 @@
|
||||
@@ -443,7 +443,7 @@
|
||||
strcpy(str, val);
|
||||
kill_final_newline(str);
|
||||
|
||||
@ -1834,7 +1846,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
token[i] = strsep(&str, ",");
|
||||
|
||||
if (str)
|
||||
@@ -461,13 +461,13 @@
|
||||
@@ -464,13 +464,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
@ -1850,7 +1862,7 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
{
|
||||
#ifdef MODULE
|
||||
return block2mtd_setup2(val);
|
||||
@@ -496,6 +496,7 @@
|
||||
@@ -499,6 +499,7 @@
|
||||
|
||||
module_param_call(block2mtd, block2mtd_setup, NULL, NULL, 0200);
|
||||
MODULE_PARM_DESC(block2mtd, "Device to use. \"block2mtd=<dev>[,<erasesize>]\"");
|
||||
@ -1859,22 +1871,22 @@ diff -urN linux.old/drivers/mtd/devices/block2mtd.c linux.dev/drivers/mtd/device
|
||||
static int __init block2mtd_init(void)
|
||||
{
|
||||
diff -urN linux.old/drivers/pci/Makefile linux.dev/drivers/pci/Makefile
|
||||
--- linux.old/drivers/pci/Makefile 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/drivers/pci/Makefile 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -27,6 +27,7 @@
|
||||
obj-$(CONFIG_MIPS) += setup-bus.o setup-irq.o
|
||||
obj-$(CONFIG_X86_VISWS) += setup-irq.o
|
||||
--- linux.old/drivers/pci/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/drivers/pci/Makefile 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
# Build the PCI MSI interrupt support
|
||||
obj-$(CONFIG_PCI_MSI) += msi.o
|
||||
+obj-$(CONFIG_MIKROTIK_RB500) += setup-irq.o
|
||||
|
||||
#
|
||||
# ACPI Related PCI FW Functions
|
||||
# Build the Hypertransport interrupt support
|
||||
obj-$(CONFIG_HT_IRQ) += htirq.o
|
||||
diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h
|
||||
--- linux.old/include/asm-mips/bootinfo.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/bootinfo.h 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -218,6 +218,8 @@
|
||||
#define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */
|
||||
#define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */
|
||||
--- linux.old/include/asm-mips/bootinfo.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/bootinfo.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -212,6 +212,8 @@
|
||||
#define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */
|
||||
#define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */
|
||||
|
||||
+#define MACH_GROUP_MIKROTIK 24 /* Mikrotik Boards */
|
||||
+
|
||||
@ -1882,8 +1894,8 @@ diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/booti
|
||||
|
||||
const char *get_system_type(void);
|
||||
diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h
|
||||
--- linux.old/include/asm-mips/cpu.h 2006-06-18 03:49:35.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/cpu.h 2006-10-11 21:56:38.000000000 +0200
|
||||
--- linux.old/include/asm-mips/cpu.h 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/cpu.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -200,7 +200,8 @@
|
||||
#define CPU_SB1A 62
|
||||
#define CPU_74K 63
|
||||
@ -1896,7 +1908,7 @@ diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h
|
||||
* ISA Level encodings
|
||||
diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/rc32434/crom.h
|
||||
--- linux.old/include/asm-mips/rc32434/crom.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/crom.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/crom.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,98 @@
|
||||
+#ifndef __IDT_CROM_H__
|
||||
+#define __IDT_CROM_H__
|
||||
@ -1998,7 +2010,7 @@ diff -urN linux.old/include/asm-mips/rc32434/crom.h linux.dev/include/asm-mips/r
|
||||
+#endif // __IDT_CROM_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc32434/ddr.h
|
||||
--- linux.old/include/asm-mips/rc32434/ddr.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/ddr.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,175 @@
|
||||
+#ifndef __IDT_DDR_H__
|
||||
+#define __IDT_DDR_H__
|
||||
@ -2177,7 +2189,7 @@ diff -urN linux.old/include/asm-mips/rc32434/ddr.h linux.dev/include/asm-mips/rc
|
||||
+#endif // __IDT_DDR_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc32434/dev.h
|
||||
--- linux.old/include/asm-mips/rc32434/dev.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/dev.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/dev.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,134 @@
|
||||
+#ifndef __IDT_DEV_H__
|
||||
+#define __IDT_DEV_H__
|
||||
@ -2315,7 +2327,7 @@ diff -urN linux.old/include/asm-mips/rc32434/dev.h linux.dev/include/asm-mips/rc
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc32434/dma.h
|
||||
--- linux.old/include/asm-mips/rc32434/dma.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/dma.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/dma.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,202 @@
|
||||
+#ifndef __IDT_DMA_H__
|
||||
+#define __IDT_DMA_H__
|
||||
@ -2521,7 +2533,7 @@ diff -urN linux.old/include/asm-mips/rc32434/dma.h linux.dev/include/asm-mips/rc
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/rc32434/dma_v.h
|
||||
--- linux.old/include/asm-mips/rc32434/dma_v.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/dma_v.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,73 @@
|
||||
+#ifndef __IDT_DMA_V_H__
|
||||
+#define __IDT_DMA_V_H__
|
||||
@ -2598,7 +2610,7 @@ diff -urN linux.old/include/asm-mips/rc32434/dma_v.h linux.dev/include/asm-mips/
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc32434/eth.h
|
||||
--- linux.old/include/asm-mips/rc32434/eth.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/eth.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/eth.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,322 @@
|
||||
+#ifndef __IDT_ETH_H__
|
||||
+#define __IDT_ETH_H__
|
||||
@ -2924,7 +2936,7 @@ diff -urN linux.old/include/asm-mips/rc32434/eth.h linux.dev/include/asm-mips/rc
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/rc32434/eth_v.h
|
||||
--- linux.old/include/asm-mips/rc32434/eth_v.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/eth_v.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,64 @@
|
||||
+#ifndef __IDT_ETH_V_H__
|
||||
+#define __IDT_ETH_V_H__
|
||||
@ -2992,7 +3004,7 @@ diff -urN linux.old/include/asm-mips/rc32434/eth_v.h linux.dev/include/asm-mips/
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/rc32434/gpio.h
|
||||
--- linux.old/include/asm-mips/rc32434/gpio.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/gpio.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,182 @@
|
||||
+#ifndef __IDT_GPIO_H__
|
||||
+#define __IDT_GPIO_H__
|
||||
@ -3178,7 +3190,7 @@ diff -urN linux.old/include/asm-mips/rc32434/gpio.h linux.dev/include/asm-mips/r
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc32434/i2c.h
|
||||
--- linux.old/include/asm-mips/rc32434/i2c.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/i2c.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,147 @@
|
||||
+#ifndef __IDT_I2C_H__
|
||||
+#define __IDT_I2C_H__
|
||||
@ -3329,7 +3341,7 @@ diff -urN linux.old/include/asm-mips/rc32434/i2c.h linux.dev/include/asm-mips/rc
|
||||
+#endif // __IDT_I2C_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/rc32434/integ.h
|
||||
--- linux.old/include/asm-mips/rc32434/integ.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/integ.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/integ.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,78 @@
|
||||
+#ifndef __IDT_INTEG_H__
|
||||
+#define __IDT_INTEG_H__
|
||||
@ -3411,7 +3423,7 @@ diff -urN linux.old/include/asm-mips/rc32434/integ.h linux.dev/include/asm-mips/
|
||||
+#endif // __IDT_INTEG_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc32434/int.h
|
||||
--- linux.old/include/asm-mips/rc32434/int.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/int.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/int.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,167 @@
|
||||
+#ifndef __IDT_INT_H__
|
||||
+#define __IDT_INT_H__
|
||||
@ -3582,7 +3594,7 @@ diff -urN linux.old/include/asm-mips/rc32434/int.h linux.dev/include/asm-mips/rc
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/rc32434/iparb.h
|
||||
--- linux.old/include/asm-mips/rc32434/iparb.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/iparb.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,95 @@
|
||||
+#ifndef __IDT_IPARB_H__
|
||||
+#define __IDT_IPARB_H__
|
||||
@ -3681,7 +3693,7 @@ diff -urN linux.old/include/asm-mips/rc32434/iparb.h linux.dev/include/asm-mips/
|
||||
+#endif // __IDT_IPARB_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc32434/irm.h
|
||||
--- linux.old/include/asm-mips/rc32434/irm.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/irm.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/irm.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,55 @@
|
||||
+#ifndef __IDT_IRM_H__
|
||||
+#define __IDT_IRM_H__
|
||||
@ -3740,19 +3752,19 @@ diff -urN linux.old/include/asm-mips/rc32434/irm.h linux.dev/include/asm-mips/rc
|
||||
+#endif // __IDT_IRM_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/irq.h linux.dev/include/asm-mips/rc32434/irq.h
|
||||
--- linux.old/include/asm-mips/rc32434/irq.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/irq.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/irq.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+#ifndef __ASM_MACH_MIPS_IRQ_H
|
||||
+#define __ASM_MACH_MIPS_IRQ_H
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+
|
||||
+#define NR_IRQS 256
|
||||
+
|
||||
+#endif /* __ASM_MACH_MIPS_IRQ_H */
|
||||
diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/rc32434/nvram.h
|
||||
--- linux.old/include/asm-mips/rc32434/nvram.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/nvram.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,97 @@
|
||||
+#ifndef __IDT_NVRAM_H
|
||||
+#define __IDT_NVRAM_H
|
||||
@ -3853,7 +3865,7 @@ diff -urN linux.old/include/asm-mips/rc32434/nvram.h linux.dev/include/asm-mips/
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc32434/pci.h
|
||||
--- linux.old/include/asm-mips/rc32434/pci.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/pci.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/pci.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,695 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -4552,7 +4564,7 @@ diff -urN linux.old/include/asm-mips/rc32434/pci.h linux.dev/include/asm-mips/rc
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-mips/rc32434/pcikorina.h
|
||||
--- linux.old/include/asm-mips/rc32434/pcikorina.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/pcikorina.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,209 @@
|
||||
+/* $Id: pciacacia.h,v 1.5 2001/05/01 10:09:17 carstenl Exp $
|
||||
+ *
|
||||
@ -4765,7 +4777,7 @@ diff -urN linux.old/include/asm-mips/rc32434/pcikorina.h linux.dev/include/asm-m
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mips/rc32434/pci_regs.h
|
||||
--- linux.old/include/asm-mips/rc32434/pci_regs.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/pci_regs.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,8 @@
|
||||
+/* Override the default address space for this arch
|
||||
+*/
|
||||
@ -4777,8 +4789,23 @@ diff -urN linux.old/include/asm-mips/rc32434/pci_regs.h linux.dev/include/asm-mi
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc32434/rb.h
|
||||
--- linux.old/include/asm-mips/rc32434/rb.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/rb.h 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -0,0 +1,69 @@
|
||||
+++ linux.dev/include/asm-mips/rc32434/rb.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,84 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2006 Felix Fietkau <nbd@openwrt.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify
|
||||
+ * it under the terms of the GNU General Public License as published by
|
||||
+ * the Free Software Foundation; either version 2 of the License, or
|
||||
+ * (at your option) any later version.
|
||||
+ *
|
||||
+ * This program is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
+ * GNU General Public License for more details.
|
||||
+ *
|
||||
+ * $Id$
|
||||
+ */
|
||||
+#ifndef __MIPS_RB_H__
|
||||
+#define __MIPS_RB_H__
|
||||
+#include <linux/genhd.h>
|
||||
@ -4850,7 +4877,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rb.h linux.dev/include/asm-mips/rc3
|
||||
+#endif
|
||||
diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mips/rc32434/rc32434.h
|
||||
--- linux.old/include/asm-mips/rc32434/rc32434.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/rc32434.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,126 @@
|
||||
+/*
|
||||
+ ***************************************************************************
|
||||
@ -4879,7 +4906,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mip
|
||||
+#ifndef _RC32434_H_
|
||||
+#define _RC32434_H_
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/delay.h>
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/rc32434/timer.h>
|
||||
@ -4980,7 +5007,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rc32434.h linux.dev/include/asm-mip
|
||||
+#endif /* _RC32434_H_ */
|
||||
diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc32434/rst.h
|
||||
--- linux.old/include/asm-mips/rc32434/rst.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/rst.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/rst.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,105 @@
|
||||
+#ifndef __IDT_RST_H__
|
||||
+#define __IDT_RST_H__
|
||||
@ -5089,7 +5116,7 @@ diff -urN linux.old/include/asm-mips/rc32434/rst.h linux.dev/include/asm-mips/rc
|
||||
+#endif // __IDT_RST_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc32434/spi.h
|
||||
--- linux.old/include/asm-mips/rc32434/spi.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/spi.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/spi.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,100 @@
|
||||
+#ifndef __IDT_SPI_H__
|
||||
+#define __IDT_SPI_H__
|
||||
@ -5193,7 +5220,7 @@ diff -urN linux.old/include/asm-mips/rc32434/spi.h linux.dev/include/asm-mips/rc
|
||||
+#endif // __IDT_SPI_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/rc32434/timer.h
|
||||
--- linux.old/include/asm-mips/rc32434/timer.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/timer.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/timer.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,91 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -5288,7 +5315,7 @@ diff -urN linux.old/include/asm-mips/rc32434/timer.h linux.dev/include/asm-mips/
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc32434/tim.h
|
||||
--- linux.old/include/asm-mips/rc32434/tim.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/tim.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/tim.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,78 @@
|
||||
+#ifndef __IDT_TIM_H__
|
||||
+#define __IDT_TIM_H__
|
||||
@ -5370,8 +5397,8 @@ diff -urN linux.old/include/asm-mips/rc32434/tim.h linux.dev/include/asm-mips/rc
|
||||
+
|
||||
diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/rc32434/types.h
|
||||
--- linux.old/include/asm-mips/rc32434/types.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/types.h 2006-10-11 21:56:38.000000000 +0200
|
||||
@@ -0,0 +1,39 @@
|
||||
+++ linux.dev/include/asm-mips/rc32434/types.h 2006-12-14 04:10:43.000000000 +0100
|
||||
@@ -0,0 +1,35 @@
|
||||
+#ifndef __IDT_TYPES_H__
|
||||
+#define __IDT_TYPES_H__
|
||||
+
|
||||
@ -5406,14 +5433,10 @@ diff -urN linux.old/include/asm-mips/rc32434/types.h linux.dev/include/asm-mips/
|
||||
+typedef unsigned long long U64 ;
|
||||
+typedef signed long long S64 ;
|
||||
+
|
||||
+#ifndef __cplusplus
|
||||
+ typedef U32 bool ; // (false == 0), (true is != false)
|
||||
+#endif // __cplusplus
|
||||
+
|
||||
+#endif // __IDT_TYPES_H__
|
||||
diff -urN linux.old/include/asm-mips/rc32434/uart.h linux.dev/include/asm-mips/rc32434/uart.h
|
||||
--- linux.old/include/asm-mips/rc32434/uart.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/include/asm-mips/rc32434/uart.h 2006-10-11 21:56:38.000000000 +0200
|
||||
+++ linux.dev/include/asm-mips/rc32434/uart.h 2006-12-14 04:09:50.000000000 +0100
|
||||
@@ -0,0 +1,178 @@
|
||||
+#ifndef __IDT_UART_H__
|
||||
+#define __IDT_UART_H__
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -urN linux.old/drivers/net/Kconfig linux.dev/drivers/net/Kconfig
|
||||
--- linux.old/drivers/net/Kconfig 2006-06-08 20:21:20.000000000 +0200
|
||||
+++ linux.dev/drivers/net/Kconfig 2006-06-08 20:19:40.000000000 +0200
|
||||
@@ -310,6 +310,13 @@
|
||||
--- linux.old/drivers/net/Kconfig 2006-12-14 03:13:47.000000000 +0100
|
||||
+++ linux.dev/drivers/net/Kconfig 2006-12-14 03:18:45.000000000 +0100
|
||||
@@ -313,6 +313,13 @@
|
||||
|
||||
source "drivers/net/arm/Kconfig"
|
||||
|
||||
@ -17,7 +17,7 @@ diff -urN linux.old/drivers/net/Kconfig linux.dev/drivers/net/Kconfig
|
||||
depends on NET_ETHERNET && PPC_PMAC && PPC32
|
||||
diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
--- linux.old/drivers/net/korina.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/drivers/net/korina.c 2006-06-09 00:48:40.000000000 +0200
|
||||
+++ linux.dev/drivers/net/korina.c 2006-12-14 03:18:45.000000000 +0100
|
||||
@@ -0,0 +1,1159 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -59,7 +59,7 @@ diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
+ **************************************************************************
|
||||
+ */
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/module.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/moduleparam.h>
|
||||
@ -573,7 +573,7 @@ diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
+#ifdef RC32434_REVISION
|
||||
+/* Ethernet Rx Overflow interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_ovr_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_ovr_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local *lp;
|
||||
@ -606,7 +606,7 @@ diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
+
|
||||
+/* Ethernet Tx Underflow interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_und_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_und_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local *lp;
|
||||
@ -639,7 +639,7 @@ diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
+
|
||||
+/* Ethernet Rx DMA interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_rx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_rx_dma_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local* lp;
|
||||
@ -853,7 +853,7 @@ diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
+
|
||||
+/* Ethernet Tx DMA interrupt */
|
||||
+static irqreturn_t
|
||||
+rc32434_tx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs)
|
||||
+rc32434_tx_dma_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = (struct net_device *)dev_id;
|
||||
+ struct rc32434_local *lp;
|
||||
@ -1179,8 +1179,8 @@ diff -urN linux.old/drivers/net/korina.c linux.dev/drivers/net/korina.c
|
||||
+module_init(rc32434_init_module);
|
||||
+module_exit(rc32434_cleanup_module);
|
||||
diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile
|
||||
--- linux.old/drivers/net/Makefile 2006-06-08 20:21:20.000000000 +0200
|
||||
+++ linux.dev/drivers/net/Makefile 2006-06-08 20:19:40.000000000 +0200
|
||||
--- linux.old/drivers/net/Makefile 2006-12-14 03:13:47.000000000 +0100
|
||||
+++ linux.dev/drivers/net/Makefile 2006-12-14 03:18:45.000000000 +0100
|
||||
@@ -23,6 +23,8 @@
|
||||
#
|
||||
obj-$(CONFIG_PLIP) += plip.o
|
||||
@ -1192,7 +1192,7 @@ diff -urN linux.old/drivers/net/Makefile linux.dev/drivers/net/Makefile
|
||||
obj-$(CONFIG_HAPPYMEAL) += sunhme.o
|
||||
diff -urN linux.old/drivers/net/rc32434_eth.h linux.dev/drivers/net/rc32434_eth.h
|
||||
--- linux.old/drivers/net/rc32434_eth.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/drivers/net/rc32434_eth.h 2006-06-08 21:57:12.000000000 +0200
|
||||
+++ linux.dev/drivers/net/rc32434_eth.h 2006-12-14 03:18:45.000000000 +0100
|
||||
@@ -0,0 +1,178 @@
|
||||
+/**************************************************************************
|
||||
+ *
|
||||
@ -1337,11 +1337,11 @@ diff -urN linux.old/drivers/net/rc32434_eth.h linux.dev/drivers/net/rc32434_eth.
|
||||
+static int rc32434_open(struct net_device *dev);
|
||||
+static int rc32434_send_packet(struct sk_buff *skb, struct net_device *dev);
|
||||
+static void rc32434_mii_handler(unsigned long data);
|
||||
+static irqreturn_t rc32434_und_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_rx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_tx_dma_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_und_interrupt(int irq, void *dev_id);
|
||||
+static irqreturn_t rc32434_rx_dma_interrupt(int irq, void *dev_id);
|
||||
+static irqreturn_t rc32434_tx_dma_interrupt(int irq, void *dev_id);
|
||||
+#ifdef RC32434_REVISION
|
||||
+static irqreturn_t rc32434_ovr_interrupt(int irq, void *dev_id, struct pt_regs * regs);
|
||||
+static irqreturn_t rc32434_ovr_interrupt(int irq, void *dev_id);
|
||||
+#endif
|
||||
+static int rc32434_close(struct net_device *dev);
|
||||
+static struct net_device_stats *rc32434_get_stats(struct net_device *dev);
|
||||
@ -1372,4 +1372,3 @@ diff -urN linux.old/drivers/net/rc32434_eth.h linux.dev/drivers/net/rc32434_eth.
|
||||
+ __raw_writel(0, &ch->dmadptr);
|
||||
+ __raw_writel(0, &ch->dmandptr);
|
||||
+}
|
||||
|
||||
|
@ -26,7 +26,18 @@ diff -urN linux.old/drivers/block/Makefile linux.dev/drivers/block/Makefile
|
||||
diff -urN linux.old/drivers/block/rb500/ata.c linux.dev/drivers/block/rb500/ata.c
|
||||
--- linux.old/drivers/block/rb500/ata.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/drivers/block/rb500/ata.c 2006-10-26 00:11:14.000000000 +0200
|
||||
@@ -0,0 +1,474 @@
|
||||
@@ -0,0 +1,485 @@
|
||||
+/* CF-mips driver
|
||||
+ This is a block driver for the direct (mmaped) interface to the CF-slot,
|
||||
+ found in Routerboard.com's RB532 board
|
||||
+ See SDK provided from routerboard.com.
|
||||
+
|
||||
+ Module adapted By P.Christeas <p_christeas@yahoo.com>, 2005-6.
|
||||
+ Cleaned up and adapted to platform_device by Felix Fietkau <nbd@openwrt.org>
|
||||
+
|
||||
+ This work is redistributed under the terms of the GNU General Public License.
|
||||
+*/
|
||||
+
|
||||
+#include <linux/kernel.h> /* printk() */
|
||||
+#include <linux/module.h> /* module to be loadable */
|
||||
+#include <linux/delay.h>
|
||||
@ -162,7 +173,7 @@ diff -urN linux.old/drivers/block/rb500/ata.c linux.dev/drivers/block/rb500/ata.
|
||||
+ return CF_TRANS_FAILED;
|
||||
+}
|
||||
+
|
||||
+static irqreturn_t cf_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
|
||||
+static irqreturn_t cf_irq_handler(int irq, void *dev_id)
|
||||
+{
|
||||
+ /* While tasklet has not disabled irq, irq will be retried all the time
|
||||
+ * because of ILEVEL matching GPIO pin status => deadlock.
|
||||
@ -504,7 +515,18 @@ diff -urN linux.old/drivers/block/rb500/ata.c linux.dev/drivers/block/rb500/ata.
|
||||
diff -urN linux.old/drivers/block/rb500/ata.h linux.dev/drivers/block/rb500/ata.h
|
||||
--- linux.old/drivers/block/rb500/ata.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/drivers/block/rb500/ata.h 2006-10-26 00:11:14.000000000 +0200
|
||||
@@ -0,0 +1,132 @@
|
||||
@@ -0,0 +1,143 @@
|
||||
+/* CF-mips driver
|
||||
+ This is a block driver for the direct (mmaped) interface to the CF-slot,
|
||||
+ found in Routerboard.com's RB532 board
|
||||
+ See SDK provided from routerboard.com.
|
||||
+
|
||||
+ Module adapted By P.Christeas <p_christeas@yahoo.com>, 2005-6.
|
||||
+ Cleaned up and adapted to platform_device by Felix Fietkau <nbd@openwrt.org>
|
||||
+
|
||||
+ This work is redistributed under the terms of the GNU General Public License.
|
||||
+*/
|
||||
+
|
||||
+#ifndef __CFMIPS_ATA_H__
|
||||
+#define __CFMIPS_ATA_H__
|
||||
+
|
||||
|
@ -1,39 +1,27 @@
|
||||
diff -ur linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c
|
||||
--- linux.old/drivers/net/via-rhine.c 2006-12-07 05:53:39.000000000 +0100
|
||||
+++ linux.dev/drivers/net/via-rhine.c 2006-12-07 07:06:52.000000000 +0100
|
||||
@@ -131,6 +131,10 @@
|
||||
- Fix Tx engine race for good
|
||||
- Craig Brind: Zero padded aligned buffers for short packets.
|
||||
--- linux.old/drivers/net/via-rhine.c 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/drivers/net/via-rhine.c 2006-12-14 03:39:01.000000000 +0100
|
||||
@@ -33,6 +33,7 @@
|
||||
#define DRV_VERSION "1.4.2"
|
||||
#define DRV_RELDATE "Sept-11-2006"
|
||||
|
||||
+ OpenWrt Version (Felix Fietkau <nbd@openwrt.org>)
|
||||
+ - Performance improvements
|
||||
+ - NAPI polling
|
||||
+
|
||||
*/
|
||||
+#define PKT_ALIGN 1
|
||||
|
||||
#define DRV_NAME "via-rhine"
|
||||
@@ -142,7 +146,6 @@
|
||||
/* A few user-configurable values.
|
||||
These may be modified when a driver module is loaded. */
|
||||
|
||||
@@ -40,9 +41,11 @@
|
||||
static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */
|
||||
-static int max_interrupt_work = 20;
|
||||
static int max_interrupt_work = 20;
|
||||
|
||||
+#ifndef PKT_ALIGN
|
||||
/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
|
||||
Setting to > 1518 effectively disables this feature. */
|
||||
@@ -165,9 +168,9 @@
|
||||
Making the Tx ring too large decreases the effectiveness of channel
|
||||
bonding and packet priority.
|
||||
There are no ill effects from too-large receive rings. */
|
||||
-#define TX_RING_SIZE 16
|
||||
-#define TX_QUEUE_LEN 10 /* Limit ring entries actually used. */
|
||||
-#define RX_RING_SIZE 16
|
||||
+#define TX_RING_SIZE 64
|
||||
+#define TX_QUEUE_LEN 60 /* Limit ring entries actually used. */
|
||||
+#define RX_RING_SIZE 64
|
||||
static int rx_copybreak;
|
||||
+#endif
|
||||
|
||||
|
||||
/* Operational parameters that usually are not changed. */
|
||||
@@ -201,6 +204,7 @@
|
||||
/* Work-around for broken BIOSes: they are unable to get the chip back out of
|
||||
power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */
|
||||
@@ -105,6 +108,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/uaccess.h>
|
||||
@ -41,138 +29,24 @@ diff -ur linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c
|
||||
|
||||
/* These identify the driver base version and may not be removed. */
|
||||
static char version[] __devinitdata =
|
||||
@@ -217,10 +221,8 @@
|
||||
MODULE_DESCRIPTION("VIA Rhine PCI Fast Ethernet driver");
|
||||
MODULE_LICENSE("GPL");
|
||||
@@ -123,12 +127,14 @@
|
||||
|
||||
-module_param(max_interrupt_work, int, 0);
|
||||
module_param(max_interrupt_work, int, 0);
|
||||
module_param(debug, int, 0);
|
||||
module_param(rx_copybreak, int, 0);
|
||||
-MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
|
||||
-module_param(rx_copybreak, int, 0);
|
||||
module_param(avoid_D3, bool, 0);
|
||||
MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
|
||||
MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
|
||||
MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
|
||||
-MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
|
||||
MODULE_PARM_DESC(avoid_D3, "Avoid power state D3 (work-around for broken BIOSes)");
|
||||
+#ifndef PKT_ALIGN
|
||||
+module_param(rx_copybreak, int, 0);
|
||||
+MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
|
||||
+#endif
|
||||
|
||||
@@ -461,6 +463,8 @@
|
||||
struct tx_desc *tx_ring;
|
||||
dma_addr_t rx_ring_dma;
|
||||
dma_addr_t tx_ring_dma;
|
||||
+ u32 istat;
|
||||
+ u32 imask;
|
||||
|
||||
/* The addresses of receive-in-place skbuffs. */
|
||||
struct sk_buff *rx_skbuff[RX_RING_SIZE];
|
||||
@@ -500,9 +504,10 @@
|
||||
static void rhine_tx_timeout(struct net_device *dev);
|
||||
static int rhine_start_tx(struct sk_buff *skb, struct net_device *dev);
|
||||
static irqreturn_t rhine_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
|
||||
-static void rhine_tx(struct net_device *dev);
|
||||
-static void rhine_rx(struct net_device *dev);
|
||||
-static void rhine_error(struct net_device *dev, int intr_status);
|
||||
+static int rhine_poll(struct net_device *dev, int *budget);
|
||||
+static int rhine_tx(struct net_device *dev);
|
||||
+static int rhine_rx(struct net_device *dev, int max_work);
|
||||
+static void rhine_error(struct net_device *dev);
|
||||
static void rhine_set_rx_mode(struct net_device *dev);
|
||||
static struct net_device_stats *rhine_get_stats(struct net_device *dev);
|
||||
static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
|
||||
@@ -597,6 +602,7 @@
|
||||
struct rhine_private *rp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = rp->base;
|
||||
|
||||
+ pci_enable_device(rp->pdev);
|
||||
iowrite8(Cmd1Reset, ioaddr + ChipCmd1);
|
||||
IOSYNC;
|
||||
|
||||
@@ -618,6 +624,28 @@
|
||||
"failed" : "succeeded");
|
||||
}
|
||||
|
||||
+static inline void rhine_intr_enable(struct net_device *dev)
|
||||
+{
|
||||
+ struct rhine_private *rp = netdev_priv(dev);
|
||||
+ void __iomem *ioaddr = rp->base;
|
||||
+
|
||||
+ iowrite16(rp->imask = (IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
|
||||
+ IntrRxDropped | IntrRxNoBuf | IntrTxAborted |
|
||||
+ IntrTxDone | IntrTxError | IntrTxUnderrun |
|
||||
+ IntrPCIErr | IntrStatsMax | IntrLinkChange),
|
||||
+ ioaddr + IntrEnable);
|
||||
+}
|
||||
+
|
||||
+static inline void rhine_intr_disable(struct net_device *dev)
|
||||
+{
|
||||
+ struct rhine_private *rp = netdev_priv(dev);
|
||||
+ void __iomem *ioaddr = rp->base;
|
||||
+
|
||||
+ iowrite16(rp->imask = (IntrRxOverflow | IntrRxNoBuf | IntrTxAborted |
|
||||
+ IntrTxError | IntrTxUnderrun | IntrPCIErr | IntrStatsMax | IntrLinkChange),
|
||||
+ ioaddr + IntrEnable);
|
||||
+}
|
||||
+
|
||||
#ifdef USE_MMIO
|
||||
static void enable_mmio(long pioaddr, u32 quirks)
|
||||
{
|
||||
@@ -660,14 +688,26 @@
|
||||
|
||||
}
|
||||
|
||||
-#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
-static void rhine_poll(struct net_device *dev)
|
||||
+static int rhine_poll(struct net_device *dev, int *budget)
|
||||
{
|
||||
- disable_irq(dev->irq);
|
||||
- rhine_interrupt(dev->irq, (void *)dev, NULL);
|
||||
- enable_irq(dev->irq);
|
||||
+ unsigned int work_done, work_to_do = min(*budget, dev->quota);
|
||||
+ struct rhine_private *rp = netdev_priv(dev);
|
||||
+
|
||||
+ work_done = rhine_rx(dev, (*budget < dev->quota ? *budget : dev->quota));
|
||||
+
|
||||
+ if (rp->istat & (IntrTxErrSummary | IntrTxDone))
|
||||
+ rhine_tx(dev);
|
||||
+
|
||||
+ *budget -= work_done;
|
||||
+ dev->quota -= work_done;
|
||||
+
|
||||
+ if (work_done < work_to_do) {
|
||||
+ netif_rx_complete(dev);
|
||||
+ rhine_intr_enable(dev);
|
||||
+ }
|
||||
+
|
||||
+ return (work_done >= work_to_do);
|
||||
}
|
||||
-#endif
|
||||
|
||||
static void rhine_hw_init(struct net_device *dev, long pioaddr)
|
||||
{
|
||||
@@ -846,11 +886,10 @@
|
||||
dev->ethtool_ops = &netdev_ethtool_ops;
|
||||
dev->tx_timeout = rhine_tx_timeout;
|
||||
dev->watchdog_timeo = TX_TIMEOUT;
|
||||
-#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||
- dev->poll_controller = rhine_poll;
|
||||
-#endif
|
||||
- if (rp->quirks & rqRhineI)
|
||||
- dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
|
||||
+ dev->poll = rhine_poll;
|
||||
+ dev->weight = 64;
|
||||
+
|
||||
+ dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
|
||||
|
||||
/* dev->name not defined before register_netdev()! */
|
||||
rc = register_netdev(dev);
|
||||
@@ -894,6 +933,10 @@
|
||||
}
|
||||
}
|
||||
rp->mii_if.phy_id = phy_id;
|
||||
+
|
||||
+ // shut down until somebody really needs it
|
||||
+ iowrite8(0x80, ioaddr + 0xa1);
|
||||
+ pci_set_power_state(rp->pdev, 3);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -985,7 +1028,7 @@
|
||||
/*
|
||||
Theory of Operation
|
||||
@@ -923,7 +929,7 @@
|
||||
|
||||
/* Fill in the Rx buffers. Handle allocation failure gracefully. */
|
||||
for (i = 0; i < RX_RING_SIZE; i++) {
|
||||
@ -181,299 +55,39 @@ diff -ur linux.old/drivers/net/via-rhine.c linux.dev/drivers/net/via-rhine.c
|
||||
rp->rx_skbuff[i] = skb;
|
||||
if (skb == NULL)
|
||||
break;
|
||||
@@ -1120,11 +1163,7 @@
|
||||
rhine_set_rx_mode(dev);
|
||||
@@ -1481,6 +1487,9 @@
|
||||
/* Length should omit the CRC */
|
||||
int pkt_len = data_size - 4;
|
||||
|
||||
/* Enable interrupts by setting the interrupt mask. */
|
||||
- iowrite16(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
|
||||
- IntrRxDropped | IntrRxNoBuf | IntrTxAborted |
|
||||
- IntrTxDone | IntrTxError | IntrTxUnderrun |
|
||||
- IntrPCIErr | IntrStatsMax | IntrLinkChange,
|
||||
- ioaddr + IntrEnable);
|
||||
+ rhine_intr_enable(dev);
|
||||
|
||||
iowrite16(CmdStart | CmdTxOn | CmdRxOn | (Cmd1NoTxPoll << 8),
|
||||
ioaddr + ChipCmd);
|
||||
@@ -1235,6 +1274,7 @@
|
||||
mdio_read(dev, rp->mii_if.phy_id, MII_BMSR));
|
||||
|
||||
netif_start_queue(dev);
|
||||
+ netif_poll_enable(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1263,8 +1303,8 @@
|
||||
/* Reinitialize the hardware. */
|
||||
rhine_chip_reset(dev);
|
||||
init_registers(dev);
|
||||
-
|
||||
spin_unlock(&rp->lock);
|
||||
+
|
||||
enable_irq(rp->pdev->irq);
|
||||
|
||||
dev->trans_start = jiffies;
|
||||
@@ -1358,77 +1398,66 @@
|
||||
struct net_device *dev = dev_instance;
|
||||
struct rhine_private *rp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = rp->base;
|
||||
- u32 intr_status;
|
||||
- int boguscnt = max_interrupt_work;
|
||||
int handled = 0;
|
||||
|
||||
- while ((intr_status = get_intr_status(dev))) {
|
||||
+ if ((rp->istat = (get_intr_status(dev) & rp->imask))) {
|
||||
handled = 1;
|
||||
|
||||
/* Acknowledge all of the current interrupt sources ASAP. */
|
||||
- if (intr_status & IntrTxDescRace)
|
||||
+ if (rp->istat & IntrTxDescRace)
|
||||
iowrite8(0x08, ioaddr + IntrStatus2);
|
||||
- iowrite16(intr_status & 0xffff, ioaddr + IntrStatus);
|
||||
+ iowrite16(rp->istat & 0xffff, ioaddr + IntrStatus);
|
||||
IOSYNC;
|
||||
|
||||
- if (debug > 4)
|
||||
- printk(KERN_DEBUG "%s: Interrupt, status %8.8x.\n",
|
||||
- dev->name, intr_status);
|
||||
+ if (likely(rp->istat & ((IntrRxDone | IntrRxErr | IntrRxDropped |
|
||||
+ IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf |
|
||||
+ IntrTxErrSummary | IntrTxDone)))) {
|
||||
+
|
||||
+ rhine_intr_disable(dev);
|
||||
|
||||
- if (intr_status & (IntrRxDone | IntrRxErr | IntrRxDropped |
|
||||
- IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf))
|
||||
- rhine_rx(dev);
|
||||
-
|
||||
- if (intr_status & (IntrTxErrSummary | IntrTxDone)) {
|
||||
- if (intr_status & IntrTxErrSummary) {
|
||||
- /* Avoid scavenging before Tx engine turned off */
|
||||
- RHINE_WAIT_FOR(!(ioread8(ioaddr+ChipCmd) & CmdTxOn));
|
||||
- if (debug > 2 &&
|
||||
- ioread8(ioaddr+ChipCmd) & CmdTxOn)
|
||||
- printk(KERN_WARNING "%s: "
|
||||
- "rhine_interrupt() Tx engine"
|
||||
- "still on.\n", dev->name);
|
||||
- }
|
||||
- rhine_tx(dev);
|
||||
+ if (likely(netif_rx_schedule_prep(dev)))
|
||||
+ __netif_rx_schedule(dev);
|
||||
}
|
||||
|
||||
/* Abnormal error summary/uncommon events handlers. */
|
||||
- if (intr_status & (IntrPCIErr | IntrLinkChange |
|
||||
+ if (unlikely(rp->istat & (IntrPCIErr | IntrLinkChange |
|
||||
IntrStatsMax | IntrTxError | IntrTxAborted |
|
||||
- IntrTxUnderrun | IntrTxDescRace))
|
||||
- rhine_error(dev, intr_status);
|
||||
-
|
||||
- if (--boguscnt < 0) {
|
||||
- printk(KERN_WARNING "%s: Too much work at interrupt, "
|
||||
- "status=%#8.8x.\n",
|
||||
- dev->name, intr_status);
|
||||
- break;
|
||||
- }
|
||||
+ IntrTxUnderrun | IntrTxDescRace)))
|
||||
+ rhine_error(dev);
|
||||
}
|
||||
|
||||
- if (debug > 3)
|
||||
- printk(KERN_DEBUG "%s: exiting interrupt, status=%8.8x.\n",
|
||||
- dev->name, ioread16(ioaddr + IntrStatus));
|
||||
return IRQ_RETVAL(handled);
|
||||
}
|
||||
|
||||
/* This routine is logically part of the interrupt handler, but isolated
|
||||
for clarity. */
|
||||
-static void rhine_tx(struct net_device *dev)
|
||||
+static int rhine_tx(struct net_device *dev)
|
||||
{
|
||||
struct rhine_private *rp = netdev_priv(dev);
|
||||
int txstatus = 0, entry = rp->dirty_tx % TX_RING_SIZE;
|
||||
+ void __iomem *ioaddr = rp->base;
|
||||
+ int done = 0;
|
||||
+
|
||||
+ /* Avoid scavenging before Tx engine turned off */
|
||||
+ RHINE_WAIT_FOR(!(ioread8(ioaddr+ChipCmd) & CmdTxOn));
|
||||
+ if (debug > 2 &&
|
||||
+ ioread8(ioaddr+ChipCmd) & CmdTxOn)
|
||||
+ printk(KERN_WARNING "%s: "
|
||||
+ "rhine_interrupt() Tx engine"
|
||||
+ "still on.\n", dev->name);
|
||||
|
||||
- spin_lock(&rp->lock);
|
||||
|
||||
/* find and cleanup dirty tx descriptors */
|
||||
while (rp->dirty_tx != rp->cur_tx) {
|
||||
+ spin_lock(&rp->lock);
|
||||
txstatus = le32_to_cpu(rp->tx_ring[entry].tx_status);
|
||||
if (debug > 6)
|
||||
printk(KERN_DEBUG "Tx scavenge %d status %8.8x.\n",
|
||||
entry, txstatus);
|
||||
- if (txstatus & DescOwn)
|
||||
+ if (txstatus & DescOwn) {
|
||||
+ spin_unlock(&rp->lock);
|
||||
break;
|
||||
+ }
|
||||
if (txstatus & 0x8000) {
|
||||
if (debug > 1)
|
||||
printk(KERN_DEBUG "%s: Transmit error, "
|
||||
@@ -1443,6 +1472,7 @@
|
||||
(txstatus & 0x0800) || (txstatus & 0x1000)) {
|
||||
rp->stats.tx_fifo_errors++;
|
||||
rp->tx_ring[entry].tx_status = cpu_to_le32(DescOwn);
|
||||
+ spin_unlock(&rp->lock);
|
||||
break; /* Keep the skb - we try again */
|
||||
}
|
||||
/* Transmitter restarted in 'abnormal' handler. */
|
||||
@@ -1457,6 +1487,7 @@
|
||||
txstatus & 0xF);
|
||||
rp->stats.tx_bytes += rp->tx_skbuff[entry]->len;
|
||||
rp->stats.tx_packets++;
|
||||
+ done++;
|
||||
}
|
||||
/* Free the original skb. */
|
||||
if (rp->tx_skbuff_dma[entry]) {
|
||||
@@ -1465,23 +1496,25 @@
|
||||
rp->tx_skbuff[entry]->len,
|
||||
PCI_DMA_TODEVICE);
|
||||
}
|
||||
- dev_kfree_skb_irq(rp->tx_skbuff[entry]);
|
||||
+ dev_kfree_skb_any(rp->tx_skbuff[entry]);
|
||||
rp->tx_skbuff[entry] = NULL;
|
||||
entry = (++rp->dirty_tx) % TX_RING_SIZE;
|
||||
+ spin_unlock(&rp->lock);
|
||||
}
|
||||
+
|
||||
if ((rp->cur_tx - rp->dirty_tx) < TX_QUEUE_LEN - 4)
|
||||
netif_wake_queue(dev);
|
||||
|
||||
- spin_unlock(&rp->lock);
|
||||
+ return done;
|
||||
}
|
||||
|
||||
/* This routine is logically part of the interrupt handler, but isolated
|
||||
for clarity and better register allocation. */
|
||||
-static void rhine_rx(struct net_device *dev)
|
||||
+static int rhine_rx(struct net_device *dev, int max_work)
|
||||
{
|
||||
struct rhine_private *rp = netdev_priv(dev);
|
||||
int entry = rp->cur_rx % RX_RING_SIZE;
|
||||
- int boguscnt = rp->dirty_rx + RX_RING_SIZE - rp->cur_rx;
|
||||
+ int done = 0;
|
||||
|
||||
if (debug > 4) {
|
||||
printk(KERN_DEBUG "%s: rhine_rx(), entry %d status %8.8x.\n",
|
||||
@@ -1498,7 +1531,7 @@
|
||||
if (debug > 4)
|
||||
printk(KERN_DEBUG "rhine_rx() status is %8.8x.\n",
|
||||
desc_status);
|
||||
- if (--boguscnt < 0)
|
||||
+ if (--max_work < 0)
|
||||
break;
|
||||
if ((desc_status & (RxWholePkt | RxErr)) != RxWholePkt) {
|
||||
if ((desc_status & RxWholePkt) != RxWholePkt) {
|
||||
@@ -1523,9 +1556,7 @@
|
||||
if (desc_status & 0x0004) rp->stats.rx_frame_errors++;
|
||||
if (desc_status & 0x0002) {
|
||||
/* this can also be updated outside the interrupt handler */
|
||||
- spin_lock(&rp->lock);
|
||||
rp->stats.rx_crc_errors++;
|
||||
- spin_unlock(&rp->lock);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1553,6 +1584,7 @@
|
||||
+#ifdef PKT_ALIGN
|
||||
+ int i;
|
||||
+#else
|
||||
/* Check if the packet is long enough to accept without
|
||||
copying to a minimally-sized skbuff. */
|
||||
if (pkt_len < rx_copybreak &&
|
||||
@@ -1500,7 +1509,9 @@
|
||||
rp->rx_skbuff_dma[entry],
|
||||
rp->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
} else {
|
||||
+ int i;
|
||||
- } else {
|
||||
+ } else
|
||||
+#endif
|
||||
+ {
|
||||
skb = rp->rx_skbuff[entry];
|
||||
if (skb == NULL) {
|
||||
printk(KERN_ERR "%s: Inconsistent Rx "
|
||||
@@ -1561,6 +1593,14 @@
|
||||
break;
|
||||
}
|
||||
rp->rx_skbuff[entry] = NULL;
|
||||
+
|
||||
+ /* align the data to the ip header - should be faster than using rx_copybreak */
|
||||
@@ -1514,6 +1525,14 @@
|
||||
rp->rx_skbuff_dma[entry],
|
||||
rp->rx_buf_sz,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
+#ifdef PKT_ALIGN
|
||||
+ /* align the data to the ip header - should be faster than copying the entire packet */
|
||||
+ for (i = pkt_len - (pkt_len % 4); i >= 0; i -= 4) {
|
||||
+ put_unaligned(*((u32 *) (skb->data + i)), (u32 *) (skb->data + i + 2));
|
||||
+ }
|
||||
+ skb->data += 2;
|
||||
+ skb->tail += 2;
|
||||
+
|
||||
skb_put(skb, pkt_len);
|
||||
pci_unmap_single(rp->pdev,
|
||||
rp->rx_skbuff_dma[entry],
|
||||
@@ -1568,10 +1608,11 @@
|
||||
PCI_DMA_FROMDEVICE);
|
||||
+#endif
|
||||
}
|
||||
skb->protocol = eth_type_trans(skb, dev);
|
||||
- netif_rx(skb);
|
||||
+ netif_receive_skb(skb);
|
||||
dev->last_rx = jiffies;
|
||||
rp->stats.rx_bytes += pkt_len;
|
||||
rp->stats.rx_packets++;
|
||||
+ done++;
|
||||
}
|
||||
entry = (++rp->cur_rx) % RX_RING_SIZE;
|
||||
rp->rx_head_desc = &rp->rx_ring[entry];
|
||||
@@ -1582,7 +1623,7 @@
|
||||
struct sk_buff *skb;
|
||||
entry = rp->dirty_rx % RX_RING_SIZE;
|
||||
if (rp->rx_skbuff[entry] == NULL) {
|
||||
- skb = dev_alloc_skb(rp->rx_buf_sz);
|
||||
+ skb = dev_alloc_skb(rp->rx_buf_sz + 4);
|
||||
rp->rx_skbuff[entry] = skb;
|
||||
if (skb == NULL)
|
||||
break; /* Better luck next round. */
|
||||
@@ -1595,6 +1636,8 @@
|
||||
}
|
||||
rp->rx_ring[entry].rx_status = cpu_to_le32(DescOwn);
|
||||
}
|
||||
+
|
||||
+ return done;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1644,11 +1687,11 @@
|
||||
|
||||
}
|
||||
|
||||
-static void rhine_error(struct net_device *dev, int intr_status)
|
||||
+static void rhine_error(struct net_device *dev)
|
||||
{
|
||||
struct rhine_private *rp = netdev_priv(dev);
|
||||
void __iomem *ioaddr = rp->base;
|
||||
-
|
||||
+ u32 intr_status = rp->istat;
|
||||
spin_lock(&rp->lock);
|
||||
|
||||
if (intr_status & IntrLinkChange)
|
||||
@@ -1895,6 +1938,7 @@
|
||||
|
||||
/* Disable interrupts by clearing the interrupt mask. */
|
||||
iowrite16(0x0000, ioaddr + IntrEnable);
|
||||
+ rp->imask = 0;
|
||||
|
||||
/* Stop the chip's Tx and Rx processes. */
|
||||
iowrite16(CmdStop, ioaddr + ChipCmd);
|
||||
@@ -1906,6 +1950,9 @@
|
||||
free_tbufs(dev);
|
||||
free_ring(dev);
|
||||
|
||||
+ writeb(0x80, ioaddr + 0xa1);
|
||||
+ pci_set_power_state(rp->pdev, 3);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1935,6 +1982,7 @@
|
||||
return; /* Nothing to do for non-WOL adapters */
|
||||
|
||||
rhine_power_init(dev);
|
||||
+ netif_poll_disable(dev);
|
||||
|
||||
/* Make sure we use pattern 0, 1 and not 4, 5 */
|
||||
if (rp->quirks & rq6patterns)
|
||||
#ifdef CONFIG_VIA_RHINE_NAPI
|
||||
|
@ -1,10 +1,9 @@
|
||||
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
|
||||
index cfe288a..c528024 100644
|
||||
--- a/drivers/mtd/nand/Kconfig
|
||||
+++ b/drivers/mtd/nand/Kconfig
|
||||
@@ -55,6 +55,12 @@ config MTD_NAND_TOTO
|
||||
diff -urN linux.old/drivers/mtd/nand/Kconfig linux.dev/drivers/mtd/nand/Kconfig
|
||||
--- linux.old/drivers/mtd/nand/Kconfig 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/drivers/mtd/nand/Kconfig 2006-12-14 04:38:51.000000000 +0100
|
||||
@@ -75,6 +75,12 @@
|
||||
help
|
||||
Support for NAND flash on Texas Instruments Toto platform.
|
||||
Support for NAND flash on Technologic Systems TS-7250 platform.
|
||||
|
||||
+config MTD_NAND_RB500
|
||||
+ tristate "NAND Flash device on RB500 board"
|
||||
@ -15,24 +14,21 @@ index cfe288a..c528024 100644
|
||||
config MTD_NAND_IDS
|
||||
tristate
|
||||
|
||||
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
|
||||
index 4174202..2be57c1 100644
|
||||
--- a/drivers/mtd/nand/Makefile
|
||||
+++ b/drivers/mtd/nand/Makefile
|
||||
@@ -8,6 +8,7 @@ obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.
|
||||
|
||||
diff -urN linux.old/drivers/mtd/nand/Makefile linux.dev/drivers/mtd/nand/Makefile
|
||||
--- linux.old/drivers/mtd/nand/Makefile 2006-11-29 22:57:37.000000000 +0100
|
||||
+++ linux.dev/drivers/mtd/nand/Makefile 2006-12-14 04:38:51.000000000 +0100
|
||||
@@ -9,6 +9,7 @@
|
||||
obj-$(CONFIG_MTD_NAND_SPIA) += spia.o
|
||||
obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
|
||||
obj-$(CONFIG_MTD_NAND_TOTO) += toto.o
|
||||
+obj-$(CONFIG_MTD_NAND_RB500) += rbmipsnand.o
|
||||
obj-$(CONFIG_MTD_NAND_AUTCPU12) += autcpu12.o
|
||||
obj-$(CONFIG_MTD_NAND_EDB7312) += edb7312.o
|
||||
obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o
|
||||
diff --git a/drivers/mtd/nand/rbmipsnand.c b/drivers/mtd/nand/rbmipsnand.c
|
||||
new file mode 100644
|
||||
index 0000000..6f7452a
|
||||
--- /dev/null
|
||||
+++ b/drivers/mtd/nand/rbmipsnand.c
|
||||
@@ -0,0 +1,211 @@
|
||||
diff -urN linux.old/drivers/mtd/nand/rbmipsnand.c linux.dev/drivers/mtd/nand/rbmipsnand.c
|
||||
--- linux.old/drivers/mtd/nand/rbmipsnand.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux.dev/drivers/mtd/nand/rbmipsnand.c 2006-12-14 04:39:52.000000000 +0100
|
||||
@@ -0,0 +1,137 @@
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/mtd/nand.h>
|
||||
+#include <linux/mtd/mtd.h>
|
||||
@ -41,12 +37,9 @@ index 0000000..6f7452a
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/irq.h>
|
||||
+#include <asm/bootinfo.h>
|
||||
+//#include <asm/rb/rb100.h>
|
||||
+
|
||||
+#define IDT434_REG_BASE ((volatile void *) KSEG1ADDR(0x18000000))
|
||||
+
|
||||
+#define SMEM1(x) (*((volatile unsigned char *) (KSEG1ADDR(SMEM1_BASE) + x)))
|
||||
+
|
||||
+#define GPIOF 0x050000
|
||||
+#define GPIOC 0x050004
|
||||
+#define GPIOD 0x050008
|
||||
@ -56,19 +49,6 @@ index 0000000..6f7452a
|
||||
+#define GPIO_ALE (1 << 0x0a)
|
||||
+#define GPIO_CLE (1 << 0x0b)
|
||||
+
|
||||
+#define NAND_RW_REG 0x0 //data register
|
||||
+#define NAND_SET_CEn 0x1 //CE# low
|
||||
+#define NAND_CLR_CEn 0x2 //CE# high
|
||||
+#define NAND_CLR_CLE 0x3 //CLE low
|
||||
+#define NAND_SET_CLE 0x4 //CLE high
|
||||
+#define NAND_CLR_ALE 0x5 //ALE low
|
||||
+#define NAND_SET_ALE 0x6 //ALE high
|
||||
+#define NAND_SET_SPn 0x7 //SP# low (use spare area)
|
||||
+#define NAND_CLR_SPn 0x8 //SP# high (do not use spare area)
|
||||
+#define NAND_SET_WPn 0x9 //WP# low
|
||||
+#define NAND_CLR_WPn 0xA //WP# high
|
||||
+#define NAND_STS_REG 0xB //Status register
|
||||
+
|
||||
+#define DEV2BASE 0x010020
|
||||
+
|
||||
+#define LO_WPX (1 << 0)
|
||||
@ -84,89 +64,48 @@ index 0000000..6f7452a
|
||||
+
|
||||
+extern void changeLatchU5(unsigned char orMask, unsigned char nandMask);
|
||||
+
|
||||
+static int rb500_dev_ready(struct mtd_info *mtd) {
|
||||
+ return MEM32(IDT434_REG_BASE + GPIOD) & GPIO_RDY;
|
||||
+static int rb500_dev_ready(struct mtd_info *mtd)
|
||||
+{
|
||||
+ return MEM32(IDT434_REG_BASE + GPIOD) & GPIO_RDY;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+static int rb100_dev_ready(struct mtd_info *mtd) {
|
||||
+ return SMEM1(NAND_STS_REG) & 0x80;
|
||||
+ * hardware specific access to control-lines
|
||||
+ *
|
||||
+ * ctrl:
|
||||
+ * NAND_CLE: bit 2 -> bit 3
|
||||
+ * NAND_ALE: bit 3 -> bit 2
|
||||
+ */
|
||||
+static void rbmips_hwcontrol500(struct mtd_info *mtd, int cmd,
|
||||
+ unsigned int ctrl)
|
||||
+{
|
||||
+ struct nand_chip *chip = mtd->priv;
|
||||
+ unsigned char orbits, nandbits;
|
||||
+
|
||||
+ if (ctrl & NAND_CTRL_CHANGE) {
|
||||
+
|
||||
+ orbits = (ctrl & NAND_CLE) << 1;
|
||||
+ orbits |= (ctrl & NAND_ALE) >> 1;
|
||||
+
|
||||
+ nandbits = (~ctrl & NAND_CLE) << 1;
|
||||
+ nandbits |= (~ctrl & NAND_ALE) >> 1;
|
||||
+
|
||||
+ changeLatchU5(orbits, nandbits);
|
||||
+ }
|
||||
+ if (cmd != NAND_CMD_NONE)
|
||||
+ writeb(cmd, chip->IO_ADDR_W);
|
||||
+
|
||||
+}
|
||||
+*/
|
||||
+static unsigned long iflags = 0;
|
||||
+static int ioff = 0;
|
||||
+/*
|
||||
+static void rbmips_hwcontrol400(struct mtd_info *mtd, int cmd) {
|
||||
+ switch (cmd) {
|
||||
+ case NAND_CTL_SETCLE:
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) |= GPIO_CLE;
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRCLE:
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) &= ~GPIO_CLE;
|
||||
+ break;
|
||||
+ case NAND_CTL_SETALE:
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) |= GPIO_ALE;
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRALE:
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) &= ~GPIO_ALE;
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+*/
|
||||
+static void rbmips_hwcontrol500(struct mtd_info *mtd, int cmd) {
|
||||
+ switch (cmd) {
|
||||
+ case NAND_CTL_SETCLE:
|
||||
+ changeLatchU5(LO_CLE, 0);
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRCLE:
|
||||
+ changeLatchU5(0, LO_CLE);
|
||||
+ break;
|
||||
+ case NAND_CTL_SETALE:
|
||||
+ changeLatchU5(LO_ALE, 0);
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRALE:
|
||||
+ changeLatchU5(0, LO_ALE);
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+/*
|
||||
+static void rbmips_hwcontrol100(struct mtd_info *mtd, int cmd){
|
||||
+ switch(cmd){
|
||||
+ case NAND_CTL_SETCLE:
|
||||
+ SMEM1(NAND_SET_CLE) = 0x01;
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRCLE:
|
||||
+ SMEM1(NAND_CLR_CLE) = 0x01;
|
||||
+ break;
|
||||
+ case NAND_CTL_SETALE:
|
||||
+ SMEM1(NAND_SET_ALE) = 0x01;
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRALE:
|
||||
+ SMEM1(NAND_CLR_ALE) = 0x01;
|
||||
+ break;
|
||||
+ case NAND_CTL_SETNCE:
|
||||
+ SMEM1(NAND_SET_CEn) = 0x01;
|
||||
+ break;
|
||||
+ case NAND_CTL_CLRNCE:
|
||||
+ SMEM1(NAND_CLR_CEn) = 0x01;
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+*/
|
||||
+
|
||||
+static struct mtd_partition partition_info[] = {
|
||||
+ {
|
||||
+ name: "RouterBoard NAND Boot",
|
||||
+ offset: 0,
|
||||
+ size: 4 * 1024 * 1024
|
||||
+ },
|
||||
+ {
|
||||
+ name: "RouterBoard NAND Main",
|
||||
+ offset: MTDPART_OFS_NXTBLK,
|
||||
+ size: MTDPART_SIZ_FULL
|
||||
+ }
|
||||
+ {
|
||||
+ name:"RouterBoard NAND Boot",
|
||||
+ offset:0,
|
||||
+ size:4 * 1024 * 1024},
|
||||
+ {
|
||||
+ name:"RouterBoard NAND Main",
|
||||
+ offset:MTDPART_OFS_NXTBLK,
|
||||
+ size:MTDPART_SIZ_FULL}
|
||||
+};
|
||||
+
|
||||
+static struct mtd_info rmtd;
|
||||
@ -174,64 +113,50 @@ index 0000000..6f7452a
|
||||
+
|
||||
+static unsigned init_ok = 0;
|
||||
+
|
||||
+unsigned get_rbnand_block_size(void) {
|
||||
+ if (init_ok) return rmtd.oobblock; else return 0;
|
||||
+unsigned get_rbnand_block_size(void)
|
||||
+{
|
||||
+ if (init_ok)
|
||||
+ return rmtd.writesize;
|
||||
+ else
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+EXPORT_SYMBOL(get_rbnand_block_size);
|
||||
+
|
||||
+int __init rbmips_init(void) {
|
||||
+int __init rbmips_init(void)
|
||||
+{
|
||||
+ int *b;
|
||||
+ memset(&rmtd, 0, sizeof(rmtd));
|
||||
+ memset(&rnand, 0, sizeof(rnand));
|
||||
+/*
|
||||
+ if (is_rb500()) {
|
||||
+ if (is_rb400()) {
|
||||
+ printk("RB400 nand\n");
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) |= GPIO_WPX;
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) &= ~GPIO_CLE;
|
||||
+ MEM32(IDT434_REG_BASE + GPIOD) &= ~GPIO_ALE;
|
||||
+ rnand.hwcontrol = rbmips_hwcontrol400;
|
||||
+ } else {
|
||||
+*/
|
||||
+ printk("RB500 nand\n");
|
||||
+ changeLatchU5(LO_WPX | LO_FOFF | LO_CEX,
|
||||
+ LO_ULED | LO_ALE | LO_CLE);
|
||||
+ rnand.hwcontrol = rbmips_hwcontrol500;
|
||||
+// }
|
||||
+
|
||||
+ rnand.dev_ready = rb500_dev_ready;
|
||||
+ rnand.IO_ADDR_W = (unsigned char *)
|
||||
+ KSEG1ADDR(MEM32(IDT434_REG_BASE + DEV2BASE));
|
||||
+ rnand.IO_ADDR_R = rnand.IO_ADDR_W;
|
||||
+/* } else if (is_rb100()) {
|
||||
+ printk("RB100 nand\n");
|
||||
+ MEM32(0xB2000064) = 0x100;
|
||||
+ MEM32(0xB2000008) = 0x1;
|
||||
+ SMEM1(NAND_SET_SPn) = 0x01;
|
||||
+ SMEM1(NAND_CLR_WPn) = 0x01;
|
||||
+ rnand.IO_ADDR_R = (unsigned char *)KSEG1ADDR(SMEM1_BASE);
|
||||
+ rnand.IO_ADDR_W = rnand.IO_ADDR_R;
|
||||
+ rnand.hwcontrol = rbmips_hwcontrol100;
|
||||
+ rnand.dev_ready = rb100_dev_ready;
|
||||
+ }
|
||||
+*/
|
||||
+ p_nand = (void __iomem *)ioremap(( void*)0x18a20000, 0x1000);
|
||||
+
|
||||
+ printk("RB500 nand\n");
|
||||
+ changeLatchU5(LO_WPX | LO_FOFF | LO_CEX,
|
||||
+ LO_ULED | LO_ALE | LO_CLE);
|
||||
+ rnand.cmd_ctrl = rbmips_hwcontrol500;
|
||||
+
|
||||
+ rnand.dev_ready = rb500_dev_ready;
|
||||
+ rnand.IO_ADDR_W = (unsigned char *)
|
||||
+ KSEG1ADDR(MEM32(IDT434_REG_BASE + DEV2BASE));
|
||||
+ rnand.IO_ADDR_R = rnand.IO_ADDR_W;
|
||||
+
|
||||
+ p_nand = (void __iomem *) ioremap((void *) 0x18a20000, 0x1000);
|
||||
+ if (!p_nand) {
|
||||
+ printk("RBnand Unable ioremap buffer");
|
||||
+ return -ENXIO;
|
||||
+ }
|
||||
+ rnand.eccmode = NAND_ECC_SOFT;
|
||||
+ rnand.ecc.mode = NAND_ECC_SOFT;
|
||||
+ rnand.chip_delay = 25;
|
||||
+ rnand.options |= NAND_NO_AUTOINCR;
|
||||
+ rmtd.priv = &rnand;
|
||||
+
|
||||
+ int *b = ( int *)KSEG1ADDR( 0x18010020);
|
||||
+ printk( "dev2base 0x%08x mask 0x%08x c 0x%08x tc 0x%08x\n", b[ 0], b[ 1], b[ 2], b[ 3]);
|
||||
+ b = (int *) KSEG1ADDR(0x18010020);
|
||||
+ printk("dev2base 0x%08x mask 0x%08x c 0x%08x tc 0x%08x\n", b[0],
|
||||
+ b[1], b[2], b[3]);
|
||||
+
|
||||
+ if (nand_scan(&rmtd, 1) && nand_scan(&rmtd, 1)
|
||||
+ && nand_scan(&rmtd, 1) && nand_scan(&rmtd, 1)) {
|
||||
+ && nand_scan(&rmtd, 1) && nand_scan(&rmtd, 1)) {
|
||||
+ printk("RBxxx nand device not found");
|
||||
+ iounmap ((void *)p_nand);
|
||||
+ iounmap((void *) p_nand);
|
||||
+ return -ENXIO;
|
||||
+ }
|
||||
+
|
||||
@ -241,8 +166,3 @@ index 0000000..6f7452a
|
||||
+}
|
||||
+
|
||||
+module_init(rbmips_init);
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
+
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -16,9 +16,9 @@ define Target/Description
|
||||
(e.g. Airlink101 AR525W)
|
||||
endef
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
|
||||
|
@ -783,7 +783,7 @@ diff -urN linux-2.6.17/arch/i386/mach-rdc/led.h linux-2.6.17.new/arch/i386/mach-
|
||||
+#ifndef _LED_H_INCLUDED
|
||||
+#define _LED_H_INCLUDED
|
||||
+
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+
|
||||
+#define LED_VERSION "v1.0"
|
||||
+#define LED_MAJOR 166
|
||||
|
@ -74,7 +74,7 @@ diff -urN linux-2.6.17/drivers/mtd/maps/rdc3210.c linux-2.6.17.new/drivers/mtd/m
|
||||
+#include <linux/mtd/mtd.h>
|
||||
+#include <linux/mtd/map.h>
|
||||
+#include <linux/mtd/partitions.h>
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+
|
||||
+#define WINDOW_ADDR 0xFFC00000
|
||||
+#define WINDOW_SIZE 0x00400000
|
||||
|
@ -187,7 +187,7 @@ diff -urN linux-2.6.17/drivers/net/r6040.c linux-2.6.17.new/drivers/net/r6040.c
|
||||
+
|
||||
+static int rdc_open(struct net_device *dev);
|
||||
+static int rdc_start_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
+static irqreturn_t rdc_interrupt(int irq, void *dev_id, struct pt_regs *regs);
|
||||
+static irqreturn_t rdc_interrupt(int irq, void *dev_id);
|
||||
+static struct net_device_stats *rdc_get_stats(struct net_device *dev);
|
||||
+static int rdc_close(struct net_device *dev);
|
||||
+static void set_multicast_list(struct net_device *dev);
|
||||
@ -439,7 +439,7 @@ diff -urN linux-2.6.17/drivers/net/r6040.c linux-2.6.17.new/drivers/net/r6040.c
|
||||
+
|
||||
+/* The RDC interrupt handler. */
|
||||
+static irqreturn_t
|
||||
+rdc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
||||
+rdc_interrupt(int irq, void *dev_id)
|
||||
+{
|
||||
+ struct net_device *dev = dev_id;
|
||||
+ struct rdc_private *lp;
|
||||
|
@ -11,9 +11,9 @@ BOARD:=sibyte
|
||||
BOARDNAME:=SiByte MIPS
|
||||
FEATURES:=broken
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
$(eval $(call BuildKernel))
|
||||
|
@ -54,7 +54,7 @@ diff -Nur linux-2.6.17/drivers/char/sb1250_duart.c linux-2.6.17-owrt/drivers/cha
|
||||
+ * running in asynchronous mode. Also, support for doing a serial console
|
||||
+ * on one of those ports
|
||||
+ */
|
||||
+#include <linux/config.h>
|
||||
+#include <linux/autoconf.h>
|
||||
+#include <linux/types.h>
|
||||
+#include <linux/kernel.h>
|
||||
+#include <linux/serial.h>
|
||||
@ -267,7 +267,7 @@ diff -Nur linux-2.6.17/drivers/char/sb1250_duart.c linux-2.6.17-owrt/drivers/cha
|
||||
+ * which port interrupted
|
||||
+ */
|
||||
+
|
||||
+static irqreturn_t duart_int(int irq, void *dev_id, struct pt_regs *regs)
|
||||
+static irqreturn_t duart_int(int irq, void *dev_id)
|
||||
+{
|
||||
+ uart_state_t *us = (uart_state_t *)dev_id;
|
||||
+ struct tty_struct *tty = us->tty;
|
||||
|
@ -10,9 +10,9 @@ ARCH:=i386
|
||||
BOARD:=uml
|
||||
BOARDNAME:=User Mode Linux
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
$(eval $(call BuildKernel))
|
||||
|
File diff suppressed because it is too large
Load Diff
129
target/linux/uml-2.6/config-diff
Normal file
129
target/linux/uml-2.6/config-diff
Normal file
@ -0,0 +1,129 @@
|
||||
CONFIG_3_LEVEL_PGTABLES=y
|
||||
CONFIG_64BIT=y
|
||||
# CONFIG_ARCH_HAS_SC_SIGNALS is not set
|
||||
# CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA is not set
|
||||
# CONFIG_ATM is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
CONFIG_BINFMT_MISC=m
|
||||
CONFIG_BLK_DEV_COW_COMMON=y
|
||||
CONFIG_BLK_DEV_UBD=y
|
||||
CONFIG_BLK_DEV_UBD_SYNC=y
|
||||
# CONFIG_BT is not set
|
||||
CONFIG_CON_CHAN="xterm"
|
||||
CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
|
||||
CONFIG_CRAMFS=y
|
||||
# CONFIG_CRYPTO_AES_X86_64 is not set
|
||||
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
|
||||
# CONFIG_DEBUG_DRIVER is not set
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
# CONFIG_DEBUG_KOBJECT is not set
|
||||
# CONFIG_DEBUG_LIST is not set
|
||||
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
|
||||
# CONFIG_DEBUG_MUTEXES is not set
|
||||
# CONFIG_DEBUG_RT_MUTEXES is not set
|
||||
# CONFIG_DEBUG_RWSEMS is not set
|
||||
CONFIG_DEBUG_SLAB=y
|
||||
# CONFIG_DEBUG_SLAB_LEAK is not set
|
||||
# CONFIG_DEBUG_SPINLOCK is not set
|
||||
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
|
||||
# CONFIG_DEBUG_VM is not set
|
||||
CONFIG_DEFAULT_AS=y
|
||||
# CONFIG_DEFAULT_DEADLINE is not set
|
||||
CONFIG_DEFAULT_IOSCHED="anticipatory"
|
||||
CONFIG_DEFCONFIG_LIST="arch/$ARCH/defconfig"
|
||||
CONFIG_DETECT_SOFTLOCKUP=y
|
||||
CONFIG_DNOTIFY=y
|
||||
CONFIG_ELF_CORE=y
|
||||
# CONFIG_EMBEDDED is not set
|
||||
CONFIG_EXT2_FS=y
|
||||
# CONFIG_FORCED_INLINING is not set
|
||||
CONFIG_FRAME_POINTER=y
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_FW_LOADER is not set
|
||||
# CONFIG_GCOV is not set
|
||||
# CONFIG_GPROF is not set
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HOSTAUDIO=m
|
||||
CONFIG_HOSTFS=y
|
||||
# CONFIG_HPPFS is not set
|
||||
# CONFIG_HW_RANDOM is not set
|
||||
# CONFIG_IFB is not set
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=128
|
||||
CONFIG_IOSCHED_AS=y
|
||||
CONFIG_IOSCHED_CFQ=y
|
||||
CONFIG_IPV6_TUNNEL=m
|
||||
# CONFIG_IP_DCCP_DEBUG is not set
|
||||
CONFIG_IRQ_RELEASE_METHOD=y
|
||||
CONFIG_KALLSYMS=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
CONFIG_KALLSYMS_EXTRA_PASS=y
|
||||
CONFIG_KERNEL_STACK_ORDER=2
|
||||
CONFIG_LBD=y
|
||||
CONFIG_LD_SCRIPT_DYN=y
|
||||
CONFIG_LEGACY_PTYS=y
|
||||
CONFIG_LEGACY_PTY_COUNT=256
|
||||
# CONFIG_LLC2 is not set
|
||||
# CONFIG_MAC_PARTITION is not set
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_MCONSOLE=y
|
||||
CONFIG_MINI_FO=m
|
||||
# CONFIG_MMAPPER is not set
|
||||
CONFIG_MODE_SKAS=y
|
||||
CONFIG_NEST_LEVEL=0
|
||||
# CONFIG_NET_RADIO is not set
|
||||
CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
|
||||
# CONFIG_NET_SCH_CLK_JIFFIES is not set
|
||||
CONFIG_NOCONFIG_CHAN=y
|
||||
# CONFIG_NULL_CHAN is not set
|
||||
CONFIG_PORT_CHAN=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
# CONFIG_PPP_MULTILINK is not set
|
||||
CONFIG_PTY_CHAN=y
|
||||
# CONFIG_RCU_TORTURE_TEST is not set
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_RESOURCES_64BIT=y
|
||||
# CONFIG_RT_MUTEX_TESTER is not set
|
||||
CONFIG_RWSEM_GENERIC_SPINLOCK=y
|
||||
# CONFIG_SCHEDSTATS is not set
|
||||
CONFIG_SEMAPHORE_SLEEPERS=y
|
||||
CONFIG_SLIP=m
|
||||
# CONFIG_SLIP_COMPRESSED is not set
|
||||
# CONFIG_SLIP_MODE_SLIP6 is not set
|
||||
# CONFIG_SLIP_SMART is not set
|
||||
CONFIG_SMP_BROKEN=y
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
# CONFIG_SPARSEMEM_STATIC is not set
|
||||
CONFIG_SSL=y
|
||||
CONFIG_SSL_CHAN="pty"
|
||||
# CONFIG_STATIC_LINK is not set
|
||||
CONFIG_STDERR_CONSOLE=y
|
||||
CONFIG_STDIO_CONSOLE=y
|
||||
CONFIG_STUB_CODE=0x7fbfffe000
|
||||
CONFIG_STUB_DATA=0x7fbffff000
|
||||
CONFIG_STUB_START=0x7fbfffe000
|
||||
CONFIG_TOP_ADDR=0x80000000
|
||||
# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set
|
||||
CONFIG_TTY_CHAN=y
|
||||
CONFIG_UID16=y
|
||||
CONFIG_UML=y
|
||||
CONFIG_UML_NET=y
|
||||
CONFIG_UML_NET_DAEMON=y
|
||||
CONFIG_UML_NET_ETHERTAP=y
|
||||
CONFIG_UML_NET_MCAST=y
|
||||
# CONFIG_UML_NET_PCAP is not set
|
||||
CONFIG_UML_NET_SLIP=y
|
||||
CONFIG_UML_NET_SLIRP=y
|
||||
CONFIG_UML_NET_TUNTAP=y
|
||||
CONFIG_UML_RANDOM=y
|
||||
CONFIG_UML_REAL_TIME_CLOCK=y
|
||||
CONFIG_UML_SOUND=m
|
||||
CONFIG_UML_WATCHDOG=m
|
||||
CONFIG_UML_X86=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
CONFIG_UNWIND_INFO=y
|
||||
CONFIG_VM_EVENT_COUNTERS=y
|
||||
CONFIG_WATCHDOG_NOWAYOUT=y
|
||||
CONFIG_XTERM_CHAN=y
|
||||
CONFIG_ZLIB_DEFLATE=m
|
@ -1,71 +0,0 @@
|
||||
# Since the syscallx macros seem to be under threat, this patch stops
|
||||
# using them, using syscall instead.
|
||||
|
||||
Index: linux-2.6.17/arch/um/os-Linux/process.c
|
||||
===================================================================
|
||||
--- linux-2.6.17.orig/arch/um/os-Linux/process.c 2006-09-20 11:15:08.000000000 -0400
|
||||
+++ linux-2.6.17/arch/um/os-Linux/process.c 2006-09-20 13:35:24.000000000 -0400
|
||||
@@ -140,11 +140,9 @@ void os_usr1_process(int pid)
|
||||
* syscalls, and also breaks with clone(), which does not unshare the TLS.
|
||||
*/
|
||||
|
||||
-inline _syscall0(pid_t, getpid)
|
||||
-
|
||||
int os_getpid(void)
|
||||
{
|
||||
- return(getpid());
|
||||
+ return syscall(__NR_getpid);
|
||||
}
|
||||
|
||||
int os_getpgrp(void)
|
||||
Index: linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c
|
||||
===================================================================
|
||||
--- linux-2.6.17.orig/arch/um/os-Linux/sys-i386/tls.c 2006-06-18 13:49:35.000000000 -0400
|
||||
+++ linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c 2006-09-20 13:37:27.000000000 -0400
|
||||
@@ -3,8 +3,6 @@
|
||||
#include "sysdep/tls.h"
|
||||
#include "user_util.h"
|
||||
|
||||
-static _syscall1(int, get_thread_area, user_desc_t *, u_info);
|
||||
-
|
||||
/* Checks whether host supports TLS, and sets *tls_min according to the value
|
||||
* valid on the host.
|
||||
* i386 host have it == 6; x86_64 host have it == 12, for i386 emulation. */
|
||||
@@ -17,7 +15,7 @@ void check_host_supports_tls(int *suppor
|
||||
user_desc_t info;
|
||||
info.entry_number = val[i];
|
||||
|
||||
- if (get_thread_area(&info) == 0) {
|
||||
+ if(syscall(__NR_get_thread_area, &info) == 0){
|
||||
*tls_min = val[i];
|
||||
*supports_tls = 1;
|
||||
return;
|
||||
Index: linux-2.6.17/arch/um/os-Linux/tls.c
|
||||
===================================================================
|
||||
--- linux-2.6.17.orig/arch/um/os-Linux/tls.c 2006-08-15 21:59:56.000000000 -0400
|
||||
+++ linux-2.6.17/arch/um/os-Linux/tls.c 2006-09-20 13:37:14.000000000 -0400
|
||||
@@ -48,14 +48,11 @@ int os_get_thread_area(user_desc_t *info
|
||||
#ifdef UML_CONFIG_MODE_TT
|
||||
#include "linux/unistd.h"
|
||||
|
||||
-static _syscall1(int, get_thread_area, user_desc_t *, u_info);
|
||||
-static _syscall1(int, set_thread_area, user_desc_t *, u_info);
|
||||
-
|
||||
int do_set_thread_area_tt(user_desc_t *info)
|
||||
{
|
||||
int ret;
|
||||
|
||||
- ret = set_thread_area(info);
|
||||
+ ret = syscall(__NR_set_thread_area, info);
|
||||
if (ret < 0) {
|
||||
ret = -errno;
|
||||
}
|
||||
@@ -66,7 +63,7 @@ int do_get_thread_area_tt(user_desc_t *i
|
||||
{
|
||||
int ret;
|
||||
|
||||
- ret = get_thread_area(info);
|
||||
+ ret = syscall(__NR_get_thread_area, info);
|
||||
if (ret < 0) {
|
||||
ret = -errno;
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
# Newer libcs don't define the JB_* jmp_buf access macros. If this is
|
||||
# the case, we provide values ourselves.
|
||||
Index: linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c
|
||||
===================================================================
|
||||
--- linux-2.6.15.orig/arch/um/os-Linux/sys-i386/registers.c 2006-02-13 13:00:06.000000000 -0500
|
||||
+++ linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c 2006-02-13 13:04:07.000000000 -0500
|
||||
@@ -130,6 +130,12 @@ void get_safe_registers(unsigned long *r
|
||||
HOST_FP_SIZE * sizeof(unsigned long));
|
||||
}
|
||||
|
||||
+#ifndef JB_PC
|
||||
+#define JB_PC 5
|
||||
+#define JB_SP 4
|
||||
+#define JB_BP 3
|
||||
+#endif
|
||||
+
|
||||
void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
|
||||
{
|
||||
struct __jmp_buf_tag *jmpbuf = buffer;
|
||||
Index: linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c
|
||||
===================================================================
|
||||
--- linux-2.6.15.orig/arch/um/os-Linux/sys-x86_64/registers.c 2006-02-13 13:00:06.000000000 -0500
|
||||
+++ linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c 2006-02-13 13:04:07.000000000 -0500
|
||||
@@ -78,6 +78,12 @@ void get_safe_registers(unsigned long *r
|
||||
HOST_FP_SIZE * sizeof(unsigned long));
|
||||
}
|
||||
|
||||
+#ifndef JB_PC
|
||||
+#define JB_PC 7
|
||||
+#define JB_RSP 6
|
||||
+#define JB_RBP 1
|
||||
+#endif
|
||||
+
|
||||
void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
|
||||
{
|
||||
struct __jmp_buf_tag *jmpbuf = buffer;
|
||||
|
@ -1,10 +0,0 @@
|
||||
--- linux-2.6.17.orig/arch/um/os-Linux/skas/process.c 2006-06-18 02:49:35.000000000 +0100
|
||||
+++ linux-2.6.17/arch/um/os-Linux/skas/process.c 2006-11-13 15:34:43.087105285 +0000
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <sys/user.h>
|
||||
#include <sys/time.h>
|
||||
#include <asm/unistd.h>
|
||||
+#include <asm/page.h>
|
||||
#include <asm/types.h>
|
||||
#include "user.h"
|
||||
#include "sysdep/ptrace.h"
|
@ -11,9 +11,9 @@ BOARD:=x86
|
||||
BOARDNAME:=x86
|
||||
FEATURES:=jffs2 ext2
|
||||
|
||||
LINUX_VERSION:=2.6.17
|
||||
LINUX_VERSION:=2.6.19
|
||||
LINUX_RELEASE:=1
|
||||
LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
|
||||
LINUX_KERNEL_MD5SUM:=443c265b57e87eadc0c677c3acc37e20
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-build.mk
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
437
target/linux/x86-2.6/config-diff
Normal file
437
target/linux/x86-2.6/config-diff
Normal file
@ -0,0 +1,437 @@
|
||||
# CONFIG_3C515 is not set
|
||||
# CONFIG_60XX_WDT is not set
|
||||
CONFIG_8139TOO=m
|
||||
# CONFIG_8139TOO_8129 is not set
|
||||
CONFIG_8139TOO_PIO=y
|
||||
# CONFIG_8139TOO_TUNE_TWISTER is not set
|
||||
# CONFIG_8139_OLD_RX_RESET is not set
|
||||
# CONFIG_AC3200 is not set
|
||||
# CONFIG_ACPI is not set
|
||||
# CONFIG_ACQUIRE_WDT is not set
|
||||
# CONFIG_ADVANTECH_WDT is not set
|
||||
# CONFIG_AGP is not set
|
||||
# CONFIG_ALIM1535_WDT is not set
|
||||
# CONFIG_ALIM7101_WDT is not set
|
||||
# CONFIG_APRICOT is not set
|
||||
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
|
||||
CONFIG_ARCH_POPULATES_NODE_MAP=y
|
||||
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
|
||||
CONFIG_ARCH_SPARSEMEM_ENABLE=y
|
||||
# CONFIG_ARLAN is not set
|
||||
# CONFIG_AT1700 is not set
|
||||
# CONFIG_B44 is not set
|
||||
CONFIG_BASE_SMALL=0
|
||||
# CONFIG_BINFMT_AOUT is not set
|
||||
# CONFIG_BLK_DEV_AEC62XX is not set
|
||||
# CONFIG_BLK_DEV_ALI15X3 is not set
|
||||
# CONFIG_BLK_DEV_AMD74XX is not set
|
||||
# CONFIG_BLK_DEV_ATIIXP is not set
|
||||
# CONFIG_BLK_DEV_CMD640 is not set
|
||||
# CONFIG_BLK_DEV_CMD64X is not set
|
||||
# CONFIG_BLK_DEV_CS5520 is not set
|
||||
# CONFIG_BLK_DEV_CS5530 is not set
|
||||
# CONFIG_BLK_DEV_CS5535 is not set
|
||||
# CONFIG_BLK_DEV_CY82C693 is not set
|
||||
# CONFIG_BLK_DEV_FD is not set
|
||||
CONFIG_BLK_DEV_GENERIC=y
|
||||
# CONFIG_BLK_DEV_HD is not set
|
||||
# CONFIG_BLK_DEV_HD_IDE is not set
|
||||
# CONFIG_BLK_DEV_HPT34X is not set
|
||||
# CONFIG_BLK_DEV_HPT366 is not set
|
||||
CONFIG_BLK_DEV_IDE=y
|
||||
# CONFIG_BLK_DEV_IDECD is not set
|
||||
# CONFIG_BLK_DEV_IDECS is not set
|
||||
CONFIG_BLK_DEV_IDEDISK=y
|
||||
CONFIG_BLK_DEV_IDEDMA=y
|
||||
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
|
||||
CONFIG_BLK_DEV_IDEDMA_PCI=y
|
||||
# CONFIG_BLK_DEV_IDEFLOPPY is not set
|
||||
CONFIG_BLK_DEV_IDEPCI=y
|
||||
# CONFIG_BLK_DEV_IDEPNP is not set
|
||||
# CONFIG_BLK_DEV_IDESCSI is not set
|
||||
# CONFIG_BLK_DEV_IDETAPE is not set
|
||||
# CONFIG_BLK_DEV_IDE_SATA is not set
|
||||
# CONFIG_BLK_DEV_IT821X is not set
|
||||
# CONFIG_BLK_DEV_JMICRON is not set
|
||||
# CONFIG_BLK_DEV_NS87415 is not set
|
||||
# CONFIG_BLK_DEV_OFFBOARD is not set
|
||||
# CONFIG_BLK_DEV_OPTI621 is not set
|
||||
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
|
||||
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
|
||||
# CONFIG_BLK_DEV_PIIX is not set
|
||||
# CONFIG_BLK_DEV_RZ1000 is not set
|
||||
CONFIG_BLK_DEV_SC1200=y
|
||||
# CONFIG_BLK_DEV_SIIMAGE is not set
|
||||
# CONFIG_BLK_DEV_SIS5513 is not set
|
||||
# CONFIG_BLK_DEV_SLC90E66 is not set
|
||||
# CONFIG_BLK_DEV_SVWKS is not set
|
||||
# CONFIG_BLK_DEV_TRIFLEX is not set
|
||||
# CONFIG_BLK_DEV_TRM290 is not set
|
||||
CONFIG_BLK_DEV_VIA82CXXX=y
|
||||
# CONFIG_BLK_DEV_XD is not set
|
||||
# CONFIG_CD_NO_IDESCSI is not set
|
||||
CONFIG_COMPAT_VDSO=y
|
||||
# CONFIG_CPU5_WDT is not set
|
||||
CONFIG_CPU_FREQ=y
|
||||
# CONFIG_CPU_FREQ_DEBUG is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
|
||||
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
|
||||
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
|
||||
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_STAT_DETAILS=y
|
||||
CONFIG_CPU_FREQ_TABLE=y
|
||||
CONFIG_CRYPTO_AES_586=m
|
||||
# CONFIG_CRYPTO_DEV_PADLOCK is not set
|
||||
CONFIG_CRYPTO_TWOFISH_586=m
|
||||
# CONFIG_CS5535_GPIO is not set
|
||||
# CONFIG_CS89x0 is not set
|
||||
# CONFIG_DCDBAS is not set
|
||||
# CONFIG_DEBUG_BUGVERBOSE is not set
|
||||
# CONFIG_DELL_RBU is not set
|
||||
# CONFIG_DEPCA is not set
|
||||
# CONFIG_DMASCC is not set
|
||||
CONFIG_DMI=y
|
||||
CONFIG_DOUBLEFAULT=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
# CONFIG_EDAC is not set
|
||||
# CONFIG_EDD is not set
|
||||
# CONFIG_EISA is not set
|
||||
# CONFIG_EL1 is not set
|
||||
# CONFIG_EL16 is not set
|
||||
# CONFIG_EL2 is not set
|
||||
# CONFIG_EL3 is not set
|
||||
# CONFIG_ELPLUS is not set
|
||||
# CONFIG_EUROTECH_WDT is not set
|
||||
CONFIG_EXT2_FS=y
|
||||
# CONFIG_FIRMWARE_EDID is not set
|
||||
CONFIG_FS_POSIX_ACL=y
|
||||
# CONFIG_FTAPE is not set
|
||||
CONFIG_GENERIC_IOMAP=y
|
||||
CONFIG_GENERIC_ISA_DMA=y
|
||||
# CONFIG_HANGCHECK_TIMER is not set
|
||||
# CONFIG_HIGHMEM4G is not set
|
||||
# CONFIG_HIGHMEM64G is not set
|
||||
# CONFIG_HPET_TIMER is not set
|
||||
# CONFIG_HUGETLBFS is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
# CONFIG_HW_RANDOM_AMD is not set
|
||||
CONFIG_HW_RANDOM_GEODE=y
|
||||
# CONFIG_HW_RANDOM_INTEL is not set
|
||||
CONFIG_HW_RANDOM_VIA=y
|
||||
CONFIG_HZ=100
|
||||
CONFIG_HZ_100=y
|
||||
# CONFIG_HZ_250 is not set
|
||||
CONFIG_I2C=m
|
||||
CONFIG_I2C_ALGOBIT=m
|
||||
# CONFIG_I2C_ALGOPCA is not set
|
||||
# CONFIG_I2C_ALGOPCF is not set
|
||||
# CONFIG_I2C_ALI1535 is not set
|
||||
# CONFIG_I2C_ALI1563 is not set
|
||||
# CONFIG_I2C_ALI15X3 is not set
|
||||
# CONFIG_I2C_AMD756 is not set
|
||||
# CONFIG_I2C_AMD8111 is not set
|
||||
CONFIG_I2C_CHARDEV=m
|
||||
# CONFIG_I2C_DEBUG_ALGO is not set
|
||||
# CONFIG_I2C_DEBUG_BUS is not set
|
||||
# CONFIG_I2C_DEBUG_CHIP is not set
|
||||
# CONFIG_I2C_DEBUG_CORE is not set
|
||||
# CONFIG_I2C_ELEKTOR is not set
|
||||
# CONFIG_I2C_I801 is not set
|
||||
# CONFIG_I2C_I810 is not set
|
||||
# CONFIG_I2C_NFORCE2 is not set
|
||||
# CONFIG_I2C_OCORES is not set
|
||||
# CONFIG_I2C_PARPORT_LIGHT is not set
|
||||
# CONFIG_I2C_PCA_ISA is not set
|
||||
# CONFIG_I2C_PIIX4 is not set
|
||||
# CONFIG_I2C_PROSAVAGE is not set
|
||||
# CONFIG_I2C_SAVAGE4 is not set
|
||||
# CONFIG_I2C_SIS5595 is not set
|
||||
# CONFIG_I2C_SIS630 is not set
|
||||
# CONFIG_I2C_SIS96X is not set
|
||||
# CONFIG_I2C_STUB is not set
|
||||
# CONFIG_I2C_VIA is not set
|
||||
# CONFIG_I2C_VIAPRO is not set
|
||||
# CONFIG_I2C_VOODOO3 is not set
|
||||
# CONFIG_I6300ESB_WDT is not set
|
||||
# CONFIG_I82365 is not set
|
||||
# CONFIG_I8K is not set
|
||||
# CONFIG_I8XX_TCO is not set
|
||||
# CONFIG_IB700_WDT is not set
|
||||
# CONFIG_IBMASR is not set
|
||||
# CONFIG_IBM_ASM is not set
|
||||
CONFIG_IDE=y
|
||||
# CONFIG_IDEDISK_MULTI_MODE is not set
|
||||
CONFIG_IDEDMA_AUTO=y
|
||||
# CONFIG_IDEDMA_IVB is not set
|
||||
# CONFIG_IDEDMA_ONLYDISK is not set
|
||||
CONFIG_IDEDMA_PCI_AUTO=y
|
||||
CONFIG_IDEPCI_SHARE_IRQ=y
|
||||
# CONFIG_IDE_ARM is not set
|
||||
# CONFIG_IDE_CHIPSETS is not set
|
||||
CONFIG_IDE_GENERIC=y
|
||||
CONFIG_IDE_MAX_HWIFS=4
|
||||
# CONFIG_IDE_TASK_IOCTL is not set
|
||||
CONFIG_INITRAMFS_ROOT_GID=0
|
||||
CONFIG_INITRAMFS_ROOT_UID=0
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_ISA=y
|
||||
CONFIG_ISAPNP=y
|
||||
CONFIG_ISA_DMA_API=y
|
||||
# CONFIG_ITCO_WDT is not set
|
||||
CONFIG_JFFS2_FS_DEBUG=0
|
||||
# CONFIG_KEXEC is not set
|
||||
CONFIG_KTIME_SCALAR=y
|
||||
# CONFIG_LANCE is not set
|
||||
CONFIG_LEDS_NET48XX=m
|
||||
# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
|
||||
# CONFIG_M386 is not set
|
||||
CONFIG_M486=y
|
||||
# CONFIG_M586 is not set
|
||||
# CONFIG_M586MMX is not set
|
||||
# CONFIG_M586TSC is not set
|
||||
# CONFIG_M686 is not set
|
||||
# CONFIG_MACHZ_WDT is not set
|
||||
# CONFIG_MATH_EMULATION is not set
|
||||
# CONFIG_MCA is not set
|
||||
# CONFIG_MCRUSOE is not set
|
||||
# CONFIG_MCYRIXIII is not set
|
||||
# CONFIG_MEFFICEON is not set
|
||||
# CONFIG_MGEODEGX1 is not set
|
||||
# CONFIG_MGEODE_LX is not set
|
||||
# CONFIG_MICROCODE is not set
|
||||
CONFIG_MINI_FO=m
|
||||
# CONFIG_MIXCOMWD is not set
|
||||
# CONFIG_MK6 is not set
|
||||
# CONFIG_MK7 is not set
|
||||
# CONFIG_MK8 is not set
|
||||
# CONFIG_MPENTIUM4 is not set
|
||||
# CONFIG_MPENTIUMII is not set
|
||||
# CONFIG_MPENTIUMIII is not set
|
||||
# CONFIG_MPENTIUMM is not set
|
||||
CONFIG_MTD=y
|
||||
# CONFIG_MTD_ABSENT is not set
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_BLOCK2MTD=y
|
||||
# CONFIG_MTD_CFI is not set
|
||||
CONFIG_MTD_CFI_I1=y
|
||||
CONFIG_MTD_CFI_I2=y
|
||||
# CONFIG_MTD_CFI_I4 is not set
|
||||
# CONFIG_MTD_CFI_I8 is not set
|
||||
CONFIG_MTD_CHAR=y
|
||||
# CONFIG_MTD_CMDLINE_PARTS is not set
|
||||
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
|
||||
# CONFIG_MTD_CONCAT is not set
|
||||
# CONFIG_MTD_DEBUG is not set
|
||||
# CONFIG_MTD_DOC2000 is not set
|
||||
# CONFIG_MTD_DOC2001 is not set
|
||||
# CONFIG_MTD_DOC2001PLUS is not set
|
||||
# CONFIG_MTD_JEDECPROBE is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_1=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_2=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
|
||||
CONFIG_MTD_MAP_BANK_WIDTH_4=y
|
||||
# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
|
||||
# CONFIG_MTD_MTDRAM is not set
|
||||
# CONFIG_MTD_NAND is not set
|
||||
# CONFIG_MTD_OBSOLETE_CHIPS is not set
|
||||
# CONFIG_MTD_ONENAND is not set
|
||||
CONFIG_MTD_PARTITIONS=y
|
||||
# CONFIG_MTD_PHRAM is not set
|
||||
# CONFIG_MTD_PLATRAM is not set
|
||||
# CONFIG_MTD_PMC551 is not set
|
||||
# CONFIG_MTD_RAM is not set
|
||||
# CONFIG_MTD_REDBOOT_PARTS is not set
|
||||
# CONFIG_MTD_ROM is not set
|
||||
# CONFIG_MTD_SLRAM is not set
|
||||
# CONFIG_MTD_TS5500 is not set
|
||||
# CONFIG_MTRR is not set
|
||||
# CONFIG_MVIAC3_2 is not set
|
||||
# CONFIG_MWAVE is not set
|
||||
# CONFIG_MWINCHIP2 is not set
|
||||
# CONFIG_MWINCHIP3D is not set
|
||||
# CONFIG_MWINCHIPC6 is not set
|
||||
CONFIG_NATSEMI=m
|
||||
CONFIG_NE2K_PCI=m
|
||||
# CONFIG_NET_ISA is not set
|
||||
# CONFIG_NET_SB1000 is not set
|
||||
CONFIG_NET_VENDOR_3COM=y
|
||||
# CONFIG_NET_VENDOR_RACAL is not set
|
||||
# CONFIG_NET_VENDOR_SMC is not set
|
||||
CONFIG_NOHIGHMEM=y
|
||||
CONFIG_NSC_GPIO=m
|
||||
CONFIG_NVRAM=y
|
||||
CONFIG_PAGE_OFFSET=0xC0000000
|
||||
# CONFIG_PC8736x_GPIO is not set
|
||||
# CONFIG_PCIEPORTBUS is not set
|
||||
# CONFIG_PCIPCWATCHDOG is not set
|
||||
CONFIG_PCI_BIOS=y
|
||||
CONFIG_PCI_DIRECT=y
|
||||
CONFIG_PCI_GOANY=y
|
||||
# CONFIG_PCI_GOBIOS is not set
|
||||
# CONFIG_PCI_GODIRECT is not set
|
||||
# CONFIG_PCI_GOMMCONFIG is not set
|
||||
CONFIG_PCMCIA_ATMEL=m
|
||||
CONFIG_PCMCIA_PROBE=y
|
||||
# CONFIG_PCWATCHDOG is not set
|
||||
CONFIG_PHYSICAL_START=0x100000
|
||||
# CONFIG_PM is not set
|
||||
CONFIG_PNP=y
|
||||
# CONFIG_PNPBIOS is not set
|
||||
# CONFIG_PNP_DEBUG is not set
|
||||
# CONFIG_REGPARM is not set
|
||||
CONFIG_RTC=y
|
||||
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
|
||||
# CONFIG_SBC8360_WDT is not set
|
||||
# CONFIG_SBC_EPX_C3_WATCHDOG is not set
|
||||
CONFIG_SC1200_WDT=m
|
||||
# CONFIG_SC520_WDT is not set
|
||||
# CONFIG_SCC is not set
|
||||
# CONFIG_SCSI_7000FASST is not set
|
||||
# CONFIG_SCSI_ADVANSYS is not set
|
||||
# CONFIG_SCSI_AHA152X is not set
|
||||
# CONFIG_SCSI_AHA1542 is not set
|
||||
# CONFIG_SCSI_BUSLOGIC is not set
|
||||
# CONFIG_SCSI_DTC3280 is not set
|
||||
# CONFIG_SCSI_EATA is not set
|
||||
# CONFIG_SCSI_GDTH is not set
|
||||
# CONFIG_SCSI_GENERIC_NCR5380 is not set
|
||||
# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
|
||||
# CONFIG_SCSI_IN2000 is not set
|
||||
# CONFIG_SCSI_NCR53C406A is not set
|
||||
# CONFIG_SCSI_PAS16 is not set
|
||||
# CONFIG_SCSI_PSI240I is not set
|
||||
# CONFIG_SCSI_QLOGIC_FAS is not set
|
||||
# CONFIG_SCSI_SYM53C416 is not set
|
||||
# CONFIG_SCSI_T128 is not set
|
||||
# CONFIG_SCSI_U14_34F is not set
|
||||
# CONFIG_SCSI_ULTRASTOR is not set
|
||||
CONFIG_SCx200=y
|
||||
CONFIG_SCx200HR_TIMER=y
|
||||
CONFIG_SCx200_ACB=m
|
||||
CONFIG_SCx200_GPIO=m
|
||||
CONFIG_SCx200_I2C=m
|
||||
CONFIG_SCx200_I2C_SCL=12
|
||||
CONFIG_SCx200_I2C_SDA=13
|
||||
CONFIG_SCx200_WDT=m
|
||||
# CONFIG_SECCOMP is not set
|
||||
CONFIG_SEMAPHORE_SLEEPERS=y
|
||||
# CONFIG_SENSORS_DS1337 is not set
|
||||
# CONFIG_SENSORS_DS1374 is not set
|
||||
# CONFIG_SENSORS_EEPROM is not set
|
||||
# CONFIG_SENSORS_MAX6875 is not set
|
||||
# CONFIG_SENSORS_PCA9539 is not set
|
||||
# CONFIG_SENSORS_PCF8574 is not set
|
||||
# CONFIG_SENSORS_PCF8591 is not set
|
||||
# CONFIG_SERIAL_8250_EXTENDED is not set
|
||||
# CONFIG_SERIAL_8250_PNP is not set
|
||||
# CONFIG_SMP is not set
|
||||
# CONFIG_SMSC37B787_WDT is not set
|
||||
# CONFIG_SND_AD1816A is not set
|
||||
# CONFIG_SND_AD1848 is not set
|
||||
# CONFIG_SND_ADLIB is not set
|
||||
# CONFIG_SND_ALS100 is not set
|
||||
# CONFIG_SND_ALS4000 is not set
|
||||
# CONFIG_SND_AZT2320 is not set
|
||||
# CONFIG_SND_CMI8330 is not set
|
||||
# CONFIG_SND_CS4231 is not set
|
||||
# CONFIG_SND_CS4232 is not set
|
||||
# CONFIG_SND_CS4236 is not set
|
||||
# CONFIG_SND_CS5535AUDIO is not set
|
||||
# CONFIG_SND_DT019X is not set
|
||||
# CONFIG_SND_ES1688 is not set
|
||||
# CONFIG_SND_ES18XX is not set
|
||||
# CONFIG_SND_ES968 is not set
|
||||
# CONFIG_SND_GUSCLASSIC is not set
|
||||
# CONFIG_SND_GUSEXTREME is not set
|
||||
# CONFIG_SND_GUSMAX is not set
|
||||
# CONFIG_SND_INTERWAVE is not set
|
||||
# CONFIG_SND_INTERWAVE_STB is not set
|
||||
# CONFIG_SND_MIRO is not set
|
||||
# CONFIG_SND_OPL3SA2 is not set
|
||||
# CONFIG_SND_OPTI92X_AD1848 is not set
|
||||
# CONFIG_SND_OPTI92X_CS4231 is not set
|
||||
# CONFIG_SND_OPTI93X is not set
|
||||
# CONFIG_SND_RTCTIMER is not set
|
||||
# CONFIG_SND_SB16 is not set
|
||||
# CONFIG_SND_SB8 is not set
|
||||
# CONFIG_SND_SBAWE is not set
|
||||
# CONFIG_SND_SGALAXY is not set
|
||||
# CONFIG_SND_SSCAPE is not set
|
||||
# CONFIG_SND_USB_USX2Y is not set
|
||||
# CONFIG_SND_WAVEFRONT is not set
|
||||
CONFIG_SOFT_WATCHDOG=m
|
||||
CONFIG_SPARSEMEM_STATIC=y
|
||||
# CONFIG_TCIC is not set
|
||||
# CONFIG_TELCLOCK is not set
|
||||
# CONFIG_TOSHIBA is not set
|
||||
# CONFIG_TYPHOON is not set
|
||||
CONFIG_UID16=y
|
||||
# CONFIG_UNUSED_SYMBOLS is not set
|
||||
# CONFIG_UNWIND_INFO is not set
|
||||
# CONFIG_USBPCWATCHDOG is not set
|
||||
CONFIG_USB_EHCI_HCD=m
|
||||
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
|
||||
# CONFIG_USB_EHCI_SPLIT_ISO is not set
|
||||
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
|
||||
# CONFIG_USB_STORAGE_ISD200 is not set
|
||||
CONFIG_USB_UHCI_HCD=m
|
||||
CONFIG_VIA_RHINE=m
|
||||
# CONFIG_VIA_RHINE_MMIO is not set
|
||||
CONFIG_VIA_RHINE_NAPI=y
|
||||
# CONFIG_VM86 is not set
|
||||
# CONFIG_VMSPLIT_1G is not set
|
||||
# CONFIG_VMSPLIT_2G is not set
|
||||
CONFIG_VMSPLIT_3G=y
|
||||
# CONFIG_VMSPLIT_3G_OPT is not set
|
||||
CONFIG_VORTEX=m
|
||||
# CONFIG_W83627HF_WDT is not set
|
||||
# CONFIG_W83697HF_WDT is not set
|
||||
# CONFIG_W83877F_WDT is not set
|
||||
# CONFIG_W83977F_WDT is not set
|
||||
# CONFIG_WAFER_WDT is not set
|
||||
# CONFIG_WAVELAN is not set
|
||||
# CONFIG_WDT is not set
|
||||
CONFIG_X86=y
|
||||
CONFIG_X86_32=y
|
||||
CONFIG_X86_ALIGNMENT_16=y
|
||||
# CONFIG_X86_BIGSMP is not set
|
||||
CONFIG_X86_BIOS_REBOOT=y
|
||||
CONFIG_X86_BSWAP=y
|
||||
CONFIG_X86_CMPXCHG=y
|
||||
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
|
||||
# CONFIG_X86_CPUID is not set
|
||||
# CONFIG_X86_ELAN is not set
|
||||
# CONFIG_X86_ES7000 is not set
|
||||
CONFIG_X86_F00F_BUG=y
|
||||
# CONFIG_X86_GENERIC is not set
|
||||
# CONFIG_X86_GENERICARCH is not set
|
||||
CONFIG_X86_GX_SUSPMOD=m
|
||||
CONFIG_X86_INVLPG=y
|
||||
CONFIG_X86_L1_CACHE_SHIFT=4
|
||||
# CONFIG_X86_LONGRUN is not set
|
||||
# CONFIG_X86_MCE is not set
|
||||
# CONFIG_X86_MSR is not set
|
||||
# CONFIG_X86_NUMAQ is not set
|
||||
# CONFIG_X86_P4_CLOCKMOD is not set
|
||||
CONFIG_X86_PC=y
|
||||
CONFIG_X86_POPAD_OK=y
|
||||
# CONFIG_X86_POWERNOW_K6 is not set
|
||||
# CONFIG_X86_POWERNOW_K7 is not set
|
||||
# CONFIG_X86_POWERNOW_K8 is not set
|
||||
CONFIG_X86_PPRO_FENCE=y
|
||||
# CONFIG_X86_REBOOTFIXUPS is not set
|
||||
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
|
||||
# CONFIG_X86_SPEEDSTEP_ICH is not set
|
||||
# CONFIG_X86_SPEEDSTEP_LIB is not set
|
||||
# CONFIG_X86_SPEEDSTEP_SMI is not set
|
||||
# CONFIG_X86_SUMMIT is not set
|
||||
# CONFIG_X86_UP_APIC is not set
|
||||
# CONFIG_X86_VISWS is not set
|
||||
# CONFIG_X86_VOYAGER is not set
|
||||
CONFIG_X86_WP_WORKS_OK=y
|
||||
CONFIG_X86_XADD=y
|
@ -1,320 +0,0 @@
|
||||
SCx200 High Resolution Timer Patch for Linux 2.6
|
||||
http://www.gnusto.com/scx200-hr-timer.html
|
||||
|
||||
diff -Naurp linux-2.6.12-rc6.orig/arch/i386/Kconfig linux-2.6.12-rc6/arch/i386/Kconfig
|
||||
--- linux-2.6.12-rc6.orig/arch/i386/Kconfig 2005-06-07 14:56:02.000000000 +0100
|
||||
+++ linux-2.6.12-rc6/arch/i386/Kconfig 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -458,6 +458,17 @@ config HPET_EMULATE_RTC
|
||||
bool "Provide RTC interrupt"
|
||||
depends on HPET_TIMER && RTC=y
|
||||
|
||||
+config SCx200HR_TIMER
|
||||
+ bool "NatSemi SCx200 27MHz High-Resolution Timer Support"
|
||||
+ help
|
||||
+ Some of the AMD (formerly National Semiconductor) Geode
|
||||
+ processors, notably the SC1100, suffer from a buggy time
|
||||
+ stamp counter which causes them to lose time when the
|
||||
+ processor is sleeping. Enable this option to use the
|
||||
+ on-board 27Mz high-resolution timer to keep time instead.
|
||||
+ depends on (SCx200)
|
||||
+ default n
|
||||
+
|
||||
config SMP
|
||||
bool "Symmetric multi-processing support"
|
||||
---help---
|
||||
diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/scx200.c linux-2.6.12-rc6/arch/i386/kernel/scx200.c
|
||||
--- linux-2.6.12-rc6.orig/arch/i386/kernel/scx200.c 2005-06-07 14:56:02.000000000 +0100
|
||||
+++ linux-2.6.12-rc6/arch/i386/kernel/scx200.c 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -27,6 +27,10 @@ long scx200_gpio_shadow[2];
|
||||
|
||||
unsigned scx200_cb_base = 0;
|
||||
|
||||
+#ifdef CONFIG_SCx200HR_TIMER
|
||||
+extern void __devinit scx200hr_timer_enable(void);
|
||||
+#endif
|
||||
+
|
||||
static struct pci_device_id scx200_tbl[] = {
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) },
|
||||
{ PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) },
|
||||
@@ -83,6 +87,9 @@ static int __devinit scx200_probe(struct
|
||||
printk(KERN_INFO NAME ": Configuration Block base 0x%x\n", scx200_cb_base);
|
||||
}
|
||||
|
||||
+#ifdef CONFIG_SCx200HR_TIMER
|
||||
+ scx200hr_timer_enable();
|
||||
+#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/timers/Makefile linux-2.6.12-rc6/arch/i386/kernel/timers/Makefile
|
||||
--- linux-2.6.12-rc6.orig/arch/i386/kernel/timers/Makefile 2004-03-11 18:21:13.000000000 +0000
|
||||
+++ linux-2.6.12-rc6/arch/i386/kernel/timers/Makefile 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -5,5 +5,6 @@
|
||||
obj-y := timer.o timer_none.o timer_tsc.o timer_pit.o common.o
|
||||
|
||||
obj-$(CONFIG_X86_CYCLONE_TIMER) += timer_cyclone.o
|
||||
+obj-$(CONFIG_SCx200HR_TIMER) += timer_scx200hr.o
|
||||
obj-$(CONFIG_HPET_TIMER) += timer_hpet.o
|
||||
obj-$(CONFIG_X86_PM_TIMER) += timer_pm.o
|
||||
diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer.c linux-2.6.12-rc6/arch/i386/kernel/timers/timer.c
|
||||
--- linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer.c 2004-12-26 14:07:37.000000000 +0000
|
||||
+++ linux-2.6.12-rc6/arch/i386/kernel/timers/timer.c 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -13,6 +13,9 @@
|
||||
#endif
|
||||
/* list of timers, ordered by preference, NULL terminated */
|
||||
static struct init_timer_opts* __initdata timers[] = {
|
||||
+#ifdef CONFIG_SCx200HR_TIMER
|
||||
+ &timer_scx200hr_init,
|
||||
+#endif
|
||||
#ifdef CONFIG_X86_CYCLONE_TIMER
|
||||
&timer_cyclone_init,
|
||||
#endif
|
||||
diff -Naurp linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer_scx200hr.c linux-2.6.12-rc6/arch/i386/kernel/timers/timer_scx200hr.c
|
||||
--- linux-2.6.12-rc6.orig/arch/i386/kernel/timers/timer_scx200hr.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-2.6.12-rc6/arch/i386/kernel/timers/timer_scx200hr.c 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -0,0 +1,220 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2005 Ted Phelps
|
||||
+ *
|
||||
+ * This is a clock driver for the Geode SCx200's 27MHz high-resolution
|
||||
+ * timer as the system clock replacing its buggy time stamp counter.
|
||||
+ *
|
||||
+ * Based on parts of timer_hpet.c, timer_tsc.c and timer_pit.c.
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU General Public License as
|
||||
+ * published by the Free Software Foundation; either version 2 of the
|
||||
+ * License, or (at your option) any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <asm/timer.h>
|
||||
+#include <linux/init.h>
|
||||
+#include <linux/pci.h>
|
||||
+#include <linux/seq_file.h>
|
||||
+#include <linux/scx200.h>
|
||||
+
|
||||
+#define NAME "scx200hr"
|
||||
+
|
||||
+/* Read the clock */
|
||||
+#define SCx200HR_CLOCK() inl(scx200_cb_base + SCx200_TIMER_OFFSET)
|
||||
+
|
||||
+/* High-resolution timer configuration address */
|
||||
+#define SCx200_TMCNFG_OFFSET (SCx200_TIMER_OFFSET + 5)
|
||||
+
|
||||
+/* Set this bit to disable the 27 MHz input clock */
|
||||
+#define HR_TM27MPD (1 << 2)
|
||||
+
|
||||
+/* Set this bit to update the count-up timer once per cycle of the
|
||||
+ * 27MHz timer, clear it to update the timer once every 27 cycles
|
||||
+ * (effectively producing a 1MHz counter) */
|
||||
+#define HR_TMCLKSEL (1 << 1)
|
||||
+
|
||||
+/* Set this bit to enable the high-resolution timer interrupt */
|
||||
+#define HR_TMEN (1 << 0)
|
||||
+
|
||||
+/* The frequency of the timer. Change this to 27000000 and set
|
||||
+ * HR_TMCLKSEL in scx200hr_enable to run at the faster clock rate. At
|
||||
+ * this point in time there is no point in doing so since times are
|
||||
+ * recorded in usec except for the monotonic clock, which is only used
|
||||
+ * by the hangcheck-timer. */
|
||||
+#define HR_FREQ 1000000
|
||||
+
|
||||
+/* The number of cycles of the high-resolution timer we expect to see
|
||||
+ * in a single tick. Note that the result is <<8 for greater precision*/
|
||||
+#define HR_CYCLES_PER_TICK \
|
||||
+ (SH_DIV(HR_FREQ / 1000000 * TICK_NSEC, 1000, 8))
|
||||
+
|
||||
+/* The number of cycles of the high-resolution timer we expect to see
|
||||
+ * in one microsecond, <<8 */
|
||||
+#define HR_CYCLES_PER_US ((HR_FREQ / 1000000) << 8)
|
||||
+
|
||||
+
|
||||
+/* The value of the timer at the last interrupt */
|
||||
+static u32 clock_at_last_interrupt;
|
||||
+
|
||||
+/* The number of high-resolution clock cycles beyond what we would
|
||||
+ have expected that the last tick occurred, <<8 for greater precision */
|
||||
+static long clock_delay;
|
||||
+
|
||||
+/* The total number of timer nanoseconds between the time the timer
|
||||
+ * went live and the most recent tick. */
|
||||
+static unsigned long long total_ns;
|
||||
+
|
||||
+/* A lock to guard access to the monotonic clock-related variables
|
||||
+ * (total_ns and clocal_at_last_interrupt). Note that these are also
|
||||
+ * protected by the xtime lock. */
|
||||
+static seqlock_t hr_lock = SEQLOCK_UNLOCKED;
|
||||
+
|
||||
+/* Nonzero if the timer has been selected */
|
||||
+static int enable_scx200hr;
|
||||
+
|
||||
+static int __init scx200hr_init(char *override)
|
||||
+{
|
||||
+ /* Watch for a command-line clock= override */
|
||||
+ if (override[0] && strncmp(override, NAME, sizeof(NAME) - 1) != 0) {
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ /* Note that we should try to enable this timer once the
|
||||
+ * configuration block address is known */
|
||||
+ printk(KERN_WARNING NAME ": timer not yet accessible; will probe later.\n");
|
||||
+ enable_scx200hr = 1;
|
||||
+ return -EAGAIN;
|
||||
+}
|
||||
+
|
||||
+/* Called by the timer interrupt. The xtime_lock will be held. */
|
||||
+static void mark_offset_scx200hr(void)
|
||||
+{
|
||||
+ u32 now, delta;
|
||||
+
|
||||
+ /* Avoid races between the interrupt handler and monotonic_clock */
|
||||
+ write_seqlock(&hr_lock);
|
||||
+
|
||||
+ /* Determine how many cycles have elapsed since the last interrupt */
|
||||
+ now = SCx200HR_CLOCK();
|
||||
+ delta = (now - clock_at_last_interrupt) << 8;
|
||||
+ clock_at_last_interrupt = now;
|
||||
+
|
||||
+ /* Update the total us count and remainder */
|
||||
+ total_ns += (delta * 1000) / HR_CYCLES_PER_US;
|
||||
+
|
||||
+ /* The monotonic clock is safe now */
|
||||
+ write_sequnlock(&hr_lock);
|
||||
+
|
||||
+ /* Adjust for interrupt handling delay */
|
||||
+ delta += clock_delay;
|
||||
+
|
||||
+ /* The high-resolution timer is driven by a different crystal
|
||||
+ * to the main CPU, so there's no guarantee that the 1KHz
|
||||
+ * interrupt rate will coincide with the timer. This keeps
|
||||
+ * the jiffies count in line with the high-resolution timer,
|
||||
+ * which makes it possible for NTP to do its magic */
|
||||
+ if (delta < HR_CYCLES_PER_TICK) {
|
||||
+#if 1
|
||||
+ /* Didn't go over 1000us: decrement jiffies to balance
|
||||
+ * out increment in do_timer. This will cause some
|
||||
+ * jitter if the frequency offset is large, as that
|
||||
+ * adjustment will be applied about 1ms late. */
|
||||
+ jiffies_64--;
|
||||
+ clock_delay = delta;
|
||||
+#else /* !1 */
|
||||
+ clock_delay = 0;
|
||||
+#endif /* 1 */
|
||||
+ } else if (delta < (HR_CYCLES_PER_TICK << 1) + (HR_CYCLES_PER_TICK >> 1)) {
|
||||
+ clock_delay = delta - HR_CYCLES_PER_TICK;
|
||||
+ } else {
|
||||
+ jiffies_64 += delta / HR_CYCLES_PER_TICK - 2;
|
||||
+ clock_delay = HR_CYCLES_PER_TICK + delta % HR_CYCLES_PER_TICK;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* Called by gettimeofday(). Returns the number of microseconds since
|
||||
+ * the last interrupt. This is called with the xtime_lock held.*/
|
||||
+static unsigned long get_offset_scx200hr(void)
|
||||
+{
|
||||
+ u32 delta;
|
||||
+
|
||||
+ /* Get the time now and determine how many cycles have
|
||||
+ * transpired since the interrupt, adjusting for timer
|
||||
+ * interrupt jitter. */
|
||||
+ delta = ((SCx200HR_CLOCK() - clock_at_last_interrupt) << 8) + clock_delay;
|
||||
+
|
||||
+ /* Convert from cycles<<8 to microseconds */
|
||||
+ return delta / HR_CYCLES_PER_US;
|
||||
+}
|
||||
+
|
||||
+/* Returns the number of nanoseconds since the init of the timer. */
|
||||
+static unsigned long long monotonic_clock_scx200hr(void)
|
||||
+{
|
||||
+ u32 delta, seq;
|
||||
+ unsigned long long ns;
|
||||
+
|
||||
+ /* This function is *not* called with xtime_lock held, so we
|
||||
+ * need to get the hr_lock to ensure we're not competing with
|
||||
+ * mark_offset_scx200hr. */
|
||||
+ do {
|
||||
+ seq = read_seqbegin(&hr_lock);
|
||||
+ ns = total_ns;
|
||||
+ delta = SCx200HR_CLOCK() - clock_at_last_interrupt;
|
||||
+ } while (read_seqretry(&hr_lock, seq));
|
||||
+
|
||||
+ /* Convert cycles to microseconds and add. */
|
||||
+ return ns + delta * 1000 / HR_CYCLES_PER_US;
|
||||
+}
|
||||
+
|
||||
+/* scx200hr timer_opts struct */
|
||||
+struct timer_opts timer_scx200hr = {
|
||||
+ .name = NAME,
|
||||
+ .mark_offset = mark_offset_scx200hr,
|
||||
+ .get_offset = get_offset_scx200hr,
|
||||
+ .monotonic_clock = monotonic_clock_scx200hr,
|
||||
+ .delay = NULL
|
||||
+};
|
||||
+
|
||||
+/* And the init_timer struct */
|
||||
+struct init_timer_opts __devinitdata timer_scx200hr_init = {
|
||||
+ .init = scx200hr_init,
|
||||
+ .opts = &timer_scx200hr
|
||||
+};
|
||||
+
|
||||
+
|
||||
+/* Switch from the original timer to the high-resolution timer */
|
||||
+void __devinit scx200hr_timer_enable(void)
|
||||
+{
|
||||
+ /* Make sure the timer was requested and that the
|
||||
+ * configuration block is present */
|
||||
+ if (!enable_scx200hr || !scx200_cb_present()) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Reserve the timer region for ourselves */
|
||||
+ if (!request_region(scx200_cb_base + SCx200_TIMER_OFFSET,
|
||||
+ SCx200_TIMER_SIZE,
|
||||
+ "NatSemi SCx200 High-Resolution Timer")) {
|
||||
+ printk(KERN_WARNING NAME ": unable to lock timer region\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* Configure the timer */
|
||||
+ outb(0, scx200_cb_base + SCx200_TMCNFG_OFFSET);
|
||||
+
|
||||
+ /* Record the current value of the timer. */
|
||||
+ clock_at_last_interrupt = SCx200HR_CLOCK();
|
||||
+
|
||||
+ /* Get the current value of the monotonic clock */
|
||||
+ total_ns = cur_timer->monotonic_clock();
|
||||
+
|
||||
+ /* Switch from the original timer functions to ours, but keep
|
||||
+ * the current delay function since loops_per_jiffy will have
|
||||
+ * been computed using that */
|
||||
+ timer_scx200hr.delay = cur_timer->delay;
|
||||
+ cur_timer = &timer_scx200hr;
|
||||
+
|
||||
+ printk(KERN_INFO "switching to scx200 high-resolution timer (%lu cpt)\n",
|
||||
+ HR_CYCLES_PER_TICK);
|
||||
+}
|
||||
diff -Naurp linux-2.6.12-rc6.orig/include/asm-i386/timer.h linux-2.6.12-rc6/include/asm-i386/timer.h
|
||||
--- linux-2.6.12-rc6.orig/include/asm-i386/timer.h 2005-06-07 14:56:11.000000000 +0100
|
||||
+++ linux-2.6.12-rc6/include/asm-i386/timer.h 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -50,6 +50,9 @@ extern struct init_timer_opts timer_tsc_
|
||||
#ifdef CONFIG_X86_CYCLONE_TIMER
|
||||
extern struct init_timer_opts timer_cyclone_init;
|
||||
#endif
|
||||
+#ifdef CONFIG_SCx200HR_TIMER
|
||||
+extern struct init_timer_opts timer_scx200hr_init;
|
||||
+#endif
|
||||
|
||||
extern unsigned long calibrate_tsc(void);
|
||||
extern void init_cpu_khz(void);
|
||||
diff -Naurp linux-2.6.12-rc6.orig/include/linux/scx200.h linux-2.6.12-rc6/include/linux/scx200.h
|
||||
--- linux-2.6.12-rc6.orig/include/linux/scx200.h 2005-06-07 14:56:11.000000000 +0100
|
||||
+++ linux-2.6.12-rc6/include/linux/scx200.h 2005-06-07 16:43:19.000000000 +0100
|
||||
@@ -32,7 +32,7 @@ extern unsigned scx200_cb_base;
|
||||
|
||||
/* High Resolution Timer */
|
||||
#define SCx200_TIMER_OFFSET 0x08
|
||||
-#define SCx200_TIMER_SIZE 0x05
|
||||
+#define SCx200_TIMER_SIZE 0x06
|
||||
|
||||
/* Clock Generators */
|
||||
#define SCx200_CLOCKGEN_OFFSET 0x10
|
Loading…
Reference in New Issue
Block a user