diff options
93 files changed, 33103 insertions, 18691 deletions
diff --git a/target/linux/aruba-2.6/Makefile b/target/linux/aruba-2.6/Makefile index e852adea10..992f51c70c 100644 --- a/target/linux/aruba-2.6/Makefile +++ b/target/linux/aruba-2.6/Makefile @@ -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 diff --git a/target/linux/aruba-2.6/config b/target/linux/aruba-2.6/config index 9aafb36b70..7c6ceff236 100644 --- a/target/linux/aruba-2.6/config +++ b/target/linux/aruba-2.6/config @@ -1,1097 +1,1039 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Fri Aug 25 11:20:17 2006 -# -CONFIG_MIPS=y - -# -# Machine selection -# -# CONFIG_MIPS_MTX1 is not set -# CONFIG_MIPS_BOSPORUS is not set -# CONFIG_MIPS_PB1000 is not set -# CONFIG_MIPS_PB1100 is not set -# CONFIG_MIPS_PB1500 is not set -# CONFIG_MIPS_PB1550 is not set -# CONFIG_MIPS_PB1200 is not set -# CONFIG_MIPS_DB1000 is not set -# CONFIG_MIPS_DB1100 is not set -# CONFIG_MIPS_DB1500 is not set -# CONFIG_MIPS_DB1550 is not set -# CONFIG_MIPS_DB1200 is not set -# CONFIG_MIPS_MIRAGE 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_ARUBA=y -# CONFIG_MACH_JAZZ is not set -# CONFIG_LASAT is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MIPS_SIM 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_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_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_SWARM is not set -# CONFIG_SIBYTE_SENTOSA is not set -# CONFIG_SIBYTE_RHONE is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_PTSWARM is not set -# CONFIG_SIBYTE_LITTLESUR is not set -# CONFIG_SIBYTE_CRHINE is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_JMR3927 is not set -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_DMA_NEED_PCI_MAP_STATE=y +CONFIG_32BIT=y +# CONFIG_64BIT is not set +# CONFIG_64BIT_PHYS_ADDR is not set +# CONFIG_6PACK is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_9P_FS is not set +# CONFIG_ACENIC is not set +# CONFIG_ACORN_PARTITION is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_AIRO=m +CONFIG_AIRO_CS=m +# CONFIG_AMD8111_ETH is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_APPLICOM is not set +CONFIG_AR2313=y +CONFIG_ARCH_FLATMEM_ENABLE=y +# CONFIG_ARCNET is not set +CONFIG_ARPD=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_ATA is not set +# CONFIG_ATALK is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_ATM=m +CONFIG_ATMEL=m +# CONFIG_ATM_AMBASSADOR is not set +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_DUMMY=m +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_LANAI is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +# CONFIG_ATM_NICSTAR is not set +CONFIG_ATM_TCP=m +# CONFIG_ATM_ZATM is not set +# CONFIG_AUDIT is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_B44 is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BASE_FULL=y +CONFIG_BASE_SMALL=0 +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +CONFIG_BCM43XX_PIO=y +# CONFIG_BCM43XX_PIO_MODE is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_DAC960 is not set +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_SD=m +# CONFIG_BLK_DEV_SR is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLOCK=y +# CONFIG_BNX2 is not set +CONFIG_BONDING=m +# CONFIG_BPQETHER is not set +CONFIG_BRIDGE=y +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BROKEN_ON_SMP=y +CONFIG_BSD_DISKLABEL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_BT=m +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBPA10X=m +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIDTL1 is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIVHCI=m +CONFIG_BT_HIDP=m +CONFIG_BT_L2CAP=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_SCO=m +CONFIG_BUG=y +CONFIG_CARDBUS=y +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_CASSINI is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_CHELSIO_T1 is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CICADA_PHY is not set +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CLS_U32_MARK=y +CONFIG_CLS_U32_PERF=y +CONFIG_CMDLINE="" +# CONFIG_CODA_FS is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_CONNECTOR is not set 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_SYS_SUPPORTS_BIG_ENDIAN=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_MIPS_L1_CACHE_SHIFT=5 - -# -# CPU selection -# +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_TX39XX is not set -# CONFIG_CPU_VR41XX is not set # CONFIG_CPU_R4300 is not set # CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set # CONFIG_CPU_R5000 is not set # CONFIG_CPU_R5432 is not set # CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set # CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_MIPS32_R1=y -CONFIG_CPU_MIPS32=y -CONFIG_CPU_MIPSR1=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y - -# -# Kernel type -# -CONFIG_32BIT=y -# CONFIG_64BIT is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set -# 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_64BIT_PHYS_ADDR is not set -CONFIG_CPU_HAS_LLSC=y -CONFIG_CPU_HAS_SYNC=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CRAMFS is not set +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +CONFIG_CROSSCOMPILE=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_WP512=m +# CONFIG_DAVICOM_PHY is not set +# CONFIG_DDB5477 is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DECNET is not set +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_BIC is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_CUBIC is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_HTCP is not set +CONFIG_DEFAULT_IOSCHED="deadline" +# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="vegas" +CONFIG_DEFAULT_VEGAS=y +# CONFIG_DEFAULT_WESTWOOD is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DGRS is not set # CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_DL2K is not set +# CONFIG_DM9000 is not set +# CONFIG_DMA_ENGINE is not set +CONFIG_DMA_NEED_PCI_MAP_STATE=y +CONFIG_DMA_NONCOHERENT=y +# CONFIG_DNOTIFY is not set +# CONFIG_DRM is not set +# CONFIG_DTLK is not set +# CONFIG_DUMMY is not set +# CONFIG_DVB is not set +# CONFIG_E100 is not set +# CONFIG_E1000 is not set +# CONFIG_ECONET is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EFS_FS is not set +# CONFIG_ELF_CORE is not set +CONFIG_EMBEDDED=y +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_EPIC100 is not set +CONFIG_EPOLL=y +# CONFIG_EQUALIZER is not set +CONFIG_EXPERIMENTAL=y +CONFIG_EXPORTFS=m +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# 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_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_FAT_FS=m +# CONFIG_FB is not set +# CONFIG_FDDI is not set +# CONFIG_FEALNX is not set +CONFIG_FIB_RULES=y +# CONFIG_FIRMWARE_EDID is not set CONFIG_FLATMEM=y +CONFIG_FLATMEM_MANUAL=y CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# 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_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -# CONFIG_ELF_CORE is not set -CONFIG_BASE_FULL=y +# CONFIG_FORCEDETH is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_FTL is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set +# CONFIG_FUSION_SPI is not set CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Bus options (PCI, PCMCIA, EISA, ISA, TC) -# -CONFIG_HW_HAS_PCI=y -CONFIG_PCI=y -CONFIG_MMU=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# +CONFIG_FW_LOADER=y +CONFIG_GACT_PROB=y +# CONFIG_GAMEPORT is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_TIME=y +# CONFIG_GEN_RTC is not set +# CONFIG_GFS2_FS is not set +# CONFIG_HAMACHI is not set +CONFIG_HAMRADIO=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_HEADERS_CHECK is not set +# CONFIG_HERMES is not set +CONFIG_HFSPLUS_FS=m +CONFIG_HFS_FS=m +# CONFIG_HIPPI is not set +# CONFIG_HOSTAP is not set +CONFIG_HOSTAP_CS=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_PLX=m +CONFIG_HOTPLUG=y # CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_TRAD_SIGNALS=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m +# CONFIG_HP100 is not set +# CONFIG_HPFS_FS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set +CONFIG_HW_HAS_PCI=y +CONFIG_HW_RANDOM=y +CONFIG_HZ=100 +CONFIG_HZ_100=y +# CONFIG_HZ_1000 is not set +# 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_I2O is not set +# CONFIG_I82092 is not set +# CONFIG_IDE is not set +CONFIG_IDT_RC32434_ETH=y +# CONFIG_IEEE1394 is not set +# CONFIG_IEEE80211 is not set +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_DEBUG is not set +# CONFIG_IEEE80211_SOFTMAC is not set +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_IFB=m +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -# CONFIG_NET_IPGRE is not set -CONFIG_IPSEC_NAT_TRAVERSAL=y -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET_AH=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_INET_DIAG=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TCP_DIAG=m CONFIG_INET_TUNNEL=m -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_TUNNEL=m +# CONFIG_INFINIBAND is not set +# CONFIG_INFTL is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_INPUT is not set +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m +# CONFIG_IPC_NS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y CONFIG_IPV6=m +# CONFIG_IPV6_MIP6 is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -# CONFIG_INET6_TUNNEL is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set +CONFIG_IPV6_SIT=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE 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_STRING is not set -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y - -# -# IP: Netfilter Configuration -# +# CONFIG_IPW2100 is not set +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2100_MONITOR=y +# CONFIG_IPW2200 is not set +# CONFIG_IPW2200_DEBUG is not set +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPX is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_DCCP=m +CONFIG_IP_DCCP_ACKVEC=y +CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_CT_ACCT=y -# CONFIG_IP_NF_CONNTRACK_MARK is not set # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=y CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_IPP2P=m -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_IRC=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_TARGET_ROUTE=m -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_NAT_PPTP=m 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_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_TFTP=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_RAW=m CONFIG_IP_NF_SET=m -CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPHASH=m CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_IPTREE=m CONFIG_IP_NF_SET_MACIPMAP=m -CONFIG_IP_NF_SET_PORTMAP=m -CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_NETHASH=m -CONFIG_IP_NF_SET_IPTREE=m -CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_IMQ=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_TARGET_SET=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -# CONFIG_IP6_NF_IPTABLES is not set - -# -# Bridge: Netfilter Configuration -# -# CONFIG_BRIDGE_NF_EBTABLES is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# 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 - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -# CONFIG_NET_ACT_SIMP is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set +# CONFIG_IP_VS is not set # CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIVHCI is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -# CONFIG_FW_LOADER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISDN is not set +CONFIG_ISO9660_FS=m +# CONFIG_IXGB is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS_FS is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_JOLIET=y +# CONFIG_KALLSYMS is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_KEYS is not set +# CONFIG_KMOD is not set +# CONFIG_LAN_SAA9730 is not set +# CONFIG_LAPB is not set +# CONFIG_LASAT is not set +# CONFIG_LBD is not set +# CONFIG_LDM_PARTITION is not set +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_TIMER=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_LIBCRC32C=m +CONFIG_LLC=y +CONFIG_LLC2=m +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCKD=m +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_LOCKD_V4=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_LSF is not set +# CONFIG_LXT_PHY 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_MAC_PARTITION=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MARKEINS is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_MD is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_SAS is not set +CONFIG_MII=y +CONFIG_MINIX_FS=m +# CONFIG_MINIX_SUBPARTITION 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_MKISS=m +# CONFIG_MMC is not set +CONFIG_MMU=y +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODVERSIONS 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_MSDOS_FS=m +CONFIG_MSDOS_PARTITION=y CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y +# CONFIG_MTD_ABSENT is not set CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# +# CONFIG_MTD_BLOCK2MTD is not set CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y +CONFIG_MTD_CFI_AMDSTD=y # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set # CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 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_OTP is not set # CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y +# 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# +CONFIG_MTD_CHAR=y +CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_COMPLEX_MAPPINGS=y -CONFIG_MTD_PHYSMAP=y -CONFIG_MTD_PHYSMAP_START=0x1fc00000 -CONFIG_MTD_PHYSMAP_LEN=0x400000 -CONFIG_MTD_PHYSMAP_BANKWIDTH=1 -# CONFIG_MTD_PCI is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# +# 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 - -# -# NAND Flash Device Drivers -# +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 - -# -# OneNAND Flash Device Drivers -# +# CONFIG_MTD_OBSOLETE_CHIPS is not set # CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# +# 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_MYRI10GE is not set +CONFIG_NATSEMI=y +# CONFIG_NCP_FS is not set +# CONFIG_NE2K_PCI is not set +CONFIG_NET=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETDEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +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 +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=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +# CONFIG_NETPOLL is not set +# CONFIG_NETROM is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_ACT_GACT=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_POLICE=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS=y +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_CLS_POLICE=y +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_U32=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_ESTIMATOR=y +CONFIG_NET_ETHERNET=y +# CONFIG_NET_FC is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_NET_IPIP=m +CONFIG_NET_KEY=m +CONFIG_NET_PCI=y +# CONFIG_NET_PCMCIA is not set +CONFIG_NET_PKTGEN=m +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NET_RADIO=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_CBQ=m +# CONFIG_NET_SCH_CLK_CPU is not set +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +CONFIG_NET_SCH_CLK_JIFFIES=y +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_TEQL=m +# CONFIG_NET_TULIP is not set +# CONFIG_NET_VENDOR_3COM is not set +CONFIG_NET_WIRELESS=y +CONFIG_NET_WIRELESS_RTNETLINK=y +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_TCP=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFS_COMMON=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFTL is not set +CONFIG_NLS=m +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_ISO8859_9 is not set +CONFIG_NLS_KOI8_R=m +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m +CONFIG_NORTEL_HERMES=m +# CONFIG_NS83820 is not set +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +# CONFIG_OCFS2_FS is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# 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_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_PCCARD is not set +CONFIG_PCCARD_NONSTATIC=m +CONFIG_PCI=y +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_PCI_ATMEL is not set +# CONFIG_PCI_HERMES is not set +# CONFIG_PCMCIA is not set +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_ATMEL is not set +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_HERMES is not set +# CONFIG_PCMCIA_IOCTL is not set +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_RAYCS is not set +# CONFIG_PCMCIA_SPECTRUM is not set +# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_WL3501 is not set +# CONFIG_PCNET32 is not set +# CONFIG_PD6729 is not set +# CONFIG_PHONE is not set +# CONFIG_PHYLIB is not set +CONFIG_PLIST=y +CONFIG_PLX_HERMES=m +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_V2PCI is not set +# CONFIG_POSIX_MQUEUE is not set +CONFIG_PPP=m +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_PRINTK=y +# CONFIG_PRINTK_TIME is not set +CONFIG_PRISM54=m +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROFILING is not set +# CONFIG_QEMU is not set +# CONFIG_QLA3XXX is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_R3964 is not set +# CONFIG_R8169 is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MAXIRADIO is not set # CONFIG_RAID_ATTRS is not set +CONFIG_RAMFS=y +# CONFIG_RAW_DRIVER is not set +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_RELAY is not set +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_RFD_FTL is not set +CONFIG_ROMFS_FS=m +# CONFIG_ROSE is not set +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_RTC is not set +# CONFIG_RTC_CLASS is not set +CONFIG_RT_MUTEXES=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_S2IO is not set +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_SCSI=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# 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 - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set -# CONFIG_SCSI_ACARD is not set # CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O 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_AIC94XX is not set +# CONFIG_SCSI_ARCMSR is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_FUTURE_DOMAIN is not set -# CONFIG_SCSI_IPS is not set -# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_HPTIOP is not set # CONFIG_SCSI_INIA100 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_INITIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_LOGGING is not set # CONFIG_SCSI_LPFC is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_NETLINK is not set # CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_IFB is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_IMQ=m -# CONFIG_IMQ_BEHAVIOR_AA is not set -# CONFIG_IMQ_BEHAVIOR_AB is not set -CONFIG_IMQ_BEHAVIOR_BA=y -# CONFIG_IMQ_BEHAVIOR_BB is not set -CONFIG_IMQ_NUM_DEVS=2 -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_AR2313=y -CONFIG_IDT_RC32434_ETH=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_DM9000 is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=y -# CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -# CONFIG_VIA_RHINE is not set -# CONFIG_LAN_SAA9730 is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -# CONFIG_BCM43XX is not set -CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=m - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# +CONFIG_SCSI_PROC_FS=y +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_STEX is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SECURITY is not set +CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_CS=m +# CONFIG_SERIAL_8250_EXTENDED is not set CONFIG_SERIAL_8250_NR_UARTS=2 +# CONFIG_SERIAL_8250_PCI is not set CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# CONFIG_SERIAL_CORE=y CONFIG_SERIAL_CORE_CONSOLE=y # CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -# CONFIG_VIDEO_V4L1 is not set -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -# CONFIG_VIDEO_CPIA2 is not set - -# -# Encoders and Decoders -# - -# -# V4L USB devices -# - -# -# Radio Adapters -# - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_SERIO is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_SHAPER is not set +CONFIG_SHMEM=y +# 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_SK98LIN is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +CONFIG_SLAB=y +CONFIG_SLHC=m +# CONFIG_SLIP is not set +# CONFIG_SLOB is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# PCI devices -# # CONFIG_SND_AD1889 is not set -# CONFIG_SND_ALS300 is not set # CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ALS300 is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set @@ -1103,6 +1045,12 @@ CONFIG_SND_RAWMIDI=m # 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_DARLA24 is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_ECHO3G is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set @@ -1110,438 +1058,325 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set # CONFIG_SND_FM801 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_GINA24 is not set # CONFIG_SND_HDA_INTEL is not set # CONFIG_SND_HDSP is not set # CONFIG_SND_HDSPM is not set +CONFIG_SND_HWDEP=m # CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIO is not set # CONFIG_SND_INTEL8X0 is not set # CONFIG_SND_INTEL8X0M is not set # CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_LAYLA24 is not set # CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIA is not set # CONFIG_SND_MIXART is not set +CONFIG_SND_MIXER_OSS=m +# CONFIG_SND_MONA is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_MTPAV is not set # CONFIG_SND_NM256 is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y # CONFIG_SND_PCXHR is not set +# CONFIG_SND_PDAUDIOCF is not set +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 is not set +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_SERIAL_U16550 is not set # CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_TIMER=m # CONFIG_SND_TRIDENT is not set +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VIA82XX is not set # CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VX222 is not set +# CONFIG_SND_VXPOCKET is not set # CONFIG_SND_YMFPCI is not set - -# -# ALSA MIPS devices -# - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m - -# -# Open Sound System -# +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +CONFIG_SOUND=m # CONFIG_SOUND_PRIME is not set - -# -# USB support -# +# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_SSFDC is not set +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_STANDALONE=y +# CONFIG_STRIP is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNGEM is not set +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +# CONFIG_SUN_PARTITION is not set +CONFIG_SWAP=y +CONFIG_SWAP_IO_SPACE=y +# CONFIG_SYNCLINK_CS is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_SYSCTL=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +# CONFIG_SYSV_FS is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +# CONFIG_SYS_HYPERVISOR is not set +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y +# CONFIG_TASKSTATS is not set +# CONFIG_TCG_TPM is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_TEXTSEARCH_KMP=m +# CONFIG_TIFM_CORE is not set +# CONFIG_TIGON3 is not set +# CONFIG_TINY_SHMEM is not set +# CONFIG_TIPC is not set +# CONFIG_TLAN is not set +CONFIG_TMD_HERMES=m +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +# CONFIG_TR is not set +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TRAD_SIGNALS=y +CONFIG_TUN=m +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y +# CONFIG_UFS_FS is not set +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_UNIX=y +CONFIG_UNIX98_PTYS=y +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_USB=m +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_USB_ACECAD is not set +CONFIG_USB_ACM=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_APPLETOUCH is not set +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=m +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +CONFIG_USB_ATM=m +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_CATC=m +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_DABUSB is not set # CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set -CONFIG_USB_DYNAMIC_MINORS=y -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DYNAMIC_MINORS is not set CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_ISP116X_HCD is not set -# CONFIG_USB_OHCI_HCD is not set -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_EZUSB=y +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_GADGET is not set # CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_KAWETH=m # CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set # CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# +# CONFIG_USB_LCD is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LIBUSUAL is not set # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -# CONFIG_USB_SERIAL is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 is not set -# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_MOUSE is not set +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_OTG is not set +CONFIG_USB_PEGASUS=m +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_POWERMATE is not set +CONFIG_USB_PRINTER=m # 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_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set +CONFIG_USB_RTL8150=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_XIRCOM=m # CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set +# CONFIG_USB_SL811_HCD is not set +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_STORAGE=m +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_KARMA=y +# CONFIG_USB_STORAGE_ONETOUCH is not set +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_USBAT=y # CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_FS is not set -# CONFIG_OCFS2_FS is not set -CONFIG_MINI_FO=m -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set -# CONFIG_INOTIFY is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_USBNET=m +CONFIG_USB_USBNET_MII=m +# CONFIG_USB_WACOM is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_XUSBATM is not set +# CONFIG_USB_YEALINK is not set +CONFIG_USB_ZD1201=m +# CONFIG_UTS_NS is not set CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_VLAN_8021Q=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_VT is not set # CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=m -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set -CONFIG_NLS_KOI8_R=m -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set -CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="" - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y +# CONFIG_W1 is not set +# CONFIG_WAN is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_WDTPCI is not set +CONFIG_WIRELESS_EXT=y +# CONFIG_WR_PPMC is not set +# CONFIG_X25 is not set +CONFIG_XFRM=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_USER=m +CONFIG_XFS_FS=m +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_YAM is not set +# CONFIG_YELLOWFIN is not set +CONFIG_YENTA=m +# CONFIG_YENTA_O2 is not set +# CONFIG_YENTA_RICOH is not set +# CONFIG_YENTA_TI is not set +# CONFIG_YENTA_TOSHIBA is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/aruba-2.6/config-diff b/target/linux/aruba-2.6/config-diff new file mode 100644 index 0000000000..6bca030bdd --- /dev/null +++ b/target/linux/aruba-2.6/config-diff @@ -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 diff --git a/target/linux/aruba-2.6/patches/000-aruba.patch b/target/linux/aruba-2.6/patches/000-aruba.patch index 1db6831f4c..2b5fb34d15 100644 --- a/target/linux/aruba-2.6/patches/000-aruba.patch +++ b/target/linux/aruba-2.6/patches/000-aruba.patch @@ -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> diff --git a/target/linux/aruba-2.6/patches/001-flash.patch b/target/linux/aruba-2.6/patches/001-flash.patch index f0b951370d..78bfd3df32 100644 --- a/target/linux/aruba-2.6/patches/001-flash.patch +++ b/target/linux/aruba-2.6/patches/001-flash.patch @@ -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 */ - + diff --git a/target/linux/aruba-2.6/patches/002-irq.patch b/target/linux/aruba-2.6/patches/002-irq.patch index 137f18d588..cc5ea84c42 100644 --- a/target/linux/aruba-2.6/patches/002-irq.patch +++ b/target/linux/aruba-2.6/patches/002-irq.patch @@ -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; + } diff --git a/target/linux/aruba-2.6/patches/003-pci.patch b/target/linux/aruba-2.6/patches/003-pci.patch index 0cad12a087..1ab5da2d09 100644 --- a/target/linux/aruba-2.6/patches/003-pci.patch +++ b/target/linux/aruba-2.6/patches/003-pci.patch @@ -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> diff --git a/target/linux/aruba-2.6/patches/004-wdt.patch b/target/linux/aruba-2.6/patches/004-wdt.patch index 15fbffa043..2f034afbef 100644 --- a/target/linux/aruba-2.6/patches/004-wdt.patch +++ b/target/linux/aruba-2.6/patches/004-wdt.patch @@ -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> diff --git a/target/linux/aruba-2.6/patches/010-ar2313_enet.patch b/target/linux/aruba-2.6/patches/010-ar2313_enet.patch index d71d96f452..0488bd4548 100644 --- a/target/linux/aruba-2.6/patches/010-ar2313_enet.patch +++ b/target/linux/aruba-2.6/patches/010-ar2313_enet.patch @@ -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); diff --git a/target/linux/aruba-2.6/patches/012-ehci_softirq.patch b/target/linux/aruba-2.6/patches/012-ehci_softirq.patch index ae7f9f26c8..4c187d12b1 100644 --- a/target/linux/aruba-2.6/patches/012-ehci_softirq.patch +++ b/target/linux/aruba-2.6/patches/012-ehci_softirq.patch @@ -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); +} diff --git a/target/linux/au1000-2.6/Makefile b/target/linux/au1000-2.6/Makefile index 45b718135d..4daf61b370 100644 --- a/target/linux/au1000-2.6/Makefile +++ b/target/linux/au1000-2.6/Makefile @@ -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 diff --git a/target/linux/au1000-2.6/base-files/etc/config/network b/target/linux/au1000-2.6/base-files/etc/config/network deleted file mode 100644 index 9b65652f06..0000000000 --- a/target/linux/au1000-2.6/base-files/etc/config/network +++ /dev/null @@ -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 diff --git a/target/linux/au1000-2.6/base-files/sbin/mount_root b/target/linux/au1000-2.6/base-files/sbin/mount_root deleted file mode 100755 index 718394ca4c..0000000000 --- a/target/linux/au1000-2.6/base-files/sbin/mount_root +++ /dev/null @@ -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>&- diff --git a/target/linux/au1000-2.6/config b/target/linux/au1000-2.6/config index 6d22f69755..f90010309b 100644 --- a/target/linux/au1000-2.6/config +++ b/target/linux/au1000-2.6/config @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Sat Nov 18 18:50:53 2006 +# Linux kernel version: 2.6.19 +# Thu Dec 14 00:45:45 2006 # CONFIG_MIPS=y @@ -21,17 +21,16 @@ CONFIG_MIPS_MTX1=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_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 @@ -41,12 +40,11 @@ CONFIG_MIPS_MTX1=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 @@ -67,6 +65,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=y 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,17 +164,21 @@ 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=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y +# CONFIG_TASKSTATS is not set +# CONFIG_UTS_NS is not set # CONFIG_AUDIT is not set CONFIG_IKCONFIG=y CONFIG_IKCONFIG_PROC=y # CONFIG_RELAY is not set CONFIG_INITRAMFS_SOURCE="" # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y # CONFIG_KALLSYMS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y @@ -170,10 +189,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 @@ -183,11 +203,12 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y +# CONFIG_KMOD is not set # # Block layer # +CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set @@ -226,7 +247,7 @@ CONFIG_MMU=y # Executable file formats # CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_MISC=y +# CONFIG_BINFMT_MISC is not set CONFIG_TRAD_SIGNALS=y # CONFIG_PM is not set @@ -244,6 +265,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 @@ -260,17 +282,12 @@ CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m CONFIG_IP_ROUTE_MULTIPATH_DRR=m CONFIG_IP_ROUTE_VERBOSE=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_IP_PNP_BOOTP=y -CONFIG_IP_PNP_RARP=y +# CONFIG_IP_PNP is not set CONFIG_NET_IPIP=m CONFIG_NET_IPGRE=m CONFIG_NET_IPGRE_BROADCAST=y CONFIG_IPSEC_NAT_TRAVERSAL=y -CONFIG_IP_MROUTE=y -CONFIG_IP_PIMSM_V1=y -CONFIG_IP_PIMSM_V2=y +# CONFIG_IP_MROUTE is not set CONFIG_ARPD=y CONFIG_SYN_COOKIES=y CONFIG_INET_AH=m @@ -278,65 +295,52 @@ 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=y +CONFIG_TCP_CONG_BIC=m CONFIG_TCP_CONG_CUBIC=m CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TCP_CONG_HTCP=m CONFIG_TCP_CONG_HSTCP=m CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=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 # -CONFIG_IP_VS=m -# CONFIG_IP_VS_DEBUG is not set -CONFIG_IP_VS_TAB_BITS=12 - -# -# IPVS transport protocol load balancing support -# -CONFIG_IP_VS_PROTO_TCP=y -CONFIG_IP_VS_PROTO_UDP=y -CONFIG_IP_VS_PROTO_ESP=y -CONFIG_IP_VS_PROTO_AH=y - -# -# IPVS scheduler -# -CONFIG_IP_VS_RR=m -CONFIG_IP_VS_WRR=m -CONFIG_IP_VS_LC=m -CONFIG_IP_VS_WLC=m -CONFIG_IP_VS_LBLC=m -CONFIG_IP_VS_LBLCR=m -CONFIG_IP_VS_DH=m -CONFIG_IP_VS_SH=m -CONFIG_IP_VS_SED=m -CONFIG_IP_VS_NQ=m - -# -# IPVS application helper -# -CONFIG_IP_VS_FTP=m +# CONFIG_IP_VS is not set CONFIG_IPV6=m -CONFIG_IPV6_PRIVACY=y +# CONFIG_IPV6_PRIVACY is not set CONFIG_IPV6_ROUTER_PREF=y -CONFIG_IPV6_ROUTE_INFO=y +# CONFIG_IPV6_ROUTE_INFO is not set 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_IPV6_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 is not set +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=y @@ -348,14 +352,16 @@ CONFIG_BRIDGE_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 -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=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_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m CONFIG_NETFILTER_XT_MATCH_ESP=m CONFIG_NETFILTER_XT_MATCH_HELPER=m CONFIG_NETFILTER_XT_MATCH_LENGTH=m @@ -365,10 +371,12 @@ CONFIG_NETFILTER_XT_MATCH_MARK=m CONFIG_NETFILTER_XT_MATCH_POLICY=m CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m 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 @@ -379,7 +387,7 @@ CONFIG_IP_NF_CONNTRACK=y CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_CT_PROTO_SCTP=m CONFIG_IP_NF_FTP=m CONFIG_IP_NF_IRC=m # CONFIG_IP_NF_NETBIOS_NS is not set @@ -396,17 +404,16 @@ 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 -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_TARGET_REJECT=y -# CONFIG_IP_NF_TARGET_IMQ is not set +CONFIG_IP_NF_TARGET_IMQ=m CONFIG_IP_NF_TARGET_LOG=m CONFIG_IP_NF_TARGET_ULOG=m CONFIG_IP_NF_TARGET_TCPMSS=y @@ -415,8 +422,8 @@ CONFIG_IP_NF_NAT_NEEDED=y CONFIG_IP_NF_TARGET_MASQUERADE=y CONFIG_IP_NF_TARGET_REDIRECT=y CONFIG_IP_NF_TARGET_ROUTE=m -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_SAME=m # CONFIG_IP_NF_NAT_SNMP_BASIC is not set CONFIG_IP_NF_NAT_IRC=m CONFIG_IP_NF_NAT_FTP=m @@ -428,11 +435,12 @@ 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 -# CONFIG_IP_NF_ARPTABLES is not set +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_SET=m CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 @@ -450,22 +458,22 @@ CONFIG_IP_NF_TARGET_SET=m # CONFIG_IP6_NF_QUEUE=m CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_HL is not set +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m CONFIG_IP6_NF_MATCH_OWNER=m -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +CONFIG_IP6_NF_MATCH_IPV6HEADER=m CONFIG_IP6_NF_MATCH_AH=m CONFIG_IP6_NF_MATCH_EUI64=m CONFIG_IP6_NF_FILTER=m CONFIG_IP6_NF_TARGET_IMQ=m -# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_TARGET_LOG=m CONFIG_IP6_NF_TARGET_REJECT=m CONFIG_IP6_NF_TARGET_ROUTE=m CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_TARGET_HL is not set -# CONFIG_IP6_NF_RAW is not set +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_RAW=m # # Bridge: Netfilter Configuration @@ -502,25 +510,19 @@ CONFIG_IP_DCCP_ACKVEC=y # DCCP CCIDs Configuration (EXPERIMENTAL) # CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set CONFIG_IP_DCCP_CCID3=m CONFIG_IP_DCCP_TFRC_LIB=m # # SCTP Configuration (EXPERIMENTAL) # -CONFIG_IP_SCTP=m -# CONFIG_SCTP_DBG_MSG is not set -# CONFIG_SCTP_DBG_OBJCNT is not set -# CONFIG_SCTP_HMAC_NONE is not set -# CONFIG_SCTP_HMAC_SHA1 is not set -CONFIG_SCTP_HMAC_MD5=y +# CONFIG_IP_SCTP is not set # # TIPC Configuration (EXPERIMENTAL) # -CONFIG_TIPC=m -# CONFIG_TIPC_ADVANCED is not set -# CONFIG_TIPC_DEBUG is not set +# CONFIG_TIPC is not set # CONFIG_ATM is not set CONFIG_BRIDGE=y CONFIG_VLAN_8021Q=y @@ -531,7 +533,6 @@ CONFIG_LLC2=m # 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 @@ -588,7 +589,7 @@ CONFIG_GACT_PROB=y CONFIG_NET_ACT_MIRRED=m CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m +# CONFIG_NET_ACT_SIMP is not set CONFIG_NET_CLS_IND=y CONFIG_NET_ESTIMATOR=y @@ -606,7 +607,6 @@ CONFIG_BT_RFCOMM_TTY=y CONFIG_BT_BNEP=m CONFIG_BT_BNEP_MC_FILTER=y CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m # # Bluetooth device drivers @@ -628,6 +628,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 @@ -639,6 +640,7 @@ CONFIG_WIRELESS_EXT=y # CONFIG_STANDALONE is not set # CONFIG_PREVENT_FIRMWARE_BUILD is not set CONFIG_FW_LOADER=y +# CONFIG_SYS_HYPERVISOR is not set # # Connector - unified userspace <-> kernelspace linker @@ -664,6 +666,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 @@ -748,14 +751,18 @@ CONFIG_BLK_DEV_CRYPTOLOOP=m CONFIG_BLK_DEV_NBD=m # CONFIG_BLK_DEV_SX8 is not set # CONFIG_BLK_DEV_UB is not set -CONFIG_BLK_DEV_RAM=m -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_RAM is not set 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 # # CONFIG_IDE is not set @@ -765,6 +772,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 is not set # @@ -785,12 +793,13 @@ CONFIG_SCSI_CONSTANTS=y # 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 @@ -803,20 +812,23 @@ CONFIG_SCSI_CONSTANTS=y # 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 @@ -824,6 +836,11 @@ CONFIG_SCSI_CONSTANTS=y # CONFIG_SCSI_DEBUG is not set # +# Serial ATA (prod) and Parallel ATA (experimental) drivers +# +# CONFIG_ATA is not set + +# # Multi-device support (RAID and LVM) # # CONFIG_MD is not set @@ -850,7 +867,7 @@ CONFIG_SCSI_CONSTANTS=y # Network device support # CONFIG_NETDEVICES=y -# CONFIG_IFB is not set +CONFIG_IFB=m CONFIG_DUMMY=m CONFIG_BONDING=m # CONFIG_EQUALIZER is not set @@ -870,7 +887,19 @@ CONFIG_TUN=m # # PHY device support # -# CONFIG_PHYLIB is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_FIXED_PHY is not set # # Ethernet (10 or 100Mbit) @@ -890,7 +919,26 @@ CONFIG_MIPS_AU1X00_ENET=y # # CONFIG_NET_TULIP is not set # CONFIG_HP100 is not set -# CONFIG_NET_PCI is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_B44 is not set +# CONFIG_FORCEDETH is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +CONFIG_E100=m +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +# CONFIG_NE2K_PCI is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_LAN_SAA9730 is not set # # Ethernet (1000 Mbit) @@ -906,8 +954,10 @@ CONFIG_MIPS_AU1X00_ENET=y # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_SK98LIN is not set +# 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 +965,7 @@ CONFIG_MIPS_AU1X00_ENET=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 @@ -937,15 +988,17 @@ CONFIG_STRIP=m # CONFIG_IPW2100=m CONFIG_IPW2100_MONITOR=y -CONFIG_IPW2100_DEBUG=y +# CONFIG_IPW2100_DEBUG is not set CONFIG_IPW2200=m CONFIG_IPW2200_MONITOR=y -CONFIG_IPW_QOS=y -CONFIG_IPW2200_DEBUG=y +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_DEBUG is not set CONFIG_HERMES=m -# CONFIG_PLX_HERMES is not set +CONFIG_PLX_HERMES=m # CONFIG_TMD_HERMES is not set -# CONFIG_NORTEL_HERMES is not set +CONFIG_NORTEL_HERMES=m CONFIG_PCI_HERMES=m CONFIG_ATMEL=m CONFIG_PCI_ATMEL=m @@ -954,6 +1007,7 @@ CONFIG_PCI_ATMEL=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 @@ -966,6 +1020,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 # @@ -984,8 +1040,9 @@ CONFIG_PPP_BSDCOMP=m # CONFIG_PPP_MPPE is not set CONFIG_PPPOE=m # CONFIG_SLIP is not set +CONFIG_SLHC=m # CONFIG_NET_FC is not set -CONFIG_SHAPER=m +# CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set # CONFIG_NETPOLL is not set # CONFIG_NET_POLL_CONTROLLER is not set @@ -1003,25 +1060,7 @@ CONFIG_SHAPER=m # # Input device support # -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT is not set # # Hardware I/O ports @@ -1032,9 +1071,7 @@ CONFIG_INPUT=y # # Character devices # -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -CONFIG_HW_CONSOLE=y +# CONFIG_VT is not set # CONFIG_SERIAL_NONSTANDARD is not set # @@ -1084,6 +1121,7 @@ CONFIG_MTX1_WATCHDOG=y # USB-based Watchdog Cards # # CONFIG_USBPCWATCHDOG is not set +CONFIG_HW_RANDOM=y # CONFIG_RTC is not set # CONFIG_GEN_RTC is not set # CONFIG_DTLK is not set @@ -1100,7 +1138,6 @@ CONFIG_MTX1_WATCHDOG=y # TPM devices # # CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set # # I2C support @@ -1125,36 +1162,128 @@ CONFIG_MTX1_WATCHDOG=y # CONFIG_HWMON_VID is not set # -# Misc devices -# - -# # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices # # CONFIG_DVB is not set -CONFIG_USB_DABUSB=m +# CONFIG_USB_DABUSB is not set # # Graphics support # +# CONFIG_FIRMWARE_EDID is not set # CONFIG_FB is not set - -# -# Console display driver support -# -# CONFIG_VGA_CONSOLE is not set -CONFIG_DUMMY_CONSOLE=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set # # Sound # -# CONFIG_SOUND is not set +CONFIG_SOUND=m + +# +# Advanced Linux Sound Architecture +# +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set + +# +# Generic devices +# +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# PCI devices +# +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# 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 +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set + +# +# ALSA MIPS devices +# +# CONFIG_SND_AU1X00 is not set + +# +# USB devices +# +CONFIG_SND_USB_AUDIO=m + +# +# Open Sound System +# +# CONFIG_SOUND_PRIME is not set # # USB support @@ -1204,7 +1333,8 @@ CONFIG_USB_STORAGE_USBAT=y CONFIG_USB_STORAGE_SDDR09=y CONFIG_USB_STORAGE_SDDR55=y CONFIG_USB_STORAGE_JUMPSHOT=y -# CONFIG_USB_STORAGE_ALAUDA is not set +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_KARMA=y # CONFIG_USB_LIBUSUAL is not set # @@ -1215,26 +1345,12 @@ CONFIG_USB_STORAGE_JUMPSHOT=y # # USB HID Boot Protocol drivers # -# CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set -# CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set -# CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set # # USB Imaging devices # -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set # # USB Network Adapters @@ -1243,17 +1359,23 @@ CONFIG_USB_CATC=m CONFIG_USB_KAWETH=m CONFIG_USB_PEGASUS=m CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET_MII=m CONFIG_USB_USBNET=m CONFIG_USB_NET_AX8817X=m CONFIG_USB_NET_CDCETHER=m -# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_GL620A=m CONFIG_USB_NET_NET1080=m -# CONFIG_USB_NET_PLUSB is not set -# CONFIG_USB_NET_RNDIS_HOST is not set -# CONFIG_USB_NET_CDC_SUBSET is not set +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set CONFIG_USB_NET_ZAURUS=m -CONFIG_USB_ZD1201=m -CONFIG_USB_MON=y +# CONFIG_USB_MON is not set # # USB port drivers @@ -1264,9 +1386,9 @@ CONFIG_USB_MON=y # CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m CONFIG_USB_SERIAL_AIRPRIME=m -# CONFIG_USB_SERIAL_ANYDATA is not set -# CONFIG_USB_SERIAL_ARK3116 is not set +CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m CONFIG_USB_SERIAL_WHITEHEAT=m CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m @@ -1274,7 +1396,7 @@ CONFIG_USB_SERIAL_CP2101=m CONFIG_USB_SERIAL_CYPRESS_M8=m CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_FUNSOFT is not set +CONFIG_USB_SERIAL_FUNSOFT=m CONFIG_USB_SERIAL_VISOR=m CONFIG_USB_SERIAL_IPAQ=m CONFIG_USB_SERIAL_IR=m @@ -1283,37 +1405,57 @@ CONFIG_USB_SERIAL_EDGEPORT_TI=m CONFIG_USB_SERIAL_GARMIN=m CONFIG_USB_SERIAL_IPW=m CONFIG_USB_SERIAL_KEYSPAN_PDA=m -# CONFIG_USB_SERIAL_KEYSPAN is not set +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y CONFIG_USB_SERIAL_KLSI=m CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m -# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m CONFIG_USB_SERIAL_PL2303=m CONFIG_USB_SERIAL_HP4X=m CONFIG_USB_SERIAL_SAFE=m CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m CONFIG_USB_SERIAL_TI=m CONFIG_USB_SERIAL_CYBERJACK=m CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_SERIAL_OMNINET=m CONFIG_USB_EZUSB=y # # USB Miscellaneous drivers # -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -CONFIG_USB_LED=m -CONFIG_USB_CYTHERM=m -CONFIG_USB_PHIDGETKIT=m -CONFIG_USB_PHIDGETSERVO=m -CONFIG_USB_IDMOUSE=m -CONFIG_USB_LD=m -CONFIG_USB_TEST=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_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_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_TEST is not set # # USB DSL modem support @@ -1354,46 +1496,56 @@ CONFIG_USB_TEST=m # # Real Time Clock # -CONFIG_RTC_LIB=m -CONFIG_RTC_CLASS=m +# CONFIG_RTC_CLASS is not set + +# +# DMA Engine support +# +# CONFIG_DMA_ENGINE is not set # -# RTC interfaces +# DMA Clients # -CONFIG_RTC_INTF_SYSFS=m -CONFIG_RTC_INTF_PROC=m -CONFIG_RTC_INTF_DEV=m # -# RTC drivers +# DMA Devices # -# CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_TEST is not set # # File systems # -# CONFIG_EXT2_FS is not set +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# 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 is not set -# CONFIG_JFS_FS is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set CONFIG_FS_POSIX_ACL=y CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y # CONFIG_XFS_QUOTA is not set # 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 is not set +CONFIG_MINIX_FS=m CONFIG_ROMFS_FS=m CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y +# CONFIG_DNOTIFY is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set @@ -1425,11 +1577,13 @@ CONFIG_NTFS_RW=y # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y CONFIG_DEVFS_FS=y CONFIG_DEVFS_MOUNT=y -CONFIG_DEVFS_DEBUG=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=y @@ -1448,11 +1602,15 @@ CONFIG_HFSPLUS_FS=m CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 CONFIG_JFFS2_FS_WRITEBUFFER=y -CONFIG_JFFS2_SUMMARY=y -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +# 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 # CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set CONFIG_CRAMFS=m CONFIG_SQUASHFS=y # CONFIG_SQUASHFS_EMBEDDED is not set @@ -1467,32 +1625,32 @@ CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 # # Network File Systems # -CONFIG_NFS_FS=y +CONFIG_NFS_FS=m CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4=y # CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=y +CONFIG_NFSD=m CONFIG_NFSD_V3=y # CONFIG_NFSD_V3_ACL is not set CONFIG_NFSD_V4=y CONFIG_NFSD_TCP=y -# CONFIG_ROOT_NFS is not set -CONFIG_LOCKD=y +CONFIG_LOCKD=m CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=y +CONFIG_EXPORTFS=m CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=y -CONFIG_SUNRPC_GSS=y -CONFIG_RPCSEC_GSS_KRB5=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_RPCSEC_GSS_KRB5=m # CONFIG_RPCSEC_GSS_SPKM3 is not set CONFIG_SMB_FS=m # CONFIG_SMB_NLS_DEFAULT is not set CONFIG_CIFS=m CONFIG_CIFS_STATS=y # CONFIG_CIFS_STATS2 is not set -CONFIG_CIFS_XATTR=y -CONFIG_CIFS_POSIX=y +# 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 @@ -1502,13 +1660,28 @@ CONFIG_CIFS_POSIX=y # # Partition Types # -# CONFIG_PARTITION_ADVANCED is not set +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set # # Native Language Support # -CONFIG_NLS=y +CONFIG_NLS=m CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set @@ -1557,13 +1730,17 @@ CONFIG_NLS_UTF8=m # # Kernel hacking # +CONFIG_TRACE_IRQFLAGS_SUPPORT=y # CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_MUST_CHECK is not set CONFIG_MAGIC_SYSRQ=y +# 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="init=/etc/preinit" +CONFIG_CMDLINE="root=/dev/mtdblock0 rootfstype=jffs2" # # Security options @@ -1575,7 +1752,11 @@ CONFIG_CMDLINE="init=/etc/preinit" # Cryptographic options # CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_HMAC=m CONFIG_CRYPTO_NULL=m CONFIG_CRYPTO_MD4=m CONFIG_CRYPTO_MD5=y @@ -1584,9 +1765,12 @@ CONFIG_CRYPTO_SHA256=m CONFIG_CRYPTO_SHA512=m CONFIG_CRYPTO_WP512=m CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_CBC=y CONFIG_CRYPTO_DES=y CONFIG_CRYPTO_BLOWFISH=m CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m CONFIG_CRYPTO_SERPENT=m CONFIG_CRYPTO_AES=m CONFIG_CRYPTO_CAST5=m @@ -1617,3 +1801,4 @@ CONFIG_TEXTSEARCH=y CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m +CONFIG_PLIST=y diff --git a/target/linux/au1000-2.6/config-diff b/target/linux/au1000-2.6/config-diff new file mode 100644 index 0000000000..99d718efad --- /dev/null +++ b/target/linux/au1000-2.6/config-diff @@ -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 diff --git a/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch b/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch index c7e329b295..d3b7c32e2e 100644 --- a/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch +++ b/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch @@ -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> diff --git a/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch b/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch index 511df2c8da..f4d380c729 100644 --- a/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch +++ b/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch @@ -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) diff --git a/target/linux/au1000-2.6/patches/009-pci_fix.patch b/target/linux/au1000-2.6/patches/009-pci_fix.patch deleted file mode 100644 index 5b2a87f16b..0000000000 --- a/target/linux/au1000-2.6/patches/009-pci_fix.patch +++ /dev/null @@ -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(); diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile index 2a16872362..162c45e86d 100644 --- a/target/linux/brcm-2.6/Makefile +++ b/target/linux/brcm-2.6/Makefile @@ -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 diff --git a/target/linux/brcm-2.6/config b/target/linux/brcm-2.6/config index df6d39e9c8..d340e04f55 100644 --- a/target/linux/brcm-2.6/config +++ b/target/linux/brcm-2.6/config @@ -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 @@ -730,6 +772,12 @@ CONFIG_BLK_DEV_INITRD=y # 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 # # CONFIG_IDE is not set @@ -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 @@ -807,6 +860,11 @@ CONFIG_BLK_DEV_SD=m # 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) # # CONFIG_MD is not set @@ -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 @@ -1154,10 +1221,6 @@ CONFIG_UNIX98_PTYS=y # CONFIG_HWMON_VID is not set # -# Misc devices -# - -# # Multimedia devices # CONFIG_VIDEO_DEV=m @@ -1173,20 +1236,49 @@ 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/decoders and other helper chips +# + +# +# Audio decoders +# # -# Encoders and 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 # # # 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 @@ -1502,6 +1618,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 # CONFIG_EXT2_FS=m @@ -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 diff --git a/target/linux/brcm-2.6/config-diff b/target/linux/brcm-2.6/config-diff new file mode 100644 index 0000000000..3e1bd01ec3 --- /dev/null +++ b/target/linux/brcm-2.6/config-diff @@ -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 diff --git a/target/linux/brcm-2.6/patches/001-bcm947xx.patch b/target/linux/brcm-2.6/patches/001-bcm947xx.patch index e180e4718f..c935ac8082 100644 --- a/target/linux/brcm-2.6/patches/001-bcm947xx.patch +++ b/target/linux/brcm-2.6/patches/001-bcm947xx.patch @@ -1,6 +1,6 @@ -diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bcm947xx/broadcom/bcmsrom.c ---- linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/bcmsrom.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmsrom.c linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmsrom.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmsrom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmsrom.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,481 @@ +/* + * Misc useful routines to access NIC SROM/OTP . @@ -172,9 +172,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc + /* now correct the endianness of the byte array */ + ltoh16_buf(buf, nwords * 2); + } -+ ++ + return err; -+} ++} + +/* +* Create variable table from memory. @@ -199,7 +199,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc + *vars = NULL; + *count = 0; + } -+ ++ + return 0; +} + @@ -213,7 +213,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc + uint16 w, b[64]; + uint8 sromrev; + struct ether_addr ea; -+ char eabuf[32]; ++ char eabuf[32]; + uint32 w32; + int woff, i; + char *vp, *base; @@ -233,7 +233,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc + /* bcm4401 sroms misprogrammed */ + if (sromrev == 0x10) + sromrev = 1; -+ ++ + /* srom version check */ + if (sromrev > 3) + return (-2); @@ -415,7 +415,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc + vp += sprintf(vp, "wl0gpio3=%d", (w >> 8) & 0xff); + vp++; + } -+ ++ + /* Word 52 is max power 0/1 */ + w = b[52]; + vp += sprintf(vp, "pa0maxpwr=%d", w & 0xff); @@ -483,9 +483,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmsrom.c linux.dev/arch/mips/bc + return err; +} + -diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/bcm947xx/broadcom/bcmutils.c ---- linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/bcmutils.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmutils.c linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmutils.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/bcmutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/bcmutils.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,356 @@ +/* + * Misc useful OS-independent routines. @@ -548,19 +548,19 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b +{ + ulong result, value; + bool minus; -+ ++ + minus = FALSE; + + while (bcm_isspace(*cp)) + cp++; -+ ++ + if (cp[0] == '+') + cp++; + else if (cp[0] == '-') { + minus = TRUE; + cp++; + } -+ ++ + if (base == 0) { + if (cp[0] == '0') { + if ((cp[1] == 'x') || (cp[1] == 'X')) { @@ -575,7 +575,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b + } else if (base == 16 && (cp[0] == '0') && ((cp[1] == 'x') || (cp[1] == 'X'))) { + cp = &cp[2]; + } -+ ++ + result = 0; + + while (bcm_isxdigit(*cp) && @@ -733,7 +733,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b +* This format allows multiple features to share the gpio with mutual +* understanding. +* -+* 'def_pin' is returned if a specific gpio is not defined for the requested functionality ++* 'def_pin' is returned if a specific gpio is not defined for the requested functionality +* and if def_pin is not used by others. +*/ +uint @@ -771,14 +771,14 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b + * x^8 + x^7 +x^6 + x^4 + x^2 + 1 + * + * The caller provides the initial value (either CRC8_INIT_VALUE -+ * or the previous returned value) to allow for processing of ++ * or the previous returned value) to allow for processing of + * discontiguous blocks of data. When generating the CRC the + * caller is responsible for complementing the final return value + * and inserting it into the byte stream. When checking, a final + * return value of CRC8_GOOD_VALUE indicates a valid CRC. + * + * Reference: Dallas Semiconductor Application Note 27 -+ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms", ++ * Williams, Ross N., "A Painless Guide to CRC Error Detection Algorithms", + * ver 3, Aug 1993, ross@guest.adelaide.edu.au, Rocksoft Pty Ltd., + * ftp://ftp.rocksoft.com/clients/rocksoft/papers/crc_v3.txt + * @@ -843,9 +843,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/bcmutils.c linux.dev/arch/mips/b +#define CNBUFS 5 + +#endif -diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bcm947xx/broadcom/cfe_env.c ---- linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/cfe_env.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/cfe_env.c linux-2.6.19/arch/mips/bcm947xx/broadcom/cfe_env.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/cfe_env.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/cfe_env.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,234 @@ +/* + * NVRAM variable manipulation (Linux kernel half) @@ -861,7 +861,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + * $Id$ + */ + -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/kernel.h> @@ -896,9 +896,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + * + * If bit 0 (low bit) is set, the length is an 8-bit value. + * If bit 0 (low bit) is clear, the length is a 16-bit value -+ * ++ * + * Bit 7 set indicates "user" TLVs. In this case, bit 0 still -+ * indicates the size of the length field. ++ * indicates the size of the length field. + * + * Flags are from the constants below: + * @@ -915,11 +915,11 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + * The actual TLV types we support + */ + -+#define ENV_TLV_TYPE_END 0x00 ++#define ENV_TLV_TYPE_END 0x00 +#define ENV_TLV_TYPE_ENV ENV_CODE_SYS(0,ENV_LENGTH_8BITS) + +/* -+ * Environment variable flags ++ * Environment variable flags + */ + +#define ENV_FLG_NORMAL 0x00 /* normal read/write */ @@ -932,14 +932,14 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + +/* ********************************************************************* + * _nvram_read(buffer,offset,length) -+ * ++ * + * Read data from the NVRAM device -+ * -+ * Input parameters: ++ * ++ * Input parameters: + * buffer - destination buffer + * offset - offset of data to read + * length - number of bytes to read -+ * ++ * + * Return value: + * number of bytes read, or <0 if error occured + ********************************************************************* */ @@ -948,7 +948,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc +{ + int i; + if (offset > NVRAM_SIZE) -+ return -1; ++ return -1; + + for ( i = 0; i < length; i++) { + buffer[i] = ((volatile unsigned char*)nv_buf)[offset + i]; @@ -980,7 +980,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + * @return value of variable or NULL if undefined + */ + -+char* ++char* +cfe_env_get(unsigned char *nv_buf, char* name) +{ + int size; @@ -991,7 +991,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + unsigned int rectype; + int offset; + int flg; -+ ++ + size = NVRAM_SIZE; + buffer = &_nvdata[0]; + @@ -1002,7 +1002,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + if (_nvram_read(nv_buf, ptr,offset,1) != 1) { + goto error; + } -+ ++ + while ((*ptr != ENV_TLV_TYPE_END) && (size > 1)) { + + /* Adjust pointer for TLV type */ @@ -1010,9 +1010,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + offset++; + size--; + -+ /* ++ /* + * Read the length. It can be either 1 or 2 bytes -+ * depending on the code ++ * depending on the code + */ + if (rectype & ENV_LENGTH_8BITS) { + /* Read the record type and length - 8 bits */ @@ -1047,7 +1047,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + *envval++ = '\0'; + memcpy(_valuestr,envval,(reclen-1)-(envval-ptr)); + _valuestr[(reclen-1)-(envval-ptr)] = '\0'; -+#if 0 ++#if 0 + printk(KERN_INFO "NVRAM:%s=%s\n", ptr, _valuestr); +#endif + if(!strcmp(ptr, name)){ @@ -1057,16 +1057,16 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + return _valuestr; + } + break; -+ -+ default: ++ ++ default: + /* Unknown TLV type, skip it. */ + break; + } + + /* -+ * Advance to next TLV ++ * Advance to next TLV + */ -+ ++ + size -= (int)reclen; + offset += reclen; + @@ -1081,9 +1081,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/cfe_env.c linux.dev/arch/mips/bc + +} + -diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/bcm947xx/broadcom/linux_osl.c ---- linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/linux_osl.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/linux_osl.c linux-2.6.19/arch/mips/bcm947xx/broadcom/linux_osl.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/linux_osl.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/linux_osl.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,102 @@ +/* + * Linux OS Independent Layer @@ -1113,7 +1113,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/ +#endif +#include <pcicfg.h> + -+#define PCI_CFG_RETRY 10 ++#define PCI_CFG_RETRY 10 + +#define OS_HANDLE_MAGIC 0x1234abcd +#define BCM_MEM_FILENAME_LEN 24 @@ -1138,7 +1138,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/ +osl_pci_read_config(osl_t *osh, uint offset, uint size) +{ + uint val; -+ uint retry=PCI_CFG_RETRY; ++ uint retry=PCI_CFG_RETRY; + + ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); + @@ -1158,7 +1158,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/ +void +osl_pci_write_config(osl_t *osh, uint offset, uint size, uint val) +{ -+ uint retry=PCI_CFG_RETRY; ++ uint retry=PCI_CFG_RETRY; + + ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); + @@ -1169,7 +1169,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/ + pci_write_config_dword(osh->pdev, offset, val); + if (offset!=PCI_BAR0_WIN) + break; -+ if (osl_pci_read_config(osh,offset,size) == val) ++ if (osl_pci_read_config(osh,offset,size) == val) + break; + } while (retry--); + @@ -1187,9 +1187,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/linux_osl.c linux.dev/arch/mips/ + } +} + -diff -urN linux.old/arch/mips/bcm947xx/broadcom/Makefile linux.dev/arch/mips/bcm947xx/broadcom/Makefile ---- linux.old/arch/mips/bcm947xx/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/Makefile 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/Makefile linux-2.6.19/arch/mips/bcm947xx/broadcom/Makefile +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/Makefile 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,6 @@ +# +# Makefile for the BCM47xx specific kernel interface routines @@ -1197,9 +1197,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/Makefile linux.dev/arch/mips/bcm +# + +obj-y := sbutils.o linux_osl.o bcmsrom.o bcmutils.o sbmips.o sbpci.o sflash.o nvram.o cfe_env.o -diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm947xx/broadcom/nvram.c ---- linux.old/arch/mips/bcm947xx/broadcom/nvram.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/nvram.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/nvram.c linux-2.6.19/arch/mips/bcm947xx/broadcom/nvram.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/nvram.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/nvram.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,192 @@ +/* + * NVRAM variable manipulation (Linux kernel half) @@ -1215,7 +1215,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9 + * $Id$ + */ + -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/kernel.h> @@ -1247,7 +1247,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9 +static int cfe_env; + +extern char *cfe_env_get(char *nv_buf, const char *name); -+ ++ + +/* Convenience */ +#define sbh_lock bcm947xx_sbh_lock @@ -1318,11 +1318,11 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9 + header = (struct nvram_header *) KSEG1ADDR(base + 4 KB); + if (header->magic == NVRAM_MAGIC) + goto found; -+ ++ + header = (struct nvram_header *) KSEG1ADDR(base + 1 KB); + if (header->magic == NVRAM_MAGIC) + goto found; -+ ++ + return; + +found: @@ -1376,7 +1376,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9 + + if (!nvram_buf[0]) + return NULL; -+ ++ + /* Look for name=value and return value */ + var = &nvram_buf[sizeof(struct nvram_header)]; + end = nvram_buf + sizeof(nvram_buf) - 2; @@ -1393,9 +1393,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/nvram.c linux.dev/arch/mips/bcm9 +} + +EXPORT_SYMBOL(nvram_get); -diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm947xx/broadcom/sbmips.c ---- linux.old/arch/mips/bcm947xx/broadcom/sbmips.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/sbmips.c 2006-11-03 21:19:49.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbmips.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sbmips.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbmips.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sbmips.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,1115 @@ +/* + * BCM47XX Sonics SiliconBackplane MIPS core routines @@ -1791,7 +1791,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm + tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */ + tmp |= CEIL(10, ns) << FW_W1_SHIFT; /* W1 = 10nS */ + tmp |= CEIL(120, ns); /* W0 = 120nS */ -+ ++ + // Added by Chen-I for 5365 + if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) + { @@ -1809,7 +1809,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm + } + } + // Added by Chen-I & Yen for enabling 5350 EXTIF -+ if (BCMINIT(sb_chip)(sbh) == BCM5350_DEVICE_ID) ++ if (BCMINIT(sb_chip)(sbh) == BCM5350_DEVICE_ID) + { + /* Set programmable interface timing for external uart */ + tmp = CEIL(10, ns) << FW_W3_SHIFT; /* W3 = 10nS */ @@ -1844,7 +1844,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm + } + /* USB gets its own interrupt */ + BCMINIT(sb_setirq)(sbh, 3, SB_USB, 0); -+ ++ + break; + case BCM5350_DEVICE_ID: + /* Clear interrupt map */ @@ -1899,7 +1899,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm + } else + goto out; + -+ // Added by Chen-I for 5365 ++ // Added by Chen-I for 5365 + if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) + rate = 100000000; + else @@ -2512,9 +2512,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbmips.c linux.dev/arch/mips/bcm +} + +EXPORT_SYMBOL(sb_irq); -diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm947xx/broadcom/sbpci.c ---- linux.old/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/sbpci.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbpci.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sbpci.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbpci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sbpci.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,534 @@ +/* + * Low-Level PCI and SB support for BCM47xx @@ -2855,7 +2855,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm9 + /* Enable PCI interrupts */ + W_REG(&pci->intmask, PCI_INTA); + } -+ ++ + return 0; +} + @@ -3050,9 +3050,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbpci.c linux.dev/arch/mips/bcm9 + return 0; +} + -diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bcm947xx/broadcom/sbutils.c ---- linux.old/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/sbutils.c 2006-11-03 21:22:22.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbutils.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sbutils.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sbutils.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sbutils.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,2375 @@ +/* + * Misc utility routines for accessing chip-specific features @@ -3060,7 +3060,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + * + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. -+ * ++ * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS @@ -3142,7 +3142,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +#define BADIDX (SB_MAXCORES+1) +#define NOREV -1 + -+#define PCI(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCI)) ++#define PCI(si) ((BUSTYPE(si->sb.bustype) == PCI_BUS) && (si->sb.buscoretype == SB_PCI)) + +/* sonicsrev */ +#define SONICS_2_2 (SBIDL_RV_2_2 >> SBIDL_RV_SHIFT) @@ -3205,7 +3205,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +static sb_info_t ksi; + +/* generic kernel variant of sb_attach() */ -+sb_t * ++sb_t * +BCMINITFN(sb_kattach)() +{ + uint32 *regs; @@ -3237,7 +3237,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +} +#endif + -+static sb_info_t * ++static sb_info_t * +BCMINITFN(sb_doattach)(sb_info_t *si, uint devid, osl_t *osh, void *regs, + uint bustype, void *sdh, char **vars, int *varsz) +{ @@ -3344,13 +3344,13 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + return NULL; + } + } -+ ++ + /* srom_var_init() depends on sb_scan() info */ + if (srom_var_init(si, si->sb.bustype, si->curmap, osh, vars, varsz)) { + SB_ERROR(("sb_doattach: srom_var_init failed: bad srom\n")); + return (NULL); + } -+ ++ + if (cc == NULL) { + /* + * The chip revision number is hardwired into all @@ -3397,7 +3397,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + if (si->sb.ccrev >= 16) { + w = getintvar(*vars, "gpiotimerval"); + if (!w) -+ w = DEFAULT_GPIOTIMERVAL; ++ w = DEFAULT_GPIOTIMERVAL; + sb_corereg(si, 0, OFFSETOF(chipcregs_t, gpiotimerval), ~0, w); + } + @@ -3563,9 +3563,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + else { + sblo = sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), 0, 0); + sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatelow), ~0, (sblo | SBTML_FGC | SBTML_BE)); -+ ++ + SPINWAIT(((sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatehigh), 0, 0) & SBTMH_BISTD) == 0), 100000); -+ ++ + if (sb_corereg(si, coreidx, SBCONFIGOFF + OFFSETOF(sbconfig_t, sbtmstatehigh), 0, 0) & SBTMH_BISTF) + result = BCME_ERROR; + @@ -3684,7 +3684,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + sb_setcoreidx(&si->sb, i); + si->coreid[i] = sb_coreid(&si->sb); + -+ if (si->coreid[i] == SB_PCI) { ++ if (si->coreid[i] == SB_PCI) { + pciidx = i; + pcirev = sb_corerev(&si->sb); + pci = TRUE; @@ -3692,8 +3692,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + } + if (pci) { + si->sb.buscoretype = SB_PCI; -+ si->sb.buscorerev = pcirev; -+ si->sb.buscoreidx = pciidx; ++ si->sb.buscorerev = pcirev; ++ si->sb.buscoreidx = pciidx; + } + + /* @@ -3801,8 +3801,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + return (BADIDX); +} + -+/* -+ * this function changes logical "focus" to the indiciated core, ++/* ++ * this function changes logical "focus" to the indiciated core, + * must be called with interrupt off. + * Moreover, callers should keep interrupts off during switching out of and back to d11 core + */ @@ -3816,7 +3816,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + + if (coreidx >= si->numcores) + return (NULL); -+ ++ + /* + * If the user has provided an interrupt mask enabled function, + * then assert interrupts are disabled before switching the core. @@ -3857,8 +3857,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + return (si->curmap); +} + -+/* -+ * this function changes logical "focus" to the indiciated core, ++/* ++ * this function changes logical "focus" to the indiciated core, + * must be called with interrupt off. + * Moreover, callers should keep interrupts off during switching out of and back to d11 core + */ @@ -4190,7 +4190,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + idx = BADIDX; + switch (BUSTYPE(si->sb.bustype)) { + case PCI_BUS: -+ idx = si->sb.buscoreidx; ++ idx = si->sb.buscoreidx; + break; + case JTAG_BUS: + idx = SB_CC_IDX; @@ -4476,10 +4476,10 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + ASSERT(0); + /* PLL types 3 and 7 use BASE2 (25Mhz) */ + if ((pll_type == PLL_TYPE3) || -+ (pll_type == PLL_TYPE7)) { ++ (pll_type == PLL_TYPE7)) { + clock = CC_CLOCK_BASE2 * n1 * n2; + } -+ else ++ else + clock = CC_CLOCK_BASE1 * n1 * n2; + + if (clock == 0) @@ -4559,8 +4559,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + m = R_REG(&cc->clockcontrol_mips); + else if (pll_type == PLL_TYPE3) + { -+ // Added by Chen-I for 5365 -+ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) ++ // Added by Chen-I for 5365 ++ if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) + m = R_REG(&cc->clockcontrol_sb); + else + m = R_REG(&cc->clockcontrol_m2); @@ -4572,13 +4572,13 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + return 0; + } + -+ // Added by Chen-I for 5365 ++ // Added by Chen-I for 5365 + if (BCMINIT(sb_chip)(sbh) == BCM5365_DEVICE_ID) + { + rate = 100000000; + } + else -+ { ++ { + /* calculate rate */ + rate = sb_clock_rate(pll_type, n, m); + if (pll_type == PLL_TYPE3) @@ -4742,8 +4742,8 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +} + +/* release one gpio */ -+/* -+ * releasing the gpio doesn't change the current value on the GPIO last write value ++/* ++ * releasing the gpio doesn't change the current value on the GPIO last write value + * persists till some one overwrites it +*/ + @@ -4766,7 +4766,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + ASSERT((gpio_bitmask) && !((gpio_bitmask) & (gpio_bitmask - 1))); + return -1; + } -+ ++ + /* already released */ + if (!(sb_gpioreservation & gpio_bitmask)) + return -1; @@ -4893,7 +4893,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +} + +/* mask&set gpio timer val */ -+uint32 ++uint32 +sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 gpiotimerval) +{ + sb_info_t *si; @@ -5004,7 +5004,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + chipcregs_t *cc; + uint intr_val = 0; + uint err = 0; -+ ++ + si = SB_INFO(sbh); + + /* chipcommon cores prior to rev6 don't support slowclkcontrol */ @@ -5017,12 +5017,12 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + + if (set && ((*div % 4) || (*div < 4))) + return 2; -+ ++ + INTR_OFF(si, intr_val); + origidx = si->curidx; + cc = (chipcregs_t*) sb_setcore(sbh, SB_CC, 0); + ASSERT(cc != NULL); -+ ++ + if (!(R_REG(&cc->capabilities) & CAP_PWR_CTL)) { + err = 3; + goto done; @@ -5060,7 +5060,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + /* set all Instaclk chip ILP to 1 MHz */ + if (si->sb.ccrev >= 10) + SET_REG(&cc->system_clk_ctl, SYCC_CD_MASK, (ILP_DIV_1MHZ << SYCC_CD_SHIFT)); -+ ++ + sb_clkctl_setdelay(si, (void *)cc); + +done: @@ -5260,14 +5260,14 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + + +void -+sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice, ++sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice, + uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif) +{ + uint vendor, core, unit; + uint chip, chippkg; + char varname[8]; + uint8 class, subclass, progif; -+ ++ + vendor = sb_corevendor(sbh); + core = sb_coreid(sbh); + unit = sb_coreunit(sbh); @@ -5276,7 +5276,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc + chippkg = BCMINIT(sb_chippkg)(sbh); + + progif = 0; -+ ++ + /* Known vendor translations */ + switch (vendor) { + case SB_VEND_BCM: @@ -5429,9 +5429,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sbutils.c linux.dev/arch/mips/bc +EXPORT_SYMBOL(sb_gpiotimerval); +EXPORT_SYMBOL(sb_watchdog); +EXPORT_SYMBOL(sb_kattach); -diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm947xx/broadcom/sflash.c ---- linux.old/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/broadcom/sflash.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sflash.c linux-2.6.19/arch/mips/bcm947xx/broadcom/sflash.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/broadcom/sflash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/broadcom/sflash.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,418 @@ +/* + * Broadcom SiliconBackplane chipcommon serial flash interface @@ -5801,7 +5801,7 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm + + /* Copy entire block */ + while(blk_len) { -+ copied = sflash_read(cc, blk_offset, blk_len, blk_ptr); ++ copied = sflash_read(cc, blk_offset, blk_len, blk_ptr); + blk_offset += copied; + blk_len -= copied; + blk_ptr += copied; @@ -5851,9 +5851,9 @@ diff -urN linux.old/arch/mips/bcm947xx/broadcom/sflash.c linux.dev/arch/mips/bcm + return ret; +} + -diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm947xx/include/bcmdevs.h ---- linux.old/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmdevs.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmdevs.h linux-2.6.19/arch/mips/bcm947xx/include/bcmdevs.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmdevs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmdevs.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,391 @@ +/* + * Broadcom device-specific manifest constants. @@ -5935,7 +5935,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm + +#define BCM4306_DEVICE_ID 0x4306 /* 4306 chipcommon chipid */ +#define BCM4306_D11G_ID 0x4320 /* 4306 802.11g */ -+#define BCM4306_D11G_ID2 0x4325 ++#define BCM4306_D11G_ID2 0x4325 +#define BCM4306_D11A_ID 0x4321 /* 4306 802.11a */ +#define BCM4306_UART_ID 0x4322 /* 4306 uart */ +#define BCM4306_V90_ID 0x4323 /* 4306 v90 codec */ @@ -6246,9 +6246,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmdevs.h linux.dev/arch/mips/bcm +#define GPIO_NUMPINS 16 + +#endif /* _BCMDEVS_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/bcm947xx/include/bcmendian.h ---- linux.old/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmendian.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmendian.h linux-2.6.19/arch/mips/bcm947xx/include/bcmendian.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmendian.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmendian.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,152 @@ +/* + * local version of endian.h - byte order defines @@ -6274,7 +6274,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/b + ((uint16)( \ + (((uint16)(val) & (uint16)0x00ffU) << 8) | \ + (((uint16)(val) & (uint16)0xff00U) >> 8) )) -+ ++ +/* Byte swap a 32 bit value */ +#define BCMSWAP32(val) \ + ((uint32)( \ @@ -6282,13 +6282,13 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/b + (((uint32)(val) & (uint32)0x0000ff00UL) << 8) | \ + (((uint32)(val) & (uint32)0x00ff0000UL) >> 8) | \ + (((uint32)(val) & (uint32)0xff000000UL) >> 24) )) -+ ++ +/* 2 Byte swap a 32 bit value */ +#define BCMSWAP32BY16(val) \ + ((uint32)( \ + (((uint32)(val) & (uint32)0x0000ffffUL) << 16) | \ + (((uint32)(val) & (uint32)0xffff0000UL) >> 16) )) -+ ++ + +static INLINE uint16 +bcmswap16(uint16 val) @@ -6402,9 +6402,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmendian.h linux.dev/arch/mips/b +) + +#endif /* _BCMENDIAN_H_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bcm947xx/include/bcmnvram.h ---- linux.old/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmnvram.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmnvram.h linux-2.6.19/arch/mips/bcm947xx/include/bcmnvram.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmnvram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmnvram.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,95 @@ +/* + * NVRAM variable manipulation @@ -6457,7 +6457,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bc + */ +extern char *nvram_get(const char *name); + -+/* ++/* + * Get the value of an NVRAM variable. + * @param name name of variable to get + * @return value of variable or NUL if undefined @@ -6501,9 +6501,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmnvram.h linux.dev/arch/mips/bc +#define NVRAM_MAX_PARAM_LEN 64 + +#endif /* _bcmnvram_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bcm947xx/include/bcmsrom.h ---- linux.old/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmsrom.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmsrom.h linux-2.6.19/arch/mips/bcm947xx/include/bcmsrom.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmsrom.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmsrom.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,23 @@ +/* + * Misc useful routines to access NIC local SROM/OTP . @@ -6528,9 +6528,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmsrom.h linux.dev/arch/mips/bcm +extern int srom_write(uint bus, void *curmap, osl_t *osh, uint byteoff, uint nbytes, uint16 *buf); + +#endif /* _bcmsrom_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bcm947xx/include/bcmutils.h ---- linux.old/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bcmutils.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmutils.h linux-2.6.19/arch/mips/bcm947xx/include/bcmutils.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bcmutils.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/bcmutils.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,308 @@ +/* + * Misc useful os-independent macros and functions. @@ -6560,7 +6560,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc +#define _BCM_X 0x40 /* hex digit */ +#define _BCM_SP 0x80 /* hard space (0x20) */ + -+#define GPIO_PIN_NOTDEFINED 0x20 ++#define GPIO_PIN_NOTDEFINED 0x20 + +extern unsigned char bcm_ctype[]; +#define bcm_ismask(x) (bcm_ctype[(int)(unsigned char)(x)]) @@ -6642,12 +6642,12 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc +#define VALID_BCMERROR(e) ((e <= 0) && (e >= BCME_LAST)) + + -+/* -+ * error codes could be added but the defined ones shouldn't be changed/deleted -+ * these error codes are exposed to the user code -+ * when ever a new error code is added to this list -+ * please update errorstring table with the related error string and -+ * update osl files with os specific errorcode map ++/* ++ * error codes could be added but the defined ones shouldn't be changed/deleted ++ * these error codes are exposed to the user code ++ * when ever a new error code is added to this list ++ * please update errorstring table with the related error string and ++ * update osl files with os specific errorcode map +*/ + +#define BCME_ERROR -1 /* Error generic */ @@ -6663,9 +6663,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc +#define BCME_NOCLK -11 /* No Clock*/ +#define BCME_BADRATESET -12 /* BAD RateSet*/ +#define BCME_BADBAND -13 /* BAD Band */ -+#define BCME_BUFTOOSHORT -14 /* Buffer too short */ -+#define BCME_BUFTOOLONG -15 /* Buffer too Long */ -+#define BCME_BUSY -16 /* Busy*/ ++#define BCME_BUFTOOSHORT -14 /* Buffer too short */ ++#define BCME_BUFTOOLONG -15 /* Buffer too Long */ ++#define BCME_BUSY -16 /* Busy*/ +#define BCME_NOTASSOCIATED -17 /* Not associated*/ +#define BCME_BADSSIDLEN -18 /* BAD SSID Len */ +#define BCME_OUTOFRANGECHAN -19 /* Out of Range Channel*/ @@ -6680,7 +6680,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc +#define BCME_ASSOCIATED -28 /* Associated */ +#define BCME_RANGE -29 /* Range Error*/ +#define BCME_NOTFOUND -30 /* Not found */ -+#define BCME_LAST BCME_NOTFOUND ++#define BCME_LAST BCME_NOTFOUND + +#ifndef ABS +#define ABS(a) (((a)<0)?-(a):(a)) @@ -6840,9 +6840,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bcmutils.h linux.dev/arch/mips/bc +extern uint bcm_mkiovar(char *name, char *data, uint datalen, char *buf, uint len); + +#endif /* _bcmutils_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/bitfuncs.h linux.dev/arch/mips/bcm947xx/include/bitfuncs.h ---- linux.old/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/bitfuncs.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/bitfuncs.h linux-2.6.19/arch/mips/bcm947xx/include/bitfuncs.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/bitfuncs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/bitfuncs.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,85 @@ +/* + * bit manipulation utility functions @@ -6929,9 +6929,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/bitfuncs.h linux.dev/arch/mips/bc +#endif + +#endif /* _BITFUNCS_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm947xx/include/flash.h ---- linux.old/arch/mips/bcm947xx/include/flash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/flash.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/flash.h linux-2.6.19/arch/mips/bcm947xx/include/flash.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/flash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/flash.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,188 @@ +/* + * flash.h: Common definitions for flash access. @@ -6991,7 +6991,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94 + + +#ifdef DECLARE_FLASHES -+flash_cmds_t sflash_cmd_t = ++flash_cmds_t sflash_cmd_t = + { SFLASH, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +flash_cmds_t flash_cmds[] = { @@ -7068,7 +7068,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94 +}; + + -+flash_desc_t sflash_desc = ++flash_desc_t sflash_desc = + { 0, 0, 0, 0, SFLASH, 0, 0, 0, 0, 0, NULL, "SFLASH" }; + +flash_desc_t flashes[] = { @@ -7107,7 +7107,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94 + { 0x0004, 0x22F6, 0x0400000, 2, AMD, 0x10000, 64, 0, 62, 4, amd4112, "MBM29LV320TE 2Mx16 TopB" }, + { 0x0004, 0x22F9, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "MBM29LV320BE 2Mx16 BotB" }, + { 0x0098, 0x009A, 0x0400000, 2, AMD, 0x10000, 64, 0, 62, 4, amd4112, "TC58FVT321 2Mx16 TopB" }, -+ { 0x0098, 0x009C, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "TC58FVB321 2Mx16 BotB" }, ++ { 0x0098, 0x009C, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "TC58FVB321 2Mx16 BotB" }, + { 0x00C2, 0x22A7, 0x0400000, 2, AMD, 0x10000, 64, 0, 62, 4, amd4112, "MX29LV320T 2Mx16 TopB" }, + { 0x00C2, 0x22A8, 0x0400000, 2, AMD, 0x10000, 64, 1, 63, 4, amd2114, "MX29LV320B 2Mx16 BotB" }, + { 0x00BF, 0x2783, 0x0400000, 2, SST, 0x10000, 64, 0, 63, 0, NULL, "SST39VF320 2Mx16" }, @@ -7121,9 +7121,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flash.h linux.dev/arch/mips/bcm94 +extern flash_desc_t flashes[]; + +#endif -diff -urN linux.old/arch/mips/bcm947xx/include/flashutl.h linux.dev/arch/mips/bcm947xx/include/flashutl.h ---- linux.old/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/flashutl.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/flashutl.h linux-2.6.19/arch/mips/bcm947xx/include/flashutl.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/flashutl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/flashutl.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,27 @@ +/* + * BCM47XX FLASH driver interface @@ -7152,9 +7152,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/flashutl.h linux.dev/arch/mips/bc +#endif /* _LANGUAGE_ASSEMBLY */ + +#endif /* _flashutl_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm947xx/include/hndmips.h ---- linux.old/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/hndmips.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/hndmips.h linux-2.6.19/arch/mips/bcm947xx/include/hndmips.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/hndmips.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/hndmips.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,16 @@ +/* + * Alternate include file for HND sbmips.h since CFE also ships with @@ -7162,7 +7162,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm + * + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. -+ * ++ * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS @@ -7172,9 +7172,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/hndmips.h linux.dev/arch/mips/bcm + */ + +#include "sbmips.h" -diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/bcm947xx/include/linux_osl.h ---- linux.old/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/linux_osl.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/linux_osl.h linux-2.6.19/arch/mips/bcm947xx/include/linux_osl.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/linux_osl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/linux_osl.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,331 @@ +/* + * Linux OS Independent Layer @@ -7205,7 +7205,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b +#define ASSERT(exp) do {} while (0) +#else +/* ASSERT could causes segmentation fault on GCC3.1, use empty instead*/ -+#define ASSERT(exp) ++#define ASSERT(exp) +#endif +#endif + @@ -7279,7 +7279,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b + +/* register access macros */ +#if !defined(BCMJTAG) -+#ifndef IL_BIGENDIAN ++#ifndef IL_BIGENDIAN +#define R_REG(r) ( \ + sizeof(*(r)) == sizeof(uint8) ? readb((volatile uint8*)(r)) : \ + sizeof(*(r)) == sizeof(uint16) ? readw((volatile uint16*)(r)) : \ @@ -7380,7 +7380,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b +extern void *osl_pktget(osl_t *osh, uint len, bool send); +extern void osl_pktfree(void *skb); + -+#else /* BINOSL */ ++#else /* BINOSL */ + +/* string library */ +#ifndef LINUX_OSL @@ -7507,9 +7507,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linux_osl.h linux.dev/arch/mips/b +#define PKTBUFSZ 2048 + +#endif /* _linux_osl_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bcm947xx/include/linuxver.h ---- linux.old/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/linuxver.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/linuxver.h linux-2.6.19/arch/mips/bcm947xx/include/linuxver.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/linuxver.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/linuxver.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,389 @@ +/* + * Linux-specific abstractions to gain some independence from linux kernel versions. @@ -7517,19 +7517,19 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc + * + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. -+ * ++ * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. -+ * ++ * + * $Id$ + */ + +#ifndef _linuxver_h_ +#define _linuxver_h_ + -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/version.h> + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)) @@ -7550,8 +7550,8 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc +#endif + + -+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -+#define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i") ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) ++#define module_param(_name_, _type_, _perm_) MODULE_PARM(_name_, "i") +#define module_param_string(_name_, _string_, _size_, _perm_) MODULE_PARM(_string_, "c" __MODULE_STRING(_size_)) +#endif + @@ -7844,7 +7844,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc + return 0; +} + -+static inline int ++static inline int +pci_restore_state(struct pci_dev *dev, u32 *buffer) +{ + int i; @@ -7858,7 +7858,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc + * This works around a problem where warm-booting from Windows + * combined with a D3(hot)->D0 transition causes PCI config + * header data to be forgotten. -+ */ ++ */ + else { + for (i = 0; i < 6; i ++) + pci_write_config_dword(dev, @@ -7900,9 +7900,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/linuxver.h linux.dev/arch/mips/bc +#endif + +#endif /* _linuxver_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm947xx/include/mipsinc.h ---- linux.old/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/mipsinc.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/mipsinc.h linux-2.6.19/arch/mips/bcm947xx/include/mipsinc.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/mipsinc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/mipsinc.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,552 @@ +/* + * HND Run Time Environment for standalone MIPS programs. @@ -7966,7 +7966,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm + + +/* -+ * CP0 Registers ++ * CP0 Registers + */ + +#define C0_INX $0 @@ -8037,7 +8037,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm + + +/* -+ * CP0 Registers ++ * CP0 Registers + */ + +#define C0_INX 0 /* CP0: TLB Index */ @@ -8331,7 +8331,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm +#define PFC_I_AND_D_NOPF (PFC_INST_NOPF | PFC_DATA_NOPF) + + -+/* ++/* + * These are the UART port assignments, expressed as offsets from the base + * register. These assignments should hold for any serial port based on + * a 8250, 16450, or 16550(A). @@ -8456,9 +8456,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/mipsinc.h linux.dev/arch/mips/bcm +#endif /* !_LANGUAGE_ASSEMBLY */ + +#endif /* _MISPINC_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/osl.h linux.dev/arch/mips/bcm947xx/include/osl.h ---- linux.old/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/osl.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/osl.h linux-2.6.19/arch/mips/bcm947xx/include/osl.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/osl.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/osl.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,42 @@ +/* + * OS Abstraction Layer @@ -8502,9 +8502,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/osl.h linux.dev/arch/mips/bcm947x +#define MAXPRIO 7 /* 0-7 */ + +#endif /* _osl_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm947xx/include/pcicfg.h ---- linux.old/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/pcicfg.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/pcicfg.h linux-2.6.19/arch/mips/bcm947xx/include/pcicfg.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/pcicfg.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/pcicfg.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,398 @@ +/* + * pcicfg.h: PCI configuration constants and structures. @@ -8846,7 +8846,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm9 +#define PCI_CAP_POWERMGMTCAP_ID 0x01 +#define PCI_CAP_MSICAP_ID 0x05 + -+/* Data structure to define the Message Signalled Interrupt facility ++/* Data structure to define the Message Signalled Interrupt facility + * Valid for PCI and PCIE configurations */ +typedef struct _pciconfig_cap_msi { + unsigned char capID; @@ -8861,7 +8861,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm9 + unsigned char capID; + unsigned char nextptr; + unsigned short pme_cap; -+ unsigned short pme_sts_ctrl; ++ unsigned short pme_sts_ctrl; + unsigned char pme_bridge_ext; + unsigned char data; +} pciconfig_cap_pwrmgmt; @@ -8904,9 +8904,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/pcicfg.h linux.dev/arch/mips/bcm9 +#define PCI_CFG_CMD_STAT_TA 0x08000000 /* target abort status */ + +#endif -diff -urN linux.old/arch/mips/bcm947xx/include/proto/ethernet.h linux.dev/arch/mips/bcm947xx/include/proto/ethernet.h ---- linux.old/arch/mips/bcm947xx/include/proto/ethernet.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/proto/ethernet.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/proto/ethernet.h linux-2.6.19/arch/mips/bcm947xx/include/proto/ethernet.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/proto/ethernet.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/proto/ethernet.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,145 @@ +/******************************************************************************* + * $Id$ @@ -9053,9 +9053,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/proto/ethernet.h linux.dev/arch/m +#undef PACKED + +#endif /* _NET_ETHERNET_H_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/s5.h linux.dev/arch/mips/bcm947xx/include/s5.h ---- linux.old/arch/mips/bcm947xx/include/s5.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/s5.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/s5.h linux-2.6.19/arch/mips/bcm947xx/include/s5.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/s5.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/s5.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,103 @@ +#ifndef _S5_H_ +#define _S5_H_ @@ -9072,7 +9072,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/s5.h linux.dev/arch/mips/bcm947xx + * LICENSE. + * + * $Id: s5.h,v 1.3 2003/06/10 18:54:51 jfd Exp $ -+ * ++ * + */ + +/* BCM5365 Address map */ @@ -9160,9 +9160,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/s5.h linux.dev/arch/mips/bcm947xx + + +#endif /*!_S5_H_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm947xx/include/sbchipc.h ---- linux.old/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbchipc.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbchipc.h linux-2.6.19/arch/mips/bcm947xx/include/sbchipc.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbchipc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbchipc.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,440 @@ +/* + * SiliconBackplane Chipcommon core hardware definitions. @@ -9174,7 +9174,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm + * $Id$ + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. -+ * ++ * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS @@ -9420,7 +9420,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm +#define CLKD_OTP 0x000f0000 +#define CLKD_OTP_SHIFT 16 +#define CLKD_JTAG 0x00000f00 -+#define CLKD_JTAG_SHIFT 8 ++#define CLKD_JTAG_SHIFT 8 +#define CLKD_UART 0x000000ff + +/* intstatus/intmask */ @@ -9604,9 +9604,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbchipc.h linux.dev/arch/mips/bcm +#define OTP_MAGIC 0x4e56 + +#endif /* _SBCHIPC_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/bcm947xx/include/sbconfig.h ---- linux.old/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbconfig.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbconfig.h linux-2.6.19/arch/mips/bcm947xx/include/sbconfig.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbconfig.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbconfig.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,342 @@ +/* + * Broadcom SiliconBackplane hardware register definitions. @@ -9950,9 +9950,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbconfig.h linux.dev/arch/mips/bc +#define BISZ_SIZE 7 /* descriptor size in 32-bit intergers */ + +#endif /* _SBCONFIG_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm947xx/include/sbextif.h ---- linux.old/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbextif.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbextif.h linux-2.6.19/arch/mips/bcm947xx/include/sbextif.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbextif.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbextif.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,242 @@ +/* + * Hardware-specific External Interface I/O core definitions @@ -9968,13 +9968,13 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm + * The external interface core also contains 2 on-chip 16550 UARTs, clock + * frequency control, a watchdog interrupt timer, and a GPIO interface. + * -+ * Copyright 2005, Broadcom Corporation -+ * All Rights Reserved. -+ * -+ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY -+ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM -+ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS -+ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. ++ * Copyright 2005, Broadcom Corporation ++ * All Rights Reserved. ++ * ++ * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY ++ * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM ++ * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS ++ * FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + * $Id$ + */ + @@ -10196,9 +10196,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbextif.h linux.dev/arch/mips/bcm +#define CC_CLOCK_BASE 24000000 /* Half the clock freq. in the 4710 */ + +#endif /* _SBEXTIF_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm947xx/include/sbmemc.h ---- linux.old/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbmemc.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmemc.h linux-2.6.19/arch/mips/bcm947xx/include/sbmemc.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmemc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbmemc.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,148 @@ +/* + * BCM47XX Sonics SiliconBackplane DDR/SDRAM controller core hardware definitions. @@ -10348,9 +10348,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbmemc.h linux.dev/arch/mips/bcm9 +#define MEMC_CONFIG_DDR 0x00000001 + +#endif /* _SBMEMC_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm947xx/include/sbmips.h ---- linux.old/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbmips.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmips.h linux-2.6.19/arch/mips/bcm947xx/include/sbmips.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbmips.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbmips.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,63 @@ +/* + * Broadcom SiliconBackplane MIPS definitions @@ -10363,7 +10363,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm9 + * + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. -+ * ++ * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS @@ -10415,9 +10415,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbmips.h linux.dev/arch/mips/bcm9 +#endif /* _LANGUAGE_ASSEMBLY */ + +#endif /* _SBMIPS_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm947xx/include/sbpci.h ---- linux.old/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbpci.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbpci.h linux-2.6.19/arch/mips/bcm947xx/include/sbpci.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbpci.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbpci.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,122 @@ +/* + * BCM47XX Sonics SiliconBackplane PCI core hardware definitions. @@ -10472,7 +10472,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm94 +#define PCI_RST_OE 0x01 /* When set, drives PCI_RESET out to pin */ +#define PCI_RST 0x02 /* Value driven out to pin */ +#define PCI_CLK_OE 0x04 /* When set, drives clock as gated by PCI_CLK out to pin */ -+#define PCI_CLK 0x08 /* Gate for clock driven out to pin */ ++#define PCI_CLK 0x08 /* Gate for clock driven out to pin */ + +/* PCI arbiter control */ +#define PCI_INT_ARB 0x01 /* When set, use an internal arbiter */ @@ -10541,9 +10541,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbpci.h linux.dev/arch/mips/bcm94 +#endif /* !_LANGUAGE_ASSEMBLY */ + +#endif /* _SBPCI_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bcm947xx/include/sbsdram.h ---- linux.old/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbsdram.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbsdram.h linux-2.6.19/arch/mips/bcm947xx/include/sbsdram.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbsdram.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbsdram.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,75 @@ +/* + * BCM47XX Sonics SiliconBackplane SDRAM controller core hardware definitions. @@ -10620,9 +10620,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbsdram.h linux.dev/arch/mips/bcm +#define MEM8MX16X2 0xc29 /* 32 MB */ + +#endif /* _SBSDRAM_H */ -diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm947xx/include/sbutils.h ---- linux.old/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sbutils.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sbutils.h linux-2.6.19/arch/mips/bcm947xx/include/sbutils.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sbutils.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sbutils.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,136 @@ +/* + * Misc utility routines for accessing chip-specific features @@ -10630,7 +10630,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm + * + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. -+ * ++ * + * THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + * KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + * SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS @@ -10642,9 +10642,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm +#ifndef _sbutils_h_ +#define _sbutils_h_ + -+/* -+ * Datastructure to export all chip specific common variables -+ * public (read-only) portion of sbutils handle returned by ++/* ++ * Datastructure to export all chip specific common variables ++ * public (read-only) portion of sbutils handle returned by + * sb_attach()/sb_kattach() +*/ + @@ -10730,7 +10730,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm +extern void sb_register_intr_callback(sb_t *sbh, void *intrsoff_fn, + void *intrsrestore_fn, void *intrsenabled_fn, void *intr_arg); +extern uint32 sb_set_initiator_to(sb_t *sbh, uint32 to); -+extern void sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice, ++extern void sb_corepciid(sb_t *sbh, uint16 *pcivendor, uint16 *pcidevice, + uint8 *pciclass, uint8 *pcisubclass, uint8 *pciprogif); +extern uint32 sb_gpiotimerval(sb_t *sbh, uint32 mask, uint32 val); + @@ -10760,9 +10760,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sbutils.h linux.dev/arch/mips/bcm +#define SB_DEVPATH_BUFSZ 16 /* min buffer size in bytes */ + +#endif /* _sbutils_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm947xx/include/sflash.h ---- linux.old/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/sflash.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/sflash.h linux-2.6.19/arch/mips/bcm947xx/include/sflash.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/sflash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/sflash.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,36 @@ +/* + * Broadcom SiliconBackplane chipcommon serial flash interface @@ -10800,9 +10800,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/sflash.h linux.dev/arch/mips/bcm9 +extern struct sflash * sflash_init(chipcregs_t *cc); + +#endif /* _sflash_h_ */ -diff -urN linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm947xx/include/trxhdr.h ---- linux.old/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/trxhdr.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/trxhdr.h linux-2.6.19/arch/mips/bcm947xx/include/trxhdr.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/trxhdr.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/trxhdr.h 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,33 @@ +/* + * TRX image file header format. @@ -10837,10 +10837,10 @@ diff -urN linux.old/arch/mips/bcm947xx/include/trxhdr.h linux.dev/arch/mips/bcm9 + +/* Compatibility */ +typedef struct trx_header TRXHDR, *PTRXHDR; -diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bcm947xx/include/typedefs.h ---- linux.old/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/include/typedefs.h 2006-11-03 21:10:13.000000000 +0100 -@@ -0,0 +1,326 @@ +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/include/typedefs.h linux-2.6.19/arch/mips/bcm947xx/include/typedefs.h +--- linux-2.6.19.ref/arch/mips/bcm947xx/include/typedefs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/include/typedefs.h 2006-12-04 21:33:48.000000000 +0100 +@@ -0,0 +1,322 @@ +/* + * Copyright 2005, Broadcom Corporation + * All Rights Reserved. @@ -10972,7 +10972,7 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc + +#else + -+#include <sys/types.h> ++#include <sys/types.h> + +#endif + @@ -10996,10 +10996,6 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc +#ifdef USE_TYPEDEF_DEFAULTS +#undef USE_TYPEDEF_DEFAULTS + -+#ifndef TYPEDEF_BOOL -+typedef /*@abstract@*/ unsigned char bool; -+#endif -+ +/*----------------------- define uchar, ushort, uint, ulong ------------------*/ + +#ifndef TYPEDEF_UCHAR @@ -11109,14 +11105,14 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc +/* Reclaiming text and data : + The following macros specify special linker sections that can be reclaimed + after a system is considered 'up'. -+ */ ++ */ +#if defined(__GNUC__) && defined(BCMRECLAIM) +extern bool bcmreclaimed; -+#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data##_ini ++#define BCMINITDATA(_data) __attribute__ ((__section__ (".dataini." #_data))) _data##_ini +#define BCMINITFN(_fn) __attribute__ ((__section__ (".textini." #_fn))) _fn##_ini +#define BCMINIT(_id) _id##_ini -+#else -+#define BCMINITDATA(_data) _data ++#else ++#define BCMINITDATA(_data) _data +#define BCMINITFN(_fn) _fn +#define BCMINIT(_id) _id +#define bcmreclaimed 0 @@ -11167,9 +11163,9 @@ diff -urN linux.old/arch/mips/bcm947xx/include/typedefs.h linux.dev/arch/mips/bc +#endif /* USE_TYPEDEF_DEFAULTS */ + +#endif /* _TYPEDEFS_H_ */ -diff -urN linux.old/arch/mips/bcm947xx/irq.c linux.dev/arch/mips/bcm947xx/irq.c ---- linux.old/arch/mips/bcm947xx/irq.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/irq.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/irq.c linux-2.6.19/arch/mips/bcm947xx/irq.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/irq.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/irq.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) @@ -11195,7 +11191,7 @@ diff -urN linux.old/arch/mips/bcm947xx/irq.c linux.dev/arch/mips/bcm947xx/irq.c + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/errno.h> +#include <linux/init.h> +#include <linux/interrupt.h> @@ -11218,26 +11214,26 @@ diff -urN linux.old/arch/mips/bcm947xx/irq.c linux.dev/arch/mips/bcm947xx/irq.c + clear_c0_status(cause); + + if (cause & CAUSEF_IP7) -+ do_IRQ(7, regs); ++ do_IRQ(7); + if (cause & CAUSEF_IP2) -+ do_IRQ(2, regs); ++ do_IRQ(2); + if (cause & CAUSEF_IP3) -+ do_IRQ(3, regs); ++ do_IRQ(3); + if (cause & CAUSEF_IP4) -+ do_IRQ(4, regs); ++ do_IRQ(4); + if (cause & CAUSEF_IP5) -+ do_IRQ(5, regs); ++ do_IRQ(5); + if (cause & CAUSEF_IP6) -+ do_IRQ(6, regs); ++ do_IRQ(6); +} + +void __init arch_init_irq(void) +{ + mips_cpu_irq_init(0); +} -diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Makefile ---- linux.old/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/Makefile 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/Makefile linux-2.6.19/arch/mips/bcm947xx/Makefile +--- linux-2.6.19.ref/arch/mips/bcm947xx/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/Makefile 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,6 @@ +# +# Makefile for the BCM47xx specific kernel interface routines @@ -11245,9 +11241,9 @@ diff -urN linux.old/arch/mips/bcm947xx/Makefile linux.dev/arch/mips/bcm947xx/Mak +# + +obj-y := irq.o prom.o setup.o time.o pci.o -diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c ---- linux.old/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/pci.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/pci.c linux-2.6.19/arch/mips/bcm947xx/pci.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/pci.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/pci.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,227 @@ +#include <linux/kernel.h> +#include <linux/init.h> @@ -11276,7 +11272,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +{ + int ret; + unsigned long flags; -+ ++ + spin_lock_irqsave(&sbh_lock, flags); + ret = sbpci_read_config(sbh, bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), reg, val, size); + spin_unlock_irqrestore(&sbh_lock, flags); @@ -11290,7 +11286,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +{ + int ret; + unsigned long flags; -+ ++ + spin_lock_irqsave(&sbh_lock, flags); + ret = sbpci_write_config(sbh, bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn), reg, &val, size); + spin_unlock_irqrestore(&sbh_lock, flags); @@ -11348,7 +11344,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +void bcm47xx_pci_init(void) +{ + unsigned long flags; -+ ++ + spin_lock_irqsave(&sbh_lock, flags); + sbpci_init(sbh); + spin_unlock_irqrestore(&sbh_lock, flags); @@ -11364,7 +11360,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c + unsigned long flags; + u8 irq; + uint idx; -+ ++ + /* external: use the irq of the pci core */ + if (dev->bus->number >= 1) { + spin_lock_irqsave(&sbh_lock, flags); @@ -11373,10 +11369,10 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c + irq = sb_irq(sbh); + sb_setcoreidx(sbh, idx); + spin_unlock_irqrestore(&sbh_lock, flags); -+ ++ + return irq + 2; + } -+ ++ + /* internal */ + pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq); + return irq + 2; @@ -11393,7 +11389,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c + + if (d->bus->number == 0) + return; -+ ++ + printk("PCI: Fixing up device %s\n", pci_name(d)); + + /* Fix up resource bases */ @@ -11424,13 +11420,13 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +{ + if (dev->bus->number != 1 || PCI_SLOT(dev->devfn) != 0) + return; -+ ++ + printk("PCI: fixing up bridge\n"); + + /* Enable PCI bridge bus mastering and memory space */ + pci_set_master(dev); + pcibios_enable_device(dev, ~0); -+ ++ + /* Enable PCI bridge BAR1 prefetch and burst */ + pci_write_config_dword(dev, PCI_BAR1_CONTROL, 3); +} @@ -11440,7 +11436,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +{ + uint coreidx; + unsigned long flags; -+ ++ + bcm47xx_fixup_device(dev); + + /* These cores come out of reset enabled */ @@ -11455,7 +11451,7 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c + spin_lock_irqsave(&sbh_lock, flags); + coreidx = sb_coreidx(sbh); + if (sb_setcoreidx(sbh, PCI_SLOT(dev->devfn)) && (sb_coreid(sbh) == SB_USB)) { -+ /* ++ /* + * The USB core requires a special bit to be set during core + * reset to enable host (OHCI) mode. Resetting the SB core in + * pcibios_enable_device() is a hack for compatibility with @@ -11476,9 +11472,9 @@ diff -urN linux.old/arch/mips/bcm947xx/pci.c linux.dev/arch/mips/bcm947xx/pci.c +} + +DECLARE_PCI_FIXUP_EARLY(PCI_ANY_ID, PCI_ANY_ID, bcm47xx_fixup_bridge); -diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom.c ---- linux.old/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/prom.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/prom.c linux-2.6.19/arch/mips/bcm947xx/prom.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/prom.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/prom.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) @@ -11527,7 +11523,7 @@ diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom. + + /* Figure out memory size by finding aliases */ + for (mem = (1 << 20); mem < (128 << 20); mem += (1 << 20)) { -+ if (*(unsigned long *)((unsigned long)(prom_init) + mem) == ++ if (*(unsigned long *)((unsigned long)(prom_init) + mem) == + *(unsigned long *)(prom_init)) + break; + } @@ -11539,10 +11535,10 @@ diff -urN linux.old/arch/mips/bcm947xx/prom.c linux.dev/arch/mips/bcm947xx/prom. +{ + return 0; +} -diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setup.c ---- linux.old/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/setup.c 2006-11-03 21:10:13.000000000 +0100 -@@ -0,0 +1,158 @@ +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/setup.c linux-2.6.19/arch/mips/bcm947xx/setup.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/setup.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/setup.c 2006-12-04 21:33:48.000000000 +0100 +@@ -0,0 +1,156 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) + * Copyright (C) 2005 Waldemar Brodkorb <wbx@openwrt.org> @@ -11592,7 +11588,6 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu + +extern void bcm47xx_pci_init(void); +extern void bcm47xx_time_init(void); -+extern void bcm47xx_timer_setup(struct irqaction *irq); +void *sbh; +spinlock_t sbh_lock = SPIN_LOCK_UNLOCKED; +int boardflags; @@ -11627,7 +11622,7 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu + uint baud_base; + uint reg_shift; + struct uart_port s; -+ ++ + regs = port->regs; + irq = port->irq; + baud_base = port->baud_base; @@ -11651,7 +11646,7 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu +static void bcm47xx_machine_restart(char *command) +{ + printk("Please stand by while rebooting the system...\n"); -+ ++ + /* Set the watchdog timer to reset immediately */ + local_irq_disable(); + sb_watchdog(sbh, 1); @@ -11666,11 +11661,11 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu + while (1); +} + -+void __init plat_setup(void) ++void __init plat_mem_setup(void) +{ + char *s; + int i; -+ ++ + sbh = (void *) sb_kattach(); + sb_mips_init(sbh); + @@ -11695,15 +11690,14 @@ diff -urN linux.old/arch/mips/bcm947xx/setup.c linux.dev/arch/mips/bcm947xx/setu + pm_power_off = bcm47xx_machine_halt; + + board_time_init = bcm47xx_time_init; -+ board_timer_setup = bcm47xx_timer_setup; +} + +EXPORT_SYMBOL(sbh); +EXPORT_SYMBOL(sbh_lock); +EXPORT_SYMBOL(boardflags); -diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time.c ---- linux.old/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux.dev/arch/mips/bcm947xx/time.c 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/bcm947xx/time.c linux-2.6.19/arch/mips/bcm947xx/time.c +--- linux-2.6.19.ref/arch/mips/bcm947xx/time.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19/arch/mips/bcm947xx/time.c 2006-12-04 21:33:48.000000000 +0100 @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2004 Florian Schirmer (jolt@tuxbox.org) @@ -11729,7 +11723,7 @@ diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time. + * 675 Mass Ave, Cambridge, MA 02139, USA. + */ + -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/init.h> +#include <linux/kernel.h> +#include <linux/sched.h> @@ -11765,15 +11759,15 @@ diff -urN linux.old/arch/mips/bcm947xx/time.c linux.dev/arch/mips/bcm947xx/time. +} + +void __init -+bcm47xx_timer_setup(struct irqaction *irq) ++plat_timer_setup(struct irqaction *irq) +{ + /* Enable the timer interrupt */ + setup_irq(7, irq); +} -diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig ---- linux.old/arch/mips/Kconfig 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/arch/mips/Kconfig 2006-11-03 21:10:13.000000000 +0100 -@@ -245,6 +245,17 @@ +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-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/arch/mips/Kconfig 2006-12-04 21:33:48.000000000 +0100 +@@ -222,6 +222,17 @@ Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and Olivetti M700-10 workstations. @@ -11791,10 +11785,10 @@ diff -urN linux.old/arch/mips/Kconfig linux.dev/arch/mips/Kconfig config LASAT bool "LASAT Networks platforms" select DMA_NONCOHERENT -diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu-probe.c ---- linux.old/arch/mips/kernel/cpu-probe.c 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/arch/mips/kernel/cpu-probe.c 2006-11-03 21:10:13.000000000 +0100 -@@ -691,6 +691,28 @@ +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-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/arch/mips/kernel/cpu-probe.c 2006-12-04 21:33:48.000000000 +0100 +@@ -723,6 +723,28 @@ } @@ -11823,7 +11817,7 @@ diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu- __init void cpu_probe(void) { struct cpuinfo_mips *c = ¤t_cpu_data; -@@ -713,6 +735,9 @@ +@@ -745,6 +767,9 @@ case PRID_COMP_SIBYTE: cpu_probe_sibyte(c); break; @@ -11833,9 +11827,9 @@ diff -urN linux.old/arch/mips/kernel/cpu-probe.c linux.dev/arch/mips/kernel/cpu- case PRID_COMP_SANDCRAFT: cpu_probe_sandcraft(c); break; -diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S ---- linux.old/arch/mips/kernel/head.S 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/arch/mips/kernel/head.S 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/arch/mips/kernel/head.S linux-2.6.19/arch/mips/kernel/head.S +--- linux-2.6.19.ref/arch/mips/kernel/head.S 2006-12-04 21:30:35.000000000 +0100 ++++ linux-2.6.19/arch/mips/kernel/head.S 2006-12-04 21:33:48.000000000 +0100 @@ -133,6 +133,11 @@ j kernel_entry nop @@ -11848,10 +11842,10 @@ diff -urN linux.old/arch/mips/kernel/head.S linux.dev/arch/mips/kernel/head.S /* * Reserved space for exception handlers. * Necessary for machines which link their kernels at KSEG0. -diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c ---- linux.old/arch/mips/kernel/proc.c 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/arch/mips/kernel/proc.c 2006-11-03 21:10:13.000000000 +0100 -@@ -84,6 +84,8 @@ +diff -urN linux-2.6.19.ref/arch/mips/kernel/proc.c linux-2.6.19/arch/mips/kernel/proc.c +--- linux-2.6.19.ref/arch/mips/kernel/proc.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/arch/mips/kernel/proc.c 2006-12-04 21:33:48.000000000 +0100 +@@ -83,6 +83,8 @@ [CPU_VR4181] = "NEC VR4181", [CPU_VR4181A] = "NEC VR4181A", [CPU_SR71000] = "Sandcraft SR71000", @@ -11860,10 +11854,10 @@ diff -urN linux.old/arch/mips/kernel/proc.c linux.dev/arch/mips/kernel/proc.c [CPU_PR4450] = "Philips PR4450", }; -diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile ---- linux.old/arch/mips/Makefile 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/arch/mips/Makefile 2006-11-03 21:10:13.000000000 +0100 -@@ -565,6 +565,13 @@ +diff -urN linux-2.6.19.ref/arch/mips/Makefile linux-2.6.19/arch/mips/Makefile +--- linux-2.6.19.ref/arch/mips/Makefile 2006-12-04 21:31:44.000000000 +0100 ++++ linux-2.6.19/arch/mips/Makefile 2006-12-04 21:33:48.000000000 +0100 +@@ -571,6 +571,13 @@ load-$(CONFIG_SIBYTE_BIGSUR) := 0xffffffff80100000 # @@ -11877,10 +11871,10 @@ diff -urN linux.old/arch/mips/Makefile linux.dev/arch/mips/Makefile # SNI RM200 PCI # core-$(CONFIG_SNI_RM200_PCI) += arch/mips/sni/ -diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c ---- linux.old/arch/mips/mm/tlbex.c 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/arch/mips/mm/tlbex.c 2006-11-03 21:15:12.000000000 +0100 -@@ -882,6 +882,8 @@ +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-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/arch/mips/mm/tlbex.c 2006-12-04 21:33:48.000000000 +0100 +@@ -880,6 +880,8 @@ case CPU_4KSC: case CPU_20KC: case CPU_25KF: @@ -11889,12 +11883,12 @@ diff -urN linux.old/arch/mips/mm/tlbex.c linux.dev/arch/mips/mm/tlbex.c tlbw(p); break; -diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/bootinfo.h ---- linux.old/include/asm-mips/bootinfo.h 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/include/asm-mips/bootinfo.h 2006-11-03 21:10:13.000000000 +0100 -@@ -218,6 +218,12 @@ - #define MACH_GROUP_TITAN 22 /* PMC-Sierra Titan */ - #define MACH_TITAN_YOSEMITE 1 /* PMC-Sierra Yosemite */ +diff -urN linux-2.6.19.ref/include/asm-mips/bootinfo.h linux-2.6.19/include/asm-mips/bootinfo.h +--- linux-2.6.19.ref/include/asm-mips/bootinfo.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/include/asm-mips/bootinfo.h 2006-12-04 21:33:48.000000000 +0100 +@@ -212,6 +212,12 @@ + #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ + #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ +/* + * Valid machtype for group Broadcom @@ -11905,9 +11899,9 @@ diff -urN linux.old/include/asm-mips/bootinfo.h linux.dev/include/asm-mips/booti #define CL_SIZE COMMAND_LINE_SIZE 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-11-03 21:16:21.000000000 +0100 -+++ linux.dev/include/asm-mips/cpu.h 2006-11-03 21:10:13.000000000 +0100 +diff -urN linux-2.6.19.ref/include/asm-mips/cpu.h linux-2.6.19/include/asm-mips/cpu.h +--- linux-2.6.19.ref/include/asm-mips/cpu.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/include/asm-mips/cpu.h 2006-12-04 21:33:48.000000000 +0100 @@ -104,6 +104,13 @@ #define PRID_IMP_SR71000 0x0400 @@ -11933,20 +11927,20 @@ diff -urN linux.old/include/asm-mips/cpu.h linux.dev/include/asm-mips/cpu.h /* * ISA Level encodings -diff -urN linux.old/include/linux/pci_ids.h linux.dev/include/linux/pci_ids.h ---- linux.old/include/linux/pci_ids.h 2006-11-03 21:16:21.000000000 +0100 -+++ linux.dev/include/linux/pci_ids.h 2006-11-03 21:10:13.000000000 +0100 -@@ -1906,6 +1906,7 @@ - #define PCI_DEVICE_ID_TIGON3_5901_2 0x170e +diff -urN linux-2.6.19.ref/include/linux/pci_ids.h linux-2.6.19/include/linux/pci_ids.h +--- linux-2.6.19.ref/include/linux/pci_ids.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/include/linux/pci_ids.h 2006-12-04 21:33:48.000000000 +0100 +@@ -1950,6 +1950,7 @@ + #define PCI_DEVICE_ID_TIGON3_5906M 0x1713 #define PCI_DEVICE_ID_BCM4401 0x4401 #define PCI_DEVICE_ID_BCM4401B0 0x4402 +#define PCI_DEVICE_ID_BCM4713 0x4713 #define PCI_VENDOR_ID_TOPIC 0x151f #define PCI_DEVICE_ID_TOPIC_TP560 0x0000 -diff -urN linux.old/lib/kobject_uevent.c linux.dev/lib/kobject_uevent.c ---- linux.old/lib/kobject_uevent.c 2006-06-18 03:49:35.000000000 +0200 -+++ linux.dev/lib/kobject_uevent.c 2006-11-03 21:44:56.000000000 +0100 +diff -urN linux-2.6.19.ref/lib/kobject_uevent.c linux-2.6.19/lib/kobject_uevent.c +--- linux-2.6.19.ref/lib/kobject_uevent.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19/lib/kobject_uevent.c 2006-12-04 21:33:48.000000000 +0100 @@ -29,6 +29,7 @@ u64 uevent_seqnum; char uevent_helper[UEVENT_HELPER_PATH_LEN] = "/sbin/hotplug"; diff --git a/target/linux/brcm-2.6/patches/002-flash-map.patch b/target/linux/brcm-2.6/patches/002-flash-map.patch index a1cbe03290..3c805cb4c9 100644 --- a/target/linux/brcm-2.6/patches/002-flash-map.patch +++ b/target/linux/brcm-2.6/patches/002-flash-map.patch @@ -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 diff --git a/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch b/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch index d0487fb926..d9e4dd78bb 100644 --- a/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch +++ b/target/linux/brcm-2.6/patches/003-bcm4710_cache_fixes.patch @@ -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 diff --git a/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch b/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch index 15e4297a81..d327670978 100644 --- a/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch +++ b/target/linux/brcm-2.6/patches/004-b44_bcm47xx_support.patch @@ -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 diff --git a/target/linux/brcm-2.6/patches/005-remove_scache.patch b/target/linux/brcm-2.6/patches/005-remove_scache.patch new file mode 100644 index 0000000000..f56f72f176 --- /dev/null +++ b/target/linux/brcm-2.6/patches/005-remove_scache.patch @@ -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 diff --git a/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch b/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch index 51206296bc..2a9282aa0b 100644 --- a/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch +++ b/target/linux/brcm-2.6/patches/010-bcm47xx-cam_absent.patch @@ -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 */ diff --git a/target/linux/brcm63xx-2.6/Makefile b/target/linux/brcm63xx-2.6/Makefile index d7b71c803e..25c3baa841 100644 --- a/target/linux/brcm63xx-2.6/Makefile +++ b/target/linux/brcm63xx-2.6/Makefile @@ -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 diff --git a/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch b/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch index e6befc7f01..3b8b2597ca 100644 --- a/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch +++ b/target/linux/brcm63xx-2.6/patches/001-bcm963xx.patch @@ -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 diff --git a/target/linux/generic-2.6/config-template b/target/linux/generic-2.6/config-template new file mode 100644 index 0000000000..99eba5b3fe --- /dev/null +++ b/target/linux/generic-2.6/config-template @@ -0,0 +1,1191 @@ +# CONFIG_6PACK is not set +# CONFIG_8139CP is not set +# CONFIG_9P_FS is not set +# CONFIG_ACENIC is not set +# CONFIG_ACORN_PARTITION is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_AIRO=m +CONFIG_AIRO_CS=m +# CONFIG_AMD8111_ETH is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_APPLICOM is not set +CONFIG_ARCH_FLATMEM_ENABLE=y +# CONFIG_ARCNET is not set +CONFIG_ARPD=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_ATA is not set +# CONFIG_ATALK is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_ATM=m +CONFIG_ATMEL=m +# CONFIG_ATM_AMBASSADOR is not set +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_DUMMY=m +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_LANAI is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +# CONFIG_ATM_NICSTAR is not set +CONFIG_ATM_TCP=m +# CONFIG_ATM_ZATM is not set +# CONFIG_AUDIT is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BASE_FULL=y +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +CONFIG_BCM43XX_PIO=y +# CONFIG_BCM43XX_PIO_MODE is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_DAC960 is not set +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_SD=m +# CONFIG_BLK_DEV_SR is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLOCK=y +# CONFIG_BNX2 is not set +CONFIG_BONDING=m +# CONFIG_BPQETHER is not set +CONFIG_BRIDGE=y +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BROKEN_ON_SMP=y +CONFIG_BSD_DISKLABEL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_BT=m +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBPA10X=m +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIDTL1 is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIVHCI=m +CONFIG_BT_HIDP=m +CONFIG_BT_L2CAP=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_SCO=m +CONFIG_BUG=y +CONFIG_CARDBUS=y +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_CASSINI is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_CHELSIO_T1 is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CICADA_PHY is not set +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CLS_U32_MARK=y +CONFIG_CLS_U32_PERF=y +CONFIG_CMDLINE="" +# CONFIG_CODA_FS is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_CONNECTOR is not set +# CONFIG_CRAMFS is not set +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +CONFIG_CROSSCOMPILE=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_WP512=m +# CONFIG_DAVICOM_PHY is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DECNET is not set +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_BIC is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_CUBIC is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_HTCP is not set +CONFIG_DEFAULT_IOSCHED="deadline" +# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="vegas" +CONFIG_DEFAULT_VEGAS=y +# CONFIG_DEFAULT_WESTWOOD is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DGRS is not set +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_DL2K is not set +# CONFIG_DMA_ENGINE is not set +# CONFIG_DNOTIFY is not set +# CONFIG_DRM is not set +# CONFIG_DTLK is not set +# CONFIG_DUMMY is not set +# CONFIG_DVB is not set +CONFIG_E100=m +# CONFIG_E1000 is not set +# CONFIG_ECONET is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EFS_FS is not set +# CONFIG_ELF_CORE is not set +CONFIG_EMBEDDED=y +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_EPIC100 is not set +CONFIG_EPOLL=y +# CONFIG_EQUALIZER is not set +CONFIG_EXPERIMENTAL=y +CONFIG_EXPORTFS=m +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# 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_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_FAT_FS=m +# CONFIG_FB is not set +# CONFIG_FDDI is not set +# CONFIG_FEALNX is not set +CONFIG_FIB_RULES=y +CONFIG_FLATMEM=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_FORCEDETH is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_FTL is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set +# CONFIG_FUSION_SPI is not set +CONFIG_FUTEX=y +CONFIG_FW_LOADER=y +CONFIG_GACT_PROB=y +# CONFIG_GAMEPORT is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_TIME=y +# CONFIG_GFS2_FS is not set +# CONFIG_HAMACHI is not set +CONFIG_HAMRADIO=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_HERMES=m +CONFIG_HFSPLUS_FS=m +CONFIG_HFS_FS=m +# CONFIG_HIPPI is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_CS=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_PLX=m +CONFIG_HOTPLUG=y +# CONFIG_HOTPLUG_PCI is not set +# CONFIG_HP100 is not set +# CONFIG_HPFS_FS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set +# CONFIG_HZ_1000 is not set +# CONFIG_I2O is not set +# CONFIG_I82092 is not set +# CONFIG_IEEE1394 is not set +CONFIG_IEEE80211=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_IFB=m +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 +CONFIG_INET=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET_AH=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_INET_DIAG=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_TCP_DIAG=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_TUNNEL=m +# CONFIG_INFINIBAND is not set +# CONFIG_INFTL is not set +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_INPUT is not set +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m +# CONFIG_IPC_NS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y +CONFIG_IPV6=m +# CONFIG_IPV6_MIP6 is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_PRIVACY is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_TUNNEL is not set +CONFIG_IPW2100=m +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2200=m +# CONFIG_IPW2200_DEBUG is not set +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPX is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_DCCP=m +CONFIG_IP_DCCP_ACKVEC=y +CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_IP_NF_CONNTRACK=y +# CONFIG_IP_NF_CONNTRACK_EVENTS is not set +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_FTP=m +CONFIG_IP_NF_H323=m +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_IPRANGE=m +CONFIG_IP_NF_MATCH_LAYER7=m +# CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_NAT_AMANDA=m +CONFIG_IP_NF_NAT_FTP=m +CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_SIP=m +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_TFTP=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SET=m +CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_IPTREE=m +CONFIG_IP_NF_SET_MACIPMAP=m +CONFIG_IP_NF_SET_MAX=256 +CONFIG_IP_NF_SET_NETHASH=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_IMQ=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +CONFIG_IP_NF_TARGET_SAME=m +CONFIG_IP_NF_TARGET_SET=m +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_SCTP is not set +# CONFIG_IP_VS is not set +# CONFIG_IRDA is not set +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISDN is not set +CONFIG_ISO9660_FS=m +# CONFIG_IXGB is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS_FS is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_JOLIET=y +# CONFIG_KALLSYMS is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_KEYS is not set +# CONFIG_KMOD is not set +# CONFIG_LAPB is not set +# CONFIG_LASAT is not set +# CONFIG_LBD is not set +# CONFIG_LDM_PARTITION is not set +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_TIMER=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_LIBCRC32C=m +CONFIG_LLC=y +CONFIG_LLC2=m +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCKD=m +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_LOCKD_V4=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_LSF is not set +# CONFIG_LXT_PHY is not set +CONFIG_MAC_PARTITION=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MARKEINS is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_MD is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_SAS is not set +CONFIG_MII=y +CONFIG_MINIX_FS=m +# CONFIG_MINIX_SUBPARTITION is not set +CONFIG_MKISS=m +# CONFIG_MMC is not set +CONFIG_MMU=y +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +CONFIG_MSDOS_FS=m +CONFIG_MSDOS_PARTITION=y +# CONFIG_MYRI10GE is not set +# CONFIG_NCP_FS is not set +CONFIG_NET=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETDEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +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 +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=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +# CONFIG_NETPOLL is not set +# CONFIG_NETROM is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_ACT_GACT=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_POLICE=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS=y +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_CLS_POLICE=y +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_U32=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_ESTIMATOR=y +CONFIG_NET_ETHERNET=y +# CONFIG_NET_FC is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_NET_IPIP=m +CONFIG_NET_KEY=m +CONFIG_NET_PCI=y +# CONFIG_NET_PCMCIA is not set +CONFIG_NET_PKTGEN=m +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NET_RADIO=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_CBQ=m +# CONFIG_NET_SCH_CLK_CPU is not set +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +CONFIG_NET_SCH_CLK_JIFFIES=y +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_TEQL=m +# CONFIG_NET_TULIP is not set +CONFIG_NET_WIRELESS=y +CONFIG_NET_WIRELESS_RTNETLINK=y +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_TCP=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFS_COMMON=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFTL is not set +CONFIG_NLS=m +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_ISO8859_9 is not set +CONFIG_NLS_KOI8_R=m +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m +CONFIG_NORTEL_HERMES=m +# CONFIG_NS83820 is not set +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +# CONFIG_OCFS2_FS is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_PARPORT is not set +CONFIG_PARTITION_ADVANCED=y +CONFIG_PCCARD=m +CONFIG_PCCARD_NONSTATIC=m +CONFIG_PCI=y +CONFIG_PCI_ATMEL=m +CONFIG_PCI_HERMES=m +CONFIG_PCMCIA=m +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_HERMES is not set +# CONFIG_PCMCIA_IOCTL is not set +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_RAYCS is not set +# CONFIG_PCMCIA_SPECTRUM is not set +# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_WL3501 is not set +# CONFIG_PCNET32 is not set +# CONFIG_PD6729 is not set +# CONFIG_PHONE is not set +# CONFIG_PHYLIB is not set +CONFIG_PLIST=y +CONFIG_PLX_HERMES=m +# CONFIG_POSIX_MQUEUE is not set +CONFIG_PPP=m +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_PRINTK=y +# CONFIG_PRINTK_TIME is not set +CONFIG_PRISM54=m +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROFILING is not set +# CONFIG_QEMU is not set +# CONFIG_QLA3XXX is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_R3964 is not set +# CONFIG_R8169 is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RAID_ATTRS is not set +CONFIG_RAMFS=y +# CONFIG_RAW_DRIVER is not set +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_RELAY is not set +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_RFD_FTL is not set +CONFIG_ROMFS_FS=m +# CONFIG_ROSE is not set +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_RTC_CLASS is not set +CONFIG_RT_MUTEXES=y +# CONFIG_S2IO is not set +CONFIG_SCSI=m +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_ARCMSR is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_LPFC is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_NSP32 is not set +CONFIG_SCSI_PROC_FS=y +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_STEX is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SECURITY is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_CS=m +CONFIG_SERIAL_8250_NR_UARTS=2 +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_SERIO is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_SHAPER is not set +CONFIG_SHMEM=y +# CONFIG_SIS190 is not set +# CONFIG_SIS900 is not set +# CONFIG_SK98LIN is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +CONFIG_SLAB=y +CONFIG_SLHC=m +# CONFIG_SLIP is not set +# CONFIG_SLOB is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_SND=m +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# 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_DARLA24 is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +CONFIG_SND_HWDEP=m +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_MIXART is not set +CONFIG_SND_MIXER_OSS=m +# CONFIG_SND_MONA is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_NM256 is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_PDAUDIOCF is not set +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_TIMER=m +# CONFIG_SND_TRIDENT is not set +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_VXPOCKET is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +CONFIG_SOUND=m +# CONFIG_SOUND_PRIME is not set +# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_SSFDC is not set +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_STANDALONE=y +# CONFIG_STRIP is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNGEM is not set +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +# CONFIG_SUN_PARTITION is not set +CONFIG_SWAP=y +# CONFIG_SYNCLINK_CS is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_SYSCTL=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +# CONFIG_SYSV_FS is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_TASKSTATS is not set +# CONFIG_TCG_TPM is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_TEXTSEARCH_KMP=m +# CONFIG_TIFM_CORE is not set +# CONFIG_TIGON3 is not set +# CONFIG_TINY_SHMEM is not set +# CONFIG_TIPC is not set +# CONFIG_TLAN is not set +CONFIG_TMD_HERMES=m +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TR is not set +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TUN=m +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y +# CONFIG_UFS_FS is not set +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_UNIX=y +CONFIG_UNIX98_PTYS=y +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_USB=m +# CONFIG_USB_ACECAD is not set +CONFIG_USB_ACM=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_APPLETOUCH is not set +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +CONFIG_USB_ATM=m +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_CATC=m +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_DABUSB is not set +# CONFIG_USB_DEBUG is not set +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_EZUSB=y +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_HID is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_KAWETH=m +# CONFIG_USB_KBD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LIBUSUAL is not set +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_MOUSE is not set +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_OTG is not set +CONFIG_USB_PEGASUS=m +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_POWERMATE is not set +CONFIG_USB_PRINTER=m +# CONFIG_USB_RIO500 is not set +CONFIG_USB_RTL8150=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_XIRCOM=m +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_SL811_HCD is not set +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_STORAGE=m +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_KARMA=y +# CONFIG_USB_STORAGE_ONETOUCH is not set +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_USBAT=y +# CONFIG_USB_TEST is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_USBNET=m +CONFIG_USB_USBNET_MII=m +# CONFIG_USB_WACOM is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_XUSBATM is not set +# CONFIG_USB_YEALINK is not set +CONFIG_USB_ZD1201=m +# CONFIG_UTS_NS is not set +CONFIG_VFAT_FS=m +# CONFIG_VIA_VELOCITY is not set +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_VLAN_8021Q=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_VT is not set +# CONFIG_VXFS_FS is not set +# CONFIG_W1 is not set +# CONFIG_WAN is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_WDTPCI is not set +CONFIG_WIRELESS_EXT=y +# CONFIG_WR_PPMC is not set +# CONFIG_X25 is not set +CONFIG_XFRM=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_USER=m +CONFIG_XFS_FS=m +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_YAM is not set +# CONFIG_YELLOWFIN is not set +CONFIG_YENTA=m +# CONFIG_YENTA_O2 is not set +# CONFIG_YENTA_RICOH is not set +# CONFIG_YENTA_TI is not set +# CONFIG_YENTA_TOSHIBA is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/generic-2.6/patches/000-reenable_devfs.patch b/target/linux/generic-2.6/patches/000-reenable_devfs.patch deleted file mode 100644 index 7871c4c378..0000000000 --- a/target/linux/generic-2.6/patches/000-reenable_devfs.patch +++ /dev/null @@ -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 */ diff --git a/target/linux/generic-2.6/patches/000-reinstate-devfs.patch b/target/linux/generic-2.6/patches/000-reinstate-devfs.patch new file mode 100644 index 0000000000..aff55a98ac --- /dev/null +++ b/target/linux/generic-2.6/patches/000-reinstate-devfs.patch @@ -0,0 +1,12377 @@ +diff -urN linux-2.6.19.old/arch/cris/arch-v10/kernel/debugport.c linux-2.6.19.dev/arch/cris/arch-v10/kernel/debugport.c +--- linux-2.6.19.old/arch/cris/arch-v10/kernel/debugport.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/cris/arch-v10/kernel/debugport.c 2006-12-14 03:12:59.000000000 +0100 +@@ -540,7 +540,7 @@ + dummy_driver.init_termios = tty_std_termios; + dummy_driver.init_termios.c_cflag = + B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ +- dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + + dummy_driver.open = dummy_open; + dummy_driver.close = dummy_close; +diff -urN linux-2.6.19.old/arch/cris/arch-v32/kernel/debugport.c linux-2.6.19.dev/arch/cris/arch-v32/kernel/debugport.c +--- linux-2.6.19.old/arch/cris/arch-v32/kernel/debugport.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/cris/arch-v32/kernel/debugport.c 2006-12-14 03:12:59.000000000 +0100 +@@ -352,7 +352,7 @@ + dummy_driver.init_termios = tty_std_termios; + dummy_driver.init_termios.c_cflag = + B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ +- dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ dummy_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + + dummy_driver.open = dummy_open; + dummy_driver.close = dummy_close; +diff -urN linux-2.6.19.old/arch/i386/kernel/microcode.c linux-2.6.19.dev/arch/i386/kernel/microcode.c +--- linux-2.6.19.old/arch/i386/kernel/microcode.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/i386/kernel/microcode.c 2006-12-14 03:12:59.000000000 +0100 +@@ -460,6 +460,7 @@ + static struct miscdevice microcode_dev = { + .minor = MICROCODE_MINOR, + .name = "microcode", ++ .devfs_name = "cpu/microcode", + .fops = µcode_fops, + }; + +diff -urN linux-2.6.19.old/arch/ppc/4xx_io/serial_sicc.c linux-2.6.19.dev/arch/ppc/4xx_io/serial_sicc.c +--- linux-2.6.19.old/arch/ppc/4xx_io/serial_sicc.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/ppc/4xx_io/serial_sicc.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1757,7 +1757,7 @@ + siccnormal_driver->subtype = SERIAL_TYPE_NORMAL; + siccnormal_driver->init_termios = tty_std_termios; + siccnormal_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; +- siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ siccnormal_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + tty_set_operations(siccnormal_driver, &sicc_ops); + + if (tty_register_driver(siccnormal_driver)) +diff -urN linux-2.6.19.old/arch/sparc64/solaris/socksys.c linux-2.6.19.dev/arch/sparc64/solaris/socksys.c +--- linux-2.6.19.old/arch/sparc64/solaris/socksys.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/sparc64/solaris/socksys.c 2006-12-14 03:12:59.000000000 +0100 +@@ -26,6 +26,7 @@ + #include <linux/slab.h> + #include <linux/syscalls.h> + #include <linux/in.h> ++#include <linux/devfs_fs_kernel.h> + + #include <net/sock.h> + +@@ -188,6 +189,8 @@ + return ret; + } + ++ devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUSR|S_IWUSR, "socksys"); ++ + file = fcheck(ret); + /* N.B. Is this valid? Suppose the f_ops are in a module ... */ + socksys_file_ops = *file->f_op; +@@ -202,4 +205,5 @@ + { + if (unregister_chrdev(30, "socksys")) + printk ("Couldn't unregister socksys character device\n"); ++ devfs_remove ("socksys"); + } +diff -urN linux-2.6.19.old/arch/um/drivers/line.c linux-2.6.19.dev/arch/um/drivers/line.c +--- linux-2.6.19.old/arch/um/drivers/line.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/um/drivers/line.c 2006-12-14 03:12:59.000000000 +0100 +@@ -8,6 +8,7 @@ + #include "linux/list.h" + #include "linux/kd.h" + #include "linux/interrupt.h" ++#include "linux/devfs_fs_kernel.h" + #include "asm/uaccess.h" + #include "chan_kern.h" + #include "irq_user.h" +@@ -653,6 +654,7 @@ + + driver->driver_name = line_driver->name; + driver->name = line_driver->device_name; ++ driver->devfs_name = line_driver->devfs_name; + driver->major = line_driver->major; + driver->minor_start = line_driver->minor_start; + driver->type = line_driver->type; +diff -urN linux-2.6.19.old/arch/um/drivers/ssl.c linux-2.6.19.dev/arch/um/drivers/ssl.c +--- linux-2.6.19.old/arch/um/drivers/ssl.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/um/drivers/ssl.c 2006-12-14 03:12:59.000000000 +0100 +@@ -53,6 +53,7 @@ + static struct line_driver driver = { + .name = "UML serial line", + .device_name = "ttyS", ++ .devfs_name = "tts/", + .major = TTY_MAJOR, + .minor_start = 64, + .type = TTY_DRIVER_TYPE_SERIAL, +diff -urN linux-2.6.19.old/arch/um/drivers/stdio_console.c linux-2.6.19.dev/arch/um/drivers/stdio_console.c +--- linux-2.6.19.old/arch/um/drivers/stdio_console.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/um/drivers/stdio_console.c 2006-12-14 03:12:59.000000000 +0100 +@@ -59,6 +59,7 @@ + static struct line_driver driver = { + .name = "UML console", + .device_name = "tty", ++ .devfs_name = "vc/", + .major = TTY_MAJOR, + .minor_start = 0, + .type = TTY_DRIVER_TYPE_CONSOLE, +diff -urN linux-2.6.19.old/arch/um/drivers/ubd_kern.c linux-2.6.19.dev/arch/um/drivers/ubd_kern.c +--- linux-2.6.19.old/arch/um/drivers/ubd_kern.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/um/drivers/ubd_kern.c 2006-12-14 03:12:59.000000000 +0100 +@@ -24,6 +24,7 @@ + #include "linux/blkdev.h" + #include "linux/hdreg.h" + #include "linux/init.h" ++#include "linux/devfs_fs_kernel.h" + #include "linux/cdrom.h" + #include "linux/proc_fs.h" + #include "linux/ctype.h" +@@ -645,10 +646,14 @@ + disk->first_minor = unit << UBD_SHIFT; + disk->fops = &ubd_blops; + set_capacity(disk, size / 512); +- if(major == MAJOR_NR) ++ if(major == MAJOR_NR){ + sprintf(disk->disk_name, "ubd%c", 'a' + unit); +- else ++ sprintf(disk->devfs_name, "ubd/disc%d", unit); ++ } ++ else { + sprintf(disk->disk_name, "ubd_fake%d", unit); ++ sprintf(disk->devfs_name, "ubd_fake/disc%d", unit); ++ } + + /* sysfs register (not for ide fake devices) */ + if (major == MAJOR_NR) { +@@ -853,6 +864,7 @@ + { + int i; + ++ devfs_mk_dir("ubd"); + if (register_blkdev(MAJOR_NR, "ubd")) + return -1; + +@@ -866,6 +878,7 @@ + char name[sizeof("ubd_nnn\0")]; + + snprintf(name, sizeof(name), "ubd_%d", fake_major); ++ devfs_mk_dir(name); + if (register_blkdev(fake_major, "ubd")) + return -1; + } +diff -urN linux-2.6.19.old/arch/um/include/line.h linux-2.6.19.dev/arch/um/include/line.h +--- linux-2.6.19.old/arch/um/include/line.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/arch/um/include/line.h 2006-12-14 03:12:59.000000000 +0100 +@@ -17,6 +17,7 @@ + struct line_driver { + char *name; + char *device_name; ++ char *devfs_name; + short major; + short minor_start; + short type; +diff -urN linux-2.6.19.old/Documentation/Changes linux-2.6.19.dev/Documentation/Changes +--- linux-2.6.19.old/Documentation/Changes 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/Changes 2006-12-14 03:12:59.000000000 +0100 +@@ -180,8 +180,8 @@ + -------------------- + + A driver has been added to allow updating of Intel IA32 microcode, +-accessible as a normal (misc) character device. If you are not using +-udev you may need to: ++accessible as both a devfs regular file and as a normal (misc) ++character device. If you are not using devfs you may need to: + + mkdir /dev/cpu + mknod /dev/cpu/microcode c 10 184 +@@ -200,9 +200,7 @@ + udev + ---- + udev is a userspace application for populating /dev dynamically with +-only entries for devices actually present. udev replaces the basic +-functionality of devfs, while allowing persistant device naming for +-devices. ++only entries for devices actually present. udev replaces devfs. + + FUSE + ---- +@@ -232,13 +230,18 @@ + enable it to operate over diverse media layers. If you use PPP, + upgrade pppd to at least 2.4.0. + +-If you are not using udev, you must have the device file /dev/ppp ++If you are not using devfs, you must have the device file /dev/ppp + which can be made by: + + mknod /dev/ppp c 108 0 + + as root. + ++If you use devfsd and build ppp support as modules, you will need ++the following in your /etc/devfsd.conf file: ++ ++LOOKUP PPP MODLOAD ++ + Isdn4k-utils + ------------ + +diff -urN linux-2.6.19.old/Documentation/DocBook/kernel-api.tmpl linux-2.6.19.dev/Documentation/DocBook/kernel-api.tmpl +--- linux-2.6.19.old/Documentation/DocBook/kernel-api.tmpl 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/DocBook/kernel-api.tmpl 2006-12-14 03:12:59.000000000 +0100 +@@ -84,6 +84,9 @@ + !Ekernel/rcupdate.c + </sect1> + ++ <chapter id="devfs"> ++ <title>The Device File System</title> ++!Efs/devfs/base.c + </chapter> + + <chapter id="adt"> +diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/boot-options linux-2.6.19.dev/Documentation/filesystems/devfs/boot-options +--- linux-2.6.19.old/Documentation/filesystems/devfs/boot-options 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/filesystems/devfs/boot-options 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,65 @@ ++/* -*- auto-fill -*- */ ++ ++ Device File System (devfs) Boot Options ++ ++ Richard Gooch <rgooch@atnf.csiro.au> ++ ++ 18-AUG-2001 ++ ++ ++When CONFIG_DEVFS_DEBUG is enabled, you can pass several boot options ++to the kernel to debug devfs. The boot options are prefixed by ++"devfs=", and are separated by commas. Spaces are not allowed. The ++syntax looks like this: ++ ++devfs=<option1>,<option2>,<option3> ++ ++and so on. For example, if you wanted to turn on debugging for module ++load requests and device registration, you would do: ++ ++devfs=dmod,dreg ++ ++You may prefix "no" to any option. This will invert the option. ++ ++ ++Debugging Options ++================= ++ ++These requires CONFIG_DEVFS_DEBUG to be enabled. ++Note that all debugging options have 'd' as the first character. By ++default all options are off. All debugging output is sent to the ++kernel logs. The debugging options do not take effect until the devfs ++version message appears (just prior to the root filesystem being ++mounted). ++ ++These are the options: ++ ++dmod print module load requests to <request_module> ++ ++dreg print device register requests to <devfs_register> ++ ++dunreg print device unregister requests to <devfs_unregister> ++ ++dchange print device change requests to <devfs_set_flags> ++ ++dilookup print inode lookup requests ++ ++diget print VFS inode allocations ++ ++diunlink print inode unlinks ++ ++dichange print inode changes ++ ++dimknod print calls to mknod(2) ++ ++dall some debugging turned on ++ ++ ++Other Options ++============= ++ ++These control the default behaviour of devfs. The options are: ++ ++mount mount devfs onto /dev at boot time ++ ++only disable non-devfs device nodes for devfs-capable drivers +diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/ChangeLog linux-2.6.19.dev/Documentation/filesystems/devfs/ChangeLog +--- linux-2.6.19.old/Documentation/filesystems/devfs/ChangeLog 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/filesystems/devfs/ChangeLog 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,1977 @@ ++/* -*- auto-fill -*- */ ++=============================================================================== ++Changes for patch v1 ++ ++- creation of devfs ++ ++- modified miscellaneous character devices to support devfs ++=============================================================================== ++Changes for patch v2 ++ ++- bug fix with manual inode creation ++=============================================================================== ++Changes for patch v3 ++ ++- bugfixes ++ ++- documentation improvements ++ ++- created a couple of scripts (one to save&restore a devfs and the ++ other to set up compatibility symlinks) ++ ++- devfs support for SCSI discs. New name format is: sd_hHcCiIlL ++=============================================================================== ++Changes for patch v4 ++ ++- bugfix for the directory reading code ++ ++- bugfix for compilation with kerneld ++ ++- devfs support for generic hard discs ++ ++- rationalisation of the various watchdog drivers ++=============================================================================== ++Changes for patch v5 ++ ++- support for mounting directly from entries in the devfs (it doesn't ++ need to be mounted to do this), including the root filesystem. ++ Mounting of swap partitions also works. Hence, now if you set ++ CONFIG_DEVFS_ONLY to 'Y' then you won't be able to access your discs ++ via ordinary device nodes. Naturally, the default is 'N' so that you ++ can still use your old device nodes. If you want to mount from devfs ++ entries, make sure you use: append = "root=/dev/sd_..." in your ++ lilo.conf. It seems LILO looks for the device number (major&minor) ++ and writes that into the kernel image :-( ++ ++- support for character memory devices (/dev/null, /dev/zero, /dev/full ++ and so on). Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++=============================================================================== ++Changes for patch v6 ++ ++- support for subdirectories ++ ++- support for symbolic links (created by devfs_mk_symlink(), no ++ support yet for creation via symlink(2)) ++ ++- SCSI disc naming now cast in stone, with the format: ++ /dev/sd/c0b1t2u3 controller=0, bus=1, ID=2, LUN=3, whole disc ++ /dev/sd/c0b1t2u3p4 controller=0, bus=1, ID=2, LUN=3, 4th partition ++ ++- loop devices now appear in devfs ++ ++- tty devices, console, serial ports, etc. now appear in devfs ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- bugs with mounting devfs-only devices now fixed ++=============================================================================== ++Changes for patch v7 ++ ++- SCSI CD-ROMS, tapes and generic devices now appear in devfs ++=============================================================================== ++Changes for patch v8 ++ ++- bugfix with no-rewind SCSI tapes ++ ++- RAMDISCs now appear in devfs ++ ++- better cleaning up of devfs entries created by various modules ++ ++- interface change to <devfs_register> ++=============================================================================== ++Changes for patch v9 ++ ++- the v8 patch was corrupted somehow, which would affect the patch for ++ linux/fs/filesystems.c ++ I've also fixed the v8 patch file on the WWW ++ ++- MetaDevices (/dev/md*) should now appear in devfs ++=============================================================================== ++Changes for patch v10 ++ ++- bugfix in meta device support for devfs ++ ++- created this ChangeLog file ++ ++- added devfs support to the floppy driver ++ ++- added support for creating sockets in a devfs ++=============================================================================== ++Changes for patch v11 ++ ++- added DEVFS_FL_HIDE_UNREG flag ++ ++- incorporated better patch for ttyname() in libc 5.4.43 from H.J. Lu. ++ ++- interface change to <devfs_mk_symlink> ++ ++- support for creating symlinks with symlink(2) ++ ++- parallel port printer (/dev/lp*) now appears in devfs ++=============================================================================== ++Changes for patch v12 ++ ++- added inode check to <devfs_fill_file> function ++ ++- improved devfs support when mounting from devfs ++ ++- added call to <<release>> operation when removing swap areas on ++ devfs devices ++ ++- increased NR_SUPER to 128 to support large numbers of devfs mounts ++ (for chroot(2) gaols) ++ ++- fixed bug in SCSI disc support: was generating incorrect minors if ++ SCSI ID's did not start at 0 and increase by 1 ++ ++- support symlink traversal when mounting root ++=============================================================================== ++Changes for patch v13 ++ ++- added devfs support to soundcard driver ++ Thanks to Eric Dumas <dumas@linux.eu.org> and ++ C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- added devfs support to the joystick driver ++ ++- loop driver now has it's own subdirectory "/dev/loop/" ++ ++- created <devfs_get_flags> and <devfs_set_flags> functions ++ ++- fix problem with SCSI disc compatibility names (sd{a,b,c,d,e,f}) ++ which assumes ID's start at 0 and increase by 1. Also only create ++ devfs entries for SCSI disc partitions which actually exist ++ Show new names in partition check ++ Thanks to Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> ++=============================================================================== ++Changes for patch v14 ++ ++- bug fix in floppy driver: would not compile without ++ CONFIG_DEVFS_FS='Y' ++ Thanks to Jurgen Botz <jbotz@nova.botz.org> ++ ++- bug fix in loop driver ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- do not create devfs entries for printers not configured ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- do not create devfs entries for serial ports not present ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- ensure <tty_register_devfs> is exported from tty_io.c ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- allow unregistering of devfs symlink entries ++ ++- fixed bug in SCSI disc naming introduced in last patch version ++=============================================================================== ++Changes for patch v15 ++ ++- ported to kernel 2.1.81 ++=============================================================================== ++Changes for patch v16 ++ ++- created <devfs_set_symlink_destination> function ++ ++- moved DEVFS_SUPER_MAGIC into header file ++ ++- added DEVFS_FL_HIDE flag ++ ++- created <devfs_get_maj_min> ++ ++- created <devfs_get_handle_from_inode> ++ ++- fixed bugs in searching by major&minor ++ ++- changed interface to <devfs_unregister>, <devfs_fill_file> and ++ <devfs_find_handle> ++ ++- fixed inode times when symlink created with symlink(2) ++ ++- change tty driver to do auto-creation of devfs entries ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- fixed bug in genhd.c: whole disc (non-SCSI) was not registered to ++ devfs ++ ++- updated libc 5.4.43 patch for ttyname() ++=============================================================================== ++Changes for patch v17 ++ ++- added CONFIG_DEVFS_TTY_COMPAT ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- bugfix in devfs support for drivers/char/lp.c ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- clean up serial driver so that PCMCIA devices unregister correctly ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- fixed bug in genhd.c: whole disc (non-SCSI) was not registered to ++ devfs [was missing in patch v16] ++ ++- updated libc 5.4.43 patch for ttyname() [was missing in patch v16] ++ ++- all SCSI devices now registered in /dev/sg ++ ++- support removal of devfs entries via unlink(2) ++=============================================================================== ++Changes for patch v18 ++ ++- added floppy/?u720 floppy entry ++ ++- fixed kerneld support for entries in devfs subdirectories ++ ++- incorporated latest patch for ttyname() in libc 5.4.43 from H.J. Lu. ++=============================================================================== ++Changes for patch v19 ++ ++- bug fix when looking up unregistered entries: kerneld was not called ++ ++- fixes for kernel 2.1.86 (now requires 2.1.86) ++=============================================================================== ++Changes for patch v20 ++ ++- only create available floppy entries ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++ ++- new IDE naming scheme following SCSI format (i.e. /dev/id/c0b0t0u0p1 ++ instead of /dev/hda1) ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++ ++- new XT disc naming scheme following SCSI format (i.e. /dev/xd/c0t0p1 ++ instead of /dev/xda1) ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++ ++- new non-standard CD-ROM names (i.e. /dev/sbp/c#t#) ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++ ++- allow symlink traversal when mounting the root filesystem ++ ++- Create entries for MD devices at MD init ++ Thanks to Christophe Leroy <christophe.leroy5@capway.com> ++=============================================================================== ++Changes for patch v21 ++ ++- ported to kernel 2.1.91 ++=============================================================================== ++Changes for patch v22 ++ ++- SCSI host number patch ("scsihosts=" kernel option) ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++=============================================================================== ++Changes for patch v23 ++ ++- Fixed persistence bug with device numbers for manually created ++ device files ++ ++- Fixed problem with recreating symlinks with different content ++ ++- Added CONFIG_DEVFS_MOUNT (mount devfs on /dev at boot time) ++=============================================================================== ++Changes for patch v24 ++ ++- Switched from CONFIG_KERNELD to CONFIG_KMOD: module autoloading ++ should now work again ++ ++- Hide entries which are manually unlinked ++ ++- Always invalidate devfs dentry cache when registering entries ++ ++- Support removal of devfs directories via rmdir(2) ++ ++- Ensure directories created by <devfs_mk_dir> are visible ++ ++- Default no access for "other" for floppy device ++=============================================================================== ++Changes for patch v25 ++ ++- Updates to CREDITS file and minor IDE numbering change ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++ ++- Invalidate devfs dentry cache when making directories ++ ++- Invalidate devfs dentry cache when removing entries ++ ++- More informative message if root FS mount fails when devfs ++ configured ++ ++- Fixed persistence bug with fifos ++=============================================================================== ++Changes for patch v26 ++ ++- ported to kernel 2.1.97 ++ ++- Changed serial directory from "/dev/serial" to "/dev/tts" and ++ "/dev/consoles" to "/dev/vc" to be more friendly to new procps ++=============================================================================== ++Changes for patch v27 ++ ++- Added support for IDE4 and IDE5 ++ Thanks to Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl> ++ ++- Documented "scsihosts=" boot parameter ++ ++- Print process command when debugging kerneld/kmod ++ ++- Added debugging for register/unregister/change operations ++ ++- Added "devfs=" boot options ++ ++- Hide unregistered entries by default ++=============================================================================== ++Changes for patch v28 ++ ++- No longer lock/unlock superblock in <devfs_put_super> (cope with ++ recent VFS interface change) ++ ++- Do not automatically change ownership/protection of /dev/tty ++ ++- Drop negative dentries when they are released ++ ++- Manage dcache more efficiently ++=============================================================================== ++Changes for patch v29 ++ ++- Added DEVFS_FL_AUTO_DEVNUM flag ++=============================================================================== ++Changes for patch v30 ++ ++- No longer set unnecessary methods ++ ++- Ported to kernel 2.1.99-pre3 ++=============================================================================== ++Changes for patch v31 ++ ++- Added PID display to <call_kerneld> debugging message ++ ++- Added "diread" and "diwrite" options ++ ++- Ported to kernel 2.1.102 ++ ++- Fixed persistence problem with permissions ++=============================================================================== ++Changes for patch v32 ++ ++- Fixed devfs support in drivers/block/md.c ++=============================================================================== ++Changes for patch v33 ++ ++- Support legacy device nodes ++ ++- Fixed bug where recreated inodes were hidden ++ ++- New IDE naming scheme: everything is under /dev/ide ++=============================================================================== ++Changes for patch v34 ++ ++- Improved debugging in <get_vfs_inode> ++ ++- Prevent duplicate calls to <devfs_mk_dir> in SCSI layer ++ ++- No longer free old dentries in <devfs_mk_dir> ++ ++- Free all dentries for a given entry when deleting inodes ++=============================================================================== ++Changes for patch v35 ++ ++- Ported to kernel 2.1.105 (sound driver changes) ++=============================================================================== ++Changes for patch v36 ++ ++- Fixed sound driver port ++=============================================================================== ++Changes for patch v37 ++ ++- Minor documentation tweaks ++=============================================================================== ++Changes for patch v38 ++ ++- More documentation tweaks ++ ++- Fix for sound driver port ++ ++- Removed ttyname-patch (grab libc 5.4.44 instead) ++ ++- Ported to kernel 2.1.107-pre2 (loop driver fix) ++=============================================================================== ++Changes for patch v39 ++ ++- Ported to kernel 2.1.107 (hd.c hunk broke due to spelling "fixes"). Sigh ++ ++- Removed many #ifdef's, replaced with trickery in include/devfs_fs.h ++=============================================================================== ++Changes for patch v40 ++ ++- Fix for sound driver port ++ ++- Limit auto-device numbering to majors 128 to 239 ++=============================================================================== ++Changes for patch v41 ++ ++- Fixed inode times persistence problem ++=============================================================================== ++Changes for patch v42 ++ ++- Ported to kernel 2.1.108 (drivers/scsi/hosts.c hunk broke) ++=============================================================================== ++Changes for patch v43 ++ ++- Fixed spelling in <devfs_readlink> debug ++ ++- Fixed bug in <devfs_setup> parsing "dilookup" ++ ++- More #ifdef's removed ++ ++- Supported Sparc keyboard (/dev/kbd) ++ ++- Supported DSP56001 digital signal processor (/dev/dsp56k) ++ ++- Supported Apple Desktop Bus (/dev/adb) ++ ++- Supported Coda network file system (/dev/cfs*) ++=============================================================================== ++Changes for patch v44 ++ ++- Fixed devfs inode leak when manually recreating inodes ++ ++- Fixed permission persistence problem when recreating inodes ++=============================================================================== ++Changes for patch v45 ++ ++- Ported to kernel 2.1.110 ++=============================================================================== ++Changes for patch v46 ++ ++- Ported to kernel 2.1.112-pre1 ++ ++- Removed harmless "unused variable" compiler warning ++ ++- Fixed modes for manually recreated device nodes ++=============================================================================== ++Changes for patch v47 ++ ++- Added NULL devfs inode warning in <devfs_read_inode> ++ ++- Force all inode nlink values to 1 ++=============================================================================== ++Changes for patch v48 ++ ++- Added "dimknod" option ++ ++- Set inode nlink to 0 when freeing dentries ++ ++- Added support for virtual console capture devices (/dev/vcs*) ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Fixed modes for manually recreated symlinks ++=============================================================================== ++Changes for patch v49 ++ ++- Ported to kernel 2.1.113 ++=============================================================================== ++Changes for patch v50 ++ ++- Fixed bugs in recreated directories and symlinks ++=============================================================================== ++Changes for patch v51 ++ ++- Improved robustness of rc.devfs script ++ Thanks to Roderich Schupp <rsch@experteam.de> ++ ++- Fixed bugs in recreated device nodes ++ ++- Fixed bug in currently unused <devfs_get_handle_from_inode> ++ ++- Defined new <devfs_handle_t> type ++ ++- Improved debugging when getting entries ++ ++- Fixed bug where directories could be emptied ++ ++- Ported to kernel 2.1.115 ++=============================================================================== ++Changes for patch v52 ++ ++- Replaced dummy .epoch inode with .devfsd character device ++ ++- Modified rc.devfs to take account of above change ++ ++- Removed spurious driver warning messages when CONFIG_DEVFS_FS=n ++ ++- Implemented devfsd protocol revision 0 ++=============================================================================== ++Changes for patch v53 ++ ++- Ported to kernel 2.1.116 (kmod change broke hunk) ++ ++- Updated Documentation/Configure.help ++ ++- Test and tty pattern patch for rc.devfs script ++ Thanks to Roderich Schupp <rsch@experteam.de> ++ ++- Added soothing message to warning in <devfs_d_iput> ++=============================================================================== ++Changes for patch v54 ++ ++- Ported to kernel 2.1.117 ++ ++- Fixed default permissions in sound driver ++ ++- Added support for frame buffer devices (/dev/fb*) ++=============================================================================== ++Changes for patch v55 ++ ++- Ported to kernel 2.1.119 ++ ++- Use GCC extensions for structure initialisations ++ ++- Implemented async open notification ++ ++- Incremented devfsd protocol revision to 1 ++=============================================================================== ++Changes for patch v56 ++ ++- Ported to kernel 2.1.120-pre3 ++ ++- Moved async open notification to end of <devfs_open> ++=============================================================================== ++Changes for patch v57 ++ ++- Ported to kernel 2.1.121 ++ ++- Prepended "/dev/" to module load request ++ ++- Renamed <call_kerneld> to <call_kmod> ++ ++- Created sample modules.conf file ++=============================================================================== ++Changes for patch v58 ++ ++- Fixed typo "AYSNC" -> "ASYNC" ++=============================================================================== ++Changes for patch v59 ++ ++- Added open flag for files ++=============================================================================== ++Changes for patch v60 ++ ++- Ported to kernel 2.1.123-pre2 ++=============================================================================== ++Changes for patch v61 ++ ++- Set i_blocks=0 and i_blksize=1024 in <devfs_read_inode> ++=============================================================================== ++Changes for patch v62 ++ ++- Ported to kernel 2.1.123 ++=============================================================================== ++Changes for patch v63 ++ ++- Ported to kernel 2.1.124-pre2 ++=============================================================================== ++Changes for patch v64 ++ ++- Fixed Unix98 pty support ++ ++- Increased buffer size in <get_partition_list> to avoid crash and ++ burn ++=============================================================================== ++Changes for patch v65 ++ ++- More Unix98 pty support fixes ++ ++- Added test for empty <<name>> in <devfs_find_handle> ++ ++- Renamed <generate_path> to <devfs_generate_path> and published ++ ++- Created /dev/root symlink ++ Thanks to Roderich Schupp <rsch@ExperTeam.de> ++ with further modifications by me ++=============================================================================== ++Changes for patch v66 ++ ++- Yet more Unix98 pty support fixes (now tested) ++ ++- Created <devfs_get_fops> ++ ++- Support media change checks when CONFIG_DEVFS_ONLY=y ++ ++- Abolished Unix98-style PTY names for old PTY devices ++=============================================================================== ++Changes for patch v67 ++ ++- Added inline declaration for dummy <devfs_generate_path> ++ ++- Removed spurious "unable to register... in devfs" messages when ++ CONFIG_DEVFS_FS=n ++ ++- Fixed misc. devices when CONFIG_DEVFS_FS=n ++ ++- Limit auto-device numbering to majors 144 to 239 ++=============================================================================== ++Changes for patch v68 ++ ++- Hide unopened virtual consoles from directory listings ++ ++- Added support for video capture devices ++ ++- Ported to kernel 2.1.125 ++=============================================================================== ++Changes for patch v69 ++ ++- Fix for CONFIG_VT=n ++=============================================================================== ++Changes for patch v70 ++ ++- Added support for non-OSS/Free sound cards ++=============================================================================== ++Changes for patch v71 ++ ++- Ported to kernel 2.1.126-pre2 ++=============================================================================== ++Changes for patch v72 ++ ++- #ifdef's for CONFIG_DEVFS_DISABLE_OLD_NAMES removed ++=============================================================================== ++Changes for patch v73 ++ ++- CONFIG_DEVFS_DISABLE_OLD_NAMES replaced with "nocompat" boot option ++ ++- CONFIG_DEVFS_BOOT_OPTIONS removed: boot options always available ++=============================================================================== ++Changes for patch v74 ++ ++- Removed CONFIG_DEVFS_MOUNT and "mount" boot option and replaced with ++ "nomount" boot option ++ ++- Documentation updates ++ ++- Updated sample modules.conf ++=============================================================================== ++Changes for patch v75 ++ ++- Updated sample modules.conf ++ ++- Remount devfs after initrd finishes ++ ++- Ported to kernel 2.1.127 ++ ++- Added support for ISDN ++ Thanks to Christophe Leroy <christophe.leroy5@capway.com> ++=============================================================================== ++Changes for patch v76 ++ ++- Updated an email address in ChangeLog ++ ++- CONFIG_DEVFS_ONLY replaced with "only" boot option ++=============================================================================== ++Changes for patch v77 ++ ++- Added DEVFS_FL_REMOVABLE flag ++ ++- Check for disc change when listing directories with removable media ++ devices ++ ++- Use DEVFS_FL_REMOVABLE in sd.c ++ ++- Ported to kernel 2.1.128 ++=============================================================================== ++Changes for patch v78 ++ ++- Only call <scan_dir_for_removable> on first call to <devfs_readdir> ++ ++- Ported to kernel 2.1.129-pre5 ++ ++- ISDN support improvements ++ Thanks to Christophe Leroy <christophe.leroy5@capway.com> ++=============================================================================== ++Changes for patch v79 ++ ++- Ported to kernel 2.1.130 ++ ++- Renamed miscdevice "apm" to "apm_bios" to be consistent with ++ devices.txt ++=============================================================================== ++Changes for patch v80 ++ ++- Ported to kernel 2.1.131 ++ ++- Updated <devfs_rmdir> for VFS change in 2.1.131 ++=============================================================================== ++Changes for patch v81 ++ ++- Fixed permissions on /dev/ptmx ++=============================================================================== ++Changes for patch v82 ++ ++- Ported to kernel 2.1.132-pre4 ++ ++- Changed initial permissions on /dev/pts/* ++ ++- Created <devfs_mk_compat> ++ ++- Added "symlinks" boot option ++ ++- Changed devfs_register_blkdev() back to register_blkdev() for IDE ++ ++- Check for partitions on removable media in <devfs_lookup> ++=============================================================================== ++Changes for patch v83 ++ ++- Fixed support for ramdisc when using string-based root FS name ++ ++- Ported to kernel 2.2.0-pre1 ++=============================================================================== ++Changes for patch v84 ++ ++- Ported to kernel 2.2.0-pre7 ++=============================================================================== ++Changes for patch v85 ++ ++- Compile fixes for driver/sound/sound_common.c (non-module) and ++ drivers/isdn/isdn_common.c ++ Thanks to Christophe Leroy <christophe.leroy5@capway.com> ++ ++- Added support for registering regular files ++ ++- Created <devfs_set_file_size> ++ ++- Added /dev/cpu/mtrr as an alternative interface to /proc/mtrr ++ ++- Update devfs inodes from entries if not changed through FS ++=============================================================================== ++Changes for patch v86 ++ ++- Ported to kernel 2.2.0-pre9 ++=============================================================================== ++Changes for patch v87 ++ ++- Fixed bug when mounting non-devfs devices in a devfs ++=============================================================================== ++Changes for patch v88 ++ ++- Fixed <devfs_fill_file> to only initialise temporary inodes ++ ++- Trap for NULL fops in <devfs_register> ++ ++- Return -ENODEV in <devfs_fill_file> for non-driver inodes ++ ++- Fixed bug when unswapping non-devfs devices in a devfs ++=============================================================================== ++Changes for patch v89 ++ ++- Switched to C data types in include/linux/devfs_fs.h ++ ++- Switched from PATH_MAX to DEVFS_PATHLEN ++ ++- Updated Documentation/filesystems/devfs/modules.conf to take account ++ of reverse scanning (!) by modprobe ++ ++- Ported to kernel 2.2.0 ++=============================================================================== ++Changes for patch v90 ++ ++- CONFIG_DEVFS_DISABLE_OLD_TTY_NAMES replaced with "nottycompat" boot ++ option ++ ++- CONFIG_DEVFS_TTY_COMPAT removed: existing "symlinks" boot option now ++ controls this. This means you must have libc 5.4.44 or later, or a ++ recent version of libc 6 if you use the "symlinks" option ++=============================================================================== ++Changes for patch v91 ++ ++- Switch from <devfs_mk_symlink> to <devfs_mk_compat> in ++ drivers/char/vc_screen.c to fix problems with Midnight Commander ++=============================================================================== ++Changes for patch v92 ++ ++- Ported to kernel 2.2.2-pre5 ++=============================================================================== ++Changes for patch v93 ++ ++- Modified <sd_name> in drivers/scsi/sd.c to cope with devices that ++ don't exist (which happens with new RAID autostart code printk()s) ++=============================================================================== ++Changes for patch v94 ++ ++- Fixed bug in joystick driver: only first joystick was registered ++=============================================================================== ++Changes for patch v95 ++ ++- Fixed another bug in joystick driver ++ ++- Fixed <devfsd_read> to not overrun event buffer ++=============================================================================== ++Changes for patch v96 ++ ++- Ported to kernel 2.2.5-2 ++ ++- Created <devfs_auto_unregister> ++ ++- Fixed bugs: compatibility entries were not unregistered for: ++ loop driver ++ floppy driver ++ RAMDISC driver ++ IDE tape driver ++ SCSI CD-ROM driver ++ SCSI HDD driver ++=============================================================================== ++Changes for patch v97 ++ ++- Fixed bugs: compatibility entries were not unregistered for: ++ ALSA sound driver ++ partitions in generic disc driver ++ ++- Don't return unregistred entries in <devfs_find_handle> ++ ++- Panic in <devfs_unregister> if entry unregistered ++ ++- Don't panic in <devfs_auto_unregister> for duplicates ++=============================================================================== ++Changes for patch v98 ++ ++- Don't unregister already unregistered entries in <unregister> ++ ++- Register entry in <sd_detect> ++ ++- Unregister entry in <sd_detach> ++ ++- Changed to <devfs_*register_chrdev> in drivers/char/tty_io.c ++ ++- Ported to kernel 2.2.7 ++=============================================================================== ++Changes for patch v99 ++ ++- Ported to kernel 2.2.8 ++ ++- Fixed bug in drivers/scsi/sd.c when >16 SCSI discs ++ ++- Disable warning messages when unable to read partition table for ++ removable media ++=============================================================================== ++Changes for patch v100 ++ ++- Ported to kernel 2.3.1-pre5 ++ ++- Added "oops-on-panic" boot option ++ ++- Improved debugging in <devfs_register> and <devfs_unregister> ++ ++- Register entry in <sr_detect> ++ ++- Unregister entry in <sr_detach> ++ ++- Register entry in <sg_detect> ++ ++- Unregister entry in <sg_detach> ++ ++- Added support for ALSA drivers ++=============================================================================== ++Changes for patch v101 ++ ++- Ported to kernel 2.3.2 ++=============================================================================== ++Changes for patch v102 ++ ++- Update serial driver to register PCMCIA entries ++ Thanks to Roch-Alexandre Nomine-Beguin <roch@samarkand.infini.fr> ++ ++- Updated an email address in ChangeLog ++ ++- Hide virtual console capture entries from directory listings when ++ corresponding console device is not open ++=============================================================================== ++Changes for patch v103 ++ ++- Ported to kernel 2.3.3 ++=============================================================================== ++Changes for patch v104 ++ ++- Added documentation for some functions ++ ++- Added "doc" target to fs/devfs/Makefile ++ ++- Added "v4l" directory for video4linux devices ++ ++- Replaced call to <devfs_unregister> in <sd_detach> with call to ++ <devfs_register_partitions> ++ ++- Moved registration for sr and sg drivers from detect() to attach() ++ methods ++ ++- Register entries in <st_attach> and unregister in <st_detach> ++ ++- Work around IDE driver treating CD-ROM as gendisk ++ ++- Use <sed> instead of <tr> in rc.devfs ++ ++- Updated ToDo list ++ ++- Removed "oops-on-panic" boot option: now always Oops ++=============================================================================== ++Changes for patch v105 ++ ++- Unregister SCSI host from <scsi_host_no_list> in <scsi_unregister> ++ Thanks to Zoltán Böszörményi <zboszor@mail.externet.hu> ++ ++- Don't save /dev/log in rc.devfs ++ ++- Ported to kernel 2.3.4-pre1 ++=============================================================================== ++Changes for patch v106 ++ ++- Fixed silly typo in drivers/scsi/st.c ++ ++- Improved debugging in <devfs_register> ++=============================================================================== ++Changes for patch v107 ++ ++- Added "diunlink" and "nokmod" boot options ++ ++- Removed superfluous warning message in <devfs_d_iput> ++=============================================================================== ++Changes for patch v108 ++ ++- Remove entries when unloading sound module ++=============================================================================== ++Changes for patch v109 ++ ++- Ported to kernel 2.3.6-pre2 ++=============================================================================== ++Changes for patch v110 ++ ++- Took account of change to <d_alloc_root> ++=============================================================================== ++Changes for patch v111 ++ ++- Created separate event queue for each mounted devfs ++ ++- Removed <devfs_invalidate_dcache> ++ ++- Created new ioctl()s for devfsd ++ ++- Incremented devfsd protocol revision to 3 ++ ++- Fixed bug when re-creating directories: contents were lost ++ ++- Block access to inodes until devfsd updates permissions ++=============================================================================== ++Changes for patch v112 ++ ++- Modified patch so it applies against 2.3.5 and 2.3.6 ++ ++- Updated an email address in ChangeLog ++ ++- Do not automatically change ownership/protection of /dev/tty<n> ++ ++- Updated sample modules.conf ++ ++- Switched to sending process uid/gid to devfsd ++ ++- Renamed <call_kmod> to <try_modload> ++ ++- Added DEVFSD_NOTIFY_LOOKUP event ++ ++- Added DEVFSD_NOTIFY_CHANGE event ++ ++- Added DEVFSD_NOTIFY_CREATE event ++ ++- Incremented devfsd protocol revision to 4 ++ ++- Moved kernel-specific stuff to include/linux/devfs_fs_kernel.h ++=============================================================================== ++Changes for patch v113 ++ ++- Ported to kernel 2.3.9 ++ ++- Restricted permissions on some block devices ++=============================================================================== ++Changes for patch v114 ++ ++- Added support for /dev/netlink ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Return EISDIR rather than EINVAL for read(2) on directories ++ ++- Ported to kernel 2.3.10 ++=============================================================================== ++Changes for patch v115 ++ ++- Added support for all remaining character devices ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Cleaned up netlink support ++=============================================================================== ++Changes for patch v116 ++ ++- Added support for /dev/parport%d ++ Thanks to Tim Waugh <tim@cyberelk.demon.co.uk> ++ ++- Fixed parallel port ATAPI tape driver ++ ++- Fixed Atari SLM laser printer driver ++=============================================================================== ++Changes for patch v117 ++ ++- Added support for COSA card ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Fixed drivers/char/ppdev.c: missing #include <linux/init.h> ++ ++- Fixed drivers/char/ftape/zftape/zftape-init.c ++ Thanks to Vladimir Popov <mashgrad@usa.net> ++=============================================================================== ++Changes for patch v118 ++ ++- Ported to kernel 2.3.15-pre3 ++ ++- Fixed bug in loop driver ++ ++- Unregister /dev/lp%d entries in drivers/char/lp.c ++ Thanks to Maciej W. Rozycki <macro@ds2.pg.gda.pl> ++=============================================================================== ++Changes for patch v119 ++ ++- Ported to kernel 2.3.16 ++=============================================================================== ++Changes for patch v120 ++ ++- Fixed bug in drivers/scsi/scsi.c ++ ++- Added /dev/ppp ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Ported to kernel 2.3.17 ++=============================================================================== ++Changes for patch v121 ++ ++- Fixed bug in drivers/block/loop.c ++ ++- Ported to kernel 2.3.18 ++=============================================================================== ++Changes for patch v122 ++ ++- Ported to kernel 2.3.19 ++=============================================================================== ++Changes for patch v123 ++ ++- Ported to kernel 2.3.20 ++=============================================================================== ++Changes for patch v124 ++ ++- Ported to kernel 2.3.21 ++=============================================================================== ++Changes for patch v125 ++ ++- Created <devfs_get_info>, <devfs_set_info>, ++ <devfs_get_first_child> and <devfs_get_next_sibling> ++ Added <<dir>> parameter to <devfs_register>, <devfs_mk_compat>, ++ <devfs_mk_dir> and <devfs_find_handle> ++ Work sponsored by SGI ++ ++- Fixed apparent bug in COSA driver ++ ++- Re-instated "scsihosts=" boot option ++=============================================================================== ++Changes for patch v126 ++ ++- Always create /dev/pts if CONFIG_UNIX98_PTYS=y ++ ++- Fixed call to <devfs_mk_dir> in drivers/block/ide-disk.c ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Allow multiple unregistrations ++ ++- Created /dev/scsi hierarchy ++ Work sponsored by SGI ++=============================================================================== ++Changes for patch v127 ++ ++Work sponsored by SGI ++ ++- No longer disable devpts if devfs enabled (caveat emptor) ++ ++- Added flags array to struct gendisk and removed code from ++ drivers/scsi/sd.c ++ ++- Created /dev/discs hierarchy ++=============================================================================== ++Changes for patch v128 ++ ++Work sponsored by SGI ++ ++- Created /dev/cdroms hierarchy ++=============================================================================== ++Changes for patch v129 ++ ++Work sponsored by SGI ++ ++- Removed compatibility entries for sound devices ++ ++- Removed compatibility entries for printer devices ++ ++- Removed compatibility entries for video4linux devices ++ ++- Removed compatibility entries for parallel port devices ++ ++- Removed compatibility entries for frame buffer devices ++=============================================================================== ++Changes for patch v130 ++ ++Work sponsored by SGI ++ ++- Added major and minor number to devfsd protocol ++ ++- Incremented devfsd protocol revision to 5 ++ ++- Removed compatibility entries for SoundBlaster CD-ROMs ++ ++- Removed compatibility entries for netlink devices ++ ++- Removed compatibility entries for SCSI generic devices ++ ++- Removed compatibility entries for SCSI tape devices ++=============================================================================== ++Changes for patch v131 ++ ++Work sponsored by SGI ++ ++- Support info pointer for all devfs entry types ++ ++- Added <<info>> parameter to <devfs_mk_dir> and <devfs_mk_symlink> ++ ++- Removed /dev/st hierarchy ++ ++- Removed /dev/sg hierarchy ++ ++- Removed compatibility entries for loop devices ++ ++- Removed compatibility entries for IDE tape devices ++ ++- Removed compatibility entries for SCSI CD-ROMs ++ ++- Removed /dev/sr hierarchy ++=============================================================================== ++Changes for patch v132 ++ ++Work sponsored by SGI ++ ++- Removed compatibility entries for floppy devices ++ ++- Removed compatibility entries for RAMDISCs ++ ++- Removed compatibility entries for meta-devices ++ ++- Removed compatibility entries for SCSI discs ++ ++- Created <devfs_make_root> ++ ++- Removed /dev/sd hierarchy ++ ++- Support "../" when searching devfs namespace ++ ++- Created /dev/ide/host* hierarchy ++ ++- Supported IDE hard discs in /dev/ide/host* hierarchy ++ ++- Removed compatibility entries for IDE discs ++ ++- Removed /dev/ide/hd hierarchy ++ ++- Supported IDE CD-ROMs in /dev/ide/host* hierarchy ++ ++- Removed compatibility entries for IDE CD-ROMs ++ ++- Removed /dev/ide/cd hierarchy ++=============================================================================== ++Changes for patch v133 ++ ++Work sponsored by SGI ++ ++- Created <devfs_get_unregister_slave> ++ ++- Fixed bug in fs/partitions/check.c when rescanning ++=============================================================================== ++Changes for patch v134 ++ ++Work sponsored by SGI ++ ++- Removed /dev/sd, /dev/sr, /dev/st and /dev/sg directories ++ ++- Removed /dev/ide/hd directory ++ ++- Exported <devfs_get_parent> ++ ++- Created <devfs_register_tape> and /dev/tapes hierarchy ++ ++- Removed /dev/ide/mt hierarchy ++ ++- Removed /dev/ide/fd hierarchy ++ ++- Ported to kernel 2.3.25 ++=============================================================================== ++Changes for patch v135 ++ ++Work sponsored by SGI ++ ++- Removed compatibility entries for virtual console capture devices ++ ++- Removed unused <devfs_set_symlink_destination> ++ ++- Removed compatibility entries for serial devices ++ ++- Removed compatibility entries for console devices ++ ++- Do not hide entries from devfsd or children ++ ++- Removed DEVFS_FL_TTY_COMPAT flag ++ ++- Removed "nottycompat" boot option ++ ++- Removed <devfs_mk_compat> ++=============================================================================== ++Changes for patch v136 ++ ++Work sponsored by SGI ++ ++- Moved BSD pty devices to /dev/pty ++ ++- Added DEVFS_FL_WAIT flag ++=============================================================================== ++Changes for patch v137 ++ ++Work sponsored by SGI ++ ++- Really fixed bug in fs/partitions/check.c when rescanning ++ ++- Support new "disc" naming scheme in <get_removable_partition> ++ ++- Allow NULL fops in <devfs_register> ++ ++- Removed redundant name functions in SCSI disc and IDE drivers ++=============================================================================== ++Changes for patch v138 ++ ++Work sponsored by SGI ++ ++- Fixed old bugs in drivers/block/paride/pt.c, drivers/char/tpqic02.c, ++ drivers/net/wan/cosa.c and drivers/scsi/scsi.c ++ Thanks to Sergey Kubushin <ksi@ksi-linux.com> ++ ++- Fall back to major table if NULL fops given to <devfs_register> ++=============================================================================== ++Changes for patch v139 ++ ++Work sponsored by SGI ++ ++- Corrected and moved <get_blkfops> and <get_chrfops> declarations ++ from arch/alpha/kernel/osf_sys.c to include/linux/fs.h ++ ++- Removed name function from struct gendisk ++ ++- Updated devfs FAQ ++=============================================================================== ++Changes for patch v140 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.27 ++=============================================================================== ++Changes for patch v141 ++ ++Work sponsored by SGI ++ ++- Bug fix in arch/m68k/atari/joystick.c ++ ++- Moved ISDN and capi devices to /dev/isdn ++=============================================================================== ++Changes for patch v142 ++ ++Work sponsored by SGI ++ ++- Bug fix in drivers/block/ide-probe.c (patch confusion) ++=============================================================================== ++Changes for patch v143 ++ ++Work sponsored by SGI ++ ++- Bug fix in drivers/block/blkpg.c:partition_name() ++=============================================================================== ++Changes for patch v144 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.29 ++ ++- Removed calls to <devfs_register> from cdu31a, cm206, mcd and mcdx ++ CD-ROM drivers: generic driver handles this now ++ ++- Moved joystick devices to /dev/joysticks ++=============================================================================== ++Changes for patch v145 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.30-pre3 ++ ++- Register whole-disc entry even for invalid partition tables ++ ++- Fixed bug in mounting root FS when initrd enabled ++ ++- Fixed device entry leak with IDE CD-ROMs ++ ++- Fixed compile problem with drivers/isdn/isdn_common.c ++ ++- Moved COSA devices to /dev/cosa ++ ++- Support fifos when unregistering ++ ++- Created <devfs_register_series> and used in many drivers ++ ++- Moved Coda devices to /dev/coda ++ ++- Moved parallel port IDE tapes to /dev/pt ++ ++- Moved parallel port IDE generic devices to /dev/pg ++=============================================================================== ++Changes for patch v146 ++ ++Work sponsored by SGI ++ ++- Removed obsolete DEVFS_FL_COMPAT and DEVFS_FL_TOLERANT flags ++ ++- Fixed compile problem with fs/coda/psdev.c ++ ++- Reinstate change to <devfs_register_blkdev> in ++ drivers/block/ide-probe.c now that fs/isofs/inode.c is fixed ++ ++- Switched to <devfs_register_blkdev> in drivers/block/floppy.c, ++ drivers/scsi/sr.c and drivers/block/md.c ++ ++- Moved DAC960 devices to /dev/dac960 ++=============================================================================== ++Changes for patch v147 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.32-pre4 ++=============================================================================== ++Changes for patch v148 ++ ++Work sponsored by SGI ++ ++- Removed kmod support: use devfsd instead ++ ++- Moved miscellaneous character devices to /dev/misc ++=============================================================================== ++Changes for patch v149 ++ ++Work sponsored by SGI ++ ++- Ensure include/linux/joystick.h is OK for user-space ++ ++- Improved debugging in <get_vfs_inode> ++ ++- Ensure dentries created by devfsd will be cleaned up ++=============================================================================== ++Changes for patch v150 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.34 ++=============================================================================== ++Changes for patch v151 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.35-pre1 ++ ++- Created <devfs_get_name> ++=============================================================================== ++Changes for patch v152 ++ ++Work sponsored by SGI ++ ++- Updated sample modules.conf ++ ++- Ported to kernel 2.3.36-pre1 ++=============================================================================== ++Changes for patch v153 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.42 ++ ++- Removed <devfs_fill_file> ++=============================================================================== ++Changes for patch v154 ++ ++Work sponsored by SGI ++ ++- Took account of device number changes for /dev/fb* ++=============================================================================== ++Changes for patch v155 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.43-pre8 ++ ++- Moved /dev/tty0 to /dev/vc/0 ++ ++- Moved sequence number formatting from <_tty_make_name> to drivers ++=============================================================================== ++Changes for patch v156 ++ ++Work sponsored by SGI ++ ++- Fixed breakage in drivers/scsi/sd.c due to recent SCSI changes ++=============================================================================== ++Changes for patch v157 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.45 ++=============================================================================== ++Changes for patch v158 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.46-pre2 ++=============================================================================== ++Changes for patch v159 ++ ++Work sponsored by SGI ++ ++- Fixed drivers/block/md.c ++ Thanks to Mike Galbraith <mikeg@weiden.de> ++ ++- Documentation fixes ++ ++- Moved device registration from <lp_init> to <lp_register> ++ Thanks to Tim Waugh <twaugh@redhat.com> ++=============================================================================== ++Changes for patch v160 ++ ++Work sponsored by SGI ++ ++- Fixed drivers/char/joystick/joystick.c ++ Thanks to Vojtech Pavlik <vojtech@suse.cz> ++ ++- Documentation updates ++ ++- Fixed arch/i386/kernel/mtrr.c if procfs and devfs not enabled ++ ++- Fixed drivers/char/stallion.c ++=============================================================================== ++Changes for patch v161 ++ ++Work sponsored by SGI ++ ++- Remove /dev/ide when ide-mod is unloaded ++ ++- Fixed bug in drivers/block/ide-probe.c when secondary but no primary ++ ++- Added DEVFS_FL_NO_PERSISTENCE flag ++ ++- Used new DEVFS_FL_NO_PERSISTENCE flag for Unix98 pty slaves ++ ++- Removed unnecessary call to <update_devfs_inode_from_entry> in ++ <devfs_readdir> ++ ++- Only set auto-ownership for /dev/pty/s* ++=============================================================================== ++Changes for patch v162 ++ ++Work sponsored by SGI ++ ++- Set inode->i_size to correct size for symlinks ++ Thanks to Jeremy Fitzhardinge <jeremy@goop.org> ++ ++- Only give lookup() method to directories to comply with new VFS ++ assumptions ++ ++- Remove unnecessary tests in symlink methods ++ ++- Don't kill existing block ops in <devfs_read_inode> ++ ++- Restore auto-ownership for /dev/pty/m* ++=============================================================================== ++Changes for patch v163 ++ ++Work sponsored by SGI ++ ++- Don't create missing directories in <devfs_find_handle> ++ ++- Removed Documentation/filesystems/devfs/mk-devlinks ++ ++- Updated Documentation/filesystems/devfs/README ++=============================================================================== ++Changes for patch v164 ++ ++Work sponsored by SGI ++ ++- Fixed CONFIG_DEVFS breakage in drivers/char/serial.c introduced in ++ linux-2.3.99-pre6-7 ++=============================================================================== ++Changes for patch v165 ++ ++Work sponsored by SGI ++ ++- Ported to kernel 2.3.99-pre6 ++=============================================================================== ++Changes for patch v166 ++ ++Work sponsored by SGI ++ ++- Added CONFIG_DEVFS_MOUNT ++=============================================================================== ++Changes for patch v167 ++ ++Work sponsored by SGI ++ ++- Updated Documentation/filesystems/devfs/README ++ ++- Updated sample modules.conf ++=============================================================================== ++Changes for patch v168 ++ ++Work sponsored by SGI ++ ++- Disabled multi-mount capability (use VFS bindings instead) ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v169 ++ ++Work sponsored by SGI ++ ++- Removed multi-mount code ++ ++- Removed compatibility macros: VFS has changed too much ++=============================================================================== ++Changes for patch v170 ++ ++Work sponsored by SGI ++ ++- Updated README from master HTML file ++ ++- Merged devfs inode into devfs entry ++=============================================================================== ++Changes for patch v171 ++ ++Work sponsored by SGI ++ ++- Updated sample modules.conf ++ ++- Removed dead code in <devfs_register> which used to call ++ <free_dentries> ++ ++- Ported to kernel 2.4.0-test2-pre3 ++=============================================================================== ++Changes for patch v172 ++ ++Work sponsored by SGI ++ ++- Changed interface to <devfs_register> ++ ++- Changed interface to <devfs_register_series> ++=============================================================================== ++Changes for patch v173 ++ ++Work sponsored by SGI ++ ++- Simplified interface to <devfs_mk_symlink> ++ ++- Simplified interface to <devfs_mk_dir> ++ ++- Simplified interface to <devfs_find_handle> ++=============================================================================== ++Changes for patch v174 ++ ++Work sponsored by SGI ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v175 ++ ++Work sponsored by SGI ++ ++- DocBook update for fs/devfs/base.c ++ Thanks to Tim Waugh <twaugh@redhat.com> ++ ++- Removed stale fs/tunnel.c (was never used or completed) ++=============================================================================== ++Changes for patch v176 ++ ++Work sponsored by SGI ++ ++- Updated ToDo list ++ ++- Removed sample modules.conf: now distributed with devfsd ++ ++- Updated README from master HTML file ++ ++- Ported to kernel 2.4.0-test3-pre4 (which had devfs-patch-v174) ++=============================================================================== ++Changes for patch v177 ++ ++- Updated README from master HTML file ++ ++- Documentation cleanups ++ ++- Ensure <devfs_generate_path> terminates string for root entry ++ Thanks to Tim Jansen <tim@tjansen.de> ++ ++- Exported <devfs_get_name> to modules ++ ++- Make <devfs_mk_symlink> send events to devfsd ++ ++- Cleaned up option processing in <devfs_setup> ++ ++- Fixed bugs in handling symlinks: could leak or cause Oops ++ ++- Cleaned up directory handling by separating fops ++ Thanks to Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> ++=============================================================================== ++Changes for patch v178 ++ ++- Fixed handling of inverted options in <devfs_setup> ++=============================================================================== ++Changes for patch v179 ++ ++- Adjusted <try_modload> to account for <devfs_generate_path> fix ++=============================================================================== ++Changes for patch v180 ++ ++- Fixed !CONFIG_DEVFS_FS stub declaration of <devfs_get_info> ++=============================================================================== ++Changes for patch v181 ++ ++- Answered question posed by Al Viro and removed his comments from <devfs_open> ++ ++- Moved setting of registered flag after other fields are changed ++ ++- Fixed race between <devfsd_close> and <devfsd_notify_one> ++ ++- Global VFS changes added bogus BKL to devfsd_close(): removed ++ ++- Widened locking in <devfs_readlink> and <devfs_follow_link> ++ ++- Replaced <devfsd_read> stack usage with <devfsd_ioctl> kmalloc ++ ++- Simplified locking in <devfsd_ioctl> and fixed memory leak ++=============================================================================== ++Changes for patch v182 ++ ++- Created <devfs_*alloc_major> and <devfs_*alloc_devnum> ++ ++- Removed broken devnum allocation and use <devfs_alloc_devnum> ++ ++- Fixed old devnum leak by calling new <devfs_dealloc_devnum> ++ ++- Created <devfs_*alloc_unique_number> ++ ++- Fixed number leak for /dev/cdroms/cdrom%d ++ ++- Fixed number leak for /dev/discs/disc%d ++=============================================================================== ++Changes for patch v183 ++ ++- Fixed bug in <devfs_setup> which could hang boot process ++=============================================================================== ++Changes for patch v184 ++ ++- Documentation typo fix for fs/devfs/util.c ++ ++- Fixed drivers/char/stallion.c for devfs ++ ++- Added DEVFSD_NOTIFY_DELETE event ++ ++- Updated README from master HTML file ++ ++- Removed #include <asm/segment.h> from fs/devfs/base.c ++=============================================================================== ++Changes for patch v185 ++ ++- Made <block_semaphore> and <char_semaphore> in fs/devfs/util.c ++ private ++ ++- Fixed inode table races by removing it and using inode->u.generic_ip ++ instead ++ ++- Moved <devfs_read_inode> into <get_vfs_inode> ++ ++- Moved <devfs_write_inode> into <devfs_notify_change> ++=============================================================================== ++Changes for patch v186 ++ ++- Fixed race in <devfs_do_symlink> for uni-processor ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v187 ++ ++- Fixed drivers/char/stallion.c for devfs ++ ++- Fixed drivers/char/rocket.c for devfs ++ ++- Fixed bug in <devfs_alloc_unique_number>: limited to 128 numbers ++=============================================================================== ++Changes for patch v188 ++ ++- Updated major masks in fs/devfs/util.c up to Linus' "no new majors" ++ proclamation. Block: were 126 now 122 free, char: were 26 now 19 free ++ ++- Updated README from master HTML file ++ ++- Removed remnant of multi-mount support in <devfs_mknod> ++ ++- Removed unused DEVFS_FL_SHOW_UNREG flag ++=============================================================================== ++Changes for patch v189 ++ ++- Removed nlink field from struct devfs_inode ++ ++- Removed auto-ownership for /dev/pty/* (BSD ptys) and used ++ DEVFS_FL_CURRENT_OWNER|DEVFS_FL_NO_PERSISTENCE for /dev/pty/s* (just ++ like Unix98 pty slaves) and made /dev/pty/m* rw-rw-rw- access ++=============================================================================== ++Changes for patch v190 ++ ++- Updated README from master HTML file ++ ++- Replaced BKL with global rwsem to protect symlink data (quick and ++ dirty hack) ++=============================================================================== ++Changes for patch v191 ++ ++- Replaced global rwsem for symlink with per-link refcount ++=============================================================================== ++Changes for patch v192 ++ ++- Removed unnecessary #ifdef CONFIG_DEVFS_FS from arch/i386/kernel/mtrr.c ++ ++- Ported to kernel 2.4.10-pre11 ++ ++- Set inode->i_mapping->a_ops for block nodes in <get_vfs_inode> ++=============================================================================== ++Changes for patch v193 ++ ++- Went back to global rwsem for symlinks (refcount scheme no good) ++=============================================================================== ++Changes for patch v194 ++ ++- Fixed overrun in <devfs_link> by removing function (not needed) ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v195 ++ ++- Fixed buffer underrun in <try_modload> ++ ++- Moved down_read() from <search_for_entry_in_dir> to <find_entry> ++=============================================================================== ++Changes for patch v196 ++ ++- Fixed race in <devfsd_ioctl> when setting event mask ++ Thanks to Kari Hurtta <hurtta@leija.mh.fmi.fi> ++ ++- Avoid deadlock in <devfs_follow_link> by using temporary buffer ++=============================================================================== ++Changes for patch v197 ++ ++- First release of new locking code for devfs core (v1.0) ++ ++- Fixed bug in drivers/cdrom/cdrom.c ++=============================================================================== ++Changes for patch v198 ++ ++- Discard temporary buffer, now use "%s" for dentry names ++ ++- Don't generate path in <try_modload>: use fake entry instead ++ ++- Use "existing" directory in <_devfs_make_parent_for_leaf> ++ ++- Use slab cache rather than fixed buffer for devfsd events ++=============================================================================== ++Changes for patch v199 ++ ++- Removed obsolete usage of DEVFS_FL_NO_PERSISTENCE ++ ++- Send DEVFSD_NOTIFY_REGISTERED events in <devfs_mk_dir> ++ ++- Fixed locking bug in <devfs_d_revalidate_wait> due to typo ++ ++- Do not send CREATE, CHANGE, ASYNC_OPEN or DELETE events from devfsd ++ or children ++=============================================================================== ++Changes for patch v200 ++ ++- Ported to kernel 2.5.1-pre2 ++=============================================================================== ++Changes for patch v201 ++ ++- Fixed bug in <devfsd_read>: was dereferencing freed pointer ++=============================================================================== ++Changes for patch v202 ++ ++- Fixed bug in <devfsd_close>: was dereferencing freed pointer ++ ++- Added process group check for devfsd privileges ++=============================================================================== ++Changes for patch v203 ++ ++- Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete> ++=============================================================================== ++Changes for patch v204 ++ ++- Removed long obsolete rc.devfs ++ ++- Return old entry in <devfs_mk_dir> for 2.4.x kernels ++ ++- Updated README from master HTML file ++ ++- Increment refcount on module in <check_disc_changed> ++ ++- Created <devfs_get_handle> and exported <devfs_put> ++ ++- Increment refcount on module in <devfs_get_ops> ++ ++- Created <devfs_put_ops> and used where needed to fix races ++ ++- Added clarifying comments in response to preliminary EMC code review ++ ++- Added poisoning to <devfs_put> ++ ++- Improved debugging messages ++ ++- Fixed unregister bugs in drivers/md/lvm-fs.c ++=============================================================================== ++Changes for patch v205 ++ ++- Corrected (made useful) debugging message in <unregister> ++ ++- Moved <kmem_cache_create> in <mount_devfs_fs> to <init_devfs_fs> ++ ++- Fixed drivers/md/lvm-fs.c to create "lvm" entry ++ ++- Added magic number to guard against scribbling drivers ++ ++- Only return old entry in <devfs_mk_dir> if a directory ++ ++- Defined macros for error and debug messages ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v206 ++ ++- Added support for multiple Compaq cpqarray controllers ++ ++- Fixed (rare, old) race in <devfs_lookup> ++=============================================================================== ++Changes for patch v207 ++ ++- Fixed deadlock bug in <devfs_d_revalidate_wait> ++ ++- Tag VFS deletable in <devfs_mk_symlink> if handle ignored ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v208 ++ ++- Added KERN_* to remaining messages ++ ++- Cleaned up declaration of <stat_read> ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v209 ++ ++- Updated README from master HTML file ++ ++- Removed silently introduced calls to lock_kernel() and ++ unlock_kernel() due to recent VFS locking changes. BKL isn't ++ required in devfs ++ ++- Changed <devfs_rmdir> to allow later additions if not yet empty ++ ++- Added calls to <devfs_register_partitions> in drivers/block/blkpc.c ++ <add_partition> and <del_partition> ++ ++- Fixed bug in <devfs_alloc_unique_number>: was clearing beyond ++ bitfield ++ ++- Fixed bitfield data type for <devfs_*alloc_devnum> ++ ++- Made major bitfield type and initialiser 64 bit safe ++=============================================================================== ++Changes for patch v210 ++ ++- Updated fs/devfs/util.c to fix shift warning on 64 bit machines ++ Thanks to Anton Blanchard <anton@samba.org> ++ ++- Updated README from master HTML file ++=============================================================================== ++Changes for patch v211 ++ ++- Do not put miscellaneous character devices in /dev/misc if they ++ specify their own directory (i.e. contain a '/' character) ++ ++- Copied macro for error messages from fs/devfs/base.c to ++ fs/devfs/util.c and made use of this macro ++ ++- Removed 2.4.x compatibility code from fs/devfs/base.c ++=============================================================================== ++Changes for patch v212 ++ ++- Added BKL to <devfs_open> because drivers still need it ++=============================================================================== ++Changes for patch v213 ++ ++- Protected <scan_dir_for_removable> and <get_removable_partition> ++ from changing directory contents ++=============================================================================== ++Changes for patch v214 ++ ++- Switched to ISO C structure field initialisers ++ ++- Switch to set_current_state() and move before add_wait_queue() ++ ++- Updated README from master HTML file ++ ++- Fixed devfs entry leak in <devfs_readdir> when *readdir fails ++=============================================================================== ++Changes for patch v215 ++ ++- Created <devfs_find_and_unregister> ++ ++- Switched many functions from <devfs_find_handle> to ++ <devfs_find_and_unregister> ++ ++- Switched many functions from <devfs_find_handle> to <devfs_get_handle> ++=============================================================================== ++Changes for patch v216 ++ ++- Switched arch/ia64/sn/io/hcl.c from <devfs_find_handle> to ++ <devfs_get_handle> ++ ++- Removed deprecated <devfs_find_handle> ++=============================================================================== ++Changes for patch v217 ++ ++- Exported <devfs_find_and_unregister> and <devfs_only> to modules ++ ++- Updated README from master HTML file ++ ++- Fixed module unload race in <devfs_open> ++=============================================================================== ++Changes for patch v218 ++ ++- Removed DEVFS_FL_AUTO_OWNER flag ++ ++- Switched lingering structure field initialiser to ISO C ++ ++- Added locking when setting/clearing flags ++ ++- Documentation fix in fs/devfs/util.c +diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/README linux-2.6.19.dev/Documentation/filesystems/devfs/README +--- linux-2.6.19.old/Documentation/filesystems/devfs/README 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/filesystems/devfs/README 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,1959 @@ ++Devfs (Device File System) FAQ ++ ++ ++Linux Devfs (Device File System) FAQ ++Richard Gooch ++20-AUG-2002 ++ ++ ++Document languages: ++ ++ ++ ++ ++ ++ ++ ++----------------------------------------------------------------------------- ++ ++NOTE: the master copy of this document is available online at: ++ ++http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html ++and looks much better than the text version distributed with the ++kernel sources. A mirror site is available at: ++ ++http://www.ras.ucalgary.ca/~rgooch/linux/docs/devfs.html ++ ++There is also an optional daemon that may be used with devfs. You can ++find out more about it at: ++ ++http://www.atnf.csiro.au/~rgooch/linux/ ++ ++A mailing list is available which you may subscribe to. Send ++email ++to majordomo@oss.sgi.com with the following line in the ++body of the message: ++subscribe devfs ++To unsubscribe, send the message body: ++unsubscribe devfs ++instead. The list is archived at ++ ++http://oss.sgi.com/projects/devfs/archive/. ++ ++----------------------------------------------------------------------------- ++ ++Contents ++ ++ ++What is it? ++ ++Why do it? ++ ++Who else does it? ++ ++How it works ++ ++Operational issues (essential reading) ++ ++Instructions for the impatient ++Permissions persistence across reboots ++Dealing with drivers without devfs support ++All the way with Devfs ++Other Issues ++Kernel Naming Scheme ++Devfsd Naming Scheme ++Old Compatibility Names ++SCSI Host Probing Issues ++ ++ ++ ++Device drivers currently ported ++ ++Allocation of Device Numbers ++ ++Questions and Answers ++ ++Making things work ++Alternatives to devfs ++What I don't like about devfs ++How to report bugs ++Strange kernel messages ++Compilation problems with devfsd ++ ++ ++Other resources ++ ++Translations of this document ++ ++ ++----------------------------------------------------------------------------- ++ ++ ++What is it? ++ ++Devfs is an alternative to "real" character and block special devices ++on your root filesystem. Kernel device drivers can register devices by ++name rather than major and minor numbers. These devices will appear in ++devfs automatically, with whatever default ownership and ++protection the driver specified. A daemon (devfsd) can be used to ++override these defaults. Devfs has been in the kernel since 2.3.46. ++ ++NOTE that devfs is entirely optional. If you prefer the old ++disc-based device nodes, then simply leave CONFIG_DEVFS_FS=n (the ++default). In this case, nothing will change. ALSO NOTE that if you do ++enable devfs, the defaults are such that full compatibility is ++maintained with the old devices names. ++ ++There are two aspects to devfs: one is the underlying device ++namespace, which is a namespace just like any mounted filesystem. The ++other aspect is the filesystem code which provides a view of the ++device namespace. The reason I make a distinction is because devfs ++can be mounted many times, with each mount showing the same device ++namespace. Changes made are global to all mounted devfs filesystems. ++Also, because the devfs namespace exists without any devfs mounts, you ++can easily mount the root filesystem by referring to an entry in the ++devfs namespace. ++ ++ ++The cost of devfs is a small increase in kernel code size and memory ++usage. About 7 pages of code (some of that in __init sections) and 72 ++bytes for each entry in the namespace. A modest system has only a ++couple of hundred device entries, so this costs a few more ++pages. Compare this with the suggestion to put /dev on a <a ++href="#why-faq-ramdisc">ramdisc. ++ ++On a typical machine, the cost is under 0.2 percent. On a modest ++system with 64 MBytes of RAM, the cost is under 0.1 percent. The ++accusations of "bloatware" levelled at devfs are not justified. ++ ++----------------------------------------------------------------------------- ++ ++ ++Why do it? ++ ++There are several problems that devfs addresses. Some of these ++problems are more serious than others (depending on your point of ++view), and some can be solved without devfs. However, the totality of ++these problems really calls out for devfs. ++ ++The choice is a patchwork of inefficient user space solutions, which ++are complex and likely to be fragile, or to use a simple and efficient ++devfs which is robust. ++ ++There have been many counter-proposals to devfs, all seeking to ++provide some of the benefits without actually implementing devfs. So ++far there has been an absence of code and no proposed alternative has ++been able to provide all the features that devfs does. Further, ++alternative proposals require far more complexity in user-space (and ++still deliver less functionality than devfs). Some people have the ++mantra of reducing "kernel bloat", but don't consider the effects on ++user-space. ++ ++A good solution limits the total complexity of kernel-space and ++user-space. ++ ++ ++Major&minor allocation ++ ++The existing scheme requires the allocation of major and minor device ++numbers for each and every device. This means that a central ++co-ordinating authority is required to issue these device numbers ++(unless you're developing a "private" device driver), in order to ++preserve uniqueness. Devfs shifts the burden to a namespace. This may ++not seem like a huge benefit, but actually it is. Since driver authors ++will naturally choose a device name which reflects the functionality ++of the device, there is far less potential for namespace conflict. ++Solving this requires a kernel change. ++ ++/dev management ++ ++Because you currently access devices through device nodes, these must ++be created by the system administrator. For standard devices you can ++usually find a MAKEDEV programme which creates all these (hundreds!) ++of nodes. This means that changes in the kernel must be reflected by ++changes in the MAKEDEV programme, or else the system administrator ++creates device nodes by hand. ++ ++The basic problem is that there are two separate databases of ++major and minor numbers. One is in the kernel and one is in /dev (or ++in a MAKEDEV programme, if you want to look at it that way). This is ++duplication of information, which is not good practice. ++Solving this requires a kernel change. ++ ++/dev growth ++ ++A typical /dev has over 1200 nodes! Most of these devices simply don't ++exist because the hardware is not available. A huge /dev increases the ++time to access devices (I'm just referring to the dentry lookup times ++and the time taken to read inodes off disc: the next subsection shows ++some more horrors). ++ ++An example of how big /dev can grow is if we consider SCSI devices: ++ ++host 6 bits (say up to 64 hosts on a really big machine) ++channel 4 bits (say up to 16 SCSI buses per host) ++id 4 bits ++lun 3 bits ++partition 6 bits ++TOTAL 23 bits ++ ++ ++This requires 8 Mega (1024*1024) inodes if we want to store all ++possible device nodes. Even if we scrap everything but id,partition ++and assume a single host adapter with a single SCSI bus and only one ++logical unit per SCSI target (id), that's still 10 bits or 1024 ++inodes. Each VFS inode takes around 256 bytes (kernel 2.1.78), so ++that's 256 kBytes of inode storage on disc (assuming real inodes take ++a similar amount of space as VFS inodes). This is actually not so bad, ++because disc is cheap these days. Embedded systems would care about ++256 kBytes of /dev inodes, but you could argue that embedded systems ++would have hand-tuned /dev directories. I've had to do just that on my ++embedded systems, but I would rather just leave it to devfs. ++ ++Another issue is the time taken to lookup an inode when first ++referenced. Not only does this take time in scanning through a list in ++memory, but also the seek times to read the inodes off disc. ++This could be solved in user-space using a clever programme which ++scanned the kernel logs and deleted /dev entries which are not ++available and created them when they were available. This programme ++would need to be run every time a new module was loaded, which would ++slow things down a lot. ++ ++There is an existing programme called scsidev which will automatically ++create device nodes for SCSI devices. It can do this by scanning files ++in /proc/scsi. Unfortunately, to extend this idea to other device ++nodes would require significant modifications to existing drivers (so ++they too would provide information in /proc). This is a non-trivial ++change (I should know: devfs has had to do something similar). Once ++you go to this much effort, you may as well use devfs itself (which ++also provides this information). Furthermore, such a system would ++likely be implemented in an ad-hoc fashion, as different drivers will ++provide their information in different ways. ++ ++Devfs is much cleaner, because it (naturally) has a uniform mechanism ++to provide this information: the device nodes themselves! ++ ++ ++Node to driver file_operations translation ++ ++There is an important difference between the way disc-based character ++and block nodes and devfs entries make the connection between an entry ++in /dev and the actual device driver. ++ ++With the current 8 bit major and minor numbers the connection between ++disc-based c&b nodes and per-major drivers is done through a ++fixed-length table of 128 entries. The various filesystem types set ++the inode operations for c&b nodes to {chr,blk}dev_inode_operations, ++so when a device is opened a few quick levels of indirection bring us ++to the driver file_operations. ++ ++For miscellaneous character devices a second step is required: there ++is a scan for the driver entry with the same minor number as the file ++that was opened, and the appropriate minor open method is called. This ++scanning is done *every time* you open a device node. Potentially, you ++may be searching through dozens of misc. entries before you find your ++open method. While not an enormous performance overhead, this does ++seem pointless. ++ ++Linux *must* move beyond the 8 bit major and minor barrier, ++somehow. If we simply increase each to 16 bits, then the indexing ++scheme used for major driver lookup becomes untenable, because the ++major tables (one each for character and block devices) would need to ++be 64 k entries long (512 kBytes on x86, 1 MByte for 64 bit ++systems). So we would have to use a scheme like that used for ++miscellaneous character devices, which means the search time goes up ++linearly with the average number of major device drivers on your ++system. Not all "devices" are hardware, some are higher-level drivers ++like KGI, so you can get more "devices" without adding hardware ++You can improve this by creating an ordered (balanced:-) ++binary tree, in which case your search time becomes log(N). ++Alternatively, you can use hashing to speed up the search. ++But why do that search at all if you don't have to? Once again, it ++seems pointless. ++ ++Note that devfs doesn't use the major&minor system. For devfs ++entries, the connection is done when you lookup the /dev entry. When ++devfs_register() is called, an internal table is appended which has ++the entry name and the file_operations. If the dentry cache doesn't ++have the /dev entry already, this internal table is scanned to get the ++file_operations, and an inode is created. If the dentry cache already ++has the entry, there is *no lookup time* (other than the dentry scan ++itself, but we can't avoid that anyway, and besides Linux dentries ++cream other OS's which don't have them:-). Furthermore, the number of ++node entries in a devfs is only the number of available device ++entries, not the number of *conceivable* entries. Even if you remove ++unnecessary entries in a disc-based /dev, the number of conceivable ++entries remains the same: you just limit yourself in order to save ++space. ++ ++Devfs provides a fast connection between a VFS node and the device ++driver, in a scalable way. ++ ++/dev as a system administration tool ++ ++Right now /dev contains a list of conceivable devices, most of which I ++don't have. Devfs only shows those devices available on my ++system. This means that listing /dev is a handy way of checking what ++devices are available. ++ ++Major&minor size ++ ++Existing major and minor numbers are limited to 8 bits each. This is ++now a limiting factor for some drivers, particularly the SCSI disc ++driver, which consumes a single major number. Only 16 discs are ++supported, and each disc may have only 15 partitions. Maybe this isn't ++a problem for you, but some of us are building huge Linux systems with ++disc arrays. With devfs an arbitrary pointer can be associated with ++each device entry, which can be used to give an effective 32 bit ++device identifier (i.e. that's like having a 32 bit minor ++number). Since this is private to the kernel, there are no C library ++compatibility issues which you would have with increasing major and ++minor number sizes. See the section on "Allocation of Device Numbers" ++for details on maintaining compatibility with userspace. ++ ++Solving this requires a kernel change. ++ ++Since writing this, the kernel has been modified so that the SCSI disc ++driver has more major numbers allocated to it and now supports up to ++128 discs. Since these major numbers are non-contiguous (a result of ++unplanned expansion), the implementation is a little more cumbersome ++than originally. ++ ++Just like the changes to IPv4 to fix impending limitations in the ++address space, people find ways around the limitations. In the long ++run, however, solutions like IPv6 or devfs can't be put off forever. ++ ++Read-only root filesystem ++ ++Having your device nodes on the root filesystem means that you can't ++operate properly with a read-only root filesystem. This is because you ++want to change ownerships and protections of tty devices. Existing ++practice prevents you using a CD-ROM as your root filesystem for a ++*real* system. Sure, you can boot off a CD-ROM, but you can't change ++tty ownerships, so it's only good for installing. ++ ++Also, you can't use a shared NFS root filesystem for a cluster of ++discless Linux machines (having tty ownerships changed on a common ++/dev is not good). Nor can you embed your root filesystem in a ++ROM-FS. ++ ++You can get around this by creating a RAMDISC at boot time, making ++an ext2 filesystem in it, mounting it somewhere and copying the ++contents of /dev into it, then unmounting it and mounting it over ++/dev. ++ ++A devfs is a cleaner way of solving this. ++ ++Non-Unix root filesystem ++ ++Non-Unix filesystems (such as NTFS) can't be used for a root ++filesystem because they variously don't support character and block ++special files or symbolic links. You can't have a separate disc-based ++or RAMDISC-based filesystem mounted on /dev because you need device ++nodes before you can mount these. Devfs can be mounted without any ++device nodes. Devlinks won't work because symlinks aren't supported. ++An alternative solution is to use initrd to mount a RAMDISC initial ++root filesystem (which is populated with a minimal set of device ++nodes), and then construct a new /dev in another RAMDISC, and finally ++switch to your non-Unix root filesystem. This requires clever boot ++scripts and a fragile and conceptually complex boot procedure. ++ ++Devfs solves this in a robust and conceptually simple way. ++ ++PTY security ++ ++Current pseudo-tty (pty) devices are owned by root and read-writable ++by everyone. The user of a pty-pair cannot change ++ownership/protections without being suid-root. ++ ++This could be solved with a secure user-space daemon which runs as ++root and does the actual creation of pty-pairs. Such a daemon would ++require modification to *every* programme that wants to use this new ++mechanism. It also slows down creation of pty-pairs. ++ ++An alternative is to create a new open_pty() syscall which does much ++the same thing as the user-space daemon. Once again, this requires ++modifications to pty-handling programmes. ++ ++The devfs solution allows a device driver to "tag" certain device ++files so that when an unopened device is opened, the ownerships are ++changed to the current euid and egid of the opening process, and the ++protections are changed to the default registered by the driver. When ++the device is closed ownership is set back to root and protections are ++set back to read-write for everybody. No programme need be changed. ++The devpts filesystem provides this auto-ownership feature for Unix98 ++ptys. It doesn't support old-style pty devices, nor does it have all ++the other features of devfs. ++ ++Intelligent device management ++ ++Devfs implements a simple yet powerful protocol for communication with ++a device management daemon (devfsd) which runs in user space. It is ++possible to send a message (either synchronously or asynchronously) to ++devfsd on any event, such as registration/unregistration of device ++entries, opening and closing devices, looking up inodes, scanning ++directories and more. This has many possibilities. Some of these are ++already implemented. See: ++ ++ ++http://www.atnf.csiro.au/~rgooch/linux/ ++ ++Device entry registration events can be used by devfsd to change ++permissions of newly-created device nodes. This is one mechanism to ++control device permissions. ++ ++Device entry registration/unregistration events can be used to run ++programmes or scripts. This can be used to provide automatic mounting ++of filesystems when a new block device media is inserted into the ++drive. ++ ++Asynchronous device open and close events can be used to implement ++clever permissions management. For example, the default permissions on ++/dev/dsp do not allow everybody to read from the device. This is ++sensible, as you don't want some remote user recording what you say at ++your console. However, the console user is also prevented from ++recording. This behaviour is not desirable. With asynchronous device ++open and close events, you can have devfsd run a programme or script ++when console devices are opened to change the ownerships for *other* ++device nodes (such as /dev/dsp). On closure, you can run a different ++script to restore permissions. An advantage of this scheme over ++modifying the C library tty handling is that this works even if your ++programme crashes (how many times have you seen the utmp database with ++lingering entries for non-existent logins?). ++ ++Synchronous device open events can be used to perform intelligent ++device access protections. Before the device driver open() method is ++called, the daemon must first validate the open attempt, by running an ++external programme or script. This is far more flexible than access ++control lists, as access can be determined on the basis of other ++system conditions instead of just the UID and GID. ++ ++Inode lookup events can be used to authenticate module autoload ++requests. Instead of using kmod directly, the event is sent to ++devfsd which can implement an arbitrary authentication before loading ++the module itself. ++ ++Inode lookup events can also be used to construct arbitrary ++namespaces, without having to resort to populating devfs with symlinks ++to devices that don't exist. ++ ++Speculative Device Scanning ++ ++Consider an application (like cdparanoia) that wants to find all ++CD-ROM devices on the system (SCSI, IDE and other types), whether or ++not their respective modules are loaded. The application must ++speculatively open certain device nodes (such as /dev/sr0 for the SCSI ++CD-ROMs) in order to make sure the module is loaded. This requires ++that all Linux distributions follow the standard device naming scheme ++(last time I looked RedHat did things differently). Devfs solves the ++naming problem. ++ ++The same application also wants to see which devices are actually ++available on the system. With the existing system it needs to read the ++/dev directory and speculatively open each /dev/sr* device to ++determine if the device exists or not. With a large /dev this is an ++inefficient operation, especially if there are many /dev/sr* nodes. A ++solution like scsidev could reduce the number of /dev/sr* entries (but ++of course that also requires all that inefficient directory scanning). ++ ++With devfs, the application can open the /dev/sr directory ++(which triggers the module autoloading if required), and proceed to ++read /dev/sr. Since only the available devices will have ++entries, there are no inefficencies in directory scanning or device ++openings. ++ ++----------------------------------------------------------------------------- ++ ++Who else does it? ++ ++FreeBSD has a devfs implementation. Solaris and AIX each have a ++pseudo-devfs (something akin to scsidev but for all devices, with some ++unspecified kernel support). BeOS, Plan9 and QNX also have it. SGI's ++IRIX 6.4 and above also have a device filesystem. ++ ++While we shouldn't just automatically do something because others do ++it, we should not ignore the work of others either. FreeBSD has a lot ++of competent people working on it, so their opinion should not be ++blithely ignored. ++ ++----------------------------------------------------------------------------- ++ ++ ++How it works ++ ++Registering device entries ++ ++For every entry (device node) in a devfs-based /dev a driver must call ++devfs_register(). This adds the name of the device entry, the ++file_operations structure pointer and a few other things to an ++internal table. Device entries may be added and removed at any ++time. When a device entry is registered, it automagically appears in ++any mounted devfs'. ++ ++Inode lookup ++ ++When a lookup operation on an entry is performed and if there is no ++driver information for that entry devfs will attempt to call ++devfsd. If still no driver information can be found then a negative ++dentry is yielded and the next stage operation will be called by the ++VFS (such as create() or mknod() inode methods). If driver information ++can be found, an inode is created (if one does not exist already) and ++all is well. ++ ++Manually creating device nodes ++ ++The mknod() method allows you to create an ordinary named pipe in the ++devfs, or you can create a character or block special inode if one ++does not already exist. You may wish to create a character or block ++special inode so that you can set permissions and ownership. Later, if ++a device driver registers an entry with the same name, the ++permissions, ownership and times are retained. This is how you can set ++the protections on a device even before the driver is loaded. Once you ++create an inode it appears in the directory listing. ++ ++Unregistering device entries ++ ++A device driver calls devfs_unregister() to unregister an entry. ++ ++Chroot() gaols ++ ++2.2.x kernels ++ ++The semantics of inode creation are different when devfs is mounted ++with the "explicit" option. Now, when a device entry is registered, it ++will not appear until you use mknod() to create the device. It doesn't ++matter if you mknod() before or after the device is registered with ++devfs_register(). The purpose of this behaviour is to support ++chroot(2) gaols, where you want to mount a minimal devfs inside the ++gaol. Only the devices you specifically want to be available (through ++your mknod() setup) will be accessible. ++ ++2.4.x kernels ++ ++As of kernel 2.3.99, the VFS has had the ability to rebind parts of ++the global filesystem namespace into another part of the namespace. ++This now works even at the leaf-node level, which means that ++individual files and device nodes may be bound into other parts of the ++namespace. This is like making links, but better, because it works ++across filesystems (unlike hard links) and works through chroot() ++gaols (unlike symbolic links). ++ ++Because of these improvements to the VFS, the multi-mount capability ++in devfs is no longer needed. The administrator may create a minimal ++device tree inside a chroot(2) gaol by using VFS bindings. As this ++provides most of the features of the devfs multi-mount capability, I ++removed the multi-mount support code (after issuing an RFC). This ++yielded code size reductions and simplifications. ++ ++If you want to construct a minimal chroot() gaol, the following ++command should suffice: ++ ++mount --bind /dev/null /gaol/dev/null ++ ++ ++Repeat for other device nodes you want to expose. Simple! ++ ++----------------------------------------------------------------------------- ++ ++ ++Operational issues ++ ++ ++Instructions for the impatient ++ ++Nobody likes reading documentation. People just want to get in there ++and play. So this section tells you quickly the steps you need to take ++to run with devfs mounted over /dev. Skip these steps and you will end ++up with a nearly unbootable system. Subsequent sections describe the ++issues in more detail, and discuss non-essential configuration ++options. ++ ++Devfsd ++OK, if you're reading this, I assume you want to play with ++devfs. First you should ensure that /usr/src/linux contains a ++recent kernel source tree. Then you need to compile devfsd, the device ++management daemon, available at ++ ++http://www.atnf.csiro.au/~rgooch/linux/. ++Because the kernel has a naming scheme ++which is quite different from the old naming scheme, you need to ++install devfsd so that software and configuration files that use the ++old naming scheme will not break. ++ ++Compile and install devfsd. You will be provided with a default ++configuration file /etc/devfsd.conf which will provide ++compatibility symlinks for the old naming scheme. Don't change this ++config file unless you know what you're doing. Even if you think you ++do know what you're doing, don't change it until you've followed all ++the steps below and booted a devfs-enabled system and verified that it ++works. ++ ++Now edit your main system boot script so that devfsd is started at the ++very beginning (before any filesystem ++checks). /etc/rc.d/rc.sysinit is often the main boot script ++on systems with SysV-style boot scripts. On systems with BSD-style ++boot scripts it is often /etc/rc. Also check ++/sbin/rc. ++ ++NOTE that the line you put into the boot ++script should be exactly: ++ ++/sbin/devfsd /dev ++ ++DO NOT use some special daemon-launching ++programme, otherwise the boot script may not wait for devfsd to finish ++initialising. ++ ++System Libraries ++There may still be some problems because of broken software making ++assumptions about device names. In particular, some software does not ++handle devices which are symbolic links. If you are running a libc 5 ++based system, install libc 5.4.44 (if you have libc 5.4.46, go back to ++libc 5.4.44, which is actually correct). If you are running a glibc ++based system, make sure you have glibc 2.1.3 or later. ++ ++/etc/securetty ++PAM (Pluggable Authentication Modules) is supposed to be a flexible ++mechanism for providing better user authentication and access to ++services. Unfortunately, it's also fragile, complex and undocumented ++(check out RedHat 6.1, and probably other distributions as well). PAM ++has problems with symbolic links. Append the following lines to your ++/etc/securetty file: ++ ++vc/1 ++vc/2 ++vc/3 ++vc/4 ++vc/5 ++vc/6 ++vc/7 ++vc/8 ++ ++This will not weaken security. If you have a version of util-linux ++earlier than 2.10.h, please upgrade to 2.10.h or later. If you ++absolutely cannot upgrade, then also append the following lines to ++your /etc/securetty file: ++ ++1 ++2 ++3 ++4 ++5 ++6 ++7 ++8 ++ ++This may potentially weaken security by allowing root logins over the ++network (a password is still required, though). However, since there ++are problems with dealing with symlinks, I'm suspicious of the level ++of security offered in any case. ++ ++XFree86 ++While not essential, it's probably a good idea to upgrade to XFree86 ++4.0, as patches went in to make it more devfs-friendly. If you don't, ++you'll probably need to apply the following patch to ++/etc/security/console.perms so that ordinary users can run ++startx. Note that not all distributions have this file (e.g. Debian), ++so if it's not present, don't worry about it. ++ ++--- /etc/security/console.perms.orig Sat Apr 17 16:26:47 1999 +++++ /etc/security/console.perms Fri Feb 25 23:53:55 2000 ++@@ -14,7 +14,7 @@ ++ # man 5 console.perms ++ ++ # file classes -- these are regular expressions ++-<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] +++<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9] ++ ++ # device classes -- these are shell-style globs ++ <floppy>=/dev/fd[0-1]* ++ ++If the patch does not apply, then change the line: ++ ++<console>=tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] ++ ++with: ++ ++<console>=tty[0-9][0-9]* vc/[0-9][0-9]* :[0-9]\.[0-9] :[0-9] ++ ++ ++Disable devpts ++I've had a report of devpts mounted on /dev/pts not working ++correctly. Since devfs will also manage /dev/pts, there is no ++need to mount devpts as well. You should either edit your ++/etc/fstab so devpts is not mounted, or disable devpts from ++your kernel configuration. ++ ++Unsupported drivers ++Not all drivers have devfs support. If you depend on one of these ++drivers, you will need to create a script or tarfile that you can use ++at boot time to create device nodes as appropriate. There is a ++section which describes this. Another ++section lists the drivers which have ++devfs support. ++ ++/dev/mouse ++ ++Many disributions configure /dev/mouse to be the mouse device ++for XFree86 and GPM. I actually think this is a bad idea, because it ++adds another level of indirection. When looking at a config file, if ++you see /dev/mouse you're left wondering which mouse ++is being referred to. Hence I recommend putting the actual mouse ++device (for example /dev/psaux) into your ++/etc/X11/XF86Config file (and similarly for the GPM ++configuration file). ++ ++Alternatively, use the same technique used for unsupported drivers ++described above. ++ ++The Kernel ++Finally, you need to make sure devfs is compiled into your kernel. Set ++CONFIG_EXPERIMENTAL=y, CONFIG_DEVFS_FS=y and CONFIG_DEVFS_MOUNT=y by ++using favourite configuration tool (i.e. make config or ++make xconfig) and then make clean and then recompile your kernel and ++modules. At boot, devfs will be mounted onto /dev. ++ ++If you encounter problems booting (for example if you forgot a ++configuration step), you can pass devfs=nomount at the kernel ++boot command line. This will prevent the kernel from mounting devfs at ++boot time onto /dev. ++ ++In general, a kernel built with CONFIG_DEVFS_FS=y but without mounting ++devfs onto /dev is completely safe, and requires no ++configuration changes. One exception to take note of is when ++LABEL= directives are used in /etc/fstab. In this ++case you will be unable to boot properly. This is because the ++mount(8) programme uses /proc/partitions as part of ++the volume label search process, and the device names it finds are not ++available, because setting CONFIG_DEVFS_FS=y changes the names in ++/proc/partitions, irrespective of whether devfs is mounted. ++ ++Now you've finished all the steps required. You're now ready to boot ++your shiny new kernel. Enjoy. ++ ++Changing the configuration ++ ++OK, you've now booted a devfs-enabled system, and everything works. ++Now you may feel like changing the configuration (common targets are ++/etc/fstab and /etc/devfsd.conf). Since you have a ++system that works, if you make any changes and it doesn't work, you ++now know that you only have to restore your configuration files to the ++default and it will work again. ++ ++ ++Permissions persistence across reboots ++ ++If you don't use mknod(2) to create a device file, nor use chmod(2) or ++chown(2) to change the ownerships/permissions, the inode ctime will ++remain at 0 (the epoch, 12 am, 1-JAN-1970, GMT). Anything with a ctime ++later than this has had it's ownership/permissions changed. Hence, a ++simple script or programme may be used to tar up all changed inodes, ++prior to shutdown. Although effective, many consider this approach a ++kludge. ++ ++A much better approach is to use devfsd to save and restore ++permissions. It may be configured to record changes in permissions and ++will save them in a database (in fact a directory tree), and restore ++these upon boot. This is an efficient method and results in immediate ++saving of current permissions (unlike the tar approach, which saves ++permissions at some unspecified future time). ++ ++The default configuration file supplied with devfsd has config entries ++which you may uncomment to enable persistence management. ++ ++If you decide to use the tar approach anyway, be aware that tar will ++first unlink(2) an inode before creating a new device node. The ++unlink(2) has the effect of breaking the connection between a devfs ++entry and the device driver. If you use the "devfs=only" boot option, ++you lose access to the device driver, requiring you to reload the ++module. I consider this a bug in tar (there is no real need to ++unlink(2) the inode first). ++ ++Alternatively, you can use devfsd to provide more sophisticated ++management of device permissions. You can use devfsd to store ++permissions for whole groups of devices with a single configuration ++entry, rather than the conventional single entry per device entry. ++ ++Permissions database stored in mounted-over /dev ++ ++If you wish to save and restore your device permissions into the ++disc-based /dev while still mounting devfs onto /dev ++you may do so. This requires a 2.4.x kernel (in fact, 2.3.99 or ++later), which has the VFS binding facility. You need to do the ++following to set this up: ++ ++ ++ ++make sure the kernel does not mount devfs at boot time ++ ++ ++make sure you have a correct /dev/console entry in your ++root file-system (where your disc-based /dev lives) ++ ++create the /dev-state directory ++ ++ ++add the following lines near the very beginning of your boot ++scripts: ++ ++mount --bind /dev /dev-state ++mount -t devfs none /dev ++devfsd /dev ++ ++ ++ ++ ++add the following lines to your /etc/devfsd.conf file: ++ ++REGISTER ^pt[sy] IGNORE ++CREATE ^pt[sy] IGNORE ++CHANGE ^pt[sy] IGNORE ++DELETE ^pt[sy] IGNORE ++REGISTER .* COPY /dev-state/$devname $devpath ++CREATE .* COPY $devpath /dev-state/$devname ++CHANGE .* COPY $devpath /dev-state/$devname ++DELETE .* CFUNCTION GLOBAL unlink /dev-state/$devname ++RESTORE /dev-state ++ ++Note that the sample devfsd.conf file contains these lines, ++as well as other sample configurations you may find useful. See the ++devfsd distribution ++ ++ ++reboot. ++ ++ ++ ++ ++Permissions database stored in normal directory ++ ++If you are using an older kernel which doesn't support VFS binding, ++then you won't be able to have the permissions database in a ++mounted-over /dev. However, you can still use a regular ++directory to store the database. The sample /etc/devfsd.conf ++file above may still be used. You will need to create the ++/dev-state directory prior to installing devfsd. If you have ++old permissions in /dev, then just copy (or move) the device ++nodes over to the new directory. ++ ++Which method is better? ++ ++The best method is to have the permissions database stored in the ++mounted-over /dev. This is because you will not need to copy ++device nodes over to /dev-state, and because it allows you to ++switch between devfs and non-devfs kernels, without requiring you to ++copy permissions between /dev-state (for devfs) and ++/dev (for non-devfs). ++ ++ ++Dealing with drivers without devfs support ++ ++Currently, not all device drivers in the kernel have been modified to ++use devfs. Device drivers which do not yet have devfs support will not ++automagically appear in devfs. The simplest way to create device nodes ++for these drivers is to unpack a tarfile containing the required ++device nodes. You can do this in your boot scripts. All your drivers ++will now work as before. ++ ++Hopefully for most people devfs will have enough support so that they ++can mount devfs directly over /dev without losing most functionality ++(i.e. losing access to various devices). As of 22-JAN-1998 (devfs ++patch version 10) I am now running this way. All the devices I have ++are available in devfs, so I don't lose anything. ++ ++WARNING: if your configuration requires the old-style device names ++(i.e. /dev/hda1 or /dev/sda1), you must install devfsd and configure ++it to maintain compatibility entries. It is almost certain that you ++will require this. Note that the kernel creates a compatibility entry ++for the root device, so you don't need initrd. ++ ++Note that you no longer need to mount devpts if you use Unix98 PTYs, ++as devfs can manage /dev/pts itself. This saves you some RAM, as you ++don't need to compile and install devpts. Note that some versions of ++glibc have a bug with Unix98 pty handling on devfs systems. Contact ++the glibc maintainers for a fix. Glibc 2.1.3 has the fix. ++ ++Note also that apart from editing /etc/fstab, other things will need ++to be changed if you *don't* install devfsd. Some software (like the X ++server) hard-wire device names in their source. It really is much ++easier to install devfsd so that compatibility entries are created. ++You can then slowly migrate your system to using the new device names ++(for example, by starting with /etc/fstab), and then limiting the ++compatibility entries that devfsd creates. ++ ++IF YOU CONFIGURE TO MOUNT DEVFS AT BOOT, MAKE SURE YOU INSTALL DEVFSD ++BEFORE YOU BOOT A DEVFS-ENABLED KERNEL! ++ ++Now that devfs has gone into the 2.3.46 kernel, I'm getting a lot of ++reports back. Many of these are because people are trying to run ++without devfsd, and hence some things break. Please just run devfsd if ++things break. I want to concentrate on real bugs rather than ++misconfiguration problems at the moment. If people are willing to fix ++bugs/false assumptions in other code (i.e. glibc, X server) and submit ++that to the respective maintainers, that would be great. ++ ++ ++All the way with Devfs ++ ++The devfs kernel patch creates a rationalised device tree. As stated ++above, if you want to keep using the old /dev naming scheme, ++you just need to configure devfsd appopriately (see the man ++page). People who prefer the old names can ignore this section. For ++those of us who like the rationalised names and an uncluttered ++/dev, read on. ++ ++If you don't run devfsd, or don't enable compatibility entry ++management, then you will have to configure your system to use the new ++names. For example, you will then need to edit your ++/etc/fstab to use the new disc naming scheme. If you want to ++be able to boot non-devfs kernels, you will need compatibility ++symlinks in the underlying disc-based /dev pointing back to ++the old-style names for when you boot a kernel without devfs. ++ ++You can selectively decide which devices you want compatibility ++entries for. For example, you may only want compatibility entries for ++BSD pseudo-terminal devices (otherwise you'll have to patch you C ++library or use Unix98 ptys instead). It's just a matter of putting in ++the correct regular expression into /dev/devfsd.conf. ++ ++There are other choices of naming schemes that you may prefer. For ++example, I don't use the kernel-supplied ++names, because they are too verbose. A common misconception is ++that the kernel-supplied names are meant to be used directly in ++configuration files. This is not the case. They are designed to ++reflect the layout of the devices attached and to provide easy ++classification. ++ ++If you like the kernel-supplied names, that's fine. If you don't then ++you should be using devfsd to construct a namespace more to your ++liking. Devfsd has built-in code to construct a ++namespace that is both logical and easy to ++manage. In essence, it creates a convenient abbreviation of the ++kernel-supplied namespace. ++ ++You are of course free to build your own namespace. Devfsd has all the ++infrastructure required to make this easy for you. All you need do is ++write a script. You can even write some C code and devfsd can load the ++shared object as a callable extension. ++ ++ ++Other Issues ++ ++The init programme ++Another thing to take note of is whether your init programme ++creates a Unix socket /dev/telinit. Some versions of init ++create /dev/telinit so that the telinit programme can ++communicate with the init process. If you have such a system you need ++to make sure that devfs is mounted over /dev *before* init ++starts. In other words, you can't leave the mounting of devfs to ++/etc/rc, since this is executed after init. Other ++versions of init require a named pipe /dev/initctl ++which must exist *before* init starts. Once again, you need to ++mount devfs and then create the named pipe *before* init ++starts. ++ ++The default behaviour now is not to mount devfs onto /dev at ++boot time for 2.3.x and later kernels. You can correct this with the ++"devfs=mount" boot option. This solves any problems with init, ++and also prevents the dreaded: ++ ++Cannot open initial console ++ ++message. For 2.2.x kernels where you need to apply the devfs patch, ++the default is to mount. ++ ++If you have automatic mounting of devfs onto /dev then you ++may need to create /dev/initctl in your boot scripts. The ++following lines should suffice: ++ ++mknod /dev/initctl p ++kill -SIGUSR1 1 # tell init that /dev/initctl now exists ++ ++Alternatively, if you don't want the kernel to mount devfs onto ++/dev then you could use the following procedure is a ++guideline for how to get around /dev/initctl problems: ++ ++# cd /sbin ++# mv init init.real ++# cat > init ++#! /bin/sh ++mount -n -t devfs none /dev ++mknod /dev/initctl p ++exec /sbin/init.real $* ++[control-D] ++# chmod a+x init ++ ++Note that newer versions of init create /dev/initctl ++automatically, so you don't have to worry about this. ++ ++Module autoloading ++You will need to configure devfsd to enable module ++autoloading. The following lines should be placed in your ++/etc/devfsd.conf file: ++ ++LOOKUP .* MODLOAD ++ ++ ++As of devfsd-v1.3.10, a generic /etc/modules.devfs ++configuration file is installed, which is used by the MODLOAD ++action. This should be sufficient for most configurations. If you ++require further configuration, edit your /etc/modules.conf ++file. The way module autoloading work with devfs is: ++ ++ ++a process attempts to lookup a device node (e.g. /dev/fred) ++ ++ ++if that device node does not exist, the full pathname is passed to ++devfsd as a string ++ ++ ++devfsd will pass the string to the modprobe programme (provided the ++configuration line shown above is present), and specifies that ++/etc/modules.devfs is the configuration file ++ ++ ++/etc/modules.devfs includes /etc/modules.conf to ++access local configurations ++ ++modprobe will search it's configuration files, looking for an alias ++that translates the pathname into a module name ++ ++ ++the translated pathname is then used to load the module. ++ ++ ++If you wanted a lookup of /dev/fred to load the ++mymod module, you would require the following configuration ++line in /etc/modules.conf: ++ ++alias /dev/fred mymod ++ ++The /etc/modules.devfs configuration file provides many such ++aliases for standard device names. If you look closely at this file, ++you will note that some modules require multiple alias configuration ++lines. This is required to support module autoloading for old and new ++device names. ++ ++Mounting root off a devfs device ++If you wish to mount root off a devfs device when you pass the ++"devfs=only" boot option, then you need to pass in the ++"root=<device>" option to the kernel when booting. If you use ++LILO, then you must have this in lilo.conf: ++ ++append = "root=<device>" ++ ++Surprised? Yep, so was I. It turns out if you have (as most people ++do): ++ ++root = <device> ++ ++ ++then LILO will determine the device number of <device> and will ++write that device number into a special place in the kernel image ++before starting the kernel, and the kernel will use that device number ++to mount the root filesystem. So, using the "append" variety ensures ++that LILO passes the root filesystem device as a string, which devfs ++can then use. ++ ++Note that this isn't an issue if you don't pass "devfs=only". ++ ++TTY issues ++The ttyname(3) function in some versions of the C library makes ++false assumptions about device entries which are symbolic links. The ++tty(1) programme is one that depends on this function. I've ++written a patch to libc 5.4.43 which fixes this. This has been ++included in libc 5.4.44 and a similar fix is in glibc 2.1.3. ++ ++ ++Kernel Naming Scheme ++ ++The kernel provides a default naming scheme. This scheme is designed ++to make it easy to search for specific devices or device types, and to ++view the available devices. Some device types (such as hard discs), ++have a directory of entries, making it easy to see what devices of ++that class are available. Often, the entries are symbolic links into a ++directory tree that reflects the topology of available devices. The ++topological tree is useful for finding how your devices are arranged. ++ ++Below is a list of the naming schemes for the most common drivers. A ++list of reserved device names is ++available for reference. Please send email to ++rgooch@atnf.csiro.au to obtain an allocation. Please be ++patient (the maintainer is busy). An alternative name may be allocated ++instead of the requested name, at the discretion of the maintainer. ++ ++Disc Devices ++ ++All discs, whether SCSI, IDE or whatever, are placed under the ++/dev/discs hierarchy: ++ ++ /dev/discs/disc0 first disc ++ /dev/discs/disc1 second disc ++ ++ ++Each of these entries is a symbolic link to the directory for that ++device. The device directory contains: ++ ++ disc for the whole disc ++ part* for individual partitions ++ ++ ++CD-ROM Devices ++ ++All CD-ROMs, whether SCSI, IDE or whatever, are placed under the ++/dev/cdroms hierarchy: ++ ++ /dev/cdroms/cdrom0 first CD-ROM ++ /dev/cdroms/cdrom1 second CD-ROM ++ ++ ++Each of these entries is a symbolic link to the real device entry for ++that device. ++ ++Tape Devices ++ ++All tapes, whether SCSI, IDE or whatever, are placed under the ++/dev/tapes hierarchy: ++ ++ /dev/tapes/tape0 first tape ++ /dev/tapes/tape1 second tape ++ ++ ++Each of these entries is a symbolic link to the directory for that ++device. The device directory contains: ++ ++ mt for mode 0 ++ mtl for mode 1 ++ mtm for mode 2 ++ mta for mode 3 ++ mtn for mode 0, no rewind ++ mtln for mode 1, no rewind ++ mtmn for mode 2, no rewind ++ mtan for mode 3, no rewind ++ ++ ++SCSI Devices ++ ++To uniquely identify any SCSI device requires the following ++information: ++ ++ controller (host adapter) ++ bus (SCSI channel) ++ target (SCSI ID) ++ unit (Logical Unit Number) ++ ++ ++All SCSI devices are placed under /dev/scsi (assuming devfs ++is mounted on /dev). Hence, a SCSI device with the following ++parameters: c=1,b=2,t=3,u=4 would appear as: ++ ++ /dev/scsi/host1/bus2/target3/lun4 device directory ++ ++ ++Inside this directory, a number of device entries may be created, ++depending on which SCSI device-type drivers were installed. ++ ++See the section on the disc naming scheme to see what entries the SCSI ++disc driver creates. ++ ++See the section on the tape naming scheme to see what entries the SCSI ++tape driver creates. ++ ++The SCSI CD-ROM driver creates: ++ ++ cd ++ ++ ++The SCSI generic driver creates: ++ ++ generic ++ ++ ++IDE Devices ++ ++To uniquely identify any IDE device requires the following ++information: ++ ++ controller ++ bus (aka. primary/secondary) ++ target (aka. master/slave) ++ unit ++ ++ ++All IDE devices are placed under /dev/ide, and uses a similar ++naming scheme to the SCSI subsystem. ++ ++XT Hard Discs ++ ++All XT discs are placed under /dev/xd. The first XT disc has ++the directory /dev/xd/disc0. ++ ++TTY devices ++ ++The tty devices now appear as: ++ ++ New name Old-name Device Type ++ -------- -------- ----------- ++ /dev/tts/{0,1,...} /dev/ttyS{0,1,...} Serial ports ++ /dev/cua/{0,1,...} /dev/cua{0,1,...} Call out devices ++ /dev/vc/0 /dev/tty Current virtual console ++ /dev/vc/{1,2,...} /dev/tty{1...63} Virtual consoles ++ /dev/vcc/{0,1,...} /dev/vcs{1...63} Virtual consoles ++ /dev/pty/m{0,1,...} /dev/ptyp?? PTY masters ++ /dev/pty/s{0,1,...} /dev/ttyp?? PTY slaves ++ ++ ++RAMDISCS ++ ++The RAMDISCS are placed in their own directory, and are named thus: ++ ++ /dev/rd/{0,1,2,...} ++ ++ ++Meta Devices ++ ++The meta devices are placed in their own directory, and are named ++thus: ++ ++ /dev/md/{0,1,2,...} ++ ++ ++Floppy discs ++ ++Floppy discs are placed in the /dev/floppy directory. ++ ++Loop devices ++ ++Loop devices are placed in the /dev/loop directory. ++ ++Sound devices ++ ++Sound devices are placed in the /dev/sound directory ++(audio, sequencer, ...). ++ ++ ++Devfsd Naming Scheme ++ ++Devfsd provides a naming scheme which is a convenient abbreviation of ++the kernel-supplied namespace. In some ++cases, the kernel-supplied naming scheme is quite convenient, so ++devfsd does not provide another naming scheme. The convenience names ++that devfsd creates are in fact the same names as the original devfs ++kernel patch created (before Linus mandated the Big Name ++Change). These are referred to as "new compatibility entries". ++ ++In order to configure devfsd to create these convenience names, the ++following lines should be placed in your /etc/devfsd.conf: ++ ++REGISTER .* MKNEWCOMPAT ++UNREGISTER .* RMNEWCOMPAT ++ ++This will cause devfsd to create (and destroy) symbolic links which ++point to the kernel-supplied names. ++ ++SCSI Hard Discs ++ ++All SCSI discs are placed under /dev/sd (assuming devfs is ++mounted on /dev). Hence, a SCSI disc with the following ++parameters: c=1,b=2,t=3,u=4 would appear as: ++ ++ /dev/sd/c1b2t3u4 for the whole disc ++ /dev/sd/c1b2t3u4p5 for the 5th partition ++ /dev/sd/c1b2t3u4p5s6 for the 6th slice in the 5th partition ++ ++ ++SCSI Tapes ++ ++All SCSI tapes are placed under /dev/st. A similar naming ++scheme is used as for SCSI discs. A SCSI tape with the ++parameters:c=1,b=2,t=3,u=4 would appear as: ++ ++ /dev/st/c1b2t3u4m0 for mode 0 ++ /dev/st/c1b2t3u4m1 for mode 1 ++ /dev/st/c1b2t3u4m2 for mode 2 ++ /dev/st/c1b2t3u4m3 for mode 3 ++ /dev/st/c1b2t3u4m0n for mode 0, no rewind ++ /dev/st/c1b2t3u4m1n for mode 1, no rewind ++ /dev/st/c1b2t3u4m2n for mode 2, no rewind ++ /dev/st/c1b2t3u4m3n for mode 3, no rewind ++ ++ ++SCSI CD-ROMs ++ ++All SCSI CD-ROMs are placed under /dev/sr. A similar naming ++scheme is used as for SCSI discs. A SCSI CD-ROM with the ++parameters:c=1,b=2,t=3,u=4 would appear as: ++ ++ /dev/sr/c1b2t3u4 ++ ++ ++SCSI Generic Devices ++ ++The generic (aka. raw) interface for all SCSI devices are placed under ++/dev/sg. A similar naming scheme is used as for SCSI discs. A ++SCSI generic device with the parameters:c=1,b=2,t=3,u=4 would appear ++as: ++ ++ /dev/sg/c1b2t3u4 ++ ++ ++IDE Hard Discs ++ ++All IDE discs are placed under /dev/ide/hd, using a similar ++convention to SCSI discs. The following mappings exist between the new ++and the old names: ++ ++ /dev/hda /dev/ide/hd/c0b0t0u0 ++ /dev/hdb /dev/ide/hd/c0b0t1u0 ++ /dev/hdc /dev/ide/hd/c0b1t0u0 ++ /dev/hdd /dev/ide/hd/c0b1t1u0 ++ ++ ++IDE Tapes ++ ++A similar naming scheme is used as for IDE discs. The entries will ++appear in the /dev/ide/mt directory. ++ ++IDE CD-ROM ++ ++A similar naming scheme is used as for IDE discs. The entries will ++appear in the /dev/ide/cd directory. ++ ++IDE Floppies ++ ++A similar naming scheme is used as for IDE discs. The entries will ++appear in the /dev/ide/fd directory. ++ ++XT Hard Discs ++ ++All XT discs are placed under /dev/xd. The first XT disc ++would appear as /dev/xd/c0t0. ++ ++ ++Old Compatibility Names ++ ++The old compatibility names are the legacy device names, such as ++/dev/hda, /dev/sda, /dev/rtc and so on. ++Devfsd can be configured to create compatibility symlinks so that you ++may continue to use the old names in your configuration files and so ++that old applications will continue to function correctly. ++ ++In order to configure devfsd to create these legacy names, the ++following lines should be placed in your /etc/devfsd.conf: ++ ++REGISTER .* MKOLDCOMPAT ++UNREGISTER .* RMOLDCOMPAT ++ ++This will cause devfsd to create (and destroy) symbolic links which ++point to the kernel-supplied names. ++ ++ ++----------------------------------------------------------------------------- ++ ++ ++Device drivers currently ported ++ ++- All miscellaneous character devices support devfs (this is done ++ transparently through misc_register()) ++ ++- SCSI discs and generic hard discs ++ ++- Character memory devices (null, zero, full and so on) ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- Loop devices (/dev/loop?) ++ ++- TTY devices (console, serial ports, terminals and pseudo-terminals) ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- SCSI tapes (/dev/scsi and /dev/tapes) ++ ++- SCSI CD-ROMs (/dev/scsi and /dev/cdroms) ++ ++- SCSI generic devices (/dev/scsi) ++ ++- RAMDISCS (/dev/ram?) ++ ++- Meta Devices (/dev/md*) ++ ++- Floppy discs (/dev/floppy) ++ ++- Parallel port printers (/dev/printers) ++ ++- Sound devices (/dev/sound) ++ Thanks to Eric Dumas <dumas@linux.eu.org> and ++ C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- Joysticks (/dev/joysticks) ++ ++- Sparc keyboard (/dev/kbd) ++ ++- DSP56001 digital signal processor (/dev/dsp56k) ++ ++- Apple Desktop Bus (/dev/adb) ++ ++- Coda network file system (/dev/cfs*) ++ ++- Virtual console capture devices (/dev/vcc) ++ Thanks to Dennis Hou <smilax@mindmeld.yi.org> ++ ++- Frame buffer devices (/dev/fb) ++ ++- Video capture devices (/dev/v4l) ++ ++ ++----------------------------------------------------------------------------- ++ ++ ++Allocation of Device Numbers ++ ++Devfs allows you to write a driver which doesn't need to allocate a ++device number (major&minor numbers) for the internal operation of the ++kernel. However, there are a number of userspace programmes that use ++the device number as a unique handle for a device. An example is the ++find programme, which uses device numbers to determine whether ++an inode is on a different filesystem than another inode. The device ++number used is the one for the block device which a filesystem is ++using. To preserve compatibility with userspace programmes, block ++devices using devfs need to have unique device numbers allocated to ++them. Furthermore, POSIX specifies device numbers, so some kind of ++device number needs to be presented to userspace. ++ ++The simplest option (especially when porting drivers to devfs) is to ++keep using the old major and minor numbers. Devfs will take whatever ++values are given for major&minor and pass them onto userspace. ++ ++This device number is a 16 bit number, so this leaves plenty of space ++for large numbers of discs and partitions. This scheme can also be ++used for character devices, in particular the tty devices, which are ++currently limited to 256 pseudo-ttys (this limits the total number of ++simultaneous xterms and remote logins). Note that the device number ++is limited to the range 36864-61439 (majors 144-239), in order to ++avoid any possible conflicts with existing official allocations. ++ ++Please note that using dynamically allocated block device numbers may ++break the NFS daemons (both user and kernel mode), which expect dev_t ++for a given device to be constant over the lifetime of remote mounts. ++ ++A final note on this scheme: since it doesn't increase the size of ++device numbers, there are no compatibility issues with userspace. ++ ++----------------------------------------------------------------------------- ++ ++ ++Questions and Answers ++ ++ ++Making things work ++Alternatives to devfs ++What I don't like about devfs ++How to report bugs ++Strange kernel messages ++Compilation problems with devfsd ++ ++ ++ ++Making things work ++ ++Here are some common questions and answers. ++ ++ ++ ++Devfsd doesn't start ++ ++Make sure you have compiled and installed devfsd ++Make sure devfsd is being started from your boot ++scripts ++Make sure you have configured your kernel to enable devfs (see ++below) ++Make sure devfs is mounted (see below) ++ ++ ++Devfsd is not managing all my permissions ++ ++Make sure you are capturing the appropriate events. For example, ++device entries created by the kernel generate REGISTER events, ++but those created by devfsd generate CREATE events. ++ ++ ++Devfsd is not capturing all REGISTER events ++ ++See the previous entry: you may need to capture CREATE events. ++ ++ ++X will not start ++ ++Make sure you followed the steps ++outlined above. ++ ++ ++Why don't my network devices appear in devfs? ++ ++This is not a bug. Network devices have their own, completely separate ++namespace. They are accessed via socket(2) and ++setsockopt(2) calls, and thus require no device nodes. I have ++raised the possibilty of moving network devices into the device ++namespace, but have had no response. ++ ++ ++How can I test if I have devfs compiled into my kernel? ++ ++All filesystems built-in or currently loaded are listed in ++/proc/filesystems. If you see a devfs entry, then ++you know that devfs was compiled into your kernel. If you have ++correctly configured and rebuilt your kernel, then devfs will be ++built-in. If you think you've configured it in, but ++/proc/filesystems doesn't show it, you've made a mistake. ++Common mistakes include: ++ ++Using a 2.2.x kernel without applying the devfs patch (if you ++don't know how to patch your kernel, use 2.4.x instead, don't bother ++asking me how to patch) ++Forgetting to set CONFIG_EXPERIMENTAL=y ++Forgetting to set CONFIG_DEVFS_FS=y ++Forgetting to set CONFIG_DEVFS_MOUNT=y (if you want devfs ++to be automatically mounted at boot) ++Editing your .config manually, instead of using make ++config or make xconfig ++Forgetting to run make dep; make clean after changing the ++configuration and before compiling ++Forgetting to compile your kernel and modules ++Forgetting to install your kernel ++Forgetting to install your modules ++ ++Please check twice that you've done all these steps before sending in ++a bug report. ++ ++ ++ ++How can I test if devfs is mounted on /dev? ++ ++The device filesystem will always create an entry called ++".devfsd", which is used to communicate with the daemon. Even ++if the daemon is not running, this entry will exist. Testing for the ++existence of this entry is the approved method of determining if devfs ++is mounted or not. Note that the type of entry (i.e. regular file, ++character device, named pipe, etc.) may change without notice. Only ++the existence of the entry should be relied upon. ++ ++ ++When I start devfsd, I see the error: ++Error opening file: ".devfsd" No such file or directory? ++ ++This means that devfs is not mounted. Make sure you have devfs mounted. ++ ++ ++How do I mount devfs? ++ ++First make sure you have devfs compiled into your kernel (see ++above). Then you will either need to: ++ ++set CONFIG_DEVFS_MOUNT=y in your kernel config ++pass devfs=mount to your boot loader ++mount devfs manually in your boot scripts with: ++mount -t none devfs /dev ++ ++ ++ ++Mount by volume LABEL=<label> doesn't work with ++devfs ++ ++Most probably you are not mounting devfs onto /dev. What ++happens is that if your kernel config has CONFIG_DEVFS_FS=y ++then the contents of /proc/partitions will have the devfs ++names (such as scsi/host0/bus0/target0/lun0/part1). The ++contents of /proc/partitions are used by mount(8) when ++mounting by volume label. If devfs is not mounted on /dev, ++then mount(8) will fail to find devices. The solution is to ++make sure that devfs is mounted on /dev. See above for how to ++do that. ++ ++ ++I have extra or incorrect entries in /dev ++ ++You may have stale entries in your dev-state area. Check for a ++RESTORE configuration line in your devfsd configuration ++(typically /etc/devfsd.conf). If you have this line, check ++the contents of the specified directory for stale entries. Remove ++any entries which are incorrect, then reboot. ++ ++ ++I get "Unable to open initial console" messages at boot ++ ++This usually happens when you don't have devfs automounted onto ++/dev at boot time, and there is no valid ++/dev/console entry on your root file-system. Create a valid ++/dev/console device node. ++ ++ ++ ++ ++ ++Alternatives to devfs ++ ++I've attempted to collate all the anti-devfs proposals and explain ++their limitations. Under construction. ++ ++ ++Why not just pass device create/remove events to a daemon? ++ ++Here the suggestion is to develop an API in the kernel so that devices ++can register create and remove events, and a daemon listens for those ++events. The daemon would then populate/depopulate /dev (which ++resides on disc). ++ ++This has several limitations: ++ ++ ++it only works for modules loaded and unloaded (or devices inserted ++and removed) after the kernel has finished booting. Without a database ++of events, there is no way the daemon could fully populate ++/dev ++ ++ ++if you add a database to this scheme, the question is then how to ++present that database to user-space. If you make it a list of strings ++with embedded event codes which are passed through a pipe to the ++daemon, then this is only of use to the daemon. I would argue that the ++natural way to present this data is via a filesystem (since many of ++the events will be of a hierarchical nature), such as devfs. ++Presenting the data as a filesystem makes it easy for the user to see ++what is available and also makes it easy to write scripts to scan the ++"database" ++ ++ ++the tight binding between device nodes and drivers is no longer ++possible (requiring the otherwise perfectly avoidable ++table lookups) ++ ++ ++you cannot catch inode lookup events on /dev which means ++that module autoloading requires device nodes to be created. This is a ++problem, particularly for drivers where only a few inodes are created ++from a potentially large set ++ ++ ++this technique can't be used when the root FS is mounted ++read-only ++ ++ ++ ++ ++Just implement a better scsidev ++ ++This suggestion involves taking the scsidev programme and ++extending it to scan for all devices, not just SCSI devices. The ++scsidev programme works by scanning /proc/scsi ++ ++Problems: ++ ++ ++the kernel does not currently provide a list of all devices ++available. Not all drivers register entries in /proc or ++generate kernel messages ++ ++ ++there is no uniform mechanism to register devices other than the ++devfs API ++ ++ ++implementing such an API is then the same as the ++proposal above ++ ++ ++ ++ ++Put /dev on a ramdisc ++ ++This suggestion involves creating a ramdisc and populating it with ++device nodes and then mounting it over /dev. ++ ++Problems: ++ ++ ++ ++this doesn't help when mounting the root filesystem, since you ++still need a device node to do that ++ ++ ++if you want to use this technique for the root device node as ++well, you need to use initrd. This complicates the booting sequence ++and makes it significantly harder to administer and configure. The ++initrd is essentially opaque, robbing the system administrator of easy ++configuration ++ ++ ++insufficient information is available to correctly populate the ++ramdisc. So we come back to the ++proposal above to "solve" this ++ ++ ++a ramdisc-based solution would take more kernel memory, since the ++backing store would be (at best) normal VFS inodes and dentries, which ++take 284 bytes and 112 bytes, respectively, for each entry. Compare ++that to 72 bytes for devfs ++ ++ ++ ++ ++Do nothing: there's no problem ++ ++Sometimes people can be heard to claim that the existing scheme is ++fine. This is what they're ignoring: ++ ++ ++device number size (8 bits each for major and minor) is a real ++limitation, and must be fixed somehow. Systems with large numbers of ++SCSI devices, for example, will continue to consume the remaining ++unallocated major numbers. USB will also need to push beyond the 8 bit ++minor limitation ++ ++ ++simply increasing the device number size is insufficient. Apart ++from causing a lot of pain, it doesn't solve the management issues ++of a /dev with thousands or more device nodes ++ ++ ++ignoring the problem of a huge /dev will not make it go ++away, and dismisses the legitimacy of a large number of people who ++want a dynamic /dev ++ ++ ++the standard response then becomes: "write a device management ++daemon", which brings us back to the ++proposal above ++ ++ ++ ++ ++What I don't like about devfs ++ ++Here are some common complaints about devfs, and some suggestions and ++solutions that may make it more palatable for you. I can't please ++everybody, but I do try :-) ++ ++I hate the naming scheme ++ ++First, remember that no naming scheme will please everybody. You hate ++the scheme, others love it. Who's to say who's right and who's wrong? ++Ultimately, the person who writes the code gets to choose, and what ++exists now is a combination of the choices made by the ++devfs author and the ++kernel maintainer (Linus). ++ ++However, not all is lost. If you want to create your own naming ++scheme, it is a simple matter to write a standalone script, hack ++devfsd, or write a script called by devfsd. You can create whatever ++naming scheme you like. ++ ++Further, if you want to remove all traces of the devfs naming scheme ++from /dev, you can mount devfs elsewhere (say ++/devfs) and populate /dev with links into ++/devfs. This population can be automated using devfsd if you ++wish. ++ ++You can even use the VFS binding facility to make the links, rather ++than using symbolic links. This way, you don't even have to see the ++"destination" of these symbolic links. ++ ++Devfs puts policy into the kernel ++ ++There's already policy in the kernel. Device numbers are in fact ++policy (why should the kernel dictate what device numbers I use?). ++Face it, some policy has to be in the kernel. The real difference ++between device names as policy and device numbers as policy is that ++no one will use device numbers directly, because device ++numbers are devoid of meaning to humans and are ugly. At least with ++the devfs device names, (even though you can add your own naming ++scheme) some people will use the devfs-supplied names directly. This ++offends some people :-) ++ ++Devfs is bloatware ++ ++This is not even remotely true. As shown above, ++both code and data size are quite modest. ++ ++ ++How to report bugs ++ ++If you have (or think you have) a bug with devfs, please follow the ++steps below: ++ ++ ++ ++make sure you have enabled debugging output when configuring your ++kernel. You will need to set (at least) the following config options: ++ ++CONFIG_DEVFS_DEBUG=y ++CONFIG_DEBUG_KERNEL=y ++CONFIG_DEBUG_SLAB=y ++ ++ ++ ++please make sure you have the latest devfs patches applied. The ++latest kernel version might not have the latest devfs patches applied ++yet (Linus is very busy) ++ ++ ++save a copy of your complete kernel logs (preferably by ++using the dmesg programme) for later inclusion in your bug ++report. You may need to use the -s switch to increase the ++internal buffer size so you can capture all the boot messages. ++Don't edit or trim the dmesg output ++ ++ ++ ++ ++try booting with devfs=dall passed to the kernel boot ++command line (read the documentation on your bootloader on how to do ++this), and save the result to a file. This may be quite verbose, and ++it may overflow the messages buffer, but try to get as much of it as ++you can ++ ++ ++send a copy of your devfsd configuration file(s) ++ ++send the bug report to me first. ++Don't expect that I will see it if you post it to the linux-kernel ++mailing list. Include all the information listed above, plus ++anything else that you think might be relevant. Put the string ++devfs somewhere in the subject line, so my mail filters mark ++it as urgent ++ ++ ++ ++ ++Here is a general guide on how to ask questions in a way that greatly ++improves your chances of getting a reply: ++ ++http://www.tuxedo.org/~esr/faqs/smart-questions.html. If you have ++a bug to report, you should also read ++ ++http://www.chiark.greenend.org.uk/~sgtatham/bugs.html. ++ ++ ++Strange kernel messages ++ ++You may see devfs-related messages in your kernel logs. Below are some ++messages and what they mean (and what you should do about them, if ++anything). ++ ++ ++ ++devfs_register(fred): could not append to parent, err: -17 ++ ++You need to check what the error code means, but usually 17 means ++EEXIST. This means that a driver attempted to create an entry ++fred in a directory, but there already was an entry with that ++name. This is often caused by flawed boot scripts which untar a bunch ++of inodes into /dev, as a way to restore permissions. This ++message is harmless, as the device nodes will still ++provide access to the driver (unless you use the devfs=only ++boot option, which is only for dedicated souls:-). If you want to get ++rid of these annoying messages, upgrade to devfsd-v1.3.20 and use the ++recommended RESTORE directive to restore permissions. ++ ++ ++devfs_mk_dir(bill): using old entry in dir: c1808724 "" ++ ++This is similar to the message above, except that a driver attempted ++to create a directory named bill, and the parent directory ++has an entry with the same name. In this case, to ensure that drivers ++continue to work properly, the old entry is re-used and given to the ++driver. In 2.5 kernels, the driver is given a NULL entry, and thus, ++under rare circumstances, may not create the require device nodes. ++The solution is the same as above. ++ ++ ++ ++ ++ ++Compilation problems with devfsd ++ ++Usually, you can compile devfsd just by typing in ++make in the source directory, followed by a make ++install (as root). Sometimes, you may have problems, particularly ++on broken configurations. ++ ++ ++ ++error messages relating to DEVFSD_NOTIFY_DELETE ++ ++This happened because you have an ancient set of kernel headers ++installed in /usr/include/linux or /usr/src/linux. ++Install kernel 2.4.10 or later. You may need to pass the ++KERNEL_DIR variable to make (if you did not install ++the new kernel sources as /usr/src/linux), or you may copy ++the devfs_fs.h file in the kernel source tree into ++/usr/include/linux. ++ ++ ++ ++ ++----------------------------------------------------------------------------- ++ ++ ++Other resources ++ ++ ++ ++Douglas Gilbert has written a useful document at ++ ++http://www.torque.net/sg/devfs_scsi.html which ++explores the SCSI subsystem and how it interacts with devfs ++ ++ ++Douglas Gilbert has written another useful document at ++ ++http://www.torque.net/scsi/SCSI-2.4-HOWTO/ which ++discusses the Linux SCSI subsystem in 2.4. ++ ++ ++Johannes Erdfelt has started a discussion paper on Linux and ++hot-swap devices, describing what the requirements are for a scalable ++solution and how and why he's used devfs+devfsd. Note that this is an ++early draft only, available in plain text form at: ++ ++http://johannes.erdfelt.com/hotswap.txt. ++Johannes has promised a HTML version will follow. ++ ++ ++I presented an invited ++paper ++at the ++ ++2nd Annual Storage Management Workshop held in Miamia, Florida, ++U.S.A. in October 2000. ++ ++ ++ ++ ++----------------------------------------------------------------------------- ++ ++ ++Translations of this document ++ ++This document has been translated into other languages. ++ ++ ++ ++ ++The document master (in English) by rgooch@atnf.csiro.au is ++available at ++ ++http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html ++ ++ ++ ++A Korean translation by viatoris@nownuri.net is available at ++ ++http://your.destiny.pe.kr/devfs/devfs.html ++ ++ ++ ++ ++----------------------------------------------------------------------------- ++Most flags courtesy of ITA's ++Flags of All Countries ++used with permission. +diff -urN linux-2.6.19.old/Documentation/filesystems/devfs/ToDo linux-2.6.19.dev/Documentation/filesystems/devfs/ToDo +--- linux-2.6.19.old/Documentation/filesystems/devfs/ToDo 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/filesystems/devfs/ToDo 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,40 @@ ++ Device File System (devfs) ToDo List ++ ++ Richard Gooch <rgooch@atnf.csiro.au> ++ ++ 3-JUL-2000 ++ ++This is a list of things to be done for better devfs support in the ++Linux kernel. If you'd like to contribute to the devfs, please have a ++look at this list for anything that is unallocated. Also, if there are ++items missing (surely), please contact me so I can add them to the ++list (preferably with your name attached to them:-). ++ ++ ++- >256 ptys ++ Thanks to C. Scott Ananian <cananian@alumni.princeton.edu> ++ ++- Amiga floppy driver (drivers/block/amiflop.c) ++ ++- Atari floppy driver (drivers/block/ataflop.c) ++ ++- SWIM3 (Super Woz Integrated Machine 3) floppy driver (drivers/block/swim3.c) ++ ++- Amiga ZorroII ramdisc driver (drivers/block/z2ram.c) ++ ++- Parallel port ATAPI CD-ROM (drivers/block/paride/pcd.c) ++ ++- Parallel port ATAPI floppy (drivers/block/paride/pf.c) ++ ++- AP1000 block driver (drivers/ap1000/ap.c, drivers/ap1000/ddv.c) ++ ++- Archimedes floppy (drivers/acorn/block/fd1772.c) ++ ++- MFM hard drive (drivers/acorn/block/mfmhd.c) ++ ++- I2O block device (drivers/message/i2o/i2o_block.c) ++ ++- ST-RAM device (arch/m68k/atari/stram.c) ++ ++- Raw devices ++ +diff -urN linux-2.6.19.old/Documentation/ioctl-number.txt linux-2.6.19.dev/Documentation/ioctl-number.txt +--- linux-2.6.19.old/Documentation/ioctl-number.txt 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/ioctl-number.txt 2006-12-14 03:12:59.000000000 +0100 +@@ -119,6 +119,7 @@ + 'c' 00-7F linux/comstats.h conflict! + 'c' 00-7F linux/coda.h conflict! + 'd' 00-FF linux/char/drm/drm/h conflict! ++'d' 00-1F linux/devfs_fs.h conflict! + 'd' 00-DF linux/video_decoder.h conflict! + 'd' F0-FF linux/digi1.h + 'e' all linux/digi1.h conflict! +diff -urN linux-2.6.19.old/Documentation/kernel-parameters.txt linux-2.6.19.dev/Documentation/kernel-parameters.txt +--- linux-2.6.19.old/Documentation/kernel-parameters.txt 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/Documentation/kernel-parameters.txt 2006-12-14 03:12:59.000000000 +0100 +@@ -35,6 +35,7 @@ + APM Advanced Power Management support is enabled. + AX25 Appropriate AX.25 support is enabled. + CD Appropriate CD support is enabled. ++ DEVFS devfs support is enabled. + DRM Direct Rendering Management support is enabled. + EDD BIOS Enhanced Disk Drive Services (EDD) is enabled + EFI EFI Partitioning (GPT) is enabled +@@ -456,6 +457,9 @@ + Format: <area>[,<node>] + See also Documentation/networking/decnet.txt. + ++ devfs= [DEVFS] ++ See Documentation/filesystems/devfs/boot-options. ++ + dhash_entries= [KNL] + Set number of hash buckets for dentry cache. + +diff -urN linux-2.6.19.old/drivers/block/acsi.c linux-2.6.19.dev/drivers/block/acsi.c +--- linux-2.6.19.old/drivers/block/acsi.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/acsi.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1731,10 +1731,13 @@ + struct gendisk *disk = acsi_gendisk[i]; + sprintf(disk->disk_name, "ad%c", 'a'+i); + aip = &acsi_info[NDevices]; ++ sprintf(disk->devfs_name, "ad/target%d/lun%d", aip->target, aip->lun); + disk->major = ACSI_MAJOR; + disk->first_minor = i << 4; +- if (acsi_info[i].type != HARDDISK) ++ if (acsi_info[i].type != HARDDISK) { + disk->minors = 1; ++ strcat(disk->devfs_name, "/disc"); ++ } + disk->fops = &acsi_fops; + disk->private_data = &acsi_info[i]; + set_capacity(disk, acsi_info[i].size); +diff -urN linux-2.6.19.old/drivers/block/acsi_slm.c linux-2.6.19.dev/drivers/block/acsi_slm.c +--- linux-2.6.19.old/drivers/block/acsi_slm.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/acsi_slm.c 2006-12-14 03:12:59.000000000 +0100 +@@ -65,6 +65,7 @@ + #include <linux/time.h> + #include <linux/mm.h> + #include <linux/slab.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/smp_lock.h> + + #include <asm/pgtable.h> +@@ -1004,6 +1005,11 @@ + BufferP = SLMBuffer; + SLMState = IDLE; + ++ devfs_mk_dir("slm"); ++ for (i = 0; i < MAX_SLM; i++) { ++ devfs_mk_cdev(MKDEV(ACSI_MAJOR, i), ++ S_IFCHR|S_IRUSR|S_IWUSR, "slm/%d", i); ++ } + return 0; + } + +@@ -1026,6 +1032,10 @@ + + void cleanup_module(void) + { ++ int i; ++ for (i = 0; i < MAX_SLM; i++) ++ devfs_remove("slm/%d", i); ++ devfs_remove("slm"); + if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0) + printk( KERN_ERR "acsi_slm: cleanup_module failed\n"); + atari_stram_free( SLMBuffer ); +diff -urN linux-2.6.19.old/drivers/block/cpqarray.c linux-2.6.19.dev/drivers/block/cpqarray.c +--- linux-2.6.19.old/drivers/block/cpqarray.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/cpqarray.c 2006-12-14 03:12:59.000000000 +0100 +@@ -32,6 +32,7 @@ + #include <linux/blkpg.h> + #include <linux/timer.h> + #include <linux/proc_fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/init.h> + #include <linux/hdreg.h> + #include <linux/spinlock.h> +@@ -346,6 +347,7 @@ + for(j = 0; j < NWD; j++) { + if (ida_gendisk[i][j]->flags & GENHD_FL_UP) + del_gendisk(ida_gendisk[i][j]); ++ devfs_remove("ida/c%dd%d",i,j); + put_disk(ida_gendisk[i][j]); + } + blk_cleanup_queue(hba[i]->queue); +@@ -1808,6 +1810,8 @@ + + } + ++ sprintf(disk->devfs_name, "ida/c%dd%d", ctlr, log_unit); ++ + info_p->phys_drives = + sense_config_buf->ctlr_phys_drv; + info_p->drv_assign_map +@@ -1843,6 +1847,7 @@ + } + } + ++ devfs_remove("ida"); + remove_proc_entry("cpqarray", proc_root_driver); + } + +diff -urN linux-2.6.19.old/drivers/block/DAC960.c linux-2.6.19.dev/drivers/block/DAC960.c +--- linux-2.6.19.old/drivers/block/DAC960.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/DAC960.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2530,6 +2530,7 @@ + blk_queue_max_sectors(RequestQueue, Controller->MaxBlocksPerCommand); + disk->queue = RequestQueue; + sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n); ++ sprintf(disk->devfs_name, "rd/host%d/target%d", Controller->ControllerNumber, n); + disk->major = MajorNumber; + disk->first_minor = n << DAC960_MaxPartitionsBits; + disk->fops = &DAC960_BlockDeviceOperations; +diff -urN linux-2.6.19.old/drivers/block/floppy.c linux-2.6.19.dev/drivers/block/floppy.c +--- linux-2.6.19.old/drivers/block/floppy.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/floppy.c 2006-12-14 03:12:59.000000000 +0100 +@@ -177,6 +177,7 @@ + #include <linux/ioport.h> + #include <linux/interrupt.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/platform_device.h> + #include <linux/buffer_head.h> /* for invalidate_buffers() */ + #include <linux/mutex.h> +@@ -223,6 +224,7 @@ + static unsigned short virtual_dma_port = 0x3f0; + irqreturn_t floppy_interrupt(int irq, void *dev_id); + static int set_dor(int fdc, char mask, char data); ++static void register_devfs_entries(int drive) __init; + + #define K_64 0x10000 /* 64KB */ + +@@ -3652,6 +3654,7 @@ + first = 0; + } + printk("%s fd%d is %s", prepend, drive, name); ++ register_devfs_entries(drive); + } + *UDP = *params; + } +@@ -3921,6 +3924,23 @@ + .revalidate_disk = floppy_revalidate, + }; + ++static void __init register_devfs_entries(int drive) ++{ ++ int base_minor = (drive < 4) ? drive : (124 + drive); ++ ++ if (UDP->cmos < ARRAY_SIZE(default_drive_params)) { ++ int i = 0; ++ do { ++ int minor = base_minor + (table_sup[UDP->cmos][i] << 2); ++ ++ devfs_mk_bdev(MKDEV(FLOPPY_MAJOR, minor), ++ S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP | ++ S_IWGRP, "floppy/%d%s", drive, ++ table[table_sup[UDP->cmos][i]]); ++ } while (table_sup[UDP->cmos][i++]); ++ } ++} ++ + /* + * Floppy Driver initialization + * ============================= +@@ -4201,9 +4221,11 @@ + motor_off_timer[dr].function = motor_off_callback; + } + ++ devfs_mk_dir("floppy"); ++ + err = register_blkdev(FLOPPY_MAJOR, "fd"); + if (err) +- goto out_put_disk; ++ goto out_devfs_remove; + + floppy_queue = blk_init_queue(do_fd_request, &floppy_lock); + if (!floppy_queue) { +@@ -4354,6 +4376,8 @@ + blk_cleanup_queue(floppy_queue); + out_unreg_blkdev: + unregister_blkdev(FLOPPY_MAJOR, "fd"); ++out_devfs_remove: ++ devfs_remove("floppy"); + out_put_disk: + while (dr--) { + del_timer(&motor_off_timer[dr]); +@@ -4514,6 +4538,19 @@ + + static char *floppy; + ++static void unregister_devfs_entries(int drive) ++{ ++ int i; ++ ++ if (UDP->cmos < ARRAY_SIZE(default_drive_params)) { ++ i = 0; ++ do { ++ devfs_remove("floppy/%d%s", drive, ++ table[table_sup[UDP->cmos][i]]); ++ } while (table_sup[UDP->cmos][i++]); ++ } ++} ++ + static void __init parse_floppy_cfg_string(char *cfg) + { + char *ptr; +@@ -4550,11 +4587,13 @@ + if ((allowed_drive_mask & (1 << drive)) && + fdc_state[FDC(drive)].version != FDC_NONE) { + del_gendisk(disks[drive]); ++ unregister_devfs_entries(drive); + device_remove_file(&floppy_device[drive].dev, &dev_attr_cmos); + platform_device_unregister(&floppy_device[drive]); + } + put_disk(disks[drive]); + } ++ devfs_remove("floppy"); + + del_timer_sync(&fd_timeout); + del_timer_sync(&fd_timer); +diff -urN linux-2.6.19.old/drivers/block/loop.c linux-2.6.19.dev/drivers/block/loop.c +--- linux-2.6.19.old/drivers/block/loop.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/loop.c 2006-12-14 03:12:59.000000000 +0100 +@@ -62,6 +62,7 @@ + #include <linux/blkdev.h> + #include <linux/blkpg.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/smp_lock.h> + #include <linux/swap.h> + #include <linux/slab.h> +@@ -1426,6 +1427,8 @@ + goto out_mem3; + } + ++ devfs_mk_dir("loop"); ++ + for (i = 0; i < max_loop; i++) { + struct loop_device *lo = &loop_dev[i]; + struct gendisk *disk = disks[i]; +@@ -1443,6 +1446,7 @@ + disk->first_minor = i; + disk->fops = &lo_fops; + sprintf(disk->disk_name, "loop%d", i); ++ sprintf(disk->devfs_name, "loop/%d", i); + disk->private_data = lo; + disk->queue = lo->lo_queue; + } +@@ -1456,6 +1460,7 @@ + out_mem4: + while (i--) + blk_cleanup_queue(loop_dev[i].lo_queue); ++ devfs_remove("loop"); + i = max_loop; + out_mem3: + while (i--) +@@ -1478,6 +1483,7 @@ + blk_cleanup_queue(loop_dev[i].lo_queue); + put_disk(disks[i]); + } ++ devfs_remove("loop"); + if (unregister_blkdev(LOOP_MAJOR, "loop")) + printk(KERN_WARNING "loop: cannot unregister blkdev\n"); + +diff -urN linux-2.6.19.old/drivers/block/nbd.c linux-2.6.19.dev/drivers/block/nbd.c +--- linux-2.6.19.old/drivers/block/nbd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/nbd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -29,6 +29,8 @@ + #include <linux/kernel.h> + #include <net/sock.h> + ++#include <linux/devfs_fs_kernel.h> ++ + #include <asm/uaccess.h> + #include <asm/system.h> + #include <asm/types.h> +@@ -643,6 +645,7 @@ + printk(KERN_INFO "nbd: registered device at major %d\n", NBD_MAJOR); + dprintk(DBG_INIT, "nbd: debugflags=0x%x\n", debugflags); + ++ devfs_mk_dir("nbd"); + for (i = 0; i < nbds_max; i++) { + struct gendisk *disk = nbd_dev[i].disk; + nbd_dev[i].file = NULL; +@@ -660,6 +663,7 @@ + disk->private_data = &nbd_dev[i]; + disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; + sprintf(disk->disk_name, "nbd%d", i); ++ sprintf(disk->devfs_name, "nbd/%d", i); + set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */ + add_disk(disk); + } +@@ -685,6 +689,7 @@ + put_disk(disk); + } + } ++ devfs_remove("nbd"); + unregister_blkdev(NBD_MAJOR, "nbd"); + printk(KERN_INFO "nbd: unregistered device at major %d\n", NBD_MAJOR); + } +diff -urN linux-2.6.19.old/drivers/block/paride/pg.c linux-2.6.19.dev/drivers/block/paride/pg.c +--- linux-2.6.19.old/drivers/block/paride/pg.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/paride/pg.c 2006-12-14 03:12:59.000000000 +0100 +@@ -156,6 +156,7 @@ + #include <linux/module.h> + #include <linux/init.h> + #include <linux/fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/delay.h> + #include <linux/slab.h> + #include <linux/mtio.h> +@@ -673,15 +674,25 @@ + err = PTR_ERR(pg_class); + goto out_chrdev; + } ++ devfs_mk_dir("pg"); + for (unit = 0; unit < PG_UNITS; unit++) { + struct pg *dev = &devices[unit]; +- if (dev->present) ++ if (dev->present) { + class_device_create(pg_class, NULL, MKDEV(major, unit), + NULL, "pg%u", unit); ++ err = devfs_mk_cdev(MKDEV(major, unit), ++ S_IFCHR | S_IRUSR | S_IWUSR, "pg/%u", ++ unit); ++ if (err) ++ goto out_class; ++ } + } + err = 0; + goto out; + ++out_class: ++ class_device_destroy(pg_class, MKDEV(major, unit)); ++ class_destroy(pg_class); + out_chrdev: + unregister_chrdev(major, "pg"); + out: +@@ -694,10 +705,13 @@ + + for (unit = 0; unit < PG_UNITS; unit++) { + struct pg *dev = &devices[unit]; +- if (dev->present) ++ if (dev->present) { + class_device_destroy(pg_class, MKDEV(major, unit)); ++ devfs_remove("pg/%u", unit); ++ } + } + class_destroy(pg_class); ++ devfs_remove("pg"); + unregister_chrdev(major, name); + + for (unit = 0; unit < PG_UNITS; unit++) { +diff -urN linux-2.6.19.old/drivers/block/paride/pt.c linux-2.6.19.dev/drivers/block/paride/pt.c +--- linux-2.6.19.old/drivers/block/paride/pt.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/paride/pt.c 2006-12-14 03:12:59.000000000 +0100 +@@ -141,6 +141,7 @@ + #include <linux/module.h> + #include <linux/init.h> + #include <linux/fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/delay.h> + #include <linux/slab.h> + #include <linux/mtio.h> +@@ -970,15 +971,32 @@ + goto out_chrdev; + } + ++ devfs_mk_dir("pt"); + for (unit = 0; unit < PT_UNITS; unit++) + if (pt[unit].present) { + class_device_create(pt_class, NULL, MKDEV(major, unit), + NULL, "pt%d", unit); ++ err = devfs_mk_cdev(MKDEV(major, unit), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "pt/%d", unit); ++ if (err) { ++ class_device_destroy(pt_class, MKDEV(major, unit)); ++ goto out_class; ++ } + class_device_create(pt_class, NULL, MKDEV(major, unit + 128), + NULL, "pt%dn", unit); ++ err = devfs_mk_cdev(MKDEV(major, unit + 128), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "pt/%dn", unit); ++ if (err) { ++ class_device_destroy(pt_class, MKDEV(major, unit + 128)); ++ goto out_class; ++ } + } + goto out; + ++out_class: ++ class_destroy(pt_class); + out_chrdev: + unregister_chrdev(major, "pt"); + out: +@@ -991,9 +1009,12 @@ + for (unit = 0; unit < PT_UNITS; unit++) + if (pt[unit].present) { + class_device_destroy(pt_class, MKDEV(major, unit)); ++ devfs_remove("pt/%d", unit); + class_device_destroy(pt_class, MKDEV(major, unit + 128)); ++ devfs_remove("pt/%dn", unit); + } + class_destroy(pt_class); ++ devfs_remove("pt"); + unregister_chrdev(major, name); + for (unit = 0; unit < PT_UNITS; unit++) + if (pt[unit].present) +diff -urN linux-2.6.19.old/drivers/block/pktcdvd.c linux-2.6.19.dev/drivers/block/pktcdvd.c +--- linux-2.6.19.old/drivers/block/pktcdvd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/pktcdvd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2613,6 +2613,7 @@ + static struct miscdevice pkt_misc = { + .minor = MISC_DYNAMIC_MINOR, + .name = DRIVER_NAME, ++ .devfs_name = "pktcdvd/control", + .fops = &pkt_ctl_fops + }; + +diff -urN linux-2.6.19.old/drivers/block/ps2esdi.c linux-2.6.19.dev/drivers/block/ps2esdi.c +--- linux-2.6.19.old/drivers/block/ps2esdi.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/ps2esdi.c 2006-12-14 03:12:59.000000000 +0100 +@@ -419,6 +419,7 @@ + disk->major = PS2ESDI_MAJOR; + disk->first_minor = i<<6; + sprintf(disk->disk_name, "ed%c", 'a'+i); ++ sprintf(disk->devfs_name, "ed/target%d", i); + disk->fops = &ps2esdi_fops; + ps2esdi_gendisk[i] = disk; + } +diff -urN linux-2.6.19.old/drivers/block/rd.c linux-2.6.19.dev/drivers/block/rd.c +--- linux-2.6.19.old/drivers/block/rd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/rd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -49,6 +49,7 @@ + #include <linux/module.h> + #include <linux/moduleparam.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/pagemap.h> + #include <linux/blkdev.h> + #include <linux/genhd.h> +@@ -410,6 +411,7 @@ + put_disk(rd_disks[i]); + blk_cleanup_queue(rd_queue[i]); + } ++ devfs_remove("rd"); + unregister_blkdev(RAMDISK_MAJOR, "ramdisk"); + } + +@@ -445,6 +447,8 @@ + goto out; + } + ++ devfs_mk_dir("rd"); ++ + for (i = 0; i < CONFIG_BLK_DEV_RAM_COUNT; i++) { + struct gendisk *disk = rd_disks[i]; + +@@ -458,6 +462,7 @@ + disk->queue = rd_queue[i]; + disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO; + sprintf(disk->disk_name, "ram%d", i); ++ sprintf(disk->devfs_name, "rd/%d", i); + set_capacity(disk, rd_size * 2); + add_disk(rd_disks[i]); + } +diff -urN linux-2.6.19.old/drivers/block/sx8.c linux-2.6.19.dev/drivers/block/sx8.c +--- linux-2.6.19.old/drivers/block/sx8.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/sx8.c 2006-12-14 03:12:59.000000000 +0100 +@@ -18,6 +18,7 @@ + #include <linux/spinlock.h> + #include <linux/blkdev.h> + #include <linux/sched.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/interrupt.h> + #include <linux/compiler.h> + #include <linux/workqueue.h> +@@ -1509,6 +1510,7 @@ + port->disk = disk; + sprintf(disk->disk_name, DRV_NAME "/%u", + (unsigned int) (host->id * CARM_MAX_PORTS) + i); ++ sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i); + disk->major = host->major; + disk->first_minor = i * CARM_MINORS_PER_MAJOR; + disk->fops = &carm_bd_ops; +@@ -1670,6 +1672,8 @@ + if (host->flags & FL_DYN_MAJOR) + host->major = rc; + ++ devfs_mk_dir(DRV_NAME); ++ + rc = carm_init_disks(host); + if (rc) + goto err_out_blkdev_disks; +@@ -1735,6 +1739,7 @@ + + free_irq(pdev->irq, host); + carm_free_disks(host); ++ devfs_remove(DRV_NAME); + unregister_blkdev(host->major, host->name); + if (host->major == 160) + clear_bit(0, &carm_major_alloc); +diff -urN linux-2.6.19.old/drivers/block/ub.c linux-2.6.19.dev/drivers/block/ub.c +--- linux-2.6.19.old/drivers/block/ub.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/ub.c 2006-12-14 03:12:59.000000000 +0100 +@@ -24,10 +24,12 @@ + #include <linux/usb.h> + #include <linux/usb_usual.h> + #include <linux/blkdev.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/timer.h> + #include <scsi/scsi.h> + + #define DRV_NAME "ub" ++#define DEVFS_NAME DRV_NAME + + #define UB_MAJOR 180 + +@@ -2301,6 +2303,7 @@ + goto err_diskalloc; + + sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a'); ++ sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a'); + disk->major = UB_MAJOR; + disk->first_minor = lun->id * UB_PARTS_PER_LUN; + disk->fops = &ub_bd_fops; +@@ -2454,6 +2457,7 @@ + + if ((rc = register_blkdev(UB_MAJOR, DRV_NAME)) != 0) + goto err_regblkdev; ++ devfs_mk_dir(DEVFS_NAME); + + if ((rc = usb_register(&ub_driver)) != 0) + goto err_register; +@@ -2462,6 +2466,7 @@ + return 0; + + err_register: ++ devfs_remove(DEVFS_NAME); + unregister_blkdev(UB_MAJOR, DRV_NAME); + err_regblkdev: + return rc; +@@ -2471,6 +2476,7 @@ + { + usb_deregister(&ub_driver); + ++ devfs_remove(DEVFS_NAME); + unregister_blkdev(UB_MAJOR, DRV_NAME); + usb_usual_clear_present(USB_US_TYPE_UB); + } +diff -urN linux-2.6.19.old/drivers/block/umem.c linux-2.6.19.dev/drivers/block/umem.c +--- linux-2.6.19.old/drivers/block/umem.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/umem.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1192,6 +1192,7 @@ + for (i = 0; i < num_cards; i++) { + struct gendisk *disk = mm_gendisk[i]; + sprintf(disk->disk_name, "umem%c", 'a'+i); ++ sprintf(disk->devfs_name, "umem/card%d", i); + spin_lock_init(&cards[i].lock); + disk->major = major_nr; + disk->first_minor = i << MM_SHIFT; +diff -urN linux-2.6.19.old/drivers/block/viodasd.c linux-2.6.19.dev/drivers/block/viodasd.c +--- linux-2.6.19.old/drivers/block/viodasd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/viodasd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -59,6 +59,7 @@ + * numbers 0-255 we get a maximum of 32 disks. + */ + #define VIOD_GENHD_NAME "iseries/vd" ++#define VIOD_GENHD_DEVFS_NAME "iseries/disc" + + #define VIOD_VERS "1.64" + +@@ -522,6 +523,8 @@ + else + snprintf(g->disk_name, sizeof(g->disk_name), + VIOD_GENHD_NAME "%c", 'a' + (dev_no % 26)); ++ snprintf(g->devfs_name, sizeof(g->devfs_name), ++ "%s%d", VIOD_GENHD_DEVFS_NAME, dev_no); + g->fops = &viodasd_fops; + g->queue = q; + g->private_data = d; +diff -urN linux-2.6.19.old/drivers/block/xd.c linux-2.6.19.dev/drivers/block/xd.c +--- linux-2.6.19.old/drivers/block/xd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/xd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -215,6 +215,7 @@ + disk->major = XT_DISK_MAJOR; + disk->first_minor = i<<6; + sprintf(disk->disk_name, "xd%c", i+'a'); ++ sprintf(disk->devfs_name, "xd/target%d", i); + disk->fops = &xd_fops; + disk->private_data = p; + disk->queue = xd_queue; +diff -urN linux-2.6.19.old/drivers/block/z2ram.c linux-2.6.19.dev/drivers/block/z2ram.c +--- linux-2.6.19.old/drivers/block/z2ram.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/block/z2ram.c 2006-12-14 03:12:59.000000000 +0100 +@@ -354,6 +354,7 @@ + z2ram_gendisk->first_minor = 0; + z2ram_gendisk->fops = &z2_fops; + sprintf(z2ram_gendisk->disk_name, "z2ram"); ++ strcpy(z2ram_gendisk->devfs_name, z2ram_gendisk->disk_name); + + z2ram_gendisk->queue = z2_queue; + add_disk(z2ram_gendisk); +diff -urN linux-2.6.19.old/drivers/cdrom/aztcd.c linux-2.6.19.dev/drivers/cdrom/aztcd.c +--- linux-2.6.19.old/drivers/cdrom/aztcd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/aztcd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1918,6 +1918,7 @@ + azt_disk->first_minor = 0; + azt_disk->fops = &azt_fops; + sprintf(azt_disk->disk_name, "aztcd"); ++ sprintf(azt_disk->devfs_name, "aztcd"); + azt_disk->queue = azt_queue; + add_disk(azt_disk); + azt_invalidate_buffers(); +diff -urN linux-2.6.19.old/drivers/cdrom/cdu31a.c linux-2.6.19.dev/drivers/cdrom/cdu31a.c +--- linux-2.6.19.old/drivers/cdrom/cdu31a.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/cdu31a.c 2006-12-14 03:12:59.000000000 +0100 +@@ -161,6 +161,7 @@ + #include <linux/hdreg.h> + #include <linux/genhd.h> + #include <linux/ioport.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/string.h> + #include <linux/slab.h> + #include <linux/init.h> +diff -urN linux-2.6.19.old/drivers/cdrom/cm206.c linux-2.6.19.dev/drivers/cdrom/cm206.c +--- linux-2.6.19.old/drivers/cdrom/cm206.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/cm206.c 2006-12-14 03:12:59.000000000 +0100 +@@ -187,6 +187,7 @@ + #include <linux/interrupt.h> + #include <linux/timer.h> + #include <linux/cdrom.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/ioport.h> + #include <linux/mm.h> + #include <linux/slab.h> +diff -urN linux-2.6.19.old/drivers/cdrom/gscd.c linux-2.6.19.dev/drivers/cdrom/gscd.c +--- linux-2.6.19.old/drivers/cdrom/gscd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/gscd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -955,6 +955,7 @@ + gscd_disk->first_minor = 0; + gscd_disk->fops = &gscd_fops; + sprintf(gscd_disk->disk_name, "gscd"); ++ sprintf(gscd_disk->devfs_name, "gscd"); + + if (register_blkdev(MAJOR_NR, "gscd")) { + ret = -EIO; +diff -urN linux-2.6.19.old/drivers/cdrom/mcdx.c linux-2.6.19.dev/drivers/cdrom/mcdx.c +--- linux-2.6.19.old/drivers/cdrom/mcdx.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/mcdx.c 2006-12-14 03:12:59.000000000 +0100 +@@ -74,6 +74,7 @@ + #include <linux/major.h> + #define MAJOR_NR MITSUMI_X_CDROM_MAJOR + #include <linux/blkdev.h> ++#include <linux/devfs_fs_kernel.h> + + #include "mcdx.h" + +diff -urN linux-2.6.19.old/drivers/cdrom/optcd.c linux-2.6.19.dev/drivers/cdrom/optcd.c +--- linux-2.6.19.old/drivers/cdrom/optcd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/optcd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2033,6 +2033,7 @@ + optcd_disk->first_minor = 0; + optcd_disk->fops = &opt_fops; + sprintf(optcd_disk->disk_name, "optcd"); ++ sprintf(optcd_disk->devfs_name, "optcd"); + + if (!request_region(optcd_port, 4, "optcd")) { + printk(KERN_ERR "optcd: conflict, I/O port 0x%x already used\n", +diff -urN linux-2.6.19.old/drivers/cdrom/sbpcd.c linux-2.6.19.dev/drivers/cdrom/sbpcd.c +--- linux-2.6.19.old/drivers/cdrom/sbpcd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/sbpcd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -371,6 +371,7 @@ + #include <linux/kernel.h> + #include <linux/cdrom.h> + #include <linux/ioport.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/major.h> + #include <linux/string.h> + #include <linux/vmalloc.h> +@@ -5806,6 +5807,8 @@ + return -ENOMEM; + } + ++ devfs_mk_dir("sbp"); ++ + for (j=0;j<NR_SBPCD;j++) + { + struct cdrom_device_info * sbpcd_infop; +@@ -5867,6 +5870,7 @@ + disk->fops = &sbpcd_bdops; + strcpy(disk->disk_name, sbpcd_infop->name); + disk->flags = GENHD_FL_CD; ++ sprintf(disk->devfs_name, "sbp/c0t%d", p->drv_id); + p->disk = disk; + if (register_cdrom(sbpcd_infop)) + { +@@ -5901,6 +5905,7 @@ + if (D_S[j].drv_id==-1) continue; + del_gendisk(D_S[j].disk); + put_disk(D_S[j].disk); ++ devfs_remove("sbp/c0t%d", j); + vfree(D_S[j].sbp_buf); + if (D_S[j].sbp_audsiz>0) + vfree(D_S[j].aud_buf); +@@ -5911,6 +5916,7 @@ + } + vfree(D_S[j].sbpcd_infop); + } ++ devfs_remove("sbp"); + msg(DBG_INF, "%s module released.\n", major_name); + } + +diff -urN linux-2.6.19.old/drivers/cdrom/sjcd.c linux-2.6.19.dev/drivers/cdrom/sjcd.c +--- linux-2.6.19.old/drivers/cdrom/sjcd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/sjcd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1695,6 +1695,7 @@ + sjcd_disk->first_minor = 0, + sjcd_disk->fops = &sjcd_fops, + sprintf(sjcd_disk->disk_name, "sjcd"); ++ sprintf(sjcd_disk->devfs_name, "sjcd"); + + if (!request_region(sjcd_base, 4,"sjcd")) { + printk +diff -urN linux-2.6.19.old/drivers/cdrom/sonycd535.c linux-2.6.19.dev/drivers/cdrom/sonycd535.c +--- linux-2.6.19.old/drivers/cdrom/sonycd535.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/sonycd535.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1589,6 +1589,7 @@ + cdu_disk->first_minor = 0; + cdu_disk->fops = &cdu_fops; + sprintf(cdu_disk->disk_name, "cdu"); ++ sprintf(cdu_disk->devfs_name, "cdu535"); + + if (!request_region(sony535_cd_base_io, 4, CDU535_HANDLE)) { + printk(KERN_WARNING"sonycd535: Unable to request region 0x%x\n", +diff -urN linux-2.6.19.old/drivers/cdrom/viocd.c linux-2.6.19.dev/drivers/cdrom/viocd.c +--- linux-2.6.19.old/drivers/cdrom/viocd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/cdrom/viocd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -49,6 +49,7 @@ + #include <asm/iseries/vio.h> + + #define VIOCD_DEVICE "iseries/vcd" ++#define VIOCD_DEVICE_DEVFS "iseries/vcd" + + #define VIOCD_VERS "1.06" + +@@ -687,6 +688,8 @@ + gendisk->first_minor = deviceno; + strncpy(gendisk->disk_name, c->name, + sizeof(gendisk->disk_name)); ++ snprintf(gendisk->devfs_name, sizeof(gendisk->devfs_name), ++ VIOCD_DEVICE_DEVFS "%d", deviceno); + blk_queue_max_hw_segments(q, 1); + blk_queue_max_phys_segments(q, 1); + blk_queue_max_sectors(q, 4096 / 512); +diff -urN linux-2.6.19.old/drivers/char/cyclades.c linux-2.6.19.dev/drivers/char/cyclades.c +--- linux-2.6.19.old/drivers/char/cyclades.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/cyclades.c 2006-12-14 03:12:59.000000000 +0100 +@@ -5227,6 +5227,7 @@ + cy_serial_driver->owner = THIS_MODULE; + cy_serial_driver->driver_name = "cyclades"; + cy_serial_driver->name = "ttyC"; ++ cy_serial_driver->devfs_name = "tts/C"; + cy_serial_driver->major = CYCLADES_MAJOR; + cy_serial_driver->minor_start = 0; + cy_serial_driver->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/dsp56k.c linux-2.6.19.dev/drivers/char/dsp56k.c +--- linux-2.6.19.old/drivers/char/dsp56k.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/dsp56k.c 2006-12-14 03:12:59.000000000 +0100 +@@ -33,6 +33,7 @@ + #include <linux/fs.h> + #include <linux/mm.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/smp_lock.h> + #include <linux/device.h> + +@@ -517,9 +518,17 @@ + } + class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); + ++ err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), ++ S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); ++ if(err) ++ goto out_class; ++ + printk(banner); + goto out; + ++out_class: ++ class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); ++ class_destroy(dsp56k_class); + out_chrdev: + unregister_chrdev(DSP56K_MAJOR, "dsp56k"); + out: +@@ -532,6 +541,7 @@ + class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); + class_destroy(dsp56k_class); + unregister_chrdev(DSP56K_MAJOR, "dsp56k"); ++ devfs_remove("dsp56k"); + } + module_exit(dsp56k_cleanup_driver); + +diff -urN linux-2.6.19.old/drivers/char/dtlk.c linux-2.6.19.dev/drivers/char/dtlk.c +--- linux-2.6.19.old/drivers/char/dtlk.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/dtlk.c 2006-12-14 03:12:59.000000000 +0100 +@@ -62,6 +62,7 @@ + #include <linux/init.h> /* for __init, module_{init,exit} */ + #include <linux/poll.h> /* for POLLIN, etc. */ + #include <linux/dtlk.h> /* local header file for DoubleTalk values */ ++#include <linux/devfs_fs_kernel.h> + #include <linux/smp_lock.h> + + #ifdef TRACING +@@ -336,6 +337,9 @@ + if (dtlk_dev_probe() == 0) + printk(", MAJOR %d\n", dtlk_major); + ++ devfs_mk_cdev(MKDEV(dtlk_major, DTLK_MINOR), ++ S_IFCHR | S_IRUSR | S_IWUSR, "dtlk"); ++ + init_timer(&dtlk_timer); + dtlk_timer.function = dtlk_timer_tick; + init_waitqueue_head(&dtlk_process_list); +@@ -353,6 +357,7 @@ + + dtlk_write_tts(DTLK_CLEAR); + unregister_chrdev(dtlk_major, "dtlk"); ++ devfs_remove("dtlk"); + release_region(dtlk_port_lpc, DTLK_IO_EXTENT); + } + +diff -urN linux-2.6.19.old/drivers/char/epca.c linux-2.6.19.dev/drivers/char/epca.c +--- linux-2.6.19.old/drivers/char/epca.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/epca.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1227,6 +1227,7 @@ + + pc_driver->owner = THIS_MODULE; + pc_driver->name = "ttyD"; ++ pc_driver->devfs_name = "tts/D"; + pc_driver->major = DIGI_MAJOR; + pc_driver->minor_start = 0; + pc_driver->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/esp.c linux-2.6.19.dev/drivers/char/esp.c +--- linux-2.6.19.old/drivers/char/esp.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/esp.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2448,6 +2448,7 @@ + + esp_driver->owner = THIS_MODULE; + esp_driver->name = "ttyP"; ++ esp_driver->devfs_name = "tts/P"; + esp_driver->major = ESP_IN_MAJOR; + esp_driver->minor_start = 0; + esp_driver->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/ftape/zftape/zftape-init.c linux-2.6.19.dev/drivers/char/ftape/zftape/zftape-init.c +--- linux-2.6.19.old/drivers/char/ftape/zftape/zftape-init.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/ftape/zftape/zftape-init.c 2006-12-14 03:12:59.000000000 +0100 +@@ -32,6 +32,7 @@ + #endif + #include <linux/fcntl.h> + #include <linux/smp_lock.h> ++#include <linux/devfs_fs_kernel.h> + + #include <linux/zftape.h> + #include <linux/init.h> +@@ -330,11 +331,29 @@ + zft_class = class_create(THIS_MODULE, "zft"); + for (i = 0; i < 4; i++) { + class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i), NULL, "qft%i", i); ++ devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "qft%i", i); + class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 4), NULL, "nqft%i", i); ++ devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 4), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "nqft%i", i); + class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 16), NULL, "zqft%i", i); ++ devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 16), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "zqft%i", i); + class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 20), NULL, "nzqft%i", i); ++ devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 20), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "nzqft%i", i); + class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 32), NULL, "rawqft%i", i); ++ devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 32), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "rawqft%i", i); + class_device_create(zft_class, NULL, MKDEV(QIC117_TAPE_MAJOR, i + 36), NULL, "nrawrawqft%i", i); ++ devfs_mk_cdev(MKDEV(QIC117_TAPE_MAJOR, i + 36), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "nrawqft%i", i); + } + + #ifdef CONFIG_ZFT_COMPRESSOR +@@ -360,11 +379,17 @@ + TRACE(ft_t_info, "successful"); + } + for (i = 0; i < 4; i++) { ++ devfs_remove("qft%i", i); + class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i)); ++ devfs_remove("nqft%i", i); + class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 4)); ++ devfs_remove("zqft%i", i); + class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 16)); ++ devfs_remove("nzqft%i", i); + class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 20)); ++ devfs_remove("rawqft%i", i); + class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 32)); ++ devfs_remove("nrawqft%i", i); + class_device_destroy(zft_class, MKDEV(QIC117_TAPE_MAJOR, i + 36)); + } + class_destroy(zft_class); +diff -urN linux-2.6.19.old/drivers/char/hvc_console.c linux-2.6.19.dev/drivers/char/hvc_console.c +--- linux-2.6.19.old/drivers/char/hvc_console.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/hvc_console.c 2006-12-14 03:12:59.000000000 +0100 +@@ -822,6 +822,7 @@ + return -ENOMEM; + + drv->owner = THIS_MODULE; ++ drv->devfs_name = "hvc/"; + drv->driver_name = "hvc"; + drv->name = "hvc"; + drv->major = HVC_MAJOR; +diff -urN linux-2.6.19.old/drivers/char/hvcs.c linux-2.6.19.dev/drivers/char/hvcs.c +--- linux-2.6.19.old/drivers/char/hvcs.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/hvcs.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1361,6 +1361,7 @@ + + hvcs_tty_driver->driver_name = hvcs_driver_name; + hvcs_tty_driver->name = hvcs_device_node; ++ hvcs_tty_driver->devfs_name = hvcs_device_node; + + /* + * We'll let the system assign us a major number, indicated by leaving +diff -urN linux-2.6.19.old/drivers/char/hvsi.c linux-2.6.19.dev/drivers/char/hvsi.c +--- linux-2.6.19.old/drivers/char/hvsi.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/hvsi.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1152,6 +1152,7 @@ + return -ENOMEM; + + hvsi_driver->owner = THIS_MODULE; ++ hvsi_driver->devfs_name = "hvsi/"; + hvsi_driver->driver_name = "hvsi"; + hvsi_driver->name = "hvsi"; + hvsi_driver->major = HVSI_MAJOR; +diff -urN linux-2.6.19.old/drivers/char/ip2/ip2main.c linux-2.6.19.dev/drivers/char/ip2/ip2main.c +--- linux-2.6.19.old/drivers/char/ip2/ip2main.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/ip2/ip2main.c 2006-12-14 03:12:59.000000000 +0100 +@@ -90,6 +90,7 @@ + #include <linux/module.h> + #include <linux/signal.h> + #include <linux/sched.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/timer.h> + #include <linux/interrupt.h> + #include <linux/pci.h> +@@ -412,7 +413,9 @@ + /* free io addresses and Tibet */ + release_region( ip2config.addr[i], 8 ); + class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i)); ++ devfs_remove("ip2/ipl%d", i); + class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); ++ devfs_remove("ip2/stat%d", i); + } + /* Disable and remove interrupt handler. */ + if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { +@@ -421,6 +424,7 @@ + } + } + class_destroy(ip2_class); ++ devfs_remove("ip2"); + if ( ( err = tty_unregister_driver ( ip2_tty_driver ) ) ) { + printk(KERN_ERR "IP2: failed to unregister tty driver (%d)\n", err); + } +@@ -674,6 +678,7 @@ + + ip2_tty_driver->owner = THIS_MODULE; + ip2_tty_driver->name = "ttyF"; ++ ip2_tty_driver->devfs_name = "tts/F"; + ip2_tty_driver->driver_name = pcDriver_name; + ip2_tty_driver->major = IP2_TTY_MAJOR; + ip2_tty_driver->minor_start = 0; +@@ -722,9 +727,26 @@ + class_device_create(ip2_class, NULL, + MKDEV(IP2_IPL_MAJOR, 4 * i), + NULL, "ipl%d", i); ++ err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i), ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, ++ "ip2/ipl%d", i); ++ if (err) { ++ class_device_destroy(ip2_class, ++ MKDEV(IP2_IPL_MAJOR, 4 * i)); ++ goto out_class; ++ } ++ + class_device_create(ip2_class, NULL, + MKDEV(IP2_IPL_MAJOR, 4 * i + 1), + NULL, "stat%d", i); ++ err = devfs_mk_cdev(MKDEV(IP2_IPL_MAJOR, 4 * i + 1), ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IFCHR, ++ "ip2/stat%d", i); ++ if (err) { ++ class_device_destroy(ip2_class, ++ MKDEV(IP2_IPL_MAJOR, 4 * i + 1)); ++ goto out_class; ++ } + + for ( box = 0; box < ABS_MAX_BOXES; ++box ) + { +diff -urN linux-2.6.19.old/drivers/char/ipmi/ipmi_devintf.c linux-2.6.19.dev/drivers/char/ipmi/ipmi_devintf.c +--- linux-2.6.19.old/drivers/char/ipmi/ipmi_devintf.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/ipmi/ipmi_devintf.c 2006-12-14 03:12:59.000000000 +0100 +@@ -39,6 +39,7 @@ + #include <linux/poll.h> + #include <linux/spinlock.h> + #include <linux/slab.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/ipmi.h> + #include <linux/mutex.h> + #include <linux/init.h> +@@ -832,6 +833,9 @@ + dev_t dev = MKDEV(ipmi_major, if_num); + struct ipmi_reg_list *entry; + ++ devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, ++ "ipmidev/%d", if_num); ++ + entry = kmalloc(sizeof(*entry), GFP_KERNEL); + if (!entry) { + printk(KERN_ERR "ipmi_devintf: Unable to create the" +@@ -861,6 +865,7 @@ + } + class_device_destroy(ipmi_class, dev); + mutex_unlock(®_list_mutex); ++ devfs_remove("ipmidev/%d", if_num); + } + + static struct ipmi_smi_watcher smi_watcher = +@@ -896,6 +901,8 @@ + ipmi_major = rv; + } + ++ devfs_mk_dir(DEVICE_NAME); ++ + rv = ipmi_smi_watcher_register(&smi_watcher); + if (rv) { + unregister_chrdev(ipmi_major, DEVICE_NAME); +@@ -920,6 +927,7 @@ + mutex_unlock(®_list_mutex); + class_destroy(ipmi_class); + ipmi_smi_watcher_unregister(&smi_watcher); ++ devfs_remove(DEVICE_NAME); + unregister_chrdev(ipmi_major, DEVICE_NAME); + } + module_exit(cleanup_ipmi); +diff -urN linux-2.6.19.old/drivers/char/isicom.c linux-2.6.19.dev/drivers/char/isicom.c +--- linux-2.6.19.old/drivers/char/isicom.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/isicom.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1582,6 +1582,7 @@ + + isicom_normal->owner = THIS_MODULE; + isicom_normal->name = "ttyM"; ++ isicom_normal->devfs_name = "isicom/"; + isicom_normal->major = ISICOM_NMAJOR; + isicom_normal->minor_start = 0; + isicom_normal->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/lp.c linux-2.6.19.dev/drivers/char/lp.c +--- linux-2.6.19.old/drivers/char/lp.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/lp.c 2006-12-14 03:12:59.000000000 +0100 +@@ -119,6 +119,7 @@ + #include <linux/major.h> + #include <linux/sched.h> + #include <linux/smp_lock.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/slab.h> + #include <linux/fcntl.h> + #include <linux/delay.h> +@@ -805,6 +806,8 @@ + + class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), NULL, + "lp%d", nr); ++ devfs_mk_cdev(MKDEV(LP_MAJOR, nr), S_IFCHR | S_IRUGO | S_IWUGO, ++ "printers/%d", nr); + + printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, + (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven"); +@@ -903,6 +906,7 @@ + return -EIO; + } + ++ devfs_mk_dir("printers"); + lp_class = class_create(THIS_MODULE, "printer"); + if (IS_ERR(lp_class)) { + err = PTR_ERR(lp_class); +@@ -928,6 +932,7 @@ + out_class: + class_destroy(lp_class); + out_reg: ++ devfs_remove("printers"); + unregister_chrdev(LP_MAJOR, "lp"); + return err; + } +@@ -975,8 +980,10 @@ + if (lp_table[offset].dev == NULL) + continue; + parport_unregister_device(lp_table[offset].dev); ++ devfs_remove("printers/%d", offset); + class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset)); + } ++ devfs_remove("printers"); + class_destroy(lp_class); + } + +diff -urN linux-2.6.19.old/drivers/char/mem.c linux-2.6.19.dev/drivers/char/mem.c +--- linux-2.6.19.old/drivers/char/mem.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/mem.c 2006-12-14 03:12:59.000000000 +0100 +@@ -19,6 +19,7 @@ + #include <linux/tty.h> + #include <linux/capability.h> + #include <linux/smp_lock.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/ptrace.h> + #include <linux/device.h> + #include <linux/highmem.h> +@@ -979,10 +980,13 @@ + printk("unable to get major %d for memory devs\n", MEM_MAJOR); + + mem_class = class_create(THIS_MODULE, "mem"); +- for (i = 0; i < ARRAY_SIZE(devlist); i++) ++ for (i = 0; i < ARRAY_SIZE(devlist); i++) { + class_device_create(mem_class, NULL, + MKDEV(MEM_MAJOR, devlist[i].minor), + NULL, devlist[i].name); ++ devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor), ++ S_IFCHR | devlist[i].mode, devlist[i].name); ++ } + + return 0; + } +diff -urN linux-2.6.19.old/drivers/char/misc.c linux-2.6.19.dev/drivers/char/misc.c +--- linux-2.6.19.old/drivers/char/misc.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/misc.c 2006-12-14 03:12:59.000000000 +0100 +@@ -43,6 +43,7 @@ + #include <linux/slab.h> + #include <linux/proc_fs.h> + #include <linux/seq_file.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/stat.h> + #include <linux/init.h> + #include <linux/device.h> +@@ -226,6 +227,10 @@ + + if (misc->minor < DYNAMIC_MINORS) + misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); ++ if (misc->devfs_name[0] == '\0') { ++ snprintf(misc->devfs_name, sizeof(misc->devfs_name), ++ "misc/%s", misc->name); ++ } + dev = MKDEV(MISC_MAJOR, misc->minor); + + misc->class = class_device_create(misc_class, NULL, dev, misc->dev, +@@ -235,6 +240,13 @@ + goto out; + } + ++ err = devfs_mk_cdev(dev, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP, ++ misc->devfs_name); ++ if (err) { ++ class_device_destroy(misc_class, dev); ++ goto out; ++ } ++ + /* + * Add it to the front, so that later devices can "override" + * earlier defaults +@@ -265,6 +277,7 @@ + down(&misc_sem); + list_del(&misc->list); + class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); ++ devfs_remove(misc->devfs_name); + if (i < DYNAMIC_MINORS && i>0) { + misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); + } +diff -urN linux-2.6.19.old/drivers/char/mmtimer.c linux-2.6.19.dev/drivers/char/mmtimer.c +--- linux-2.6.19.old/drivers/char/mmtimer.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/mmtimer.c 2006-12-14 03:12:59.000000000 +0100 +@@ -25,6 +25,7 @@ + #include <linux/init.h> + #include <linux/errno.h> + #include <linux/mm.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/mmtimer.h> + #include <linux/miscdevice.h> + #include <linux/posix-timers.h> +@@ -692,6 +693,7 @@ + return -1; + } + ++ strcpy(mmtimer_miscdev.devfs_name, MMTIMER_NAME); + if (misc_register(&mmtimer_miscdev)) { + printk(KERN_ERR "%s: failed to register device\n", + MMTIMER_NAME); +diff -urN linux-2.6.19.old/drivers/char/moxa.c linux-2.6.19.dev/drivers/char/moxa.c +--- linux-2.6.19.old/drivers/char/moxa.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/moxa.c 2006-12-14 03:12:59.000000000 +0100 +@@ -346,6 +346,7 @@ + init_MUTEX(&moxaBuffSem); + moxaDriver->owner = THIS_MODULE; + moxaDriver->name = "ttyMX"; ++ moxaDriver->devfs_name = "tts/a"; + moxaDriver->major = ttymajor; + moxaDriver->minor_start = 0; + moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/ppdev.c linux-2.6.19.dev/drivers/char/ppdev.c +--- linux-2.6.19.old/drivers/char/ppdev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/ppdev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -60,6 +60,7 @@ + #include <linux/init.h> + #include <linux/sched.h> + #include <linux/device.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/ioctl.h> + #include <linux/parport.h> + #include <linux/ctype.h> +@@ -781,6 +782,11 @@ + err = PTR_ERR(ppdev_class); + goto out_chrdev; + } ++ devfs_mk_dir("parports"); ++ for (i = 0; i < PARPORT_MAX; i++) { ++ devfs_mk_cdev(MKDEV(PP_MAJOR, i), ++ S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i); ++ } + if (parport_register_driver(&pp_driver)) { + printk (KERN_WARNING CHRDEV ": unable to register with parport\n"); + goto out_class; +@@ -790,6 +796,9 @@ + goto out; + + out_class: ++ for (i = 0; i < PARPORT_MAX; i++) ++ devfs_remove("parports/%d", i); ++ devfs_remove("parports"); + class_destroy(ppdev_class); + out_chrdev: + unregister_chrdev(PP_MAJOR, CHRDEV); +@@ -799,8 +808,12 @@ + + static void __exit ppdev_cleanup (void) + { ++ int i; + /* Clean up all parport stuff */ ++ for (i = 0; i < PARPORT_MAX; i++) ++ devfs_remove("parports/%d", i); + parport_unregister_driver(&pp_driver); ++ devfs_remove("parports"); + class_destroy(ppdev_class); + unregister_chrdev (PP_MAJOR, CHRDEV); + } +diff -urN linux-2.6.19.old/drivers/char/pty.c linux-2.6.19.dev/drivers/char/pty.c +--- linux-2.6.19.old/drivers/char/pty.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/pty.c 2006-12-14 03:12:59.000000000 +0100 +@@ -23,6 +23,7 @@ + #include <linux/major.h> + #include <linux/mm.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/sysctl.h> + + #include <asm/uaccess.h> +@@ -263,6 +264,7 @@ + pty_driver->owner = THIS_MODULE; + pty_driver->driver_name = "pty_master"; + pty_driver->name = "pty"; ++ pty_driver->devfs_name = "pty/m"; + pty_driver->major = PTY_MASTER_MAJOR; + pty_driver->minor_start = 0; + pty_driver->type = TTY_DRIVER_TYPE_PTY; +@@ -280,6 +282,7 @@ + pty_slave_driver->owner = THIS_MODULE; + pty_slave_driver->driver_name = "pty_slave"; + pty_slave_driver->name = "ttyp"; ++ pty_slave_driver->devfs_name = "pty/s"; + pty_slave_driver->major = PTY_SLAVE_MAJOR; + pty_slave_driver->minor_start = 0; + pty_slave_driver->type = TTY_DRIVER_TYPE_PTY; +@@ -347,6 +350,7 @@ + + static void __init unix98_pty_init(void) + { ++ devfs_mk_dir("pts"); + ptm_driver = alloc_tty_driver(NR_UNIX98_PTY_MAX); + if (!ptm_driver) + panic("Couldn't allocate Unix98 ptm driver"); +diff -urN linux-2.6.19.old/drivers/char/raw.c linux-2.6.19.dev/drivers/char/raw.c +--- linux-2.6.19.old/drivers/char/raw.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/raw.c 2006-12-14 03:12:59.000000000 +0100 +@@ -10,6 +10,7 @@ + + #include <linux/init.h> + #include <linux/fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/major.h> + #include <linux/blkdev.h> + #include <linux/module.h> +@@ -285,6 +286,13 @@ + } + class_device_create(raw_class, NULL, MKDEV(RAW_MAJOR, 0), NULL, "rawctl"); + ++ devfs_mk_cdev(MKDEV(RAW_MAJOR, 0), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "raw/rawctl"); ++ for (i = 1; i < MAX_RAW_MINORS; i++) ++ devfs_mk_cdev(MKDEV(RAW_MAJOR, i), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "raw/raw%d", i); + return 0; + + error_region: +@@ -295,6 +303,12 @@ + + static void __exit raw_exit(void) + { ++ int i; ++ ++ for (i = 1; i < MAX_RAW_MINORS; i++) ++ devfs_remove("raw/raw%d", i); ++ devfs_remove("raw/rawctl"); ++ devfs_remove("raw"); + class_device_destroy(raw_class, MKDEV(RAW_MAJOR, 0)); + class_destroy(raw_class); + cdev_del(&raw_cdev); +diff -urN linux-2.6.19.old/drivers/char/riscom8.c linux-2.6.19.dev/drivers/char/riscom8.c +--- linux-2.6.19.old/drivers/char/riscom8.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/riscom8.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1613,6 +1613,7 @@ + memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); + riscom_driver->owner = THIS_MODULE; + riscom_driver->name = "ttyL"; ++ riscom_driver->devfs_name = "tts/L"; + riscom_driver->major = RISCOM8_NORMAL_MAJOR; + riscom_driver->type = TTY_DRIVER_TYPE_SERIAL; + riscom_driver->subtype = SERIAL_TYPE_NORMAL; +diff -urN linux-2.6.19.old/drivers/char/rocket.c linux-2.6.19.dev/drivers/char/rocket.c +--- linux-2.6.19.old/drivers/char/rocket.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/rocket.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2426,7 +2426,8 @@ + */ + + rocket_driver->owner = THIS_MODULE; +- rocket_driver->flags = TTY_DRIVER_DYNAMIC_DEV; ++ rocket_driver->flags = TTY_DRIVER_NO_DEVFS; ++ rocket_driver->devfs_name = "tts/R"; + rocket_driver->name = "ttyR"; + rocket_driver->driver_name = "Comtrol RocketPort"; + rocket_driver->major = TTY_ROCKET_MAJOR; +@@ -2437,7 +2438,7 @@ + rocket_driver->init_termios.c_cflag = + B9600 | CS8 | CREAD | HUPCL | CLOCAL; + #ifdef ROCKET_SOFT_FLOW +- rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ rocket_driver->flags |= TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + #endif + tty_set_operations(rocket_driver, &rocket_ops); + +diff -urN linux-2.6.19.old/drivers/char/serial167.c linux-2.6.19.dev/drivers/char/serial167.c +--- linux-2.6.19.old/drivers/char/serial167.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/serial167.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2218,6 +2218,7 @@ + /* Initialize the tty_driver structure */ + + cy_serial_driver->owner = THIS_MODULE; ++ cy_serial_driver->devfs_name = "tts/"; + cy_serial_driver->name = "ttyS"; + cy_serial_driver->major = TTY_MAJOR; + cy_serial_driver->minor_start = 64; +diff -urN linux-2.6.19.old/drivers/char/stallion.c linux-2.6.19.dev/drivers/char/stallion.c +--- linux-2.6.19.old/drivers/char/stallion.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/stallion.c 2006-12-14 03:12:59.000000000 +0100 +@@ -39,6 +39,7 @@ + #include <linux/ioport.h> + #include <linux/init.h> + #include <linux/smp_lock.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/device.h> + #include <linux/delay.h> + +@@ -753,15 +754,21 @@ + if (i) { + printk("STALLION: failed to un-register tty driver, " + "errno=%d\n", -i); ++ restore_flags(flags); + return; + } +- for (i = 0; i < 4; i++) ++ for (i = 0; i < 4; i++) { ++ devfs_remove("staliomem/%d", i); + class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); ++ } ++ devfs_remove("staliomem"); + if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) + printk("STALLION: failed to un-register serial memory device, " + "errno=%d\n", -i); + class_destroy(stallion_class); + ++ kfree(stl_tmpwritebuf); ++ + for (i = 0; (i < stl_nrbrds); i++) { + if ((brdp = stl_brds[i]) == (stlbrd_t *) NULL) + continue; +@@ -3033,21 +3040,35 @@ + return -1; + + /* ++ * Allocate a temporary write buffer. ++ */ ++ stl_tmpwritebuf = kmalloc(STL_TXBUFSIZE, GFP_KERNEL); ++ if (!stl_tmpwritebuf) ++ printk("STALLION: failed to allocate memory (size=%d)\n", ++ STL_TXBUFSIZE); ++ ++/* + * Set up a character driver for per board stuff. This is mainly used + * to do stats ioctls on the ports. + */ + if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stl_fsiomem)) + printk("STALLION: failed to register serial board device\n"); ++ devfs_mk_dir("staliomem"); + + stallion_class = class_create(THIS_MODULE, "staliomem"); +- for (i = 0; i < 4; i++) ++ for (i = 0; i < 4; i++) { ++ devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), ++ S_IFCHR|S_IRUSR|S_IWUSR, ++ "staliomem/%d", i); + class_device_create(stallion_class, NULL, + MKDEV(STL_SIOMEMMAJOR, i), NULL, + "staliomem%d", i); ++ } + + stl_serial->owner = THIS_MODULE; + stl_serial->driver_name = stl_drvname; + stl_serial->name = "ttyE"; ++ stl_serial->devfs_name = "tts/E"; + stl_serial->major = STL_SERIALMAJOR; + stl_serial->minor_start = 0; + stl_serial->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/tipar.c linux-2.6.19.dev/drivers/char/tipar.c +--- linux-2.6.19.old/drivers/char/tipar.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/tipar.c 2006-12-14 03:12:59.000000000 +0100 +@@ -55,6 +55,7 @@ + #include <linux/ioport.h> + #include <asm/io.h> + #include <linux/bitops.h> ++#include <linux/devfs_fs_kernel.h> /* DevFs support */ + #include <linux/parport.h> /* Our code depend on parport */ + #include <linux/device.h> + +@@ -443,6 +444,12 @@ + + class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR, + TIPAR_MINOR + nr), NULL, "par%d", nr); ++ /* Use devfs, tree: /dev/ticables/par/[0..2] */ ++ err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "ticables/par/%d", nr); ++ if (err) ++ goto out_class; + + /* Display informations */ + pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq == +@@ -497,6 +504,9 @@ + goto out; + } + ++ /* Use devfs with tree: /dev/ticables/par/[0..2] */ ++ devfs_mk_dir("ticables/par"); ++ + tipar_class = class_create(THIS_MODULE, "ticables"); + if (IS_ERR(tipar_class)) { + err = PTR_ERR(tipar_class); +@@ -515,6 +525,7 @@ + class_destroy(tipar_class); + + out_chrdev: ++ devfs_remove("ticables/par"); + unregister_chrdev(TIPAR_MAJOR, "tipar"); + out: + return err; +@@ -535,8 +546,10 @@ + continue; + parport_unregister_device(table[i].dev); + class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); ++ devfs_remove("ticables/par/%d", i); + } + class_destroy(tipar_class); ++ devfs_remove("ticables/par"); + + pr_info("tipar: module unloaded\n"); + } +diff -urN linux-2.6.19.old/drivers/char/tty_io.c linux-2.6.19.dev/drivers/char/tty_io.c +--- linux-2.6.19.old/drivers/char/tty_io.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/tty_io.c 2006-12-14 03:12:59.000000000 +0100 +@@ -101,6 +101,7 @@ + #include <linux/kbd_kern.h> + #include <linux/vt_kern.h> + #include <linux/selection.h> ++#include <linux/devfs_fs_kernel.h> + + #include <linux/kmod.h> + +@@ -3634,6 +3635,9 @@ + return ERR_PTR(-EINVAL); + } + ++ devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, ++ "%s%d", driver->devfs_name, index + driver->name_base); ++ + if (driver->type == TTY_DRIVER_TYPE_PTY) + pty_line_name(driver, index, name); + else +@@ -3655,6 +3659,7 @@ + + void tty_unregister_device(struct tty_driver *driver, unsigned index) + { ++ devfs_remove("%s%d", driver->devfs_name, index + driver->name_base); + class_device_destroy(tty_class, MKDEV(driver->major, driver->minor_start) + index); + } + +@@ -3776,7 +3781,7 @@ + + list_add(&driver->tty_drivers, &tty_drivers); + +- if ( !(driver->flags & TTY_DRIVER_DYNAMIC_DEV) ) { ++ if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) { + for(i = 0; i < driver->num; i++) + tty_register_device(driver, i, NULL); + } +@@ -3819,7 +3824,7 @@ + driver->termios_locked[i] = NULL; + kfree(tp); + } +- if (!(driver->flags & TTY_DRIVER_DYNAMIC_DEV)) ++ if (!(driver->flags & TTY_DRIVER_NO_DEVFS)) + tty_unregister_device(driver, i); + } + p = driver->ttys; +@@ -3895,12 +3900,14 @@ + if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTYAUX_MAJOR, 0), 1, "/dev/tty") < 0) + panic("Couldn't register /dev/tty driver\n"); ++ devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 0), S_IFCHR|S_IRUGO|S_IWUGO, "tty"); + class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 0), NULL, "tty"); + + cdev_init(&console_cdev, &console_fops); + if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || + register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) + panic("Couldn't register /dev/console driver\n"); ++ devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 1), S_IFCHR|S_IRUSR|S_IWUSR, "console"); + class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 1), NULL, "console"); + + #ifdef CONFIG_UNIX98_PTYS +@@ -3908,6 +3915,7 @@ + if (cdev_add(&ptmx_cdev, MKDEV(TTYAUX_MAJOR, 2), 1) || + register_chrdev_region(MKDEV(TTYAUX_MAJOR, 2), 1, "/dev/ptmx") < 0) + panic("Couldn't register /dev/ptmx driver\n"); ++ devfs_mk_cdev(MKDEV(TTYAUX_MAJOR, 2), S_IFCHR|S_IRUGO|S_IWUGO, "ptmx"); + class_device_create(tty_class, NULL, MKDEV(TTYAUX_MAJOR, 2), NULL, "ptmx"); + #endif + +@@ -3916,6 +3924,7 @@ + if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) + panic("Couldn't register /dev/tty0 driver\n"); ++ devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); + class_device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), NULL, "tty0"); + + vty_init(); +diff -urN linux-2.6.19.old/drivers/char/vc_screen.c linux-2.6.19.dev/drivers/char/vc_screen.c +--- linux-2.6.19.old/drivers/char/vc_screen.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/vc_screen.c 2006-12-14 03:12:59.000000000 +0100 +@@ -25,6 +25,7 @@ + #include <linux/major.h> + #include <linux/errno.h> + #include <linux/tty.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/sched.h> + #include <linux/interrupt.h> + #include <linux/mm.h> +@@ -476,6 +477,12 @@ + + void vcs_make_sysfs(struct tty_struct *tty) + { ++ devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 1), ++ S_IFCHR|S_IRUSR|S_IWUSR, ++ "vcc/%u", tty->index + 1); ++ devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129), ++ S_IFCHR|S_IRUSR|S_IWUSR, ++ "vcc/a%u", tty->index + 1); + class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 1), + NULL, "vcs%u", tty->index + 1); + class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, tty->index + 129), +@@ -484,6 +491,8 @@ + + void vcs_remove_sysfs(struct tty_struct *tty) + { ++ devfs_remove("vcc/%u", tty->index + 1); ++ devfs_remove("vcc/a%u", tty->index + 1); + class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 1)); + class_device_destroy(vc_class, MKDEV(VCS_MAJOR, tty->index + 129)); + } +@@ -494,6 +503,8 @@ + panic("unable to get major %d for vcs device", VCS_MAJOR); + vc_class = class_create(THIS_MODULE, "vc"); + ++ devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0"); ++ devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0"); + class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 0), NULL, "vcs"); + class_device_create(vc_class, NULL, MKDEV(VCS_MAJOR, 128), NULL, "vcsa"); + return 0; +diff -urN linux-2.6.19.old/drivers/char/viocons.c linux-2.6.19.dev/drivers/char/viocons.c +--- linux-2.6.19.old/drivers/char/viocons.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/viocons.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1121,6 +1121,7 @@ + viotty_driver = alloc_tty_driver(VTTY_PORTS); + viotty_driver->owner = THIS_MODULE; + viotty_driver->driver_name = "vioconsole"; ++ viotty_driver->devfs_name = "vcs/"; + viotty_driver->name = "tty"; + viotty_driver->name_base = 1; + viotty_driver->major = TTY_MAJOR; +diff -urN linux-2.6.19.old/drivers/char/viotape.c linux-2.6.19.dev/drivers/char/viotape.c +--- linux-2.6.19.old/drivers/char/viotape.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/viotape.c 2006-12-14 03:12:59.000000000 +0100 +@@ -42,6 +42,7 @@ + #include <linux/dma-mapping.h> + #include <linux/fs.h> + #include <linux/cdev.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/major.h> + #include <linux/completion.h> + #include <linux/proc_fs.h> +@@ -942,6 +943,7 @@ + { + int i = vdev->unit_address; + int j; ++ char tapename[16]; + + if (i >= viotape_numdev) + return -ENODEV; +@@ -955,6 +957,12 @@ + "iseries!vt%d", i); + class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80), + NULL, "iseries!nvt%d", i); ++ devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i), S_IFCHR | S_IRUSR | S_IWUSR, ++ "iseries/vt%d", i); ++ devfs_mk_cdev(MKDEV(VIOTAPE_MAJOR, i | 0x80), ++ S_IFCHR | S_IRUSR | S_IWUSR, "iseries/nvt%d", i); ++ sprintf(tapename, "iseries/vt%d", i); ++ state[i].dev_handle = devfs_register_tape(tapename); + printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries " + "resource %10.10s type %4.4s, model %3.3s\n", + i, viotape_unitinfo[i].rsrcname, +@@ -966,6 +974,9 @@ + { + int i = vdev->unit_address; + ++ devfs_remove("iseries/nvt%d", i); ++ devfs_remove("iseries/vt%d", i); ++ devfs_unregister_tape(state[i].dev_handle); + class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80)); + class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i)); + return 0; +diff -urN linux-2.6.19.old/drivers/char/vme_scc.c linux-2.6.19.dev/drivers/char/vme_scc.c +--- linux-2.6.19.old/drivers/char/vme_scc.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/vme_scc.c 2006-12-14 03:12:59.000000000 +0100 +@@ -146,6 +146,7 @@ + scc_driver->owner = THIS_MODULE; + scc_driver->driver_name = "scc"; + scc_driver->name = "ttyS"; ++ scc_driver->devfs_name = "tts/"; + scc_driver->major = TTY_MAJOR; + scc_driver->minor_start = SCC_MINOR_BASE; + scc_driver->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/drivers/char/vt.c linux-2.6.19.dev/drivers/char/vt.c +--- linux-2.6.19.old/drivers/char/vt.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/char/vt.c 2006-12-14 03:12:59.000000000 +0100 +@@ -86,6 +86,7 @@ + #include <linux/mm.h> + #include <linux/console.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/vt_kern.h> + #include <linux/selection.h> + #include <linux/tiocl.h> +@@ -2691,6 +2692,7 @@ + if (!console_driver) + panic("Couldn't allocate console driver\n"); + console_driver->owner = THIS_MODULE; ++ console_driver->devfs_name = "vc/"; + console_driver->name = "tty"; + console_driver->name_base = 1; + console_driver->major = TTY_MAJOR; +diff -urN linux-2.6.19.old/drivers/ide/ide.c linux-2.6.19.dev/drivers/ide/ide.c +--- linux-2.6.19.old/drivers/ide/ide.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ide/ide.c 2006-12-14 03:12:59.000000000 +0100 +@@ -146,6 +146,7 @@ + #include <linux/pci.h> + #include <linux/delay.h> + #include <linux/ide.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/completion.h> + #include <linux/reboot.h> + #include <linux/cdrom.h> +@@ -591,8 +592,13 @@ + goto abort; + for (unit = 0; unit < MAX_DRIVES; ++unit) { + drive = &hwif->drives[unit]; +- if (!drive->present) ++ if (!drive->present) { ++ if (drive->devfs_name[0] != '\0') { ++ devfs_remove(drive->devfs_name); ++ drive->devfs_name[0] = '\0'; ++ } + continue; ++ } + spin_unlock_irq(&ide_lock); + device_unregister(&drive->gendev); + wait_for_completion(&drive->gendev_rel_comp); +@@ -2005,6 +2011,7 @@ + int ret; + + printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n"); ++ devfs_mk_dir("ide"); + system_bus_speed = ide_system_bus_speed(); + + ret = bus_register(&ide_bus_type); +@@ -2086,6 +2093,7 @@ + #ifdef CONFIG_PROC_FS + proc_ide_destroy(); + #endif ++ devfs_remove("ide"); + + bus_unregister(&ide_bus_type); + } +diff -urN linux-2.6.19.old/drivers/ide/ide-cd.c linux-2.6.19.dev/drivers/ide/ide-cd.c +--- linux-2.6.19.old/drivers/ide/ide-cd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ide/ide-cd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -3528,6 +3528,8 @@ + drive->driver_data = info; + + g->minors = 1; ++ snprintf(g->devfs_name, sizeof(g->devfs_name), ++ "%s/cd", drive->devfs_name); + g->driverfs_dev = &drive->gendev; + g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE; + if (ide_cdrom_setup(drive)) { +diff -urN linux-2.6.19.old/drivers/ide/ide-disk.c linux-2.6.19.dev/drivers/ide/ide-disk.c +--- linux-2.6.19.old/drivers/ide/ide-disk.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ide/ide-disk.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1018,6 +1018,7 @@ + struct gendisk *g = idkp->disk; + + drive->driver_data = NULL; ++ drive->devfs_name[0] = '\0'; + g->private_data = NULL; + put_disk(g); + kfree(idkp); +@@ -1221,6 +1222,7 @@ + drive->attach = 1; + + g->minors = 1 << PARTN_BITS; ++ strcpy(g->devfs_name, drive->devfs_name); + g->driverfs_dev = &drive->gendev; + g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; + set_capacity(g, idedisk_capacity(drive)); +diff -urN linux-2.6.19.old/drivers/ide/ide-floppy.c linux-2.6.19.dev/drivers/ide/ide-floppy.c +--- linux-2.6.19.old/drivers/ide/ide-floppy.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ide/ide-floppy.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2174,6 +2174,7 @@ + + g->minors = 1 << PARTN_BITS; + g->driverfs_dev = &drive->gendev; ++ strcpy(g->devfs_name, drive->devfs_name); + g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; + g->fops = &idefloppy_ops; + drive->attach = 1; +diff -urN linux-2.6.19.old/drivers/ide/ide-probe.c linux-2.6.19.dev/drivers/ide/ide-probe.c +--- linux-2.6.19.old/drivers/ide/ide-probe.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ide/ide-probe.c 2006-12-14 03:12:59.000000000 +0100 +@@ -46,6 +46,7 @@ + #include <linux/slab.h> + #include <linux/delay.h> + #include <linux/ide.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/spinlock.h> + #include <linux/kmod.h> + #include <linux/pci.h> +@@ -1288,6 +1289,10 @@ + ide_drive_t *drive = container_of(dev, ide_drive_t, gendev); + + spin_lock_irq(&ide_lock); ++ if (drive->devfs_name[0] != '\0') { ++ devfs_remove(drive->devfs_name); ++ drive->devfs_name[0] = '\0'; ++ } + ide_remove_drive_from_hwgroup(drive); + kfree(drive->id); + drive->id = NULL; +@@ -1321,6 +1326,12 @@ + drive->gendev.bus = &ide_bus_type; + drive->gendev.driver_data = drive; + drive->gendev.release = drive_release_dev; ++ if (drive->present) { ++ sprintf(drive->devfs_name, "ide/host%d/bus%d/target%d/lun%d", ++ (hwif->channel && hwif->mate) ? ++ hwif->mate->index : hwif->index, ++ hwif->channel, unit, drive->lun); ++ } + } + blk_register_region(MKDEV(hwif->major, 0), MAX_DRIVES << PARTN_BITS, + THIS_MODULE, ata_probe, ata_lock, hwif); +diff -urN linux-2.6.19.old/drivers/ide/ide-tape.c linux-2.6.19.dev/drivers/ide/ide-tape.c +--- linux-2.6.19.old/drivers/ide/ide-tape.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ide/ide-tape.c 2006-12-14 03:12:59.000000000 +0100 +@@ -434,6 +434,7 @@ + #include <linux/interrupt.h> + #include <linux/jiffies.h> + #include <linux/major.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/errno.h> + #include <linux/genhd.h> + #include <linux/slab.h> +@@ -4724,6 +4725,9 @@ + MKDEV(IDETAPE_MAJOR, tape->minor)); + class_device_destroy(idetape_sysfs_class, + MKDEV(IDETAPE_MAJOR, tape->minor + 128)); ++ devfs_remove("%s/mt", drive->devfs_name); ++ devfs_remove("%s/mtn", drive->devfs_name); ++ devfs_unregister_tape(g->number); + idetape_devs[tape->minor] = NULL; + g->private_data = NULL; + put_disk(g); +@@ -4897,6 +4901,14 @@ + class_device_create(idetape_sysfs_class, NULL, + MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name); + ++ devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "%s/mt", drive->devfs_name); ++ devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor + 128), ++ S_IFCHR | S_IRUGO | S_IWUGO, ++ "%s/mtn", drive->devfs_name); ++ ++ g->number = devfs_register_tape(drive->devfs_name); + g->fops = &idetape_block_ops; + ide_register_region(g); + +diff -urN linux-2.6.19.old/drivers/ieee1394/dv1394.c linux-2.6.19.dev/drivers/ieee1394/dv1394.c +--- linux-2.6.19.old/drivers/ieee1394/dv1394.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ieee1394/dv1394.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2263,14 +2263,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 +2330,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 +2349,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 +2608,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 +2627,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 -urN linux-2.6.19.old/drivers/ieee1394/ieee1394_core.c linux-2.6.19.dev/drivers/ieee1394/ieee1394_core.c +--- linux-2.6.19.old/drivers/ieee1394/ieee1394_core.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ieee1394/ieee1394_core.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1072,10 +1072,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++) { +@@ -1086,7 +1093,7 @@ + fw_bus_attrs[i--]); + } + bus_unregister(&ieee1394_bus_type); +- goto release_chrdev; ++ goto release_devfs; + } + } + +@@ -1139,6 +1146,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: +@@ -1168,6 +1177,7 @@ + hpsb_cleanup_config_roms(); + + unregister_chrdev_region(IEEE1394_CORE_DEV, 256); ++ devfs_remove("ieee1394"); + } + + fs_initcall(ieee1394_init); /* same as ohci1394 */ +diff -urN linux-2.6.19.old/drivers/ieee1394/ieee1394_core.h linux-2.6.19.dev/drivers/ieee1394/ieee1394_core.h +--- linux-2.6.19.old/drivers/ieee1394/ieee1394_core.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ieee1394/ieee1394_core.h 2006-12-14 03:12:59.000000000 +0100 +@@ -6,6 +6,7 @@ + #include <linux/list.h> + #include <linux/skbuff.h> + #include <linux/types.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/atomic.h> + + #include "hosts.h" +diff -urN linux-2.6.19.old/drivers/ieee1394/raw1394.c linux-2.6.19.dev/drivers/ieee1394/raw1394.c +--- linux-2.6.19.old/drivers/ieee1394/raw1394.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ieee1394/raw1394.c 2006-12-14 03:12:59.000000000 +0100 +@@ -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" +@@ -3017,6 +3018,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); +@@ -3038,6 +3042,7 @@ + goto out; + + out_dev: ++ devfs_remove(RAW1394_DEVICE_NAME); + class_device_destroy(hpsb_protocol_class, + MKDEV(IEEE1394_MAJOR, + IEEE1394_MINOR_BLOCK_RAW1394 * 16)); +@@ -3053,6 +3058,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 -urN linux-2.6.19.old/drivers/ieee1394/video1394.c linux-2.6.19.dev/drivers/ieee1394/video1394.c +--- linux-2.6.19.old/drivers/ieee1394/video1394.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/ieee1394/video1394.c 2006-12-14 03:12:59.000000000 +0100 +@@ -41,6 +41,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> +@@ -1356,6 +1357,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); + } + + +@@ -1363,9 +1367,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; + } + +@@ -1506,8 +1513,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"); + } + +@@ -1524,12 +1535,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 -urN linux-2.6.19.old/drivers/input/serio/serio_raw.c linux-2.6.19.dev/drivers/input/serio/serio_raw.c +--- linux-2.6.19.old/drivers/input/serio/serio_raw.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/input/serio/serio_raw.c 2006-12-14 03:12:59.000000000 +0100 +@@ -16,6 +16,7 @@ + #include <linux/init.h> + #include <linux/major.h> + #include <linux/device.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/miscdevice.h> + #include <linux/wait.h> + #include <linux/mutex.h> +diff -urN linux-2.6.19.old/drivers/isdn/capi/capi.c linux-2.6.19.dev/drivers/isdn/capi/capi.c +--- linux-2.6.19.old/drivers/isdn/capi/capi.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/capi/capi.c 2006-12-14 03:12:59.000000000 +0100 +@@ -38,6 +38,7 @@ + #include <linux/init.h> + #include <linux/device.h> + #include <linux/moduleparam.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/isdn/capiutil.h> + #include <linux/isdn/capicmd.h> + #if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) +@@ -1335,6 +1336,7 @@ + + drv->owner = THIS_MODULE; + drv->driver_name = "capi_nc"; ++ drv->devfs_name = "capi/"; + drv->name = "capi"; + drv->major = capi_ttymajor; + drv->minor_start = 0; +@@ -1513,6 +1515,8 @@ + } + + class_device_create(capi_class, NULL, MKDEV(capi_major, 0), NULL, "capi"); ++ devfs_mk_cdev(MKDEV(capi_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, ++ "isdn/capi20"); + + #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE + if (capinc_tty_init() < 0) { +@@ -1547,6 +1551,7 @@ + class_device_destroy(capi_class, MKDEV(capi_major, 0)); + class_destroy(capi_class); + unregister_chrdev(capi_major, "capi20"); ++ devfs_remove("isdn/capi20"); + + #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE + capinc_tty_exit(); +diff -urN linux-2.6.19.old/drivers/isdn/gigaset/bas-gigaset.c linux-2.6.19.dev/drivers/isdn/gigaset/bas-gigaset.c +--- linux-2.6.19.old/drivers/isdn/gigaset/bas-gigaset.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/gigaset/bas-gigaset.c 2006-12-14 03:12:59.000000000 +0100 +@@ -41,6 +41,7 @@ + #define GIGASET_MINORS 1 + #define GIGASET_MINOR 16 + #define GIGASET_MODULENAME "bas_gigaset" ++#define GIGASET_DEVFSNAME "gig/bas/" + #define GIGASET_DEVNAME "ttyGB" + + /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ +@@ -2348,7 +2349,8 @@ + /* allocate memory for our driver state and intialize it */ + if ((driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, + GIGASET_MODULENAME, GIGASET_DEVNAME, +- &gigops, THIS_MODULE)) == NULL) ++ GIGASET_DEVFSNAME, &gigops, ++ THIS_MODULE)) == NULL) + goto error; + + /* allocate memory for our device state and intialize it */ +diff -urN linux-2.6.19.old/drivers/isdn/gigaset/common.c linux-2.6.19.dev/drivers/isdn/gigaset/common.c +--- linux-2.6.19.old/drivers/isdn/gigaset/common.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/gigaset/common.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1092,12 +1092,14 @@ + * minors Number of minors this driver can handle + * procname Name of the driver + * devname Name of the device files (prefix without minor number) ++ * devfsname Devfs name of the device files without %d + * return value: + * Pointer to the gigaset_driver structure on success, NULL on failure. + */ + struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, + const char *procname, + const char *devname, ++ const char *devfsname, + const struct gigaset_ops *ops, + struct module *owner) + { +@@ -1137,7 +1139,7 @@ + drv->cs[i].minor_index = i; + } + +- gigaset_if_initdriver(drv, procname, devname); ++ gigaset_if_initdriver(drv, procname, devname, devfsname); + + spin_lock_irqsave(&driver_lock, flags); + list_add(&drv->list, &drivers); +diff -urN linux-2.6.19.old/drivers/isdn/gigaset/gigaset.h linux-2.6.19.dev/drivers/isdn/gigaset/gigaset.h +--- linux-2.6.19.old/drivers/isdn/gigaset/gigaset.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/gigaset/gigaset.h 2006-12-14 03:12:59.000000000 +0100 +@@ -768,6 +768,7 @@ + struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors, + const char *procname, + const char *devname, ++ const char *devfsname, + const struct gigaset_ops *ops, + struct module *owner); + +@@ -890,7 +891,7 @@ + + /* initialize interface */ + void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, +- const char *devname); ++ const char *devname, const char *devfsname); + /* release interface */ + void gigaset_if_freedriver(struct gigaset_driver *drv); + /* add minor */ +diff -urN linux-2.6.19.old/drivers/isdn/gigaset/interface.c linux-2.6.19.dev/drivers/isdn/gigaset/interface.c +--- linux-2.6.19.old/drivers/isdn/gigaset/interface.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/gigaset/interface.c 2006-12-14 03:12:59.000000000 +0100 +@@ -673,9 +673,10 @@ + * drv Driver + * procname Name of the driver (e.g. for /proc/tty/drivers) + * devname Name of the device files (prefix without minor number) ++ * devfsname Devfs name of the device files without %d + */ + void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname, +- const char *devname) ++ const char *devname, const char *devfsname) + { + unsigned minors = drv->minors; + int ret; +@@ -691,7 +692,7 @@ + tty->major = GIG_MAJOR, + tty->type = TTY_DRIVER_TYPE_SERIAL, + tty->subtype = SERIAL_TYPE_NORMAL, +- tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ tty->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS, + + tty->driver_name = procname; + tty->name = devname; +@@ -699,6 +700,7 @@ + tty->num = drv->minors; + + tty->owner = THIS_MODULE; ++ tty->devfs_name = devfsname; + + tty->init_termios = tty_std_termios; //FIXME + tty->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; //FIXME +diff -urN linux-2.6.19.old/drivers/isdn/gigaset/usb-gigaset.c linux-2.6.19.dev/drivers/isdn/gigaset/usb-gigaset.c +--- linux-2.6.19.old/drivers/isdn/gigaset/usb-gigaset.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/gigaset/usb-gigaset.c 2006-12-14 03:12:59.000000000 +0100 +@@ -41,6 +41,7 @@ + #define GIGASET_MINORS 1 + #define GIGASET_MINOR 8 + #define GIGASET_MODULENAME "usb_gigaset" ++#define GIGASET_DEVFSNAME "gig/usb/" + #define GIGASET_DEVNAME "ttyGU" + + #define IF_WRITEBUF 2000 //FIXME // WAKEUP_CHARS: 256 +@@ -895,7 +896,8 @@ + /* allocate memory for our driver state and intialize it */ + if ((driver = gigaset_initdriver(GIGASET_MINOR, GIGASET_MINORS, + GIGASET_MODULENAME, GIGASET_DEVNAME, +- &ops, THIS_MODULE)) == NULL) ++ GIGASET_DEVFSNAME, &ops, ++ THIS_MODULE)) == NULL) + goto error; + + /* allocate memory for our device state and intialize it */ +diff -urN linux-2.6.19.old/drivers/isdn/hardware/eicon/divamnt.c linux-2.6.19.dev/drivers/isdn/hardware/eicon/divamnt.c +--- linux-2.6.19.old/drivers/isdn/hardware/eicon/divamnt.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/hardware/eicon/divamnt.c 2006-12-14 03:12:59.000000000 +0100 +@@ -10,12 +10,14 @@ + * of the GNU General Public License, incorporated herein by reference. + */ + ++#include <linux/config.h> + #include <linux/module.h> + #include <linux/init.h> + #include <linux/kernel.h> + #include <linux/sched.h> + #include <linux/smp_lock.h> + #include <linux/poll.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/uaccess.h> + + #include "platform.h" +@@ -176,6 +178,7 @@ + + static void divas_maint_unregister_chrdev(void) + { ++ devfs_remove(DEVNAME); + unregister_chrdev(major, DEVNAME); + } + +@@ -187,6 +190,7 @@ + DRIVERLNAME); + return (0); + } ++ devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME); + + return (1); + } +diff -urN linux-2.6.19.old/drivers/isdn/hardware/eicon/divasi.c linux-2.6.19.dev/drivers/isdn/hardware/eicon/divasi.c +--- linux-2.6.19.old/drivers/isdn/hardware/eicon/divasi.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/hardware/eicon/divasi.c 2006-12-14 03:12:59.000000000 +0100 +@@ -18,6 +18,7 @@ + #include <linux/poll.h> + #include <linux/proc_fs.h> + #include <linux/skbuff.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/uaccess.h> + + #include "platform.h" +@@ -143,6 +144,7 @@ + + static void divas_idi_unregister_chrdev(void) + { ++ devfs_remove(DEVNAME); + unregister_chrdev(major, DEVNAME); + } + +@@ -154,6 +156,7 @@ + DRIVERLNAME); + return (0); + } ++ devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME); + + return (1); + } +diff -urN linux-2.6.19.old/drivers/isdn/hardware/eicon/divasmain.c linux-2.6.19.dev/drivers/isdn/hardware/eicon/divasmain.c +--- linux-2.6.19.old/drivers/isdn/hardware/eicon/divasmain.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/hardware/eicon/divasmain.c 2006-12-14 03:12:59.000000000 +0100 +@@ -9,10 +9,12 @@ + * of the GNU General Public License, incorporated herein by reference. + */ + ++#include <linux/config.h> + #include <linux/module.h> + #include <linux/init.h> + #include <linux/kernel.h> + #include <linux/sched.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/uaccess.h> + #include <asm/io.h> + #include <linux/ioport.h> +@@ -675,6 +677,7 @@ + + static void divas_unregister_chrdev(void) + { ++ devfs_remove(DEVNAME); + unregister_chrdev(major, DEVNAME); + } + +@@ -686,6 +689,7 @@ + DRIVERLNAME); + return (0); + } ++ devfs_mk_cdev(MKDEV(major, 0), S_IFCHR|S_IRUSR|S_IWUSR, DEVNAME); + + return (1); + } +diff -urN linux-2.6.19.old/drivers/isdn/i4l/isdn_tty.c linux-2.6.19.dev/drivers/isdn/i4l/isdn_tty.c +--- linux-2.6.19.old/drivers/isdn/i4l/isdn_tty.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/isdn/i4l/isdn_tty.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1889,13 +1889,14 @@ + if (!m->tty_modem) + return -ENOMEM; + m->tty_modem->name = "ttyI"; ++ m->tty_modem->devfs_name = "isdn/ttyI"; + m->tty_modem->major = ISDN_TTY_MAJOR; + m->tty_modem->minor_start = 0; + m->tty_modem->type = TTY_DRIVER_TYPE_SERIAL; + m->tty_modem->subtype = SERIAL_TYPE_NORMAL; + m->tty_modem->init_termios = tty_std_termios; + m->tty_modem->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; +- m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ m->tty_modem->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + m->tty_modem->driver_name = "isdn_tty"; + tty_set_operations(m->tty_modem, &modem_ops); + retval = tty_register_driver(m->tty_modem); +diff -urN linux-2.6.19.old/drivers/macintosh/adb.c linux-2.6.19.dev/drivers/macintosh/adb.c +--- linux-2.6.19.old/drivers/macintosh/adb.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/macintosh/adb.c 2006-12-14 03:12:59.000000000 +0100 +@@ -35,6 +35,7 @@ + #include <linux/spinlock.h> + #include <linux/completion.h> + #include <linux/device.h> ++#include <linux/devfs_fs_kernel.h> + + #include <asm/uaccess.h> + #include <asm/semaphore.h> +@@ -902,6 +903,8 @@ + return; + } + ++ devfs_mk_cdev(MKDEV(ADB_MAJOR, 0), S_IFCHR | S_IRUSR | S_IWUSR, "adb"); ++ + adb_dev_class = class_create(THIS_MODULE, "adb"); + if (IS_ERR(adb_dev_class)) + return; +diff -urN linux-2.6.19.old/drivers/md/dm-ioctl.c linux-2.6.19.dev/drivers/md/dm-ioctl.c +--- linux-2.6.19.old/drivers/md/dm-ioctl.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/md/dm-ioctl.c 2006-12-14 03:12:59.000000000 +0100 +@@ -13,6 +13,7 @@ + #include <linux/init.h> + #include <linux/wait.h> + #include <linux/slab.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/dm-ioctl.h> + #include <linux/hdreg.h> + +@@ -67,12 +68,14 @@ + { + init_buckets(_name_buckets); + init_buckets(_uuid_buckets); ++ devfs_mk_dir(DM_DIR); + return 0; + } + + static void dm_hash_exit(void) + { + dm_hash_remove_all(0); ++ devfs_remove(DM_DIR); + } + + /*----------------------------------------------------------------- +@@ -169,6 +172,25 @@ + } + + /* ++ * devfs stuff. ++ */ ++static int register_with_devfs(struct hash_cell *hc) ++{ ++ struct gendisk *disk = dm_disk(hc->md); ++ ++ devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), ++ S_IFBLK | S_IRUSR | S_IWUSR | S_IRGRP, ++ DM_DIR "/%s", hc->name); ++ return 0; ++} ++ ++static int unregister_with_devfs(struct hash_cell *hc) ++{ ++ devfs_remove(DM_DIR"/%s", hc->name); ++ return 0; ++} ++ ++/* + * The kdev_t and uuid of a device can never change once it is + * initially inserted. + */ +@@ -204,6 +226,7 @@ + } + list_add(&cell->uuid_list, _uuid_buckets + hash_str(uuid)); + } ++ register_with_devfs(cell); + dm_get(md); + dm_set_mdptr(md, cell); + up_write(&_hash_lock); +@@ -223,6 +246,7 @@ + /* remove from the dev hash */ + list_del(&hc->uuid_list); + list_del(&hc->name_list); ++ unregister_with_devfs(hc); + dm_set_mdptr(hc->md, NULL); + + table = dm_get_table(hc->md); +@@ -318,11 +342,16 @@ + /* + * rename and move the name cell. + */ ++ unregister_with_devfs(hc); ++ + list_del(&hc->name_list); + old_name = hc->name; + hc->name = new_name; + list_add(&hc->name_list, _name_buckets + hash_str(new_name)); + ++ /* rename the device node in devfs */ ++ register_with_devfs(hc); ++ + /* + * Wake up any dm event waiters. + */ +@@ -1477,6 +1506,7 @@ + static struct miscdevice _dm_misc = { + .minor = MISC_DYNAMIC_MINOR, + .name = DM_NAME, ++ .devfs_name = "mapper/control", + .fops = &_ctl_fops + }; + +diff -urN linux-2.6.19.old/drivers/md/md.c linux-2.6.19.dev/drivers/md/md.c +--- linux-2.6.19.old/drivers/md/md.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/md/md.c 2006-12-14 03:12:59.000000000 +0100 +@@ -38,6 +38,7 @@ + #include <linux/raid/md.h> + #include <linux/raid/bitmap.h> + #include <linux/sysctl.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/buffer_head.h> /* for invalidate_bdev */ + #include <linux/suspend.h> + #include <linux/poll.h> +@@ -2969,10 +2970,13 @@ + } + disk->major = MAJOR(dev); + disk->first_minor = unit << shift; +- if (partitioned) ++ if (partitioned) { + sprintf(disk->disk_name, "md_d%d", unit); +- else ++ sprintf(disk->devfs_name, "md/d%d", unit); ++ } else { + sprintf(disk->disk_name, "md%d", unit); ++ sprintf(disk->devfs_name, "md/%d", unit); ++ } + disk->fops = &md_fops; + disk->private_data = mddev; + disk->queue = mddev->queue; +@@ -5539,11 +5543,23 @@ + unregister_blkdev(MAJOR_NR, "md"); + return -1; + } ++ devfs_mk_dir("md"); + blk_register_region(MKDEV(MAJOR_NR, 0), 1UL<<MINORBITS, THIS_MODULE, + md_probe, NULL, NULL); + blk_register_region(MKDEV(mdp_major, 0), 1UL<<MINORBITS, THIS_MODULE, + md_probe, NULL, NULL); + ++ for (minor=0; minor < MAX_MD_DEVS; ++minor) ++ devfs_mk_bdev(MKDEV(MAJOR_NR, minor), ++ S_IFBLK|S_IRUSR|S_IWUSR, ++ "md/%d", minor); ++ ++ for (minor=0; minor < MAX_MD_DEVS; ++minor) ++ devfs_mk_bdev(MKDEV(mdp_major, minor<<MdpMinorShift), ++ S_IFBLK|S_IRUSR|S_IWUSR, ++ "md/mdp%d", minor); ++ ++ + register_reboot_notifier(&md_notifier); + raid_table_header = register_sysctl_table(raid_root_table, 1); + +@@ -5599,9 +5615,16 @@ + { + mddev_t *mddev; + struct list_head *tmp; ++ int i; + + blk_unregister_region(MKDEV(MAJOR_NR,0), 1U << MINORBITS); + blk_unregister_region(MKDEV(mdp_major,0), 1U << MINORBITS); ++ for (i=0; i < MAX_MD_DEVS; i++) ++ devfs_remove("md/%d", i); ++ for (i=0; i < MAX_MD_DEVS; i++) ++ devfs_remove("md/d%d", i); ++ ++ devfs_remove("md"); + + unregister_blkdev(MAJOR_NR,"md"); + unregister_blkdev(mdp_major, "mdp"); +diff -urN linux-2.6.19.old/drivers/media/dvb/dvb-core/dvbdev.c linux-2.6.19.dev/drivers/media/dvb/dvb-core/dvbdev.c +--- linux-2.6.19.old/drivers/media/dvb/dvb-core/dvbdev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/dvb/dvb-core/dvbdev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -231,6 +231,10 @@ + + mutex_unlock(&dvbdev_register_lock); + ++ devfs_mk_cdev(MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "dvb/adapter%d/%s%d", adap->num, dnames[type], id); ++ + class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), + adap->device, "dvb%d.%s%d", adap->num, dnames[type], id); + +@@ -248,6 +252,9 @@ + if (!dvbdev) + return; + ++ devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num, ++ dnames[dvbdev->type], dvbdev->id); ++ + class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num, + dvbdev->type, dvbdev->id))); + +@@ -295,6 +302,7 @@ + + printk ("DVB: registering new adapter (%s).\n", name); + ++ devfs_mk_dir("dvb/adapter%d", num); + adap->num = num; + adap->name = name; + adap->module = module; +@@ -311,6 +319,8 @@ + + int dvb_unregister_adapter(struct dvb_adapter *adap) + { ++ devfs_remove("dvb/adapter%d", adap->num); ++ + if (mutex_lock_interruptible(&dvbdev_register_lock)) + return -ERESTARTSYS; + list_del (&adap->list_head); +@@ -400,6 +410,8 @@ + goto error; + } + ++ devfs_mk_dir("dvb"); ++ + dvb_class = class_create(THIS_MODULE, "dvb"); + if (IS_ERR(dvb_class)) { + retval = PTR_ERR(dvb_class); +@@ -416,6 +428,7 @@ + + static void __exit exit_dvbdev(void) + { ++ devfs_remove("dvb"); + class_destroy(dvb_class); + cdev_del(&dvb_device_cdev); + unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS); +diff -urN linux-2.6.19.old/drivers/media/dvb/dvb-core/dvbdev.h linux-2.6.19.dev/drivers/media/dvb/dvb-core/dvbdev.h +--- linux-2.6.19.old/drivers/media/dvb/dvb-core/dvbdev.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/dvb/dvb-core/dvbdev.h 2006-12-14 03:12:59.000000000 +0100 +@@ -27,6 +27,7 @@ + #include <linux/poll.h> + #include <linux/fs.h> + #include <linux/list.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/smp_lock.h> + + #define DVB_MAJOR 212 +diff -urN linux-2.6.19.old/drivers/media/dvb/ttpci/av7110.h linux-2.6.19.dev/drivers/media/dvb/ttpci/av7110.h +--- linux-2.6.19.old/drivers/media/dvb/ttpci/av7110.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/dvb/ttpci/av7110.h 2006-12-14 03:12:59.000000000 +0100 +@@ -6,6 +6,10 @@ + #include <linux/netdevice.h> + #include <linux/i2c.h> + ++#ifdef CONFIG_DEVFS_FS ++#include <linux/devfs_fs_kernel.h> ++#endif ++ + #include <linux/dvb/video.h> + #include <linux/dvb/audio.h> + #include <linux/dvb/dmx.h> +diff -urN linux-2.6.19.old/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c linux-2.6.19.dev/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +--- linux-2.6.19.old/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c 2006-12-14 03:12:59.000000000 +0100 +@@ -126,6 +126,10 @@ + + int revision; + ++#if 0 ++ devfs_handle_t stc_devfs_handle; ++#endif ++ + struct dvb_frontend* fe; + }; + +@@ -1741,6 +1745,13 @@ + return -ENODEV; + } + ++#if 0 ++ ttusb->stc_devfs_handle = ++ devfs_register(ttusb->adapter->devfs_handle, TTUSB_BUDGET_NAME, ++ DEVFS_FL_DEFAULT, 0, 192, ++ S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP ++ | S_IROTH | S_IWOTH, &stc_fops, ttusb); ++#endif + usb_set_intfdata(intf, (void *) ttusb); + + frontend_init(ttusb); +diff -urN linux-2.6.19.old/drivers/media/radio/miropcm20-rds.c linux-2.6.19.dev/drivers/media/radio/miropcm20-rds.c +--- linux-2.6.19.old/drivers/media/radio/miropcm20-rds.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/radio/miropcm20-rds.c 2006-12-14 03:12:59.000000000 +0100 +@@ -115,6 +115,7 @@ + static struct miscdevice rds_miscdev = { + .minor = MISC_DYNAMIC_MINOR, + .name = "radiotext", ++ .devfs_name = "v4l/rds/radiotext", + .fops = &rds_fops, + }; + +diff -urN linux-2.6.19.old/drivers/media/video/arv.c linux-2.6.19.dev/drivers/media/video/arv.c +--- linux-2.6.19.old/drivers/media/video/arv.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/video/arv.c 2006-12-14 03:12:59.000000000 +0100 +@@ -19,6 +19,7 @@ + */ + + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/module.h> + #include <linux/delay.h> + #include <linux/errno.h> +diff -urN linux-2.6.19.old/drivers/media/video/videodev.c linux-2.6.19.dev/drivers/media/video/videodev.c +--- linux-2.6.19.old/drivers/media/video/videodev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/media/video/videodev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -38,6 +38,7 @@ + #include <linux/init.h> + #include <linux/kmod.h> + #include <linux/slab.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/uaccess.h> + #include <asm/system.h> + +@@ -1593,6 +1594,10 @@ + video_device[i]=vfd; + vfd->minor=i; + mutex_unlock(&videodev_lock); ++ ++ sprintf(vfd->devfs_name, "v4l/%s%d", name_base, i - base); ++ devfs_mk_cdev(MKDEV(VIDEO_MAJOR, vfd->minor), ++ S_IFCHR | S_IRUSR | S_IWUSR, vfd->devfs_name); + mutex_init(&vfd->lock); + + /* sysfs class */ +@@ -1602,6 +1607,7 @@ + vfd->class_dev.class = &video_class; + vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); + sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); ++ strlcpy(vfd->class_dev.class_id, vfd->devfs_name + 4, BUS_ID_SIZE); + ret = class_device_register(&vfd->class_dev); + if (ret < 0) { + printk(KERN_ERR "%s: class_device_register failed\n", +@@ -1648,6 +1654,7 @@ + if(video_device[vfd->minor]!=vfd) + panic("videodev: bad unregister"); + ++ devfs_remove(vfd->devfs_name); + video_device[vfd->minor]=NULL; + class_device_unregister(&vfd->class_dev); + mutex_unlock(&videodev_lock); +diff -urN linux-2.6.19.old/drivers/message/i2o/i2o_block.c linux-2.6.19.dev/drivers/message/i2o/i2o_block.c +--- linux-2.6.19.old/drivers/message/i2o/i2o_block.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/message/i2o/i2o_block.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1090,6 +1090,7 @@ + gd = i2o_blk_dev->gd; + gd->first_minor = unit << 4; + sprintf(gd->disk_name, "i2o/hd%c", 'a' + unit); ++ sprintf(gd->devfs_name, "i2o/hd%c", 'a' + unit); + gd->driverfs_dev = &i2o_dev->device; + + /* setup request queue */ +diff -urN linux-2.6.19.old/drivers/mmc/mmc_block.c linux-2.6.19.dev/drivers/mmc/mmc_block.c +--- linux-2.6.19.old/drivers/mmc/mmc_block.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/mmc/mmc_block.c 2006-12-14 03:12:59.000000000 +0100 +@@ -27,6 +27,7 @@ + #include <linux/hdreg.h> + #include <linux/kdev_t.h> + #include <linux/blkdev.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/mutex.h> + #include <linux/scatterlist.h> + +@@ -472,6 +473,7 @@ + */ + + sprintf(md->disk->disk_name, "mmcblk%d", devidx); ++ sprintf(md->disk->devfs_name, "mmc/blk%d", devidx); + + blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); + +@@ -617,6 +619,7 @@ + if (major == 0) + major = res; + ++ devfs_mk_dir("mmc"); + return mmc_register_driver(&mmc_driver); + + out: +@@ -626,6 +629,7 @@ + static void __exit mmc_blk_exit(void) + { + mmc_unregister_driver(&mmc_driver); ++ devfs_remove("mmc"); + unregister_blkdev(major, "mmc"); + } + +diff -urN linux-2.6.19.old/drivers/mtd/mtd_blkdevs.c linux-2.6.19.dev/drivers/mtd/mtd_blkdevs.c +--- linux-2.6.19.old/drivers/mtd/mtd_blkdevs.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/mtd/mtd_blkdevs.c 2006-12-14 03:12:59.000000000 +0100 +@@ -21,6 +21,9 @@ + #include <linux/init.h> + #include <linux/mutex.h> + #include <asm/uaccess.h> ++#ifdef CONFIG_DEVFS_FS ++#include <linux/devfs_fs_kernel.h> ++#endif + + static LIST_HEAD(blktrans_majors); + +@@ -295,6 +298,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); +@@ -411,6 +419,10 @@ + return ret; + } + ++#ifdef CONFIG_DEVFS_FS ++ devfs_mk_dir(tr->name); ++#endif ++ + INIT_LIST_HEAD(&tr->devs); + list_add(&tr->list, &blktrans_majors); + +@@ -443,6 +455,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 -urN linux-2.6.19.old/drivers/mtd/mtdchar.c linux-2.6.19.dev/drivers/mtd/mtdchar.c +--- linux-2.6.19.old/drivers/mtd/mtdchar.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/mtd/mtdchar.c 2006-12-14 03:12:59.000000000 +0100 +@@ -18,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) +@@ -38,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 = { +@@ -47,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 ++ + /* + * Data structure to hold the pointer to the mtd device as well + * as mode information ofr various use cases. +@@ -778,6 +813,9 @@ + return -EAGAIN; + } + ++#ifdef CONFIG_DEVFS_FS ++ mtdchar_devfs_init(); ++#else + mtd_class = class_create(THIS_MODULE, "mtd"); + + if (IS_ERR(mtd_class)) { +@@ -787,13 +825,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 -urN linux-2.6.19.old/drivers/net/ppp_generic.c linux-2.6.19.dev/drivers/net/ppp_generic.c +--- linux-2.6.19.old/drivers/net/ppp_generic.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/net/ppp_generic.c 2006-12-14 03:12:59.000000000 +0100 +@@ -27,6 +27,7 @@ + #include <linux/kmod.h> + #include <linux/init.h> + #include <linux/list.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/netdevice.h> + #include <linux/poll.h> + #include <linux/ppp_defs.h> +@@ -861,6 +862,10 @@ + goto out_chrdev; + } + class_device_create(ppp_class, NULL, MKDEV(PPP_MAJOR, 0), NULL, "ppp"); ++ err = devfs_mk_cdev(MKDEV(PPP_MAJOR, 0), ++ S_IFCHR|S_IRUSR|S_IWUSR, "ppp"); ++ if (err) ++ goto out_chrdev; + } + + out: +@@ -2675,6 +2680,7 @@ + cardmap_destroy(&all_ppp_units); + if (unregister_chrdev(PPP_MAJOR, "ppp") != 0) + printk(KERN_ERR "PPP: failed to unregister PPP device\n"); ++ devfs_remove("ppp"); + class_device_destroy(ppp_class, MKDEV(PPP_MAJOR, 0)); + class_destroy(ppp_class); + } +diff -urN linux-2.6.19.old/drivers/net/tun.c linux-2.6.19.dev/drivers/net/tun.c +--- linux-2.6.19.old/drivers/net/tun.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/net/tun.c 2006-12-14 03:12:59.000000000 +0100 +@@ -762,6 +762,7 @@ + .minor = TUN_MINOR, + .name = "tun", + .fops = &tun_fops, ++ .devfs_name = "net/tun", + }; + + /* ethtool interface */ +diff -urN linux-2.6.19.old/drivers/net/wan/cosa.c linux-2.6.19.dev/drivers/net/wan/cosa.c +--- linux-2.6.19.old/drivers/net/wan/cosa.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/net/wan/cosa.c 2006-12-14 03:12:59.000000000 +0100 +@@ -84,6 +84,7 @@ + #include <linux/slab.h> + #include <linux/poll.h> + #include <linux/fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/interrupt.h> + #include <linux/delay.h> + #include <linux/errno.h> +@@ -391,6 +392,7 @@ + err = -ENODEV; + goto out; + } ++ devfs_mk_dir("cosa"); + cosa_class = class_create(THIS_MODULE, "cosa"); + if (IS_ERR(cosa_class)) { + err = PTR_ERR(cosa_class); +@@ -399,6 +401,13 @@ + for (i=0; i<nr_cards; i++) { + class_device_create(cosa_class, NULL, MKDEV(cosa_major, i), + NULL, "cosa%d", i); ++ err = devfs_mk_cdev(MKDEV(cosa_major, i), ++ S_IFCHR|S_IRUSR|S_IWUSR, ++ "cosa/%d", i); ++ if (err) { ++ class_device_destroy(cosa_class, MKDEV(cosa_major, i)); ++ goto out_chrdev; ++ } + } + err = 0; + goto out; +@@ -416,9 +425,12 @@ + int i; + printk(KERN_INFO "Unloading the cosa module\n"); + +- for (i=0; i<nr_cards; i++) ++ for (i=0; i<nr_cards; i++) { + class_device_destroy(cosa_class, MKDEV(cosa_major, i)); ++ devfs_remove("cosa/%d", i); ++ } + class_destroy(cosa_class); ++ devfs_remove("cosa"); + for (cosa=cosa_cards; nr_cards--; cosa++) { + /* Clean up the per-channel data */ + for (i=0; i<cosa->nchannels; i++) { +diff -urN linux-2.6.19.old/drivers/s390/block/dasd.c linux-2.6.19.dev/drivers/s390/block/dasd.c +--- linux-2.6.19.old/drivers/s390/block/dasd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/s390/block/dasd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1903,6 +1903,7 @@ + } + dasd_gendisk_exit(); + dasd_devmap_exit(); ++ devfs_remove("dasd"); + if (dasd_debug_area != NULL) { + debug_unregister(dasd_debug_area); + dasd_debug_area = NULL; +@@ -2176,6 +2177,9 @@ + + dasd_diag_discipline_pointer = NULL; + ++ rc = devfs_mk_dir("dasd"); ++ if (rc) ++ goto failed; + rc = dasd_devmap_init(); + if (rc) + goto failed; +diff -urN linux-2.6.19.old/drivers/s390/block/dasd_genhd.c linux-2.6.19.dev/drivers/s390/block/dasd_genhd.c +--- linux-2.6.19.old/drivers/s390/block/dasd_genhd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/s390/block/dasd_genhd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -67,6 +67,8 @@ + } + len += sprintf(gdp->disk_name + len, "%c", 'a'+(device->devindex%26)); + ++ sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); ++ + if (device->features & DASD_FEATURE_READONLY) + set_disk_ro(gdp, 1); + gdp->private_data = device; +diff -urN linux-2.6.19.old/drivers/s390/block/dasd_int.h linux-2.6.19.dev/drivers/s390/block/dasd_int.h +--- linux-2.6.19.old/drivers/s390/block/dasd_int.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/s390/block/dasd_int.h 2006-12-14 03:12:59.000000000 +0100 +@@ -54,6 +54,7 @@ + #include <linux/module.h> + #include <linux/wait.h> + #include <linux/blkdev.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/genhd.h> + #include <linux/hdreg.h> + #include <linux/interrupt.h> +diff -urN linux-2.6.19.old/drivers/s390/block/xpram.c linux-2.6.19.dev/drivers/s390/block/xpram.c +--- linux-2.6.19.old/drivers/s390/block/xpram.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/s390/block/xpram.c 2006-12-14 03:12:59.000000000 +0100 +@@ -36,6 +36,7 @@ + #include <linux/hdreg.h> /* HDIO_GETGEO */ + #include <linux/sysdev.h> + #include <linux/bio.h> ++#include <linux/devfs_fs_kernel.h> + #include <asm/uaccess.h> + + #define XPRAM_NAME "xpram" +@@ -363,6 +364,8 @@ + if (rc < 0) + goto out; + ++ devfs_mk_dir("slram"); ++ + /* + * Assign the other needed values: make request function, sizes and + * hardsect size. All the minor devices feature the same value. +@@ -391,12 +394,14 @@ + disk->private_data = &xpram_devices[i]; + disk->queue = xpram_queue; + sprintf(disk->disk_name, "slram%d", i); ++ sprintf(disk->devfs_name, "slram/%d", i); + set_capacity(disk, xpram_sizes[i] << 1); + add_disk(disk); + } + + return 0; + out_unreg: ++ devfs_remove("slram"); + unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); + out: + while (i--) +@@ -415,7 +420,10 @@ + put_disk(xpram_disks[i]); + } + unregister_blkdev(XPRAM_MAJOR, XPRAM_NAME); ++ devfs_remove("slram"); + blk_cleanup_queue(xpram_queue); ++ sysdev_unregister(&xpram_sys_device); ++ sysdev_class_unregister(&xpram_sysclass); + } + + static int __init xpram_init(void) +diff -urN linux-2.6.19.old/drivers/s390/char/monreader.c linux-2.6.19.dev/drivers/s390/char/monreader.c +--- linux-2.6.19.old/drivers/s390/char/monreader.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/s390/char/monreader.c 2006-12-14 03:12:59.000000000 +0100 +@@ -586,6 +586,7 @@ + + static struct miscdevice mon_dev = { + .name = "monreader", ++ .devfs_name = "monreader", + .fops = &mon_fops, + .minor = MISC_DYNAMIC_MINOR, + }; +diff -urN linux-2.6.19.old/drivers/s390/char/tty3270.c linux-2.6.19.dev/drivers/s390/char/tty3270.c +--- linux-2.6.19.old/drivers/s390/char/tty3270.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/s390/char/tty3270.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1783,6 +1783,7 @@ + * proc_entry, set_termios, flush_buffer, set_ldisc, write_proc + */ + driver->owner = THIS_MODULE; ++ driver->devfs_name = "ttyTUB/"; + driver->driver_name = "ttyTUB"; + driver->name = "ttyTUB"; + driver->major = IBM_TTY3270_MAJOR; +@@ -1790,7 +1791,7 @@ + driver->type = TTY_DRIVER_TYPE_SYSTEM; + driver->subtype = SYSTEM_TYPE_TTY; + driver->init_termios = tty_std_termios; +- driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_DYNAMIC_DEV; ++ driver->flags = TTY_DRIVER_RESET_TERMIOS | TTY_DRIVER_NO_DEVFS; + tty_set_operations(driver, &tty3270_ops); + ret = tty_register_driver(driver); + if (ret) { +diff -urN linux-2.6.19.old/drivers/sbus/char/bpp.c linux-2.6.19.dev/drivers/sbus/char/bpp.c +--- linux-2.6.19.old/drivers/sbus/char/bpp.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/sbus/char/bpp.c 2006-12-14 03:12:59.000000000 +0100 +@@ -20,6 +20,7 @@ + #include <linux/timer.h> + #include <linux/ioport.h> + #include <linux/major.h> ++#include <linux/devfs_fs_kernel.h> + + #include <asm/uaccess.h> + #include <asm/io.h> +@@ -1030,6 +1031,11 @@ + instances[idx].opened = 0; + probeLptPort(idx); + } ++ devfs_mk_dir("bpp"); ++ for (idx = 0; idx < BPP_NO; idx++) { ++ devfs_mk_cdev(MKDEV(BPP_MAJOR, idx), ++ S_IFCHR | S_IRUSR | S_IWUSR, "bpp/%d", idx); ++ } + + return 0; + } +@@ -1038,6 +1044,9 @@ + { + unsigned idx; + ++ for (idx = 0; idx < BPP_NO; idx++) ++ devfs_remove("bpp/%d", idx); ++ devfs_remove("bpp"); + unregister_chrdev(BPP_MAJOR, dev_name); + + for (idx = 0; idx < BPP_NO; idx++) { +diff -urN linux-2.6.19.old/drivers/sbus/char/vfc_dev.c linux-2.6.19.dev/drivers/sbus/char/vfc_dev.c +--- linux-2.6.19.old/drivers/sbus/char/vfc_dev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/sbus/char/vfc_dev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -164,6 +164,10 @@ + return -EINVAL; + if (init_vfc_hw(dev)) + return -EIO; ++ ++ devfs_mk_cdev(MKDEV(VFC_MAJOR, instance), ++ S_IFCHR | S_IRUSR | S_IWUSR, ++ "vfc/%d", instance); + return 0; + } + +@@ -673,6 +677,7 @@ + kfree(vfc_dev_lst); + return -EIO; + } ++ devfs_mk_dir("vfc"); + instance = 0; + for_all_sbusdev(sdev, sbus) { + if (strcmp(sdev->prom_name, "vfc") == 0) { +@@ -712,6 +717,7 @@ + { + if(dev == NULL) + return; ++ devfs_remove("vfc/%d", dev->instance); + sbus_iounmap(dev->regs, sizeof(struct vfc_regs)); + kfree(dev); + } +@@ -725,6 +731,7 @@ + for (devp = vfc_dev_lst; *devp; devp++) + deinit_vfc_device(*devp); + ++ devfs_remove("vfc"); + kfree(vfc_dev_lst); + return; + } +diff -urN linux-2.6.19.old/drivers/sbus/char/vfc.h linux-2.6.19.dev/drivers/sbus/char/vfc.h +--- linux-2.6.19.old/drivers/sbus/char/vfc.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/sbus/char/vfc.h 2006-12-14 03:12:59.000000000 +0100 +@@ -1,6 +1,8 @@ + #ifndef _LINUX_VFC_H_ + #define _LINUX_VFC_H_ + ++#include <linux/devfs_fs_kernel.h> ++ + /* + * The control register for the vfc is at offset 0x4000 + * The first field ram bank is located at offset 0x5000 +diff -urN linux-2.6.19.old/drivers/scsi/osst.c linux-2.6.19.dev/drivers/scsi/osst.c +--- linux-2.6.19.old/drivers/scsi/osst.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/osst.c 2006-12-14 03:12:59.000000000 +0100 +@@ -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> +@@ -5859,6 +5860,18 @@ + STps->drv_block = (-1); + STps->drv_file = (-1); + } ++ 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); + + tpnt->current_mode = 0; + tpnt->modes[0].defined = 1; +@@ -5914,6 +5927,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 -urN linux-2.6.19.old/drivers/scsi/scsi.c linux-2.6.19.dev/drivers/scsi/scsi.c +--- linux-2.6.19.old/drivers/scsi/scsi.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/scsi.c 2006-12-14 03:12:59.000000000 +0100 +@@ -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> +@@ -1119,6 +1120,7 @@ + + scsi_netlink_init(); + ++ devfs_mk_dir("scsi"); + printk(KERN_NOTICE "SCSI subsystem initialized\n"); + return 0; + +@@ -1144,6 +1146,7 @@ + scsi_exit_sysctl(); + scsi_exit_hosts(); + scsi_exit_devinfo(); ++ devfs_remove("scsi"); + scsi_exit_procfs(); + scsi_exit_queue(); + } +diff -urN linux-2.6.19.old/drivers/scsi/scsi_scan.c linux-2.6.19.dev/drivers/scsi/scsi_scan.c +--- linux-2.6.19.old/drivers/scsi/scsi_scan.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/scsi_scan.c 2006-12-14 03:12:59.000000000 +0100 +@@ -719,8 +719,12 @@ + sdev->inq_periph_qual, inq_result[2] & 0x07, + (inq_result[3] & 0x0f) == 1 ? " CCS" : ""); + ++ 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 -urN linux-2.6.19.old/drivers/scsi/sd.c linux-2.6.19.dev/drivers/scsi/sd.c +--- linux-2.6.19.old/drivers/scsi/sd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/sd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1687,6 +1687,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 -urN linux-2.6.19.old/drivers/scsi/sg.c linux-2.6.19.dev/drivers/scsi/sg.c +--- linux-2.6.19.old/drivers/scsi/sg.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/sg.c 2006-12-14 03:12:59.000000000 +0100 +@@ -43,6 +43,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> +@@ -1530,6 +1531,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 -urN linux-2.6.19.old/drivers/scsi/sr.c linux-2.6.19.dev/drivers/scsi/sr.c +--- linux-2.6.19.old/drivers/scsi/sr.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/sr.c 2006-12-14 03:12:59.000000000 +0100 +@@ -591,6 +591,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 -urN linux-2.6.19.old/drivers/scsi/st.c linux-2.6.19.dev/drivers/scsi/st.c +--- linux-2.6.19.old/drivers/scsi/st.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/scsi/st.c 2006-12-14 03:12:59.000000000 +0100 +@@ -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> +@@ -4056,6 +4057,21 @@ + goto out_free_tape; + } + ++ 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", +@@ -4109,9 +4125,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 -urN linux-2.6.19.old/drivers/serial/21285.c linux-2.6.19.dev/drivers/serial/21285.c +--- linux-2.6.19.old/drivers/serial/21285.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/21285.c 2006-12-14 03:12:59.000000000 +0100 +@@ -478,6 +478,7 @@ + .owner = THIS_MODULE, + .driver_name = "ttyFB", + .dev_name = "ttyFB", ++ .devfs_name = "ttyFB", + .major = SERIAL_21285_MAJOR, + .minor = SERIAL_21285_MINOR, + .nr = 1, +diff -urN linux-2.6.19.old/drivers/serial/8250.c linux-2.6.19.dev/drivers/serial/8250.c +--- linux-2.6.19.old/drivers/serial/8250.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/8250.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2381,6 +2381,7 @@ + static struct uart_driver serial8250_reg = { + .owner = THIS_MODULE, + .driver_name = "serial", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + .minor = 64, +diff -urN linux-2.6.19.old/drivers/serial/atmel_serial.c linux-2.6.19.dev/drivers/serial/atmel_serial.c +--- linux-2.6.19.old/drivers/serial/atmel_serial.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/atmel_serial.c 2006-12-14 03:12:59.000000000 +0100 +@@ -875,6 +875,7 @@ + .owner = THIS_MODULE, + .driver_name = "atmel_serial", + .dev_name = ATMEL_DEVICENAME, ++ .devfs_name = ATMEL_DEVICENAME, + .major = SERIAL_ATMEL_MAJOR, + .minor = MINOR_START, + .nr = ATMEL_MAX_UART, +diff -urN linux-2.6.19.old/drivers/serial/crisv10.c linux-2.6.19.dev/drivers/serial/crisv10.c +--- linux-2.6.19.old/drivers/serial/crisv10.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/crisv10.c 2006-12-14 03:12:59.000000000 +0100 +@@ -4877,7 +4877,7 @@ + driver->init_termios = tty_std_termios; + driver->init_termios.c_cflag = + B115200 | CS8 | CREAD | HUPCL | CLOCAL; /* is normally B9600 default... */ +- driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + driver->termios = serial_termios; + driver->termios_locked = serial_termios_locked; + +diff -urN linux-2.6.19.old/drivers/serial/dz.c linux-2.6.19.dev/drivers/serial/dz.c +--- linux-2.6.19.old/drivers/serial/dz.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/dz.c 2006-12-14 03:12:59.000000000 +0100 +@@ -767,7 +767,11 @@ + static struct uart_driver dz_reg = { + .owner = THIS_MODULE, + .driver_name = "serial", ++#ifdef CONFIG_DEVFS ++ .dev_name = "tts/%d", ++#else + .dev_name = "ttyS%d", ++#endif + .major = TTY_MAJOR, + .minor = 64, + .nr = DZ_NB_PORT, +diff -urN linux-2.6.19.old/drivers/serial/imx.c linux-2.6.19.dev/drivers/serial/imx.c +--- linux-2.6.19.old/drivers/serial/imx.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/imx.c 2006-12-14 03:12:59.000000000 +0100 +@@ -887,6 +887,7 @@ + .owner = THIS_MODULE, + .driver_name = DRIVER_NAME, + .dev_name = "ttySMX", ++ .devfs_name = "ttsmx/", + .major = SERIAL_IMX_MAJOR, + .minor = MINOR_START, + .nr = ARRAY_SIZE(imx_ports), +diff -urN linux-2.6.19.old/drivers/serial/ip22zilog.c linux-2.6.19.dev/drivers/serial/ip22zilog.c +--- linux-2.6.19.old/drivers/serial/ip22zilog.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/ip22zilog.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1082,6 +1082,7 @@ + static struct uart_driver ip22zilog_reg = { + .owner = THIS_MODULE, + .driver_name = "serial", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + .minor = 64, +diff -urN linux-2.6.19.old/drivers/serial/m32r_sio.c linux-2.6.19.dev/drivers/serial/m32r_sio.c +--- linux-2.6.19.old/drivers/serial/m32r_sio.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/m32r_sio.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1127,6 +1127,7 @@ + static struct uart_driver m32r_sio_reg = { + .owner = THIS_MODULE, + .driver_name = "sio", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + .minor = 64, +diff -urN linux-2.6.19.old/drivers/serial/mcfserial.c linux-2.6.19.dev/drivers/serial/mcfserial.c +--- linux-2.6.19.old/drivers/serial/mcfserial.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/mcfserial.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1713,6 +1713,7 @@ + /* Initialize the tty_driver structure */ + mcfrs_serial_driver->owner = THIS_MODULE; + mcfrs_serial_driver->name = "ttyS"; ++ mcfrs_serial_driver->devfs_name = "ttys/"; + mcfrs_serial_driver->driver_name = "serial"; + mcfrs_serial_driver->major = TTY_MAJOR; + mcfrs_serial_driver->minor_start = 64; +diff -urN linux-2.6.19.old/drivers/serial/mpc52xx_uart.c linux-2.6.19.dev/drivers/serial/mpc52xx_uart.c +--- linux-2.6.19.old/drivers/serial/mpc52xx_uart.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/mpc52xx_uart.c 2006-12-14 03:12:59.000000000 +0100 +@@ -693,6 +693,7 @@ + .owner = THIS_MODULE, + .driver_name = "mpc52xx_psc_uart", + .dev_name = "ttyPSC", ++ .devfs_name = "ttyPSC", + .major = SERIAL_PSC_MAJOR, + .minor = SERIAL_PSC_MINOR, + .nr = MPC52xx_PSC_MAXNUM, +diff -urN linux-2.6.19.old/drivers/serial/mpsc.c linux-2.6.19.dev/drivers/serial/mpsc.c +--- linux-2.6.19.old/drivers/serial/mpsc.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/mpsc.c 2006-12-14 03:12:59.000000000 +0100 +@@ -314,6 +314,7 @@ + #define MPSC_MAJOR 204 + #define MPSC_MINOR_START 44 + #define MPSC_DRIVER_NAME "MPSC" ++#define MPSC_DEVFS_NAME "ttymm/" + #define MPSC_DEV_NAME "ttyMM" + #define MPSC_VERSION "1.00" + +@@ -1861,6 +1862,7 @@ + static struct uart_driver mpsc_reg = { + .owner = THIS_MODULE, + .driver_name = MPSC_DRIVER_NAME, ++ .devfs_name = MPSC_DEVFS_NAME, + .dev_name = MPSC_DEV_NAME, + .major = MPSC_MAJOR, + .minor = MPSC_MINOR_START, +diff -urN linux-2.6.19.old/drivers/serial/pmac_zilog.c linux-2.6.19.dev/drivers/serial/pmac_zilog.c +--- linux-2.6.19.old/drivers/serial/pmac_zilog.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/pmac_zilog.c 2006-12-14 03:12:59.000000000 +0100 +@@ -100,6 +100,7 @@ + static struct uart_driver pmz_uart_reg = { + .owner = THIS_MODULE, + .driver_name = "ttyS", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + }; +diff -urN linux-2.6.19.old/drivers/serial/pxa.c linux-2.6.19.dev/drivers/serial/pxa.c +--- linux-2.6.19.old/drivers/serial/pxa.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/pxa.c 2006-12-14 03:12:59.000000000 +0100 +@@ -777,6 +777,7 @@ + static struct uart_driver serial_pxa_reg = { + .owner = THIS_MODULE, + .driver_name = "PXA serial", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + .minor = 64, +diff -urN linux-2.6.19.old/drivers/serial/s3c2410.c linux-2.6.19.dev/drivers/serial/s3c2410.c +--- linux-2.6.19.old/drivers/serial/s3c2410.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/s3c2410.c 2006-12-14 03:12:59.000000000 +0100 +@@ -148,6 +148,7 @@ + /* UART name and device definitions */ + + #define S3C24XX_SERIAL_NAME "ttySAC" ++#define S3C24XX_SERIAL_DEVFS "tts/" + #define S3C24XX_SERIAL_MAJOR 204 + #define S3C24XX_SERIAL_MINOR 64 + +@@ -950,6 +951,7 @@ + .nr = 3, + .cons = S3C24XX_SERIAL_CONSOLE, + .driver_name = S3C24XX_SERIAL_NAME, ++ .devfs_name = S3C24XX_SERIAL_DEVFS, + .major = S3C24XX_SERIAL_MAJOR, + .minor = S3C24XX_SERIAL_MINOR, + }; +diff -urN linux-2.6.19.old/drivers/serial/sa1100.c linux-2.6.19.dev/drivers/serial/sa1100.c +--- linux-2.6.19.old/drivers/serial/sa1100.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/sa1100.c 2006-12-14 03:12:59.000000000 +0100 +@@ -815,6 +815,7 @@ + .owner = THIS_MODULE, + .driver_name = "ttySA", + .dev_name = "ttySA", ++ .devfs_name = "ttySA", + .major = SERIAL_SA1100_MAJOR, + .minor = MINOR_START, + .nr = NR_PORTS, +diff -urN linux-2.6.19.old/drivers/serial/serial_core.c linux-2.6.19.dev/drivers/serial/serial_core.c +--- linux-2.6.19.old/drivers/serial/serial_core.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/serial_core.c 2006-12-14 03:12:59.000000000 +0100 +@@ -2182,6 +2182,7 @@ + + normal->owner = drv->owner; + normal->driver_name = drv->driver_name; ++ normal->devfs_name = drv->devfs_name; + normal->name = drv->dev_name; + normal->major = drv->major; + normal->minor_start = drv->minor; +@@ -2189,7 +2190,7 @@ + normal->subtype = SERIAL_TYPE_NORMAL; + normal->init_termios = tty_std_termios; + normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; +- normal->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ normal->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + normal->driver_state = drv; + tty_set_operations(normal, &uart_ops); + +diff -urN linux-2.6.19.old/drivers/serial/serial_txx9.c linux-2.6.19.dev/drivers/serial/serial_txx9.c +--- linux-2.6.19.old/drivers/serial/serial_txx9.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/serial_txx9.c 2006-12-14 03:12:59.000000000 +0100 +@@ -68,10 +68,12 @@ + #if !defined(CONFIG_SERIAL_TXX9_STDSERIAL) + /* "ttyS" is used for standard serial driver */ + #define TXX9_TTY_NAME "ttyTX" ++#define TXX9_TTY_DEVFS_NAME "tttx/" + #define TXX9_TTY_MINOR_START (64 + 64) /* ttyTX0(128), ttyTX1(129) */ + #else + /* acts like standard serial driver */ + #define TXX9_TTY_NAME "ttyS" ++#define TXX9_TTY_DEVFS_NAME "tts/" + #define TXX9_TTY_MINOR_START 64 + #endif + #define TXX9_TTY_MAJOR TTY_MAJOR +@@ -968,6 +970,7 @@ + static struct uart_driver serial_txx9_reg = { + .owner = THIS_MODULE, + .driver_name = "serial_txx9", ++ .devfs_name = TXX9_TTY_DEVFS_NAME, + .dev_name = TXX9_TTY_NAME, + .major = TXX9_TTY_MAJOR, + .minor = TXX9_TTY_MINOR_START, +diff -urN linux-2.6.19.old/drivers/serial/sh-sci.c linux-2.6.19.dev/drivers/serial/sh-sci.c +--- linux-2.6.19.old/drivers/serial/sh-sci.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/sh-sci.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1320,6 +1320,9 @@ + static struct uart_driver sci_uart_driver = { + .owner = THIS_MODULE, + .driver_name = "sci", ++#ifdef CONFIG_DEVFS_FS ++ .devfs_name = "ttsc/", ++#endif + .dev_name = "ttySC", + .major = SCI_MAJOR, + .minor = SCI_MINOR_START, +diff -urN linux-2.6.19.old/drivers/serial/sunhv.c linux-2.6.19.dev/drivers/serial/sunhv.c +--- linux-2.6.19.old/drivers/serial/sunhv.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/sunhv.c 2006-12-14 03:12:59.000000000 +0100 +@@ -353,6 +353,7 @@ + static struct uart_driver sunhv_reg = { + .owner = THIS_MODULE, + .driver_name = "serial", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + }; +diff -urN linux-2.6.19.old/drivers/serial/sunsab.c linux-2.6.19.dev/drivers/serial/sunsab.c +--- linux-2.6.19.old/drivers/serial/sunsab.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/sunsab.c 2006-12-14 03:12:59.000000000 +0100 +@@ -849,6 +849,7 @@ + static struct uart_driver sunsab_reg = { + .owner = THIS_MODULE, + .driver_name = "serial", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + }; +diff -urN linux-2.6.19.old/drivers/serial/sunsu.c linux-2.6.19.dev/drivers/serial/sunsu.c +--- linux-2.6.19.old/drivers/serial/sunsu.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/sunsu.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1175,6 +1175,7 @@ + static struct uart_driver sunsu_reg = { + .owner = THIS_MODULE, + .driver_name = "serial", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + }; +diff -urN linux-2.6.19.old/drivers/serial/sunzilog.c linux-2.6.19.dev/drivers/serial/sunzilog.c +--- linux-2.6.19.old/drivers/serial/sunzilog.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/sunzilog.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1006,6 +1006,7 @@ + static struct uart_driver sunzilog_reg = { + .owner = THIS_MODULE, + .driver_name = "ttyS", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + }; +diff -urN linux-2.6.19.old/drivers/serial/v850e_uart.c linux-2.6.19.dev/drivers/serial/v850e_uart.c +--- linux-2.6.19.old/drivers/serial/v850e_uart.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/v850e_uart.c 2006-12-14 03:12:59.000000000 +0100 +@@ -468,6 +468,7 @@ + static struct uart_driver v850e_uart_driver = { + .owner = THIS_MODULE, + .driver_name = "v850e_uart", ++ .devfs_name = "tts/", + .dev_name = "ttyS", + .major = TTY_MAJOR, + .minor = V850E_UART_MINOR_BASE, +diff -urN linux-2.6.19.old/drivers/serial/vr41xx_siu.c linux-2.6.19.dev/drivers/serial/vr41xx_siu.c +--- linux-2.6.19.old/drivers/serial/vr41xx_siu.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/serial/vr41xx_siu.c 2006-12-14 03:12:59.000000000 +0100 +@@ -910,6 +910,7 @@ + .owner = THIS_MODULE, + .driver_name = "SIU", + .dev_name = "ttyVR", ++ .devfs_name = "ttvr/", + .major = SIU_MAJOR, + .minor = SIU_MINOR_BASE, + .cons = SERIAL_VR41XX_CONSOLE, +diff -urN linux-2.6.19.old/drivers/tc/zs.c linux-2.6.19.dev/drivers/tc/zs.c +--- linux-2.6.19.old/drivers/tc/zs.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/tc/zs.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1744,6 +1744,7 @@ + /* Not all of this is exactly right for us. */ + + serial_driver->owner = THIS_MODULE; ++ serial_driver->devfs_name = "tts/"; + serial_driver->name = "ttyS"; + serial_driver->major = TTY_MAJOR; + serial_driver->minor_start = 64; +@@ -1752,7 +1753,7 @@ + serial_driver->init_termios = tty_std_termios; + serial_driver->init_termios.c_cflag = + B9600 | CS8 | CREAD | HUPCL | CLOCAL; +- serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + tty_set_operations(serial_driver, &serial_ops); + + if (tty_register_driver(serial_driver)) +diff -urN linux-2.6.19.old/drivers/telephony/phonedev.c linux-2.6.19.dev/drivers/telephony/phonedev.c +--- linux-2.6.19.old/drivers/telephony/phonedev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/telephony/phonedev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -28,6 +28,7 @@ + + #include <linux/kmod.h> + #include <linux/sem.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/mutex.h> + + #define PHONE_NUM_DEVICES 256 +@@ -105,6 +106,8 @@ + if (phone_device[i] == NULL) { + phone_device[i] = p; + p->minor = i; ++ devfs_mk_cdev(MKDEV(PHONE_MAJOR,i), ++ S_IFCHR|S_IRUSR|S_IWUSR, "phone/%d", i); + mutex_unlock(&phone_lock); + return 0; + } +@@ -122,6 +125,7 @@ + mutex_lock(&phone_lock); + if (phone_device[pfd->minor] != pfd) + panic("phone: bad unregister"); ++ devfs_remove("phone/%d", pfd->minor); + phone_device[pfd->minor] = NULL; + mutex_unlock(&phone_lock); + } +diff -urN linux-2.6.19.old/drivers/usb/class/cdc-acm.c linux-2.6.19.dev/drivers/usb/class/cdc-acm.c +--- linux-2.6.19.old/drivers/usb/class/cdc-acm.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/usb/class/cdc-acm.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1151,11 +1151,12 @@ + acm_tty_driver->owner = THIS_MODULE, + acm_tty_driver->driver_name = "acm", + acm_tty_driver->name = "ttyACM", ++ acm_tty_driver->devfs_name = "usb/acm/", + acm_tty_driver->major = ACM_TTY_MAJOR, + acm_tty_driver->minor_start = 0, + acm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL, + acm_tty_driver->subtype = SERIAL_TYPE_NORMAL, +- acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ acm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS, + acm_tty_driver->init_termios = tty_std_termios; + acm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; + tty_set_operations(acm_tty_driver, &acm_ops); +diff -urN linux-2.6.19.old/drivers/usb/gadget/serial.c linux-2.6.19.dev/drivers/usb/gadget/serial.c +--- linux-2.6.19.old/drivers/usb/gadget/serial.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/usb/gadget/serial.c 2006-12-14 03:12:59.000000000 +0100 +@@ -587,11 +587,12 @@ + gs_tty_driver->owner = THIS_MODULE; + gs_tty_driver->driver_name = GS_SHORT_NAME; + gs_tty_driver->name = "ttygs"; ++ gs_tty_driver->devfs_name = "usb/ttygs/"; + gs_tty_driver->major = GS_MAJOR; + gs_tty_driver->minor_start = GS_MINOR_START; + gs_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; + gs_tty_driver->subtype = SERIAL_TYPE_NORMAL; +- gs_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ gs_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + gs_tty_driver->init_termios = tty_std_termios; + gs_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; + tty_set_operations(gs_tty_driver, &gs_tty_ops); +diff -urN linux-2.6.19.old/drivers/usb/serial/usb-serial.c linux-2.6.19.dev/drivers/usb/serial/usb-serial.c +--- linux-2.6.19.old/drivers/usb/serial/usb-serial.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/usb/serial/usb-serial.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1055,12 +1055,13 @@ + + usb_serial_tty_driver->owner = THIS_MODULE; + usb_serial_tty_driver->driver_name = "usbserial"; ++ usb_serial_tty_driver->devfs_name = "usb/tts/"; + usb_serial_tty_driver->name = "ttyUSB"; + usb_serial_tty_driver->major = SERIAL_TTY_MAJOR; + usb_serial_tty_driver->minor_start = 0; + usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; + usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL; +- usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + usb_serial_tty_driver->init_termios = tty_std_termios; + usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; + tty_set_operations(usb_serial_tty_driver, &serial_ops); +diff -urN linux-2.6.19.old/drivers/video/fbmem.c linux-2.6.19.dev/drivers/video/fbmem.c +--- linux-2.6.19.old/drivers/video/fbmem.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/drivers/video/fbmem.c 2006-12-14 03:12:59.000000000 +0100 +@@ -31,6 +31,7 @@ + #ifdef CONFIG_KMOD + #include <linux/kmod.h> + #endif ++#include <linux/devfs_fs_kernel.h> + #include <linux/err.h> + #include <linux/device.h> + #include <linux/efi.h> +@@ -1324,6 +1325,8 @@ + fb_add_videomode(&mode, &fb_info->modelist); + registered_fb[i] = fb_info; + ++ devfs_mk_cdev(MKDEV(FB_MAJOR, i), ++ S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i); + event.info = fb_info; + fb_notifier_call_chain(FB_EVENT_FB_REGISTERED, &event); + return 0; +@@ -1349,6 +1352,7 @@ + i = fb_info->node; + if (!registered_fb[i]) + return -EINVAL; ++ devfs_remove("fb/%d", i); + + if (fb_info->pixmap.addr && + (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) +@@ -1400,6 +1404,7 @@ + { + create_proc_read_entry("fb", 0, NULL, fbmem_read_proc, NULL); + ++ devfs_mk_dir("fb"); + if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) + printk("unable to get major %d for fb devs\n", FB_MAJOR); + +diff -urN linux-2.6.19.old/fs/block_dev.c linux-2.6.19.dev/fs/block_dev.c +--- linux-2.6.19.old/fs/block_dev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/block_dev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -11,6 +11,7 @@ + #include <linux/slab.h> + #include <linux/kmod.h> + #include <linux/major.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/smp_lock.h> + #include <linux/highmem.h> + #include <linux/blkdev.h> +diff -urN linux-2.6.19.old/fs/char_dev.c linux-2.6.19.dev/fs/char_dev.c +--- linux-2.6.19.old/fs/char_dev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/char_dev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -13,6 +13,7 @@ + #include <linux/errno.h> + #include <linux/module.h> + #include <linux/smp_lock.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/seq_file.h> + + #include <linux/kobject.h> +diff -urN linux-2.6.19.old/fs/coda/psdev.c linux-2.6.19.dev/fs/coda/psdev.c +--- linux-2.6.19.old/fs/coda/psdev.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/coda/psdev.c 2006-12-14 03:12:59.000000000 +0100 +@@ -28,6 +28,7 @@ + #include <linux/delay.h> + #include <linux/skbuff.h> + #include <linux/proc_fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/vmalloc.h> + #include <linux/fs.h> + #include <linux/file.h> +@@ -364,12 +365,22 @@ + err = PTR_ERR(coda_psdev_class); + goto out_chrdev; + } +- for (i = 0; i < MAX_CODADEVS; i++) ++ devfs_mk_dir ("coda"); ++ for (i = 0; i < MAX_CODADEVS; i++) { + class_device_create(coda_psdev_class, NULL, + MKDEV(CODA_PSDEV_MAJOR,i), NULL, "cfs%d", i); ++ err = devfs_mk_cdev(MKDEV(CODA_PSDEV_MAJOR, i), ++ S_IFCHR|S_IRUSR|S_IWUSR, "coda/%d", i); ++ if (err) ++ goto out_class; ++ } + coda_sysctl_init(); + goto out; + ++out_class: ++ for (i = 0; i < MAX_CODADEVS; i++) ++ class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); ++ class_destroy(coda_psdev_class); + out_chrdev: + unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); + out: +@@ -408,9 +419,12 @@ + } + return 0; + out: +- for (i = 0; i < MAX_CODADEVS; i++) ++ for (i = 0; i < MAX_CODADEVS; i++) { + class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); ++ devfs_remove("coda/%d", i); ++ } + class_destroy(coda_psdev_class); ++ devfs_remove("coda"); + unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); + coda_sysctl_clean(); + out1: +@@ -427,9 +441,12 @@ + if ( err != 0 ) { + printk("coda: failed to unregister filesystem\n"); + } +- for (i = 0; i < MAX_CODADEVS; i++) ++ for (i = 0; i < MAX_CODADEVS; i++) { + class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); ++ devfs_remove("coda/%d", i); ++ } + class_destroy(coda_psdev_class); ++ devfs_remove("coda"); + unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); + coda_sysctl_clean(); + coda_destroy_inodecache(); +diff -urN linux-2.6.19.old/fs/compat_ioctl.c linux-2.6.19.dev/fs/compat_ioctl.c +--- linux-2.6.19.old/fs/compat_ioctl.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/compat_ioctl.c 2006-12-14 03:12:59.000000000 +0100 +@@ -42,6 +42,7 @@ + #include <linux/cdrom.h> + #include <linux/auto_fs.h> + #include <linux/auto_fs4.h> ++#include <linux/devfs_fs.h> + #include <linux/tty.h> + #include <linux/vt_kern.h> + #include <linux/fb.h> +diff -urN linux-2.6.19.old/fs/devfs/base.c linux-2.6.19.dev/fs/devfs/base.c +--- linux-2.6.19.old/fs/devfs/base.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/fs/devfs/base.c 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,2835 @@ ++/* devfs (Device FileSystem) driver. ++ ++ Copyright (C) 1998-2002 Richard Gooch ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library 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 ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with this library; if not, write to the Free ++ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++ Richard Gooch may be reached by email at rgooch@atnf.csiro.au ++ The postal address is: ++ Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. ++ ++ ChangeLog ++ ++ 19980110 Richard Gooch <rgooch@atnf.csiro.au> ++ Original version. ++ v0.1 ++ 19980111 Richard Gooch <rgooch@atnf.csiro.au> ++ Created per-fs inode table rather than using inode->u.generic_ip ++ v0.2 ++ 19980111 Richard Gooch <rgooch@atnf.csiro.au> ++ Created .epoch inode which has a ctime of 0. ++ Fixed loss of named pipes when dentries lost. ++ Fixed loss of inode data when devfs_register() follows mknod(). ++ v0.3 ++ 19980111 Richard Gooch <rgooch@atnf.csiro.au> ++ Fix for when compiling with CONFIG_KERNELD. ++ 19980112 Richard Gooch <rgooch@atnf.csiro.au> ++ Fix for readdir() which sometimes didn't show entries. ++ Added <<tolerant>> option to <devfs_register>. ++ v0.4 ++ 19980113 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_fill_file> function. ++ v0.5 ++ 19980115 Richard Gooch <rgooch@atnf.csiro.au> ++ Added subdirectory support. Major restructuring. ++ 19980116 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed <find_by_dev> to not search major=0,minor=0. ++ Added symlink support. ++ v0.6 ++ 19980120 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_mk_dir> function and support directory unregister ++ 19980120 Richard Gooch <rgooch@atnf.csiro.au> ++ Auto-ownership uses real uid/gid rather than effective uid/gid. ++ v0.7 ++ 19980121 Richard Gooch <rgooch@atnf.csiro.au> ++ Supported creation of sockets. ++ v0.8 ++ 19980122 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFS_FL_HIDE_UNREG flag. ++ Interface change to <devfs_mk_symlink>. ++ Created <devfs_symlink> to support symlink(2). ++ v0.9 ++ 19980123 Richard Gooch <rgooch@atnf.csiro.au> ++ Added check to <devfs_fill_file> to check inode is in devfs. ++ Added optional traversal of symlinks. ++ v0.10 ++ 19980124 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_get_flags> and <devfs_set_flags>. ++ v0.11 ++ 19980125 C. Scott Ananian <cananian@alumni.princeton.edu> ++ Created <devfs_find_handle>. ++ 19980125 Richard Gooch <rgooch@atnf.csiro.au> ++ Allow removal of symlinks. ++ v0.12 ++ 19980125 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_set_symlink_destination>. ++ 19980126 Richard Gooch <rgooch@atnf.csiro.au> ++ Moved DEVFS_SUPER_MAGIC into header file. ++ Added DEVFS_FL_HIDE flag. ++ Created <devfs_get_maj_min>. ++ Created <devfs_get_handle_from_inode>. ++ Fixed minor bug in <find_by_dev>. ++ 19980127 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed interface to <find_by_dev>, <find_entry>, ++ <devfs_unregister>, <devfs_fill_file> and <devfs_find_handle>. ++ Fixed inode times when symlink created with symlink(2). ++ v0.13 ++ 19980129 C. Scott Ananian <cananian@alumni.princeton.edu> ++ Exported <devfs_set_symlink_destination>, <devfs_get_maj_min> ++ and <devfs_get_handle_from_inode>. ++ 19980129 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_unlink> to support unlink(2). ++ v0.14 ++ 19980129 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed kerneld support for entries in devfs subdirectories. ++ 19980130 Richard Gooch <rgooch@atnf.csiro.au> ++ Bugfixes in <call_kerneld>. ++ v0.15 ++ 19980207 Richard Gooch <rgooch@atnf.csiro.au> ++ Call kerneld when looking up unregistered entries. ++ v0.16 ++ 19980326 Richard Gooch <rgooch@atnf.csiro.au> ++ Modified interface to <devfs_find_handle> for symlink traversal. ++ v0.17 ++ 19980331 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed persistence bug with device numbers for manually created ++ device files. ++ Fixed problem with recreating symlinks with different content. ++ v0.18 ++ 19980401 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed to CONFIG_KMOD. ++ Hide entries which are manually unlinked. ++ Always invalidate devfs dentry cache when registering entries. ++ Created <devfs_rmdir> to support rmdir(2). ++ Ensure directories created by <devfs_mk_dir> are visible. ++ v0.19 ++ 19980402 Richard Gooch <rgooch@atnf.csiro.au> ++ Invalidate devfs dentry cache when making directories. ++ Invalidate devfs dentry cache when removing entries. ++ Fixed persistence bug with fifos. ++ v0.20 ++ 19980421 Richard Gooch <rgooch@atnf.csiro.au> ++ Print process command when debugging kerneld/kmod. ++ Added debugging for register/unregister/change operations. ++ 19980422 Richard Gooch <rgooch@atnf.csiro.au> ++ Added "devfs=" boot options. ++ v0.21 ++ 19980426 Richard Gooch <rgooch@atnf.csiro.au> ++ No longer lock/unlock superblock in <devfs_put_super>. ++ Drop negative dentries when they are released. ++ Manage dcache more efficiently. ++ v0.22 ++ 19980427 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFS_FL_AUTO_DEVNUM flag. ++ v0.23 ++ 19980430 Richard Gooch <rgooch@atnf.csiro.au> ++ No longer set unnecessary methods. ++ v0.24 ++ 19980504 Richard Gooch <rgooch@atnf.csiro.au> ++ Added PID display to <call_kerneld> debugging message. ++ Added "after" debugging message to <call_kerneld>. ++ 19980519 Richard Gooch <rgooch@atnf.csiro.au> ++ Added "diread" and "diwrite" boot options. ++ 19980520 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed persistence problem with permissions. ++ v0.25 ++ 19980602 Richard Gooch <rgooch@atnf.csiro.au> ++ Support legacy device nodes. ++ Fixed bug where recreated inodes were hidden. ++ v0.26 ++ 19980602 Richard Gooch <rgooch@atnf.csiro.au> ++ Improved debugging in <get_vfs_inode>. ++ 19980607 Richard Gooch <rgooch@atnf.csiro.au> ++ No longer free old dentries in <devfs_mk_dir>. ++ Free all dentries for a given entry when deleting inodes. ++ v0.27 ++ 19980627 Richard Gooch <rgooch@atnf.csiro.au> ++ Limit auto-device numbering to majors 128 to 239. ++ v0.28 ++ 19980629 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed inode times persistence problem. ++ v0.29 ++ 19980704 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed spelling in <devfs_readlink> debug. ++ Fixed bug in <devfs_setup> parsing "dilookup". ++ v0.30 ++ 19980705 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed devfs inode leak when manually recreating inodes. ++ Fixed permission persistence problem when recreating inodes. ++ v0.31 ++ 19980727 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed harmless "unused variable" compiler warning. ++ Fixed modes for manually recreated device nodes. ++ v0.32 ++ 19980728 Richard Gooch <rgooch@atnf.csiro.au> ++ Added NULL devfs inode warning in <devfs_read_inode>. ++ Force all inode nlink values to 1. ++ v0.33 ++ 19980730 Richard Gooch <rgooch@atnf.csiro.au> ++ Added "dimknod" boot option. ++ Set inode nlink to 0 when freeing dentries. ++ Fixed modes for manually recreated symlinks. ++ v0.34 ++ 19980802 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bugs in recreated directories and symlinks. ++ v0.35 ++ 19980806 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bugs in recreated device nodes. ++ 19980807 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bug in currently unused <devfs_get_handle_from_inode>. ++ Defined new <devfs_handle_t> type. ++ Improved debugging when getting entries. ++ Fixed bug where directories could be emptied. ++ v0.36 ++ 19980809 Richard Gooch <rgooch@atnf.csiro.au> ++ Replaced dummy .epoch inode with .devfsd character device. ++ 19980810 Richard Gooch <rgooch@atnf.csiro.au> ++ Implemented devfsd protocol revision 0. ++ v0.37 ++ 19980819 Richard Gooch <rgooch@atnf.csiro.au> ++ Added soothing message to warning in <devfs_d_iput>. ++ v0.38 ++ 19980829 Richard Gooch <rgooch@atnf.csiro.au> ++ Use GCC extensions for structure initialisations. ++ Implemented async open notification. ++ Incremented devfsd protocol revision to 1. ++ v0.39 ++ 19980908 Richard Gooch <rgooch@atnf.csiro.au> ++ Moved async open notification to end of <devfs_open>. ++ v0.40 ++ 19980910 Richard Gooch <rgooch@atnf.csiro.au> ++ Prepended "/dev/" to module load request. ++ Renamed <call_kerneld> to <call_kmod>. ++ v0.41 ++ 19980910 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed typo "AYSNC" -> "ASYNC". ++ v0.42 ++ 19980910 Richard Gooch <rgooch@atnf.csiro.au> ++ Added open flag for files. ++ v0.43 ++ 19980927 Richard Gooch <rgooch@atnf.csiro.au> ++ Set i_blocks=0 and i_blksize=1024 in <devfs_read_inode>. ++ v0.44 ++ 19981005 Richard Gooch <rgooch@atnf.csiro.au> ++ Added test for empty <<name>> in <devfs_find_handle>. ++ Renamed <generate_path> to <devfs_generate_path> and published. ++ v0.45 ++ 19981006 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_get_fops>. ++ v0.46 ++ 19981007 Richard Gooch <rgooch@atnf.csiro.au> ++ Limit auto-device numbering to majors 144 to 239. ++ v0.47 ++ 19981010 Richard Gooch <rgooch@atnf.csiro.au> ++ Updated <devfs_follow_link> for VFS change in 2.1.125. ++ v0.48 ++ 19981022 Richard Gooch <rgooch@atnf.csiro.au> ++ Created DEVFS_ FL_COMPAT flag. ++ v0.49 ++ 19981023 Richard Gooch <rgooch@atnf.csiro.au> ++ Created "nocompat" boot option. ++ v0.50 ++ 19981025 Richard Gooch <rgooch@atnf.csiro.au> ++ Replaced "mount" boot option with "nomount". ++ v0.51 ++ 19981110 Richard Gooch <rgooch@atnf.csiro.au> ++ Created "only" boot option. ++ v0.52 ++ 19981112 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFS_FL_REMOVABLE flag. ++ v0.53 ++ 19981114 Richard Gooch <rgooch@atnf.csiro.au> ++ Only call <scan_dir_for_removable> on first call to ++ <devfs_readdir>. ++ v0.54 ++ 19981205 Richard Gooch <rgooch@atnf.csiro.au> ++ Updated <devfs_rmdir> for VFS change in 2.1.131. ++ v0.55 ++ 19981218 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_mk_compat>. ++ 19981220 Richard Gooch <rgooch@atnf.csiro.au> ++ Check for partitions on removable media in <devfs_lookup>. ++ v0.56 ++ 19990118 Richard Gooch <rgooch@atnf.csiro.au> ++ Added support for registering regular files. ++ Created <devfs_set_file_size>. ++ Update devfs inodes from entries if not changed through FS. ++ v0.57 ++ 19990124 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed <devfs_fill_file> to only initialise temporary inodes. ++ Trap for NULL fops in <devfs_register>. ++ Return -ENODEV in <devfs_fill_file> for non-driver inodes. ++ v0.58 ++ 19990126 Richard Gooch <rgooch@atnf.csiro.au> ++ Switched from PATH_MAX to DEVFS_PATHLEN. ++ v0.59 ++ 19990127 Richard Gooch <rgooch@atnf.csiro.au> ++ Created "nottycompat" boot option. ++ v0.60 ++ 19990318 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed <devfsd_read> to not overrun event buffer. ++ v0.61 ++ 19990329 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_auto_unregister>. ++ v0.62 ++ 19990330 Richard Gooch <rgooch@atnf.csiro.au> ++ Don't return unregistred entries in <devfs_find_handle>. ++ Panic in <devfs_unregister> if entry unregistered. ++ 19990401 Richard Gooch <rgooch@atnf.csiro.au> ++ Don't panic in <devfs_auto_unregister> for duplicates. ++ v0.63 ++ 19990402 Richard Gooch <rgooch@atnf.csiro.au> ++ Don't unregister already unregistered entries in <unregister>. ++ v0.64 ++ 19990510 Richard Gooch <rgooch@atnf.csiro.au> ++ Disable warning messages when unable to read partition table for ++ removable media. ++ v0.65 ++ 19990512 Richard Gooch <rgooch@atnf.csiro.au> ++ Updated <devfs_lookup> for VFS change in 2.3.1-pre1. ++ Created "oops-on-panic" boot option. ++ Improved debugging in <devfs_register> and <devfs_unregister>. ++ v0.66 ++ 19990519 Richard Gooch <rgooch@atnf.csiro.au> ++ Added documentation for some functions. ++ 19990525 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed "oops-on-panic" boot option: now always Oops. ++ v0.67 ++ 19990531 Richard Gooch <rgooch@atnf.csiro.au> ++ Improved debugging in <devfs_register>. ++ v0.68 ++ 19990604 Richard Gooch <rgooch@atnf.csiro.au> ++ Added "diunlink" and "nokmod" boot options. ++ Removed superfluous warning message in <devfs_d_iput>. ++ v0.69 ++ 19990611 Richard Gooch <rgooch@atnf.csiro.au> ++ Took account of change to <d_alloc_root>. ++ v0.70 ++ 19990614 Richard Gooch <rgooch@atnf.csiro.au> ++ Created separate event queue for each mounted devfs. ++ Removed <devfs_invalidate_dcache>. ++ Created new ioctl()s. ++ Incremented devfsd protocol revision to 3. ++ Fixed bug when re-creating directories: contents were lost. ++ Block access to inodes until devfsd updates permissions. ++ 19990615 Richard Gooch <rgooch@atnf.csiro.au> ++ Support 2.2.x kernels. ++ v0.71 ++ 19990623 Richard Gooch <rgooch@atnf.csiro.au> ++ Switched to sending process uid/gid to devfsd. ++ Renamed <call_kmod> to <try_modload>. ++ Added DEVFSD_NOTIFY_LOOKUP event. ++ 19990624 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFSD_NOTIFY_CHANGE event. ++ Incremented devfsd protocol revision to 4. ++ v0.72 ++ 19990713 Richard Gooch <rgooch@atnf.csiro.au> ++ Return EISDIR rather than EINVAL for read(2) on directories. ++ v0.73 ++ 19990809 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed <devfs_setup> to new __init scheme. ++ v0.74 ++ 19990901 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed remaining function declarations to new __init scheme. ++ v0.75 ++ 19991013 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_get_info>, <devfs_set_info>, ++ <devfs_get_first_child> and <devfs_get_next_sibling>. ++ Added <<dir>> parameter to <devfs_register>, <devfs_mk_compat>, ++ <devfs_mk_dir> and <devfs_find_handle>. ++ Work sponsored by SGI. ++ v0.76 ++ 19991017 Richard Gooch <rgooch@atnf.csiro.au> ++ Allow multiple unregistrations. ++ Work sponsored by SGI. ++ v0.77 ++ 19991026 Richard Gooch <rgooch@atnf.csiro.au> ++ Added major and minor number to devfsd protocol. ++ Incremented devfsd protocol revision to 5. ++ Work sponsored by SGI. ++ v0.78 ++ 19991030 Richard Gooch <rgooch@atnf.csiro.au> ++ Support info pointer for all devfs entry types. ++ Added <<info>> parameter to <devfs_mk_dir> and ++ <devfs_mk_symlink>. ++ Work sponsored by SGI. ++ v0.79 ++ 19991031 Richard Gooch <rgooch@atnf.csiro.au> ++ Support "../" when searching devfs namespace. ++ Work sponsored by SGI. ++ v0.80 ++ 19991101 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_get_unregister_slave>. ++ Work sponsored by SGI. ++ v0.81 ++ 19991103 Richard Gooch <rgooch@atnf.csiro.au> ++ Exported <devfs_get_parent>. ++ Work sponsored by SGI. ++ v0.82 ++ 19991104 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed unused <devfs_set_symlink_destination>. ++ 19991105 Richard Gooch <rgooch@atnf.csiro.au> ++ Do not hide entries from devfsd or children. ++ Removed DEVFS_ FL_TTY_COMPAT flag. ++ Removed "nottycompat" boot option. ++ Removed <devfs_mk_compat>. ++ Work sponsored by SGI. ++ v0.83 ++ 19991107 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFS_FL_WAIT flag. ++ Work sponsored by SGI. ++ v0.84 ++ 19991107 Richard Gooch <rgooch@atnf.csiro.au> ++ Support new "disc" naming scheme in <get_removable_partition>. ++ Allow NULL fops in <devfs_register>. ++ Work sponsored by SGI. ++ v0.85 ++ 19991110 Richard Gooch <rgooch@atnf.csiro.au> ++ Fall back to major table if NULL fops given to <devfs_register>. ++ Work sponsored by SGI. ++ v0.86 ++ 19991204 Richard Gooch <rgooch@atnf.csiro.au> ++ Support fifos when unregistering. ++ Work sponsored by SGI. ++ v0.87 ++ 19991209 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed obsolete DEVFS_ FL_COMPAT and DEVFS_ FL_TOLERANT flags. ++ Work sponsored by SGI. ++ v0.88 ++ 19991214 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed kmod support. ++ Work sponsored by SGI. ++ v0.89 ++ 19991216 Richard Gooch <rgooch@atnf.csiro.au> ++ Improved debugging in <get_vfs_inode>. ++ Ensure dentries created by devfsd will be cleaned up. ++ Work sponsored by SGI. ++ v0.90 ++ 19991223 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_get_name>. ++ Work sponsored by SGI. ++ v0.91 ++ 20000203 Richard Gooch <rgooch@atnf.csiro.au> ++ Ported to kernel 2.3.42. ++ Removed <devfs_fill_file>. ++ Work sponsored by SGI. ++ v0.92 ++ 20000306 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFS_ FL_NO_PERSISTENCE flag. ++ Removed unnecessary call to <update_devfs_inode_from_entry> in ++ <devfs_readdir>. ++ Work sponsored by SGI. ++ v0.93 ++ 20000413 Richard Gooch <rgooch@atnf.csiro.au> ++ Set inode->i_size to correct size for symlinks. ++ 20000414 Richard Gooch <rgooch@atnf.csiro.au> ++ Only give lookup() method to directories to comply with new VFS ++ assumptions. ++ Work sponsored by SGI. ++ 20000415 Richard Gooch <rgooch@atnf.csiro.au> ++ Remove unnecessary tests in symlink methods. ++ Don't kill existing block ops in <devfs_read_inode>. ++ Work sponsored by SGI. ++ v0.94 ++ 20000424 Richard Gooch <rgooch@atnf.csiro.au> ++ Don't create missing directories in <devfs_find_handle>. ++ Work sponsored by SGI. ++ v0.95 ++ 20000430 Richard Gooch <rgooch@atnf.csiro.au> ++ Added CONFIG_DEVFS_MOUNT. ++ Work sponsored by SGI. ++ v0.96 ++ 20000608 Richard Gooch <rgooch@atnf.csiro.au> ++ Disabled multi-mount capability (use VFS bindings instead). ++ Work sponsored by SGI. ++ v0.97 ++ 20000610 Richard Gooch <rgooch@atnf.csiro.au> ++ Switched to FS_SINGLE to disable multi-mounts. ++ 20000612 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed module support. ++ Removed multi-mount code. ++ Removed compatibility macros: VFS has changed too much. ++ Work sponsored by SGI. ++ v0.98 ++ 20000614 Richard Gooch <rgooch@atnf.csiro.au> ++ Merged devfs inode into devfs entry. ++ Work sponsored by SGI. ++ v0.99 ++ 20000619 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed dead code in <devfs_register> which used to call ++ <free_dentries>. ++ Work sponsored by SGI. ++ v0.100 ++ 20000621 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed interface to <devfs_register>. ++ Work sponsored by SGI. ++ v0.101 ++ 20000622 Richard Gooch <rgooch@atnf.csiro.au> ++ Simplified interface to <devfs_mk_symlink> and <devfs_mk_dir>. ++ Simplified interface to <devfs_find_handle>. ++ Work sponsored by SGI. ++ v0.102 ++ 20010519 Richard Gooch <rgooch@atnf.csiro.au> ++ Ensure <devfs_generate_path> terminates string for root entry. ++ Exported <devfs_get_name> to modules. ++ 20010520 Richard Gooch <rgooch@atnf.csiro.au> ++ Make <devfs_mk_symlink> send events to devfsd. ++ Cleaned up option processing in <devfs_setup>. ++ 20010521 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bugs in handling symlinks: could leak or cause Oops. ++ 20010522 Richard Gooch <rgooch@atnf.csiro.au> ++ Cleaned up directory handling by separating fops. ++ v0.103 ++ 20010601 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed handling of inverted options in <devfs_setup>. ++ v0.104 ++ 20010604 Richard Gooch <rgooch@atnf.csiro.au> ++ Adjusted <try_modload> to account for <devfs_generate_path> fix. ++ v0.105 ++ 20010617 Richard Gooch <rgooch@atnf.csiro.au> ++ Answered question posed by Al Viro and removed his comments. ++ Moved setting of registered flag after other fields are changed. ++ Fixed race between <devfsd_close> and <devfsd_notify_one>. ++ Global VFS changes added bogus BKL to <devfsd_close>: removed. ++ Widened locking in <devfs_readlink> and <devfs_follow_link>. ++ Replaced <devfsd_read> stack usage with <devfsd_ioctl> kmalloc. ++ Simplified locking in <devfsd_ioctl> and fixed memory leak. ++ v0.106 ++ 20010709 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed broken devnum allocation and use <devfs_alloc_devnum>. ++ Fixed old devnum leak by calling new <devfs_dealloc_devnum>. ++ v0.107 ++ 20010712 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bug in <devfs_setup> which could hang boot process. ++ v0.108 ++ 20010730 Richard Gooch <rgooch@atnf.csiro.au> ++ Added DEVFSD_NOTIFY_DELETE event. ++ 20010801 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed #include <asm/segment.h>. ++ v0.109 ++ 20010807 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed inode table races by removing it and using ++ inode->u.generic_ip instead. ++ Moved <devfs_read_inode> into <get_vfs_inode>. ++ Moved <devfs_write_inode> into <devfs_notify_change>. ++ v0.110 ++ 20010808 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed race in <devfs_do_symlink> for uni-processor. ++ v0.111 ++ 20010818 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed remnant of multi-mount support in <devfs_mknod>. ++ Removed unused DEVFS_FL_SHOW_UNREG flag. ++ v0.112 ++ 20010820 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed nlink field from struct devfs_inode. ++ v0.113 ++ 20010823 Richard Gooch <rgooch@atnf.csiro.au> ++ Replaced BKL with global rwsem to protect symlink data (quick ++ and dirty hack). ++ v0.114 ++ 20010827 Richard Gooch <rgooch@atnf.csiro.au> ++ Replaced global rwsem for symlink with per-link refcount. ++ v0.115 ++ 20010919 Richard Gooch <rgooch@atnf.csiro.au> ++ Set inode->i_mapping->a_ops for block nodes in <get_vfs_inode>. ++ v0.116 ++ 20011008 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed overrun in <devfs_link> by removing function (not needed). ++ 20011009 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed buffer underrun in <try_modload>. ++ 20011029 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed race in <devfsd_ioctl> when setting event mask. ++ 20011114 Richard Gooch <rgooch@atnf.csiro.au> ++ First release of new locking code. ++ v1.0 ++ 20011117 Richard Gooch <rgooch@atnf.csiro.au> ++ Discard temporary buffer, now use "%s" for dentry names. ++ 20011118 Richard Gooch <rgooch@atnf.csiro.au> ++ Don't generate path in <try_modload>: use fake entry instead. ++ Use "existing" directory in <_devfs_make_parent_for_leaf>. ++ 20011122 Richard Gooch <rgooch@atnf.csiro.au> ++ Use slab cache rather than fixed buffer for devfsd events. ++ v1.1 ++ 20011125 Richard Gooch <rgooch@atnf.csiro.au> ++ Send DEVFSD_NOTIFY_REGISTERED events in <devfs_mk_dir>. ++ 20011127 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed locking bug in <devfs_d_revalidate_wait> due to typo. ++ Do not send CREATE, CHANGE, ASYNC_OPEN or DELETE events from ++ devfsd or children. ++ v1.2 ++ 20011202 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bug in <devfsd_read>: was dereferencing freed pointer. ++ v1.3 ++ 20011203 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bug in <devfsd_close>: was dereferencing freed pointer. ++ Added process group check for devfsd privileges. ++ v1.4 ++ 20011204 Richard Gooch <rgooch@atnf.csiro.au> ++ Use SLAB_ATOMIC in <devfsd_notify_de> from <devfs_d_delete>. ++ v1.5 ++ 20011211 Richard Gooch <rgooch@atnf.csiro.au> ++ Return old entry in <devfs_mk_dir> for 2.4.x kernels. ++ 20011212 Richard Gooch <rgooch@atnf.csiro.au> ++ Increment refcount on module in <check_disc_changed>. ++ 20011215 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_get_handle> and exported <devfs_put>. ++ Increment refcount on module in <devfs_get_ops>. ++ Created <devfs_put_ops>. ++ v1.6 ++ 20011216 Richard Gooch <rgooch@atnf.csiro.au> ++ Added poisoning to <devfs_put>. ++ Improved debugging messages. ++ v1.7 ++ 20011221 Richard Gooch <rgooch@atnf.csiro.au> ++ Corrected (made useful) debugging message in <unregister>. ++ Moved <kmem_cache_create> in <mount_devfs_fs> to <init_devfs_fs> ++ 20011224 Richard Gooch <rgooch@atnf.csiro.au> ++ Added magic number to guard against scribbling drivers. ++ 20011226 Richard Gooch <rgooch@atnf.csiro.au> ++ Only return old entry in <devfs_mk_dir> if a directory. ++ Defined macros for error and debug messages. ++ v1.8 ++ 20020113 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed (rare, old) race in <devfs_lookup>. ++ v1.9 ++ 20020120 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed deadlock bug in <devfs_d_revalidate_wait>. ++ Tag VFS deletable in <devfs_mk_symlink> if handle ignored. ++ v1.10 ++ 20020129 Richard Gooch <rgooch@atnf.csiro.au> ++ Added KERN_* to remaining messages. ++ Cleaned up declaration of <stat_read>. ++ v1.11 ++ 20020219 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed <devfs_rmdir> to allow later additions if not yet empty. ++ v1.12 ++ 20020406 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed silently introduced calls to lock_kernel() and ++ unlock_kernel() due to recent VFS locking changes. BKL isn't ++ required in devfs. ++ v1.13 ++ 20020428 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed 2.4.x compatibility code. ++ v1.14 ++ 20020510 Richard Gooch <rgooch@atnf.csiro.au> ++ Added BKL to <devfs_open> because drivers still need it. ++ v1.15 ++ 20020512 Richard Gooch <rgooch@atnf.csiro.au> ++ Protected <scan_dir_for_removable> and <get_removable_partition> ++ from changing directory contents. ++ v1.16 ++ 20020514 Richard Gooch <rgooch@atnf.csiro.au> ++ Minor cleanup of <scan_dir_for_removable>. ++ v1.17 ++ 20020721 Richard Gooch <rgooch@atnf.csiro.au> ++ Switched to ISO C structure field initialisers. ++ Switch to set_current_state() and move before add_wait_queue(). ++ 20020722 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed devfs entry leak in <devfs_readdir> when *readdir fails. ++ v1.18 ++ 20020725 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_find_and_unregister>. ++ v1.19 ++ 20020728 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed deprecated <devfs_find_handle>. ++ v1.20 ++ 20020820 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed module unload race in <devfs_open>. ++ v1.21 ++ 20021013 Richard Gooch <rgooch@atnf.csiro.au> ++ Removed DEVFS_ FL_AUTO_OWNER. ++ Switched lingering structure field initialiser to ISO C. ++ Added locking when updating FCB flags. ++ v1.22 ++*/ ++#include <linux/types.h> ++#include <linux/errno.h> ++#include <linux/time.h> ++#include <linux/tty.h> ++#include <linux/timer.h> ++#include <linux/autoconf.h> ++#include <linux/kernel.h> ++#include <linux/wait.h> ++#include <linux/string.h> ++#include <linux/slab.h> ++#include <linux/ioport.h> ++#include <linux/delay.h> ++#include <linux/ctype.h> ++#include <linux/mm.h> ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/devfs_fs.h> ++#include <linux/devfs_fs_kernel.h> ++#include <linux/smp_lock.h> ++#include <linux/smp.h> ++#include <linux/rwsem.h> ++#include <linux/sched.h> ++#include <linux/namei.h> ++#include <linux/bitops.h> ++ ++#include <asm/uaccess.h> ++#include <asm/io.h> ++#include <asm/processor.h> ++#include <asm/system.h> ++#include <asm/pgtable.h> ++#include <asm/atomic.h> ++ ++#define DEVFS_VERSION "2004-01-31" ++ ++#define DEVFS_NAME "devfs" ++ ++#define FIRST_INODE 1 ++ ++#define STRING_LENGTH 256 ++#define FAKE_BLOCK_SIZE 1024 ++#define POISON_PTR ( *(void **) poison_array ) ++#define MAGIC_VALUE 0x327db823 ++ ++#ifndef TRUE ++# define TRUE 1 ++# define FALSE 0 ++#endif ++ ++#define MODE_DIR (S_IFDIR | S_IWUSR | S_IRUGO | S_IXUGO) ++ ++#define DEBUG_NONE 0x0000000 ++#define DEBUG_MODULE_LOAD 0x0000001 ++#define DEBUG_REGISTER 0x0000002 ++#define DEBUG_UNREGISTER 0x0000004 ++#define DEBUG_FREE 0x0000008 ++#define DEBUG_SET_FLAGS 0x0000010 ++#define DEBUG_S_READ 0x0000100 /* Break */ ++#define DEBUG_I_LOOKUP 0x0001000 /* Break */ ++#define DEBUG_I_CREATE 0x0002000 ++#define DEBUG_I_GET 0x0004000 ++#define DEBUG_I_CHANGE 0x0008000 ++#define DEBUG_I_UNLINK 0x0010000 ++#define DEBUG_I_RLINK 0x0020000 ++#define DEBUG_I_FLINK 0x0040000 ++#define DEBUG_I_MKNOD 0x0080000 ++#define DEBUG_F_READDIR 0x0100000 /* Break */ ++#define DEBUG_D_DELETE 0x1000000 /* Break */ ++#define DEBUG_D_RELEASE 0x2000000 ++#define DEBUG_D_IPUT 0x4000000 ++#define DEBUG_ALL 0xfffffff ++#define DEBUG_DISABLED DEBUG_NONE ++ ++#define OPTION_NONE 0x00 ++#define OPTION_MOUNT 0x01 ++ ++#define PRINTK(format, args...) \ ++ {printk (KERN_ERR "%s" format, __FUNCTION__ , ## args);} ++ ++#define OOPS(format, args...) \ ++ {printk (KERN_CRIT "%s" format, __FUNCTION__ , ## args); \ ++ printk ("Forcing Oops\n"); \ ++ BUG();} ++ ++#ifdef CONFIG_DEVFS_DEBUG ++# define VERIFY_ENTRY(de) \ ++ {if ((de) && (de)->magic_number != MAGIC_VALUE) \ ++ OOPS ("(%p): bad magic value: %x\n", (de), (de)->magic_number);} ++# define WRITE_ENTRY_MAGIC(de,magic) (de)->magic_number = (magic) ++# define DPRINTK(flag, format, args...) \ ++ {if (devfs_debug & flag) \ ++ printk (KERN_INFO "%s" format, __FUNCTION__ , ## args);} ++#else ++# define VERIFY_ENTRY(de) ++# define WRITE_ENTRY_MAGIC(de,magic) ++# define DPRINTK(flag, format, args...) ++#endif ++ ++typedef struct devfs_entry *devfs_handle_t; ++ ++struct directory_type { ++ rwlock_t lock; /* Lock for searching(R)/updating(W) */ ++ struct devfs_entry *first; ++ struct devfs_entry *last; ++ unsigned char no_more_additions:1; ++}; ++ ++struct symlink_type { ++ unsigned int length; /* Not including the NULL-termimator */ ++ char *linkname; /* This is NULL-terminated */ ++}; ++ ++struct devfs_inode { /* This structure is for "persistent" inode storage */ ++ struct dentry *dentry; ++ struct timespec atime; ++ struct timespec mtime; ++ struct timespec ctime; ++ unsigned int ino; /* Inode number as seen in the VFS */ ++ uid_t uid; ++ gid_t gid; ++}; ++ ++struct devfs_entry { ++#ifdef CONFIG_DEVFS_DEBUG ++ unsigned int magic_number; ++#endif ++ void *info; ++ atomic_t refcount; /* When this drops to zero, it's unused */ ++ union { ++ struct directory_type dir; ++ dev_t dev; ++ struct symlink_type symlink; ++ const char *name; /* Only used for (mode == 0) */ ++ } u; ++ struct devfs_entry *prev; /* Previous entry in the parent directory */ ++ struct devfs_entry *next; /* Next entry in the parent directory */ ++ struct devfs_entry *parent; /* The parent directory */ ++ struct devfs_inode inode; ++ umode_t mode; ++ unsigned short namelen; /* I think 64k+ filenames are a way off... */ ++ unsigned char vfs:1; /* Whether the VFS may delete the entry */ ++ char name[1]; /* This is just a dummy: the allocated array ++ is bigger. This is NULL-terminated */ ++}; ++ ++/* The root of the device tree */ ++static struct devfs_entry *root_entry; ++ ++struct devfsd_buf_entry { ++ struct devfs_entry *de; /* The name is generated with this */ ++ unsigned short type; /* The type of event */ ++ umode_t mode; ++ uid_t uid; ++ gid_t gid; ++ struct devfsd_buf_entry *next; ++}; ++ ++struct fs_info { /* This structure is for the mounted devfs */ ++ struct super_block *sb; ++ spinlock_t devfsd_buffer_lock; /* Lock when inserting/deleting events */ ++ struct devfsd_buf_entry *devfsd_first_event; ++ struct devfsd_buf_entry *devfsd_last_event; ++ volatile int devfsd_sleeping; ++ volatile struct task_struct *devfsd_task; ++ volatile pid_t devfsd_pgrp; ++ volatile struct file *devfsd_file; ++ struct devfsd_notify_struct *devfsd_info; ++ volatile unsigned long devfsd_event_mask; ++ atomic_t devfsd_overrun_count; ++ wait_queue_head_t devfsd_wait_queue; /* Wake devfsd on input */ ++ wait_queue_head_t revalidate_wait_queue; /* Wake when devfsd sleeps */ ++}; ++ ++static struct fs_info fs_info = {.devfsd_buffer_lock = SPIN_LOCK_UNLOCKED }; ++static kmem_cache_t *devfsd_buf_cache; ++#ifdef CONFIG_DEVFS_DEBUG ++static unsigned int devfs_debug_init __initdata = DEBUG_NONE; ++static unsigned int devfs_debug = DEBUG_NONE; ++static DEFINE_SPINLOCK(stat_lock); ++static unsigned int stat_num_entries; ++static unsigned int stat_num_bytes; ++#endif ++static unsigned char poison_array[8] = ++ { 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a, 0x5a }; ++ ++#ifdef CONFIG_DEVFS_MOUNT ++static unsigned int boot_options = OPTION_MOUNT; ++#else ++static unsigned int boot_options = OPTION_NONE; ++#endif ++ ++/* Forward function declarations */ ++static devfs_handle_t _devfs_walk_path(struct devfs_entry *dir, ++ const char *name, int namelen, ++ int traverse_symlink); ++static ssize_t devfsd_read(struct file *file, char __user *buf, size_t len, ++ loff_t * ppos); ++static int devfsd_ioctl(struct inode *inode, struct file *file, ++ unsigned int cmd, unsigned long arg); ++static int devfsd_close(struct inode *inode, struct file *file); ++#ifdef CONFIG_DEVFS_DEBUG ++static ssize_t stat_read(struct file *file, char __user *buf, size_t len, ++ loff_t * ppos); ++static const struct file_operations stat_fops = { ++ .open = nonseekable_open, ++ .read = stat_read, ++}; ++#endif ++ ++/* Devfs daemon file operations */ ++static const struct file_operations devfsd_fops = { ++ .open = nonseekable_open, ++ .read = devfsd_read, ++ .ioctl = devfsd_ioctl, ++ .release = devfsd_close, ++}; ++ ++/* Support functions follow */ ++ ++/** ++ * devfs_get - Get a reference to a devfs entry. ++ * @de: The devfs entry. ++ */ ++ ++static struct devfs_entry *devfs_get(struct devfs_entry *de) ++{ ++ VERIFY_ENTRY(de); ++ if (de) ++ atomic_inc(&de->refcount); ++ return de; ++} /* End Function devfs_get */ ++ ++/** ++ * devfs_put - Put (release) a reference to a devfs entry. ++ * @de: The handle to the devfs entry. ++ */ ++ ++static void devfs_put(devfs_handle_t de) ++{ ++ if (!de) ++ return; ++ VERIFY_ENTRY(de); ++ if (de->info == POISON_PTR) ++ OOPS("(%p): poisoned pointer\n", de); ++ if (!atomic_dec_and_test(&de->refcount)) ++ return; ++ if (de == root_entry) ++ OOPS("(%p): root entry being freed\n", de); ++ DPRINTK(DEBUG_FREE, "(%s): de: %p, parent: %p \"%s\"\n", ++ de->name, de, de->parent, ++ de->parent ? de->parent->name : "no parent"); ++ if (S_ISLNK(de->mode)) ++ kfree(de->u.symlink.linkname); ++ WRITE_ENTRY_MAGIC(de, 0); ++#ifdef CONFIG_DEVFS_DEBUG ++ spin_lock(&stat_lock); ++ --stat_num_entries; ++ stat_num_bytes -= sizeof *de + de->namelen; ++ if (S_ISLNK(de->mode)) ++ stat_num_bytes -= de->u.symlink.length + 1; ++ spin_unlock(&stat_lock); ++#endif ++ de->info = POISON_PTR; ++ kfree(de); ++} /* End Function devfs_put */ ++ ++/** ++ * _devfs_search_dir - Search for a devfs entry in a directory. ++ * @dir: The directory to search. ++ * @name: The name of the entry to search for. ++ * @namelen: The number of characters in @name. ++ * ++ * Search for a devfs entry in a directory and returns a pointer to the entry ++ * on success, else %NULL. The directory must be locked already. ++ * An implicit devfs_get() is performed on the returned entry. ++ */ ++ ++static struct devfs_entry *_devfs_search_dir(struct devfs_entry *dir, ++ const char *name, ++ unsigned int namelen) ++{ ++ struct devfs_entry *curr; ++ ++ if (!S_ISDIR(dir->mode)) { ++ PRINTK("(%s): not a directory\n", dir->name); ++ return NULL; ++ } ++ for (curr = dir->u.dir.first; curr != NULL; curr = curr->next) { ++ if (curr->namelen != namelen) ++ continue; ++ if (memcmp(curr->name, name, namelen) == 0) ++ break; ++ /* Not found: try the next one */ ++ } ++ return devfs_get(curr); ++} /* End Function _devfs_search_dir */ ++ ++/** ++ * _devfs_alloc_entry - Allocate a devfs entry. ++ * @name: the name of the entry ++ * @namelen: the number of characters in @name ++ * @mode: the mode for the entry ++ * ++ * Allocate a devfs entry and returns a pointer to the entry on success, else ++ * %NULL. ++ */ ++ ++static struct devfs_entry *_devfs_alloc_entry(const char *name, ++ unsigned int namelen, ++ umode_t mode) ++{ ++ struct devfs_entry *new; ++ static unsigned long inode_counter = FIRST_INODE; ++ static DEFINE_SPINLOCK(counter_lock); ++ ++ if (name && (namelen < 1)) ++ namelen = strlen(name); ++ if ((new = kmalloc(sizeof *new + namelen, GFP_KERNEL)) == NULL) ++ return NULL; ++ memset(new, 0, sizeof *new + namelen); /* Will set '\0' on name */ ++ new->mode = mode; ++ if (S_ISDIR(mode)) ++ rwlock_init(&new->u.dir.lock); ++ atomic_set(&new->refcount, 1); ++ spin_lock(&counter_lock); ++ new->inode.ino = inode_counter++; ++ spin_unlock(&counter_lock); ++ if (name) ++ memcpy(new->name, name, namelen); ++ new->namelen = namelen; ++ WRITE_ENTRY_MAGIC(new, MAGIC_VALUE); ++#ifdef CONFIG_DEVFS_DEBUG ++ spin_lock(&stat_lock); ++ ++stat_num_entries; ++ stat_num_bytes += sizeof *new + namelen; ++ spin_unlock(&stat_lock); ++#endif ++ return new; ++} /* End Function _devfs_alloc_entry */ ++ ++/** ++ * _devfs_append_entry - Append a devfs entry to a directory's child list. ++ * @dir: The directory to add to. ++ * @de: The devfs entry to append. ++ * @old_de: If an existing entry exists, it will be written here. This may ++ * be %NULL. An implicit devfs_get() is performed on this entry. ++ * ++ * Append a devfs entry to a directory's list of children, checking first to ++ * see if an entry of the same name exists. The directory will be locked. ++ * The value 0 is returned on success, else a negative error code. ++ * On failure, an implicit devfs_put() is performed on %de. ++ */ ++ ++static int _devfs_append_entry(devfs_handle_t dir, devfs_handle_t de, ++ devfs_handle_t * old_de) ++{ ++ int retval; ++ ++ if (old_de) ++ *old_de = NULL; ++ if (!S_ISDIR(dir->mode)) { ++ PRINTK("(%s): dir: \"%s\" is not a directory\n", de->name, ++ dir->name); ++ devfs_put(de); ++ return -ENOTDIR; ++ } ++ write_lock(&dir->u.dir.lock); ++ if (dir->u.dir.no_more_additions) ++ retval = -ENOENT; ++ else { ++ struct devfs_entry *old; ++ ++ old = _devfs_search_dir(dir, de->name, de->namelen); ++ if (old_de) ++ *old_de = old; ++ else ++ devfs_put(old); ++ if (old == NULL) { ++ de->parent = dir; ++ de->prev = dir->u.dir.last; ++ /* Append to the directory's list of children */ ++ if (dir->u.dir.first == NULL) ++ dir->u.dir.first = de; ++ else ++ dir->u.dir.last->next = de; ++ dir->u.dir.last = de; ++ retval = 0; ++ } else ++ retval = -EEXIST; ++ } ++ write_unlock(&dir->u.dir.lock); ++ if (retval) ++ devfs_put(de); ++ return retval; ++} /* End Function _devfs_append_entry */ ++ ++/** ++ * _devfs_get_root_entry - Get the root devfs entry. ++ * ++ * Returns the root devfs entry on success, else %NULL. ++ * ++ * TODO it must be called asynchronously due to the fact ++ * that devfs is initialized relatively late. Proper way ++ * is to remove module_init from init_devfs_fs and manually ++ * call it early enough during system init ++ */ ++ ++static struct devfs_entry *_devfs_get_root_entry(void) ++{ ++ struct devfs_entry *new; ++ static DEFINE_SPINLOCK(root_lock); ++ ++ if (root_entry) ++ return root_entry; ++ ++ new = _devfs_alloc_entry(NULL, 0, MODE_DIR); ++ if (new == NULL) ++ return NULL; ++ ++ spin_lock(&root_lock); ++ if (root_entry) { ++ spin_unlock(&root_lock); ++ devfs_put(new); ++ return root_entry; ++ } ++ root_entry = new; ++ spin_unlock(&root_lock); ++ ++ return root_entry; ++} /* End Function _devfs_get_root_entry */ ++ ++/** ++ * _devfs_descend - Descend down a tree using the next component name. ++ * @dir: The directory to search. ++ * @name: The component name to search for. ++ * @namelen: The length of %name. ++ * @next_pos: The position of the next '/' or '\0' is written here. ++ * ++ * Descend into a directory, searching for a component. This function forms ++ * the core of a tree-walking algorithm. The directory will be locked. ++ * The devfs entry corresponding to the component is returned. If there is ++ * no matching entry, %NULL is returned. ++ * An implicit devfs_get() is performed on the returned entry. ++ */ ++ ++static struct devfs_entry *_devfs_descend(struct devfs_entry *dir, ++ const char *name, int namelen, ++ int *next_pos) ++{ ++ const char *stop, *ptr; ++ struct devfs_entry *entry; ++ ++ if ((namelen >= 3) && (strncmp(name, "../", 3) == 0)) { /* Special-case going to parent directory */ ++ *next_pos = 3; ++ return devfs_get(dir->parent); ++ } ++ stop = name + namelen; ++ /* Search for a possible '/' */ ++ for (ptr = name; (ptr < stop) && (*ptr != '/'); ++ptr) ; ++ *next_pos = ptr - name; ++ read_lock(&dir->u.dir.lock); ++ entry = _devfs_search_dir(dir, name, *next_pos); ++ read_unlock(&dir->u.dir.lock); ++ return entry; ++} /* End Function _devfs_descend */ ++ ++static devfs_handle_t _devfs_make_parent_for_leaf(struct devfs_entry *dir, ++ const char *name, ++ int namelen, int *leaf_pos) ++{ ++ int next_pos = 0; ++ ++ if (dir == NULL) ++ dir = _devfs_get_root_entry(); ++ if (dir == NULL) ++ return NULL; ++ devfs_get(dir); ++ /* Search for possible trailing component and ignore it */ ++ for (--namelen; (namelen > 0) && (name[namelen] != '/'); --namelen) ; ++ *leaf_pos = (name[namelen] == '/') ? (namelen + 1) : 0; ++ for (; namelen > 0; name += next_pos, namelen -= next_pos) { ++ struct devfs_entry *de, *old = NULL; ++ ++ if ((de = ++ _devfs_descend(dir, name, namelen, &next_pos)) == NULL) { ++ de = _devfs_alloc_entry(name, next_pos, MODE_DIR); ++ devfs_get(de); ++ if (!de || _devfs_append_entry(dir, de, &old)) { ++ devfs_put(de); ++ if (!old || !S_ISDIR(old->mode)) { ++ devfs_put(old); ++ devfs_put(dir); ++ return NULL; ++ } ++ de = old; /* Use the existing directory */ ++ } ++ } ++ if (de == dir->parent) { ++ devfs_put(dir); ++ devfs_put(de); ++ return NULL; ++ } ++ devfs_put(dir); ++ dir = de; ++ if (name[next_pos] == '/') ++ ++next_pos; ++ } ++ return dir; ++} /* End Function _devfs_make_parent_for_leaf */ ++ ++static devfs_handle_t _devfs_prepare_leaf(devfs_handle_t * dir, ++ const char *name, umode_t mode) ++{ ++ int namelen, leaf_pos; ++ struct devfs_entry *de; ++ ++ namelen = strlen(name); ++ if ((*dir = _devfs_make_parent_for_leaf(*dir, name, namelen, ++ &leaf_pos)) == NULL) { ++ PRINTK("(%s): could not create parent path\n", name); ++ return NULL; ++ } ++ if ((de = _devfs_alloc_entry(name + leaf_pos, namelen - leaf_pos, mode)) ++ == NULL) { ++ PRINTK("(%s): could not allocate entry\n", name); ++ devfs_put(*dir); ++ return NULL; ++ } ++ return de; ++} /* End Function _devfs_prepare_leaf */ ++ ++static devfs_handle_t _devfs_walk_path(struct devfs_entry *dir, ++ const char *name, int namelen, ++ int traverse_symlink) ++{ ++ int next_pos = 0; ++ ++ if (dir == NULL) ++ dir = _devfs_get_root_entry(); ++ if (dir == NULL) ++ return NULL; ++ devfs_get(dir); ++ for (; namelen > 0; name += next_pos, namelen -= next_pos) { ++ struct devfs_entry *de, *link; ++ ++ if (!S_ISDIR(dir->mode)) { ++ devfs_put(dir); ++ return NULL; ++ } ++ ++ if ((de = ++ _devfs_descend(dir, name, namelen, &next_pos)) == NULL) { ++ devfs_put(dir); ++ return NULL; ++ } ++ if (S_ISLNK(de->mode) && traverse_symlink) { /* Need to follow the link: this is a stack chomper */ ++ /* FIXME what if it puts outside of mounted tree? */ ++ link = _devfs_walk_path(dir, de->u.symlink.linkname, ++ de->u.symlink.length, TRUE); ++ devfs_put(de); ++ if (!link) { ++ devfs_put(dir); ++ return NULL; ++ } ++ de = link; ++ } ++ devfs_put(dir); ++ dir = de; ++ if (name[next_pos] == '/') ++ ++next_pos; ++ } ++ return dir; ++} /* End Function _devfs_walk_path */ ++ ++/** ++ * _devfs_find_entry - Find a devfs entry. ++ * @dir: The handle to the parent devfs directory entry. If this is %NULL the ++ * name is relative to the root of the devfs. ++ * @name: The name of the entry. This may be %NULL. ++ * @traverse_symlink: If %TRUE then symbolic links are traversed. ++ * ++ * Returns the devfs_entry pointer on success, else %NULL. An implicit ++ * devfs_get() is performed. ++ */ ++ ++static struct devfs_entry *_devfs_find_entry(devfs_handle_t dir, ++ const char *name, ++ int traverse_symlink) ++{ ++ unsigned int namelen = strlen(name); ++ ++ if (name[0] == '/') { ++ /* Skip leading pathname component */ ++ if (namelen < 2) { ++ PRINTK("(%s): too short\n", name); ++ return NULL; ++ } ++ for (++name, --namelen; (*name != '/') && (namelen > 0); ++ ++name, --namelen) ; ++ if (namelen < 2) { ++ PRINTK("(%s): too short\n", name); ++ return NULL; ++ } ++ ++name; ++ --namelen; ++ } ++ return _devfs_walk_path(dir, name, namelen, traverse_symlink); ++} /* End Function _devfs_find_entry */ ++ ++static struct devfs_entry *get_devfs_entry_from_vfs_inode(struct inode *inode) ++{ ++ if (inode == NULL) ++ return NULL; ++ VERIFY_ENTRY((struct devfs_entry *)inode->u.generic_ip); ++ return inode->i_private; ++} /* End Function get_devfs_entry_from_vfs_inode */ ++ ++/** ++ * free_dentry - Free the dentry for a device entry and invalidate inode. ++ * @de: The entry. ++ * ++ * This must only be called after the entry has been unhooked from its ++ * parent directory. ++ */ ++ ++static void free_dentry(struct devfs_entry *de) ++{ ++ struct dentry *dentry = de->inode.dentry; ++ ++ if (!dentry) ++ return; ++ spin_lock(&dcache_lock); ++ dget_locked(dentry); ++ spin_unlock(&dcache_lock); ++ /* Forcefully remove the inode */ ++ if (dentry->d_inode != NULL) ++ dentry->d_inode->i_nlink = 0; ++ d_drop(dentry); ++ dput(dentry); ++} /* End Function free_dentry */ ++ ++/** ++ * is_devfsd_or_child - Test if the current process is devfsd or one of its children. ++ * @fs_info: The filesystem information. ++ * ++ * Returns %TRUE if devfsd or child, else %FALSE. ++ */ ++ ++static int is_devfsd_or_child(struct fs_info *fs_info) ++{ ++ struct task_struct *p = current; ++ ++ if (p == fs_info->devfsd_task) ++ return (TRUE); ++ if (process_group(p) == fs_info->devfsd_pgrp) ++ return (TRUE); ++ read_lock(&tasklist_lock); ++ for (; p != &init_task; p = p->real_parent) { ++ if (p == fs_info->devfsd_task) { ++ read_unlock(&tasklist_lock); ++ return (TRUE); ++ } ++ } ++ read_unlock(&tasklist_lock); ++ return (FALSE); ++} /* End Function is_devfsd_or_child */ ++ ++/** ++ * devfsd_queue_empty - Test if devfsd has work pending in its event queue. ++ * @fs_info: The filesystem information. ++ * ++ * Returns %TRUE if the queue is empty, else %FALSE. ++ */ ++ ++static inline int devfsd_queue_empty(struct fs_info *fs_info) ++{ ++ return (fs_info->devfsd_last_event) ? FALSE : TRUE; ++} /* End Function devfsd_queue_empty */ ++ ++/** ++ * wait_for_devfsd_finished - Wait for devfsd to finish processing its event queue. ++ * @fs_info: The filesystem information. ++ * ++ * Returns %TRUE if no more waiting will be required, else %FALSE. ++ */ ++ ++static int wait_for_devfsd_finished(struct fs_info *fs_info) ++{ ++ DECLARE_WAITQUEUE(wait, current); ++ ++ if (fs_info->devfsd_task == NULL) ++ return (TRUE); ++ if (devfsd_queue_empty(fs_info) && fs_info->devfsd_sleeping) ++ return TRUE; ++ if (is_devfsd_or_child(fs_info)) ++ return (FALSE); ++ set_current_state(TASK_UNINTERRUPTIBLE); ++ add_wait_queue(&fs_info->revalidate_wait_queue, &wait); ++ if (!devfsd_queue_empty(fs_info) || !fs_info->devfsd_sleeping) ++ if (fs_info->devfsd_task) ++ schedule(); ++ remove_wait_queue(&fs_info->revalidate_wait_queue, &wait); ++ __set_current_state(TASK_RUNNING); ++ return (TRUE); ++} /* End Function wait_for_devfsd_finished */ ++ ++/** ++ * devfsd_notify_de - Notify the devfsd daemon of a change. ++ * @de: The devfs entry that has changed. This and all parent entries will ++ * have their reference counts incremented if the event was queued. ++ * @type: The type of change. ++ * @mode: The mode of the entry. ++ * @uid: The user ID. ++ * @gid: The group ID. ++ * @fs_info: The filesystem info. ++ * ++ * Returns %TRUE if an event was queued and devfsd woken up, else %FALSE. ++ */ ++ ++static int devfsd_notify_de(struct devfs_entry *de, ++ unsigned short type, umode_t mode, ++ uid_t uid, gid_t gid, struct fs_info *fs_info) ++{ ++ struct devfsd_buf_entry *entry; ++ struct devfs_entry *curr; ++ ++ if (!(fs_info->devfsd_event_mask & (1 << type))) ++ return (FALSE); ++ if ((entry = kmem_cache_alloc(devfsd_buf_cache, SLAB_KERNEL)) == NULL) { ++ atomic_inc(&fs_info->devfsd_overrun_count); ++ return (FALSE); ++ } ++ for (curr = de; curr != NULL; curr = curr->parent) ++ devfs_get(curr); ++ entry->de = de; ++ entry->type = type; ++ entry->mode = mode; ++ entry->uid = uid; ++ entry->gid = gid; ++ entry->next = NULL; ++ spin_lock(&fs_info->devfsd_buffer_lock); ++ if (!fs_info->devfsd_first_event) ++ fs_info->devfsd_first_event = entry; ++ if (fs_info->devfsd_last_event) ++ fs_info->devfsd_last_event->next = entry; ++ fs_info->devfsd_last_event = entry; ++ spin_unlock(&fs_info->devfsd_buffer_lock); ++ wake_up_interruptible(&fs_info->devfsd_wait_queue); ++ return (TRUE); ++} /* End Function devfsd_notify_de */ ++ ++/** ++ * devfsd_notify - Notify the devfsd daemon of a change. ++ * @de: The devfs entry that has changed. ++ * @type: The type of change event. ++ * @wait: If TRUE, the function waits for the daemon to finish processing ++ * the event. ++ */ ++ ++static void devfsd_notify(struct devfs_entry *de, unsigned short type) ++{ ++ devfsd_notify_de(de, type, de->mode, current->euid, ++ current->egid, &fs_info); ++} ++ ++static int devfs_mk_dev(dev_t dev, umode_t mode, const char *fmt, va_list args) ++{ ++ struct devfs_entry *dir = NULL, *de; ++ char buf[64]; ++ int error, n; ++ ++ n = vsnprintf(buf, sizeof(buf), fmt, args); ++ if (n >= sizeof(buf) || !buf[0]) { ++ printk(KERN_WARNING "%s: invalid format string %s\n", ++ __FUNCTION__, fmt); ++ return -EINVAL; ++ } ++ ++ de = _devfs_prepare_leaf(&dir, buf, mode); ++ if (!de) { ++ printk(KERN_WARNING "%s: could not prepare leaf for %s\n", ++ __FUNCTION__, buf); ++ return -ENOMEM; /* could be more accurate... */ ++ } ++ ++ de->u.dev = dev; ++ ++ error = _devfs_append_entry(dir, de, NULL); ++ if (error) { ++ printk(KERN_WARNING "%s: could not append to parent for %s\n", ++ __FUNCTION__, buf); ++ goto out; ++ } ++ ++ devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); ++ out: ++ devfs_put(dir); ++ return error; ++} ++ ++int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) ++{ ++ va_list args; ++ ++ if (!S_ISBLK(mode)) { ++ printk(KERN_WARNING "%s: invalide mode (%u) for %s\n", ++ __FUNCTION__, mode, fmt); ++ return -EINVAL; ++ } ++ ++ va_start(args, fmt); ++ return devfs_mk_dev(dev, mode, fmt, args); ++} ++ ++EXPORT_SYMBOL(devfs_mk_bdev); ++ ++int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) ++{ ++ va_list args; ++ ++ if (!S_ISCHR(mode)) { ++ printk(KERN_WARNING "%s: invalide mode (%u) for %s\n", ++ __FUNCTION__, mode, fmt); ++ return -EINVAL; ++ } ++ ++ va_start(args, fmt); ++ return devfs_mk_dev(dev, mode, fmt, args); ++} ++ ++EXPORT_SYMBOL(devfs_mk_cdev); ++ ++/** ++ * _devfs_unhook - Unhook a device entry from its parents list ++ * @de: The entry to unhook. ++ * ++ * Returns %TRUE if the entry was unhooked, else %FALSE if it was ++ * previously unhooked. ++ * The caller must have a write lock on the parent directory. ++ */ ++ ++static int _devfs_unhook(struct devfs_entry *de) ++{ ++ struct devfs_entry *parent; ++ ++ if (!de || (de->prev == de)) ++ return FALSE; ++ parent = de->parent; ++ if (de->prev == NULL) ++ parent->u.dir.first = de->next; ++ else ++ de->prev->next = de->next; ++ if (de->next == NULL) ++ parent->u.dir.last = de->prev; ++ else ++ de->next->prev = de->prev; ++ de->prev = de; /* Indicate we're unhooked */ ++ de->next = NULL; /* Force early termination for <devfs_readdir> */ ++ return TRUE; ++} /* End Function _devfs_unhook */ ++ ++/** ++ * _devfs_unregister - Unregister a device entry from its parent. ++ * @dir: The parent directory. ++ * @de: The entry to unregister. ++ * ++ * The caller must have a write lock on the parent directory, which is ++ * unlocked by this function. ++ */ ++ ++static void _devfs_unregister(struct devfs_entry *dir, struct devfs_entry *de) ++{ ++ int unhooked = _devfs_unhook(de); ++ ++ write_unlock(&dir->u.dir.lock); ++ if (!unhooked) ++ return; ++ devfs_get(dir); ++ devfsd_notify(de, DEVFSD_NOTIFY_UNREGISTERED); ++ free_dentry(de); ++ devfs_put(dir); ++ if (!S_ISDIR(de->mode)) ++ return; ++ while (TRUE) { /* Recursively unregister: this is a stack chomper */ ++ struct devfs_entry *child; ++ ++ write_lock(&de->u.dir.lock); ++ de->u.dir.no_more_additions = TRUE; ++ child = de->u.dir.first; ++ VERIFY_ENTRY(child); ++ _devfs_unregister(de, child); ++ if (!child) ++ break; ++ DPRINTK(DEBUG_UNREGISTER, "(%s): child: %p refcount: %d\n", ++ child->name, child, atomic_read(&child->refcount)); ++ devfs_put(child); ++ } ++} /* End Function _devfs_unregister */ ++ ++static int devfs_do_symlink(devfs_handle_t dir, const char *name, ++ const char *link, devfs_handle_t * handle) ++{ ++ int err; ++ unsigned int linklength; ++ char *newlink; ++ struct devfs_entry *de; ++ ++ if (handle != NULL) ++ *handle = NULL; ++ if (name == NULL) { ++ PRINTK("(): NULL name pointer\n"); ++ return -EINVAL; ++ } ++ if (link == NULL) { ++ PRINTK("(%s): NULL link pointer\n", name); ++ return -EINVAL; ++ } ++ linklength = strlen(link); ++ if ((newlink = kmalloc(linklength + 1, GFP_KERNEL)) == NULL) ++ return -ENOMEM; ++ memcpy(newlink, link, linklength); ++ newlink[linklength] = '\0'; ++ if ((de = _devfs_prepare_leaf(&dir, name, S_IFLNK | S_IRUGO | S_IXUGO)) ++ == NULL) { ++ PRINTK("(%s): could not prepare leaf\n", name); ++ kfree(newlink); ++ return -ENOTDIR; ++ } ++ de->info = NULL; ++ de->u.symlink.linkname = newlink; ++ de->u.symlink.length = linklength; ++ if ((err = _devfs_append_entry(dir, de, NULL)) != 0) { ++ PRINTK("(%s): could not append to parent, err: %d\n", name, ++ err); ++ devfs_put(dir); ++ return err; ++ } ++ devfs_put(dir); ++#ifdef CONFIG_DEVFS_DEBUG ++ spin_lock(&stat_lock); ++ stat_num_bytes += linklength + 1; ++ spin_unlock(&stat_lock); ++#endif ++ if (handle != NULL) ++ *handle = de; ++ return 0; ++} /* End Function devfs_do_symlink */ ++ ++/** ++ * devfs_mk_symlink Create a symbolic link in the devfs namespace. ++ * @from: The name of the entry. ++ * @to: Name of the destination ++ * ++ * Returns 0 on success, else a negative error code is returned. ++ */ ++ ++int devfs_mk_symlink(const char *from, const char *to) ++{ ++ devfs_handle_t de; ++ int err; ++ ++ err = devfs_do_symlink(NULL, from, to, &de); ++ if (!err) { ++ de->vfs = TRUE; ++ devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); ++ } ++ ++ return err; ++} ++ ++/** ++ * devfs_mk_dir - Create a directory in the devfs namespace. ++ * new name is relative to the root of the devfs. ++ * @fmt: The name of the entry. ++ * ++ * Use of this function is optional. The devfs_register() function ++ * will automatically create intermediate directories as needed. This function ++ * is provided for efficiency reasons, as it provides a handle to a directory. ++ * On failure %NULL is returned. ++ */ ++ ++int devfs_mk_dir(const char *fmt, ...) ++{ ++ struct devfs_entry *dir = NULL, *de = NULL, *old; ++ char buf[64]; ++ va_list args; ++ int error, n; ++ ++ va_start(args, fmt); ++ n = vsnprintf(buf, 64, fmt, args); ++ if (n >= 64 || !buf[0]) { ++ printk(KERN_WARNING "%s: invalid argument.", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ de = _devfs_prepare_leaf(&dir, buf, MODE_DIR); ++ if (!de) { ++ PRINTK("(%s): could not prepare leaf\n", buf); ++ return -EINVAL; ++ } ++ ++ error = _devfs_append_entry(dir, de, &old); ++ if (error == -EEXIST && S_ISDIR(old->mode)) { ++ /* ++ * devfs_mk_dir() of an already-existing directory will ++ * return success. ++ */ ++ error = 0; ++ goto out_put; ++ } else if (error) { ++ PRINTK("(%s): could not append to dir: %p \"%s\"\n", ++ buf, dir, dir->name); ++ devfs_put(old); ++ goto out_put; ++ } ++ ++ devfsd_notify(de, DEVFSD_NOTIFY_REGISTERED); ++ ++ out_put: ++ devfs_put(dir); ++ return error; ++} ++ ++void devfs_remove(const char *fmt, ...) ++{ ++ char buf[64]; ++ va_list args; ++ int n; ++ ++ va_start(args, fmt); ++ n = vsnprintf(buf, sizeof(buf), fmt, args); ++ if (n < sizeof(buf) && buf[0]) { ++ devfs_handle_t de = _devfs_find_entry(NULL, buf, 0); ++ ++ if (!de) { ++ printk(KERN_ERR "%s: %s not found, cannot remove\n", ++ __FUNCTION__, buf); ++ dump_stack(); ++ return; ++ } ++ ++ write_lock(&de->parent->u.dir.lock); ++ _devfs_unregister(de->parent, de); ++ devfs_put(de); ++ devfs_put(de); ++ } ++} ++ ++/** ++ * devfs_generate_path - Generate a pathname for an entry, relative to the devfs root. ++ * @de: The devfs entry. ++ * @path: The buffer to write the pathname to. The pathname and '\0' ++ * terminator will be written at the end of the buffer. ++ * @buflen: The length of the buffer. ++ * ++ * Returns the offset in the buffer where the pathname starts on success, ++ * else a negative error code. ++ */ ++ ++static int devfs_generate_path(devfs_handle_t de, char *path, int buflen) ++{ ++ int pos; ++#define NAMEOF(de) ( (de)->mode ? (de)->name : (de)->u.name ) ++ ++ if (de == NULL) ++ return -EINVAL; ++ VERIFY_ENTRY(de); ++ if (de->namelen >= buflen) ++ return -ENAMETOOLONG; /* Must be first */ ++ path[buflen - 1] = '\0'; ++ if (de->parent == NULL) ++ return buflen - 1; /* Don't prepend root */ ++ pos = buflen - de->namelen - 1; ++ memcpy(path + pos, NAMEOF(de), de->namelen); ++ for (de = de->parent; de->parent != NULL; de = de->parent) { ++ if (pos - de->namelen - 1 < 0) ++ return -ENAMETOOLONG; ++ path[--pos] = '/'; ++ pos -= de->namelen; ++ memcpy(path + pos, NAMEOF(de), de->namelen); ++ } ++ return pos; ++} /* End Function devfs_generate_path */ ++ ++/** ++ * devfs_setup - Process kernel boot options. ++ * @str: The boot options after the "devfs=". ++ */ ++ ++static int __init devfs_setup(char *str) ++{ ++ static struct { ++ char *name; ++ unsigned int mask; ++ unsigned int *opt; ++ } devfs_options_tab[] __initdata = { ++#ifdef CONFIG_DEVFS_DEBUG ++ { ++ "dall", DEBUG_ALL, &devfs_debug_init}, { ++ "dmod", DEBUG_MODULE_LOAD, &devfs_debug_init}, { ++ "dreg", DEBUG_REGISTER, &devfs_debug_init}, { ++ "dunreg", DEBUG_UNREGISTER, &devfs_debug_init}, { ++ "dfree", DEBUG_FREE, &devfs_debug_init}, { ++ "diget", DEBUG_I_GET, &devfs_debug_init}, { ++ "dchange", DEBUG_SET_FLAGS, &devfs_debug_init}, { ++ "dsread", DEBUG_S_READ, &devfs_debug_init}, { ++ "dichange", DEBUG_I_CHANGE, &devfs_debug_init}, { ++ "dimknod", DEBUG_I_MKNOD, &devfs_debug_init}, { ++ "dilookup", DEBUG_I_LOOKUP, &devfs_debug_init}, { ++ "diunlink", DEBUG_I_UNLINK, &devfs_debug_init}, ++#endif /* CONFIG_DEVFS_DEBUG */ ++ { ++ "mount", OPTION_MOUNT, &boot_options}, { ++ NULL, 0, NULL} ++ }; ++ ++ while ((*str != '\0') && !isspace(*str)) { ++ int i, found = 0, invert = 0; ++ ++ if (strncmp(str, "no", 2) == 0) { ++ invert = 1; ++ str += 2; ++ } ++ for (i = 0; devfs_options_tab[i].name != NULL; i++) { ++ int len = strlen(devfs_options_tab[i].name); ++ ++ if (strncmp(str, devfs_options_tab[i].name, len) == 0) { ++ if (invert) ++ *devfs_options_tab[i].opt &= ++ ~devfs_options_tab[i].mask; ++ else ++ *devfs_options_tab[i].opt |= ++ devfs_options_tab[i].mask; ++ str += len; ++ found = 1; ++ break; ++ } ++ } ++ if (!found) ++ return 0; /* No match */ ++ if (*str != ',') ++ return 0; /* No more options */ ++ ++str; ++ } ++ return 1; ++} /* End Function devfs_setup */ ++ ++__setup("devfs=", devfs_setup); ++ ++EXPORT_SYMBOL(devfs_mk_dir); ++EXPORT_SYMBOL(devfs_remove); ++ ++/** ++ * try_modload - Notify devfsd of an inode lookup by a non-devfsd process. ++ * @parent: The parent devfs entry. ++ * @fs_info: The filesystem info. ++ * @name: The device name. ++ * @namelen: The number of characters in @name. ++ * @buf: A working area that will be used. This must not go out of scope ++ * until devfsd is idle again. ++ * ++ * Returns 0 on success (event was queued), else a negative error code. ++ */ ++ ++static int try_modload(struct devfs_entry *parent, struct fs_info *fs_info, ++ const char *name, unsigned namelen, ++ struct devfs_entry *buf) ++{ ++ if (!(fs_info->devfsd_event_mask & (1 << DEVFSD_NOTIFY_LOOKUP))) ++ return -ENOENT; ++ if (is_devfsd_or_child(fs_info)) ++ return -ENOENT; ++ memset(buf, 0, sizeof *buf); ++ atomic_set(&buf->refcount, 1); ++ buf->parent = parent; ++ buf->namelen = namelen; ++ buf->u.name = name; ++ WRITE_ENTRY_MAGIC(buf, MAGIC_VALUE); ++ if (!devfsd_notify_de(buf, DEVFSD_NOTIFY_LOOKUP, 0, ++ current->euid, current->egid, fs_info)) ++ return -ENOENT; ++ /* Possible success: event has been queued */ ++ return 0; ++} /* End Function try_modload */ ++ ++/* Superblock operations follow */ ++ ++static struct inode_operations devfs_iops; ++static struct inode_operations devfs_dir_iops; ++static const struct file_operations devfs_fops; ++static const struct file_operations devfs_dir_fops; ++static struct inode_operations devfs_symlink_iops; ++ ++static int devfs_notify_change(struct dentry *dentry, struct iattr *iattr) ++{ ++ int retval; ++ struct devfs_entry *de; ++ struct inode *inode = dentry->d_inode; ++ struct fs_info *fs_info = inode->i_sb->s_fs_info; ++ ++ de = get_devfs_entry_from_vfs_inode(inode); ++ if (de == NULL) ++ return -ENODEV; ++ retval = inode_change_ok(inode, iattr); ++ if (retval != 0) ++ return retval; ++ retval = inode_setattr(inode, iattr); ++ if (retval != 0) ++ return retval; ++ DPRINTK(DEBUG_I_CHANGE, "(%d): VFS inode: %p devfs_entry: %p\n", ++ (int)inode->i_ino, inode, de); ++ DPRINTK(DEBUG_I_CHANGE, "(): mode: 0%o uid: %d gid: %d\n", ++ (int)inode->i_mode, (int)inode->i_uid, (int)inode->i_gid); ++ /* Inode is not on hash chains, thus must save permissions here rather ++ than in a write_inode() method */ ++ de->mode = inode->i_mode; ++ de->inode.uid = inode->i_uid; ++ de->inode.gid = inode->i_gid; ++ de->inode.atime = inode->i_atime; ++ de->inode.mtime = inode->i_mtime; ++ de->inode.ctime = inode->i_ctime; ++ if ((iattr->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) && ++ !is_devfsd_or_child(fs_info)) ++ devfsd_notify_de(de, DEVFSD_NOTIFY_CHANGE, inode->i_mode, ++ inode->i_uid, inode->i_gid, fs_info); ++ return 0; ++} /* End Function devfs_notify_change */ ++ ++static struct super_operations devfs_sops = { ++ .drop_inode = generic_delete_inode, ++ .statfs = simple_statfs, ++}; ++ ++/** ++ * _devfs_get_vfs_inode - Get a VFS inode. ++ * @sb: The super block. ++ * @de: The devfs inode. ++ * @dentry: The dentry to register with the devfs inode. ++ * ++ * Returns the inode on success, else %NULL. An implicit devfs_get() is ++ * performed if the inode is created. ++ */ ++ ++static struct inode *_devfs_get_vfs_inode(struct super_block *sb, ++ struct devfs_entry *de, ++ struct dentry *dentry) ++{ ++ struct inode *inode; ++ ++ if (de->prev == de) ++ return NULL; /* Quick check to see if unhooked */ ++ if ((inode = new_inode(sb)) == NULL) { ++ PRINTK("(%s): new_inode() failed, de: %p\n", de->name, de); ++ return NULL; ++ } ++ if (de->parent) { ++ read_lock(&de->parent->u.dir.lock); ++ if (de->prev != de) ++ de->inode.dentry = dentry; /* Not unhooked */ ++ read_unlock(&de->parent->u.dir.lock); ++ } else ++ de->inode.dentry = dentry; /* Root: no locking needed */ ++ if (de->inode.dentry != dentry) { /* Must have been unhooked */ ++ iput(inode); ++ return NULL; ++ } ++ /* FIXME where is devfs_put? */ ++ inode->i_private = devfs_get(de); ++ inode->i_ino = de->inode.ino; ++ DPRINTK(DEBUG_I_GET, "(%d): VFS inode: %p devfs_entry: %p\n", ++ (int)inode->i_ino, inode, de); ++ inode->i_blocks = 0; ++ inode->i_op = &devfs_iops; ++ inode->i_mode = de->mode; ++ if (S_ISDIR(de->mode)) { ++ inode->i_op = &devfs_dir_iops; ++ inode->i_fop = &devfs_dir_fops; ++ } else if (S_ISLNK(de->mode)) { ++ inode->i_op = &devfs_symlink_iops; ++ inode->i_size = de->u.symlink.length; ++ } else if (S_ISCHR(de->mode) || S_ISBLK(de->mode)) { ++ init_special_inode(inode, de->mode, de->u.dev); ++ } else if (S_ISFIFO(de->mode) || S_ISSOCK(de->mode)) { ++ init_special_inode(inode, de->mode, 0); ++ } else { ++ PRINTK("(%s): unknown mode %o de: %p\n", ++ de->name, de->mode, de); ++ iput(inode); ++ devfs_put(de); ++ return NULL; ++ } ++ ++ inode->i_uid = de->inode.uid; ++ inode->i_gid = de->inode.gid; ++ inode->i_atime = de->inode.atime; ++ inode->i_mtime = de->inode.mtime; ++ inode->i_ctime = de->inode.ctime; ++ DPRINTK(DEBUG_I_GET, "(): mode: 0%o uid: %d gid: %d\n", ++ (int)inode->i_mode, (int)inode->i_uid, (int)inode->i_gid); ++ return inode; ++} /* End Function _devfs_get_vfs_inode */ ++ ++/* File operations for device entries follow */ ++ ++static int devfs_readdir(struct file *file, void *dirent, filldir_t filldir) ++{ ++ int err, count; ++ int stored = 0; ++ struct fs_info *fs_info; ++ struct devfs_entry *parent, *de, *next = NULL; ++ struct inode *inode = file->f_dentry->d_inode; ++ ++ fs_info = inode->i_sb->s_fs_info; ++ parent = get_devfs_entry_from_vfs_inode(file->f_dentry->d_inode); ++ if ((long)file->f_pos < 0) ++ return -EINVAL; ++ DPRINTK(DEBUG_F_READDIR, "(%s): fs_info: %p pos: %ld\n", ++ parent->name, fs_info, (long)file->f_pos); ++ switch ((long)file->f_pos) { ++ case 0: ++ err = (*filldir) (dirent, "..", 2, file->f_pos, ++ parent_ino(file->f_dentry), DT_DIR); ++ if (err == -EINVAL) ++ break; ++ if (err < 0) ++ return err; ++ file->f_pos++; ++ ++stored; ++ /* Fall through */ ++ case 1: ++ err = ++ (*filldir) (dirent, ".", 1, file->f_pos, inode->i_ino, ++ DT_DIR); ++ if (err == -EINVAL) ++ break; ++ if (err < 0) ++ return err; ++ file->f_pos++; ++ ++stored; ++ /* Fall through */ ++ default: ++ /* Skip entries */ ++ count = file->f_pos - 2; ++ read_lock(&parent->u.dir.lock); ++ for (de = parent->u.dir.first; de && (count > 0); de = de->next) ++ --count; ++ devfs_get(de); ++ read_unlock(&parent->u.dir.lock); ++ /* Now add all remaining entries */ ++ while (de) { ++ err = (*filldir) (dirent, de->name, de->namelen, ++ file->f_pos, de->inode.ino, ++ de->mode >> 12); ++ if (err < 0) ++ devfs_put(de); ++ else { ++ file->f_pos++; ++ ++stored; ++ } ++ if (err == -EINVAL) ++ break; ++ if (err < 0) ++ return err; ++ read_lock(&parent->u.dir.lock); ++ next = devfs_get(de->next); ++ read_unlock(&parent->u.dir.lock); ++ devfs_put(de); ++ de = next; ++ } ++ break; ++ } ++ return stored; ++} /* End Function devfs_readdir */ ++ ++/* Open devfs specific special files */ ++static int devfs_open(struct inode *inode, struct file *file) ++{ ++ int err; ++ int minor = MINOR(inode->i_rdev); ++ struct file_operations *old_fops, *new_fops; ++ ++ switch (minor) { ++ case 0: /* /dev/.devfsd */ ++ new_fops = fops_get(&devfsd_fops); ++ break; ++#ifdef CONFIG_DEVFS_DEBUG ++ case 1: /* /dev/.stat */ ++ new_fops = fops_get(&stat_fops); ++ break; ++#endif ++ default: ++ return -ENODEV; ++ } ++ ++ if (new_fops == NULL) ++ return -ENODEV; ++ old_fops = file->f_op; ++ file->f_op = new_fops; ++ err = new_fops->open ? new_fops->open(inode, file) : 0; ++ if (err) { ++ file->f_op = old_fops; ++ fops_put(new_fops); ++ } else ++ fops_put(old_fops); ++ return err; ++} /* End Function devfs_open */ ++ ++static const struct file_operations devfs_fops = { ++ .open = devfs_open, ++}; ++ ++static const struct file_operations devfs_dir_fops = { ++ .read = generic_read_dir, ++ .readdir = devfs_readdir, ++}; ++ ++/* Dentry operations for device entries follow */ ++ ++/** ++ * devfs_d_release - Callback for when a dentry is freed. ++ * @dentry: The dentry. ++ */ ++ ++static void devfs_d_release(struct dentry *dentry) ++{ ++ DPRINTK(DEBUG_D_RELEASE, "(%p): inode: %p\n", dentry, dentry->d_inode); ++} /* End Function devfs_d_release */ ++ ++/** ++ * devfs_d_iput - Callback for when a dentry loses its inode. ++ * @dentry: The dentry. ++ * @inode: The inode. ++ */ ++ ++static void devfs_d_iput(struct dentry *dentry, struct inode *inode) ++{ ++ struct devfs_entry *de; ++ ++ de = get_devfs_entry_from_vfs_inode(inode); ++ DPRINTK(DEBUG_D_IPUT, ++ "(%s): dentry: %p inode: %p de: %p de->dentry: %p\n", de->name, ++ dentry, inode, de, de->inode.dentry); ++ if (de->inode.dentry && (de->inode.dentry != dentry)) ++ OOPS("(%s): de: %p dentry: %p de->dentry: %p\n", ++ de->name, de, dentry, de->inode.dentry); ++ de->inode.dentry = NULL; ++ iput(inode); ++ devfs_put(de); ++} /* End Function devfs_d_iput */ ++ ++static int devfs_d_delete(struct dentry *dentry); ++ ++static struct dentry_operations devfs_dops = { ++ .d_delete = devfs_d_delete, ++ .d_release = devfs_d_release, ++ .d_iput = devfs_d_iput, ++}; ++ ++static int devfs_d_revalidate_wait(struct dentry *dentry, struct nameidata *); ++ ++static struct dentry_operations devfs_wait_dops = { ++ .d_delete = devfs_d_delete, ++ .d_release = devfs_d_release, ++ .d_iput = devfs_d_iput, ++ .d_revalidate = devfs_d_revalidate_wait, ++}; ++ ++/** ++ * devfs_d_delete - Callback for when all files for a dentry are closed. ++ * @dentry: The dentry. ++ */ ++ ++static int devfs_d_delete(struct dentry *dentry) ++{ ++ struct inode *inode = dentry->d_inode; ++ ++ if (dentry->d_op == &devfs_wait_dops) ++ dentry->d_op = &devfs_dops; ++ /* Unhash dentry if negative (has no inode) */ ++ if (inode == NULL) { ++ DPRINTK(DEBUG_D_DELETE, "(%p): dropping negative dentry\n", ++ dentry); ++ return 1; ++ } ++ return 0; ++} /* End Function devfs_d_delete */ ++ ++struct devfs_lookup_struct { ++ devfs_handle_t de; ++ wait_queue_head_t wait_queue; ++}; ++ ++/* XXX: this doesn't handle the case where we got a negative dentry ++ but a devfs entry has been registered in the meanwhile */ ++static int devfs_d_revalidate_wait(struct dentry *dentry, struct nameidata *nd) ++{ ++ struct inode *dir = dentry->d_parent->d_inode; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ devfs_handle_t parent = get_devfs_entry_from_vfs_inode(dir); ++ struct devfs_lookup_struct *lookup_info = dentry->d_fsdata; ++ DECLARE_WAITQUEUE(wait, current); ++ int need_lock; ++ ++ /* ++ * FIXME HACK ++ * ++ * make sure that ++ * d_instantiate always runs under lock ++ * we release i_mutex lock before going to sleep ++ * ++ * unfortunately sometimes d_revalidate is called with ++ * and sometimes without i_mutex lock held. The following checks ++ * attempt to deduce when we need to add (and drop resp.) lock ++ * here. This relies on current (2.6.2) calling coventions: ++ * ++ * lookup_hash is always run under i_mutex and is passing NULL ++ * as nd ++ * ++ * open(...,O_CREATE,...) calls _lookup_hash under i_mutex ++ * and sets flags to LOOKUP_OPEN|LOOKUP_CREATE ++ * ++ * all other invocations of ->d_revalidate seem to happen ++ * outside of i_mutex ++ */ ++ need_lock = nd && ++ (!(nd->flags & LOOKUP_CREATE) || (nd->flags & LOOKUP_PARENT)); ++ ++ if (need_lock) ++ mutex_lock(&dir->i_mutex); ++ ++ if (is_devfsd_or_child(fs_info)) { ++ devfs_handle_t de = lookup_info->de; ++ struct inode *inode; ++ ++ DPRINTK(DEBUG_I_LOOKUP, ++ "(%s): dentry: %p inode: %p de: %p by: \"%s\"\n", ++ dentry->d_name.name, dentry, dentry->d_inode, de, ++ current->comm); ++ if (dentry->d_inode) ++ goto out; ++ if (de == NULL) { ++ read_lock(&parent->u.dir.lock); ++ de = _devfs_search_dir(parent, dentry->d_name.name, ++ dentry->d_name.len); ++ read_unlock(&parent->u.dir.lock); ++ if (de == NULL) ++ goto out; ++ lookup_info->de = de; ++ } ++ /* Create an inode, now that the driver information is available */ ++ inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry); ++ if (!inode) ++ goto out; ++ DPRINTK(DEBUG_I_LOOKUP, ++ "(%s): new VFS inode(%u): %p de: %p by: \"%s\"\n", ++ de->name, de->inode.ino, inode, de, current->comm); ++ d_instantiate(dentry, inode); ++ goto out; ++ } ++ if (lookup_info == NULL) ++ goto out; /* Early termination */ ++ read_lock(&parent->u.dir.lock); ++ if (dentry->d_fsdata) { ++ set_current_state(TASK_UNINTERRUPTIBLE); ++ add_wait_queue(&lookup_info->wait_queue, &wait); ++ read_unlock(&parent->u.dir.lock); ++ /* at this point it is always (hopefully) locked */ ++ mutex_unlock(&dir->i_mutex); ++ schedule(); ++ mutex_lock(&dir->i_mutex); ++ /* ++ * This does not need nor should remove wait from wait_queue. ++ * Wait queue head is never reused - nothing is ever added to it ++ * after all waiters have been waked up and head itself disappears ++ * very soon after it. Moreover it is local variable on stack that ++ * is likely to have already disappeared so any reference to it ++ * at this point is buggy. ++ */ ++ ++ } else ++ read_unlock(&parent->u.dir.lock); ++ ++ out: ++ if (need_lock) ++ mutex_unlock(&dir->i_mutex); ++ return 1; ++} /* End Function devfs_d_revalidate_wait */ ++ ++/* Inode operations for device entries follow */ ++ ++static struct dentry *devfs_lookup(struct inode *dir, struct dentry *dentry, ++ struct nameidata *nd) ++{ ++ struct devfs_entry tmp; /* Must stay in scope until devfsd idle again */ ++ struct devfs_lookup_struct lookup_info; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ struct devfs_entry *parent, *de; ++ struct inode *inode; ++ struct dentry *retval = NULL; ++ ++ /* Set up the dentry operations before anything else, to ensure cleaning ++ up on any error */ ++ dentry->d_op = &devfs_dops; ++ /* First try to get the devfs entry for this directory */ ++ parent = get_devfs_entry_from_vfs_inode(dir); ++ DPRINTK(DEBUG_I_LOOKUP, "(%s): dentry: %p parent: %p by: \"%s\"\n", ++ dentry->d_name.name, dentry, parent, current->comm); ++ if (parent == NULL) ++ return ERR_PTR(-ENOENT); ++ read_lock(&parent->u.dir.lock); ++ de = _devfs_search_dir(parent, dentry->d_name.name, dentry->d_name.len); ++ read_unlock(&parent->u.dir.lock); ++ lookup_info.de = de; ++ init_waitqueue_head(&lookup_info.wait_queue); ++ dentry->d_fsdata = &lookup_info; ++ if (de == NULL) { /* Try with devfsd. For any kind of failure, leave a negative dentry ++ so someone else can deal with it (in the case where the sysadmin ++ does a mknod()). It's important to do this before hashing the ++ dentry, so that the devfsd queue is filled before revalidates ++ can start */ ++ if (try_modload(parent, fs_info, dentry->d_name.name, dentry->d_name.len, &tmp) < 0) { /* Lookup event was not queued to devfsd */ ++ d_add(dentry, NULL); ++ return NULL; ++ } ++ } ++ dentry->d_op = &devfs_wait_dops; ++ d_add(dentry, NULL); /* Open the floodgates */ ++ /* Unlock directory semaphore, which will release any waiters. They ++ will get the hashed dentry, and may be forced to wait for ++ revalidation */ ++ mutex_unlock(&dir->i_mutex); ++ wait_for_devfsd_finished(fs_info); /* If I'm not devfsd, must wait */ ++ mutex_lock(&dir->i_mutex); /* Grab it again because them's the rules */ ++ de = lookup_info.de; ++ /* If someone else has been so kind as to make the inode, we go home ++ early */ ++ if (dentry->d_inode) ++ goto out; ++ if (de == NULL) { ++ read_lock(&parent->u.dir.lock); ++ de = _devfs_search_dir(parent, dentry->d_name.name, ++ dentry->d_name.len); ++ read_unlock(&parent->u.dir.lock); ++ if (de == NULL) ++ goto out; ++ /* OK, there's an entry now, but no VFS inode yet */ ++ } ++ /* Create an inode, now that the driver information is available */ ++ inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry); ++ if (!inode) { ++ retval = ERR_PTR(-ENOMEM); ++ goto out; ++ } ++ DPRINTK(DEBUG_I_LOOKUP, ++ "(%s): new VFS inode(%u): %p de: %p by: \"%s\"\n", de->name, ++ de->inode.ino, inode, de, current->comm); ++ d_instantiate(dentry, inode); ++ out: ++ write_lock(&parent->u.dir.lock); ++ dentry->d_op = &devfs_dops; ++ dentry->d_fsdata = NULL; ++ wake_up(&lookup_info.wait_queue); ++ write_unlock(&parent->u.dir.lock); ++ devfs_put(de); ++ return retval; ++} /* End Function devfs_lookup */ ++ ++static int devfs_unlink(struct inode *dir, struct dentry *dentry) ++{ ++ int unhooked; ++ struct devfs_entry *de; ++ struct inode *inode = dentry->d_inode; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ ++ de = get_devfs_entry_from_vfs_inode(inode); ++ DPRINTK(DEBUG_I_UNLINK, "(%s): de: %p\n", dentry->d_name.name, de); ++ if (de == NULL) ++ return -ENOENT; ++ if (!de->vfs) ++ return -EPERM; ++ write_lock(&de->parent->u.dir.lock); ++ unhooked = _devfs_unhook(de); ++ write_unlock(&de->parent->u.dir.lock); ++ if (!unhooked) ++ return -ENOENT; ++ if (!is_devfsd_or_child(fs_info)) ++ devfsd_notify_de(de, DEVFSD_NOTIFY_DELETE, inode->i_mode, ++ inode->i_uid, inode->i_gid, fs_info); ++ free_dentry(de); ++ devfs_put(de); ++ return 0; ++} /* End Function devfs_unlink */ ++ ++static int devfs_symlink(struct inode *dir, struct dentry *dentry, ++ const char *symname) ++{ ++ int err; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ struct devfs_entry *parent, *de; ++ struct inode *inode; ++ ++ /* First try to get the devfs entry for this directory */ ++ parent = get_devfs_entry_from_vfs_inode(dir); ++ if (parent == NULL) ++ return -ENOENT; ++ err = devfs_do_symlink(parent, dentry->d_name.name, symname, &de); ++ DPRINTK(DEBUG_DISABLED, "(%s): errcode from <devfs_do_symlink>: %d\n", ++ dentry->d_name.name, err); ++ if (err < 0) ++ return err; ++ de->vfs = TRUE; ++ de->inode.uid = current->euid; ++ de->inode.gid = current->egid; ++ de->inode.atime = CURRENT_TIME; ++ de->inode.mtime = CURRENT_TIME; ++ de->inode.ctime = CURRENT_TIME; ++ if ((inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry)) == NULL) ++ return -ENOMEM; ++ DPRINTK(DEBUG_DISABLED, "(%s): new VFS inode(%u): %p dentry: %p\n", ++ dentry->d_name.name, de->inode.ino, inode, dentry); ++ d_instantiate(dentry, inode); ++ if (!is_devfsd_or_child(fs_info)) ++ devfsd_notify_de(de, DEVFSD_NOTIFY_CREATE, inode->i_mode, ++ inode->i_uid, inode->i_gid, fs_info); ++ return 0; ++} /* End Function devfs_symlink */ ++ ++static int devfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) ++{ ++ int err; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ struct devfs_entry *parent, *de; ++ struct inode *inode; ++ ++ mode = (mode & ~S_IFMT) | S_IFDIR; /* VFS doesn't pass S_IFMT part */ ++ parent = get_devfs_entry_from_vfs_inode(dir); ++ if (parent == NULL) ++ return -ENOENT; ++ de = _devfs_alloc_entry(dentry->d_name.name, dentry->d_name.len, mode); ++ if (!de) ++ return -ENOMEM; ++ de->vfs = TRUE; ++ if ((err = _devfs_append_entry(parent, de, NULL)) != 0) ++ return err; ++ de->inode.uid = current->euid; ++ de->inode.gid = current->egid; ++ de->inode.atime = CURRENT_TIME; ++ de->inode.mtime = CURRENT_TIME; ++ de->inode.ctime = CURRENT_TIME; ++ if ((inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry)) == NULL) ++ return -ENOMEM; ++ DPRINTK(DEBUG_DISABLED, "(%s): new VFS inode(%u): %p dentry: %p\n", ++ dentry->d_name.name, de->inode.ino, inode, dentry); ++ d_instantiate(dentry, inode); ++ if (!is_devfsd_or_child(fs_info)) ++ devfsd_notify_de(de, DEVFSD_NOTIFY_CREATE, inode->i_mode, ++ inode->i_uid, inode->i_gid, fs_info); ++ return 0; ++} /* End Function devfs_mkdir */ ++ ++static int devfs_rmdir(struct inode *dir, struct dentry *dentry) ++{ ++ int err = 0; ++ struct devfs_entry *de; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ struct inode *inode = dentry->d_inode; ++ ++ if (dir->i_sb->s_fs_info != inode->i_sb->s_fs_info) ++ return -EINVAL; ++ de = get_devfs_entry_from_vfs_inode(inode); ++ if (de == NULL) ++ return -ENOENT; ++ if (!S_ISDIR(de->mode)) ++ return -ENOTDIR; ++ if (!de->vfs) ++ return -EPERM; ++ /* First ensure the directory is empty and will stay that way */ ++ write_lock(&de->u.dir.lock); ++ if (de->u.dir.first) ++ err = -ENOTEMPTY; ++ else ++ de->u.dir.no_more_additions = TRUE; ++ write_unlock(&de->u.dir.lock); ++ if (err) ++ return err; ++ /* Now unhook the directory from its parent */ ++ write_lock(&de->parent->u.dir.lock); ++ if (!_devfs_unhook(de)) ++ err = -ENOENT; ++ write_unlock(&de->parent->u.dir.lock); ++ if (err) ++ return err; ++ if (!is_devfsd_or_child(fs_info)) ++ devfsd_notify_de(de, DEVFSD_NOTIFY_DELETE, inode->i_mode, ++ inode->i_uid, inode->i_gid, fs_info); ++ free_dentry(de); ++ devfs_put(de); ++ return 0; ++} /* End Function devfs_rmdir */ ++ ++static int devfs_mknod(struct inode *dir, struct dentry *dentry, int mode, ++ dev_t rdev) ++{ ++ int err; ++ struct fs_info *fs_info = dir->i_sb->s_fs_info; ++ struct devfs_entry *parent, *de; ++ struct inode *inode; ++ ++ DPRINTK(DEBUG_I_MKNOD, "(%s): mode: 0%o dev: %u:%u\n", ++ dentry->d_name.name, mode, MAJOR(rdev), MINOR(rdev)); ++ parent = get_devfs_entry_from_vfs_inode(dir); ++ if (parent == NULL) ++ return -ENOENT; ++ de = _devfs_alloc_entry(dentry->d_name.name, dentry->d_name.len, mode); ++ if (!de) ++ return -ENOMEM; ++ de->vfs = TRUE; ++ if (S_ISCHR(mode) || S_ISBLK(mode)) ++ de->u.dev = rdev; ++ if ((err = _devfs_append_entry(parent, de, NULL)) != 0) ++ return err; ++ de->inode.uid = current->euid; ++ de->inode.gid = current->egid; ++ de->inode.atime = CURRENT_TIME; ++ de->inode.mtime = CURRENT_TIME; ++ de->inode.ctime = CURRENT_TIME; ++ if ((inode = _devfs_get_vfs_inode(dir->i_sb, de, dentry)) == NULL) ++ return -ENOMEM; ++ DPRINTK(DEBUG_I_MKNOD, ": new VFS inode(%u): %p dentry: %p\n", ++ de->inode.ino, inode, dentry); ++ d_instantiate(dentry, inode); ++ if (!is_devfsd_or_child(fs_info)) ++ devfsd_notify_de(de, DEVFSD_NOTIFY_CREATE, inode->i_mode, ++ inode->i_uid, inode->i_gid, fs_info); ++ return 0; ++} /* End Function devfs_mknod */ ++ ++static void *devfs_follow_link(struct dentry *dentry, struct nameidata *nd) ++{ ++ struct devfs_entry *p = get_devfs_entry_from_vfs_inode(dentry->d_inode); ++ nd_set_link(nd, p ? p->u.symlink.linkname : ERR_PTR(-ENODEV)); ++ return NULL; ++} /* End Function devfs_follow_link */ ++ ++static struct inode_operations devfs_iops = { ++ .setattr = devfs_notify_change, ++}; ++ ++static struct inode_operations devfs_dir_iops = { ++ .lookup = devfs_lookup, ++ .unlink = devfs_unlink, ++ .symlink = devfs_symlink, ++ .mkdir = devfs_mkdir, ++ .rmdir = devfs_rmdir, ++ .mknod = devfs_mknod, ++ .setattr = devfs_notify_change, ++}; ++ ++static struct inode_operations devfs_symlink_iops = { ++ .readlink = generic_readlink, ++ .follow_link = devfs_follow_link, ++ .setattr = devfs_notify_change, ++}; ++ ++static int devfs_fill_super(struct super_block *sb, void *data, int silent) ++{ ++ struct inode *root_inode = NULL; ++ ++ if (_devfs_get_root_entry() == NULL) ++ goto out_no_root; ++ atomic_set(&fs_info.devfsd_overrun_count, 0); ++ init_waitqueue_head(&fs_info.devfsd_wait_queue); ++ init_waitqueue_head(&fs_info.revalidate_wait_queue); ++ fs_info.sb = sb; ++ sb->s_fs_info = &fs_info; ++ sb->s_blocksize = 1024; ++ sb->s_blocksize_bits = 10; ++ sb->s_magic = DEVFS_SUPER_MAGIC; ++ sb->s_op = &devfs_sops; ++ sb->s_time_gran = 1; ++ if ((root_inode = _devfs_get_vfs_inode(sb, root_entry, NULL)) == NULL) ++ goto out_no_root; ++ sb->s_root = d_alloc_root(root_inode); ++ if (!sb->s_root) ++ goto out_no_root; ++ DPRINTK(DEBUG_S_READ, "(): made devfs ptr: %p\n", sb->s_fs_info); ++ return 0; ++ ++ out_no_root: ++ PRINTK("(): get root inode failed\n"); ++ if (root_inode) ++ iput(root_inode); ++ return -EINVAL; ++} /* End Function devfs_fill_super */ ++ ++static int devfs_get_sb(struct file_system_type *fs_type, ++ int flags, const char *dev_name, ++ void *data, struct vfsmount *mnt) ++{ ++ return get_sb_single(fs_type, flags, data, devfs_fill_super, mnt); ++} ++ ++static struct file_system_type devfs_fs_type = { ++ .name = DEVFS_NAME, ++ .get_sb = devfs_get_sb, ++ .kill_sb = kill_anon_super, ++}; ++ ++/* File operations for devfsd follow */ ++ ++static ssize_t devfsd_read(struct file *file, char __user *buf, size_t len, ++ loff_t * ppos) ++{ ++ int done = FALSE; ++ int ival; ++ loff_t pos, devname_offset, tlen, rpos; ++ devfs_handle_t de; ++ struct devfsd_buf_entry *entry; ++ struct fs_info *fs_info = file->f_dentry->d_inode->i_sb->s_fs_info; ++ struct devfsd_notify_struct *info = fs_info->devfsd_info; ++ DECLARE_WAITQUEUE(wait, current); ++ ++ /* Verify the task has grabbed the queue */ ++ if (fs_info->devfsd_task != current) ++ return -EPERM; ++ info->major = 0; ++ info->minor = 0; ++ /* Block for a new entry */ ++ set_current_state(TASK_INTERRUPTIBLE); ++ add_wait_queue(&fs_info->devfsd_wait_queue, &wait); ++ while (devfsd_queue_empty(fs_info)) { ++ fs_info->devfsd_sleeping = TRUE; ++ wake_up(&fs_info->revalidate_wait_queue); ++ schedule(); ++ fs_info->devfsd_sleeping = FALSE; ++ if (signal_pending(current)) { ++ remove_wait_queue(&fs_info->devfsd_wait_queue, &wait); ++ __set_current_state(TASK_RUNNING); ++ return -EINTR; ++ } ++ set_current_state(TASK_INTERRUPTIBLE); ++ } ++ remove_wait_queue(&fs_info->devfsd_wait_queue, &wait); ++ __set_current_state(TASK_RUNNING); ++ /* Now play with the data */ ++ ival = atomic_read(&fs_info->devfsd_overrun_count); ++ info->overrun_count = ival; ++ entry = fs_info->devfsd_first_event; ++ info->type = entry->type; ++ info->mode = entry->mode; ++ info->uid = entry->uid; ++ info->gid = entry->gid; ++ de = entry->de; ++ if (S_ISCHR(de->mode) || S_ISBLK(de->mode)) { ++ info->major = MAJOR(de->u.dev); ++ info->minor = MINOR(de->u.dev); ++ } ++ pos = devfs_generate_path(de, info->devname, DEVFS_PATHLEN); ++ if (pos < 0) ++ return pos; ++ info->namelen = DEVFS_PATHLEN - pos - 1; ++ if (info->mode == 0) ++ info->mode = de->mode; ++ devname_offset = info->devname - (char *)info; ++ rpos = *ppos; ++ if (rpos < devname_offset) { ++ /* Copy parts of the header */ ++ tlen = devname_offset - rpos; ++ if (tlen > len) ++ tlen = len; ++ if (copy_to_user(buf, (char *)info + rpos, tlen)) { ++ return -EFAULT; ++ } ++ rpos += tlen; ++ buf += tlen; ++ len -= tlen; ++ } ++ if ((rpos >= devname_offset) && (len > 0)) { ++ /* Copy the name */ ++ tlen = info->namelen + 1; ++ if (tlen > len) ++ tlen = len; ++ else ++ done = TRUE; ++ if (copy_to_user ++ (buf, info->devname + pos + rpos - devname_offset, tlen)) { ++ return -EFAULT; ++ } ++ rpos += tlen; ++ } ++ tlen = rpos - *ppos; ++ if (done) { ++ devfs_handle_t parent; ++ ++ spin_lock(&fs_info->devfsd_buffer_lock); ++ fs_info->devfsd_first_event = entry->next; ++ if (entry->next == NULL) ++ fs_info->devfsd_last_event = NULL; ++ spin_unlock(&fs_info->devfsd_buffer_lock); ++ for (; de != NULL; de = parent) { ++ parent = de->parent; ++ devfs_put(de); ++ } ++ kmem_cache_free(devfsd_buf_cache, entry); ++ if (ival > 0) ++ atomic_sub(ival, &fs_info->devfsd_overrun_count); ++ *ppos = 0; ++ } else ++ *ppos = rpos; ++ return tlen; ++} /* End Function devfsd_read */ ++ ++static int devfsd_ioctl(struct inode *inode, struct file *file, ++ unsigned int cmd, unsigned long arg) ++{ ++ int ival; ++ struct fs_info *fs_info = inode->i_sb->s_fs_info; ++ ++ switch (cmd) { ++ case DEVFSDIOC_GET_PROTO_REV: ++ ival = DEVFSD_PROTOCOL_REVISION_KERNEL; ++ if (copy_to_user((void __user *)arg, &ival, sizeof ival)) ++ return -EFAULT; ++ break; ++ case DEVFSDIOC_SET_EVENT_MASK: ++ /* Ensure only one reader has access to the queue. This scheme will ++ work even if the global kernel lock were to be removed, because it ++ doesn't matter who gets in first, as long as only one gets it */ ++ if (fs_info->devfsd_task == NULL) { ++ static DEFINE_SPINLOCK(lock); ++ ++ if (!spin_trylock(&lock)) ++ return -EBUSY; ++ if (fs_info->devfsd_task != NULL) { /* We lost the race... */ ++ spin_unlock(&lock); ++ return -EBUSY; ++ } ++ fs_info->devfsd_task = current; ++ spin_unlock(&lock); ++ fs_info->devfsd_pgrp = ++ (process_group(current) == ++ current->pid) ? process_group(current) : 0; ++ fs_info->devfsd_file = file; ++ fs_info->devfsd_info = ++ kmalloc(sizeof *fs_info->devfsd_info, GFP_KERNEL); ++ if (!fs_info->devfsd_info) { ++ devfsd_close(inode, file); ++ return -ENOMEM; ++ } ++ } else if (fs_info->devfsd_task != current) ++ return -EBUSY; ++ fs_info->devfsd_event_mask = arg; /* Let the masses come forth */ ++ break; ++ case DEVFSDIOC_RELEASE_EVENT_QUEUE: ++ if (fs_info->devfsd_file != file) ++ return -EPERM; ++ return devfsd_close(inode, file); ++ /*break; */ ++#ifdef CONFIG_DEVFS_DEBUG ++ case DEVFSDIOC_SET_DEBUG_MASK: ++ if (copy_from_user(&ival, (void __user *)arg, sizeof ival)) ++ return -EFAULT; ++ devfs_debug = ival; ++ break; ++#endif ++ default: ++ return -ENOIOCTLCMD; ++ } ++ return 0; ++} /* End Function devfsd_ioctl */ ++ ++static int devfsd_close(struct inode *inode, struct file *file) ++{ ++ struct devfsd_buf_entry *entry, *next; ++ struct fs_info *fs_info = inode->i_sb->s_fs_info; ++ ++ if (fs_info->devfsd_file != file) ++ return 0; ++ fs_info->devfsd_event_mask = 0; ++ fs_info->devfsd_file = NULL; ++ spin_lock(&fs_info->devfsd_buffer_lock); ++ entry = fs_info->devfsd_first_event; ++ fs_info->devfsd_first_event = NULL; ++ fs_info->devfsd_last_event = NULL; ++ kfree(fs_info->devfsd_info); ++ fs_info->devfsd_info = NULL; ++ spin_unlock(&fs_info->devfsd_buffer_lock); ++ fs_info->devfsd_pgrp = 0; ++ fs_info->devfsd_task = NULL; ++ wake_up(&fs_info->revalidate_wait_queue); ++ for (; entry; entry = next) { ++ next = entry->next; ++ kmem_cache_free(devfsd_buf_cache, entry); ++ } ++ return 0; ++} /* End Function devfsd_close */ ++ ++#ifdef CONFIG_DEVFS_DEBUG ++static ssize_t stat_read(struct file *file, char __user *buf, size_t len, ++ loff_t * ppos) ++{ ++ ssize_t num; ++ char txt[80]; ++ ++ num = sprintf(txt, "Number of entries: %u number of bytes: %u\n", ++ stat_num_entries, stat_num_bytes) + 1; ++ if (*ppos >= num) ++ return 0; ++ if (*ppos + len > num) ++ len = num - *ppos; ++ if (copy_to_user(buf, txt + *ppos, len)) ++ return -EFAULT; ++ *ppos += len; ++ return len; ++} /* End Function stat_read */ ++#endif ++ ++static int __init init_devfs_fs(void) ++{ ++ int err; ++ int major; ++ struct devfs_entry *devfsd; ++#ifdef CONFIG_DEVFS_DEBUG ++ struct devfs_entry *stat; ++#endif ++ ++ if (_devfs_get_root_entry() == NULL) ++ return -ENOMEM; ++ ++ printk(KERN_INFO "%s: %s Richard Gooch (rgooch@atnf.csiro.au)\n", ++ DEVFS_NAME, DEVFS_VERSION); ++ devfsd_buf_cache = kmem_cache_create("devfsd_event", ++ sizeof(struct devfsd_buf_entry), ++ 0, 0, NULL, NULL); ++ if (!devfsd_buf_cache) ++ OOPS("(): unable to allocate event slab\n"); ++#ifdef CONFIG_DEVFS_DEBUG ++ devfs_debug = devfs_debug_init; ++ printk(KERN_INFO "%s: devfs_debug: 0x%0x\n", DEVFS_NAME, devfs_debug); ++#endif ++ printk(KERN_INFO "%s: boot_options: 0x%0x\n", DEVFS_NAME, boot_options); ++ ++ /* register special device for devfsd communication */ ++ major = register_chrdev(0, "devfs", &devfs_fops); ++ if (major < 0) ++ return major; ++ ++ /* And create the entry for ".devfsd" */ ++ devfsd = _devfs_alloc_entry(".devfsd", 0, S_IFCHR | S_IRUSR | S_IWUSR); ++ if (devfsd == NULL) ++ return -ENOMEM; ++ devfsd->u.dev = MKDEV(major, 0); ++ _devfs_append_entry(root_entry, devfsd, NULL); ++ ++#ifdef CONFIG_DEVFS_DEBUG ++ stat = _devfs_alloc_entry(".stat", 0, S_IFCHR | S_IRUGO); ++ if (stat == NULL) ++ return -ENOMEM; ++ stat->u.dev = MKDEV(major, 1); ++ _devfs_append_entry(root_entry, stat, NULL); ++#endif ++ ++ err = register_filesystem(&devfs_fs_type); ++ return err; ++} /* End Function init_devfs_fs */ ++ ++void __init mount_devfs_fs(void) ++{ ++ int err; ++ ++ if (!(boot_options & OPTION_MOUNT)) ++ return; ++ err = do_mount("none", "/dev", "devfs", 0, NULL); ++ if (err == 0) ++ printk(KERN_INFO "Mounted devfs on /dev\n"); ++ else ++ PRINTK("(): unable to mount devfs, err: %d\n", err); ++} /* End Function mount_devfs_fs */ ++ ++module_init(init_devfs_fs) +diff -urN linux-2.6.19.old/fs/devfs/Makefile linux-2.6.19.dev/fs/devfs/Makefile +--- linux-2.6.19.old/fs/devfs/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/fs/devfs/Makefile 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,8 @@ ++# ++# Makefile for the linux devfs-filesystem routines. ++# ++ ++obj-$(CONFIG_DEVFS_FS) += devfs.o ++ ++devfs-objs := base.o util.o ++ +diff -urN linux-2.6.19.old/fs/devfs/util.c linux-2.6.19.dev/fs/devfs/util.c +--- linux-2.6.19.old/fs/devfs/util.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/fs/devfs/util.c 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,97 @@ ++/* devfs (Device FileSystem) utilities. ++ ++ Copyright (C) 1999-2002 Richard Gooch ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Library General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library 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 ++ Library General Public License for more details. ++ ++ You should have received a copy of the GNU Library General Public ++ License along with this library; if not, write to the Free ++ Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ ++ Richard Gooch may be reached by email at rgooch@atnf.csiro.au ++ The postal address is: ++ Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia. ++ ++ ChangeLog ++ ++ 19991031 Richard Gooch <rgooch@atnf.csiro.au> ++ Created. ++ 19991103 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <_devfs_convert_name> and supported SCSI and IDE CD-ROMs ++ 20000203 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed operations pointer type to void *. ++ 20000621 Richard Gooch <rgooch@atnf.csiro.au> ++ Changed interface to <devfs_register_series>. ++ 20000622 Richard Gooch <rgooch@atnf.csiro.au> ++ Took account of interface change to <devfs_mk_symlink>. ++ Took account of interface change to <devfs_mk_dir>. ++ 20010519 Richard Gooch <rgooch@atnf.csiro.au> ++ Documentation cleanup. ++ 20010709 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_*alloc_major> and <devfs_*alloc_devnum>. ++ 20010710 Richard Gooch <rgooch@atnf.csiro.au> ++ Created <devfs_*alloc_unique_number>. ++ 20010730 Richard Gooch <rgooch@atnf.csiro.au> ++ Documentation typo fix. ++ 20010806 Richard Gooch <rgooch@atnf.csiro.au> ++ Made <block_semaphore> and <char_semaphore> private. ++ 20010813 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bug in <devfs_alloc_unique_number>: limited to 128 numbers ++ 20010818 Richard Gooch <rgooch@atnf.csiro.au> ++ Updated major masks up to Linus' "no new majors" proclamation. ++ Block: were 126 now 122 free, char: were 26 now 19 free. ++ 20020324 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bug in <devfs_alloc_unique_number>: was clearing beyond ++ bitfield. ++ 20020326 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed bitfield data type for <devfs_*alloc_devnum>. ++ Made major bitfield type and initialiser 64 bit safe. ++ 20020413 Richard Gooch <rgooch@atnf.csiro.au> ++ Fixed shift warning on 64 bit machines. ++ 20020428 Richard Gooch <rgooch@atnf.csiro.au> ++ Copied and used macro for error messages from fs/devfs/base.c ++ 20021013 Richard Gooch <rgooch@atnf.csiro.au> ++ Documentation fix. ++ 20030101 Adam J. Richter <adam@yggdrasil.com> ++ Eliminate DEVFS_SPECIAL_{CHR,BLK}. Use mode_t instead. ++ 20030106 Christoph Hellwig <hch@infradead.org> ++ Rewrite devfs_{,de}alloc_devnum to look like C code. ++*/ ++#include <linux/module.h> ++#include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> ++#include <linux/slab.h> ++#include <linux/vmalloc.h> ++#include <linux/genhd.h> ++#include <linux/bitops.h> ++ ++int devfs_register_tape(const char *name) ++{ ++ char tname[32], dest[64]; ++ static unsigned int tape_counter; ++ unsigned int n = tape_counter++; ++ ++ sprintf(dest, "../%s", name); ++ sprintf(tname, "tapes/tape%u", n); ++ devfs_mk_symlink(tname, dest); ++ ++ return n; ++} ++ ++EXPORT_SYMBOL(devfs_register_tape); ++ ++void devfs_unregister_tape(int num) ++{ ++ if (num >= 0) ++ devfs_remove("tapes/tape%u", num); ++} ++ ++EXPORT_SYMBOL(devfs_unregister_tape); +diff -urN linux-2.6.19.old/fs/Kconfig linux-2.6.19.dev/fs/Kconfig +--- linux-2.6.19.old/fs/Kconfig 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/Kconfig 2006-12-14 03:12:59.000000000 +0100 +@@ -957,6 +957,56 @@ + building a kernel for install/rescue disks or your system is very + limited in memory. + ++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 -urN linux-2.6.19.old/fs/Makefile linux-2.6.19.dev/fs/Makefile +--- linux-2.6.19.old/fs/Makefile 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/Makefile 2006-12-14 03:12:59.000000000 +0100 +@@ -76,6 +76,7 @@ + obj-$(CONFIG_VFAT_FS) += vfat/ + obj-$(CONFIG_BFS_FS) += bfs/ + obj-$(CONFIG_ISO9660_FS) += isofs/ ++obj-$(CONFIG_DEVFS_FS) += devfs/ + obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+ + obj-$(CONFIG_HFS_FS) += hfs/ + obj-$(CONFIG_ECRYPT_FS) += ecryptfs/ +diff -urN linux-2.6.19.old/fs/partitions/check.c linux-2.6.19.dev/fs/partitions/check.c +--- linux-2.6.19.old/fs/partitions/check.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/partitions/check.c 2006-12-14 03:12:59.000000000 +0100 +@@ -18,8 +18,10 @@ + #include <linux/fs.h> + #include <linux/kmod.h> + #include <linux/ctype.h> ++#include <linux/devfs_fs_kernel.h> + + #include "check.h" ++#include "devfs.h" + + #include "acorn.h" + #include "amiga.h" +@@ -159,11 +161,18 @@ + if (!state) + return NULL; + +- disk_name(hd, 0, state->name); +- printk(KERN_INFO " %s:", state->name); +- if (isdigit(state->name[strlen(state->name)-1])) ++#ifdef CONFIG_DEVFS_FS ++ if (hd->devfs_name[0] != '\0') { ++ printk(KERN_INFO " /dev/%s:", hd->devfs_name); + sprintf(state->name, "p"); +- ++ } ++#endif ++ else { ++ disk_name(hd, 0, state->name); ++ printk(KERN_INFO " %s:", state->name); ++ if (isdigit(state->name[strlen(state->name)-1])) ++ sprintf(state->name, "p"); ++ } + state->limit = hd->minors; + i = res = 0; + while (!res && check_part[i]) { +@@ -319,7 +328,7 @@ + p->nr_sects = 0; + p->ios[0] = p->ios[1] = 0; + p->sectors[0] = p->sectors[1] = 0; +- sysfs_remove_link(&p->kobj, "subsystem"); ++ devfs_remove("%s/part%d", disk->devfs_name, part); + if (p->holder_dir) + kobject_unregister(p->holder_dir); + kobject_uevent(&p->kobj, KOBJ_REMOVE); +@@ -339,7 +348,10 @@ + p->start_sect = start; + p->nr_sects = len; + p->partno = part; +- p->policy = disk->policy; ++ ++ devfs_mk_bdev(MKDEV(disk->major, disk->first_minor + part), ++ S_IFBLK|S_IRUSR|S_IWUSR, ++ "%s/part%d", disk->devfs_name, part); + + if (isdigit(disk->kobj.name[strlen(disk->kobj.name)-1])) + snprintf(p->kobj.name,KOBJ_NAME_LEN,"%sp%d",disk->kobj.name,part); +@@ -444,8 +456,14 @@ + disk_sysfs_add_subdirs(disk); + + /* No minors to use for partitions */ +- if (disk->minors == 1) ++ if (disk->minors == 1) { ++ if (disk->devfs_name[0] != '\0') ++ devfs_add_disk(disk); + goto exit; ++ } ++ ++ /* always add handle for the whole disk */ ++ devfs_add_partitioned(disk); + + /* No such device (e.g., media were just removed) */ + if (!get_capacity(disk)) +@@ -553,6 +571,8 @@ + disk_stat_set_all(disk, 0); + disk->stamp = 0; + ++ devfs_remove_disk(disk); ++ + kobject_uevent(&disk->kobj, KOBJ_REMOVE); + if (disk->holder_dir) + kobject_unregister(disk->holder_dir); +diff -urN linux-2.6.19.old/fs/partitions/devfs.c linux-2.6.19.dev/fs/partitions/devfs.c +--- linux-2.6.19.old/fs/partitions/devfs.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/fs/partitions/devfs.c 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,130 @@ ++/* ++ * This tries to keep block devices away from devfs as much as possible. ++ */ ++#include <linux/fs.h> ++#include <linux/devfs_fs_kernel.h> ++#include <linux/vmalloc.h> ++#include <linux/genhd.h> ++#include <linux/bitops.h> ++#include <linux/mutex.h> ++ ++ ++struct unique_numspace { ++ u32 num_free; /* Num free in bits */ ++ u32 length; /* Array length in bytes */ ++ unsigned long *bits; ++ struct semaphore mutex; ++}; ++ ++static DEFINE_MUTEX(numspace_mutex); ++ ++static int expand_numspace(struct unique_numspace *s) ++{ ++ u32 length; ++ void *bits; ++ ++ if (s->length < 16) ++ length = 16; ++ else ++ length = s->length << 1; ++ ++ bits = vmalloc(length); ++ if (!bits) ++ return -ENOMEM; ++ if (s->bits) { ++ memcpy(bits, s->bits, s->length); ++ vfree(s->bits); ++ } ++ ++ s->num_free = (length - s->length) << 3; ++ s->bits = bits; ++ memset(bits + s->length, 0, length - s->length); ++ s->length = length; ++ ++ return 0; ++} ++ ++static int alloc_unique_number(struct unique_numspace *s) ++{ ++ int rval = 0; ++ ++ mutex_lock(&numspace_mutex); ++ if (s->num_free < 1) ++ rval = expand_numspace(s); ++ if (!rval) { ++ rval = find_first_zero_bit(s->bits, s->length << 3); ++ --s->num_free; ++ __set_bit(rval, s->bits); ++ } ++ mutex_unlock(&numspace_mutex); ++ ++ return rval; ++} ++ ++static void dealloc_unique_number(struct unique_numspace *s, int number) ++{ ++ int old_val; ++ ++ if (number >= 0) { ++ mutex_lock(&numspace_mutex); ++ old_val = __test_and_clear_bit(number, s->bits); ++ if (old_val) ++ ++s->num_free; ++ mutex_unlock(&numspace_mutex); ++ } ++} ++ ++static struct unique_numspace disc_numspace; ++static struct unique_numspace cdrom_numspace; ++ ++void devfs_add_partitioned(struct gendisk *disk) ++{ ++ char dirname[64], symlink[16]; ++ ++ devfs_mk_dir(disk->devfs_name); ++ devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), ++ S_IFBLK|S_IRUSR|S_IWUSR, ++ "%s/disc", disk->devfs_name); ++ ++ disk->number = alloc_unique_number(&disc_numspace); ++ ++ sprintf(symlink, "discs/disc%d", disk->number); ++ sprintf(dirname, "../%s", disk->devfs_name); ++ devfs_mk_symlink(symlink, dirname); ++ ++} ++ ++void devfs_add_disk(struct gendisk *disk) ++{ ++ devfs_mk_bdev(MKDEV(disk->major, disk->first_minor), ++ (disk->flags & GENHD_FL_CD) ? ++ S_IFBLK|S_IRUGO|S_IWUGO : ++ S_IFBLK|S_IRUSR|S_IWUSR, ++ "%s", disk->devfs_name); ++ ++ if (disk->flags & GENHD_FL_CD) { ++ char dirname[64], symlink[16]; ++ ++ disk->number = alloc_unique_number(&cdrom_numspace); ++ ++ sprintf(symlink, "cdroms/cdrom%d", disk->number); ++ sprintf(dirname, "../%s", disk->devfs_name); ++ devfs_mk_symlink(symlink, dirname); ++ } ++} ++ ++void devfs_remove_disk(struct gendisk *disk) ++{ ++ if (disk->minors != 1) { ++ devfs_remove("discs/disc%d", disk->number); ++ dealloc_unique_number(&disc_numspace, disk->number); ++ devfs_remove("%s/disc", disk->devfs_name); ++ } ++ if (disk->flags & GENHD_FL_CD) { ++ devfs_remove("cdroms/cdrom%d", disk->number); ++ dealloc_unique_number(&cdrom_numspace, disk->number); ++ } ++ devfs_remove(disk->devfs_name); ++} ++ ++ +diff -urN linux-2.6.19.old/fs/partitions/devfs.h linux-2.6.19.dev/fs/partitions/devfs.h +--- linux-2.6.19.old/fs/partitions/devfs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/fs/partitions/devfs.h 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,10 @@ ++ ++#ifdef CONFIG_DEVFS_FS ++void devfs_add_disk(struct gendisk *dev); ++void devfs_add_partitioned(struct gendisk *dev); ++void devfs_remove_disk(struct gendisk *dev); ++#else ++# define devfs_add_disk(disk) do { } while (0) ++# define devfs_add_partitioned(disk) do { } while (0) ++# define devfs_remove_disk(disk) do { } while (0) ++#endif +diff -urN linux-2.6.19.old/fs/partitions/Makefile linux-2.6.19.dev/fs/partitions/Makefile +--- linux-2.6.19.old/fs/partitions/Makefile 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/fs/partitions/Makefile 2006-12-14 03:12:59.000000000 +0100 +@@ -4,6 +4,7 @@ + + obj-$(CONFIG_BLOCK) := check.o + ++obj-$(CONFIG_DEVFS_FS) += devfs.o + obj-$(CONFIG_ACORN_PARTITION) += acorn.o + obj-$(CONFIG_AMIGA_PARTITION) += amiga.o + obj-$(CONFIG_ATARI_PARTITION) += atari.o +diff -urN linux-2.6.19.old/include/asm-ppc/ocp.h linux-2.6.19.dev/include/asm-ppc/ocp.h +--- linux-2.6.19.old/include/asm-ppc/ocp.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/asm-ppc/ocp.h 2006-12-14 03:12:59.000000000 +0100 +@@ -26,6 +26,7 @@ + + #include <linux/init.h> + #include <linux/list.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/device.h> + + #include <asm/mmu.h> +diff -urN linux-2.6.19.old/include/linux/compat_ioctl.h linux-2.6.19.dev/include/linux/compat_ioctl.h +--- linux-2.6.19.old/include/linux/compat_ioctl.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/compat_ioctl.h 2006-12-14 03:12:59.000000000 +0100 +@@ -571,6 +571,11 @@ + COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST) + COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST) + COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT) ++/* DEVFS */ ++COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV) ++COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK) ++COMPATIBLE_IOCTL(DEVFSDIOC_RELEASE_EVENT_QUEUE) ++COMPATIBLE_IOCTL(DEVFSDIOC_SET_DEBUG_MASK) + /* Raw devices */ + COMPATIBLE_IOCTL(RAW_SETBIND) + COMPATIBLE_IOCTL(RAW_GETBIND) +diff -urN linux-2.6.19.old/include/linux/devfs_fs.h linux-2.6.19.dev/include/linux/devfs_fs.h +--- linux-2.6.19.old/include/linux/devfs_fs.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/devfs_fs.h 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,41 @@ ++#ifndef _LINUX_DEVFS_FS_H ++#define _LINUX_DEVFS_FS_H ++ ++#include <linux/ioctl.h> ++ ++#define DEVFSD_PROTOCOL_REVISION_KERNEL 5 ++ ++#define DEVFSD_IOCTL_BASE 'd' ++ ++/* These are the various ioctls */ ++#define DEVFSDIOC_GET_PROTO_REV _IOR(DEVFSD_IOCTL_BASE, 0, int) ++#define DEVFSDIOC_SET_EVENT_MASK _IOW(DEVFSD_IOCTL_BASE, 2, int) ++#define DEVFSDIOC_RELEASE_EVENT_QUEUE _IOW(DEVFSD_IOCTL_BASE, 3, int) ++#define DEVFSDIOC_SET_DEBUG_MASK _IOW(DEVFSD_IOCTL_BASE, 4, int) ++ ++#define DEVFSD_NOTIFY_REGISTERED 0 ++#define DEVFSD_NOTIFY_UNREGISTERED 1 ++#define DEVFSD_NOTIFY_ASYNC_OPEN 2 ++#define DEVFSD_NOTIFY_CLOSE 3 ++#define DEVFSD_NOTIFY_LOOKUP 4 ++#define DEVFSD_NOTIFY_CHANGE 5 ++#define DEVFSD_NOTIFY_CREATE 6 ++#define DEVFSD_NOTIFY_DELETE 7 ++ ++#define DEVFS_PATHLEN 1024 /* Never change this otherwise the ++ binary interface will change */ ++ ++struct devfsd_notify_struct { /* Use native C types to ensure same types in kernel and user space */ ++ unsigned int type; /* DEVFSD_NOTIFY_* value */ ++ unsigned int mode; /* Mode of the inode or device entry */ ++ unsigned int major; /* Major number of device entry */ ++ unsigned int minor; /* Minor number of device entry */ ++ unsigned int uid; /* Uid of process, inode or device entry */ ++ unsigned int gid; /* Gid of process, inode or device entry */ ++ unsigned int overrun_count; /* Number of lost events */ ++ unsigned int namelen; /* Number of characters not including '\0' */ ++ /* The device name MUST come last */ ++ char devname[DEVFS_PATHLEN]; /* This will be '\0' terminated */ ++}; ++ ++#endif /* _LINUX_DEVFS_FS_H */ +diff -urN linux-2.6.19.old/include/linux/devfs_fs_kernel.h linux-2.6.19.dev/include/linux/devfs_fs_kernel.h +--- linux-2.6.19.old/include/linux/devfs_fs_kernel.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/devfs_fs_kernel.h 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,58 @@ ++#ifndef _LINUX_DEVFS_FS_KERNEL_H ++#define _LINUX_DEVFS_FS_KERNEL_H ++ ++#include <linux/fs.h> ++#include <linux/autoconf.h> ++#include <linux/spinlock.h> ++#include <linux/types.h> ++ ++#include <asm/semaphore.h> ++ ++#define DEVFS_SUPER_MAGIC 0x1373 ++ ++#ifdef CONFIG_DEVFS_FS ++extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) ++ __attribute__ ((format(printf, 3, 4))); ++extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) ++ __attribute__ ((format(printf, 3, 4))); ++extern int devfs_mk_symlink(const char *name, const char *link); ++extern int devfs_mk_dir(const char *fmt, ...) ++ __attribute__ ((format(printf, 1, 2))); ++extern void devfs_remove(const char *fmt, ...) ++ __attribute__ ((format(printf, 1, 2))); ++extern int devfs_register_tape(const char *name); ++extern void devfs_unregister_tape(int num); ++extern void mount_devfs_fs(void); ++#else /* CONFIG_DEVFS_FS */ ++static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...) ++{ ++ return 0; ++} ++static inline int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...) ++{ ++ return 0; ++} ++static inline int devfs_mk_symlink(const char *name, const char *link) ++{ ++ return 0; ++} ++static inline int devfs_mk_dir(const char *fmt, ...) ++{ ++ return 0; ++} ++static inline void devfs_remove(const char *fmt, ...) ++{ ++} ++static inline int devfs_register_tape(const char *name) ++{ ++ return -1; ++} ++static inline void devfs_unregister_tape(int num) ++{ ++} ++static inline void mount_devfs_fs(void) ++{ ++ return; ++} ++#endif /* CONFIG_DEVFS_FS */ ++#endif /* _LINUX_DEVFS_FS_KERNEL_H */ +diff -urN linux-2.6.19.old/include/linux/fb.h linux-2.6.19.dev/include/linux/fb.h +--- linux-2.6.19.old/include/linux/fb.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/fb.h 2006-12-14 03:12:59.000000000 +0100 +@@ -379,6 +379,7 @@ + #include <linux/init.h> + #include <linux/device.h> + #include <linux/workqueue.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/notifier.h> + #include <linux/list.h> + #include <linux/backlight.h> +diff -urN linux-2.6.19.old/include/linux/genhd.h linux-2.6.19.dev/include/linux/genhd.h +--- linux-2.6.19.old/include/linux/genhd.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/genhd.h 2006-12-14 03:12:59.000000000 +0100 +@@ -114,6 +114,8 @@ + sector_t capacity; + + int flags; ++ char devfs_name[64]; /* devfs crap */ ++ int number; /* more of the same */ + struct device *driverfs_dev; + struct kobject kobj; + struct kobject *holder_dir; +diff -urN linux-2.6.19.old/include/linux/ide.h linux-2.6.19.dev/include/linux/ide.h +--- linux-2.6.19.old/include/linux/ide.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/ide.h 2006-12-14 03:12:59.000000000 +0100 +@@ -553,6 +553,7 @@ + struct hd_driveid *id; /* drive model identification info */ + struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ + struct ide_settings_s *settings;/* /proc/ide/ drive settings */ ++ char devfs_name[64]; /* devfs crap */ + + struct hwif_s *hwif; /* actually (ide_hwif_t *) */ + +diff -urN linux-2.6.19.old/include/linux/miscdevice.h linux-2.6.19.dev/include/linux/miscdevice.h +--- linux-2.6.19.old/include/linux/miscdevice.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/miscdevice.h 2006-12-14 03:12:59.000000000 +0100 +@@ -40,6 +40,7 @@ + struct list_head list; + struct device *dev; + struct class_device *class; ++ char devfs_name[64]; + }; + + extern int misc_register(struct miscdevice * misc); +diff -urN linux-2.6.19.old/include/linux/serial_core.h linux-2.6.19.dev/include/linux/serial_core.h +--- linux-2.6.19.old/include/linux/serial_core.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/serial_core.h 2006-12-14 03:12:59.000000000 +0100 +@@ -339,6 +339,7 @@ + struct module *owner; + const char *driver_name; + const char *dev_name; ++ const char *devfs_name; + int major; + int minor; + int nr; +diff -urN linux-2.6.19.old/include/linux/tty_driver.h linux-2.6.19.dev/include/linux/tty_driver.h +--- linux-2.6.19.old/include/linux/tty_driver.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/tty_driver.h 2006-12-14 03:12:59.000000000 +0100 +@@ -157,6 +157,7 @@ + struct cdev cdev; + struct module *owner; + const char *driver_name; ++ const char *devfs_name; + const char *name; + int name_base; /* offset of printed name */ + int major; /* major device number */ +@@ -251,6 +252,8 @@ + * called. This is to be used by drivers that have tty devices + * that can appear and disappear while the main tty driver is + * registered with the tty core. ++ * TTY_DRIVER_NO_DEVFS --- if set, do not create devfs entries. This ++ * is only used by tty_register_driver(). + * + * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead + * use dynamic memory keyed through the devpts filesystem. This +@@ -260,6 +263,7 @@ + #define TTY_DRIVER_RESET_TERMIOS 0x0002 + #define TTY_DRIVER_REAL_RAW 0x0004 + #define TTY_DRIVER_DYNAMIC_DEV 0x0008 ++#define TTY_DRIVER_NO_DEVFS 0x0008 + #define TTY_DRIVER_DEVPTS_MEM 0x0010 + + /* tty driver types */ +diff -urN linux-2.6.19.old/include/media/v4l2-dev.h linux-2.6.19.dev/include/media/v4l2-dev.h +--- linux-2.6.19.old/include/media/v4l2-dev.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/media/v4l2-dev.h 2006-12-14 03:12:59.000000000 +0100 +@@ -315,6 +315,7 @@ + /* for videodev.c intenal usage -- please don't touch */ + int users; /* video_exclusive_{open|close} ... */ + struct mutex lock; /* ... helper function uses these */ ++ char devfs_name[64]; /* devfs */ + struct class_device class_dev; /* sysfs */ + }; + +diff -urN linux-2.6.19.old/include/scsi/scsi_device.h linux-2.6.19.dev/include/scsi/scsi_device.h +--- linux-2.6.19.old/include/scsi/scsi_device.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/scsi/scsi_device.h 2006-12-14 03:12:59.000000000 +0100 +@@ -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 */ +diff -urN linux-2.6.19.old/include/sound/core.h linux-2.6.19.dev/include/sound/core.h +--- linux-2.6.19.old/include/sound/core.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/include/sound/core.h 2006-12-14 03:12:59.000000000 +0100 +@@ -188,6 +188,8 @@ + const struct file_operations *f_ops; /* file operations */ + void *private_data; /* private data for f_ops->open */ + struct class_device *class_dev; /* class device for sysfs */ ++ char name[0]; /* device name for devfs (keep ++ at the end of structure) */ + }; + + /* sound.c */ +diff -urN linux-2.6.19.old/init/do_mounts.c linux-2.6.19.dev/init/do_mounts.c +--- linux-2.6.19.old/init/do_mounts.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/init/do_mounts.c 2006-12-14 03:12:59.000000000 +0100 +@@ -335,7 +335,7 @@ + { + void *data = nfs_root_data(); + +- create_dev("/dev/root", ROOT_DEV); ++ create_dev("/dev/root", ROOT_DEV, root_device_name); + if (data && + do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0) + return 1; +@@ -397,7 +397,7 @@ + } + #endif + #ifdef CONFIG_BLOCK +- create_dev("/dev/root", ROOT_DEV); ++ create_dev("/dev/root", ROOT_DEV, root_device_name); + mount_block_root("/dev/root", root_mountflags); + #endif + } +@@ -409,6 +409,8 @@ + { + int is_floppy; + ++ mount_devfs(); ++ + if (root_delay) { + printk(KERN_INFO "Waiting %dsec before mounting root device...\n", + root_delay); +@@ -442,8 +444,10 @@ + + mount_root(); + out: ++ umount_devfs("/dev"); + sys_mount(".", "/", NULL, MS_MOVE, NULL); + sys_chroot("."); + security_sb_post_mountroot(); ++ mount_devfs_fs (); + } + +diff -urN linux-2.6.19.old/init/do_mounts_devfs.c linux-2.6.19.dev/init/do_mounts_devfs.c +--- linux-2.6.19.old/init/do_mounts_devfs.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/init/do_mounts_devfs.c 2006-12-14 03:12:59.000000000 +0100 +@@ -0,0 +1,137 @@ ++ ++#include <linux/kernel.h> ++#include <linux/dirent.h> ++#include <linux/string.h> ++ ++#include "do_mounts.h" ++ ++void __init mount_devfs(void) ++{ ++ sys_mount("devfs", "/dev", "devfs", 0, NULL); ++} ++ ++void __init umount_devfs(char *path) ++{ ++ sys_umount(path, 0); ++} ++ ++/* ++ * If the dir will fit in *buf, return its length. If it won't fit, return ++ * zero. Return -ve on error. ++ */ ++static int __init do_read_dir(int fd, void *buf, int len) ++{ ++ long bytes, n; ++ char *p = buf; ++ sys_lseek(fd, 0, 0); ++ ++ for (bytes = 0; bytes < len; bytes += n) { ++ n = sys_getdents64(fd, (struct linux_dirent64 *)(p + bytes), ++ len - bytes); ++ if (n < 0) ++ return n; ++ if (n == 0) ++ return bytes; ++ } ++ return 0; ++} ++ ++/* ++ * Try to read all of a directory. Returns the contents at *p, which ++ * is kmalloced memory. Returns the number of bytes read at *len. Returns ++ * NULL on error. ++ */ ++static void * __init read_dir(char *path, int *len) ++{ ++ int size; ++ int fd = sys_open(path, 0, 0); ++ ++ *len = 0; ++ if (fd < 0) ++ return NULL; ++ ++ for (size = 1 << 9; size <= (PAGE_SIZE << MAX_ORDER); size <<= 1) { ++ void *p = kmalloc(size, GFP_KERNEL); ++ int n; ++ if (!p) ++ break; ++ n = do_read_dir(fd, p, size); ++ if (n > 0) { ++ sys_close(fd); ++ *len = n; ++ return p; ++ } ++ kfree(p); ++ if (n == -EINVAL) ++ continue; /* Try a larger buffer */ ++ if (n < 0) ++ break; ++ } ++ sys_close(fd); ++ return NULL; ++} ++ ++/* ++ * recursively scan <path>, looking for a device node of type <dev> ++ */ ++static int __init find_in_devfs(char *path, unsigned dev) ++{ ++ char *end = path + strlen(path); ++ int rest = path + 64 - end; ++ int size; ++ char *p = read_dir(path, &size); ++ char *s; ++ ++ if (!p) ++ return -1; ++ for (s = p; s < p + size; s += ((struct linux_dirent64 *)s)->d_reclen) { ++ struct linux_dirent64 *d = (struct linux_dirent64 *)s; ++ if (strlen(d->d_name) + 2 > rest) ++ continue; ++ switch (d->d_type) { ++ case DT_BLK: ++ sprintf(end, "/%s", d->d_name); ++ if (bstat(path) != dev) ++ break; ++ kfree(p); ++ return 0; ++ case DT_DIR: ++ if (strcmp(d->d_name, ".") == 0) ++ break; ++ if (strcmp(d->d_name, "..") == 0) ++ break; ++ sprintf(end, "/%s", d->d_name); ++ if (find_in_devfs(path, dev) < 0) ++ break; ++ kfree(p); ++ return 0; ++ } ++ } ++ kfree(p); ++ return -1; ++} ++ ++/* ++ * create a device node called <name> which points to ++ * <devfs_name> if possible, otherwise find a device node ++ * which matches <dev> and make <name> a symlink pointing to it. ++ */ ++int __init create_dev(char *name, dev_t dev, char *devfs_name) ++{ ++ char path[64]; ++ ++ sys_unlink(name); ++ if (devfs_name && devfs_name[0]) { ++ if (strncmp(devfs_name, "/dev/", 5) == 0) ++ devfs_name += 5; ++ sprintf(path, "/dev/%s", devfs_name); ++ if (sys_access(path, 0) == 0) ++ return sys_symlink(devfs_name, name); ++ } ++ if (!dev) ++ return -1; ++ strcpy(path, "/dev"); ++ if (find_in_devfs(path, new_encode_dev(dev)) < 0) ++ return -1; ++ return sys_symlink(path + 5, name); ++} +diff -urN linux-2.6.19.old/init/do_mounts.h linux-2.6.19.dev/init/do_mounts.h +--- linux-2.6.19.old/init/do_mounts.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/init/do_mounts.h 2006-12-14 03:12:59.000000000 +0100 +@@ -6,6 +6,7 @@ + #include <linux/mount.h> + #include <linux/major.h> + #include <linux/root_dev.h> ++#include <linux/devfs_fs_kernel.h> + + void change_floppy(char *fmt, ...); + void mount_block_root(char *name, int flags); +@@ -13,12 +14,25 @@ + extern int root_mountflags; + extern char *root_device_name; + +-static inline int create_dev(char *name, dev_t dev) ++#ifdef CONFIG_DEVFS_FS ++ ++void mount_devfs(void); ++void umount_devfs(char *path); ++int create_dev(char *name, dev_t dev, char *devfs_name); ++ ++#else ++ ++static inline void mount_devfs(void) {} ++static inline void umount_devfs(const char *path) {} ++ ++static inline int create_dev(char *name, dev_t dev, char *devfs_name) + { + sys_unlink(name); + return sys_mknod(name, S_IFBLK|0600, new_encode_dev(dev)); + } + ++#endif ++ + #if BITS_PER_LONG == 32 + static inline u32 bstat(char *name) + { +diff -urN linux-2.6.19.old/init/do_mounts_initrd.c linux-2.6.19.dev/init/do_mounts_initrd.c +--- linux-2.6.19.old/init/do_mounts_initrd.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/init/do_mounts_initrd.c 2006-12-14 03:12:59.000000000 +0100 +@@ -43,7 +43,7 @@ + int pid; + + real_root_dev = new_encode_dev(ROOT_DEV); +- create_dev("/dev/root.old", Root_RAM0); ++ create_dev("/dev/root.old", Root_RAM0, NULL); + /* mount initrd on rootfs' /root */ + mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); + sys_mkdir("/old", 0700); +@@ -53,6 +53,7 @@ + sys_chdir("/root"); + sys_mount(".", "/", NULL, MS_MOVE, NULL); + sys_chroot("."); ++ mount_devfs_fs (); + + current->flags |= PF_NOFREEZE; + pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); +@@ -69,6 +70,7 @@ + sys_chroot("."); + sys_close(old_fd); + sys_close(root_fd); ++ umount_devfs("/old/dev"); + + if (new_decode_dev(real_root_dev) == Root_RAM0) { + sys_chdir("/old"); +@@ -104,7 +106,7 @@ + int __init initrd_load(void) + { + if (mount_initrd) { +- create_dev("/dev/ram", Root_RAM0); ++ create_dev("/dev/ram", Root_RAM0, NULL); + /* + * Load the initrd data into /dev/ram0. Execute it as initrd + * unless /dev/ram0 is supposed to be our actual root device, +diff -urN linux-2.6.19.old/init/do_mounts_md.c linux-2.6.19.dev/init/do_mounts_md.c +--- linux-2.6.19.old/init/do_mounts_md.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/init/do_mounts_md.c 2006-12-14 03:12:59.000000000 +0100 +@@ -121,18 +121,19 @@ + int err = 0; + char *devname; + mdu_disk_info_t dinfo; +- char name[16]; ++ char name[16], devfs_name[16]; + + minor = md_setup_args[ent].minor; + partitioned = md_setup_args[ent].partitioned; + devname = md_setup_args[ent].device_names; + + sprintf(name, "/dev/md%s%d", partitioned?"_d":"", minor); ++ sprintf(devfs_name, "/dev/md/%s%d", partitioned?"d":"", minor); + if (partitioned) + dev = MKDEV(mdp_major, minor << MdpMinorShift); + else + dev = MKDEV(MD_MAJOR, minor); +- create_dev(name, dev); ++ create_dev(name, dev, devfs_name); + for (i = 0; i < MD_SB_DISKS && devname != 0; i++) { + char *p; + char comp_name[64]; +@@ -267,7 +268,7 @@ + + void __init md_run_setup(void) + { +- create_dev("/dev/md0", MKDEV(MD_MAJOR, 0)); ++ create_dev("/dev/md0", MKDEV(MD_MAJOR, 0), "md/0"); + if (raid_noautodetect) + printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n"); + else { +diff -urN linux-2.6.19.old/init/main.c linux-2.6.19.dev/init/main.c +--- linux-2.6.19.old/init/main.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/init/main.c 2006-12-14 03:12:59.000000000 +0100 +@@ -12,6 +12,7 @@ + #include <linux/types.h> + #include <linux/module.h> + #include <linux/proc_fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/kernel.h> + #include <linux/syscalls.h> + #include <linux/string.h> +diff -urN linux-2.6.19.old/init/Makefile linux-2.6.19.dev/init/Makefile +--- linux-2.6.19.old/init/Makefile 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/init/Makefile 2006-12-14 03:12:59.000000000 +0100 +@@ -6,6 +6,7 @@ + obj-$(CONFIG_GENERIC_CALIBRATE_DELAY) += calibrate.o + + mounts-y := do_mounts.o ++mounts-$(CONFIG_DEVFS_FS) += do_mounts_devfs.o + mounts-$(CONFIG_BLK_DEV_RAM) += do_mounts_rd.o + mounts-$(CONFIG_BLK_DEV_INITRD) += do_mounts_initrd.o + mounts-$(CONFIG_BLK_DEV_MD) += do_mounts_md.o +diff -urN linux-2.6.19.old/mm/shmem.c linux-2.6.19.dev/mm/shmem.c +--- linux-2.6.19.old/mm/shmem.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/mm/shmem.c 2006-12-14 03:12:59.000000000 +0100 +@@ -25,6 +25,7 @@ + + #include <linux/module.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/fs.h> + #include <linux/xattr.h> + #include <linux/generic_acl.h> +@@ -2427,6 +2428,9 @@ + goto out2; + } + ++#ifdef CONFIG_TMPFS ++ devfs_mk_dir("shm"); ++#endif + shm_mnt = vfs_kern_mount(&tmpfs_fs_type, MS_NOUSER, + tmpfs_fs_type.name, NULL); + if (IS_ERR(shm_mnt)) { +diff -urN linux-2.6.19.old/mm/tiny-shmem.c linux-2.6.19.dev/mm/tiny-shmem.c +--- linux-2.6.19.old/mm/tiny-shmem.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/mm/tiny-shmem.c 2006-12-14 03:12:59.000000000 +0100 +@@ -12,6 +12,7 @@ + + #include <linux/fs.h> + #include <linux/init.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/vfs.h> + #include <linux/mount.h> + #include <linux/file.h> +@@ -32,6 +33,9 @@ + { + BUG_ON(register_filesystem(&tmpfs_fs_type) != 0); + ++#ifdef CONFIG_TMPFS ++ devfs_mk_dir("shm"); ++#endif + shm_mnt = kern_mount(&tmpfs_fs_type); + BUG_ON(IS_ERR(shm_mnt)); + +diff -urN linux-2.6.19.old/net/bluetooth/rfcomm/tty.c linux-2.6.19.dev/net/bluetooth/rfcomm/tty.c +--- linux-2.6.19.old/net/bluetooth/rfcomm/tty.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/net/bluetooth/rfcomm/tty.c 2006-12-14 03:12:59.000000000 +0100 +@@ -1039,12 +1039,13 @@ + + rfcomm_tty_driver->owner = THIS_MODULE; + rfcomm_tty_driver->driver_name = "rfcomm"; ++ rfcomm_tty_driver->devfs_name = "bluetooth/rfcomm/"; + rfcomm_tty_driver->name = "rfcomm"; + rfcomm_tty_driver->major = RFCOMM_TTY_MAJOR; + rfcomm_tty_driver->minor_start = RFCOMM_TTY_MINOR; + rfcomm_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; + rfcomm_tty_driver->subtype = SERIAL_TYPE_NORMAL; +- rfcomm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV; ++ rfcomm_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS; + rfcomm_tty_driver->init_termios = tty_std_termios; + rfcomm_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL; + tty_set_operations(rfcomm_tty_driver, &rfcomm_ops); +diff -urN linux-2.6.19.old/net/irda/ircomm/ircomm_tty.c linux-2.6.19.dev/net/irda/ircomm/ircomm_tty.c +--- linux-2.6.19.old/net/irda/ircomm/ircomm_tty.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/net/irda/ircomm/ircomm_tty.c 2006-12-14 03:12:59.000000000 +0100 +@@ -123,6 +123,7 @@ + driver->owner = THIS_MODULE; + driver->driver_name = "ircomm"; + driver->name = "ircomm"; ++ driver->devfs_name = "ircomm"; + driver->major = IRCOMM_TTY_MAJOR; + driver->minor_start = IRCOMM_TTY_MINOR; + driver->type = TTY_DRIVER_TYPE_SERIAL; +diff -urN linux-2.6.19.old/net/irda/irnet/irnet.h linux-2.6.19.dev/net/irda/irnet/irnet.h +--- linux-2.6.19.old/net/irda/irnet/irnet.h 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/net/irda/irnet/irnet.h 2006-12-14 03:12:59.000000000 +0100 +@@ -244,6 +244,7 @@ + #include <linux/skbuff.h> + #include <linux/tty.h> + #include <linux/proc_fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/netdevice.h> + #include <linux/miscdevice.h> + #include <linux/poll.h> +diff -urN linux-2.6.19.old/sound/core/info.c linux-2.6.19.dev/sound/core/info.c +--- linux-2.6.19.old/sound/core/info.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/sound/core/info.c 2006-12-14 03:12:59.000000000 +0100 +@@ -29,6 +29,7 @@ + #include <sound/info.h> + #include <sound/version.h> + #include <linux/proc_fs.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/mutex.h> + #include <stdarg.h> + +diff -urN linux-2.6.19.old/sound/core/sound.c linux-2.6.19.dev/sound/core/sound.c +--- linux-2.6.19.old/sound/core/sound.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/sound/core/sound.c 2006-12-14 03:12:59.000000000 +0100 +@@ -32,6 +32,7 @@ + #include <sound/control.h> + #include <sound/initval.h> + #include <linux/kmod.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/mutex.h> + + #define SNDRV_OS_MINORS 256 +@@ -41,6 +42,7 @@ + EXPORT_SYMBOL(snd_major); + + static int cards_limit = 1; ++static int device_mode = S_IFCHR | S_IRUGO | S_IWUGO; + + MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); + MODULE_DESCRIPTION("Advanced Linux Sound Architecture driver for soundcards."); +@@ -49,6 +51,10 @@ + MODULE_PARM_DESC(major, "Major # for sound driver."); + module_param(cards_limit, int, 0444); + MODULE_PARM_DESC(cards_limit, "Count of auto-loadable soundcards."); ++#ifdef CONFIG_DEVFS_FS ++module_param(device_mode, int, 0444); ++MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs."); ++#endif + MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR); + + /* this one holds the actual max. card number currently available. +@@ -244,7 +250,7 @@ + struct device *device = NULL; + + snd_assert(name, return -EINVAL); +- preg = kmalloc(sizeof *preg, GFP_KERNEL); ++ preg = kmalloc((sizeof *preg) + strlen(name) + 1, GFP_KERNEL); + if (preg == NULL) + return -ENOMEM; + preg->type = type; +@@ -252,6 +258,7 @@ + preg->device = dev; + preg->f_ops = f_ops; + preg->private_data = private_data; ++ strcpy(preg->name, name); /* for devfs */ + mutex_lock(&sound_mutex); + #ifdef CONFIG_SND_DYNAMIC_MINORS + minor = snd_find_free_minor(); +@@ -266,6 +273,8 @@ + return minor; + } + snd_minors[minor] = preg; ++ if (type != SNDRV_DEVICE_TYPE_CONTROL || preg->card >= cards_limit) ++ devfs_mk_cdev(MKDEV(major, minor), S_IFCHR | device_mode, "snd/%s", name); + if (card) + device = card->dev; + preg->class_dev = class_device_create(sound_class, NULL, +@@ -320,6 +329,9 @@ + return -EINVAL; + } + ++ if (snd_minors[minor]->type != SNDRV_DEVICE_TYPE_CONTROL || ++ snd_minors[minor]->card >= cards_limit) /* created in sound.c */ ++ devfs_remove("snd/%s", snd_minors[minor]->name); + class_device_destroy(sound_class, MKDEV(major, minor)); + + kfree(snd_minors[minor]); +@@ -430,17 +442,24 @@ + + static int __init alsa_sound_init(void) + { ++ short controlnum; ++ + snd_major = major; + snd_ecards_limit = cards_limit; ++ devfs_mk_dir("snd"); + if (register_chrdev(major, "alsa", &snd_fops)) { + snd_printk(KERN_ERR "unable to register native major device number %d\n", major); ++ devfs_remove("snd"); + return -EIO; + } + if (snd_info_init() < 0) { + unregister_chrdev(major, "alsa"); ++ devfs_remove("snd"); + return -ENOMEM; + } + snd_info_minor_register(); ++ for (controlnum = 0; controlnum < cards_limit; controlnum++) ++ devfs_mk_cdev(MKDEV(major, controlnum<<5), S_IFCHR | device_mode, "snd/controlC%d", controlnum); + #ifndef MODULE + printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n"); + #endif +@@ -449,10 +468,16 @@ + + static void __exit alsa_sound_exit(void) + { ++ short controlnum; ++ ++ for (controlnum = 0; controlnum < cards_limit; controlnum++) ++ devfs_remove("snd/controlC%d", controlnum); ++ + snd_info_minor_unregister(); + snd_info_done(); + if (unregister_chrdev(major, "alsa") != 0) + snd_printk(KERN_ERR "unable to unregister major device number %d\n", major); ++ devfs_remove("snd"); + } + + module_init(alsa_sound_init) +diff -urN linux-2.6.19.old/sound/oss/soundcard.c linux-2.6.19.dev/sound/oss/soundcard.c +--- linux-2.6.19.old/sound/oss/soundcard.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/sound/oss/soundcard.c 2006-12-14 03:12:59.000000000 +0100 +@@ -37,6 +37,7 @@ + #include <linux/wait.h> + #include <linux/slab.h> + #include <linux/ioport.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/major.h> + #include <linux/delay.h> + #include <linux/proc_fs.h> +@@ -557,6 +558,9 @@ + sound_dmap_flag = (dmabuf > 0 ? 1 : 0); + + for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { ++ devfs_mk_cdev(MKDEV(SOUND_MAJOR, dev_list[i].minor), ++ S_IFCHR | dev_list[i].mode, ++ "sound/%s", dev_list[i].name); + class_device_create(sound_class, NULL, + MKDEV(SOUND_MAJOR, dev_list[i].minor), + NULL, "%s", dev_list[i].name); +@@ -564,10 +568,15 @@ + if (!dev_list[i].num) + continue; + +- for (j = 1; j < *dev_list[i].num; j++) ++ for (j = 1; j < *dev_list[i].num; j++) { ++ devfs_mk_cdev(MKDEV(SOUND_MAJOR, ++ dev_list[i].minor + (j*0x10)), ++ S_IFCHR | dev_list[i].mode, ++ "sound/%s%d", dev_list[i].name, j); + class_device_create(sound_class, NULL, + MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), + NULL, "%s%d", dev_list[i].name, j); ++ } + } + + if (sound_nblocks >= 1024) +@@ -581,11 +590,14 @@ + int i, j; + + for (i = 0; i < sizeof (dev_list) / sizeof *dev_list; i++) { ++ devfs_remove("sound/%s", dev_list[i].name); + class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor)); + if (!dev_list[i].num) + continue; +- for (j = 1; j < *dev_list[i].num; j++) ++ for (j = 1; j < *dev_list[i].num; j++) { ++ devfs_remove("sound/%s%d", dev_list[i].name, j); + class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10))); ++ } + } + + unregister_sound_special(1); +diff -urN linux-2.6.19.old/sound/sound_core.c linux-2.6.19.dev/sound/sound_core.c +--- linux-2.6.19.old/sound/sound_core.c 2006-11-29 22:57:37.000000000 +0100 ++++ linux-2.6.19.dev/sound/sound_core.c 2006-12-14 03:12:59.000000000 +0100 +@@ -43,6 +43,7 @@ + #include <linux/sound.h> + #include <linux/major.h> + #include <linux/kmod.h> ++#include <linux/devfs_fs_kernel.h> + #include <linux/device.h> + + #define SOUND_STEP 16 +@@ -170,6 +171,8 @@ + else + sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); + ++ devfs_mk_cdev(MKDEV(SOUND_MAJOR, s->unit_minor), ++ S_IFCHR | mode, s->name); + class_device_create(sound_class, NULL, MKDEV(SOUND_MAJOR, s->unit_minor), + dev, s->name+6); + return r; +@@ -193,6 +196,7 @@ + p = __sound_remove_unit(list, unit); + spin_unlock(&sound_loader_lock); + if (p) { ++ devfs_remove(p->name); + class_device_destroy(sound_class, MKDEV(SOUND_MAJOR, p->unit_minor)); + kfree(p); + } +@@ -527,6 +531,7 @@ + /* We have nothing to really do here - we know the lists must be + empty */ + unregister_chrdev(SOUND_MAJOR, "sound"); ++ devfs_remove("sound"); + class_destroy(sound_class); + } + +@@ -536,6 +541,7 @@ + printk(KERN_ERR "soundcore: sound device already in use.\n"); + return -EBUSY; + } ++ devfs_mk_dir ("sound"); + sound_class = class_create(THIS_MODULE, "sound"); + if (IS_ERR(sound_class)) + return PTR_ERR(sound_class); diff --git a/target/linux/generic-2.6/patches/001-squashfs.patch b/target/linux/generic-2.6/patches/001-squashfs.patch index f88dbbae8e..6881cd0bb1 100644 --- a/target/linux/generic-2.6/patches/001-squashfs.patch +++ b/target/linux/generic-2.6/patches/001-squashfs.patch @@ -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; } diff --git a/target/linux/generic-2.6/patches/002-squashfs_lzma.patch b/target/linux/generic-2.6/patches/002-squashfs_lzma.patch index a166e84971..f32692bae5 100644 --- a/target/linux/generic-2.6/patches/002-squashfs_lzma.patch +++ b/target/linux/generic-2.6/patches/002-squashfs_lzma.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/004-extra_optimization.patch b/target/linux/generic-2.6/patches/004-extra_optimization.patch index 805d2f0ea9..3a8dfdcd00 100644 --- a/target/linux/generic-2.6/patches/004-extra_optimization.patch +++ b/target/linux/generic-2.6/patches/004-extra_optimization.patch @@ -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) diff --git a/target/linux/generic-2.6/patches/005-gcc4_fix.patch b/target/linux/generic-2.6/patches/005-gcc4_fix.patch deleted file mode 100644 index 99489b94b3..0000000000 --- a/target/linux/generic-2.6/patches/005-gcc4_fix.patch +++ /dev/null @@ -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 */ diff --git a/target/linux/generic-2.6/patches/006-gcc4_inline_fix.patch b/target/linux/generic-2.6/patches/006-gcc4_inline_fix.patch index e95663e382..32d0bc4713 100644 --- a/target/linux/generic-2.6/patches/006-gcc4_inline_fix.patch +++ b/target/linux/generic-2.6/patches/006-gcc4_inline_fix.patch @@ -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: diff --git a/target/linux/generic-2.6/patches/007-samsung_flash.patch b/target/linux/generic-2.6/patches/007-samsung_flash.patch index 93e371fa92..e48fe04b0d 100644 --- a/target/linux/generic-2.6/patches/007-samsung_flash.patch +++ b/target/linux/generic-2.6/patches/007-samsung_flash.patch @@ -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, " diff --git a/target/linux/generic-2.6/patches/010-disable_old_squashfs_compatibility.patch b/target/linux/generic-2.6/patches/010-disable_old_squashfs_compatibility.patch index 1b8b61a8ea..dbc0185d04 100644 --- a/target/linux/generic-2.6/patches/010-disable_old_squashfs_compatibility.patch +++ b/target/linux/generic-2.6/patches/010-disable_old_squashfs_compatibility.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/011-mips_boot.patch b/target/linux/generic-2.6/patches/011-mips_boot.patch index 611c70d460..e97b6316a2 100644 --- a/target/linux/generic-2.6/patches/011-mips_boot.patch +++ b/target/linux/generic-2.6/patches/011-mips_boot.patch @@ -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. - diff --git a/target/linux/generic-2.6/patches/050-mtdpart_redboot_byteswap_partition_truncate.patch b/target/linux/generic-2.6/patches/050-mtdpart_redboot_byteswap_partition_truncate.patch index 3aa60e0d9b..2d05792405 100644 --- a/target/linux/generic-2.6/patches/050-mtdpart_redboot_byteswap_partition_truncate.patch +++ b/target/linux/generic-2.6/patches/050-mtdpart_redboot_byteswap_partition_truncate.patch @@ -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); diff --git a/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch b/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch index ec3929bf13..62571c6bf8 100644 --- a/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch +++ b/target/linux/generic-2.6/patches/100-netfilter_layer7_2.1nbd.patch @@ -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();*/ + diff --git a/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch b/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch index 9841db99ed..e03f4d5676 100644 --- a/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch +++ b/target/linux/generic-2.6/patches/101-ipp2p_0.8.1rc1.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch b/target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch index 6d6939beee..2b4238c688 100644 --- a/target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch +++ b/target/linux/generic-2.6/patches/102-openswan-2.4.0.kernel-2.6-natt.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/103-netfilter-ipset.patch b/target/linux/generic-2.6/patches/103-netfilter-ipset.patch index fb75c8b7eb..8a35d8a6b4 100644 --- a/target/linux/generic-2.6/patches/103-netfilter-ipset.patch +++ b/target/linux/generic-2.6/patches/103-netfilter-ipset.patch @@ -1,6 +1,6 @@ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,489 @@ +#ifndef _IP_SET_H +#define _IP_SET_H @@ -12,7 +12,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* @@ -37,8 +37,8 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * - in order to "deal with" backward compatibility, renamed to ipset + */ + -+/* -+ * Used so that the kernel module and ipset-binary can match their versions ++/* ++ * Used so that the kernel module and ipset-binary can match their versions + */ +#define IP_SET_PROTOCOL_VERSION 2 + @@ -49,7 +49,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * + * The representation works in HOST byte order, because most set types + * will perform arithmetic operations and compare operations. -+ * ++ * + * For now the type is an uint32_t. + * + * Make sure to ONLY use the functions when translating and parsing @@ -98,8 +98,8 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * 200-299: list, save, restore + */ + -+/* Single shot operations: -+ * version, create, destroy, flush, rename and swap ++/* Single shot operations: ++ * version, create, destroy, flush, rename and swap + * + * Sets are identified by name. + */ @@ -150,7 +150,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + unsigned version; +}; + -+/* Double shots operations: ++/* Double shots operations: + * add, del, test, bind and unbind. + * + * First we query the kernel to get the index and type of the target set, @@ -192,7 +192,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i +}; + +#define IP_SET_OP_UNBIND_SET 0x00000105 /* Unbind an IP from a set */ -+/* Uses ip_set_req_bind, with type speficic addage ++/* Uses ip_set_req_bind, with type speficic addage + * index = 0 means unbinding for all sets */ + +#define IP_SET_OP_TEST_BIND_SET 0x00000106 /* Test binding an IP to a set */ @@ -238,7 +238,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i +#define IP_SET_OP_LIST 0x00000203 +struct ip_set_req_list { + IP_SET_REQ_BYINDEX; -+ /* sets number of struct ip_set_list in reply */ ++ /* sets number of struct ip_set_list in reply */ +}; + +struct ip_set_list { @@ -278,7 +278,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i +/* The restore operation */ +#define IP_SET_OP_RESTORE 0x00000205 +/* Uses ip_set_req_setnames followed by ip_set_restore structures -+ * plus a marker ip_set_restore, followed by ip_set_hash_save ++ * plus a marker ip_set_restore, followed by ip_set_hash_save + * structures. + */ +struct ip_set_restore { @@ -339,7 +339,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * return 0 if not in set, 1 if in set. + */ + int (*testip_kernel) (struct ip_set *set, -+ const struct sk_buff * skb, ++ const struct sk_buff * skb, + u_int32_t flags, + ip_set_ip_t *ip); + @@ -361,7 +361,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * and -ERANGE if the address lies outside the set bounds. + * If the address was not already in the set, 0 is returned. + */ -+ int (*addip) (struct ip_set *set, ++ int (*addip) (struct ip_set *set, + const void *data, size_t size, + ip_set_ip_t *ip); + @@ -371,7 +371,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * If the address was not already in the set, 0 is returned. + */ + int (*addip_kernel) (struct ip_set *set, -+ const struct sk_buff * skb, ++ const struct sk_buff * skb, + u_int32_t flags, + ip_set_ip_t *ip); + @@ -380,7 +380,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * and -ERANGE if the address lies outside the set bounds. + * If the address really was in the set, 0 is returned. + */ -+ int (*delip) (struct ip_set *set, ++ int (*delip) (struct ip_set *set, + const void *data, size_t size, + ip_set_ip_t *ip); + @@ -390,7 +390,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + * If the address really was in the set, 0 is returned. + */ + int (*delip_kernel) (struct ip_set *set, -+ const struct sk_buff * skb, ++ const struct sk_buff * skb, + u_int32_t flags, + ip_set_ip_t *ip); + @@ -421,11 +421,11 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + /* Listing: Get the header + * + * Fill in the information in "data". -+ * This function is always run after list_header_size() under a -+ * writelock on the set. Therefor is the length of "data" always -+ * correct. ++ * This function is always run after list_header_size() under a ++ * writelock on the set. Therefor is the length of "data" always ++ * correct. + */ -+ void (*list_header) (const struct ip_set *set, ++ void (*list_header) (const struct ip_set *set, + void *data); + + /* Listing: Get the size for the set members @@ -435,9 +435,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i + /* Listing: Get the set members + * + * Fill in the information in "data". -+ * This function is always run after list_member_size() under a -+ * writelock on the set. Therefor is the length of "data" always -+ * correct. ++ * This function is always run after list_member_size() under a ++ * writelock on the set. Therefor is the length of "data" always ++ * correct. + */ + void (*list_members) (const struct ip_set *set, + void *data); @@ -491,9 +491,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set.h linux-2.6.16-owrt/i +#endif /* __KERNEL__ */ + +#endif /*_IP_SET_H*/ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_iphash.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_iphash.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_iphash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_iphash.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_iphash.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_iphash.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_iphash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_iphash.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,30 @@ +#ifndef __IP_SET_IPHASH_H +#define __IP_SET_IPHASH_H @@ -525,9 +525,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_iphash.h linux-2.6.16 +}; + +#endif /* __IP_SET_IPHASH_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_ipmap.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_ipmap.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_ipmap.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_ipmap.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_ipmap.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_ipmap.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_ipmap.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_ipmap.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,56 @@ +#ifndef __IP_SET_IPMAP_H +#define __IP_SET_IPMAP_H @@ -561,14 +561,14 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_ipmap.h linux-2.6.16- +{ + unsigned int bits = 32; + ip_set_ip_t maskaddr; -+ ++ + if (mask == 0xFFFFFFFF) + return bits; -+ ++ + maskaddr = 0xFFFFFFFE; + while (--bits >= 0 && maskaddr != mask) + maskaddr <<= 1; -+ ++ + return bits; +} + @@ -576,18 +576,18 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_ipmap.h linux-2.6.16- +range_to_mask(ip_set_ip_t from, ip_set_ip_t to, unsigned int *bits) +{ + ip_set_ip_t mask = 0xFFFFFFFE; -+ ++ + *bits = 32; + while (--(*bits) >= 0 && mask && (to & mask) != from) + mask <<= 1; -+ ++ + return mask; +} -+ ++ +#endif /* __IP_SET_IPMAP_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_iptree.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_iptree.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_iptree.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_iptree.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_iptree.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_iptree.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_iptree.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_iptree.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,39 @@ +#ifndef __IP_SET_IPTREE_H +#define __IP_SET_IPTREE_H @@ -628,9 +628,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_iptree.h linux-2.6.16 +}; + +#endif /* __IP_SET_IPTREE_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_jhash.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_jhash.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_jhash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_jhash.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_jhash.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_jhash.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_jhash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_jhash.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,148 @@ +#ifndef _LINUX_IPSET_JHASH_H +#define _LINUX_IPSET_JHASH_H @@ -780,9 +780,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_jhash.h linux-2.6.16- +} + +#endif /* _LINUX_IPSET_JHASH_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_macipmap.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_macipmap.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_macipmap.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_macipmap.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_macipmap.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_macipmap.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_macipmap.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_macipmap.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,38 @@ +#ifndef __IP_SET_MACIPMAP_H +#define __IP_SET_MACIPMAP_H @@ -822,9 +822,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_macipmap.h linux-2.6. +}; + +#endif /* __IP_SET_MACIPMAP_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_malloc.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_malloc.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_malloc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_malloc.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_malloc.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_malloc.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_malloc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_malloc.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,42 @@ +#ifndef _IP_SET_MALLOC_H +#define _IP_SET_MALLOC_H @@ -868,9 +868,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_malloc.h linux-2.6.16 +#endif /* __KERNEL__ */ + +#endif /*_IP_SET_MALLOC_H*/ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_nethash.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_nethash.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_nethash.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_nethash.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_nethash.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_nethash.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_nethash.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_nethash.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,55 @@ +#ifndef __IP_SET_NETHASH_H +#define __IP_SET_NETHASH_H @@ -903,7 +903,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_nethash.h linux-2.6.1 + +static unsigned char shifts[] = {255, 253, 249, 241, 225, 193, 129, 1}; + -+static inline ip_set_ip_t ++static inline ip_set_ip_t +pack(ip_set_ip_t ip, unsigned char cidr) +{ + ip_set_ip_t addr, *paddr = &addr; @@ -914,7 +914,7 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_nethash.h linux-2.6.1 + DP("ip:%u.%u.%u.%u/%u", NIPQUAD(addr), cidr); +#endif + n = cidr / 8; -+ t = cidr % 8; ++ t = cidr % 8; + a = &((unsigned char *)paddr)[n]; + *a = *a /(1 << (8 - t)) + shifts[t]; +#ifdef __KERNEL__ @@ -927,9 +927,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_nethash.h linux-2.6.1 +} + +#endif /* __IP_SET_NETHASH_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_portmap.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_portmap.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_portmap.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_portmap.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_portmap.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_portmap.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_portmap.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_portmap.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,25 @@ +#ifndef __IP_SET_PORTMAP_H +#define __IP_SET_PORTMAP_H @@ -956,9 +956,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_portmap.h linux-2.6.1 +}; + +#endif /* __IP_SET_PORTMAP_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_prime.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_prime.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ip_set_prime.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ip_set_prime.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_prime.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_prime.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ip_set_prime.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ip_set_prime.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,34 @@ +#ifndef __IP_SET_PRIME_H +#define __IP_SET_PRIME_H @@ -994,9 +994,9 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ip_set_prime.h linux-2.6.16- +} + +#endif /* __IP_SET_PRIME_H */ -diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ipt_set.h linux-2.6.16-owrt/include/linux/netfilter_ipv4/ipt_set.h ---- linux-2.6.16/include/linux/netfilter_ipv4/ipt_set.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/include/linux/netfilter_ipv4/ipt_set.h 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_set.h linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_set.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/ipt_set.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/ipt_set.h 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,21 @@ +#ifndef _IPT_SET_H +#define _IPT_SET_H @@ -1019,9 +1019,136 @@ diff -Nur linux-2.6.16/include/linux/netfilter_ipv4/ipt_set.h linux-2.6.16-owrt/ +}; + +#endif /*_IPT_SET_H*/ -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/include/linux/netfilter_ipv4/listhelp.h linux-2.6.19.dev/include/linux/netfilter_ipv4/listhelp.h +--- linux-2.6.19.old/include/linux/netfilter_ipv4/listhelp.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/include/linux/netfilter_ipv4/listhelp.h 2006-12-14 03:13:43.000000000 +0100 +@@ -0,0 +1,123 @@ ++#ifndef _LISTHELP_H ++#define _LISTHELP_H ++#include <linux/list.h> ++ ++/* Header to do more comprehensive job than linux/list.h; assume list ++ is first entry in structure. */ ++ ++/* Return pointer to first true entry, if any, or NULL. A macro ++ required to allow inlining of cmpfn. */ ++#define LIST_FIND(head, cmpfn, type, args...) \ ++({ \ ++ const struct list_head *__i, *__j = NULL; \ ++ \ ++ ASSERT_READ_LOCK(head); \ ++ list_for_each(__i, (head)) \ ++ if (cmpfn((const type)__i , ## args)) { \ ++ __j = __i; \ ++ break; \ ++ } \ ++ (type)__j; \ ++}) ++ ++#define LIST_FIND_W(head, cmpfn, type, args...) \ ++({ \ ++ const struct list_head *__i, *__j = NULL; \ ++ \ ++ ASSERT_WRITE_LOCK(head); \ ++ list_for_each(__i, (head)) \ ++ if (cmpfn((type)__i , ## args)) { \ ++ __j = __i; \ ++ break; \ ++ } \ ++ (type)__j; \ ++}) ++ ++/* Just like LIST_FIND but we search backwards */ ++#define LIST_FIND_B(head, cmpfn, type, args...) \ ++({ \ ++ const struct list_head *__i, *__j = NULL; \ ++ \ ++ ASSERT_READ_LOCK(head); \ ++ list_for_each_prev(__i, (head)) \ ++ if (cmpfn((const type)__i , ## args)) { \ ++ __j = __i; \ ++ break; \ ++ } \ ++ (type)__j; \ ++}) ++ ++static inline int ++__list_cmp_same(const void *p1, const void *p2) { return p1 == p2; } ++ ++/* Is this entry in the list? */ ++static inline int ++list_inlist(struct list_head *head, const void *entry) ++{ ++ return LIST_FIND(head, __list_cmp_same, void *, entry) != NULL; ++} ++ ++/* Delete from list. */ ++#ifdef CONFIG_NETFILTER_DEBUG ++#define LIST_DELETE(head, oldentry) \ ++do { \ ++ ASSERT_WRITE_LOCK(head); \ ++ if (!list_inlist(head, oldentry)) \ ++ printk("LIST_DELETE: %s:%u `%s'(%p) not in %s.\n", \ ++ __FILE__, __LINE__, #oldentry, oldentry, #head); \ ++ else list_del((struct list_head *)oldentry); \ ++} while(0) ++#else ++#define LIST_DELETE(head, oldentry) list_del((struct list_head *)oldentry) ++#endif ++ ++/* Append. */ ++static inline void ++list_append(struct list_head *head, void *new) ++{ ++ ASSERT_WRITE_LOCK(head); ++ list_add((new), (head)->prev); ++} ++ ++/* Prepend. */ ++static inline void ++list_prepend(struct list_head *head, void *new) ++{ ++ ASSERT_WRITE_LOCK(head); ++ list_add(new, head); ++} ++ ++/* Insert according to ordering function; insert before first true. */ ++#define LIST_INSERT(head, new, cmpfn) \ ++do { \ ++ struct list_head *__i; \ ++ ASSERT_WRITE_LOCK(head); \ ++ list_for_each(__i, (head)) \ ++ if ((new), (typeof (new))__i) \ ++ break; \ ++ list_add((struct list_head *)(new), __i->prev); \ ++} while(0) ++ ++/* If the field after the list_head is a nul-terminated string, you ++ can use these functions. */ ++static inline int __list_cmp_name(const void *i, const char *name) ++{ ++ return strcmp(name, i+sizeof(struct list_head)) == 0; ++} ++ ++/* Returns false if same name already in list, otherwise does insert. */ ++static inline int ++list_named_insert(struct list_head *head, void *new) ++{ ++ if (LIST_FIND(head, __list_cmp_name, void *, ++ new + sizeof(struct list_head))) ++ return 0; ++ list_prepend(head, new); ++ return 1; ++} ++ ++/* Find this named element in the list. */ ++#define list_named_find(head, name) \ ++LIST_FIND(head, __list_cmp_name, void *, name) ++ ++#endif /*_LISTHELP_H*/ +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,1989 @@ +/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> + * Patrick Schaaf <bof@bof.de> @@ -1029,12 +1156,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module for IP set management */ + -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/kmod.h> @@ -1066,12 +1193,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + +/* + * Sets are identified either by the index in ip_set_list or by id. -+ * The id never changes and is used to find a key in the hash. -+ * The index may change by swapping and used at all other places ++ * The id never changes and is used to find a key in the hash. ++ * The index may change by swapping and used at all other places + * (set/SET netfilter modules, binding value, etc.) + * + * Userspace requests are serialized by ip_set_mutex and sets can -+ * be deleted only from userspace. Therefore ip_set_list locking ++ * be deleted only from userspace. Therefore ip_set_list locking + * must obey the following rules: + * + * - kernel requests: read and write locking mandatory @@ -1104,29 +1231,29 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne +static ip_set_id_t +ip_set_find_in_hash(ip_set_id_t id, ip_set_ip_t ip) +{ -+ u_int32_t key = jhash_2words(id, ip, ip_set_hash_random) ++ u_int32_t key = jhash_2words(id, ip, ip_set_hash_random) + % ip_set_bindings_hash_size; + struct ip_set_hash *set_hash; + + ASSERT_READ_LOCK(&ip_set_lock); + IP_SET_ASSERT(ip_set_list[id]); -+ DP("set: %s, ip: %u.%u.%u.%u", ip_set_list[id]->name, HIPQUAD(ip)); -+ ++ DP("set: %s, ip: %u.%u.%u.%u", ip_set_list[id]->name, HIPQUAD(ip)); ++ + set_hash = LIST_FIND(&ip_set_hash[key], ip_hash_cmp, + struct ip_set_hash *, id, ip); -+ -+ DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name, ++ ++ DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name, + HIPQUAD(ip), + set_hash != NULL ? ip_set_list[set_hash->binding]->name : ""); + + return (set_hash != NULL ? set_hash->binding : IP_SET_INVALID_ID); +} + -+static inline void ++static inline void +__set_hash_del(struct ip_set_hash *set_hash) +{ + ASSERT_WRITE_LOCK(&ip_set_lock); -+ IP_SET_ASSERT(ip_set_list[set_hash->binding]); ++ IP_SET_ASSERT(ip_set_list[set_hash->binding]); + + __ip_set_put(set_hash->binding); + list_del(&set_hash->list); @@ -1139,9 +1266,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + u_int32_t key = jhash_2words(id, ip, ip_set_hash_random) + % ip_set_bindings_hash_size; + struct ip_set_hash *set_hash; -+ ++ + IP_SET_ASSERT(ip_set_list[id]); -+ DP("set: %s, ip: %u.%u.%u.%u", ip_set_list[id]->name, HIPQUAD(ip)); ++ DP("set: %s, ip: %u.%u.%u.%u", ip_set_list[id]->name, HIPQUAD(ip)); + write_lock_bh(&ip_set_lock); + set_hash = LIST_FIND(&ip_set_hash[key], ip_hash_cmp, + struct ip_set_hash *, id, ip); @@ -1155,17 +1282,17 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + return 0; +} + -+static int ++static int +ip_set_hash_add(ip_set_id_t id, ip_set_ip_t ip, ip_set_id_t binding) +{ + u_int32_t key = jhash_2words(id, ip, ip_set_hash_random) + % ip_set_bindings_hash_size; + struct ip_set_hash *set_hash; + int ret = 0; -+ ++ + IP_SET_ASSERT(ip_set_list[id]); + IP_SET_ASSERT(ip_set_list[binding]); -+ DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name, ++ DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name, + HIPQUAD(ip), ip_set_list[binding]->name); + write_lock_bh(&ip_set_lock); + set_hash = LIST_FIND(&ip_set_hash[key], ip_hash_cmp, @@ -1181,7 +1308,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + set_hash->ip = ip; + list_add(&ip_set_hash[key], &set_hash->list); + } else { -+ IP_SET_ASSERT(ip_set_list[set_hash->binding]); ++ IP_SET_ASSERT(ip_set_list[set_hash->binding]); + DP("overwrite binding: %s", + ip_set_list[set_hash->binding]->name); + __ip_set_put(set_hash->binding); @@ -1230,7 +1357,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + struct ip_set *set; + ip_set_ip_t ip; + int res, i = 0; -+ ++ + IP_SET_ASSERT(flags[i]); + read_lock_bh(&ip_set_lock); + do { @@ -1240,8 +1367,8 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + read_lock_bh(&set->lock); + res = set->type->testip_kernel(set, skb, flags[i], &ip); + read_unlock_bh(&set->lock); -+ } while (res > 0 -+ && flags[++i] ++ } while (res > 0 ++ && flags[++i] + && follow_bindings(index, set, ip)); + read_unlock_bh(&ip_set_lock); + @@ -1268,7 +1395,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + res = set->type->addip_kernel(set, skb, flags[i], &ip); + write_unlock_bh(&set->lock); + } while ((res == 0 || res == -EEXIST) -+ && flags[++i] ++ && flags[++i] + && follow_bindings(index, set, ip)); + read_unlock_bh(&ip_set_lock); + @@ -1297,7 +1424,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + res = set->type->delip_kernel(set, skb, flags[i], &ip); + write_unlock_bh(&set->lock); + } while ((res == 0 || res == -EEXIST) -+ && flags[++i] ++ && flags[++i] + && follow_bindings(index, set, ip)); + read_unlock_bh(&ip_set_lock); +} @@ -1319,11 +1446,11 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + name); +} + -+int ++int +ip_set_register_set_type(struct ip_set_type *set_type) +{ + int ret = 0; -+ ++ + if (set_type->protocol_version != IP_SET_PROTOCOL_VERSION) { + ip_set_printk("'%s' uses wrong protocol version %u (want %u)", + set_type->typename, @@ -1335,7 +1462,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + write_lock_bh(&ip_set_lock); + if (find_set_type(set_type->typename)) { + /* Duplicate! */ -+ ip_set_printk("'%s' already registered!", ++ ip_set_printk("'%s' already registered!", + set_type->typename); + ret = -EINVAL; + goto unlock; @@ -1381,7 +1508,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne +ip_set_get_byname(const char *name) +{ + ip_set_id_t i, index = IP_SET_INVALID_ID; -+ ++ + down(&ip_set_app_mutex); + for (i = 0; i < ip_set_max; i++) { + if (ip_set_list[i] != NULL @@ -1407,12 +1534,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + + if (index >= ip_set_max) + return IP_SET_INVALID_ID; -+ ++ + if (ip_set_list[index]) + __ip_set_get(index); + else + index = IP_SET_INVALID_ID; -+ ++ + up(&ip_set_app_mutex); + return index; +} @@ -1435,7 +1562,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne +ip_set_find_byname(const char *name) +{ + ip_set_id_t i, index = IP_SET_INVALID_ID; -+ ++ + for (i = 0; i < ip_set_max; i++) { + if (ip_set_list[i] != NULL + && strcmp(ip_set_list[i]->name, name) == 0) { @@ -1451,7 +1578,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne +{ + if (index >= ip_set_max || ip_set_list[index] == NULL) + index = IP_SET_INVALID_ID; -+ ++ + return index; +} + @@ -1482,7 +1609,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + struct ip_set *set = ip_set_list[index]; + ip_set_ip_t ip; + int res; -+ ++ + IP_SET_ASSERT(set); + do { + write_lock_bh(&set->lock); @@ -1514,7 +1641,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + struct ip_set *set = ip_set_list[index]; + ip_set_ip_t ip; + int res; -+ ++ + IP_SET_ASSERT(set); + write_lock_bh(&set->lock); + res = set->type->delip(set, @@ -1558,18 +1685,18 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + IP_SET_ASSERT(set); + if (size < sizeof(struct ip_set_req_bind)) + return -EINVAL; -+ ++ + req_bind = (struct ip_set_req_bind *) data; + req_bind->binding[IP_SET_MAXNAMELEN - 1] = '\0'; + + if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) { + /* Default binding of a set */ + char *binding_name; -+ ++ + if (size != sizeof(struct ip_set_req_bind) + IP_SET_MAXNAMELEN) + return -EINVAL; + -+ binding_name = (char *)(data + sizeof(struct ip_set_req_bind)); ++ binding_name = (char *)(data + sizeof(struct ip_set_req_bind)); + binding_name[IP_SET_MAXNAMELEN - 1] = '\0'; + + binding = ip_set_find_byname(binding_name); @@ -1596,7 +1723,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + &ip); + DP("set %s, ip: %u.%u.%u.%u, binding %s", + set->name, HIPQUAD(ip), ip_set_list[binding]->name); -+ ++ + if (res >= 0) + res = ip_set_hash_add(set->id, ip, binding); + @@ -1645,10 +1772,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + DP(""); + if (size < sizeof(struct ip_set_req_bind)) + return -EINVAL; -+ ++ + req_bind = (struct ip_set_req_bind *) data; + req_bind->binding[IP_SET_MAXNAMELEN - 1] = '\0'; -+ ++ + DP("%u %s", index, req_bind->binding); + if (index == IP_SET_INVALID_ID) { + /* unbind :all: */ @@ -1668,7 +1795,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + DP("unreachable reached!"); + return -EINVAL; + } -+ ++ + set = ip_set_list[index]; + IP_SET_ASSERT(set); + if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) { @@ -1677,7 +1804,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + + if (binding == IP_SET_INVALID_ID) + return -ENOENT; -+ ++ + write_lock_bh(&ip_set_lock); + /* Sets in hash values are referenced */ + __ip_set_put(set->binding); @@ -1693,7 +1820,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + write_unlock_bh(&ip_set_lock); + return 0; + } -+ ++ + res = __ip_set_testip(set, + data + sizeof(struct ip_set_req_bind), + size - sizeof(struct ip_set_req_bind), @@ -1720,24 +1847,24 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + IP_SET_ASSERT(set); + if (size < sizeof(struct ip_set_req_bind)) + return -EINVAL; -+ ++ + req_bind = (struct ip_set_req_bind *) data; + req_bind->binding[IP_SET_MAXNAMELEN - 1] = '\0'; + + if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) { + /* Default binding of set */ + char *binding_name; -+ ++ + if (size != sizeof(struct ip_set_req_bind) + IP_SET_MAXNAMELEN) + return -EINVAL; + -+ binding_name = (char *)(data + sizeof(struct ip_set_req_bind)); ++ binding_name = (char *)(data + sizeof(struct ip_set_req_bind)); + binding_name[IP_SET_MAXNAMELEN - 1] = '\0'; + + binding = ip_set_find_byname(binding_name); + if (binding == IP_SET_INVALID_ID) + return -ENOENT; -+ ++ + res = (set->binding == binding) ? -EEXIST : 0; + + return res; @@ -1745,15 +1872,15 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + binding = ip_set_find_byname(req_bind->binding); + if (binding == IP_SET_INVALID_ID) + return -ENOENT; -+ -+ ++ ++ + res = __ip_set_testip(set, + data + sizeof(struct ip_set_req_bind), + size - sizeof(struct ip_set_req_bind), + &ip); + DP("set %s, ip: %u.%u.%u.%u, binding %s", + set->name, HIPQUAD(ip), ip_set_list[binding]->name); -+ ++ + if (res >= 0) + res = (ip_set_find_in_hash(set->id, ip) == binding) + ? -EEXIST : 0; @@ -1765,7 +1892,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne +find_set_type_rlock(const char *typename) +{ + struct ip_set_type *type; -+ ++ + read_lock_bh(&ip_set_lock); + type = find_set_type(typename); + if (type == NULL) @@ -1794,7 +1921,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + /* No free slot remained */ + return -ERANGE; + /* Check that index is usable as id (swapping) */ -+ check: ++ check: + for (i = 0; i < ip_set_max; i++) { + if (ip_set_list[i] != NULL + && ip_set_list[i]->id == *id) { @@ -1874,7 +2001,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + + /* + * Here, we have a valid, constructed set. &ip_set_lock again, -+ * find free id/index and check that it is not already in ++ * find free id/index and check that it is not already in + * ip_set_list. + */ + write_lock_bh(&ip_set_lock); @@ -1889,7 +2016,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + res = -ERANGE; + goto cleanup; + } -+ ++ + /* + * Finally! Add our shiny new set to the list, and be done. + */ @@ -1898,7 +2025,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + ip_set_list[index] = set; + write_unlock_bh(&ip_set_lock); + return res; -+ ++ + cleanup: + write_unlock_bh(&ip_set_lock); + set->type->destroy(set); @@ -1948,7 +2075,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + ip_set_destroy_set(index); + } else { + for (i = 0; i < ip_set_max; i++) { -+ if (ip_set_list[i] != NULL ++ if (ip_set_list[i] != NULL + && (atomic_read(&ip_set_list[i]->ref))) + return -EBUSY; + } @@ -1971,7 +2098,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + write_unlock_bh(&set->lock); +} + -+/* ++/* + * Flush data in a set - or in all sets + */ +static int @@ -1998,7 +2125,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + write_lock_bh(&ip_set_lock); + for (i = 0; i < ip_set_max; i++) { + if (ip_set_list[i] != NULL -+ && strncmp(ip_set_list[i]->name, ++ && strncmp(ip_set_list[i]->name, + name, + IP_SET_MAXNAMELEN - 1) == 0) { + res = -EEXIST; @@ -2028,7 +2155,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + if (from->type->typecode != to->type->typecode) + return -ENOEXEC; + -+ /* No magic here: ref munging protected by the mutex */ ++ /* No magic here: ref munging protected by the mutex */ + write_lock_bh(&ip_set_lock); + strncpy(from_name, from->name, IP_SET_MAXNAMELEN); + from_ref = atomic_read(&from->ref); @@ -2037,10 +2164,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + atomic_set(&from->ref, atomic_read(&to->ref)); + strncpy(to->name, from_name, IP_SET_MAXNAMELEN); + atomic_set(&to->ref, from_ref); -+ ++ + ip_set_list[from_index] = to; + ip_set_list[to_index] = from; -+ ++ + write_unlock_bh(&ip_set_lock); + return 0; +} @@ -2070,7 +2197,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + ip_set_id_t id, void *data, int *used) +{ + if (set_hash->id == id) { -+ struct ip_set_hash_list *hash_list = ++ struct ip_set_hash_list *hash_list = + (struct ip_set_hash_list *)(data + *used); + + hash_list->ip = set_hash->ip; @@ -2133,7 +2260,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + + /* Fill in set spefific bindings data */ + FOREACH_HASH_DO(__set_hash_bindings, set->id, data, used); -+ ++ + return 0; + + unlock_set: @@ -2163,7 +2290,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + *used += sizeof(struct ip_set_save); + + set = ip_set_list[index]; -+ DP("set: %s, used: %u(%u) %p %p", set->name, *used, len, ++ DP("set: %s, used: %u(%u) %p %p", set->name, *used, len, + data, data + *used); + + read_lock_bh(&set->lock); @@ -2212,7 +2339,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne +{ + if (*res == 0 + && (id == IP_SET_INVALID_ID || set_hash->id == id)) { -+ struct ip_set_hash_save *hash_save = ++ struct ip_set_hash_save *hash_save = + (struct ip_set_hash_save *)(data + *used); + /* Ensure bindings size */ + if (*used + sizeof(struct ip_set_hash_save) > len) { @@ -2251,7 +2378,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + index = ip_set_list[index]->id; + FOREACH_HASH_DO(__set_hash_save_bindings, index, data, used, len, &res); + -+ return res; ++ return res; +} + +/* @@ -2270,7 +2397,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + /* Loop to restore sets */ + while (1) { + line++; -+ ++ + DP("%u %u %u", used, sizeof(struct ip_set_restore), len); + /* Get and ensure header size */ + if (used + sizeof(struct ip_set_restore) > len) @@ -2279,8 +2406,8 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + used += sizeof(struct ip_set_restore); + + /* Ensure data size */ -+ if (used -+ + set_restore->header_size ++ if (used ++ + set_restore->header_size + + set_restore->members_size > len) + return line; + @@ -2289,7 +2416,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + line--; + goto bindings; + } -+ ++ + /* Try to create the set */ + DP("restore %s %s", set_restore->name, set_restore->typename); + res = ip_set_create(set_restore->name, @@ -2297,7 +2424,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + set_restore->index, + data + used, + set_restore->header_size); -+ ++ + if (res != 0) + return line; + used += set_restore->header_size; @@ -2318,7 +2445,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + res = __ip_set_addip(index, + data + used + members_size, + set->type->reqsize); -+ if (!(res == 0 || res == -EEXIST)) ++ if (!(res == 0 || res == -EEXIST)) + return line; + members_size += set->type->reqsize; + } @@ -2327,32 +2454,32 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + set_restore->members_size, members_size); + if (members_size != set_restore->members_size) + return line++; -+ used += set_restore->members_size; ++ used += set_restore->members_size; + } -+ ++ + bindings: + /* Loop to restore bindings */ + while (used < len) { + line++; + -+ DP("restore binding, line %u", line); ++ DP("restore binding, line %u", line); + /* Get and ensure size */ + if (used + sizeof(struct ip_set_hash_save) > len) + return line; + hash_save = (struct ip_set_hash_save *) (data + used); + used += sizeof(struct ip_set_hash_save); -+ ++ + /* hash_save->id is used to store the index */ + index = ip_set_find_byindex(hash_save->id); + DP("restore binding index %u, id %u, %u -> %u", -+ index, hash_save->id, hash_save->ip, hash_save->binding); ++ index, hash_save->id, hash_save->ip, hash_save->binding); + if (index != hash_save->id) + return line; -+ ++ + set = ip_set_list[hash_save->id]; + /* Null valued IP means default binding */ + if (hash_save->ip) -+ res = ip_set_hash_add(set->id, ++ res = ip_set_hash_add(set->id, + hash_save->ip, + hash_save->binding); + else { @@ -2368,8 +2495,8 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + } + if (used != len) + return line; -+ -+ return 0; ++ ++ return 0; +} + +static int @@ -2416,7 +2543,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + + op = (unsigned *)data; + DP("op=%x", *op); -+ ++ + if (*op < IP_SET_OP_VERSION) { + /* Check the version at the beginning of operations */ + struct ip_set_req_version *req_version = @@ -2431,7 +2558,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + case IP_SET_OP_CREATE:{ + struct ip_set_req_create *req_create + = (struct ip_set_req_create *) data; -+ ++ + if (len <= sizeof(struct ip_set_req_create)) { + ip_set_printk("short CREATE data (want >%zu, got %u)", + sizeof(struct ip_set_req_create), len); @@ -2450,7 +2577,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + case IP_SET_OP_DESTROY:{ + struct ip_set_req_std *req_destroy + = (struct ip_set_req_std *) data; -+ ++ + if (len != sizeof(struct ip_set_req_std)) { + ip_set_printk("invalid DESTROY data (want %zu, got %u)", + sizeof(struct ip_set_req_std), len); @@ -2469,7 +2596,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + goto done; + } + } -+ ++ + res = ip_set_destroy(index); + goto done; + } @@ -2511,7 +2638,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + + req_rename->name[IP_SET_MAXNAMELEN - 1] = '\0'; + req_rename->typename[IP_SET_MAXNAMELEN - 1] = '\0'; -+ ++ + index = ip_set_find_byname(req_rename->name); + if (index == IP_SET_INVALID_ID) { + res = -ENOENT; @@ -2548,10 +2675,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + res = ip_set_swap(index, to_index); + goto done; + } -+ default: ++ default: + break; /* Set identified by id */ + } -+ ++ + /* There we may have add/del/test/bind/unbind/test_bind operations */ + if (*op < IP_SET_OP_ADD_IP || *op > IP_SET_OP_TEST_BIND_SET) { + res = -EBADMSG; @@ -2568,7 +2695,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + req_adt = (struct ip_set_req_adt *) data; + + /* -U :all: :all:|:default: uses IP_SET_INVALID_ID */ -+ if (!(*op == IP_SET_OP_UNBIND_SET ++ if (!(*op == IP_SET_OP_UNBIND_SET + && req_adt->index == IP_SET_INVALID_ID)) { + index = ip_set_find_byindex(req_adt->index); + if (index == IP_SET_INVALID_ID) { @@ -2587,7 +2714,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + return res; +} + -+static int ++static int +ip_set_sockfn_get(struct sock *sk, int optval, void *user, int *len) +{ + int res = 0; @@ -2722,7 +2849,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + req_max_sets->set.index = IP_SET_INVALID_ID; + } else { + req_max_sets->set.name[IP_SET_MAXNAMELEN - 1] = '\0'; -+ req_max_sets->set.index = ++ req_max_sets->set.index = + ip_set_find_byname(req_max_sets->set.name); + if (req_max_sets->set.index == IP_SET_INVALID_ID) { + res = -ENOENT; @@ -2737,7 +2864,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + } + goto copy; + } -+ case IP_SET_OP_LIST_SIZE: ++ case IP_SET_OP_LIST_SIZE: + case IP_SET_OP_SAVE_SIZE: { + struct ip_set_req_setnames *req_setnames + = (struct ip_set_req_setnames *) data; @@ -2758,7 +2885,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + for (i = 0; i < ip_set_max; i++) { + if (ip_set_list[i] == NULL) + continue; -+ name_list = (struct ip_set_name_list *) ++ name_list = (struct ip_set_name_list *) + (data + used); + used += sizeof(struct ip_set_name_list); + if (used > copylen) { @@ -2787,7 +2914,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + req_setnames->size += sizeof(struct ip_set_list) + + set->type->header_size + + set->type->list_members_size(set); -+ FOREACH_HASH_DO(__set_hash_bindings_size_list, ++ FOREACH_HASH_DO(__set_hash_bindings_size_list, + i, &req_setnames->size); + break; + } @@ -2877,7 +3004,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + } + if (res == 0) + res = ip_set_save_bindings(index, data, &used, *len); -+ ++ + if (res != 0) + goto done; + else if (copylen != used) { @@ -2923,7 +3050,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + res = copy_to_user(user, data, copylen); + else + copy_to_user(user, data, copylen); -+ ++ + done: + up(&ip_set_app_mutex); + vfree(data); @@ -3012,15 +3139,15 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set.c linux-2.6.16-owrt/net/ipv4/ne + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_iphash.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_iphash.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set_iphash.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set_iphash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set_iphash.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,379 @@ +/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module implementing an ip hash set */ @@ -3068,7 +3195,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + randhash = randhash_ip(map, *hash_ip); + DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u, %u.%u.%u.%u", + set->name, HIPQUAD(ip), HIPQUAD(*hash_ip), HIPQUAD(map->netmask)); -+ ++ + for (i = 0; i < map->probes; i++) { + id = (jhash + i * randhash) % map->hashsize; + DP("hash key: %u", id); @@ -3090,7 +3217,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ +testip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_iphash *req = ++ struct ip_set_req_iphash *req = + (struct ip_set_req_iphash *) data; + + if (size != sizeof(struct ip_set_req_iphash)) { @@ -3107,7 +3234,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __testip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -3121,7 +3248,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + *hash_ip = ip & map->netmask; + jhash = jhash_ip(map, *hash_ip); + randhash = randhash_ip(map, *hash_ip); -+ ++ + for (i = 0; i < map->probes; i++) { + probe = (jhash + i * randhash) % map->hashsize; + if (map->members[probe] == *hash_ip) @@ -3139,7 +3266,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ +addip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_iphash *req = ++ struct ip_set_req_iphash *req = + (struct ip_set_req_iphash *) data; + + if (size != sizeof(struct ip_set_req_iphash)) { @@ -3156,7 +3283,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __addip((struct ip_set_iphash *) set->data, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -3174,25 +3301,25 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + .resize = map->resize, + .netmask = map->netmask, + }; -+ ++ + if (map->resize == 0) + return -ERANGE; + + again: + res = 0; -+ ++ + /* Calculate new parameters */ + get_random_bytes(&tmp.initval, 4); + hashsize = tmp.hashsize + (tmp.hashsize * map->resize)/100; + if (hashsize == tmp.hashsize) + hashsize++; + tmp.prime = make_prime(hashsize); -+ ++ + ip_set_printk("rehashing of set %s triggered: " + "hashsize grows from %u to %u", + set->name, tmp.hashsize, hashsize); + tmp.hashsize = hashsize; -+ ++ + newbytes = hashsize * sizeof(ip_set_ip_t); + tmp.members = ip_set_malloc_atomic(newbytes); + if (!tmp.members) { @@ -3200,7 +3327,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + return -ENOMEM; + } + memset(tmp.members, 0, newbytes); -+ ++ + write_lock_bh(&set->lock); + map = (struct ip_set_iphash *) set->data; /* Play safe */ + for (i = 0; i < map->hashsize && res == 0; i++) { @@ -3213,7 +3340,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + ip_set_free(tmp.members, newbytes); + goto again; + } -+ ++ + /* Success at resizing! */ + members = map->members; + hashsize = map->hashsize; @@ -3237,7 +3364,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + + if (id == UINT_MAX) + return -EEXIST; -+ ++ + map->members[id] = 0; + return 0; +} @@ -3263,7 +3390,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __delip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -3395,9 +3522,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.16-owrt/net/ + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_ipmap.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_ipmap.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set_ipmap.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set_ipmap.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set_ipmap.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,313 @@ +/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> + * Patrick Schaaf <bof@bof.de> @@ -3405,7 +3532,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module implementing an IP set type: the single bitmap type */ @@ -3432,7 +3559,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i +__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip) +{ + struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data; -+ ++ + if (ip < map->first_ip || ip > map->last_ip) + return -ERANGE; + @@ -3446,7 +3573,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i +testip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_ipmap *req = ++ struct ip_set_req_ipmap *req = + (struct ip_set_req_ipmap *) data; + + if (size != sizeof(struct ip_set_req_ipmap)) { @@ -3459,20 +3586,20 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i +} + +static int -+testip_kernel(struct ip_set *set, ++testip_kernel(struct ip_set *set, + const struct sk_buff *skb, + u_int32_t flags, + ip_set_ip_t *hash_ip) +{ + int res; -+ ++ + DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u", + flags & IPSET_SRC ? "SRC" : "DST", + NIPQUAD(skb->nh.iph->saddr), + NIPQUAD(skb->nh.iph->daddr)); + + res = __testip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); + return (res < 0 ? 0 : res); @@ -3498,7 +3625,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i +addip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_ipmap *req = ++ struct ip_set_req_ipmap *req = + (struct ip_set_req_ipmap *) data; + + if (size != sizeof(struct ip_set_req_ipmap)) { @@ -3516,12 +3643,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __addip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} + -+static inline int ++static inline int +__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip) +{ + struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data; @@ -3533,7 +3660,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + DP("%u.%u.%u.%u, %u.%u.%u.%u", HIPQUAD(ip), HIPQUAD(*hash_ip)); + if (!test_and_clear_bit(ip_to_id(map, *hash_ip), map->members)) + return -EEXIST; -+ ++ + return 0; +} + @@ -3558,7 +3685,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __delip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -3607,12 +3734,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + } else { + unsigned int mask_bits, netmask_bits; + ip_set_ip_t mask; -+ ++ + map->first_ip &= map->netmask; /* Should we better bark? */ -+ ++ + mask = range_to_mask(map->first_ip, map->last_ip, &mask_bits); + netmask_bits = mask_to_bits(map->netmask); -+ ++ + if (!mask || netmask_bits <= mask_bits) + return -ENOEXEC; + @@ -3627,7 +3754,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + return -ENOMEM; + } + memset(map->members, 0, newbytes); -+ ++ + set->data = map; + return 0; +} @@ -3635,10 +3762,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i +static void destroy(struct ip_set *set) +{ + struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data; -+ ++ + kfree(map->members); + kfree(map); -+ ++ + set->data = NULL; +} + @@ -3712,15 +3839,15 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.16-owrt/net/i + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_iptree.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_iptree.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set_iptree.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set_iptree.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set_iptree.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,510 @@ +/* Copyright (C) 2005 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module implementing an IP set type: the iptree type */ @@ -3741,8 +3868,8 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + +/* Garbage collection interval in seconds: */ +#define IPTREE_GC_TIME 5*60 -+/* Sleep so many milliseconds before trying again -+ * to delete the gc timer at destroying a set */ ++/* Sleep so many milliseconds before trying again ++ * to delete the gc timer at destroying a set */ +#define IPTREE_DESTROY_SLEEP 100 + +static kmem_cache_t *branch_cachep; @@ -3770,7 +3897,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + struct ip_set_iptreec *ctree; + struct ip_set_iptreed *dtree; + unsigned char a,b,c,d; -+ ++ + *hash_ip = ip; + ABCD(a, b, c, d, hash_ip); + DP("%u %u %u %u timeout %u", a, b, c, d, map->timeout); @@ -3786,7 +3913,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ +testip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_iptree *req = ++ struct ip_set_req_iptree *req = + (struct ip_set_req_iptree *) data; + + if (size != sizeof(struct ip_set_req_iptree)) { @@ -3799,20 +3926,20 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ +} + +static int -+testip_kernel(struct ip_set *set, ++testip_kernel(struct ip_set *set, + const struct sk_buff *skb, + u_int32_t flags, + ip_set_ip_t *hash_ip) +{ + int res; -+ ++ + DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u", + flags & IPSET_SRC ? "SRC" : "DST", + NIPQUAD(skb->nh.iph->saddr), + NIPQUAD(skb->nh.iph->daddr)); + + res = __testip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); + return (res < 0 ? 0 : res); @@ -3831,7 +3958,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + (map)->tree[elem] = branch; \ + DP("alloc %u", elem); \ + } \ -+} while (0) ++} while (0) + +static inline int +__addip(struct ip_set *set, ip_set_ip_t ip, unsigned int timeout, @@ -3843,7 +3970,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + struct ip_set_iptreed *dtree; + unsigned char a,b,c,d; + int ret = 0; -+ ++ + *hash_ip = ip; + ABCD(a, b, c, d, hash_ip); + DP("%u %u %u %u timeout %u", a, b, c, d, timeout); @@ -3863,7 +3990,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + ip_set_ip_t *hash_ip) +{ + struct ip_set_iptree *map = (struct ip_set_iptree *) set->data; -+ struct ip_set_req_iptree *req = ++ struct ip_set_req_iptree *req = + (struct ip_set_req_iptree *) data; + + if (size != sizeof(struct ip_set_req_iptree)) { @@ -3885,7 +4012,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + struct ip_set_iptree *map = (struct ip_set_iptree *) set->data; + + return __addip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + map->timeout, + hash_ip); @@ -3898,7 +4025,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + return -EEXIST; \ +} while (0) + -+static inline int ++static inline int +__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip) +{ + struct ip_set_iptree *map = (struct ip_set_iptree *) set->data; @@ -3906,7 +4033,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + struct ip_set_iptreec *ctree; + struct ip_set_iptreed *dtree; + unsigned char a,b,c,d; -+ ++ + *hash_ip = ip; + ABCD(a, b, c, d, hash_ip); + DELIP_WALK(map, a, btree); @@ -3941,7 +4068,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __delip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -4018,7 +4145,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + } + LOOP_WALK_END; + write_unlock_bh(&set->lock); -+ ++ + map->gc.expires = jiffies + map->gc_interval * HZ; + add_timer(&map->gc); +} @@ -4055,7 +4182,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + map->gc.function = ip_tree_gc; + map->gc.expires = jiffies + map->gc_interval * HZ; + add_timer(&map->gc); -+ ++ + return 0; +} + @@ -4092,7 +4219,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ +{ + struct ip_set_iptree *map = (struct ip_set_iptree *) set->data; + unsigned int timeout = map->timeout; -+ ++ + __flush(map); + memset(map, 0, sizeof(*map)); + map->timeout = timeout; @@ -4150,7 +4277,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + && (!map->timeout || time_after(dtree->expires[d], jiffies))) { + entry = (struct ip_set_req_iptree *)(data + offset); + entry->ip = ((a << 24) | (b << 16) | (c << 8) | d); -+ entry->timeout = !map->timeout ? 0 ++ entry->timeout = !map->timeout ? 0 + : (dtree->expires[d] - jiffies)/HZ; + offset += sizeof(struct ip_set_req_iptree); + } @@ -4188,7 +4315,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ +static int __init init(void) +{ + int ret; -+ ++ + branch_cachep = kmem_cache_create("ip_set_iptreeb", + sizeof(struct ip_set_iptreeb), + 0, 0, NULL, NULL); @@ -4210,7 +4337,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + goto out; + + kmem_cache_destroy(leaf_cachep); -+ free_branch: ++ free_branch: + kmem_cache_destroy(branch_cachep); + out: + return ret; @@ -4226,9 +4353,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.16-owrt/net/ + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_macipmap.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_macipmap.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set_macipmap.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set_macipmap.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set_macipmap.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,338 @@ +/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> + * Patrick Schaaf <bof@bof.de> @@ -4237,7 +4364,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module implementing an IP set type: the macipmap type */ @@ -4261,7 +4388,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne +testip(struct ip_set *set, const void *data, size_t size, ip_set_ip_t *hash_ip) +{ + struct ip_set_macipmap *map = (struct ip_set_macipmap *) set->data; -+ struct ip_set_macip *table = (struct ip_set_macip *) map->members; ++ struct ip_set_macip *table = (struct ip_set_macip *) map->members; + struct ip_set_req_macipmap *req = (struct ip_set_req_macipmap *) data; + + if (size != sizeof(struct ip_set_req_macipmap)) { @@ -4276,7 +4403,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + + *hash_ip = req->ip; + DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u", -+ set->name, HIPQUAD(req->ip), HIPQUAD(*hash_ip)); ++ set->name, HIPQUAD(req->ip), HIPQUAD(*hash_ip)); + if (test_bit(IPSET_MACIP_ISSET, + (void *) &table[req->ip - map->first_ip].flags)) { + return (memcmp(req->ethernet, @@ -4296,7 +4423,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + struct ip_set_macip *table = + (struct ip_set_macip *) map->members; + ip_set_ip_t ip; -+ ++ + ip = ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr); + DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u", @@ -4307,9 +4434,9 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + if (ip < map->first_ip || ip > map->last_ip) + return 0; + -+ *hash_ip = ip; ++ *hash_ip = ip; + DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u", -+ set->name, HIPQUAD(ip), HIPQUAD(*hash_ip)); ++ set->name, HIPQUAD(ip), HIPQUAD(*hash_ip)); + if (test_bit(IPSET_MACIP_ISSET, + (void *) &table[ip - map->first_ip].flags)) { + /* Is mac pointer valid? @@ -4326,7 +4453,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + +/* returns 0 on success */ +static inline int -+__addip(struct ip_set *set, ++__addip(struct ip_set *set, + ip_set_ip_t ip, unsigned char *ethernet, ip_set_ip_t *hash_ip) +{ + struct ip_set_macipmap *map = @@ -4336,7 +4463,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + + if (ip < map->first_ip || ip > map->last_ip) + return -ERANGE; -+ if (test_and_set_bit(IPSET_MACIP_ISSET, ++ if (test_and_set_bit(IPSET_MACIP_ISSET, + (void *) &table[ip - map->first_ip].flags)) + return -EEXIST; + @@ -4367,7 +4494,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + ip_set_ip_t ip; -+ ++ + ip = ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr); + @@ -4388,7 +4515,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + + if (ip < map->first_ip || ip > map->last_ip) + return -ERANGE; -+ if (!test_and_clear_bit(IPSET_MACIP_ISSET, ++ if (!test_and_clear_bit(IPSET_MACIP_ISSET, + (void *)&table[ip - map->first_ip].flags)) + return -EEXIST; + @@ -4418,7 +4545,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __delip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -4473,7 +4600,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + return -ENOMEM; + } + memset(map->members, 0, newbytes); -+ ++ + set->data = map; + return 0; +} @@ -4568,15 +4695,15 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.16-owrt/ne + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_nethash.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_nethash.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set_nethash.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set_nethash.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set_nethash.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,449 @@ +/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module implementing a cidr nethash set */ @@ -4624,7 +4751,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + *hash_ip = pack(ip, cidr); + jhash = jhash_ip(map, *hash_ip); + randhash = randhash_ip(map, *hash_ip); -+ ++ + for (i = 0; i < map->probes; i++) { + id = (jhash + i * randhash) % map->hashsize; + DP("hash key: %u", id); @@ -4668,7 +4795,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net +testip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_nethash *req = ++ struct ip_set_req_nethash *req = + (struct ip_set_req_nethash *) data; + + if (size != sizeof(struct ip_set_req_nethash)) { @@ -4686,7 +4813,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + u_int32_t flags, ip_set_ip_t *hash_ip) +{ + return __testip(set, -+ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr ++ ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr), + hash_ip); +} @@ -4699,7 +4826,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + + jhash = jhash_ip(map, ip); + randhash = randhash_ip(map, ip); -+ ++ + for (i = 0; i < map->probes; i++) { + probe = (jhash + i * randhash) % map->hashsize; + if (map->members[probe] == ip) @@ -4719,7 +4846,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net +{ + *hash_ip = pack(ip, cidr); + DP("%u.%u.%u.%u/%u, %u.%u.%u.%u", HIPQUAD(ip), cidr, HIPQUAD(*hash_ip)); -+ ++ + return __addip_base(map, *hash_ip); +} + @@ -4728,7 +4855,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net +{ + unsigned char next; + int i; -+ ++ + for (i = 0; i < 30 && map->cidr[i]; i++) { + if (map->cidr[i] == cidr) { + return; @@ -4746,7 +4873,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net +addip(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_ip) +{ -+ struct ip_set_req_nethash *req = ++ struct ip_set_req_nethash *req = + (struct ip_set_req_nethash *) data; + int ret; + @@ -4756,13 +4883,13 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + size); + return -EINVAL; + } -+ ret = __addip((struct ip_set_nethash *) set->data, ++ ret = __addip((struct ip_set_nethash *) set->data, + req->ip, req->cidr, hash_ip); -+ ++ + if (ret == 0) + update_cidr_sizes((struct ip_set_nethash *) set->data, + req->cidr); -+ ++ + return ret; +} + @@ -4774,10 +4901,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + int ret = -ERANGE; + ip_set_ip_t ip = ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr); -+ ++ + if (map->cidr[0]) + ret = __addip(map, ip, map->cidr[0], hash_ip); -+ ++ + return ret; +} + @@ -4793,26 +4920,26 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + .probes = map->probes, + .resize = map->resize + }; -+ ++ + if (map->resize == 0) + return -ERANGE; + + memcpy(tmp.cidr, map->cidr, 30 * sizeof(unsigned char)); + again: + res = 0; -+ ++ + /* Calculate new parameters */ + get_random_bytes(&tmp.initval, 4); + hashsize = tmp.hashsize + (tmp.hashsize * map->resize)/100; + if (hashsize == tmp.hashsize) + hashsize++; + tmp.prime = make_prime(hashsize); -+ ++ + ip_set_printk("rehashing of set %s triggered: " + "hashsize grows from %u to %u", + set->name, tmp.hashsize, hashsize); + tmp.hashsize = hashsize; -+ ++ + newbytes = hashsize * sizeof(ip_set_ip_t); + tmp.members = ip_set_malloc_atomic(newbytes); + if (!tmp.members) { @@ -4820,7 +4947,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + return -ENOMEM; + } + memset(tmp.members, 0, newbytes); -+ ++ + write_lock_bh(&set->lock); + map = (struct ip_set_nethash *) set->data; /* Play safe */ + for (i = 0; i < map->hashsize && res == 0; i++) { @@ -4833,11 +4960,11 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + ip_set_free(tmp.members, newbytes); + goto again; + } -+ ++ + /* Success at resizing! */ + members = map->members; + hashsize = map->hashsize; -+ ++ + map->initval = tmp.initval; + map->prime = tmp.prime; + map->hashsize = tmp.hashsize; @@ -4857,7 +4984,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + + if (id == UINT_MAX) + return -EEXIST; -+ ++ + map->members[id] = 0; + return 0; +} @@ -4875,8 +5002,8 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + size); + return -EINVAL; + } -+ /* TODO: no garbage collection in map->cidr */ -+ return __delip((struct ip_set_nethash *) set->data, ++ /* TODO: no garbage collection in map->cidr */ ++ return __delip((struct ip_set_nethash *) set->data, + req->ip, req->cidr, hash_ip); +} + @@ -4888,10 +5015,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + int ret = -ERANGE; + ip_set_ip_t ip = ntohl(flags & IPSET_SRC ? skb->nh.iph->saddr + : skb->nh.iph->daddr); -+ ++ + if (map->cidr[0]) + ret = __delip(map, ip, map->cidr[0], hash_ip); -+ ++ + return ret; +} + @@ -5021,15 +5148,15 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.16-owrt/net + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_portmap.c ---- linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ip_set_portmap.c 2006-03-20 12:53:59.000000000 +0100 +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.19.dev/net/ipv4/netfilter/ip_set_portmap.c +--- linux-2.6.19.old/net/ipv4/netfilter/ip_set_portmap.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ip_set_portmap.c 2006-12-14 03:13:43.000000000 +0100 @@ -0,0 +1,325 @@ +/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module implementing a port set type as a bitmap */ @@ -5060,7 +5187,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + switch (iph->protocol) { + case IPPROTO_TCP: { + struct tcphdr tcph; -+ ++ + /* See comments at tcp_match in ip_tables.c */ + if (offset) + return INVALID_PORT; @@ -5068,7 +5195,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &tcph, sizeof(tcph)) < 0) + /* No choice either */ + return INVALID_PORT; -+ ++ + return ntohs(flags & IPSET_SRC ? + tcph.source : tcph.dest); + } @@ -5081,7 +5208,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &udph, sizeof(udph)) < 0) + /* No choice either */ + return INVALID_PORT; -+ ++ + return ntohs(flags & IPSET_SRC ? + udph.source : udph.dest); + } @@ -5097,7 +5224,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + + if (port < map->first_port || port > map->last_port) + return -ERANGE; -+ ++ + *hash_port = port; + DP("set: %s, port:%u, %u", set->name, port, *hash_port); + return !!test_bit(port - map->first_port, map->members); @@ -5107,7 +5234,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net +testport(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_port) +{ -+ struct ip_set_req_portmap *req = ++ struct ip_set_req_portmap *req = + (struct ip_set_req_portmap *) data; + + if (size != sizeof(struct ip_set_req_portmap)) { @@ -5126,12 +5253,12 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + int res; + ip_set_ip_t port = get_port(skb, flags); + -+ DP("flag %s port %u", flags & IPSET_SRC ? "SRC" : "DST", port); ++ DP("flag %s port %u", flags & IPSET_SRC ? "SRC" : "DST", port); + if (port == INVALID_PORT) -+ return 0; ++ return 0; + + res = __testport(set, port, hash_port); -+ ++ + return (res < 0 ? 0 : res); +} + @@ -5144,7 +5271,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + return -ERANGE; + if (test_and_set_bit(port - map->first_port, map->members)) + return -EEXIST; -+ ++ + *hash_port = port; + DP("port %u", port); + return 0; @@ -5154,7 +5281,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net +addport(struct ip_set *set, const void *data, size_t size, + ip_set_ip_t *hash_port) +{ -+ struct ip_set_req_portmap *req = ++ struct ip_set_req_portmap *req = + (struct ip_set_req_portmap *) data; + + if (size != sizeof(struct ip_set_req_portmap)) { @@ -5171,7 +5298,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + u_int32_t flags, ip_set_ip_t *hash_port) +{ + ip_set_ip_t port = get_port(skb, flags); -+ ++ + if (port == INVALID_PORT) + return -EINVAL; + @@ -5187,7 +5314,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + return -ERANGE; + if (!test_and_clear_bit(port - map->first_port, map->members)) + return -EEXIST; -+ ++ + *hash_port = port; + DP("port %u", port); + return 0; @@ -5214,7 +5341,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + u_int32_t flags, ip_set_ip_t *hash_port) +{ + ip_set_ip_t port = get_port(skb, flags); -+ ++ + if (port == INVALID_PORT) + return -EINVAL; + @@ -5350,10 +5477,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.16-owrt/net + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/netfilter/ipt_set.c ---- linux-2.6.16/net/ipv4/netfilter/ipt_set.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ipt_set.c 2006-03-20 12:53:59.000000000 +0100 -@@ -0,0 +1,112 @@ +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_set.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_set.c +--- linux-2.6.19.old/net/ipv4/netfilter/ipt_set.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_set.c 2006-12-14 03:13:43.000000000 +0100 +@@ -0,0 +1,105 @@ +/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> + * Patrick Schaaf <bof@bof.de> + * Martin Josefsson <gandalf@wlug.westbo.se> @@ -5361,7 +5488,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/n + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* Kernel module to match an IP set. */ @@ -5378,7 +5505,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/n +match_set(const struct ipt_set_info *info, + const struct sk_buff *skb, + int inv) -+{ ++{ + if (ip_set_testip_kernel(info->index, skb, info->flags)) + inv = !inv; + return inv; @@ -5388,12 +5515,14 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/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_set_info_match *info = matchinfo; -+ ++ + return match_set(&info->match_set, + skb, + info->match_set.flags[0] & IPSET_MATCH_INV); @@ -5401,22 +5530,17 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/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_set_info_match *info = ++ struct ipt_set_info_match *info = + (struct ipt_set_info_match *) matchinfo; + ip_set_id_t index; + -+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_set_info_match))) { -+ ip_set_printk("invalid matchsize %d", matchsize); -+ return 0; -+ } -+ + index = ip_set_get_byindex(info->match_set.index); -+ ++ + if (index == IP_SET_INVALID_ID) { + ip_set_printk("Cannot find set indentified by id %u to match", + info->match_set.index); @@ -5430,21 +5554,17 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/n + return 1; +} + -+static void destroy(void *matchinfo, unsigned int matchsize) ++static void destroy(const struct xt_match *match, void *matchinfo) +{ + struct ipt_set_info_match *info = matchinfo; + -+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_set_info_match))) { -+ ip_set_printk("invalid matchsize %d", matchsize); -+ return; -+ } -+ + ip_set_put(info->match_set.index); +} + +static struct ipt_match set_match = { + .name = "set", + .match = &match, ++ .matchsize = sizeof(struct ipt_set_info_match), + .checkentry = &checkentry, + .destroy = &destroy, + .me = THIS_MODULE @@ -5466,10 +5586,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_set.c linux-2.6.16-owrt/net/ipv4/n + +module_init(init); +module_exit(fini); -diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.c linux-2.6.16-owrt/net/ipv4/netfilter/ipt_SET.c ---- linux-2.6.16/net/ipv4/netfilter/ipt_SET.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/ipt_SET.c 2006-03-20 12:53:59.000000000 +0100 -@@ -0,0 +1,128 @@ +diff -urN linux-2.6.19.old/net/ipv4/netfilter/ipt_SET.c linux-2.6.19.dev/net/ipv4/netfilter/ipt_SET.c +--- linux-2.6.19.old/net/ipv4/netfilter/ipt_SET.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/ipt_SET.c 2006-12-14 03:13:43.000000000 +0100 +@@ -0,0 +1,120 @@ +/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu> + * Patrick Schaaf <bof@bof.de> + * Martin Josefsson <gandalf@wlug.westbo.se> @@ -5477,7 +5597,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.c linux-2.6.16-owrt/net/ipv4/n + * + * 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. ++ * published by the Free Software Foundation. + */ + +/* ipt_SET.c - netfilter target to manipulate IP sets */ @@ -5501,11 +5621,11 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.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 *userinfo) ++ const struct xt_target *target, ++ const void *targinfo) +{ + const struct ipt_set_info_target *info = targinfo; -+ ++ + if (info->add_set.index != IP_SET_INVALID_ID) + ip_set_addip_kernel(info->add_set.index, + *pskb, @@ -5520,19 +5640,15 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.c linux-2.6.16-owrt/net/ipv4/n + +static int +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) ++ unsigned int hook_mask) +{ -+ struct ipt_set_info_target *info = ++ struct ipt_set_info_target *info = + (struct ipt_set_info_target *) targinfo; + ip_set_id_t index; + -+ if (targinfosize != IPT_ALIGN(sizeof(*info))) { -+ DP("bad target info size %u", targinfosize); -+ return 0; -+ } -+ + if (info->add_set.index != IP_SET_INVALID_ID) { + index = ip_set_get_byindex(info->add_set.index); + if (index == IP_SET_INVALID_ID) { @@ -5559,15 +5675,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.c linux-2.6.16-owrt/net/ipv4/n + return 1; +} + -+static void destroy(void *targetinfo, unsigned int targetsize) ++static void destroy(const struct xt_target *target, void *targetinfo) +{ + struct ipt_set_info_target *info = targetinfo; + -+ if (targetsize != IPT_ALIGN(sizeof(struct ipt_set_info_target))) { -+ ip_set_printk("invalid targetsize %d", targetsize); -+ return; -+ } -+ + if (info->add_set.index != IP_SET_INVALID_ID) + ip_set_put(info->add_set.index); + if (info->del_set.index != IP_SET_INVALID_ID) @@ -5577,6 +5688,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.c linux-2.6.16-owrt/net/ipv4/n +static struct ipt_target SET_target = { + .name = "SET", + .target = target, ++ .targetsize = sizeof(struct ipt_set_info_target), + .checkentry = checkentry, + .destroy = destroy, + .me = THIS_MODULE @@ -5598,10 +5710,10 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/ipt_SET.c linux-2.6.16-owrt/net/ipv4/n + +module_init(init); +module_exit(fini); -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:52:42.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/Kconfig 2006-03-20 12:53:59.000000000 +0100 -@@ -623,5 +623,106 @@ +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:41.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/Kconfig 2006-12-14 03:13:43.000000000 +0100 +@@ -647,5 +647,106 @@ Allows altering the ARP packet payload: source and destination hardware and network addresses. @@ -5621,7 +5733,7 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-owrt/net/ipv4/net + range 2 65534 + depends on IP_NF_SET + help -+ You can define here default value of the maximum number ++ You can define here default value of the maximum number + of IP sets for the kernel. + + The value can be overriden by the 'max_sets' module @@ -5708,18 +5820,18 @@ diff -Nur linux-2.6.16/net/ipv4/netfilter/Kconfig linux-2.6.16-owrt/net/ipv4/net + endmenu -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:52:42.000000000 +0100 -+++ linux-2.6.16-owrt/net/ipv4/netfilter/Makefile 2006-03-20 12:56:30.000000000 +0100 -@@ -47,6 +47,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:41.000000000 +0100 ++++ linux-2.6.19.dev/net/ipv4/netfilter/Makefile 2006-12-14 03:13:43.000000000 +0100 +@@ -54,6 +54,7 @@ # matches obj-$(CONFIG_IP_NF_MATCH_HASHLIMIT) += ipt_hashlimit.o +obj-$(CONFIG_IP_NF_MATCH_SET) += ipt_set.o obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o - obj-$(CONFIG_IP_NF_MATCH_MULTIPORT) += ipt_multiport.o obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o -@@ -74,6 +75,17 @@ + obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o +@@ -77,6 +78,17 @@ obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o obj-$(CONFIG_IP_NF_TARGET_TCPMSS) += ipt_TCPMSS.o diff --git a/target/linux/generic-2.6/patches/105-netfilter_time.patch b/target/linux/generic-2.6/patches/105-netfilter_time.patch index 34257ee93c..d217157d78 100644 --- a/target/linux/generic-2.6/patches/105-netfilter_time.patch +++ b/target/linux/generic-2.6/patches/105-netfilter_time.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/106-netfilter_imq.patch b/target/linux/generic-2.6/patches/106-netfilter_imq.patch index 8114db621b..559d80fbc8 100644 --- a/target/linux/generic-2.6/patches/106-netfilter_imq.patch +++ b/target/linux/generic-2.6/patches/106-netfilter_imq.patch @@ -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); diff --git a/target/linux/generic-2.6/patches/107-netfilter_nat_sip.patch b/target/linux/generic-2.6/patches/107-netfilter_nat_sip.patch deleted file mode 100644 index 6640118f20..0000000000 --- a/target/linux/generic-2.6/patches/107-netfilter_nat_sip.patch +++ /dev/null @@ -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__ */ diff --git a/target/linux/generic-2.6/patches/108-netfilter_route.patch b/target/linux/generic-2.6/patches/108-netfilter_route.patch index 571d6a381b..7e8491c3e3 100644 --- a/target/linux/generic-2.6/patches/108-netfilter_route.patch +++ b/target/linux/generic-2.6/patches/108-netfilter_route.patch @@ -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,55 +511,59 @@ 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 @@ - EXPORT_SYMBOL(icmpv6_statistics); - EXPORT_SYMBOL(icmpv6_err_convert); - EXPORT_SYMBOL(ndisc_mc_map); -+EXPORT_SYMBOL(nd_tbl); - 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 +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. The ROUTE target is also able to change the incoming interface -+ of a packet. ++ 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. + -+ Not working as a module. ++ 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 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 @@ + 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); ++EXPORT_SYMBOL(nd_tbl); + EXPORT_SYMBOL(register_inet6addr_notifier); + EXPORT_SYMBOL(unregister_inet6addr_notifier); + EXPORT_SYMBOL(ip6_route_output); +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 diff --git a/target/linux/generic-2.6/patches/200-sched_esfq.patch b/target/linux/generic-2.6/patches/200-sched_esfq.patch index 8790bad2bf..6830b833ad 100644 --- a/target/linux/generic-2.6/patches/200-sched_esfq.patch +++ b/target/linux/generic-2.6/patches/200-sched_esfq.patch @@ -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> diff --git a/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch b/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch index 3be34d7c63..4a3e327288 100644 --- a/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch +++ b/target/linux/generic-2.6/patches/201-multiple_default_gateways.patch @@ -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); diff --git a/target/linux/generic-2.6/patches/202-mips-freestanding.patch b/target/linux/generic-2.6/patches/202-mips-freestanding.patch index 04412619d7..38fd5795d0 100644 --- a/target/linux/generic-2.6/patches/202-mips-freestanding.patch +++ b/target/linux/generic-2.6/patches/202-mips-freestanding.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch b/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch deleted file mode 100644 index 4cef893003..0000000000 --- a/target/linux/generic-2.6/patches/203-fix_initrd_duplication.patch +++ /dev/null @@ -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. diff --git a/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch b/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch index 9f248c93dd..8037dd0671 100644 --- a/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch +++ b/target/linux/generic-2.6/patches/204-jffs2_eofdetect.patch @@ -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; } diff --git a/target/linux/generic-2.6/patches/205-block2mtd_fix.patch b/target/linux/generic-2.6/patches/205-block2mtd_fix.patch deleted file mode 100644 index 9aaffc59ef..0000000000 --- a/target/linux/generic-2.6/patches/205-block2mtd_fix.patch +++ /dev/null @@ -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; - } - - diff --git a/target/linux/generic-2.6/patches/206-pppoe_mtu_fix.patch b/target/linux/generic-2.6/patches/206-pppoe_mtu_fix.patch deleted file mode 100644 index 1ad8220f8f..0000000000 --- a/target/linux/generic-2.6/patches/206-pppoe_mtu_fix.patch +++ /dev/null @@ -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; - diff --git a/target/linux/generic-2.6/patches/207-powerpc_asm_segment_h.patch b/target/linux/generic-2.6/patches/207-powerpc_asm_segment_h.patch index 0a7c9ffc38..c9859e2f29 100644 --- a/target/linux/generic-2.6/patches/207-powerpc_asm_segment_h.patch +++ b/target/linux/generic-2.6/patches/207-powerpc_asm_segment_h.patch @@ -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 diff --git a/target/linux/generic-2.6/patches/208-rtl8110sb_fix.patch b/target/linux/generic-2.6/patches/208-rtl8110sb_fix.patch index 5d48342e63..620a9daab9 100644 --- a/target/linux/generic-2.6/patches/208-rtl8110sb_fix.patch +++ b/target/linux/generic-2.6/patches/208-rtl8110sb_fix.patch @@ -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; diff --git a/target/linux/generic-2.6/patches/209-mini_fo.patch b/target/linux/generic-2.6/patches/209-mini_fo.patch index 8fbc3aadd0..a8e6d88d63 100644 --- a/target/linux/generic-2.6/patches/209-mini_fo.patch +++ b/target/linux/generic-2.6/patches/209-mini_fo.patch @@ -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 = diff --git a/target/linux/generic-2.6/patches/900-headers_type_and_time.patch b/target/linux/generic-2.6/patches/900-headers_type_and_time.patch index 56a5ef3230..2ed6f39e6b 100644 --- a/target/linux/generic-2.6/patches/900-headers_type_and_time.patch +++ b/target/linux/generic-2.6/patches/900-headers_type_and_time.patch @@ -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 */ diff --git a/target/linux/generic-2.6/patches/901-asm_bitops_include.patch b/target/linux/generic-2.6/patches/901-asm_bitops_include.patch index 83da7b4acb..ec18e9b102 100644 --- a/target/linux/generic-2.6/patches/901-asm_bitops_include.patch +++ b/target/linux/generic-2.6/patches/901-asm_bitops_include.patch @@ -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> diff --git a/target/linux/ixp4xx-2.6/Makefile b/target/linux/ixp4xx-2.6/Makefile index 52d607d566..3c995bf79a 100644 --- a/target/linux/ixp4xx-2.6/Makefile +++ b/target/linux/ixp4xx-2.6/Makefile @@ -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)) diff --git a/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch b/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch index e65838f3c2..0e13e1f7fb 100644 --- a/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch +++ b/target/linux/ixp4xx-2.6/patches/100-npe_driver.patch @@ -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; diff --git a/target/linux/magicbox-2.6/Makefile b/target/linux/magicbox-2.6/Makefile index 5e36e82c42..2c6e17ff43 100644 --- a/target/linux/magicbox-2.6/Makefile +++ b/target/linux/magicbox-2.6/Makefile @@ -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)) diff --git a/target/linux/magicbox-2.6/config b/target/linux/magicbox-2.6/config index 409349953c..851d4cd84f 100644 --- a/target/linux/magicbox-2.6/config +++ b/target/linux/magicbox-2.6/config @@ -1,1065 +1,786 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Wed Aug 30 06:45:18 2006 -# -CONFIG_MMU=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_PPC=y -CONFIG_PPC32=y -CONFIG_GENERIC_NVRAM=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_405EP=y +CONFIG_40x=y +# CONFIG_44x is not set +CONFIG_4xx=y +# CONFIG_6PACK is not set +# CONFIG_6xx is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_8xx is not set +# CONFIG_9P_FS is not set +# CONFIG_ACENIC is not set +# CONFIG_ACORN_PARTITION is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADVANCED_OPTIONS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_AGP is not set +CONFIG_AIRO=m +CONFIG_AIRO_CS=m +# CONFIG_AMD8111_ETH is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_APPLICOM is not set +CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SWAP is not set -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +# CONFIG_ARCNET is not set +CONFIG_ARPD=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_ATA is not set +# CONFIG_ATALK is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_ATM=m +CONFIG_ATMEL=m +# CONFIG_ATM_AMBASSADOR is not set +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_DUMMY=m +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_LANAI is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +# CONFIG_ATM_NICSTAR is not set +CONFIG_ATM_TCP=m +# CONFIG_ATM_ZATM 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_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -# CONFIG_ELF_CORE is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_B44 is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set -CONFIG_OBSOLETE_INTERMODULE=y - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_LBD is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +CONFIG_BCM43XX_PIO=y +# CONFIG_BCM43XX_PIO_MODE is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +CONFIG_BIOS_FIXUP=y +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_FD is not set +CONFIG_BLK_DEV_INITRD=y # CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_SD=m +# CONFIG_BLK_DEV_SR is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLOCK=y +# CONFIG_BNX2 is not set +CONFIG_BONDING=m +# CONFIG_BOOKE_WDT is not set +CONFIG_BOOT_LOAD=0x00400000 +# CONFIG_BPQETHER is not set +CONFIG_BRIDGE=y +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BROKEN_ON_SMP=y +CONFIG_BSD_DISKLABEL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_BT is not set +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBPA10X=m +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIDTL1 is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIVHCI=m +CONFIG_BT_HIDP=m +CONFIG_BT_L2CAP=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_SCO=m +# CONFIG_BUBINGA is not set +CONFIG_BUG=y +CONFIG_CARDBUS=y +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_CASSINI is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_CHELSIO_T1 is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CICADA_PHY is not set +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CLS_U32_MARK=y +CONFIG_CLS_U32_PERF=y +CONFIG_CMDLINE="console=ttyS0,115200" +CONFIG_CMDLINE_BOOL=y +# CONFIG_CODA_FS is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_CONNECTOR is not set +CONFIG_CONSISTENT_SIZE=0x00200000 +CONFIG_CONSISTENT_START=0xff100000 +# CONFIG_CPCI405 is not set +# CONFIG_CPU_FREQ is not set +# CONFIG_CRAMFS is not set +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +CONFIG_CROSSCOMPILE=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_WP512=m +# CONFIG_DAVICOM_PHY is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DECNET is not set # CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_BIC is not set # CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_CUBIC is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_HTCP is not set CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor -# -# CONFIG_6xx is not set -CONFIG_40x=y -# CONFIG_44x is not set -# CONFIG_8xx is not set +# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="vegas" +CONFIG_DEFAULT_VEGAS=y +# CONFIG_DEFAULT_WESTWOOD is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DGRS is not set +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_DL2K is not set +# CONFIG_DMA_ENGINE is not set +# CONFIG_DNOTIFY is not set +# CONFIG_DRM is not set +# CONFIG_DTLK is not set +# CONFIG_DUMMY is not set +# CONFIG_DVB is not set +CONFIG_E100=m +# CONFIG_E1000 is not set # CONFIG_E200 is not set # CONFIG_E500 is not set -CONFIG_MATH_EMULATION=y -# CONFIG_KEXEC is not set -# CONFIG_CPU_FREQ is not set -CONFIG_4xx=y -CONFIG_WANT_EARLY_SERIAL=y - -# -# IBM 4xx options -# -# CONFIG_BUBINGA is not set -# CONFIG_CPCI405 is not set +# CONFIG_ECONET is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EFS_FS is not set +# CONFIG_ELF_CORE is not set +CONFIG_EMBEDDED=y +CONFIG_ENABLE_MUST_CHECK=y # CONFIG_EP405 is not set -# CONFIG_REDWOOD_5 is not set -# CONFIG_REDWOOD_6 is not set -# CONFIG_SYCAMORE is not set -# CONFIG_WALNUT is not set -CONFIG_MAGICBOX=y -# CONFIG_XILINX_ML300 is not set -# CONFIG_XILINX_ML403 is not set -CONFIG_IBM_OCP=y -CONFIG_BIOS_FIXUP=y -CONFIG_405EP=y -CONFIG_PPC4xx_DMA=y -CONFIG_PPC4xx_EDMA=y -CONFIG_PPC_GEN550=y -CONFIG_UART0_TTYS0=y -# CONFIG_UART0_TTYS1 is not set -CONFIG_NOT_COHERENT_CACHE=y - -# -# Platform options -# -# CONFIG_PC_KEYBOARD is not set -# CONFIG_HIGHMEM is not set -CONFIG_HZ_100=y -# CONFIG_HZ_250 is not set -# CONFIG_HZ_1000 is not set -CONFIG_HZ=100 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_EPIC100 is not set +CONFIG_EPOLL=y +# CONFIG_EQUALIZER is not set +CONFIG_EXPERIMENTAL=y +CONFIG_EXPORTFS=m +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# 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_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_FAT_FS=m +# CONFIG_FB is not set +# CONFIG_FDDI is not set +# CONFIG_FEALNX is not set +CONFIG_FIB_RULES=y +# CONFIG_FIRMWARE_EDID is not set CONFIG_FLATMEM=y +CONFIG_FLATMEM_MANUAL=y CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_CMDLINE_BOOL=y -CONFIG_CMDLINE="console=ttyS0,115200" -# CONFIG_PM is not set -# CONFIG_SOFTWARE_SUSPEND is not set -# CONFIG_SECCOMP is not set -CONFIG_ISA_DMA_API=y - -# -# Bus options -# -# CONFIG_PPC_I8259 is not set -CONFIG_PPC_INDIRECT_PCI=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# Advanced setup -# -# CONFIG_ADVANCED_OPTIONS is not set - -# -# Default settings for advanced configuration options are used -# +# CONFIG_FORCEDETH is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_FTL is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set +# CONFIG_FUSION_SPI is not set +CONFIG_FUTEX=y +CONFIG_FW_LOADER=y +CONFIG_GACT_PROB=y +# CONFIG_GAMEPORT is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_NVRAM=y +CONFIG_GENERIC_TIME=y +# CONFIG_GEN_RTC is not set +# CONFIG_GFS2_FS is not set +# CONFIG_HAMACHI is not set +CONFIG_HAMRADIO=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_HERMES=m +CONFIG_HFSPLUS_FS=m +CONFIG_HFS_FS=m +# CONFIG_HIGHMEM is not set CONFIG_HIGHMEM_START=0xfe000000 -CONFIG_LOWMEM_SIZE=0x30000000 -CONFIG_KERNEL_START=0xc0000000 -CONFIG_TASK_SIZE=0x80000000 -CONFIG_CONSISTENT_START=0xff100000 -CONFIG_CONSISTENT_SIZE=0x00200000 -CONFIG_BOOT_LOAD=0x00400000 - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m +# CONFIG_HIPPI is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_CS=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_PLX=m +CONFIG_HOTPLUG=y +# CONFIG_HOTPLUG_PCI is not set +# CONFIG_HP100 is not set +# CONFIG_HPFS_FS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set +CONFIG_HW_RANDOM=y +CONFIG_HZ=100 +CONFIG_HZ_100=y +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_250 is not set +# CONFIG_I2C is not set +# CONFIG_I2O is not set +# CONFIG_I82092 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_IEEE1394 is not set +CONFIG_IEEE80211=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_IFB=m +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -# CONFIG_NET_IPGRE is not set -CONFIG_IPSEC_NAT_TRAVERSAL=y -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET_AH=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_INET_DIAG=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TCP_DIAG=m CONFIG_INET_TUNNEL=m -# CONFIG_INET_DIAG is not set -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_BIC=y - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_TUNNEL=m +# CONFIG_INFINIBAND is not set +# CONFIG_INFTL is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_INPUT is not set +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m +# CONFIG_IPC_NS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y CONFIG_IPV6=m +# CONFIG_IPV6_MIP6 is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -# CONFIG_INET6_TUNNEL is not set +CONFIG_IPV6_ROUTER_PREF=y +# CONFIG_IPV6_ROUTE_INFO is not set +CONFIG_IPV6_SIT=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE 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_STRING is not set -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y - -# -# IP: Netfilter Configuration -# +CONFIG_IPW2100=m +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2200=m +# CONFIG_IPW2200_DEBUG is not set +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPX is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_DCCP=m +CONFIG_IP_DCCP_ACKVEC=y +CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_CT_ACCT=y -# CONFIG_IP_NF_CONNTRACK_MARK is not set # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=y CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_IPP2P=m -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_IRC=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_TARGET_ROUTE=m -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_NAT_PPTP=m 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_RAW is not set -# CONFIG_IP_NF_ARPTABLES is not set +# CONFIG_IP_NF_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_TFTP=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_RAW=m CONFIG_IP_NF_SET=m -CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPHASH=m CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_IPTREE=m CONFIG_IP_NF_SET_MACIPMAP=m -CONFIG_IP_NF_SET_PORTMAP=m -CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_NETHASH=m -CONFIG_IP_NF_SET_IPTREE=m -CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_IMQ=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_TARGET_SET=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -# CONFIG_IP6_NF_IPTABLES is not set - -# -# Bridge: Netfilter Configuration -# -# CONFIG_BRIDGE_NF_EBTABLES is not set - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# 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 - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 -CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m -CONFIG_NET_EMATCH_META=m -CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -# CONFIG_NET_ACT_SIMP is not set -CONFIG_NET_CLS_IND=y -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set +# CONFIG_IP_VS is not set # CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=m - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# Memory Technology Devices (MTD) -# +CONFIG_ISA_DMA_API=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISDN is not set +CONFIG_ISO9660_FS=m +# CONFIG_IXGB is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS_FS is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_JOLIET=y +# CONFIG_KALLSYMS is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_KERNEL_START=0xc0000000 +# CONFIG_KEXEC is not set +# CONFIG_KEYS is not set +# CONFIG_KMOD is not set +# CONFIG_LAPB is not set +# CONFIG_LASAT is not set +# CONFIG_LBD is not set +# CONFIG_LDM_PARTITION is not set +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_TIMER=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_LIBCRC32C=m +CONFIG_LLC=y +CONFIG_LLC2=m +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCKD=m +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_LOCKD_V4=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_LOWMEM_SIZE=0x30000000 +# CONFIG_LSF is not set +# CONFIG_LXT_PHY is not set +CONFIG_MAC_PARTITION=y +CONFIG_MAGICBOX=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MARKEINS is not set +# CONFIG_MARVELL_PHY is not set +CONFIG_MATH_EMULATION=y +# CONFIG_MD is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_SAS is not set +CONFIG_MII=y +CONFIG_MINIX_FS=m +# CONFIG_MINIX_SUBPARTITION is not set +CONFIG_MINI_FO=y +CONFIG_MKISS=m +# CONFIG_MMC is not set +CONFIG_MMU=y +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +CONFIG_MSDOS_FS=m +CONFIG_MSDOS_PARTITION=y CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y +# CONFIG_MTD_ABSENT is not set CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# +# CONFIG_MTD_BLOCK2MTD is not set CONFIG_MTD_CFI=y -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_GEN_PROBE=y CONFIG_MTD_CFI_ADV_OPTIONS=y -CONFIG_MTD_CFI_NOSWAP=y +CONFIG_MTD_CFI_AMDSTD=y # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set -# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set # CONFIG_MTD_CFI_GEOMETRY is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 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_OTP is not set # CONFIG_MTD_CFI_INTELEXT is not set -CONFIG_MTD_CFI_AMDSTD=y +# 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_CMDLINE_PARTS is not set CONFIG_MTD_COMPLEX_MAPPINGS=y -# CONFIG_MTD_PHYSMAP is not set -CONFIG_MTD_MAGICMAP=y -# CONFIG_MTD_PCI is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -# CONFIG_MTD_BLOCK2MTD is not set - -# -# Disk-On-Chip Device Drivers -# +# 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 - -# -# NAND Flash Device Drivers -# +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 - -# -# OneNAND Flash Device Drivers -# +# CONFIG_MTD_OBSOLETE_CHIPS is not set # CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_RAM is not set -# CONFIG_BLK_DEV_INITRD is not set -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Macintosh device drivers -# -# CONFIG_WINDFARM is not set - -# -# Network device support -# +# 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_MYRI10GE is not set +# CONFIG_NATSEMI is not set +# CONFIG_NCP_FS is not set +# CONFIG_NE2K_PCI is not set +CONFIG_NET=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETDEBUG is not set CONFIG_NETDEVICES=y -# CONFIG_IFB is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_IMQ=m -# CONFIG_IMQ_BEHAVIOR_AA is not set -# CONFIG_IMQ_BEHAVIOR_AB is not set -CONFIG_IMQ_BEHAVIOR_BA=y -# CONFIG_IMQ_BEHAVIOR_BB is not set -CONFIG_IMQ_NUM_DEVS=2 -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +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 +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=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +# CONFIG_NETPOLL is not set +# CONFIG_NETROM is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_ACT_GACT=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_POLICE=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS=y +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_CLS_POLICE=y +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_U32=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_ESTIMATOR=y CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_IBM_EMAC=y -CONFIG_IBM_EMAC_RXB=64 -CONFIG_IBM_EMAC_TXB=8 -CONFIG_IBM_EMAC_POLL_WEIGHT=32 -CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256 -CONFIG_IBM_EMAC_RX_SKB_HEADROOM=0 -# CONFIG_IBM_EMAC_PHY_RX_CLK_FIX is not set -# CONFIG_IBM_EMAC_DEBUG is not set -# CONFIG_NET_PCI is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# +# CONFIG_NET_FC is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_NET_IPIP=m +CONFIG_NET_KEY=m +CONFIG_NET_PCI=y +# CONFIG_NET_PCMCIA is not set +CONFIG_NET_PKTGEN=m +# CONFIG_NET_POLL_CONTROLLER is not set CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -# CONFIG_IPW_QOS is not set -# CONFIG_IPW2200_DEBUG is not set -# CONFIG_AIRO is not set -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -# CONFIG_HOSTAP_PLX is not set -CONFIG_HOSTAP_PCI=m -# CONFIG_BCM43XX is not set +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_CBQ=m +# CONFIG_NET_SCH_CLK_CPU is not set +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +CONFIG_NET_SCH_CLK_JIFFIES=y +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_TEQL=m +# CONFIG_NET_TULIP is not set +# CONFIG_NET_VENDOR_3COM is not set CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -# CONFIG_INPUT is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -# CONFIG_WATCHDOG_NOWAYOUT is not set - -# -# Watchdog Device Drivers -# -# CONFIG_SOFT_WATCHDOG is not set -# CONFIG_BOOKE_WDT is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set -# CONFIG_NVRAM is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_AGP is not set -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -# CONFIG_NEW_LEDS is not set - -# -# LED drivers -# - -# -# LED Triggers -# - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=m -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set -# CONFIG_XFS_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 is not set -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_CRAMFS is not set -CONFIG_SQUASHFS=y -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -# CONFIG_NFS_FS is not set -# CONFIG_NFSD is not set -# CONFIG_SMB_FS is not set -# CONFIG_CIFS is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# +CONFIG_NET_WIRELESS_RTNETLINK=y +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_TCP=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFS_COMMON=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFTL is not set CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set @@ -1075,95 +796,542 @@ CONFIG_NLS_CODEPAGE_850=m # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set # CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -# CONFIG_NLS_ISO8859_15 is not set CONFIG_NLS_KOI8_R=m # CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=m - -# -# IBM 40x options -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y +CONFIG_NORTEL_HERMES=m +CONFIG_NOT_COHERENT_CACHE=y +# CONFIG_NS83820 is not set +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +# CONFIG_NVRAM is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_PARPORT is not set +CONFIG_PARTITION_ADVANCED=y +CONFIG_PCCARD=m +CONFIG_PCCARD_NONSTATIC=m +CONFIG_PCI=y +# CONFIG_PCIPCWATCHDOG is not set +CONFIG_PCI_ATMEL=m +CONFIG_PCI_DOMAINS=y +CONFIG_PCI_HERMES=m +CONFIG_PCMCIA=m +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_ATMEL is not set +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_HERMES is not set +# CONFIG_PCMCIA_IOCTL is not set +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_RAYCS is not set +# CONFIG_PCMCIA_SPECTRUM is not set +# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_WL3501 is not set +# CONFIG_PCNET32 is not set +# CONFIG_PC_KEYBOARD is not set +# CONFIG_PD6729 is not set +# CONFIG_PHONE is not set +# CONFIG_PHYLIB is not set +CONFIG_PLIST=y +CONFIG_PLX_HERMES=m +# CONFIG_PM is not set +# CONFIG_POSIX_MQUEUE 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_PPP=m +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_PRINTK=y +# CONFIG_PRINTK_TIME is not set +CONFIG_PRISM54=m +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROFILING is not set +# CONFIG_QEMU is not set +# CONFIG_QLA3XXX is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_R3964 is not set +# CONFIG_R8169 is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RAID_ATTRS is not set +CONFIG_RAMFS=y +# CONFIG_RAW_DRIVER is not set +# CONFIG_REDWOOD_5 is not set +# CONFIG_REDWOOD_6 is not set +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_RELAY is not set +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_RFD_FTL is not set +CONFIG_ROMFS_FS=m +# CONFIG_ROSE is not set +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_RTC_CLASS is not set +CONFIG_RT_MUTEXES=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_S2IO is not set +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_SCSI=m +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_ARCMSR is not set +# CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_GDTH is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_LPFC is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_NSP32 is not set +CONFIG_SCSI_PROC_FS=y +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_STEX is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set +# CONFIG_SECCOMP is not set +# CONFIG_SECURITY is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_CS=m +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_NR_UARTS=2 +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_SERIAL_TEXT_DEBUG is not set +# CONFIG_SERIO is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_SHAPER is not set +CONFIG_SHMEM=y +# CONFIG_SIS190 is not set +# CONFIG_SIS900 is not set +# CONFIG_SK98LIN is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +CONFIG_SLAB=y +CONFIG_SLHC=m +# CONFIG_SLIP is not set +# CONFIG_SLOB is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_SND=m +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# 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_DARLA24 is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +CONFIG_SND_HWDEP=m +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_MIXART is not set +CONFIG_SND_MIXER_OSS=m +# CONFIG_SND_MONA is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_NM256 is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_PDAUDIOCF is not set +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_TIMER=m +# CONFIG_SND_TRIDENT is not set +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_VXPOCKET is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_SOUND is not set +# CONFIG_SOUND_PRIME is not set +# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_SSFDC is not set +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_STANDALONE=y +# CONFIG_STRIP is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNGEM is not set +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +# CONFIG_SUN_PARTITION is not set +CONFIG_SWAP=y +# CONFIG_SYCAMORE is not set +# CONFIG_SYNCLINK_CS is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_SYSCTL=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +# CONFIG_SYSV_FS is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_TASKSTATS is not set +CONFIG_TASK_SIZE=0x80000000 +# CONFIG_TCG_TPM is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set -# CONFIG_SERIAL_TEXT_DEBUG is not set -CONFIG_PPC_OCP=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# +CONFIG_TEXTSEARCH_KMP=m +# CONFIG_TIFM_CORE is not set +# CONFIG_TIGON3 is not set +# CONFIG_TINY_SHMEM is not set +# CONFIG_TIPC is not set +# CONFIG_TLAN is not set +CONFIG_TMD_HERMES=m +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TR is not set +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TUN=m +CONFIG_UART0_TTYS0=y +# CONFIG_UART0_TTYS1 is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y +# CONFIG_UFS_FS is not set +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_UNIX=y +CONFIG_UNIX98_PTYS=y +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_USB is not set +# CONFIG_USB_ACECAD is not set +CONFIG_USB_ACM=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_APPLETOUCH is not set +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +CONFIG_USB_ATM=m +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_CATC=m +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_DABUSB is not set +# CONFIG_USB_DEBUG is not set +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_EZUSB=y +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_HID is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_KAWETH=m +# CONFIG_USB_KBD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LIBUSUAL is not set +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_MOUSE is not set +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_OTG is not set +CONFIG_USB_PEGASUS=m +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_POWERMATE is not set +CONFIG_USB_PRINTER=m +# CONFIG_USB_RIO500 is not set +CONFIG_USB_RTL8150=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_XIRCOM=m +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_SL811_HCD is not set +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_STORAGE=m +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_KARMA=y +# CONFIG_USB_STORAGE_ONETOUCH is not set +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_USBAT=y +# CONFIG_USB_TEST is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_USBNET=m +CONFIG_USB_USBNET_MII=m +# CONFIG_USB_WACOM is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_XUSBATM is not set +# CONFIG_USB_YEALINK is not set +CONFIG_USB_ZD1201=m +# CONFIG_UTS_NS is not set +CONFIG_VFAT_FS=m +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_VLAN_8021Q=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_VT is not set +# CONFIG_VXFS_FS is not set +# CONFIG_W1 is not set +# CONFIG_WALNUT is not set +# CONFIG_WAN is not set +CONFIG_WANT_EARLY_SERIAL=y +# CONFIG_WAN_ROUTER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_WDTPCI is not set +# CONFIG_WINDFARM is not set +CONFIG_WIRELESS_EXT=y +# CONFIG_WR_PPMC is not set +# CONFIG_X25 is not set +CONFIG_XFRM=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_USER=m +CONFIG_XFS_FS=m +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_SECURITY is not set +# CONFIG_XILINX_ML300 is not set +# CONFIG_XILINX_ML403 is not set +# CONFIG_YAM is not set +# CONFIG_YELLOWFIN is not set +CONFIG_YENTA=m +# CONFIG_YENTA_O2 is not set +# CONFIG_YENTA_RICOH is not set +# CONFIG_YENTA_TI is not set +# CONFIG_YENTA_TOSHIBA is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/magicbox-2.6/config-diff b/target/linux/magicbox-2.6/config-diff new file mode 100644 index 0000000000..b7d48698c5 --- /dev/null +++ b/target/linux/magicbox-2.6/config-diff @@ -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 diff --git a/target/linux/magicbox-2.6/patches/001-magicbox_support.patch b/target/linux/magicbox-2.6/patches/001-magicbox_support.patch index b7806da697..7c609e5d02 100644 --- a/target/linux/magicbox-2.6/patches/001-magicbox_support.patch +++ b/target/linux/magicbox-2.6/patches/001-magicbox_support.patch @@ -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 diff --git a/target/linux/magicbox-2.6/patches/002-flash_map.patch b/target/linux/magicbox-2.6/patches/002-flash_map.patch index e5f803a144..5d29a047d5 100644 --- a/target/linux/magicbox-2.6/patches/002-flash_map.patch +++ b/target/linux/magicbox-2.6/patches/002-flash_map.patch @@ -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 */ diff --git a/target/linux/rb532-2.6/Makefile b/target/linux/rb532-2.6/Makefile index e59b32cd8b..3766cf9a0e 100644 --- a/target/linux/rb532-2.6/Makefile +++ b/target/linux/rb532-2.6/Makefile @@ -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)) diff --git a/target/linux/rb532-2.6/config b/target/linux/rb532-2.6/config index 358e61965b..1349c73ed7 100644 --- a/target/linux/rb532-2.6/config +++ b/target/linux/rb532-2.6/config @@ -1,1207 +1,797 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Wed Oct 25 20:06:48 2006 -# -CONFIG_MIPS=y - -# -# Machine selection -# -# CONFIG_MIPS_MTX1 is not set -# CONFIG_MIPS_BOSPORUS is not set -# CONFIG_MIPS_PB1000 is not set -# CONFIG_MIPS_PB1100 is not set -# CONFIG_MIPS_PB1500 is not set -# CONFIG_MIPS_PB1550 is not set -# CONFIG_MIPS_PB1200 is not set -# CONFIG_MIPS_DB1000 is not set -# CONFIG_MIPS_DB1100 is not set -# CONFIG_MIPS_DB1500 is not set -# CONFIG_MIPS_DB1550 is not set -# CONFIG_MIPS_DB1200 is not set -# CONFIG_MIPS_MIRAGE 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_LASAT is not set -# CONFIG_MIPS_ATLAS is not set -# CONFIG_MIPS_MALTA is not set -# CONFIG_MIPS_SEAD is not set -# CONFIG_MIPS_SIM 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_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_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_SWARM is not set -# CONFIG_SIBYTE_SENTOSA is not set -# CONFIG_SIBYTE_RHONE is not set -# CONFIG_SIBYTE_CARMEL is not set -# CONFIG_SIBYTE_PTSWARM is not set -# CONFIG_SIBYTE_LITTLESUR is not set -# CONFIG_SIBYTE_CRHINE is not set -# CONFIG_SIBYTE_CRHONE is not set -# CONFIG_SNI_RM200_PCI is not set -# CONFIG_TOSHIBA_JMR3927 is not set -CONFIG_MIKROTIK_RB500=y -# CONFIG_TOSHIBA_RBTX4927 is not set -# CONFIG_TOSHIBA_RBTX4938 is not set -CONFIG_RWSEM_GENERIC_SPINLOCK=y -CONFIG_GENERIC_FIND_NEXT_BIT=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y -CONFIG_DMA_NONCOHERENT=y -CONFIG_DMA_NEED_PCI_MAP_STATE=y +CONFIG_32BIT=y +# CONFIG_64BIT is not set +# CONFIG_64BIT_PHYS_ADDR is not set +# CONFIG_6PACK is not set +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_9P_FS is not set +# CONFIG_ACENIC is not set +# CONFIG_ACORN_PARTITION is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_AIRO_CS=m +# CONFIG_AMD8111_ETH is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_APPLICOM is not set +CONFIG_ARCH_FLATMEM_ENABLE=y +# CONFIG_ARCNET is not set +CONFIG_ARPD=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_ATA is not set +# CONFIG_ATALK is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_ATM=m +CONFIG_ATMEL=m +# CONFIG_ATM_AMBASSADOR is not set +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_DUMMY=m +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_LANAI is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +# CONFIG_ATM_NICSTAR is not set +CONFIG_ATM_TCP=m +# CONFIG_ATM_ZATM is not set +# CONFIG_AUDIT is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_B44 is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BASE_FULL=y +CONFIG_BASE_SMALL=0 +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +CONFIG_BCM43XX_PIO=y +# CONFIG_BCM43XX_PIO_MODE is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +CONFIG_BLK_DEV_CF_MIPS=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_DAC960 is not set +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_SD=m +# CONFIG_BLK_DEV_SR is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLOCK=y +# CONFIG_BNX2 is not set +CONFIG_BONDING=m +# CONFIG_BPQETHER is not set +CONFIG_BRIDGE=y +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BROKEN_ON_SMP=y +CONFIG_BSD_DISKLABEL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_BT=m +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBPA10X=m +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIDTL1 is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIVHCI=m +CONFIG_BT_L2CAP=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_SCO=m +CONFIG_BUG=y +CONFIG_CARDBUS=y +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_CASSINI is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_CHELSIO_T1 is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_ST is not set +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CLS_U32_MARK=y +CONFIG_CLS_U32_PERF=y +CONFIG_CMDLINE="" +# CONFIG_CODA_FS is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_CONNECTOR is not set # 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_SYS_SUPPORTS_LITTLE_ENDIAN=y -CONFIG_IRQ_CPU=y -CONFIG_SWAP_IO_SPACE=y -CONFIG_MIPS_L1_CACHE_SHIFT=4 - -# -# CPU selection -# +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_TX39XX is not set -# CONFIG_CPU_VR41XX is not set # CONFIG_CPU_R4300 is not set # CONFIG_CPU_R4X00 is not set -# CONFIG_CPU_TX49XX is not set # CONFIG_CPU_R5000 is not set # CONFIG_CPU_R5432 is not set # CONFIG_CPU_R6000 is not set -# CONFIG_CPU_NEVADA is not set # CONFIG_CPU_R8000 is not set -# CONFIG_CPU_R10000 is not set # CONFIG_CPU_RM7000 is not set # CONFIG_CPU_RM9000 is not set # CONFIG_CPU_SB1 is not set -CONFIG_SYS_HAS_CPU_MIPS32_R1=y -CONFIG_CPU_MIPS32=y -CONFIG_CPU_MIPSR1=y -CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y - -# -# Kernel type -# -CONFIG_32BIT=y -# CONFIG_64BIT is not set -CONFIG_PAGE_SIZE_4KB=y -# CONFIG_PAGE_SIZE_8KB is not set -# 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_64BIT_PHYS_ADDR is not set -CONFIG_CPU_HAS_LLSC=y -CONFIG_CPU_HAS_SYNC=y -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y CONFIG_CPU_SUPPORTS_HIGHMEM=y -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y +# CONFIG_CPU_TX39XX is not set +# CONFIG_CPU_TX49XX is not set +# CONFIG_CPU_VR41XX is not set +# CONFIG_CRAMFS is not set +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +CONFIG_CROSSCOMPILE=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_WP512=m +# CONFIG_DDB5477 is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DECNET is not set +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_BIC is not set +# CONFIG_DEFAULT_CFQ is not set +# CONFIG_DEFAULT_CUBIC is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_HTCP is not set +CONFIG_DEFAULT_IOSCHED="deadline" +# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="vegas" +CONFIG_DEFAULT_VEGAS=y +# CONFIG_DEFAULT_WESTWOOD is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DGRS is not set # CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_DL2K is not set +# CONFIG_DM9000 is not set +# CONFIG_DMA_ENGINE is not set +CONFIG_DMA_NEED_PCI_MAP_STATE=y +CONFIG_DMA_NONCOHERENT=y +# CONFIG_DNOTIFY is not set +# CONFIG_DRM is not set +# CONFIG_DTLK is not set +# CONFIG_DUMMY is not set +# CONFIG_DVB is not set +CONFIG_E100=m +# CONFIG_E1000 is not set +# CONFIG_ECONET is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EFS_FS is not set +# CONFIG_ELF_CORE is not set +CONFIG_EMBEDDED=y +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_EPIC100 is not set +CONFIG_EPOLL=y +# CONFIG_EQUALIZER is not set +CONFIG_EXPERIMENTAL=y +CONFIG_EXPORTFS=m +CONFIG_EXT2_FS=m +# CONFIG_EXT2_FS_XATTR is not set +# 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_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_FAT_FS=m +# CONFIG_FB is not set +# CONFIG_FDDI is not set +# CONFIG_FEALNX is not set +CONFIG_FIB_RULES=y +# CONFIG_FIRMWARE_EDID is not set CONFIG_FLATMEM=y +CONFIG_FLATMEM_MANUAL=y CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="../../root" -CONFIG_INITRAMFS_ROOT_UID=0 -CONFIG_INITRAMFS_ROOT_GID=0 -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -# CONFIG_ELF_CORE is not set -CONFIG_BASE_FULL=y +# CONFIG_FORCEDETH is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_FTL is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set +# CONFIG_FUSION_SPI is not set CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_LBD is not set -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -# CONFIG_IOSCHED_DEADLINE is not set -# CONFIG_IOSCHED_CFQ is not set -CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set -# CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set -CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Bus options (PCI, PCMCIA, EISA, ISA, TC) -# -CONFIG_HW_HAS_PCI=y -CONFIG_PCI=y -CONFIG_MMU=y - -# -# PCCARD (PCMCIA/CardBus) support -# -# CONFIG_PCCARD is not set - -# -# PCI Hotplug Support -# +CONFIG_FW_LOADER=y +CONFIG_GACT_PROB=y +# CONFIG_GAMEPORT is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_TIME=y +# CONFIG_GEN_RTC is not set +# CONFIG_GFS2_FS is not set +# CONFIG_HAMACHI is not set +CONFIG_HAMRADIO=y +# CONFIG_HAPPYMEAL is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_HERMES=m +CONFIG_HFSPLUS_FS=m +CONFIG_HFS_FS=m +# CONFIG_HIPPI is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_CS=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_PLX=m +CONFIG_HOTPLUG=y # CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_MISC is not set -CONFIG_TRAD_SIGNALS=y - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m +# CONFIG_HP100 is not set +# CONFIG_HPFS_FS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set +CONFIG_HW_HAS_PCI=y +CONFIG_HW_RANDOM=y +CONFIG_HZ=100 +CONFIG_HZ_100=y +# CONFIG_HZ_1000 is not set +# 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_I2O is not set +# CONFIG_I82092 is not set +# CONFIG_IDE is not set +# CONFIG_IEEE1394 is not set +CONFIG_IEEE80211=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_IFB=m +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -CONFIG_IPSEC_NAT_TRAVERSAL=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET_AH=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_INET_DIAG=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -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 -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=y -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_TUNNEL=m +# CONFIG_INFINIBAND is not set +# CONFIG_INFTL is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_INPUT is not set +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m +# CONFIG_IPC_NS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y CONFIG_IPV6=m +# CONFIG_IPV6_MIP6 is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_PRIVACY is not set CONFIG_IPV6_ROUTER_PREF=y # CONFIG_IPV6_ROUTE_INFO is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_SIT=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -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_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y - -# -# IP: Netfilter Configuration -# +CONFIG_IPW2100=m +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2200=m +# CONFIG_IPW2200_DEBUG is not set +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPX is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_DCCP=m +CONFIG_IP_DCCP_ACKVEC=y +CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set -# CONFIG_IP_NF_CT_PROTO_SCTP is not set +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_ACCT=y +CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_IPP2P=m -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_IRC=m +CONFIG_IP_NF_MANGLE=y +CONFIG_IP_NF_MATCH_ADDRTYPE=m CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -# CONFIG_IP_NF_MATCH_ADDRTYPE is not set -# CONFIG_IP_NF_MATCH_HASHLIMIT is not set +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=m -# CONFIG_IP_NF_TARGET_LOG is not set -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_TARGET_ROUTE=m -# CONFIG_IP_NF_TARGET_NETMAP is not set -# CONFIG_IP_NF_TARGET_SAME is not set -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_NAT_PPTP=m 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_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_TFTP=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_RAW=m -# CONFIG_IP_NF_ARPTABLES is not set CONFIG_IP_NF_SET=m -CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPHASH=m CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_IPTREE=m CONFIG_IP_NF_SET_MACIPMAP=m -CONFIG_IP_NF_SET_PORTMAP=m -CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_NETHASH=m -CONFIG_IP_NF_SET_IPTREE=m -CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_IMQ=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_TARGET_SET=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -# CONFIG_IP6_NF_MATCH_RT is not set -# CONFIG_IP6_NF_MATCH_OPTS is not set -# CONFIG_IP6_NF_MATCH_FRAG is not set -# CONFIG_IP6_NF_MATCH_HL is not set -CONFIG_IP6_NF_MATCH_OWNER=m -# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_IMQ=m -# CONFIG_IP6_NF_TARGET_LOG is not set -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_TARGET_ROUTE=m -CONFIG_IP6_NF_MANGLE=m -# CONFIG_IP6_NF_TARGET_HL is not set -# CONFIG_IP6_NF_RAW is not set - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set +# CONFIG_IP_VS is not set +# CONFIG_IRDA is not set +CONFIG_IRQ_CPU=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISDN is not set +CONFIG_ISO9660_FS=m +# CONFIG_IXGB is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS_FS is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_JOLIET=y +# CONFIG_KALLSYMS is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_KEYS is not set +# CONFIG_KMOD is not set +CONFIG_KORINA=y +# CONFIG_LAN_SAA9730 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 - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -# CONFIG_CLS_U32_PERF is not set -# CONFIG_CLS_U32_MARK is not set -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -# CONFIG_AX25_DAMA_SLAVE is not set -# CONFIG_NETROM is not set -# CONFIG_ROSE is not set - -# -# AX.25 network device drivers -# +# CONFIG_LASAT is not set +# CONFIG_LBD is not set +# CONFIG_LDM_PARTITION is not set +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_TIMER=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_LIBCRC32C=m +CONFIG_LLC=y +CONFIG_LLC2=m +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCKD=m +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_LOCKD_V4=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_LSF is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +# CONFIG_MACH_VR41XX is not set +CONFIG_MAC_PARTITION=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MARKEINS is not set +# CONFIG_MD is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_SAS is not set +CONFIG_MII=y +CONFIG_MIKROTIK_RB500=y +CONFIG_MINIX_FS=m +# CONFIG_MINIX_SUBPARTITION 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=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_MKISS=m -# CONFIG_6PACK is not set -# CONFIG_BPQETHER is not set -# CONFIG_BAYCOM_SER_FDX is not set -# CONFIG_BAYCOM_SER_HDX is not set -# CONFIG_YAM is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# +# CONFIG_MMC is not set +CONFIG_MMU=y +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODVERSIONS 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_MSDOS_FS=m +CONFIG_MSDOS_PARTITION=y CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y +# CONFIG_MTD_ABSENT is not set CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# +CONFIG_MTD_BLOCK2MTD=y # CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLOCK2MTD=y - -# -# Disk-On-Chip Device Drivers -# +# 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 - -# -# NAND Flash Device Drivers -# +# 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_VERIFY_WRITE=y -CONFIG_MTD_NAND_RB500=y -CONFIG_MTD_NAND_IDS=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 - -# -# OneNAND Flash Device Drivers -# +CONFIG_MTD_NAND_RB500=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_OBSOLETE_CHIPS is not set # CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# -# CONFIG_PARPORT is not set - -# -# Plug and Play support -# - -# -# Block devices -# -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set -CONFIG_BLK_DEV_CF_MIPS=y - -# -# ATA/ATAPI/MFM/RLL support -# -# CONFIG_IDE is not set - -# -# SCSI device support -# -# CONFIG_RAID_ATTRS is not set -# CONFIG_SCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_IMQ=m -# CONFIG_IMQ_BEHAVIOR_AA is not set -# CONFIG_IMQ_BEHAVIOR_AB is not set -CONFIG_IMQ_BEHAVIOR_BA=y -# CONFIG_IMQ_BEHAVIOR_BB is not set -CONFIG_IMQ_NUM_DEVS=2 -CONFIG_TUN=m - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -# CONFIG_PHYLIB is not set - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -CONFIG_KORINA=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -# CONFIG_NET_VENDOR_3COM is not set -# CONFIG_DM9000 is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_B44 is not set -# CONFIG_FORCEDETH is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -# CONFIG_E100 is not set -# CONFIG_FEALNX 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_MYRI10GE is not set # CONFIG_NATSEMI is not set +# CONFIG_NCP_FS is not set # CONFIG_NE2K_PCI is not set -# CONFIG_8139CP is not set -# CONFIG_8139TOO is not set -# CONFIG_SIS900 is not set -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -CONFIG_VIA_RHINE=y -# CONFIG_VIA_RHINE_MMIO is not set -# CONFIG_LAN_SAA9730 is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SIS190 is not set -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -# CONFIG_IPW2100 is not set -# CONFIG_IPW2200 is not set -# CONFIG_HERMES is not set -# CONFIG_ATMEL is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -# CONFIG_PRISM54 is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -# CONFIG_HOSTAP_PLX is not set -# CONFIG_HOSTAP_PCI is not set -# CONFIG_BCM43XX is not set -CONFIG_NET_WIRELESS=y - -# -# Wan interfaces -# -# CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -# CONFIG_SLIP is not set -# CONFIG_SHAPER is not set +CONFIG_NET=y # CONFIG_NETCONSOLE is not set +# CONFIG_NETDEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +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 +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=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m # CONFIG_NETPOLL is not set +# CONFIG_NETROM is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_ACT_GACT=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_POLICE=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS=y +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_U32=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_ESTIMATOR=y +CONFIG_NET_ETHERNET=y +# CONFIG_NET_FC is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_NET_IPIP=m +CONFIG_NET_KEY=m +CONFIG_NET_PCI=y +# CONFIG_NET_PCMCIA is not set +CONFIG_NET_PKTGEN=m # CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=y - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -# CONFIG_INPUT_EVDEV is not set -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -# CONFIG_WATCHDOG is not set -# CONFIG_RTC is not set -# CONFIG_GEN_RTC is not set -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_DRM is not set -# CONFIG_RAW_DRIVER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -# CONFIG_I2C is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# - -# -# Multimedia devices -# -# CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -# CONFIG_SOUND is not set - -# -# USB support -# -CONFIG_USB_ARCH_HAS_HCD=y -CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -# CONFIG_USB is not set - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# +CONFIG_NET_RADIO=y +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_CBQ=m +# CONFIG_NET_SCH_CLK_CPU is not set +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +CONFIG_NET_SCH_CLK_JIFFIES=y +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_TEQL=m +# CONFIG_NET_TULIP is not set +# CONFIG_NET_VENDOR_3COM is not set +CONFIG_NET_WIRELESS=y +CONFIG_NET_WIRELESS_RTNETLINK=y CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=y - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set -CONFIG_XFS_FS=m -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_XFS_RT is not set -# CONFIG_OCFS2_FS is not set -CONFIG_MINI_FO=m -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_YAFFS_FS=y -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -# CONFIG_CRAMFS is not set -CONFIG_SQUASHFS=y -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# +CONFIG_NFSD=m +CONFIG_NFSD_TCP=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFS_COMMON=y +# CONFIG_NFS_DIRECTIO is not set CONFIG_NFS_FS=m CONFIG_NFS_V3=y # CONFIG_NFS_V3_ACL is not set CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# +# CONFIG_NFTL is not set CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set @@ -1217,95 +807,529 @@ CONFIG_NLS_CODEPAGE_850=m # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set # CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m # CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=m - -# -# Profiling support -# -# CONFIG_PROFILING is not set - -# -# Kernel hacking -# +CONFIG_NORTEL_HERMES=m +# CONFIG_NS83820 is not set +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +# CONFIG_OCFS2_FS is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# 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_PARPORT is not set +CONFIG_PARTITION_ADVANCED=y +CONFIG_PCCARD=m +CONFIG_PCCARD_NONSTATIC=m +CONFIG_PCI=y +# CONFIG_PCIPCWATCHDOG is not set +CONFIG_PCI_ATMEL=m +CONFIG_PCI_HERMES=m +CONFIG_PCMCIA=m +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_ATMEL is not set +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_HERMES is not set +# CONFIG_PCMCIA_IOCTL is not set +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_RAYCS is not set +# CONFIG_PCMCIA_SPECTRUM is not set +# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_WL3501 is not set +# CONFIG_PCNET32 is not set +# CONFIG_PD6729 is not set +# CONFIG_PHONE is not set +# CONFIG_PHYLIB is not set +CONFIG_PLIST=y +CONFIG_PLX_HERMES=m +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_V2PCI is not set +# CONFIG_POSIX_MQUEUE is not set +CONFIG_PPP=m +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_PRINTK=y # CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_FS is not set -CONFIG_CROSSCOMPILE=y -CONFIG_CMDLINE="noinitrd console=ttyS0,115200" - -# -# Security options -# -# CONFIG_KEYS is not set +CONFIG_PRISM54=m +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROFILING is not set +# CONFIG_QEMU is not set +# CONFIG_QLA3XXX is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_R3964 is not set +# CONFIG_R8169 is not set +# CONFIG_RAID_ATTRS is not set +CONFIG_RAMFS=y +# CONFIG_RAW_DRIVER is not set +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_RELAY is not set +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_RFD_FTL is not set +CONFIG_ROMFS_FS=m +# CONFIG_ROSE is not set +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_RTC is not set +# CONFIG_RTC_CLASS is not set +CONFIG_RT_MUTEXES=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_S2IO is not set +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y +CONFIG_SCSI=m +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_ARCMSR is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_LPFC is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_NSP32 is not set +CONFIG_SCSI_PROC_FS=y +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_STEX is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_CS=m +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_NR_UARTS=2 +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_SERIO is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_SHAPER is not set +CONFIG_SHMEM=y +# 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_SK98LIN is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +CONFIG_SLAB=y +CONFIG_SLHC=m +# CONFIG_SLIP is not set +# CONFIG_SLOB is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_SND=m +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# 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_DARLA24 is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +CONFIG_SND_HWDEP=m +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_MIXART is not set +CONFIG_SND_MIXER_OSS=m +# CONFIG_SND_MONA is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_NM256 is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_PDAUDIOCF is not set +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_TIMER=m +# CONFIG_SND_TRIDENT is not set +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_VXPOCKET is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SNI_RM200_PCI is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +CONFIG_SOUND=m +# CONFIG_SOUND_PRIME is not set +# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_SSFDC is not set +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_STANDALONE=y +# CONFIG_STRIP is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNGEM is not set +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +# CONFIG_SUN_PARTITION is not set +CONFIG_SWAP=y +CONFIG_SWAP_IO_SPACE=y +# CONFIG_SYNCLINK_CS is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_SYSCTL=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +# CONFIG_SYSV_FS is not set +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +# CONFIG_SYS_HYPERVISOR is not set +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +# CONFIG_TASKSTATS is not set +# CONFIG_TCG_TPM is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m +CONFIG_TEXTSEARCH_KMP=m +# CONFIG_TIFM_CORE is not set +# CONFIG_TIGON3 is not set +# CONFIG_TINY_SHMEM is not set +# CONFIG_TIPC is not set +# CONFIG_TLAN is not set +CONFIG_TMD_HERMES=m +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TOSHIBA_JMR3927 is not set +# CONFIG_TOSHIBA_RBTX4927 is not set +# CONFIG_TOSHIBA_RBTX4938 is not set +# CONFIG_TR is not set +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TRAD_SIGNALS=y +CONFIG_TUN=m +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y +# CONFIG_UFS_FS is not set +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_UNIX=y +CONFIG_UNIX98_PTYS=y +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_USB=m +# CONFIG_USBPCWATCHDOG is not set +CONFIG_USB_ACM=m +# CONFIG_USB_ADUTUX is not set +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +# CONFIG_USB_APPLEDISPLAY is not set +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_ATM=m +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_CATC=m +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_DABUSB is not set +# CONFIG_USB_DEBUG is not set +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_EZUSB=y +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_HID is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_KAWETH=m +# CONFIG_USB_LCD is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LIBUSUAL is not set +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_OTG is not set +CONFIG_USB_PEGASUS=m +# CONFIG_USB_PHIDGET is not set +CONFIG_USB_PRINTER=m +# CONFIG_USB_RIO500 is not set +CONFIG_USB_RTL8150=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_XIRCOM=m +# CONFIG_USB_SL811_HCD is not set +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_STORAGE=m +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_USBAT=y +# CONFIG_USB_TEST is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +CONFIG_USB_UEAGLEATM=m +# CONFIG_USB_UHCI_HCD is not set +CONFIG_USB_USBNET=m +CONFIG_USB_USBNET_MII=m +# CONFIG_USB_XUSBATM is not set +CONFIG_USB_ZD1201=m +# CONFIG_UTS_NS is not set +CONFIG_VFAT_FS=m +CONFIG_VIA_RHINE=y +# CONFIG_VIA_RHINE_MMIO is not set +CONFIG_VIA_RHINE_NAPI=y +# CONFIG_VIA_VELOCITY is not set +# CONFIG_VIDEO_DEV is not set +CONFIG_VLAN_8021Q=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_VT is not set +# CONFIG_VXFS_FS is not set +# CONFIG_W1 is not set +# CONFIG_WAN is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_WDTPCI is not set +CONFIG_WIRELESS_EXT=y +# CONFIG_WR_PPMC is not set +# CONFIG_X25 is not set +CONFIG_XFRM=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_USER=m +CONFIG_XFS_FS=m +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_SECURITY is not set +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 +# CONFIG_YAM is not set +# CONFIG_YELLOWFIN is not set +CONFIG_YENTA=m +# CONFIG_YENTA_O2 is not set +# CONFIG_YENTA_RICOH is not set +# CONFIG_YENTA_TI is not set +# CONFIG_YENTA_TOSHIBA is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/rb532-2.6/config-diff b/target/linux/rb532-2.6/config-diff new file mode 100644 index 0000000000..36df9b8492 --- /dev/null +++ b/target/linux/rb532-2.6/config-diff @@ -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 diff --git a/target/linux/rb532-2.6/patches/100-rb5xx_support.patch b/target/linux/rb532-2.6/patches/100-rb5xx_support.patch index 9a8f21d207..0dda2407be 100644 --- a/target/linux/rb532-2.6/patches/100-rb5xx_support.patch +++ b/target/linux/rb532-2.6/patches/100-rb5xx_support.patch @@ -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__ diff --git a/target/linux/rb532-2.6/patches/110-korina_ethernet.patch b/target/linux/rb532-2.6/patches/110-korina_ethernet.patch index 723bc4ff10..659d15d9ec 100644 --- a/target/linux/rb532-2.6/patches/110-korina_ethernet.patch +++ b/target/linux/rb532-2.6/patches/110-korina_ethernet.patch @@ -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); +} - diff --git a/target/linux/rb532-2.6/patches/120-cf.patch b/target/linux/rb532-2.6/patches/120-cf.patch index f12b0a910d..6c61aa7071 100644 --- a/target/linux/rb532-2.6/patches/120-cf.patch +++ b/target/linux/rb532-2.6/patches/120-cf.patch @@ -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__ + diff --git a/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch b/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch index 46bde7e84b..6b263041cc 100644 --- a/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch +++ b/target/linux/rb532-2.6/patches/240-via_rhine_performance.patch @@ -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"); - -@@ -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 @@ +-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 - } - --#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); - - /* 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 @@ +@@ -1481,6 +1487,9 @@ + /* Length should omit the CRC */ + int pkt_len = data_size - 4; + ++#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 diff --git a/target/linux/rb532-2.6/patches/500-Nand.patch b/target/linux/rb532-2.6/patches/500-Nand.patch index dc310e9cea..cb2346544c 100644 --- a/target/linux/rb532-2.6/patches/500-Nand.patch +++ b/target/linux/rb532-2.6/patches/500-Nand.patch @@ -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 rb100_dev_ready(struct mtd_info *mtd) { -+ return SMEM1(NAND_STS_REG) & 0x80; -+} -+*/ -+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 int rb500_dev_ready(struct mtd_info *mtd) ++{ ++ return MEM32(IDT434_REG_BASE + GPIOD) & GPIO_RDY; +} ++ +/* -+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; -+ } ++ * 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 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); -+ -+ -+ -+ -+ diff --git a/target/linux/rb532-2.6/patches/510-Yaffs.patch b/target/linux/rb532-2.6/patches/510-Yaffs.patch index 937b928160..d7b9c976b4 100644 --- a/target/linux/rb532-2.6/patches/510-Yaffs.patch +++ b/target/linux/rb532-2.6/patches/510-Yaffs.patch @@ -1,65 +1,27 @@ -diff --git a/fs/Kconfig b/fs/Kconfig -index f9b5842..556f12a 100644 ---- a/fs/Kconfig -+++ b/fs/Kconfig -@@ -1022,6 +1022,15 @@ config EFS_FS +diff -urN linux.old/fs/Kconfig linux.dev/fs/Kconfig +--- linux.old/fs/Kconfig 2006-11-29 22:57:37.000000000 +0100 ++++ linux.dev/fs/Kconfig 2006-12-14 04:21:47.000000000 +0100 +@@ -1202,6 +1202,8 @@ To compile the EFS file system support as a module, choose M here: the module will be called efs. -+config YAFFS_FS -+ tristate "Yet Another Flash File System (YAFFS) support" -+ depends on MTD -+ help -+ JFFS is the Journaling Flash File System developed by Axis -+ Communications in Sweden, aimed at providing a crash/powerdown-safe -+ file system for disk-less embedded devices. Further information is -+ available at (<http://developer.axis.com/software/jffs/>). ++source "fs/yaffs2/Kconfig" + config JFFS_FS tristate "Journalling Flash File System (JFFS) support" - depends on MTD -diff --git a/fs/Makefile b/fs/Makefile -index 078d3d1..2062d2f 100644 ---- a/fs/Makefile -+++ b/fs/Makefile -@@ -84,6 +85,7 @@ obj-$(CONFIG_UFS_FS) += ufs/ - obj-$(CONFIG_EFS_FS) += efs/ - obj-$(CONFIG_JFFS_FS) += jffs/ - obj-$(CONFIG_JFFS2_FS) += jffs2/ -+obj-$(CONFIG_YAFFS_FS) += yaffs/ - obj-$(CONFIG_AFFS_FS) += affs/ - obj-$(CONFIG_ROMFS_FS) += romfs/ - obj-$(CONFIG_QNX4FS_FS) += qnx4/ -diff --git a/fs/yaffs/Makefile b/fs/yaffs/Makefile -new file mode 100644 -index 0000000..615c2b2 ---- /dev/null -+++ b/fs/yaffs/Makefile -@@ -0,0 +1,18 @@ -+# -+# Makefile for the Linux msdos filesystem routines. -+# -+# Note! Dependencies are done automagically by 'make dep', which also -+# removes any old dependencies. DON'T put your own dependencies here -+# unless it's something special (ie not a .c file). -+# -+# Note 2! The CFLAGS definitions are now in the main makefile. -+ -+ -+EXTRA_CFLAGS += -DCONFIG_YAFFS_YAFFS1 -DCONFIG_YAFFS_YAFFS2 -+ -+ -+obj-$(CONFIG_YAFFS_FS) += yaffs.o -+ -+yaffs-y = yaffs_fs.o yaffs_guts.o yaffs_mtdif.o yaffs_tagscompat.o \ -+ yaffs_packedtags2.o yaffs_mtdif2.o yaffs_tagsvalidity.o \ -+ yaffs_ecc.o -diff --git a/fs/yaffs/devextras.h b/fs/yaffs/devextras.h -new file mode 100644 -index 0000000..752c2cc ---- /dev/null -+++ b/fs/yaffs/devextras.h -@@ -0,0 +1,271 @@ + depends on MTD && BLOCK +diff -urN linux.old/fs/Makefile linux.dev/fs/Makefile +--- linux.old/fs/Makefile 2006-11-29 22:57:37.000000000 +0100 ++++ linux.dev/fs/Makefile 2006-12-14 04:21:47.000000000 +0100 +@@ -114,3 +114,4 @@ + obj-$(CONFIG_DEBUG_FS) += debugfs/ + obj-$(CONFIG_OCFS2_FS) += ocfs2/ + obj-$(CONFIG_GFS2_FS) += gfs2/ ++obj-$(CONFIG_YAFFS_FS) += yaffs2/ +diff -urN linux.old/fs/yaffs2/devextras.h linux.dev/fs/yaffs2/devextras.h +--- linux.old/fs/yaffs2/devextras.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/devextras.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,265 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * devextras.h @@ -79,10 +41,10 @@ index 0000000..752c2cc + * Most of these are from kernel includes placed here so we can use them in + * applications. + * -+ * $Id: devextras.h,v 1.1 2004/11/03 08:14:07 charles Exp $ ++ * $Id: devextras.h,v 1.2 2005/08/11 02:37:49 marty Exp $ + * + */ -+ ++ +#ifndef __EXTRAS_H__ +#define __EXTRAS_H__ + @@ -93,12 +55,11 @@ index 0000000..752c2cc + +#if !(defined __KERNEL__) || (defined WIN32) + -+// User space defines -+ -+typedef unsigned char __u8; -+typedef unsigned short __u16; -+typedef unsigned __u32; ++/* User space defines */ + ++typedef unsigned char __u8; ++typedef unsigned short __u16; ++typedef unsigned __u32; + +/* + * Simple doubly linked list implementation. @@ -109,9 +70,8 @@ index 0000000..752c2cc + * generate better code by using them directly rather than + * using the generic single-entry routines. + */ -+ -+ #define prefetch(x) 1 -+ ++ ++#define prefetch(x) 1 + +struct list_head { + struct list_head *next, *prev; @@ -132,9 +92,9 @@ index 0000000..752c2cc + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ -+static __inline__ void __list_add(struct list_head * new, -+ struct list_head * prev, -+ struct list_head * next) ++static __inline__ void __list_add(struct list_head *new, ++ struct list_head *prev, ++ struct list_head *next) +{ + next->prev = new; + new->next = next; @@ -163,7 +123,8 @@ index 0000000..752c2cc + * Insert a new entry before the specified head. + * This is useful for implementing queues. + */ -+static __inline__ void list_add_tail(struct list_head *new, struct list_head *head) ++static __inline__ void list_add_tail(struct list_head *new, ++ struct list_head *head) +{ + __list_add(new, head->prev, head); +} @@ -175,8 +136,8 @@ index 0000000..752c2cc + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ -+static __inline__ void __list_del(struct list_head * prev, -+ struct list_head * next) ++static __inline__ void __list_del(struct list_head *prev, ++ struct list_head *next) +{ + next->prev = prev; + prev->next = next; @@ -185,7 +146,8 @@ index 0000000..752c2cc +/** + * list_del - deletes entry from list. + * @entry: the element to delete from the list. -+ * Note: list_empty on entry does not return true after this, the entry is in an undefined state. ++ * Note: list_empty on entry does not return true after this, the entry is ++ * in an undefined state. + */ +static __inline__ void list_del(struct list_head *entry) +{ @@ -216,7 +178,8 @@ index 0000000..752c2cc + * @list: the new list to add. + * @head: the place to add it in the first list. + */ -+static __inline__ void list_splice(struct list_head *list, struct list_head *head) ++static __inline__ void list_splice(struct list_head *list, ++ struct list_head *head) +{ + struct list_head *first = list->next; + @@ -251,7 +214,8 @@ index 0000000..752c2cc + pos = pos->next, prefetch(pos->next)) + +/** -+ * list_for_each_safe - iterate over a list safe against removal of list entry ++ * list_for_each_safe - iterate over a list safe against removal ++ * of list entry + * @pos: the &struct list_head to use as a loop counter. + * @n: another &struct list_head to use as temporary storage + * @head: the head for your list. @@ -260,9 +224,6 @@ index 0000000..752c2cc + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = n, n = pos->next) + -+ -+ -+ +/* + * File types + */ @@ -296,22 +257,20 @@ index 0000000..752c2cc +#define ATTR_FORCE 512 /* Not a change, but a change it */ +#define ATTR_ATTR_FLAG 1024 + -+ +struct iattr { -+ unsigned int ia_valid; -+ unsigned ia_mode; -+ unsigned ia_uid; -+ unsigned ia_gid; -+ unsigned ia_size; -+ unsigned ia_atime; -+ unsigned ia_mtime; -+ unsigned ia_ctime; -+ unsigned int ia_attr_flags; ++ unsigned int ia_valid; ++ unsigned ia_mode; ++ unsigned ia_uid; ++ unsigned ia_gid; ++ unsigned ia_size; ++ unsigned ia_atime; ++ unsigned ia_mtime; ++ unsigned ia_ctime; ++ unsigned int ia_attr_flags; +}; + +#define KERN_DEBUG + -+ +#else + +#ifndef WIN32 @@ -323,20 +282,614 @@ index 0000000..752c2cc + +#endif + -+ -+ +#if defined WIN32 +#undef new -+#endif ++#endif ++ ++#endif +diff -urN linux.old/fs/yaffs2/Kconfig linux.dev/fs/yaffs2/Kconfig +--- linux.old/fs/yaffs2/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/Kconfig 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,135 @@ ++# ++# YAFFS file system configurations ++# ++ ++config YAFFS_FS ++ tristate "YAFFS2 file system support" ++ default n ++ depends on MTD ++ select YAFFS_YAFFS1 ++ select YAFFS_YAFFS2 ++ help ++ YAFFS2, or Yet Another Flash Filing System, is a filing system ++ optimised for NAND Flash chips. ++ ++ To compile the YAFFS2 file system support as a module, choose M here: ++ the module will be called yaffs2. ++ ++ If unsure, say N. ++ ++ Further information on YAFFS2 is available at ++ <http://www.aleph1.co.uk/yaffs/>. ++ ++config YAFFS_YAFFS1 ++ bool "512 byte / page devices" ++ depends on YAFFS_FS ++ default y ++ help ++ Enable YAFFS1 support -- yaffs for 512 byte / page devices ++ ++ If unsure, say Y. ++ ++config YAFFS_DOES_ECC ++ bool "Lets Yaffs do its own ECC" ++ depends on YAFFS_FS && YAFFS_YAFFS1 ++ default n ++ help ++ This enables Yaffs to use its own ECC functions instead of using ++ the ones from the generic MTD-NAND driver. ++ ++ If unsure, say N. ++ ++config YAFFS_ECC_WRONG_ORDER ++ bool "Use the same ecc byte order as Steven Hill's nand_ecc.c" ++ depends on YAFFS_FS && YAFFS_DOES_ECC ++ default n ++ help ++ This makes yaffs_ecc.c use the same ecc byte order as ++ Steven Hill's nand_ecc.c. If not set, then you get the ++ same ecc byte order as SmartMedia. ++ ++ If unsure, say N. ++ ++config YAFFS_YAFFS2 ++ bool "2048 byte (or larger) / page devices" ++ depends on YAFFS_FS ++ default y ++ help ++ Enable YAFFS2 support -- yaffs for >= 2048 byte / page larger devices ++ ++ If unsure, say Y. ++ ++config YAFFS_AUTO_YAFFS2 ++ bool "Autoselect yaffs2 format" ++ depends on YAFFS_YAFFS2 ++ default y ++ help ++ Without this, you need to explicitely use yaffs2 as the file ++ system type. With this, you can say "yaffs" and yaffs or yaffs2 ++ will be used depending on the device page size. ++ ++ If unsure, say Y. ++ ++config YAFFS_DISABLE_LAZY_LOAD ++ bool "Disable lazy loading" ++ depends on YAFFS_YAFFS2 ++ default n ++ help ++ "Lazy loading" defers loading file details until they are ++ required. This saves mount time, but makes the first look-up ++ a bit longer. ++ ++ Lazy loading will only happen if enabled by this option being 'n' ++ and if the appropriate tags are available, else yaffs2 will ++ automatically fall back to immediate loading and do the right ++ thing. ++ ++ Lazy laoding will be required by checkpointing. ++ ++ Setting this to 'y' will disable lazy loading. ++ ++ If unsure, say N. ++ ++config YAFFS_DISABLE_WIDE_TNODES ++ bool "Turn off wide tnodes" ++ depends on YAFFS_FS ++ default n ++ help ++ Wide tnodes are only used for large NAND arrays (>=32MB for ++ 512-byte page devices and >=128MB for 2k page devices). They use ++ slightly more RAM but are faster since they eliminate chunk group ++ searching. ++ ++ Setting this to 'y' will force tnode width to 16 bits and make ++ large arrays slower. ++ ++ If unsure, say N. ++ ++config YAFFS_ALWAYS_CHECK_CHUNK_ERASED ++ bool "Force chunk erase check" ++ depends on YAFFS_FS ++ default n ++ help ++ Normally YAFFS only checks chunks before writing until an erased ++ chunk is found. This helps to detect any partially written chunks ++ that might have happened due to power loss. ++ ++ Enabling this forces on the test that chunks are erased in flash ++ before writing to them. This takes more time but is potentially a ++ bit more secure. ++ ++ Suggest setting Y during development and ironing out driver issues ++ etc. Suggest setting to N if you want faster writing. ++ ++ If unsure, say Y. ++ ++config YAFFS_SHORT_NAMES_IN_RAM ++ bool "Cache short names in RAM" ++ depends on YAFFS_FS ++ default y ++ help ++ If this config is set, then short names are stored with the ++ yaffs_Object. This costs an extra 16 bytes of RAM per object, ++ but makes look-ups faster. ++ ++ If unsure, say Y. +diff -urN linux.old/fs/yaffs2/Makefile linux.dev/fs/yaffs2/Makefile +--- linux.old/fs/yaffs2/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/Makefile 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,10 @@ ++# ++# Makefile for the linux YAFFS filesystem routines. ++# ++ ++obj-$(CONFIG_YAFFS_FS) += yaffs.o ++ ++yaffs-y := yaffs_ecc.o yaffs_fs.o yaffs_guts.o yaffs_checkptrw.o ++yaffs-y += yaffs_packedtags2.o yaffs_nand.o yaffs_qsort.o ++yaffs-y += yaffs_tagscompat.o yaffs_tagsvalidity.o ++yaffs-y += yaffs_mtdif.o yaffs_mtdif2.o +diff -urN linux.old/fs/yaffs2/moduleconfig.h linux.dev/fs/yaffs2/moduleconfig.h +--- linux.old/fs/yaffs2/moduleconfig.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/moduleconfig.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,32 @@ ++#ifndef __YAFFS_CONFIG_H__ ++#define __YAFFS_CONFIG_H__ ++ ++#ifdef YAFFS_OUT_OF_TREE ++ ++/* DO NOT UNSET THESE THREE. YAFFS2 will not compile if you do. */ ++#define CONFIG_YAFFS_FS ++#define CONFIG_YAFFS_YAFFS1 ++#define CONFIG_YAFFS_YAFFS2 ++ ++/* These options are independent of each other. Select those that matter. */ ++ ++/* Default: Not selected */ ++/* Meaning: Yaffs does its own ECC, rather than using MTD ECC */ ++//#define CONFIG_YAFFS_DOES_ECC ++ ++/* Default: Not selected */ ++/* Meaning: ECC byte order is 'wrong'. Only meaningful if */ ++/* CONFIG_YAFFS_DOES_ECC is set */ ++//#define CONFIG_YAFFS_ECC_WRONG_ORDER ++ ++/* Default: Selected */ ++/* Meaning: Disables testing whether chunks are erased before writing to them*/ ++#define CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK ++ ++/* Default: Selected */ ++/* Meaning: Cache short names, taking more RAM, but faster look-ups */ ++#define CONFIG_YAFFS_SHORT_NAMES_IN_RAM ++ ++#endif /* YAFFS_OUT_OF_TREE */ ++ ++#endif /* __YAFFS_CONFIG_H__ */ +diff -urN linux.old/fs/yaffs2/yaffs_checkptrw.c linux.dev/fs/yaffs2/yaffs_checkptrw.c +--- linux.old/fs/yaffs2/yaffs_checkptrw.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_checkptrw.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,384 @@ ++/* YAFFS: Yet another FFS. A NAND-flash specific file system. ++ * ++ * Copyright (C) 2002 Aleph One Ltd. ++ * for Toby Churchill Ltd and Brightstar Engineering ++ * ++ * Created by Charles Manning <charles@aleph1.co.uk> ++ * ++ * 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. ++ * ++ */ ++ ++const char *yaffs_checkptrw_c_version = ++ "$Id: yaffs_checkptrw.c,v 1.11 2006/11/11 23:27:04 charles Exp $"; ++ ++ ++#include "yaffs_checkptrw.h" ++ ++ ++static int yaffs_CheckpointSpaceOk(yaffs_Device *dev) ++{ ++ ++ int blocksAvailable = dev->nErasedBlocks - dev->nReservedBlocks; ++ ++ T(YAFFS_TRACE_CHECKPOINT, ++ (TSTR("checkpt blocks available = %d" TENDSTR), ++ blocksAvailable)); ++ ++ ++ return (blocksAvailable <= 0) ? 0 : 1; ++} ++ ++ ++ ++static int yaffs_CheckpointErase(yaffs_Device *dev) ++{ ++ ++ int i; ++ ++ ++ if(!dev->eraseBlockInNAND) ++ return 0; ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("checking blocks %d to %d"TENDSTR), ++ dev->internalStartBlock,dev->internalEndBlock)); ++ ++ for(i = dev->internalStartBlock; i <= dev->internalEndBlock; i++) { ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,i); ++ if(bi->blockState == YAFFS_BLOCK_STATE_CHECKPOINT){ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("erasing checkpt block %d"TENDSTR),i)); ++ if(dev->eraseBlockInNAND(dev,i- dev->blockOffset /* realign */)){ ++ bi->blockState = YAFFS_BLOCK_STATE_EMPTY; ++ dev->nErasedBlocks++; ++ dev->nFreeChunks += dev->nChunksPerBlock; ++ } ++ else { ++ dev->markNANDBlockBad(dev,i); ++ bi->blockState = YAFFS_BLOCK_STATE_DEAD; ++ } ++ } ++ } ++ ++ dev->blocksInCheckpoint = 0; ++ ++ return 1; ++} ++ ++ ++static void yaffs_CheckpointFindNextErasedBlock(yaffs_Device *dev) ++{ ++ int i; ++ int blocksAvailable = dev->nErasedBlocks - dev->nReservedBlocks; ++ T(YAFFS_TRACE_CHECKPOINT, ++ (TSTR("allocating checkpt block: erased %d reserved %d avail %d next %d "TENDSTR), ++ dev->nErasedBlocks,dev->nReservedBlocks,blocksAvailable,dev->checkpointNextBlock)); ++ ++ if(dev->checkpointNextBlock >= 0 && ++ dev->checkpointNextBlock <= dev->internalEndBlock && ++ blocksAvailable > 0){ ++ ++ for(i = dev->checkpointNextBlock; i <= dev->internalEndBlock; i++){ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,i); ++ if(bi->blockState == YAFFS_BLOCK_STATE_EMPTY){ ++ dev->checkpointNextBlock = i + 1; ++ dev->checkpointCurrentBlock = i; ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("allocating checkpt block %d"TENDSTR),i)); ++ return; ++ } ++ } ++ } ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("out of checkpt blocks"TENDSTR))); ++ ++ dev->checkpointNextBlock = -1; ++ dev->checkpointCurrentBlock = -1; ++} ++ ++static void yaffs_CheckpointFindNextCheckpointBlock(yaffs_Device *dev) ++{ ++ int i; ++ yaffs_ExtendedTags tags; ++ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("find next checkpt block: start: blocks %d next %d" TENDSTR), ++ dev->blocksInCheckpoint, dev->checkpointNextBlock)); ++ ++ if(dev->blocksInCheckpoint < dev->checkpointMaxBlocks) ++ for(i = dev->checkpointNextBlock; i <= dev->internalEndBlock; i++){ ++ int chunk = i * dev->nChunksPerBlock; ++ int realignedChunk = chunk - dev->chunkOffset; ++ ++ dev->readChunkWithTagsFromNAND(dev,realignedChunk,NULL,&tags); ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("find next checkpt block: search: block %d oid %d seq %d eccr %d" TENDSTR), ++ i, tags.objectId,tags.sequenceNumber,tags.eccResult)); ++ ++ if(tags.sequenceNumber == YAFFS_SEQUENCE_CHECKPOINT_DATA){ ++ /* Right kind of block */ ++ dev->checkpointNextBlock = tags.objectId; ++ dev->checkpointCurrentBlock = i; ++ dev->checkpointBlockList[dev->blocksInCheckpoint] = i; ++ dev->blocksInCheckpoint++; ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("found checkpt block %d"TENDSTR),i)); ++ return; ++ } ++ } ++ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("found no more checkpt blocks"TENDSTR))); ++ ++ dev->checkpointNextBlock = -1; ++ dev->checkpointCurrentBlock = -1; ++} ++ ++ ++int yaffs_CheckpointOpen(yaffs_Device *dev, int forWriting) ++{ ++ ++ /* Got the functions we need? */ ++ if (!dev->writeChunkWithTagsToNAND || ++ !dev->readChunkWithTagsFromNAND || ++ !dev->eraseBlockInNAND || ++ !dev->markNANDBlockBad) ++ return 0; ++ ++ if(forWriting && !yaffs_CheckpointSpaceOk(dev)) ++ return 0; ++ ++ if(!dev->checkpointBuffer) ++ dev->checkpointBuffer = YMALLOC_DMA(dev->nDataBytesPerChunk); ++ if(!dev->checkpointBuffer) ++ return 0; ++ ++ ++ dev->checkpointPageSequence = 0; ++ ++ dev->checkpointOpenForWrite = forWriting; ++ ++ dev->checkpointByteCount = 0; ++ dev->checkpointCurrentBlock = -1; ++ dev->checkpointCurrentChunk = -1; ++ dev->checkpointNextBlock = dev->internalStartBlock; ++ ++ /* Erase all the blocks in the checkpoint area */ ++ if(forWriting){ ++ memset(dev->checkpointBuffer,0,dev->nDataBytesPerChunk); ++ dev->checkpointByteOffset = 0; ++ return yaffs_CheckpointErase(dev); ++ ++ ++ } else { ++ int i; ++ /* Set to a value that will kick off a read */ ++ dev->checkpointByteOffset = dev->nDataBytesPerChunk; ++ /* A checkpoint block list of 1 checkpoint block per 16 block is (hopefully) ++ * going to be way more than we need */ ++ dev->blocksInCheckpoint = 0; ++ dev->checkpointMaxBlocks = (dev->internalEndBlock - dev->internalStartBlock)/16 + 2; ++ dev->checkpointBlockList = YMALLOC(sizeof(int) * dev->checkpointMaxBlocks); ++ for(i = 0; i < dev->checkpointMaxBlocks; i++) ++ dev->checkpointBlockList[i] = -1; ++ } ++ ++ return 1; ++} ++ ++static int yaffs_CheckpointFlushBuffer(yaffs_Device *dev) ++{ ++ ++ int chunk; ++ int realignedChunk; ++ ++ yaffs_ExtendedTags tags; ++ ++ if(dev->checkpointCurrentBlock < 0){ ++ yaffs_CheckpointFindNextErasedBlock(dev); ++ dev->checkpointCurrentChunk = 0; ++ } ++ ++ if(dev->checkpointCurrentBlock < 0) ++ return 0; ++ ++ tags.chunkDeleted = 0; ++ tags.objectId = dev->checkpointNextBlock; /* Hint to next place to look */ ++ tags.chunkId = dev->checkpointPageSequence + 1; ++ tags.sequenceNumber = YAFFS_SEQUENCE_CHECKPOINT_DATA; ++ tags.byteCount = dev->nDataBytesPerChunk; ++ if(dev->checkpointCurrentChunk == 0){ ++ /* First chunk we write for the block? Set block state to ++ checkpoint */ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,dev->checkpointCurrentBlock); ++ bi->blockState = YAFFS_BLOCK_STATE_CHECKPOINT; ++ dev->blocksInCheckpoint++; ++ } ++ ++ chunk = dev->checkpointCurrentBlock * dev->nChunksPerBlock + dev->checkpointCurrentChunk; ++ ++ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("checkpoint wite buffer nand %d(%d:%d) objid %d chId %d" TENDSTR), ++ chunk, dev->checkpointCurrentBlock, dev->checkpointCurrentChunk,tags.objectId,tags.chunkId)); ++ ++ realignedChunk = chunk - dev->chunkOffset; ++ ++ dev->writeChunkWithTagsToNAND(dev,realignedChunk,dev->checkpointBuffer,&tags); ++ dev->checkpointByteOffset = 0; ++ dev->checkpointPageSequence++; ++ dev->checkpointCurrentChunk++; ++ if(dev->checkpointCurrentChunk >= dev->nChunksPerBlock){ ++ dev->checkpointCurrentChunk = 0; ++ dev->checkpointCurrentBlock = -1; ++ } ++ memset(dev->checkpointBuffer,0,dev->nDataBytesPerChunk); ++ ++ return 1; ++} ++ ++ ++int yaffs_CheckpointWrite(yaffs_Device *dev,const void *data, int nBytes) ++{ ++ int i=0; ++ int ok = 1; ++ ++ ++ __u8 * dataBytes = (__u8 *)data; ++ ++ ++ ++ if(!dev->checkpointBuffer) ++ return 0; ++ ++ while(i < nBytes && ok) { ++ ++ ++ ++ dev->checkpointBuffer[dev->checkpointByteOffset] = *dataBytes ; ++ dev->checkpointByteOffset++; ++ i++; ++ dataBytes++; ++ dev->checkpointByteCount++; ++ ++ ++ if(dev->checkpointByteOffset < 0 || ++ dev->checkpointByteOffset >= dev->nDataBytesPerChunk) ++ ok = yaffs_CheckpointFlushBuffer(dev); ++ ++ } ++ ++ return i; ++} ++ ++int yaffs_CheckpointRead(yaffs_Device *dev, void *data, int nBytes) ++{ ++ int i=0; ++ int ok = 1; ++ yaffs_ExtendedTags tags; ++ ++ ++ int chunk; ++ int realignedChunk; ++ ++ __u8 *dataBytes = (__u8 *)data; ++ ++ if(!dev->checkpointBuffer) ++ return 0; ++ ++ while(i < nBytes && ok) { ++ ++ ++ if(dev->checkpointByteOffset < 0 || ++ dev->checkpointByteOffset >= dev->nDataBytesPerChunk) { ++ ++ if(dev->checkpointCurrentBlock < 0){ ++ yaffs_CheckpointFindNextCheckpointBlock(dev); ++ dev->checkpointCurrentChunk = 0; ++ } ++ ++ if(dev->checkpointCurrentBlock < 0) ++ ok = 0; ++ else { ++ ++ chunk = dev->checkpointCurrentBlock * dev->nChunksPerBlock + ++ dev->checkpointCurrentChunk; ++ ++ realignedChunk = chunk - dev->chunkOffset; ++ ++ /* read in the next chunk */ ++ /* printf("read checkpoint page %d\n",dev->checkpointPage); */ ++ dev->readChunkWithTagsFromNAND(dev, realignedChunk, ++ dev->checkpointBuffer, ++ &tags); ++ ++ if(tags.chunkId != (dev->checkpointPageSequence + 1) || ++ tags.sequenceNumber != YAFFS_SEQUENCE_CHECKPOINT_DATA) ++ ok = 0; ++ ++ dev->checkpointByteOffset = 0; ++ dev->checkpointPageSequence++; ++ dev->checkpointCurrentChunk++; ++ ++ if(dev->checkpointCurrentChunk >= dev->nChunksPerBlock) ++ dev->checkpointCurrentBlock = -1; ++ } ++ } ++ ++ if(ok){ ++ *dataBytes = dev->checkpointBuffer[dev->checkpointByteOffset]; ++ dev->checkpointByteOffset++; ++ i++; ++ dataBytes++; ++ dev->checkpointByteCount++; ++ } ++ } ++ ++ return i; ++} ++ ++int yaffs_CheckpointClose(yaffs_Device *dev) ++{ ++ ++ if(dev->checkpointOpenForWrite){ ++ if(dev->checkpointByteOffset != 0) ++ yaffs_CheckpointFlushBuffer(dev); ++ } else { ++ int i; ++ for(i = 0; i < dev->blocksInCheckpoint && dev->checkpointBlockList[i] >= 0; i++){ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,dev->checkpointBlockList[i]); ++ if(bi->blockState == YAFFS_BLOCK_STATE_EMPTY) ++ bi->blockState = YAFFS_BLOCK_STATE_CHECKPOINT; ++ else { ++ // Todo this looks odd... ++ } ++ } ++ YFREE(dev->checkpointBlockList); ++ dev->checkpointBlockList = NULL; ++ } ++ ++ dev->nFreeChunks -= dev->blocksInCheckpoint * dev->nChunksPerBlock; ++ dev->nErasedBlocks -= dev->blocksInCheckpoint; ++ ++ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("checkpoint byte count %d" TENDSTR), ++ dev->checkpointByteCount)); ++ ++ if(dev->checkpointBuffer){ ++ /* free the buffer */ ++ YFREE(dev->checkpointBuffer); ++ dev->checkpointBuffer = NULL; ++ return 1; ++ } ++ else ++ return 0; ++ ++} ++ ++int yaffs_CheckpointInvalidateStream(yaffs_Device *dev) ++{ ++ /* Erase the first checksum block */ ++ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("checkpoint invalidate"TENDSTR))); ++ ++ if(!yaffs_CheckpointSpaceOk(dev)) ++ return 0; ++ ++ return yaffs_CheckpointErase(dev); ++} ++ ++ ++ +diff -urN linux.old/fs/yaffs2/yaffs_checkptrw.h linux.dev/fs/yaffs2/yaffs_checkptrw.h +--- linux.old/fs/yaffs2/yaffs_checkptrw.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_checkptrw.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,18 @@ ++#ifndef __YAFFS_CHECKPTRW_H__ ++#define __YAFFS_CHECKPTRW_H__ ++ ++#include "yaffs_guts.h" ++ ++int yaffs_CheckpointOpen(yaffs_Device *dev, int forWriting); ++ ++int yaffs_CheckpointWrite(yaffs_Device *dev,const void *data, int nBytes); ++ ++int yaffs_CheckpointRead(yaffs_Device *dev,void *data, int nBytes); ++ ++int yaffs_CheckpointClose(yaffs_Device *dev); ++ ++int yaffs_CheckpointInvalidateStream(yaffs_Device *dev); ++ + +#endif + -diff --git a/fs/yaffs/yaffs_ecc.c b/fs/yaffs/yaffs_ecc.c -new file mode 100644 -index 0000000..166bcad ---- /dev/null -+++ b/fs/yaffs/yaffs_ecc.c -@@ -0,0 +1,287 @@ +diff -urN linux.old/fs/yaffs2/yaffs_ecc.c linux.dev/fs/yaffs2/yaffs_ecc.c +--- linux.old/fs/yaffs2/yaffs_ecc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_ecc.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,333 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * @@ -351,117 +904,151 @@ index 0000000..166bcad + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + */ -+ ++ + /* -+ * This code implements the ECC algorithm used in SmartMedia. -+ * -+ * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes. -+ * The two unused bit are set to 1. -+ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC -+ * blocks are used on a 512-byte NAND page. -+ * ++ * This code implements the ECC algorithm used in SmartMedia. ++ * ++ * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes. ++ * The two unused bit are set to 1. ++ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC ++ * blocks are used on a 512-byte NAND page. ++ * ++ */ ++ ++/* Table generated by gen-ecc.c ++ * Using a table means we do not have to calculate p1..p4 and p1'..p4' ++ * for each byte of data. These are instead provided in a table in bits7..2. ++ * Bit 0 of each entry indicates whether the entry has an odd or even parity, and therefore ++ * this bytes influence on the line parity. + */ + -+// Table generated by gen-ecc.c -+// Using a table means we do not have to calculate p1..p4 and p1'..p4' -+// for each byte of data. These are instead provided in a table in bits7..2. -+// Bit 0 of each entry indicates whether the entry has an odd or even parity, and therefore -+// this bytes influence on the line parity. -+ -+const char *yaffs_ecc_c_version = "$Id: yaffs_ecc.c,v 1.4 2005/07/31 00:28:04 charles Exp $"; ++const char *yaffs_ecc_c_version = ++ "$Id: yaffs_ecc.c,v 1.7 2006/09/14 22:02:46 charles Exp $"; + +#include "yportenv.h" + +#include "yaffs_ecc.h" + +static const unsigned char column_parity_table[] = { -+0x00, 0x55, 0x59, 0x0c, 0x65, 0x30, 0x3c, 0x69, 0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00, -+0x95, 0xc0, 0xcc, 0x99, 0xf0, 0xa5, 0xa9, 0xfc, 0xfc, 0xa9, 0xa5, 0xf0, 0x99, 0xcc, 0xc0, 0x95, -+0x99, 0xcc, 0xc0, 0x95, 0xfc, 0xa9, 0xa5, 0xf0, 0xf0, 0xa5, 0xa9, 0xfc, 0x95, 0xc0, 0xcc, 0x99, -+0x0c, 0x59, 0x55, 0x00, 0x69, 0x3c, 0x30, 0x65, 0x65, 0x30, 0x3c, 0x69, 0x00, 0x55, 0x59, 0x0c, -+0xa5, 0xf0, 0xfc, 0xa9, 0xc0, 0x95, 0x99, 0xcc, 0xcc, 0x99, 0x95, 0xc0, 0xa9, 0xfc, 0xf0, 0xa5, -+0x30, 0x65, 0x69, 0x3c, 0x55, 0x00, 0x0c, 0x59, 0x59, 0x0c, 0x00, 0x55, 0x3c, 0x69, 0x65, 0x30, -+0x3c, 0x69, 0x65, 0x30, 0x59, 0x0c, 0x00, 0x55, 0x55, 0x00, 0x0c, 0x59, 0x30, 0x65, 0x69, 0x3c, -+0xa9, 0xfc, 0xf0, 0xa5, 0xcc, 0x99, 0x95, 0xc0, 0xc0, 0x95, 0x99, 0xcc, 0xa5, 0xf0, 0xfc, 0xa9, -+0xa9, 0xfc, 0xf0, 0xa5, 0xcc, 0x99, 0x95, 0xc0, 0xc0, 0x95, 0x99, 0xcc, 0xa5, 0xf0, 0xfc, 0xa9, -+0x3c, 0x69, 0x65, 0x30, 0x59, 0x0c, 0x00, 0x55, 0x55, 0x00, 0x0c, 0x59, 0x30, 0x65, 0x69, 0x3c, -+0x30, 0x65, 0x69, 0x3c, 0x55, 0x00, 0x0c, 0x59, 0x59, 0x0c, 0x00, 0x55, 0x3c, 0x69, 0x65, 0x30, -+0xa5, 0xf0, 0xfc, 0xa9, 0xc0, 0x95, 0x99, 0xcc, 0xcc, 0x99, 0x95, 0xc0, 0xa9, 0xfc, 0xf0, 0xa5, -+0x0c, 0x59, 0x55, 0x00, 0x69, 0x3c, 0x30, 0x65, 0x65, 0x30, 0x3c, 0x69, 0x00, 0x55, 0x59, 0x0c, -+0x99, 0xcc, 0xc0, 0x95, 0xfc, 0xa9, 0xa5, 0xf0, 0xf0, 0xa5, 0xa9, 0xfc, 0x95, 0xc0, 0xcc, 0x99, -+0x95, 0xc0, 0xcc, 0x99, 0xf0, 0xa5, 0xa9, 0xfc, 0xfc, 0xa9, 0xa5, 0xf0, 0x99, 0xcc, 0xc0, 0x95, -+0x00, 0x55, 0x59, 0x0c, 0x65, 0x30, 0x3c, 0x69, 0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00, ++ 0x00, 0x55, 0x59, 0x0c, 0x65, 0x30, 0x3c, 0x69, ++ 0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00, ++ 0x95, 0xc0, 0xcc, 0x99, 0xf0, 0xa5, 0xa9, 0xfc, ++ 0xfc, 0xa9, 0xa5, 0xf0, 0x99, 0xcc, 0xc0, 0x95, ++ 0x99, 0xcc, 0xc0, 0x95, 0xfc, 0xa9, 0xa5, 0xf0, ++ 0xf0, 0xa5, 0xa9, 0xfc, 0x95, 0xc0, 0xcc, 0x99, ++ 0x0c, 0x59, 0x55, 0x00, 0x69, 0x3c, 0x30, 0x65, ++ 0x65, 0x30, 0x3c, 0x69, 0x00, 0x55, 0x59, 0x0c, ++ 0xa5, 0xf0, 0xfc, 0xa9, 0xc0, 0x95, 0x99, 0xcc, ++ 0xcc, 0x99, 0x95, 0xc0, 0xa9, 0xfc, 0xf0, 0xa5, ++ 0x30, 0x65, 0x69, 0x3c, 0x55, 0x00, 0x0c, 0x59, ++ 0x59, 0x0c, 0x00, 0x55, 0x3c, 0x69, 0x65, 0x30, ++ 0x3c, 0x69, 0x65, 0x30, 0x59, 0x0c, 0x00, 0x55, ++ 0x55, 0x00, 0x0c, 0x59, 0x30, 0x65, 0x69, 0x3c, ++ 0xa9, 0xfc, 0xf0, 0xa5, 0xcc, 0x99, 0x95, 0xc0, ++ 0xc0, 0x95, 0x99, 0xcc, 0xa5, 0xf0, 0xfc, 0xa9, ++ 0xa9, 0xfc, 0xf0, 0xa5, 0xcc, 0x99, 0x95, 0xc0, ++ 0xc0, 0x95, 0x99, 0xcc, 0xa5, 0xf0, 0xfc, 0xa9, ++ 0x3c, 0x69, 0x65, 0x30, 0x59, 0x0c, 0x00, 0x55, ++ 0x55, 0x00, 0x0c, 0x59, 0x30, 0x65, 0x69, 0x3c, ++ 0x30, 0x65, 0x69, 0x3c, 0x55, 0x00, 0x0c, 0x59, ++ 0x59, 0x0c, 0x00, 0x55, 0x3c, 0x69, 0x65, 0x30, ++ 0xa5, 0xf0, 0xfc, 0xa9, 0xc0, 0x95, 0x99, 0xcc, ++ 0xcc, 0x99, 0x95, 0xc0, 0xa9, 0xfc, 0xf0, 0xa5, ++ 0x0c, 0x59, 0x55, 0x00, 0x69, 0x3c, 0x30, 0x65, ++ 0x65, 0x30, 0x3c, 0x69, 0x00, 0x55, 0x59, 0x0c, ++ 0x99, 0xcc, 0xc0, 0x95, 0xfc, 0xa9, 0xa5, 0xf0, ++ 0xf0, 0xa5, 0xa9, 0xfc, 0x95, 0xc0, 0xcc, 0x99, ++ 0x95, 0xc0, 0xcc, 0x99, 0xf0, 0xa5, 0xa9, 0xfc, ++ 0xfc, 0xa9, 0xa5, 0xf0, 0x99, 0xcc, 0xc0, 0x95, ++ 0x00, 0x55, 0x59, 0x0c, 0x65, 0x30, 0x3c, 0x69, ++ 0x69, 0x3c, 0x30, 0x65, 0x0c, 0x59, 0x55, 0x00, +}; + ++/* Count the bits in an unsigned char or a U32 */ + +static int yaffs_CountBits(unsigned char x) +{ + int r = 0; -+ while(x) -+ { -+ if(x & 1) r++; ++ while (x) { ++ if (x & 1) ++ r++; + x >>= 1; + } + return r; +} + -+static int yaffs_CountBits32(unsigned x) ++static int yaffs_CountBits32(unsigned x) +{ + int r = 0; -+ while(x) -+ { -+ if(x & 1) r++; ++ while (x) { ++ if (x & 1) ++ r++; + x >>= 1; + } + return r; +} + -+ -+void yaffs_ECCCalculate(const unsigned char *data,unsigned char *ecc) ++/* Calculate the ECC for a 256-byte block of data */ ++void yaffs_ECCCalculate(const unsigned char *data, unsigned char *ecc) +{ + unsigned int i; -+ ++ + unsigned char col_parity = 0; + unsigned char line_parity = 0; + unsigned char line_parity_prime = 0; + unsigned char t; + unsigned char b; -+ -+ for(i = 0; i < 256; i++) -+ { ++ ++ for (i = 0; i < 256; i++) { + b = column_parity_table[*data++]; + col_parity ^= b; + -+ if(b & 0x01) // odd number of bits in the byte ++ if (b & 0x01) // odd number of bits in the byte + { + line_parity ^= i; + line_parity_prime ^= ~i; + } -+ ++ + } -+ ++ + ecc[2] = (~col_parity) | 0x03; -+ ++ + t = 0; -+ if(line_parity & 0x80) t |= 0x80; -+ if(line_parity_prime & 0x80) t |= 0x40; -+ if(line_parity & 0x40) t |= 0x20; -+ if(line_parity_prime & 0x40) t |= 0x10; -+ if(line_parity & 0x20) t |= 0x08; -+ if(line_parity_prime & 0x20) t |= 0x04; -+ if(line_parity & 0x10) t |= 0x02; -+ if(line_parity_prime & 0x10) t |= 0x01; ++ if (line_parity & 0x80) ++ t |= 0x80; ++ if (line_parity_prime & 0x80) ++ t |= 0x40; ++ if (line_parity & 0x40) ++ t |= 0x20; ++ if (line_parity_prime & 0x40) ++ t |= 0x10; ++ if (line_parity & 0x20) ++ t |= 0x08; ++ if (line_parity_prime & 0x20) ++ t |= 0x04; ++ if (line_parity & 0x10) ++ t |= 0x02; ++ if (line_parity_prime & 0x10) ++ t |= 0x01; + ecc[1] = ~t; -+ ++ + t = 0; -+ if(line_parity & 0x08) t |= 0x80; -+ if(line_parity_prime & 0x08) t |= 0x40; -+ if(line_parity & 0x04) t |= 0x20; -+ if(line_parity_prime & 0x04) t |= 0x10; -+ if(line_parity & 0x02) t |= 0x08; -+ if(line_parity_prime & 0x02) t |= 0x04; -+ if(line_parity & 0x01) t |= 0x02; -+ if(line_parity_prime & 0x01) t |= 0x01; ++ if (line_parity & 0x08) ++ t |= 0x80; ++ if (line_parity_prime & 0x08) ++ t |= 0x40; ++ if (line_parity & 0x04) ++ t |= 0x20; ++ if (line_parity_prime & 0x04) ++ t |= 0x10; ++ if (line_parity & 0x02) ++ t |= 0x08; ++ if (line_parity_prime & 0x02) ++ t |= 0x04; ++ if (line_parity & 0x01) ++ t |= 0x02; ++ if (line_parity_prime & 0x01) ++ t |= 0x01; + ecc[0] = ~t; + +#ifdef CONFIG_YAFFS_ECC_WRONG_ORDER @@ -469,30 +1056,28 @@ index 0000000..166bcad + t = ecc[0]; + ecc[0] = ecc[1]; + ecc[1] = t; -+#endif ++#endif +} + -+int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc, const unsigned char *test_ecc) ++ ++/* Correct the ECC on a 256 byte block of data */ ++ ++int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc, ++ const unsigned char *test_ecc) +{ -+ unsigned char d0, d1, d2; // deltas ++ unsigned char d0, d1, d2; /* deltas */ + + d0 = read_ecc[0] ^ test_ecc[0]; + d1 = read_ecc[1] ^ test_ecc[1]; + d2 = read_ecc[2] ^ test_ecc[2]; -+ -+ -+ -+ if((d0 | d1 | d2) == 0) -+ { -+ // no error -+ return 0; -+ } -+ -+ if( ((d0 ^ (d0 >> 1)) & 0x55) == 0x55 && ++ ++ if ((d0 | d1 | d2) == 0) ++ return 0; /* no error */ ++ ++ if (((d0 ^ (d0 >> 1)) & 0x55) == 0x55 && + ((d1 ^ (d1 >> 1)) & 0x55) == 0x55 && -+ ((d2 ^ (d2 >> 1)) & 0x54) == 0x54) -+ { -+ // Single bit (recoverable) error in data ++ ((d2 ^ (d2 >> 1)) & 0x54) == 0x54) { ++ /* Single bit (recoverable) error in data */ + + unsigned byte; + unsigned bit; @@ -500,136 +1085,148 @@ index 0000000..166bcad +#ifdef CONFIG_YAFFS_ECC_WRONG_ORDER + // swap the bytes to correct for the wrong order + unsigned char t; -+ ++ + t = d0; + d0 = d1; + d1 = t; +#endif -+ ++ + bit = byte = 0; -+ -+ -+ if(d1 & 0x80) byte |= 0x80; -+ if(d1 & 0x20) byte |= 0x40; -+ if(d1 & 0x08) byte |= 0x20; -+ if(d1 & 0x02) byte |= 0x10; -+ if(d0 & 0x80) byte |= 0x08; -+ if(d0 & 0x20) byte |= 0x04; -+ if(d0 & 0x08) byte |= 0x02; -+ if(d0 & 0x02) byte |= 0x01; -+ -+ if(d2 & 0x80) bit |= 0x04; -+ if(d2 & 0x20) bit |= 0x02; -+ if(d2 & 0x08) bit |= 0x01; ++ ++ if (d1 & 0x80) ++ byte |= 0x80; ++ if (d1 & 0x20) ++ byte |= 0x40; ++ if (d1 & 0x08) ++ byte |= 0x20; ++ if (d1 & 0x02) ++ byte |= 0x10; ++ if (d0 & 0x80) ++ byte |= 0x08; ++ if (d0 & 0x20) ++ byte |= 0x04; ++ if (d0 & 0x08) ++ byte |= 0x02; ++ if (d0 & 0x02) ++ byte |= 0x01; ++ ++ if (d2 & 0x80) ++ bit |= 0x04; ++ if (d2 & 0x20) ++ bit |= 0x02; ++ if (d2 & 0x08) ++ bit |= 0x01; + + data[byte] ^= (1 << bit); -+ -+ return 1; ++ ++ return 1; /* Corrected the error */ + } -+ -+ if((yaffs_CountBits(d0)+yaffs_CountBits(d1)+yaffs_CountBits(d2)) == 1) -+ { -+ // Reccoverable error in ecc -+ ++ ++ if ((yaffs_CountBits(d0) + ++ yaffs_CountBits(d1) + ++ yaffs_CountBits(d2)) == 1) { ++ /* Reccoverable error in ecc */ ++ + read_ecc[0] = test_ecc[0]; + read_ecc[1] = test_ecc[1]; + read_ecc[2] = test_ecc[2]; -+ -+ return 1; ++ ++ return 1; /* Corrected the error */ + } + -+ // Unrecoverable error -+ ++ /* Unrecoverable error */ ++ + return -1; -+ + +} + + -+ -+void yaffs_ECCCalculateOther(const unsigned char *data,unsigned nBytes, yaffs_ECCOther *eccOther) ++/* ++ * ECCxxxOther does ECC calcs on arbitrary n bytes of data ++ */ ++void yaffs_ECCCalculateOther(const unsigned char *data, unsigned nBytes, ++ yaffs_ECCOther * eccOther) +{ + unsigned int i; -+ ++ + unsigned char col_parity = 0; + unsigned line_parity = 0; + unsigned line_parity_prime = 0; + unsigned char b; -+ -+ for(i = 0; i < nBytes; i++) -+ { ++ ++ for (i = 0; i < nBytes; i++) { + b = column_parity_table[*data++]; + col_parity ^= b; + -+ if(b & 0x01) // odd number of bits in the byte -+ { ++ if (b & 0x01) { ++ /* odd number of bits in the byte */ + line_parity ^= i; + line_parity_prime ^= ~i; + } -+ ++ + } -+ ++ + eccOther->colParity = (col_parity >> 2) & 0x3f; + eccOther->lineParity = line_parity; + eccOther->lineParityPrime = line_parity_prime; +} + -+int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes, yaffs_ECCOther *read_ecc, const yaffs_ECCOther *test_ecc) ++int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes, ++ yaffs_ECCOther * read_ecc, ++ const yaffs_ECCOther * test_ecc) +{ -+ unsigned char cDelta; // column parity delta -+ unsigned lDelta; // line parity delta -+ unsigned lDeltaPrime; // line parity delta ++ unsigned char cDelta; /* column parity delta */ ++ unsigned lDelta; /* line parity delta */ ++ unsigned lDeltaPrime; /* line parity delta */ + unsigned bit; + + cDelta = read_ecc->colParity ^ test_ecc->colParity; -+ lDelta = read_ecc->lineParity ^ test_ecc->lineParity; ++ lDelta = read_ecc->lineParity ^ test_ecc->lineParity; + lDeltaPrime = read_ecc->lineParityPrime ^ test_ecc->lineParityPrime; -+ -+ if((cDelta | lDelta | lDeltaPrime) == 0) -+ { -+ // no error -+ return 0; -+ } -+ -+ if( lDelta == ~lDeltaPrime && -+ (((cDelta ^ (cDelta >> 1)) & 0x15) == 0x15)) // Not correct ++ ++ if ((cDelta | lDelta | lDeltaPrime) == 0) ++ return 0; /* no error */ ++ ++ if (lDelta == ~lDeltaPrime && ++ (((cDelta ^ (cDelta >> 1)) & 0x15) == 0x15)) + { -+ // Single bit (recoverable) error in data ++ /* Single bit (recoverable) error in data */ + + bit = 0; + -+ if(cDelta & 0x20) bit |= 0x04; -+ if(cDelta & 0x08) bit |= 0x02; -+ if(cDelta & 0x02) bit |= 0x01; ++ if (cDelta & 0x20) ++ bit |= 0x04; ++ if (cDelta & 0x08) ++ bit |= 0x02; ++ if (cDelta & 0x02) ++ bit |= 0x01; + ++ if(lDelta >= nBytes) ++ return -1; ++ + data[lDelta] ^= (1 << bit); -+ -+ return 1; ++ ++ return 1; /* corrected */ + } -+ -+ if((yaffs_CountBits32(lDelta) + yaffs_CountBits32(lDeltaPrime) + yaffs_CountBits(cDelta)) == 1) -+ { -+ // Reccoverable error in ecc -+ -+ *read_ecc = *test_ecc; -+ return 1; ++ ++ if ((yaffs_CountBits32(lDelta) + yaffs_CountBits32(lDeltaPrime) + ++ yaffs_CountBits(cDelta)) == 1) { ++ /* Reccoverable error in ecc */ ++ ++ *read_ecc = *test_ecc; ++ return 1; /* corrected */ + } -+ -+ // Unrecoverable error -+ -+ return -1; -+ + -+} ++ /* Unrecoverable error */ + ++ return -1; + ++} + -diff --git a/fs/yaffs/yaffs_ecc.h b/fs/yaffs/yaffs_ecc.h -new file mode 100644 -index 0000000..f96d707 ---- /dev/null -+++ b/fs/yaffs/yaffs_ecc.h -@@ -0,0 +1,41 @@ +diff -urN linux.old/fs/yaffs2/yaffs_ecc.h linux.dev/fs/yaffs2/yaffs_ecc.h +--- linux.old/fs/yaffs2/yaffs_ecc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_ecc.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,44 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * @@ -644,39 +1241,40 @@ index 0000000..f96d707 + * published by the Free Software Foundation. + * + */ -+ ++ + /* -+ * This code implements the ECC algorithm used in SmartMedia. -+ * -+ * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes. -+ * The two unused bit are set to 1. -+ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC -+ * blocks are used on a 512-byte NAND page. -+ * -+ */ ++ * This code implements the ECC algorithm used in SmartMedia. ++ * ++ * The ECC comprises 22 bits of parity information and is stuffed into 3 bytes. ++ * The two unused bit are set to 1. ++ * The ECC can correct single bit errors in a 256-byte page of data. Thus, two such ECC ++ * blocks are used on a 512-byte NAND page. ++ * ++ */ + +#ifndef __YAFFS_ECC_H__ +#define __YAFFS_ECC_H__ + -+typedef struct -+{ ++typedef struct { + unsigned char colParity; + unsigned lineParity; + unsigned lineParityPrime; +} yaffs_ECCOther; + -+void yaffs_ECCCalculate(const unsigned char *data,unsigned char *ecc); -+int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc, const unsigned char *test_ecc); ++void yaffs_ECCCalculate(const unsigned char *data, unsigned char *ecc); ++int yaffs_ECCCorrect(unsigned char *data, unsigned char *read_ecc, ++ const unsigned char *test_ecc); + -+void yaffs_ECCCalculateOther(const unsigned char *data,unsigned nBytes, yaffs_ECCOther *ecc); -+int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes, yaffs_ECCOther *read_ecc, const yaffs_ECCOther *test_ecc); ++void yaffs_ECCCalculateOther(const unsigned char *data, unsigned nBytes, ++ yaffs_ECCOther * ecc); ++int yaffs_ECCCorrectOther(unsigned char *data, unsigned nBytes, ++ yaffs_ECCOther * read_ecc, ++ const yaffs_ECCOther * test_ecc); +#endif -diff --git a/fs/yaffs/yaffs_fs.c b/fs/yaffs/yaffs_fs.c -new file mode 100644 -index 0000000..717f41a ---- /dev/null -+++ b/fs/yaffs/yaffs_fs.c -@@ -0,0 +1,1727 @@ +diff -urN linux.old/fs/yaffs2/yaffs_fs.c linux.dev/fs/yaffs2/yaffs_fs.c +--- linux.old/fs/yaffs2/yaffs_fs.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_fs.c 2006-12-14 04:33:02.000000000 +0100 +@@ -0,0 +1,2136 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yaffs_fs.c @@ -694,11 +1292,12 @@ index 0000000..717f41a + * the VFS. + * + * Special notes: -+ * >> 2.4: sb->u.generic_sbp points to the yaffs_Device associated with this superblock -+ * >> 2.6: sb->s_fs_info points to the yaffs_Device associated with this superblock ++ * >> 2.4: sb->u.generic_sbp points to the yaffs_Device associated with ++ * this superblock ++ * >> 2.6: sb->s_fs_info points to the yaffs_Device associated with this ++ * superblock + * >> inode->u.generic_ip points to the associated yaffs_Object. + * -+ * + * Acknowledgements: + * * Luc van OostenRyck for numerous patches. + * * Nick Bane for numerous patches. @@ -708,12 +1307,11 @@ index 0000000..717f41a + * * Some code bodily lifted from JFFS2. + */ + -+ -+const char *yaffs_fs_c_version = "$Id: yaffs_fs.c,v 1.27 2005/08/04 22:47:36 luc Exp $"; ++const char *yaffs_fs_c_version = ++ "$Id: yaffs_fs.c,v 1.54 2006/10/24 18:09:15 charles Exp $"; +extern const char *yaffs_guts_c_version; + -+ -+#include <linux/config.h> ++#include <linux/autoconf.h> +#include <linux/kernel.h> +#include <linux/module.h> +#include <linux/version.h> @@ -727,7 +1325,7 @@ index 0000000..717f41a +#include <linux/mtd/mtd.h> +#include <linux/interrupt.h> +#include <linux/string.h> -+ ++#include <linux/ctype.h> + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) + @@ -735,7 +1333,9 @@ index 0000000..717f41a +#include <asm/statfs.h> +#define UnlockPage(p) unlock_page(p) +#define Page_Uptodate(page) test_bit(PG_uptodate, &(page)->flags) -+#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf) // FIXME: use sb->s_id instead ? ++ ++/* FIXME: use sb->s_id instead ? */ ++#define yaffs_devname(sb, buf) bdevname(sb->s_bdev, buf) + +#else + @@ -743,6 +1343,11 @@ index 0000000..717f41a +#define BDEVNAME_SIZE 0 +#define yaffs_devname(sb, buf) kdevname(sb->s_dev) + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) ++/* added NCB 26/5/2006 for 2.4.25-vrs2-tcl1 kernel */ ++#define __user ++#endif ++ +#endif + +#include <asm/uaccess.h> @@ -750,24 +1355,21 @@ index 0000000..717f41a +#include "yportenv.h" +#include "yaffs_guts.h" + ++unsigned yaffs_traceMask = YAFFS_TRACE_ALWAYS | ++ YAFFS_TRACE_BAD_BLOCKS ++ /* | 0xFFFFFFFF */; + -+ -+ -+unsigned yaffs_traceMask = YAFFS_TRACE_ALWAYS | YAFFS_TRACE_BAD_BLOCKS; -+//unsigned yaffs_traceMask = 0xFFFFFFFF; -+ -+ -+#ifdef CONFIG_YAFFS_YAFFS1 +#include <linux/mtd/mtd.h> +#include "yaffs_mtdif.h" +#include "yaffs_mtdif2.h" -+#endif //CONFIG_YAFFS_YAFFS1 -+ -+//#define T(x) printk x -+ + ++/*#define T(x) printk x */ + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)) ++#define yaffs_InodeToObject(iptr) ((yaffs_Object *)((iptr)->i_private)) ++#else +#define yaffs_InodeToObject(iptr) ((yaffs_Object *)((iptr)->u.generic_ip)) ++#endif +#define yaffs_DentryToObject(dptr) yaffs_InodeToObject((dptr)->d_inode) + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) @@ -776,146 +1378,184 @@ index 0000000..717f41a +#define yaffs_SuperToDevice(sb) ((yaffs_Device *)sb->u.generic_sbp) +#endif + -+ +static void yaffs_put_super(struct super_block *sb); + -+static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, loff_t *pos); ++static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, ++ loff_t * pos); + -+static int yaffs_file_flush(struct file* file); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_file_flush(struct file *file, fl_owner_t id); ++#else ++static int yaffs_file_flush(struct file *file); ++#endif + -+static int yaffs_sync_object(struct file * file, struct dentry *dentry, int datasync); ++static int yaffs_sync_object(struct file *file, struct dentry *dentry, ++ int datasync); + +static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir); + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *n); -+static struct dentry * yaffs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *n); ++static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, ++ struct nameidata *n); ++static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, ++ struct nameidata *n); +#else +static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode); -+static struct dentry * yaffs_lookup(struct inode *dir, struct dentry *dentry); ++static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry); +#endif -+static int yaffs_link(struct dentry *old_dentry, struct inode * dir, struct dentry * dentry); -+static int yaffs_unlink(struct inode * dir, struct dentry *dentry); -+static int yaffs_symlink(struct inode * dir, struct dentry *dentry, const char * symname); -+static int yaffs_mkdir(struct inode * dir, struct dentry * dentry, int mode); ++static int yaffs_link(struct dentry *old_dentry, struct inode *dir, ++ struct dentry *dentry); ++static int yaffs_unlink(struct inode *dir, struct dentry *dentry); ++static int yaffs_symlink(struct inode *dir, struct dentry *dentry, ++ const char *symname); ++static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode); + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev); ++static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, ++ dev_t dev); +#else -+static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, int dev); ++static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, ++ int dev); +#endif -+static int yaffs_rename(struct inode * old_dir, struct dentry *old_dentry, struct inode * new_dir,struct dentry *new_dentry); ++static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry, ++ struct inode *new_dir, struct dentry *new_dentry); +static int yaffs_setattr(struct dentry *dentry, struct iattr *attr); + -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_sync_fs(struct super_block *sb, int wait); ++static void yaffs_write_super(struct super_block *sb); ++#else ++static int yaffs_sync_fs(struct super_block *sb); ++static int yaffs_write_super(struct super_block *sb); ++#endif ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf); ++#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +static int yaffs_statfs(struct super_block *sb, struct kstatfs *buf); +#else +static int yaffs_statfs(struct super_block *sb, struct statfs *buf); +#endif -+static void yaffs_read_inode (struct inode *inode); ++static void yaffs_read_inode(struct inode *inode); + -+static void yaffs_put_inode (struct inode *inode); ++static void yaffs_put_inode(struct inode *inode); +static void yaffs_delete_inode(struct inode *); +static void yaffs_clear_inode(struct inode *); + -+static int yaffs_readpage(struct file *file, struct page * page); ++static int yaffs_readpage(struct file *file, struct page *page); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +static int yaffs_writepage(struct page *page, struct writeback_control *wbc); +#else +static int yaffs_writepage(struct page *page); +#endif -+static int yaffs_prepare_write(struct file *f, struct page *pg, unsigned offset, unsigned to); -+static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, unsigned to); ++static int yaffs_prepare_write(struct file *f, struct page *pg, ++ unsigned offset, unsigned to); ++static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, ++ unsigned to); + -+static int yaffs_readlink(struct dentry *dentry, char __user *buffer, int buflen); ++static int yaffs_readlink(struct dentry *dentry, char __user * buffer, ++ int buflen); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)) +static void *yaffs_follow_link(struct dentry *dentry, struct nameidata *nd); -+ -+ ++#else ++static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd); ++#endif + +static struct address_space_operations yaffs_file_address_operations = { -+ .readpage = yaffs_readpage, -+ .writepage = yaffs_writepage, -+ .prepare_write = yaffs_prepare_write, -+ .commit_write = yaffs_commit_write, ++ .readpage = yaffs_readpage, ++ .writepage = yaffs_writepage, ++ .prepare_write = yaffs_prepare_write, ++ .commit_write = yaffs_commit_write, +}; + +static struct file_operations yaffs_file_operations = { -+ .read = generic_file_read, -+ .write = generic_file_write, -+ .mmap = generic_file_mmap, -+ .flush = yaffs_file_flush, -+ .fsync = yaffs_sync_object, ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)) ++ .read = do_sync_read, ++ .write = do_sync_write, ++ .aio_read = generic_file_aio_read, ++ .aio_write = generic_file_aio_write, ++#else ++ .read = generic_file_read, ++ .write = generic_file_write, ++#endif ++ .mmap = generic_file_mmap, ++ .flush = yaffs_file_flush, ++ .fsync = yaffs_sync_object, ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) ++ .sendfile = generic_file_sendfile, ++#endif ++ +}; + +static struct inode_operations yaffs_file_inode_operations = { -+ .setattr = yaffs_setattr, ++ .setattr = yaffs_setattr, +}; + -+static struct inode_operations yaffs_symlink_inode_operations = { -+ .readlink = yaffs_readlink, -+ .follow_link = yaffs_follow_link, -+ .setattr = yaffs_setattr, ++static struct inode_operations yaffs_symlink_inode_operations = { ++ .readlink = yaffs_readlink, ++ .follow_link = yaffs_follow_link, ++ .setattr = yaffs_setattr, +}; + +static struct inode_operations yaffs_dir_inode_operations = { -+ .create = yaffs_create, -+ .lookup = yaffs_lookup, -+ .link = yaffs_link, -+ .unlink = yaffs_unlink, -+ .symlink = yaffs_symlink, -+ .mkdir = yaffs_mkdir, -+ .rmdir = yaffs_unlink, -+ .mknod = yaffs_mknod, -+ .rename = yaffs_rename, -+ .setattr = yaffs_setattr, ++ .create = yaffs_create, ++ .lookup = yaffs_lookup, ++ .link = yaffs_link, ++ .unlink = yaffs_unlink, ++ .symlink = yaffs_symlink, ++ .mkdir = yaffs_mkdir, ++ .rmdir = yaffs_unlink, ++ .mknod = yaffs_mknod, ++ .rename = yaffs_rename, ++ .setattr = yaffs_setattr, +}; + +static struct file_operations yaffs_dir_operations = { -+ .read = generic_read_dir, -+ .readdir = yaffs_readdir, -+ .fsync = yaffs_sync_object, ++ .read = generic_read_dir, ++ .readdir = yaffs_readdir, ++ .fsync = yaffs_sync_object, +}; + +static struct super_operations yaffs_super_ops = { -+ .statfs = yaffs_statfs, -+ .read_inode = yaffs_read_inode, -+ .put_inode = yaffs_put_inode, -+ .put_super = yaffs_put_super, -+ .delete_inode = yaffs_delete_inode, -+ .clear_inode = yaffs_clear_inode, ++ .statfs = yaffs_statfs, ++ .read_inode = yaffs_read_inode, ++ .put_inode = yaffs_put_inode, ++ .put_super = yaffs_put_super, ++ .delete_inode = yaffs_delete_inode, ++ .clear_inode = yaffs_clear_inode, ++ .sync_fs = yaffs_sync_fs, ++ .write_super = yaffs_write_super, +}; + -+ -+ -+static void yaffs_GrossLock(yaffs_Device *dev) ++static void yaffs_GrossLock(yaffs_Device * dev) +{ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs locking\n")); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs locking\n")); + + down(&dev->grossLock); +} + -+static void yaffs_GrossUnlock(yaffs_Device *dev) ++static void yaffs_GrossUnlock(yaffs_Device * dev) +{ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs unlocking\n")); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs unlocking\n")); + up(&dev->grossLock); + +} + -+static int yaffs_readlink(struct dentry *dentry, char __user *buffer, int buflen) ++static int yaffs_readlink(struct dentry *dentry, char __user * buffer, ++ int buflen) +{ + unsigned char *alias; + int ret; + + yaffs_Device *dev = yaffs_DentryToObject(dentry)->myDev; + -+ + yaffs_GrossLock(dev); -+ ++ + alias = yaffs_GetSymlinkAlias(yaffs_DentryToObject(dentry)); -+ ++ + yaffs_GrossUnlock(dev); -+ -+ if(!alias) ++ ++ if (!alias) + return -ENOMEM; + + ret = vfs_readlink(dentry, buffer, buflen, alias); @@ -923,212 +1563,244 @@ index 0000000..717f41a + return ret; +} + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)) +static void *yaffs_follow_link(struct dentry *dentry, struct nameidata *nd) ++#else ++static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd) ++#endif +{ + unsigned char *alias; + int ret; + yaffs_Device *dev = yaffs_DentryToObject(dentry)->myDev; + -+ + yaffs_GrossLock(dev); + + alias = yaffs_GetSymlinkAlias(yaffs_DentryToObject(dentry)); -+ ++ + yaffs_GrossUnlock(dev); -+ -+ if(!alias) ++ ++ if (!alias) ++ { + ret = -ENOMEM; -+ else { -+ ret = vfs_follow_link(nd,alias); -+ kfree(alias); -+ } ++ goto out; ++ } ++ ++ ret = vfs_follow_link(nd, alias); ++ kfree(alias); ++out: ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)) + return ERR_PTR (ret); ++#else ++ return ret; ++#endif +} + -+ -+struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,yaffs_Object *obj); ++struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev, ++ yaffs_Object * obj); + +/* + * Lookup is used to find objects in the fs + */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) + -+static struct dentry * yaffs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *n) ++static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry, ++ struct nameidata *n) +#else -+static struct dentry * yaffs_lookup(struct inode *dir, struct dentry *dentry) ++static struct dentry *yaffs_lookup(struct inode *dir, struct dentry *dentry) +#endif +{ + yaffs_Object *obj; -+ struct inode *inode = NULL; // NCB 2.5/2.6 needs NULL here -+ -+ yaffs_Device *dev = yaffs_InodeToObject(dir)->myDev; ++ struct inode *inode = NULL; /* NCB 2.5/2.6 needs NULL here */ + ++ yaffs_Device *dev = yaffs_InodeToObject(dir)->myDev; + + yaffs_GrossLock(dev); + -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_lookup for %d:%s\n",yaffs_InodeToObject(dir)->objectId,dentry->d_name.name)); -+ -+ obj = yaffs_FindObjectByName(yaffs_InodeToObject(dir),dentry->d_name.name); -+ -+ obj = yaffs_GetEquivalentObject(obj); // in case it was a hardlink -+ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_lookup for %d:%s\n", ++ yaffs_InodeToObject(dir)->objectId, dentry->d_name.name)); ++ ++ obj = ++ yaffs_FindObjectByName(yaffs_InodeToObject(dir), ++ dentry->d_name.name); + ++ obj = yaffs_GetEquivalentObject(obj); /* in case it was a hardlink */ + -+ if(obj) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_lookup found %d\n",obj->objectId)); -+ -+ inode = yaffs_get_inode(dir->i_sb, obj->yst_mode,0,obj); -+ -+ if(inode) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_loookup dentry \n")); -+/* #if 0 asserted by NCB for 2.5/6 compatability - falls through to d_add even if NULL inode */ ++ /* Can't hold gross lock when calling yaffs_get_inode() */ ++ yaffs_GrossUnlock(dev); ++ ++ if (obj) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_lookup found %d\n", obj->objectId)); ++ ++ inode = yaffs_get_inode(dir->i_sb, obj->yst_mode, 0, obj); ++ ++ if (inode) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_loookup dentry \n")); ++/* #if 0 asserted by NCB for 2.5/6 compatability - falls through to ++ * d_add even if NULL inode */ +#if 0 -+ //dget(dentry); // try to solve directory bug -+ d_add(dentry,inode); -+ -+ yaffs_GrossUnlock(dev); ++ /*dget(dentry); // try to solve directory bug */ ++ d_add(dentry, inode); + -+ // return dentry; ++ /* return dentry; */ + return NULL; +#endif + } + ++ } else { ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_lookup not found\n")); ++ + } -+ else -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_lookup not found\n")); -+ -+ } -+ yaffs_GrossUnlock(dev); + -+/* added NCB for 2.5/6 compatability - forces add even if inode is NULL which creates dentry hash*/ -+ d_add(dentry,inode); -+ ++/* added NCB for 2.5/6 compatability - forces add even if inode is ++ * NULL which creates dentry hash */ ++ d_add(dentry, inode); ++ + return NULL; -+ // return (ERR_PTR(-EIO)); -+ ++ /* return (ERR_PTR(-EIO)); */ ++ +} + -+// For now put inode is just for debugging -+// Put inode is called when the inode **structure** is put. ++/* For now put inode is just for debugging ++ * Put inode is called when the inode **structure** is put. ++ */ +static void yaffs_put_inode(struct inode *inode) +{ -+ T(YAFFS_TRACE_OS,("yaffs_put_inode: ino %d, count %d\n",(int)inode->i_ino, atomic_read(&inode->i_count))); -+ ++ T(YAFFS_TRACE_OS, ++ ("yaffs_put_inode: ino %d, count %d\n", (int)inode->i_ino, ++ atomic_read(&inode->i_count))); ++ +} + -+// clear is called to tell the fs to release any per-inode data it holds ++/* clear is called to tell the fs to release any per-inode data it holds */ +static void yaffs_clear_inode(struct inode *inode) +{ + yaffs_Object *obj; + yaffs_Device *dev; -+ ++ + obj = yaffs_InodeToObject(inode); -+ -+ T(YAFFS_TRACE_OS,("yaffs_clear_inode: ino %d, count %d %s\n",(int)inode->i_ino, atomic_read(&inode->i_count), -+ obj ? "object exists" : "null object")); + -+ if(obj) -+ { ++ T(YAFFS_TRACE_OS, ++ ("yaffs_clear_inode: ino %d, count %d %s\n", (int)inode->i_ino, ++ atomic_read(&inode->i_count), ++ obj ? "object exists" : "null object")); ++ ++ if (obj) { + dev = obj->myDev; + yaffs_GrossLock(dev); -+ -+ // Clear the association between the inode ant the yaffs_Object. ++ ++ /* Clear the association between the inode and ++ * the yaffs_Object. ++ */ + obj->myInode = NULL; ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)) ++ inode->i_private = NULL; ++#else + inode->u.generic_ip = NULL; -+ -+ // If the object freeing was deferred, then the real free happens now. -+ // This should fix the inode inconsistency problem. -+ ++#endif ++ ++ /* If the object freeing was deferred, then the real ++ * free happens now. ++ * This should fix the inode inconsistency problem. ++ */ ++ + yaffs_HandleDeferedFree(obj); -+ ++ + yaffs_GrossUnlock(dev); + } -+ -+ ++ +} + -+// delete is called when the link count is zero and the inode -+// is put (ie. nobody wants to know about it anymore, time to -+// delete the file). -+// NB Must call clear_inode() ++/* delete is called when the link count is zero and the inode ++ * is put (ie. nobody wants to know about it anymore, time to ++ * delete the file). ++ * NB Must call clear_inode() ++ */ +static void yaffs_delete_inode(struct inode *inode) +{ + yaffs_Object *obj = yaffs_InodeToObject(inode); + yaffs_Device *dev; + -+ T(YAFFS_TRACE_OS,("yaffs_delete_inode: ino %d, count %d %s\n",(int)inode->i_ino, atomic_read(&inode->i_count), -+ obj ? "object exists" : "null object")); -+ -+ if(obj) -+ { -+ dev = obj->myDev; ++ T(YAFFS_TRACE_OS, ++ ("yaffs_delete_inode: ino %d, count %d %s\n", (int)inode->i_ino, ++ atomic_read(&inode->i_count), ++ obj ? "object exists" : "null object")); ++ ++ if (obj) { ++ dev = obj->myDev; + yaffs_GrossLock(dev); + yaffs_DeleteFile(obj); + yaffs_GrossUnlock(dev); + } ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)) ++ truncate_inode_pages (&inode->i_data, 0); ++#endif + clear_inode(inode); +} + -+ -+static int yaffs_file_flush(struct file* file) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_file_flush(struct file *file, fl_owner_t id) ++#else ++static int yaffs_file_flush(struct file *file) ++#endif +{ + yaffs_Object *obj = yaffs_DentryToObject(file->f_dentry); -+ ++ + yaffs_Device *dev = obj->myDev; -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_flush object %d (%s)\n",obj->objectId, -+ obj->dirty ? "dirty" : "clean")); ++ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_file_flush object %d (%s)\n", obj->objectId, ++ obj->dirty ? "dirty" : "clean")); + + yaffs_GrossLock(dev); -+ -+ yaffs_FlushFile(obj,1); ++ ++ yaffs_FlushFile(obj, 1); + + yaffs_GrossUnlock(dev); + -+ return 0; ++ return 0; +} + -+ -+ -+static int yaffs_readpage_nolock(struct file *f, struct page * pg) ++static int yaffs_readpage_nolock(struct file *f, struct page *pg) +{ -+ // Lifted from jffs2 -+ ++ /* Lifted from jffs2 */ ++ + yaffs_Object *obj; + unsigned char *pg_buf; + int ret; + + yaffs_Device *dev; + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_readpage at %08x, size %08x\n", -+ (unsigned)(pg->index << PAGE_CACHE_SHIFT), (unsigned)PAGE_CACHE_SIZE)); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_readpage at %08x, size %08x\n", ++ (unsigned)(pg->index << PAGE_CACHE_SHIFT), ++ (unsigned)PAGE_CACHE_SIZE)); + -+ obj = yaffs_DentryToObject(f->f_dentry); ++ obj = yaffs_DentryToObject(f->f_dentry); + + dev = obj->myDev; -+ -+ ++ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+ BUG_ON(!PageLocked(pg)); ++ BUG_ON(!PageLocked(pg)); +#else + if (!PageLocked(pg)) -+ PAGE_BUG(pg); ++ PAGE_BUG(pg); +#endif + + pg_buf = kmap(pg); + /* FIXME: Can kmap fail? */ + + yaffs_GrossLock(dev); -+ -+ ret = yaffs_ReadDataFromFile(obj, pg_buf, pg->index << PAGE_CACHE_SHIFT, PAGE_CACHE_SIZE); ++ ++ ret = ++ yaffs_ReadDataFromFile(obj, pg_buf, pg->index << PAGE_CACHE_SHIFT, ++ PAGE_CACHE_SIZE); + + yaffs_GrossUnlock(dev); -+ -+ if(ret >= 0) ret = 0; ++ ++ if (ret >= 0) ++ ret = 0; + + if (ret) { + ClearPageUptodate(pg); @@ -1141,25 +1813,23 @@ index 0000000..717f41a + flush_dcache_page(pg); + kunmap(pg); + -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_readpage done\n")); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_readpage done\n")); + return ret; +} + +static int yaffs_readpage_unlock(struct file *f, struct page *pg) +{ -+ int ret = yaffs_readpage_nolock(f,pg); ++ int ret = yaffs_readpage_nolock(f, pg); + UnlockPage(pg); + return ret; +} + -+static int yaffs_readpage(struct file *f, struct page * pg) ++static int yaffs_readpage(struct file *f, struct page *pg) +{ -+ return yaffs_readpage_unlock(f,pg); ++ return yaffs_readpage_unlock(f, pg); +} + -+// writepage inspired by/stolen from smbfs -+// ++/* writepage inspired by/stolen from smbfs */ + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +static int yaffs_writepage(struct page *page, struct writeback_control *wbc) @@ -1168,7 +1838,7 @@ index 0000000..717f41a +#endif +{ + struct address_space *mapping = page->mapping; -+ loff_t offset = (loff_t)page->index << PAGE_CACHE_SHIFT; ++ loff_t offset = (loff_t) page->index << PAGE_CACHE_SHIFT; + struct inode *inode; + unsigned long end_index; + char *buffer; @@ -1182,10 +1852,14 @@ index 0000000..717f41a + if (!inode) + BUG(); + -+ if (offset > inode->i_size) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_writepage at %08x, inode size = %08x!!!\n", (unsigned)(page->index << PAGE_CACHE_SHIFT), (unsigned) inode->i_size)); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG" -> don't care!!\n")); ++ if (offset > inode->i_size) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG ++ "yaffs_writepage at %08x, inode size = %08x!!!\n", ++ (unsigned)(page->index << PAGE_CACHE_SHIFT), ++ (unsigned)inode->i_size)); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG " -> don't care!!\n")); + unlock_page(page); + return 0; + } @@ -1193,108 +1867,145 @@ index 0000000..717f41a + end_index = inode->i_size >> PAGE_CACHE_SHIFT; + + /* easy case */ -+ if (page->index < end_index) -+ { ++ if (page->index < end_index) { + nBytes = PAGE_CACHE_SIZE; ++ } else { ++ nBytes = inode->i_size & (PAGE_CACHE_SIZE - 1); + } -+ else -+ { -+ nBytes = inode->i_size & (PAGE_CACHE_SIZE-1); -+ } -+ // What's happening here? -+ ///* OK, are we completely out? */ -+ //if (page->index >= end_index+1 || !offset) -+ // return -EIO; + + get_page(page); + -+ + buffer = kmap(page); + + obj = yaffs_InodeToObject(inode); + yaffs_GrossLock(obj->myDev); + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_writepage at %08x, size %08x\n", (unsigned)(page->index << PAGE_CACHE_SHIFT), nBytes)); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"writepag0: obj = %05x, ino = %05x\n", (int) obj->variant.fileVariant.fileSize, (int) inode->i_size)); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_writepage at %08x, size %08x\n", ++ (unsigned)(page->index << PAGE_CACHE_SHIFT), nBytes)); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "writepag0: obj = %05x, ino = %05x\n", ++ (int)obj->variant.fileVariant.fileSize, (int)inode->i_size)); + -+ nWritten = yaffs_WriteDataToFile(obj,buffer,page->index << PAGE_CACHE_SHIFT,nBytes,0); ++ nWritten = ++ yaffs_WriteDataToFile(obj, buffer, page->index << PAGE_CACHE_SHIFT, ++ nBytes, 0); + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"writepag1: obj = %05x, ino = %05x\n", (int) obj->variant.fileVariant.fileSize, (int) inode->i_size)); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "writepag1: obj = %05x, ino = %05x\n", ++ (int)obj->variant.fileVariant.fileSize, (int)inode->i_size)); + + yaffs_GrossUnlock(obj->myDev); -+ ++ + kunmap(page); + SetPageUptodate(page); + UnlockPage(page); + put_page(page); + -+ return (nWritten == nBytes) ? 0 : -ENOSPC; ++ return (nWritten == nBytes) ? 0 : -ENOSPC; +} + -+ -+ -+static int yaffs_prepare_write(struct file *f, struct page *pg, unsigned offset, unsigned to) ++static int yaffs_prepare_write(struct file *f, struct page *pg, ++ unsigned offset, unsigned to) +{ + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_prepair_write\n")); -+ if(!Page_Uptodate(pg) && (offset || to < PAGE_CACHE_SIZE)) -+ return yaffs_readpage_nolock(f,pg); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_prepair_write\n")); ++ if (!Page_Uptodate(pg) && (offset || to < PAGE_CACHE_SIZE)) ++ return yaffs_readpage_nolock(f, pg); + + return 0; -+ ++ +} + -+static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, unsigned to) ++static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset, ++ unsigned to) +{ + + void *addr = page_address(pg) + offset; -+ loff_t pos = (((loff_t)pg->index) << PAGE_CACHE_SHIFT) + offset; ++ loff_t pos = (((loff_t) pg->index) << PAGE_CACHE_SHIFT) + offset; + int nBytes = to - offset; + int nWritten; -+ ++ + unsigned spos = pos; + unsigned saddr = (unsigned)addr; + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_commit_write addr %x pos %x nBytes %d\n",saddr,spos,nBytes)); -+ -+ nWritten = yaffs_file_write(f,addr, nBytes, &pos); -+ -+ if(nWritten != nBytes) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_commit_write not same size nWritten %d nBytes %d\n",nWritten,nBytes)); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_commit_write addr %x pos %x nBytes %d\n", saddr, ++ spos, nBytes)); ++ ++ nWritten = yaffs_file_write(f, addr, nBytes, &pos); ++ ++ if (nWritten != nBytes) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG ++ "yaffs_commit_write not same size nWritten %d nBytes %d\n", ++ nWritten, nBytes)); + SetPageError(pg); + ClearPageUptodate(pg); -+ } -+ else -+ { ++ } else { + SetPageUptodate(pg); + } + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_commit_write returning %d\n",nWritten)); -+ -+ return nWritten; ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_commit_write returning %d\n", ++ nWritten == nBytes ? 0 : nWritten)); ++ ++ return nWritten == nBytes ? 0 : nWritten; + +} + ++static void yaffs_FillInodeFromObject(struct inode *inode, yaffs_Object * obj) ++{ ++ if (inode && obj) { + + -+static void yaffs_FillInodeFromObject(struct inode *inode, yaffs_Object *obj) -+{ -+ if (inode && obj) -+ { ++ /* Check mode against the variant type and attempt to repair if broken. */ ++ __u32 mode = obj->yst_mode; ++ switch( obj->variantType ){ ++ case YAFFS_OBJECT_TYPE_FILE : ++ if( ! S_ISREG(mode) ){ ++ obj->yst_mode &= ~S_IFMT; ++ obj->yst_mode |= S_IFREG; ++ } ++ ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK : ++ if( ! S_ISLNK(mode) ){ ++ obj->yst_mode &= ~S_IFMT; ++ obj->yst_mode |= S_IFLNK; ++ } ++ ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY : ++ if( ! S_ISDIR(mode) ){ ++ obj->yst_mode &= ~S_IFMT; ++ obj->yst_mode |= S_IFDIR; ++ } ++ ++ break; ++ case YAFFS_OBJECT_TYPE_UNKNOWN : ++ case YAFFS_OBJECT_TYPE_HARDLINK : ++ case YAFFS_OBJECT_TYPE_SPECIAL : ++ default: ++ /* TODO? */ ++ break; ++ } ++ + inode->i_ino = obj->objectId; + inode->i_mode = obj->yst_mode; + inode->i_uid = obj->yst_uid; + inode->i_gid = obj->yst_gid; ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) + inode->i_blksize = inode->i_sb->s_blocksize; ++#endif +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) + + inode->i_rdev = old_decode_dev(obj->yst_rdev); -+ inode->i_atime.tv_sec = (time_t)(obj->yst_atime); ++ inode->i_atime.tv_sec = (time_t) (obj->yst_atime); + inode->i_atime.tv_nsec = 0; -+ inode->i_mtime.tv_sec = (time_t)obj->yst_mtime; -+ inode->i_mtime.tv_nsec =0; -+ inode->i_ctime.tv_sec = (time_t)obj->yst_ctime; ++ inode->i_mtime.tv_sec = (time_t) obj->yst_mtime; ++ inode->i_mtime.tv_nsec = 0; ++ inode->i_ctime.tv_sec = (time_t) obj->yst_ctime; + inode->i_ctime.tv_nsec = 0; +#else + inode->i_rdev = obj->yst_rdev; @@ -1306,299 +2017,333 @@ index 0000000..717f41a + inode->i_blocks = (inode->i_size + 511) >> 9; + + inode->i_nlink = yaffs_GetObjectLinkCount(obj); -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_FillInode mode %x uid %d gid %d size %d count %d\n", -+ inode->i_mode, inode->i_uid, inode->i_gid, (int)inode->i_size, atomic_read(&inode->i_count))); -+ -+ switch (obj->yst_mode & S_IFMT) -+ { -+ default: // fifo, device or socket ++ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG ++ "yaffs_FillInode mode %x uid %d gid %d size %d count %d\n", ++ inode->i_mode, inode->i_uid, inode->i_gid, ++ (int)inode->i_size, atomic_read(&inode->i_count))); ++ ++ switch (obj->yst_mode & S_IFMT) { ++ default: /* fifo, device or socket */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+ init_special_inode(inode, obj->yst_mode,old_decode_dev(obj->yst_rdev)); ++ init_special_inode(inode, obj->yst_mode, ++ old_decode_dev(obj->yst_rdev)); +#else -+ init_special_inode(inode, obj->yst_mode,(dev_t)(obj->yst_rdev)); -+#endif -+ break; -+ case S_IFREG: // file -+ inode->i_op = &yaffs_file_inode_operations; -+ inode->i_fop = &yaffs_file_operations; -+ inode->i_mapping->a_ops = &yaffs_file_address_operations; -+ break; -+ case S_IFDIR: // directory -+ inode->i_op = &yaffs_dir_inode_operations; -+ inode->i_fop = &yaffs_dir_operations; -+ break; -+ case S_IFLNK: // symlink -+ inode->i_op = &yaffs_symlink_inode_operations; -+ break; ++ init_special_inode(inode, obj->yst_mode, ++ (dev_t) (obj->yst_rdev)); ++#endif ++ break; ++ case S_IFREG: /* file */ ++ inode->i_op = &yaffs_file_inode_operations; ++ inode->i_fop = &yaffs_file_operations; ++ inode->i_mapping->a_ops = ++ &yaffs_file_address_operations; ++ break; ++ case S_IFDIR: /* directory */ ++ inode->i_op = &yaffs_dir_inode_operations; ++ inode->i_fop = &yaffs_dir_operations; ++ break; ++ case S_IFLNK: /* symlink */ ++ inode->i_op = &yaffs_symlink_inode_operations; ++ break; + } -+ -+ ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)) ++ inode->i_private = obj; ++#else + inode->u.generic_ip = obj; ++#endif + obj->myInode = inode; -+ -+ } -+ else -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_FileInode invalid parameters\n")); ++ ++ } else { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_FileInode invalid parameters\n")); + } + +} + -+struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev,yaffs_Object *obj) ++struct inode *yaffs_get_inode(struct super_block *sb, int mode, int dev, ++ yaffs_Object * obj) +{ -+ struct inode * inode; -+ -+ if(!sb) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_get_inode for NULL super_block!!\n")); -+ return NULL; -+ ++ struct inode *inode; ++ ++ if (!sb) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_get_inode for NULL super_block!!\n")); ++ return NULL; ++ + } -+ -+ if(!obj) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_get_inode for NULL object!!\n")); -+ return NULL; -+ ++ ++ if (!obj) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_get_inode for NULL object!!\n")); ++ return NULL; ++ + } -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_get_inode for object %d\n",obj->objectId)); + -+ inode = iget(sb,obj->objectId); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_get_inode for object %d\n", obj->objectId)); ++ ++ inode = iget(sb, obj->objectId); ++ ++ /* NB Side effect: iget calls back to yaffs_read_inode(). */ ++ /* iget also increments the inode's i_count */ ++ /* NB You can't be holding grossLock or deadlock will happen! */ + -+ // NB Side effect: iget calls back to yaffs_read_inode(). -+ // iget also increments the inode's i_count -+ + return inode; +} + -+static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, loff_t *pos) ++static ssize_t yaffs_file_write(struct file *f, const char *buf, size_t n, ++ loff_t * pos) +{ + yaffs_Object *obj; -+ int nWritten,ipos; ++ int nWritten, ipos; + struct inode *inode; + yaffs_Device *dev; -+ -+ -+ obj = yaffs_DentryToObject(f->f_dentry); -+ ++ ++ obj = yaffs_DentryToObject(f->f_dentry); ++ + dev = obj->myDev; -+ ++ + yaffs_GrossLock(dev); + + inode = f->f_dentry->d_inode; + -+ if(!S_ISBLK(inode->i_mode) && f->f_flags & O_APPEND) -+ { ++ if (!S_ISBLK(inode->i_mode) && f->f_flags & O_APPEND) { + ipos = inode->i_size; -+ } -+ else -+ { ++ } else { + ipos = *pos; + } -+ -+ -+ if(!obj) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_write: hey obj is null!\n")); -+ } -+ else -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_write about to write writing %d bytes to object %d at %d\n",n,obj->objectId,ipos)); ++ ++ if (!obj) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_file_write: hey obj is null!\n")); ++ } else { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG ++ "yaffs_file_write about to write writing %d bytes" ++ "to object %d at %d\n", ++ n, obj->objectId, ipos)); + } + -+ nWritten = yaffs_WriteDataToFile(obj,buf,ipos,n,0); ++ nWritten = yaffs_WriteDataToFile(obj, buf, ipos, n, 0); + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_write writing %d bytes, %d written at %d\n",n,nWritten,ipos)); -+ if(nWritten > 0) -+ { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_file_write writing %d bytes, %d written at %d\n", ++ n, nWritten, ipos)); ++ if (nWritten > 0) { + ipos += nWritten; + *pos = ipos; -+ if(ipos > inode->i_size) -+ { ++ if (ipos > inode->i_size) { + inode->i_size = ipos; -+ inode->i_blocks = (ipos + 511)>>9; -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_file_write size updated to %d bytes, %d blocks\n",ipos,(int)(inode->i_blocks))); ++ inode->i_blocks = (ipos + 511) >> 9; ++ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG ++ "yaffs_file_write size updated to %d bytes, " ++ "%d blocks\n", ++ ipos, (int)(inode->i_blocks))); + } -+ ++ + } + yaffs_GrossUnlock(dev); -+ -+ return nWritten != n ? -ENOSPC : nWritten; ++ return nWritten == 0 ? -ENOSPC : nWritten; +} + -+ -+ +static int yaffs_readdir(struct file *f, void *dirent, filldir_t filldir) +{ + yaffs_Object *obj; + yaffs_Device *dev; + struct inode *inode = f->f_dentry->d_inode; + unsigned long offset, curoffs; -+ struct list_head *i; ++ struct list_head *i; + yaffs_Object *l; -+ -+ char name[YAFFS_MAX_NAME_LENGTH +1]; -+ -+ obj = yaffs_DentryToObject(f->f_dentry); ++ ++ char name[YAFFS_MAX_NAME_LENGTH + 1]; ++ ++ obj = yaffs_DentryToObject(f->f_dentry); + dev = obj->myDev; -+ ++ + yaffs_GrossLock(dev); -+ ++ + offset = f->f_pos; -+ -+ T(YAFFS_TRACE_OS,("yaffs_readdir: starting at %d\n",(int)offset)); -+ -+ if(offset == 0) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_readdir: entry . ino %d \n",(int)inode->i_ino)); -+ if(filldir(dirent,".",1,offset,inode->i_ino,DT_DIR) < 0) -+ { ++ ++ T(YAFFS_TRACE_OS, ("yaffs_readdir: starting at %d\n", (int)offset)); ++ ++ if (offset == 0) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_readdir: entry . ino %d \n", ++ (int)inode->i_ino)); ++ if (filldir(dirent, ".", 1, offset, inode->i_ino, DT_DIR) ++ < 0) { + goto out; + } + offset++; + f->f_pos++; + } -+ if(offset == 1) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_readdir: entry .. ino %d \n",(int)f->f_dentry->d_parent->d_inode->i_ino)); -+ if(filldir(dirent,"..",2,offset,f->f_dentry->d_parent->d_inode->i_ino,DT_DIR) < 0) -+ { ++ if (offset == 1) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_readdir: entry .. ino %d \n", ++ (int)f->f_dentry->d_parent->d_inode->i_ino)); ++ if (filldir ++ (dirent, "..", 2, offset, ++ f->f_dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) { + goto out; + } + offset++; + f->f_pos++; + } -+ ++ + curoffs = 1; -+ -+ list_for_each(i,&obj->variant.directoryVariant.children) -+ { ++ ++ /* If the directory has changed since the open or last call to ++ readdir, rewind to after the 2 canned entries. */ ++ ++ if (f->f_version != inode->i_version) { ++ offset = 2; ++ f->f_pos = offset; ++ f->f_version = inode->i_version; ++ } ++ ++ list_for_each(i, &obj->variant.directoryVariant.children) { + curoffs++; -+ if(curoffs >= offset) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ -+ yaffs_GetObjectName(l,name,YAFFS_MAX_NAME_LENGTH+1); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_readdir: %s inode %d\n",name,yaffs_GetObjectInode(l))); -+ -+ if(filldir(dirent, -+ name, -+ strlen(name), -+ offset, -+ yaffs_GetObjectInode(l), -+ yaffs_GetObjectType(l)) -+ < 0) -+ { ++ if (curoffs >= offset) { ++ l = list_entry(i, yaffs_Object, siblings); ++ ++ yaffs_GetObjectName(l, name, ++ YAFFS_MAX_NAME_LENGTH + 1); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_readdir: %s inode %d\n", name, ++ yaffs_GetObjectInode(l))); ++ ++ if (filldir(dirent, ++ name, ++ strlen(name), ++ offset, ++ yaffs_GetObjectInode(l), ++ yaffs_GetObjectType(l)) ++ < 0) { + goto up_and_out; + } -+ ++ + offset++; -+ f->f_pos++; ++ f->f_pos++; + } + } + -+ up_and_out: -+ out: -+ -+ yaffs_GrossUnlock(dev); -+ ++ up_and_out: ++ out: ++ ++ yaffs_GrossUnlock(dev); ++ + return 0; +} + -+ +/* + * File creation. Allocate an inode, and we're done.. + */ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) ++static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, ++ dev_t rdev) +#else -+static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, int rdev) ++static int yaffs_mknod(struct inode *dir, struct dentry *dentry, int mode, ++ int rdev) +#endif +{ + struct inode *inode; -+ ++ + yaffs_Object *obj = NULL; + yaffs_Device *dev; -+ ++ + yaffs_Object *parent = yaffs_InodeToObject(dir); -+ ++ + int error = -ENOSPC; + uid_t uid = current->fsuid; + gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; ++ ++ if((dir->i_mode & S_ISGID) && S_ISDIR(mode)) ++ mode |= S_ISGID; + -+ if(parent) -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod: parent object %d type %d\n", -+ parent->objectId,parent->variantType)); -+ } -+ else -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod: could not get parent object\n")); ++ if (parent) { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_mknod: parent object %d type %d\n", ++ parent->objectId, parent->variantType)); ++ } else { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_mknod: could not get parent object\n")); + return -EPERM; + } -+ -+ T(YAFFS_TRACE_OS,("yaffs_mknod: making oject for %s, mode %x dev %x\n", -+ dentry->d_name.name, mode,rdev)); ++ ++ T(YAFFS_TRACE_OS, ("yaffs_mknod: making oject for %s, " ++ "mode %x dev %x\n", ++ dentry->d_name.name, mode, rdev)); + + dev = parent->myDev; -+ ++ + yaffs_GrossLock(dev); + -+ switch (mode & S_IFMT) -+ { -+ default: -+ // Special (socket, fifo, device...) -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod: making special\n")); ++ switch (mode & S_IFMT) { ++ default: ++ /* Special (socket, fifo, device...) */ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG ++ "yaffs_mknod: making special\n")); +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+ obj = yaffs_MknodSpecial(parent,dentry->d_name.name,mode,uid, gid,old_encode_dev(rdev)); ++ obj = ++ yaffs_MknodSpecial(parent, dentry->d_name.name, mode, uid, ++ gid, old_encode_dev(rdev)); +#else -+ obj = yaffs_MknodSpecial(parent,dentry->d_name.name,mode,uid, gid,rdev); -+#endif -+ break; -+ case S_IFREG: // file -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod: making file\n")); -+ obj = yaffs_MknodFile(parent,dentry->d_name.name,mode,uid, gid); -+ break; -+ case S_IFDIR: // directory -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod: making directory\n")); -+ obj = yaffs_MknodDirectory(parent,dentry->d_name.name,mode,uid, gid); -+ break; -+ case S_IFLNK: // symlink -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod: making file\n")); -+ obj = NULL; // Do we ever get here? -+ break; ++ obj = ++ yaffs_MknodSpecial(parent, dentry->d_name.name, mode, uid, ++ gid, rdev); ++#endif ++ break; ++ case S_IFREG: /* file */ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_mknod: making file\n")); ++ obj = ++ yaffs_MknodFile(parent, dentry->d_name.name, mode, uid, ++ gid); ++ break; ++ case S_IFDIR: /* directory */ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_mknod: making directory\n")); ++ obj = ++ yaffs_MknodDirectory(parent, dentry->d_name.name, mode, ++ uid, gid); ++ break; ++ case S_IFLNK: /* symlink */ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_mknod: making file\n")); ++ obj = NULL; /* Do we ever get here? */ ++ break; + } + -+ if(obj) -+ { ++ /* Can not call yaffs_get_inode() with gross lock held */ ++ yaffs_GrossUnlock(dev); ++ ++ if (obj) { + inode = yaffs_get_inode(dir->i_sb, mode, rdev, obj); + d_instantiate(dentry, inode); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod created object %d count = %d\n",obj->objectId,atomic_read(&inode->i_count))); ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_mknod created object %d count = %d\n", ++ obj->objectId, atomic_read(&inode->i_count))); + error = 0; -+ } -+ else -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mknod failed making object\n")); ++ } else { ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_mknod failed making object\n")); + error = -ENOMEM; + } + -+ yaffs_GrossUnlock(dev); -+ + return error; +} + -+static int yaffs_mkdir(struct inode * dir, struct dentry * dentry, int mode) ++static int yaffs_mkdir(struct inode *dir, struct dentry *dentry, int mode) +{ + int retVal; -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_mkdir\n")); -+ retVal = yaffs_mknod(dir, dentry, mode | S_IFDIR, 0); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_mkdir\n")); ++ retVal = yaffs_mknod(dir, dentry, mode | S_IFDIR, 0); +#if 0 -+ // attempt to fix dir bug - didn't work -+ if(!retVal) -+ { ++ /* attempt to fix dir bug - didn't work */ ++ if (!retVal) { + dget(dentry); + } +#endif @@ -1606,143 +2351,135 @@ index 0000000..717f41a +} + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *n) ++static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode, ++ struct nameidata *n) +#else +static int yaffs_create(struct inode *dir, struct dentry *dentry, int mode) +#endif +{ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_create\n")); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_create\n")); + return yaffs_mknod(dir, dentry, mode | S_IFREG, 0); +} + -+ -+static int yaffs_unlink(struct inode * dir, struct dentry *dentry) ++static int yaffs_unlink(struct inode *dir, struct dentry *dentry) +{ + int retVal; -+ ++ + yaffs_Device *dev; -+ -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_unlink %d:%s\n",(int)(dir->i_ino),dentry->d_name.name)); -+ ++ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_unlink %d:%s\n", (int)(dir->i_ino), ++ dentry->d_name.name)); ++ + dev = yaffs_InodeToObject(dir)->myDev; -+ ++ + yaffs_GrossLock(dev); -+ -+ -+ retVal = yaffs_Unlink(yaffs_InodeToObject(dir),dentry->d_name.name); -+ -+ -+ yaffs_GrossUnlock(dev); -+ -+ if( retVal == YAFFS_OK) -+ { ++ ++ retVal = yaffs_Unlink(yaffs_InodeToObject(dir), dentry->d_name.name); ++ ++ if (retVal == YAFFS_OK) { + dentry->d_inode->i_nlink--; ++ dir->i_version++; ++ yaffs_GrossUnlock(dev); + mark_inode_dirty(dentry->d_inode); + return 0; + } -+ else -+ { -+ return -ENOTEMPTY; -+ } ++ yaffs_GrossUnlock(dev); ++ return -ENOTEMPTY; +} + -+ +/* + * Create a link... + */ -+static int yaffs_link(struct dentry *old_dentry, struct inode * dir, struct dentry * dentry) ++static int yaffs_link(struct dentry *old_dentry, struct inode *dir, ++ struct dentry *dentry) +{ + struct inode *inode = old_dentry->d_inode; + yaffs_Object *obj = NULL; -+ yaffs_Object *link=NULL; ++ yaffs_Object *link = NULL; + yaffs_Device *dev; -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_link\n")); -+ ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_link\n")); ++ + obj = yaffs_InodeToObject(inode); + dev = obj->myDev; -+ ++ + yaffs_GrossLock(dev); + -+ if (!S_ISDIR(inode->i_mode)) // Don't link directories ++ if (!S_ISDIR(inode->i_mode)) /* Don't link directories */ + { -+ link = yaffs_Link(yaffs_InodeToObject(dir),dentry->d_name.name,obj); ++ link = ++ yaffs_Link(yaffs_InodeToObject(dir), dentry->d_name.name, ++ obj); + } -+ + -+ if(link) -+ { -+ old_dentry->d_inode->i_nlink = yaffs_GetObjectLinkCount(obj); ++ if (link) { ++ old_dentry->d_inode->i_nlink = yaffs_GetObjectLinkCount(obj); + d_instantiate(dentry, old_dentry->d_inode); + atomic_inc(&old_dentry->d_inode->i_count); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_link link count %d i_count %d\n", -+ old_dentry->d_inode->i_nlink,atomic_read(&old_dentry->d_inode->i_count))); -+ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_link link count %d i_count %d\n", ++ old_dentry->d_inode->i_nlink, ++ atomic_read(&old_dentry->d_inode->i_count))); ++ + } -+ ++ + yaffs_GrossUnlock(dev); -+ + -+ if(link) -+ { -+ ++ if (link) { ++ + return 0; + } -+ -+ -+ return -EPERM; -+} + ++ return -EPERM; ++} + -+static int yaffs_symlink(struct inode * dir, struct dentry *dentry, const char * symname) ++static int yaffs_symlink(struct inode *dir, struct dentry *dentry, ++ const char *symname) +{ + yaffs_Object *obj; + yaffs_Device *dev; + uid_t uid = current->fsuid; + gid_t gid = (dir->i_mode & S_ISGID) ? dir->i_gid : current->fsgid; -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_symlink\n")); -+ ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_symlink\n")); ++ + dev = yaffs_InodeToObject(dir)->myDev; + yaffs_GrossLock(dev); -+ obj = yaffs_MknodSymLink(yaffs_InodeToObject(dir), dentry->d_name.name, -+ S_IFLNK | S_IRWXUGO, uid, gid, -+ symname); ++ obj = yaffs_MknodSymLink(yaffs_InodeToObject(dir), dentry->d_name.name, ++ S_IFLNK | S_IRWXUGO, uid, gid, symname); + yaffs_GrossUnlock(dev); + -+ if(obj) -+ { ++ if (obj) { ++ ++ struct inode *inode; + -+ struct inode* inode; -+ + inode = yaffs_get_inode(dir->i_sb, obj->yst_mode, 0, obj); + d_instantiate(dentry, inode); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"symlink created OK\n")); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "symlink created OK\n")); + return 0; -+ } -+ else -+ { -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"symlink not created\n")); ++ } else { ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "symlink not created\n")); + + } -+ ++ + return -ENOMEM; +} + -+static int yaffs_sync_object(struct file * file, struct dentry *dentry, int datasync) ++static int yaffs_sync_object(struct file *file, struct dentry *dentry, ++ int datasync) +{ + + yaffs_Object *obj; + yaffs_Device *dev; -+ ++ + obj = yaffs_DentryToObject(dentry); + + dev = obj->myDev; -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_sync_object\n")); ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_sync_object\n")); + yaffs_GrossLock(dev); -+ yaffs_FlushFile(obj,1); ++ yaffs_FlushFile(obj, 1); + yaffs_GrossUnlock(dev); + return 0; +} @@ -1752,54 +2489,56 @@ index 0000000..717f41a + * + * NB: POSIX says you can rename an object over an old object of the same name + */ -+static int yaffs_rename(struct inode * old_dir, struct dentry *old_dentry, struct inode * new_dir,struct dentry *new_dentry) ++static int yaffs_rename(struct inode *old_dir, struct dentry *old_dentry, ++ struct inode *new_dir, struct dentry *new_dentry) +{ + yaffs_Device *dev; + int retVal = YAFFS_FAIL; -+ int removed = 0; + yaffs_Object *target; -+ ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_rename\n")); + dev = yaffs_InodeToObject(old_dir)->myDev; + + yaffs_GrossLock(dev); ++ ++ /* Check if the target is an existing directory that is not empty. */ ++ target = ++ yaffs_FindObjectByName(yaffs_InodeToObject(new_dir), ++ new_dentry->d_name.name); + -+ // Check if the target is an existing directory that is not empty. -+ target = yaffs_FindObjectByName(yaffs_InodeToObject(new_dir),new_dentry->d_name.name); + -+ if(target && -+ target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY && -+ !list_empty(&target->variant.directoryVariant.children)) -+ { ++ ++ if (target && ++ target->variantType == YAFFS_OBJECT_TYPE_DIRECTORY && ++ !list_empty(&target->variant.directoryVariant.children)) { ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "target is non-empty dir\n")); ++ + retVal = YAFFS_FAIL; -+ } -+ else -+ { -+ -+ // Unlink the target if it exists -+ removed = yaffs_Unlink(yaffs_InodeToObject(new_dir),new_dentry->d_name.name); ++ } else { ++ ++ /* Now does unlinking internally using shadowing mechanism */ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "calling yaffs_RenameObject\n")); ++ ++ retVal = ++ yaffs_RenameObject(yaffs_InodeToObject(old_dir), ++ old_dentry->d_name.name, ++ yaffs_InodeToObject(new_dir), ++ new_dentry->d_name.name); + -+ -+ retVal = yaffs_RenameObject(yaffs_InodeToObject(old_dir),old_dentry->d_name.name, -+ yaffs_InodeToObject(new_dir),new_dentry->d_name.name); -+ + } + yaffs_GrossUnlock(dev); -+ -+ if(retVal == YAFFS_OK) -+ { -+ if(removed == YAFFS_OK) -+ { ++ ++ if (retVal == YAFFS_OK) { ++ if(target) { + new_dentry->d_inode->i_nlink--; + mark_inode_dirty(new_dentry->d_inode); + } -+ ++ + return 0; -+ } -+ else -+ { ++ } else { + return -ENOTEMPTY; + } -+ + +} + @@ -1808,84 +2547,147 @@ index 0000000..717f41a + struct inode *inode = dentry->d_inode; + int error; + yaffs_Device *dev; -+ -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_setattr of object %d\n",yaffs_InodeToObject(inode)->objectId)); -+ -+ if((error = inode_change_ok(inode,attr)) == 0) -+ { -+ ++ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_setattr of object %d\n", ++ yaffs_InodeToObject(inode)->objectId)); ++ ++ if ((error = inode_change_ok(inode, attr)) == 0) { ++ + dev = yaffs_InodeToObject(inode)->myDev; + yaffs_GrossLock(dev); -+ if(yaffs_SetAttributes(yaffs_InodeToObject(inode),attr) == YAFFS_OK) -+ { ++ if (yaffs_SetAttributes(yaffs_InodeToObject(inode), attr) == ++ YAFFS_OK) { + error = 0; -+ } -+ else -+ { ++ } else { + error = -EPERM; + } + yaffs_GrossUnlock(dev); + if (!error) -+ error = inode_setattr(inode,attr); ++ error = inode_setattr(inode, attr); + } + return error; +} + -+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_statfs(struct dentry *dentry, struct kstatfs *buf) ++{ ++ yaffs_Device *dev = yaffs_DentryToObject(dentry)->myDev; ++ struct super_block *sb = dentry->d_sb; ++#elif (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) +static int yaffs_statfs(struct super_block *sb, struct kstatfs *buf) ++{ ++ yaffs_Device *dev = yaffs_SuperToDevice(sb); +#else +static int yaffs_statfs(struct super_block *sb, struct statfs *buf) -+#endif +{ -+ -+ + yaffs_Device *dev = yaffs_SuperToDevice(sb); -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_statfs\n")); ++#endif ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_statfs\n")); + + yaffs_GrossLock(dev); -+ -+ ++ + buf->f_type = YAFFS_MAGIC; + buf->f_bsize = sb->s_blocksize; + buf->f_namelen = 255; -+ if(sb->s_blocksize > dev->nBytesPerChunk) -+ { -+ -+ buf->f_blocks = (dev->endBlock - dev->startBlock + 1) * dev->nChunksPerBlock/ -+ (sb->s_blocksize/dev->nBytesPerChunk); -+ buf->f_bfree = yaffs_GetNumberOfFreeChunks(dev)/ -+ (sb->s_blocksize/dev->nBytesPerChunk); -+ } -+ else -+ { -+ -+ buf->f_blocks = (dev->endBlock - dev->startBlock + 1) * dev->nChunksPerBlock * -+ (dev->nBytesPerChunk/sb->s_blocksize); -+ buf->f_bfree = yaffs_GetNumberOfFreeChunks(dev) * -+ (dev->nBytesPerChunk/sb->s_blocksize); ++ if (sb->s_blocksize > dev->nDataBytesPerChunk) { ++ ++ buf->f_blocks = ++ (dev->endBlock - dev->startBlock + ++ 1) * dev->nChunksPerBlock / (sb->s_blocksize / ++ dev->nDataBytesPerChunk); ++ buf->f_bfree = ++ yaffs_GetNumberOfFreeChunks(dev) / (sb->s_blocksize / ++ dev->nDataBytesPerChunk); ++ } else { ++ ++ buf->f_blocks = ++ (dev->endBlock - dev->startBlock + ++ 1) * dev->nChunksPerBlock * (dev->nDataBytesPerChunk / ++ sb->s_blocksize); ++ buf->f_bfree = ++ yaffs_GetNumberOfFreeChunks(dev) * (dev->nDataBytesPerChunk / ++ sb->s_blocksize); + } + buf->f_files = 0; + buf->f_ffree = 0; -+ buf->f_bavail = buf->f_bfree; -+ ++ buf->f_bavail = buf->f_bfree; ++ + yaffs_GrossUnlock(dev); + return 0; +} + -+static void yaffs_read_inode (struct inode *inode) ++ ++ ++static int yaffs_do_sync_fs(struct super_block *sb) +{ -+ // NB This is called as a side effect of other functions and -+ // thus gross locking should always be in place already. ++ ++ yaffs_Device *dev = yaffs_SuperToDevice(sb); ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_do_sync_fs\n")); ++ ++ if(sb->s_dirt) { ++ yaffs_GrossLock(dev); ++ ++ if(dev) ++ yaffs_CheckpointSave(dev); ++ ++ yaffs_GrossUnlock(dev); ++ ++ sb->s_dirt = 0; ++ } ++ return 0; ++} ++ ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static void yaffs_write_super(struct super_block *sb) ++#else ++static int yaffs_write_super(struct super_block *sb) ++#endif ++{ ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_write_super\n")); ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) ++ return 0; /* yaffs_do_sync_fs(sb);*/ ++#endif ++} ++ ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_sync_fs(struct super_block *sb, int wait) ++#else ++static int yaffs_sync_fs(struct super_block *sb) ++#endif ++{ ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_sync_fs\n")); + -+ yaffs_Object *obj ; -+ yaffs_Device *dev = yaffs_SuperToDevice(inode->i_sb); ++ return 0; /* yaffs_do_sync_fs(sb);*/ + -+ T(YAFFS_TRACE_OS,(KERN_DEBUG"yaffs_read_inode for %d\n",(int)inode->i_ino)); ++} ++ + -+ obj = yaffs_FindObjectByNumber(dev,inode->i_ino); ++static void yaffs_read_inode(struct inode *inode) ++{ ++ /* NB This is called as a side effect of other functions, but ++ * we had to release the lock to prevent deadlocks, so ++ * need to lock again. ++ */ ++ ++ yaffs_Object *obj; ++ yaffs_Device *dev = yaffs_SuperToDevice(inode->i_sb); ++ ++ T(YAFFS_TRACE_OS, ++ (KERN_DEBUG "yaffs_read_inode for %d\n", (int)inode->i_ino)); ++ ++ yaffs_GrossLock(dev); + -+ yaffs_FillInodeFromObject(inode,obj); ++ obj = yaffs_FindObjectByNumber(dev, inode->i_ino); ++ ++ yaffs_FillInodeFromObject(inode, obj); + ++ yaffs_GrossUnlock(dev); +} + +static LIST_HEAD(yaffs_dev_list); @@ -1893,250 +2695,328 @@ index 0000000..717f41a +static void yaffs_put_super(struct super_block *sb) +{ + yaffs_Device *dev = yaffs_SuperToDevice(sb); -+ ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_put_super\n")); ++ + yaffs_GrossLock(dev); -+ if(dev->putSuperFunc) -+ { -+ dev->putSuperFunc(sb); ++ ++ yaffs_FlushEntireDeviceCache(dev); ++ ++ if (dev->putSuperFunc) { ++ dev->putSuperFunc(sb); + } ++ ++ yaffs_CheckpointSave(dev); + yaffs_Deinitialise(dev); ++ + yaffs_GrossUnlock(dev); + + /* we assume this is protected by lock_kernel() in mount/umount */ + list_del(&dev->devList); ++ ++ if(dev->spareBuffer){ ++ YFREE(dev->spareBuffer); ++ dev->spareBuffer = NULL; ++ } + + kfree(dev); +} + + -+#ifdef CONFIG_YAFFS_YAFFS1 -+ -+static void yaffs_MTDPutSuper(struct super_block *sb) ++static void yaffs_MTDPutSuper(struct super_block *sb) +{ -+ ++ + struct mtd_info *mtd = yaffs_SuperToDevice(sb)->genericDevice; -+ -+ if(mtd->sync) -+ { ++ ++ if (mtd->sync) { + mtd->sync(mtd); + } -+ ++ + put_mtd_device(mtd); +} + -+#endif + ++static void yaffs_MarkSuperBlockDirty(void *vsb) ++{ ++ struct super_block *sb = (struct super_block *)vsb; ++ ++ T(YAFFS_TRACE_OS, (KERN_DEBUG "yaffs_MarkSuperBlockDirty() sb = %p\n",sb)); ++// if(sb) ++// sb->s_dirt = 1; ++} + -+static struct super_block *yaffs_internal_read_super(int yaffsVersion, struct super_block * sb, void * data, int silent) ++static struct super_block *yaffs_internal_read_super(int yaffsVersion, ++ struct super_block *sb, ++ void *data, int silent) +{ + int nBlocks; -+ struct inode * inode = NULL; -+ struct dentry * root; ++ struct inode *inode = NULL; ++ struct dentry *root; + yaffs_Device *dev = 0; -+ char devname_buf[BDEVNAME_SIZE+1]; ++ char devname_buf[BDEVNAME_SIZE + 1]; + struct mtd_info *mtd; + int err; -+ ++ + sb->s_magic = YAFFS_MAGIC; + sb->s_op = &yaffs_super_ops; -+ -+ if(!sb) -+ printk(KERN_INFO"yaffs: sb is NULL\n"); -+ else if(!sb->s_dev) -+ printk(KERN_INFO"yaffs: sb->s_dev is NULL\n"); -+ else if(!yaffs_devname(sb, devname_buf)) -+ printk(KERN_INFO"yaffs: devname is NULL\n"); -+ else -+ printk(KERN_INFO"yaffs: dev is %d name is \"%s\"\n", sb->s_dev, yaffs_devname(sb, devname_buf)); + -+ ++ if (!sb) ++ printk(KERN_INFO "yaffs: sb is NULL\n"); ++ else if (!sb->s_dev) ++ printk(KERN_INFO "yaffs: sb->s_dev is NULL\n"); ++ else if (!yaffs_devname(sb, devname_buf)) ++ printk(KERN_INFO "yaffs: devname is NULL\n"); ++ else ++ printk(KERN_INFO "yaffs: dev is %d name is \"%s\"\n", ++ sb->s_dev, ++ yaffs_devname(sb, devname_buf)); + + sb->s_blocksize = PAGE_CACHE_SIZE; + sb->s_blocksize_bits = PAGE_CACHE_SHIFT; -+ T(YAFFS_TRACE_OS,("yaffs_read_super: Using yaffs%d\n",yaffsVersion)); -+ T(YAFFS_TRACE_OS,("yaffs_read_super: block size %d\n", (int)(sb->s_blocksize))); ++ T(YAFFS_TRACE_OS, ("yaffs_read_super: Using yaffs%d\n", yaffsVersion)); ++ T(YAFFS_TRACE_OS, ++ ("yaffs_read_super: block size %d\n", (int)(sb->s_blocksize))); + +#ifdef CONFIG_YAFFS_DISABLE_WRITE_VERIFY -+ T(YAFFS_TRACE_OS,("yaffs: Write verification disabled. All guarantees null and void\n")); ++ T(YAFFS_TRACE_OS, ++ ("yaffs: Write verification disabled. All guarantees " ++ "null and void\n")); +#endif + ++ T(YAFFS_TRACE_ALWAYS, ("yaffs: Attempting MTD mount on %u.%u, " ++ "\"%s\"\n", ++ MAJOR(sb->s_dev), MINOR(sb->s_dev), ++ yaffs_devname(sb, devname_buf))); + -+ T(YAFFS_TRACE_ALWAYS,("yaffs: Attempting MTD mount on %u.%u, \"%s\"\n", -+ MAJOR(sb->s_dev),MINOR(sb->s_dev), yaffs_devname(sb, devname_buf))); -+ -+ // Check it's an mtd device..... -+ if(MAJOR(sb->s_dev) != MTD_BLOCK_MAJOR) -+ { -+ return NULL; // This isn't an mtd device -+ } -+ -+ // Get the device ++ /* Check it's an mtd device..... */ ++ if (MAJOR(sb->s_dev) != MTD_BLOCK_MAJOR) { ++ return NULL; /* This isn't an mtd device */ ++ } ++ /* Get the device */ + mtd = get_mtd_device(NULL, MINOR(sb->s_dev)); -+ if (!mtd) -+ { -+ T(YAFFS_TRACE_ALWAYS,("yaffs: MTD device #%u doesn't appear to exist\n", MINOR(sb->s_dev))); ++ if (!mtd) { ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs: MTD device #%u doesn't appear to exist\n", ++ MINOR(sb->s_dev))); + return NULL; + } -+ -+ // Check it's NAND -+ if(mtd->type != MTD_NANDFLASH) -+ { -+ T(YAFFS_TRACE_ALWAYS,("yaffs: MTD device is not NAND it's type %d\n", mtd->type)); ++ /* Check it's NAND */ ++ if (mtd->type != MTD_NANDFLASH) { ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs: MTD device is not NAND it's type %d\n", mtd->type)); + return NULL; + } + -+ T(YAFFS_TRACE_OS,(" erase %p\n",mtd->erase)); -+ T(YAFFS_TRACE_OS,(" read %p\n",mtd->read)); -+ T(YAFFS_TRACE_OS,(" write %p\n",mtd->write)); -+ T(YAFFS_TRACE_OS,(" readoob %p\n",mtd->read_oob)); -+ T(YAFFS_TRACE_OS,(" writeoob %p\n",mtd->write_oob)); -+// T(YAFFS_TRACE_OS,(" block_isbad %p\n",mtd->block_isbad)); -+// T(YAFFS_TRACE_OS,(" block_markbad %p\n",mtd->block_markbad)); -+ T(YAFFS_TRACE_OS,(" oobblock %d\n",mtd->oobblock)); -+ T(YAFFS_TRACE_OS,(" oobsize %d\n",mtd->oobsize)); -+ T(YAFFS_TRACE_OS,(" erasesize %d\n",mtd->erasesize)); -+ T(YAFFS_TRACE_OS,(" size %d\n",mtd->size)); ++ T(YAFFS_TRACE_OS, (" erase %p\n", mtd->erase)); ++ T(YAFFS_TRACE_OS, (" read %p\n", mtd->read)); ++ T(YAFFS_TRACE_OS, (" write %p\n", mtd->write)); ++ T(YAFFS_TRACE_OS, (" readoob %p\n", mtd->read_oob)); ++ T(YAFFS_TRACE_OS, (" writeoob %p\n", mtd->write_oob)); ++ T(YAFFS_TRACE_OS, (" block_isbad %p\n", mtd->block_isbad)); ++ T(YAFFS_TRACE_OS, (" block_markbad %p\n", mtd->block_markbad)); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ T(YAFFS_TRACE_OS, (" writesize %d\n", mtd->writesize)); ++#else ++ T(YAFFS_TRACE_OS, (" oobblock %d\n", mtd->oobblock)); ++#endif ++ T(YAFFS_TRACE_OS, (" oobsize %d\n", mtd->oobsize)); ++ T(YAFFS_TRACE_OS, (" erasesize %d\n", mtd->erasesize)); ++ T(YAFFS_TRACE_OS, (" size %d\n", mtd->size)); ++ ++#ifdef CONFIG_YAFFS_AUTO_YAFFS2 + -+ if(yaffsVersion == 2) -+ { -+ // Check for version 2 style functions -+ if(!mtd->erase || -+// !mtd->block_isbad || -+// !mtd->block_markbad || -+ !mtd->read || -+ !mtd->write || -+ !mtd->write_ecc || -+ !mtd->read_ecc || -+ !mtd->read_oob || -+ !mtd->write_oob ) -+ { -+ T(YAFFS_TRACE_ALWAYS,("yaffs: MTD device does not support required functions\n"));; ++ if (yaffsVersion == 1 && ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ mtd->writesize >= 2048) { ++#else ++ mtd->oobblock >= 2048) { ++#endif ++ T(YAFFS_TRACE_ALWAYS,("yaffs: auto selecting yaffs2\n")); ++ yaffsVersion = 2; ++ } ++ ++ /* Added NCB 26/5/2006 for completeness */ ++ if (yaffsVersion == 2 && ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ mtd->writesize == 512) { ++#else ++ mtd->oobblock == 512) { ++#endif ++ T(YAFFS_TRACE_ALWAYS,("yaffs: auto selecting yaffs1\n")); ++ yaffsVersion = 1; ++ } ++ ++#endif ++ ++ if (yaffsVersion == 2) { ++ /* Check for version 2 style functions */ ++ if (!mtd->erase || ++ !mtd->block_isbad || ++ !mtd->block_markbad || ++ !mtd->read || ++ !mtd->write || ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ !mtd->read_oob || !mtd->write_oob) { ++#else ++ !mtd->write_ecc || ++ !mtd->read_ecc || !mtd->read_oob || !mtd->write_oob) { ++#endif ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs: MTD device does not support required " ++ "functions\n"));; + return NULL; + } -+ -+ if(mtd->oobblock < YAFFS_MIN_YAFFS2_CHUNK_SIZE || -+ mtd->oobsize < YAFFS_MIN_YAFFS2_SPARE_SIZE) -+ { -+ T(YAFFS_TRACE_ALWAYS,("yaffs: MTD device does not support have the right page sizes\n")); ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ if (mtd->writesize < YAFFS_MIN_YAFFS2_CHUNK_SIZE || ++#else ++ if (mtd->oobblock < YAFFS_MIN_YAFFS2_CHUNK_SIZE || ++#endif ++ mtd->oobsize < YAFFS_MIN_YAFFS2_SPARE_SIZE) { ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs: MTD device does not have the " ++ "right page sizes\n")); + return NULL; -+ } } -+ else -+ { -+ // Check for V1 style functions -+ if(!mtd->erase || -+ !mtd->read || -+ !mtd->write || -+ !mtd->write_ecc || -+ !mtd->read_ecc || -+ !mtd->read_oob || -+ !mtd->write_oob ) -+ { -+ T(YAFFS_TRACE_ALWAYS,("yaffs: MTD device does not support required functions\n"));; ++ } ++ } else { ++ /* Check for V1 style functions */ ++ if (!mtd->erase || ++ !mtd->read || ++ !mtd->write || ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ !mtd->read_oob || !mtd->write_oob) { ++#else ++ !mtd->write_ecc || ++ !mtd->read_ecc || !mtd->read_oob || !mtd->write_oob) { ++#endif ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs: MTD device does not support required " ++ "functions\n"));; + return NULL; + } -+ -+ if(mtd->oobblock != YAFFS_BYTES_PER_CHUNK || -+ mtd->oobsize != YAFFS_BYTES_PER_SPARE) -+ { -+ T(YAFFS_TRACE_ALWAYS,("yaffs: MTD device does not support have the right page sizes\n")); ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ if (mtd->writesize < YAFFS_BYTES_PER_CHUNK || ++#else ++ if (mtd->oobblock < YAFFS_BYTES_PER_CHUNK || ++#endif ++ mtd->oobsize != YAFFS_BYTES_PER_SPARE) { ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs: MTD device does not support have the " ++ "right page sizes\n")); + return NULL; + } + } -+ + -+ // OK, so if we got here, we have an MTD that's NAND and looks -+ // like it has the right capabilities -+ // Set the yaffs_Device up for mtd ++ /* OK, so if we got here, we have an MTD that's NAND and looks ++ * like it has the right capabilities ++ * Set the yaffs_Device up for mtd ++ */ + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+ sb->s_fs_info = dev = kmalloc(sizeof(yaffs_Device),GFP_KERNEL); ++ sb->s_fs_info = dev = kmalloc(sizeof(yaffs_Device), GFP_KERNEL); +#else -+ sb->u.generic_sbp = dev = kmalloc(sizeof(yaffs_Device),GFP_KERNEL); ++ sb->u.generic_sbp = dev = kmalloc(sizeof(yaffs_Device), GFP_KERNEL); +#endif -+ if(!dev) -+ { -+ // Deep shit could not allocate device structure -+ T(YAFFS_TRACE_ALWAYS,("yaffs_read_super: Failed trying to allocate yaffs_Device. \n")); ++ if (!dev) { ++ /* Deep shit could not allocate device structure */ ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs_read_super: Failed trying to allocate " ++ "yaffs_Device. \n")); + return NULL; + } + -+ memset(dev,0,sizeof(yaffs_Device)); -+ dev->genericDevice = mtd; ++ memset(dev, 0, sizeof(yaffs_Device)); ++ dev->genericDevice = mtd; + dev->name = mtd->name; + -+ // Set up the memory size parameters.... -+ ++ /* Set up the memory size parameters.... */ ++ + nBlocks = mtd->size / (YAFFS_CHUNKS_PER_BLOCK * YAFFS_BYTES_PER_CHUNK); + dev->startBlock = 0; + dev->endBlock = nBlocks - 1; + dev->nChunksPerBlock = YAFFS_CHUNKS_PER_BLOCK; -+ dev->nBytesPerChunk = YAFFS_BYTES_PER_CHUNK; ++ dev->nDataBytesPerChunk = YAFFS_BYTES_PER_CHUNK; + dev->nReservedBlocks = 5; -+ dev->nShortOpCaches = 10; // Enable short op caching -+ -+ -+ // ... and the functions. -+ if(yaffsVersion == 2) -+ { -+ dev->writeChunkWithTagsToNAND = nandmtd2_WriteChunkWithTagsToNAND; -+ dev->readChunkWithTagsFromNAND = nandmtd2_ReadChunkWithTagsFromNAND; ++ dev->nShortOpCaches = 10; /* Enable short op caching */ ++ ++ /* ... and the functions. */ ++ if (yaffsVersion == 2) { ++ dev->writeChunkWithTagsToNAND = ++ nandmtd2_WriteChunkWithTagsToNAND; ++ dev->readChunkWithTagsFromNAND = ++ nandmtd2_ReadChunkWithTagsFromNAND; + dev->markNANDBlockBad = nandmtd2_MarkNANDBlockBad; + dev->queryNANDBlock = nandmtd2_QueryNANDBlock; + dev->spareBuffer = YMALLOC(mtd->oobsize); + dev->isYaffs2 = 1; -+ dev->nBytesPerChunk = mtd->oobblock; ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ dev->nDataBytesPerChunk = mtd->writesize; ++ dev->nChunksPerBlock = mtd->erasesize / mtd->writesize; ++#else ++ dev->nDataBytesPerChunk = mtd->oobblock; + dev->nChunksPerBlock = mtd->erasesize / mtd->oobblock; ++#endif + nBlocks = mtd->size / mtd->erasesize; ++ ++ dev->nCheckpointReservedBlocks = 0; + dev->startBlock = 0; + dev->endBlock = nBlocks - 1; -+ } -+ else -+ { ++ } else { + dev->writeChunkToNAND = nandmtd_WriteChunkToNAND; + dev->readChunkFromNAND = nandmtd_ReadChunkFromNAND; + dev->isYaffs2 = 0; + } -+ // ... and common functions ++ /* ... and common functions */ + dev->eraseBlockInNAND = nandmtd_EraseBlockInNAND; + dev->initialiseNAND = nandmtd_InitialiseNAND; -+ ++ + dev->putSuperFunc = yaffs_MTDPutSuper; + ++ dev->superBlock = (void *)sb; ++ dev->markSuperBlockDirty = yaffs_MarkSuperBlockDirty; ++ ++ +#ifndef CONFIG_YAFFS_DOES_ECC + dev->useNANDECC = 1; +#endif + ++#ifdef CONFIG_YAFFS_DISABLE_WIDE_TNODES ++ dev->wideTnodesDisabled = 1; ++#endif ++ + /* we assume this is protected by lock_kernel() in mount/umount */ + list_add_tail(&dev->devList, &yaffs_dev_list); + + init_MUTEX(&dev->grossLock); -+ -+ -+ yaffs_GrossLock(dev); -+ -+ err = yaffs_GutsInitialise(dev); + -+ T(YAFFS_TRACE_OS,("yaffs_read_super: guts initialised %s\n", (err == YAFFS_OK) ? "OK" : "FAILED")); ++ yaffs_GrossLock(dev); + -+ // Create root inode -+ if(err == YAFFS_OK) -+ inode = yaffs_get_inode(sb, S_IFDIR | 0755, 0,yaffs_Root(dev)); ++ err = yaffs_GutsInitialise(dev); + ++ T(YAFFS_TRACE_OS, ++ ("yaffs_read_super: guts initialised %s\n", ++ (err == YAFFS_OK) ? "OK" : "FAILED")); ++ ++ /* Release lock before yaffs_get_inode() */ + yaffs_GrossUnlock(dev); + ++ /* Create root inode */ ++ if (err == YAFFS_OK) ++ inode = yaffs_get_inode(sb, S_IFDIR | 0755, 0, ++ yaffs_Root(dev)); ++ + if (!inode) + return NULL; -+ -+// added NCB -+ inode->i_op = & yaffs_dir_inode_operations; -+ inode->i_fop = & yaffs_dir_operations; + -+ T(YAFFS_TRACE_OS,("yaffs_read_super: got root inode\n")); -+ ++ inode->i_op = &yaffs_dir_inode_operations; ++ inode->i_fop = &yaffs_dir_operations; ++ ++ T(YAFFS_TRACE_OS, ("yaffs_read_super: got root inode\n")); + + root = d_alloc_root(inode); + -+ T(YAFFS_TRACE_OS,("yaffs_read_super: d_alloc_root done\n")); ++ T(YAFFS_TRACE_OS, ("yaffs_read_super: d_alloc_root done\n")); + + if (!root) { + iput(inode); @@ -2144,123 +3024,148 @@ index 0000000..717f41a + } + sb->s_root = root; + -+ T(YAFFS_TRACE_OS,("yaffs_read_super: done\n")); ++ T(YAFFS_TRACE_OS, ("yaffs_read_super: done\n")); + return sb; +} + + -+ -+#ifdef CONFIG_YAFFS_YAFFS1 -+ +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+static int yaffs_internal_read_super_mtd(struct super_block * sb, void * data, int silent) ++static int yaffs_internal_read_super_mtd(struct super_block *sb, void *data, ++ int silent) +{ -+ return yaffs_internal_read_super(1,sb,data,silent) ? 0 : -1; ++ return yaffs_internal_read_super(1, sb, data, silent) ? 0 : -EINVAL; +} + -+static struct super_block *yaffs_read_super(struct file_system_type * fs, int flags, const char *dev_name, void *data) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs_read_super(struct file_system_type *fs, ++ int flags, const char *dev_name, ++ void *data, struct vfsmount *mnt) ++{ ++ ++ return get_sb_bdev(fs, flags, dev_name, data, ++ yaffs_internal_read_super_mtd, mnt); ++} ++#else ++static struct super_block *yaffs_read_super(struct file_system_type *fs, ++ int flags, const char *dev_name, ++ void *data) +{ + -+ return get_sb_bdev(fs, flags, dev_name, data, yaffs_internal_read_super_mtd); ++ return get_sb_bdev(fs, flags, dev_name, data, ++ yaffs_internal_read_super_mtd); +} ++#endif + +static struct file_system_type yaffs_fs_type = { -+ .owner = THIS_MODULE, -+ .name = "yaffs", -+ .get_sb = yaffs_read_super, -+ .kill_sb = kill_block_super, -+ .fs_flags = FS_REQUIRES_DEV, ++ .owner = THIS_MODULE, ++ .name = "yaffs", ++ .get_sb = yaffs_read_super, ++ .kill_sb = kill_block_super, ++ .fs_flags = FS_REQUIRES_DEV, +}; +#else -+static struct super_block *yaffs_read_super(struct super_block * sb, void * data, int silent) ++static struct super_block *yaffs_read_super(struct super_block *sb, void *data, ++ int silent) +{ -+ return yaffs_internal_read_super(1,sb,data,silent); ++ return yaffs_internal_read_super(1, sb, data, silent); +} + -+static DECLARE_FSTYPE(yaffs_fs_type, "yaffs", yaffs_read_super, FS_REQUIRES_DEV); ++static DECLARE_FSTYPE(yaffs_fs_type, "yaffs", yaffs_read_super, ++ FS_REQUIRES_DEV); +#endif + -+#endif // CONFIG_YAFFS_YAFFS1 + +#ifdef CONFIG_YAFFS_YAFFS2 + +#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)) -+static int yaffs2_internal_read_super_mtd(struct super_block * sb, void * data, int silent) ++static int yaffs2_internal_read_super_mtd(struct super_block *sb, void *data, ++ int silent) +{ -+ return yaffs_internal_read_super(2,sb,data,silent) ? 0 : -1; ++ return yaffs_internal_read_super(2, sb, data, silent) ? 0 : -EINVAL; +} + -+static struct super_block *yaffs2_read_super(struct file_system_type * fs, int flags, const char *dev_name, void *data) ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static int yaffs2_read_super(struct file_system_type *fs, ++ int flags, const char *dev_name, void *data, ++ struct vfsmount *mnt) ++{ ++ return get_sb_bdev(fs, flags, dev_name, data, ++ yaffs2_internal_read_super_mtd, mnt); ++} ++#else ++static struct super_block *yaffs2_read_super(struct file_system_type *fs, ++ int flags, const char *dev_name, ++ void *data) +{ + -+ return get_sb_bdev(fs, flags, dev_name, data, yaffs2_internal_read_super_mtd); ++ return get_sb_bdev(fs, flags, dev_name, data, ++ yaffs2_internal_read_super_mtd); +} ++#endif + +static struct file_system_type yaffs2_fs_type = { -+ .owner = THIS_MODULE, -+ .name = "yaffs2", -+ .get_sb = yaffs2_read_super, -+ .kill_sb = kill_block_super, -+ .fs_flags = FS_REQUIRES_DEV, ++ .owner = THIS_MODULE, ++ .name = "yaffs2", ++ .get_sb = yaffs2_read_super, ++ .kill_sb = kill_block_super, ++ .fs_flags = FS_REQUIRES_DEV, +}; +#else -+static struct super_block *yaffs2_read_super(struct super_block * sb, void * data, int silent) ++static struct super_block *yaffs2_read_super(struct super_block *sb, ++ void *data, int silent) +{ -+ return yaffs_internal_read_super(2,sb,data,silent); ++ return yaffs_internal_read_super(2, sb, data, silent); +} + -+static DECLARE_FSTYPE(yaffs2_fs_type, "yaffs2", yaffs2_read_super, FS_REQUIRES_DEV); ++static DECLARE_FSTYPE(yaffs2_fs_type, "yaffs2", yaffs2_read_super, ++ FS_REQUIRES_DEV); +#endif + -+#endif // CONFIG_YAFFS_YAFFS2 -+ -+ -+ ++#endif /* CONFIG_YAFFS_YAFFS2 */ + +static struct proc_dir_entry *my_proc_entry; + -+static char * yaffs_dump_dev(char *buf,yaffs_Device *dev) -+{ -+ buf +=sprintf(buf,"startBlock......... %d\n",dev->startBlock); -+ buf +=sprintf(buf,"endBlock........... %d\n",dev->endBlock); -+ buf +=sprintf(buf,"chunkGroupBits..... %d\n",dev->chunkGroupBits); -+ buf +=sprintf(buf,"chunkGroupSize..... %d\n",dev->chunkGroupSize); -+ buf +=sprintf(buf,"nErasedBlocks...... %d\n",dev->nErasedBlocks); -+ buf +=sprintf(buf,"nTnodesCreated..... %d\n",dev->nTnodesCreated); -+ buf +=sprintf(buf,"nFreeTnodes........ %d\n",dev->nFreeTnodes); -+ buf +=sprintf(buf,"nObjectsCreated.... %d\n",dev->nObjectsCreated); -+ buf +=sprintf(buf,"nFreeObjects....... %d\n",dev->nFreeObjects); -+ buf +=sprintf(buf,"nFreeChunks........ %d\n",dev->nFreeChunks); -+ buf +=sprintf(buf,"nPageWrites........ %d\n",dev->nPageWrites); -+ buf +=sprintf(buf,"nPageReads......... %d\n",dev->nPageReads); -+ buf +=sprintf(buf,"nBlockErasures..... %d\n",dev->nBlockErasures); -+ buf +=sprintf(buf,"nGCCopies.......... %d\n",dev->nGCCopies); -+ buf +=sprintf(buf,"garbageCollections. %d\n",dev->garbageCollections); -+ buf +=sprintf(buf,"passiveGCs......... %d\n",dev->passiveGarbageCollections); -+ buf +=sprintf(buf,"nRetriedWrites..... %d\n",dev->nRetriedWrites); -+ buf +=sprintf(buf,"nRetireBlocks...... %d\n",dev->nRetiredBlocks); -+ buf +=sprintf(buf,"eccFixed........... %d\n",dev->eccFixed); -+ buf +=sprintf(buf,"eccUnfixed......... %d\n",dev->eccUnfixed); -+ buf +=sprintf(buf,"tagsEccFixed....... %d\n",dev->tagsEccFixed); -+ buf +=sprintf(buf,"tagsEccUnfixed..... %d\n",dev->tagsEccUnfixed); -+ buf +=sprintf(buf,"cacheHits.......... %d\n",dev->cacheHits); -+ buf +=sprintf(buf,"nDeletedFiles...... %d\n",dev->nDeletedFiles); -+ buf +=sprintf(buf,"nUnlinkedFiles..... %d\n",dev->nUnlinkedFiles); -+ buf +=sprintf(buf,"nBackgroudDeletions %d\n",dev->nBackgroundDeletions); -+ buf +=sprintf(buf,"useNANDECC......... %d\n",dev->useNANDECC); -+ buf +=sprintf(buf,"isYaffs2........... %d\n",dev->isYaffs2); -+ -+ return buf; -+} -+ -+static int yaffs_proc_read( -+ char *page, -+ char **start, -+ off_t offset, -+ int count, -+ int *eof, -+ void *data -+ ) ++static char *yaffs_dump_dev(char *buf, yaffs_Device * dev) ++{ ++ buf += sprintf(buf, "startBlock......... %d\n", dev->startBlock); ++ buf += sprintf(buf, "endBlock........... %d\n", dev->endBlock); ++ buf += sprintf(buf, "chunkGroupBits..... %d\n", dev->chunkGroupBits); ++ buf += sprintf(buf, "chunkGroupSize..... %d\n", dev->chunkGroupSize); ++ buf += sprintf(buf, "nErasedBlocks...... %d\n", dev->nErasedBlocks); ++ buf += sprintf(buf, "nTnodesCreated..... %d\n", dev->nTnodesCreated); ++ buf += sprintf(buf, "nFreeTnodes........ %d\n", dev->nFreeTnodes); ++ buf += sprintf(buf, "nObjectsCreated.... %d\n", dev->nObjectsCreated); ++ buf += sprintf(buf, "nFreeObjects....... %d\n", dev->nFreeObjects); ++ buf += sprintf(buf, "nFreeChunks........ %d\n", dev->nFreeChunks); ++ buf += sprintf(buf, "nPageWrites........ %d\n", dev->nPageWrites); ++ buf += sprintf(buf, "nPageReads......... %d\n", dev->nPageReads); ++ buf += sprintf(buf, "nBlockErasures..... %d\n", dev->nBlockErasures); ++ buf += sprintf(buf, "nGCCopies.......... %d\n", dev->nGCCopies); ++ buf += ++ sprintf(buf, "garbageCollections. %d\n", dev->garbageCollections); ++ buf += ++ sprintf(buf, "passiveGCs......... %d\n", ++ dev->passiveGarbageCollections); ++ buf += sprintf(buf, "nRetriedWrites..... %d\n", dev->nRetriedWrites); ++ buf += sprintf(buf, "nRetireBlocks...... %d\n", dev->nRetiredBlocks); ++ buf += sprintf(buf, "eccFixed........... %d\n", dev->eccFixed); ++ buf += sprintf(buf, "eccUnfixed......... %d\n", dev->eccUnfixed); ++ buf += sprintf(buf, "tagsEccFixed....... %d\n", dev->tagsEccFixed); ++ buf += sprintf(buf, "tagsEccUnfixed..... %d\n", dev->tagsEccUnfixed); ++ buf += sprintf(buf, "cacheHits.......... %d\n", dev->cacheHits); ++ buf += sprintf(buf, "nDeletedFiles...... %d\n", dev->nDeletedFiles); ++ buf += sprintf(buf, "nUnlinkedFiles..... %d\n", dev->nUnlinkedFiles); ++ buf += ++ sprintf(buf, "nBackgroudDeletions %d\n", dev->nBackgroundDeletions); ++ buf += sprintf(buf, "useNANDECC......... %d\n", dev->useNANDECC); ++ buf += sprintf(buf, "isYaffs2........... %d\n", dev->isYaffs2); ++ ++ return buf; ++} ++ ++static int yaffs_proc_read(char *page, ++ char **start, ++ off_t offset, int count, int *eof, void *data) +{ + struct list_head *item; + char *buf = page; @@ -2277,8 +3182,9 @@ index 0000000..717f41a + + /* Print header first */ + if (step == 0) { -+ buf += sprintf(buf, "YAFFS built:" __DATE__ " "__TIME__ -+ "\n%s\n%s\n", yaffs_fs_c_version, yaffs_guts_c_version); ++ buf += sprintf(buf, "YAFFS built:" __DATE__ " " __TIME__ ++ "\n%s\n%s\n", yaffs_fs_c_version, ++ yaffs_guts_c_version); + } + + /* hold lock_kernel while traversing yaffs_dev_list */ @@ -2291,108 +3197,211 @@ index 0000000..717f41a + n++; + continue; + } -+ buf += sprintf(buf,"\nDevice %d \"%s\"\n", n, dev->name); ++ buf += sprintf(buf, "\nDevice %d \"%s\"\n", n, dev->name); + buf = yaffs_dump_dev(buf, dev); + break; + } + unlock_kernel(); + -+ return buf-page < count ? buf-page : count; ++ return buf - page < count ? buf - page : count; +} + -+// Stuff to handle installation of file systems -+struct file_system_to_install -+{ -+ struct file_system_type *fst; -+ int installed; ++/** ++ * Set the verbosity of the warnings and error messages. ++ * ++ */ ++ ++static struct { ++ char *mask_name; ++ unsigned mask_bitfield; ++} mask_flags[] = { ++ {"allocate", YAFFS_TRACE_ALLOCATE}, ++ {"always", YAFFS_TRACE_ALWAYS}, ++ {"bad_blocks", YAFFS_TRACE_BAD_BLOCKS}, ++ {"buffers", YAFFS_TRACE_BUFFERS}, ++ {"bug", YAFFS_TRACE_BUG}, ++ {"deletion", YAFFS_TRACE_DELETION}, ++ {"erase", YAFFS_TRACE_ERASE}, ++ {"error", YAFFS_TRACE_ERROR}, ++ {"gc_detail", YAFFS_TRACE_GC_DETAIL}, ++ {"gc", YAFFS_TRACE_GC}, ++ {"mtd", YAFFS_TRACE_MTD}, ++ {"nandaccess", YAFFS_TRACE_NANDACCESS}, ++ {"os", YAFFS_TRACE_OS}, ++ {"scan_debug", YAFFS_TRACE_SCAN_DEBUG}, ++ {"scan", YAFFS_TRACE_SCAN}, ++ {"tracing", YAFFS_TRACE_TRACING}, ++ {"write", YAFFS_TRACE_WRITE}, ++ {"all", 0xffffffff}, ++ {"none", 0}, ++ {NULL, 0}, +}; + -+static struct file_system_to_install fs_to_install[] = ++static int yaffs_proc_write(struct file *file, const char *buf, ++ unsigned long count, void *data) +{ -+#ifdef CONFIG_YAFFS_YAFFS1 -+ { &yaffs_fs_type,0}, -+#endif -+#ifdef CONFIG_YAFFS_YAFFS2 -+ { &yaffs2_fs_type,0}, -+#endif -+ { NULL,0} ++ unsigned rg = 0, mask_bitfield; ++ char *end, *mask_name; ++ int i; ++ int done = 0; ++ int add, len; ++ int pos = 0; ++ ++ rg = yaffs_traceMask; ++ ++ while (!done && (pos < count)) { ++ done = 1; ++ while ((pos < count) && isspace(buf[pos])) { ++ pos++; ++ } ++ ++ switch (buf[pos]) { ++ case '+': ++ case '-': ++ case '=': ++ add = buf[pos]; ++ pos++; ++ break; ++ ++ default: ++ add = ' '; ++ break; ++ } ++ mask_name = NULL; ++ mask_bitfield = simple_strtoul(buf + pos, &end, 0); ++ if (end > buf + pos) { ++ mask_name = "numeral"; ++ len = end - (buf + pos); ++ done = 0; ++ } else { ++ ++ for (i = 0; mask_flags[i].mask_name != NULL; i++) { ++ len = strlen(mask_flags[i].mask_name); ++ if (strncmp(buf + pos, mask_flags[i].mask_name, len) == 0) { ++ mask_name = mask_flags[i].mask_name; ++ mask_bitfield = mask_flags[i].mask_bitfield; ++ done = 0; ++ break; ++ } ++ } ++ } ++ ++ if (mask_name != NULL) { ++ pos += len; ++ done = 0; ++ switch(add) { ++ case '-': ++ rg &= ~mask_bitfield; ++ break; ++ case '+': ++ rg |= mask_bitfield; ++ break; ++ case '=': ++ rg = mask_bitfield; ++ break; ++ default: ++ rg |= mask_bitfield; ++ break; ++ } ++ } ++ } ++ ++ yaffs_traceMask = rg; ++ if (rg & YAFFS_TRACE_ALWAYS) { ++ for (i = 0; mask_flags[i].mask_name != NULL; i++) { ++ char flag; ++ flag = ((rg & mask_flags[i].mask_bitfield) == mask_flags[i].mask_bitfield) ? '+' : '-'; ++ printk("%c%s\n", flag, mask_flags[i].mask_name); ++ } ++ } ++ ++ return count; ++} ++ ++/* Stuff to handle installation of file systems */ ++struct file_system_to_install { ++ struct file_system_type *fst; ++ int installed; ++}; ++ ++static struct file_system_to_install fs_to_install[] = { ++//#ifdef CONFIG_YAFFS_YAFFS1 ++ {&yaffs_fs_type, 0}, ++//#endif ++//#ifdef CONFIG_YAFFS_YAFFS2 ++ {&yaffs2_fs_type, 0}, ++//#endif ++ {NULL, 0} +}; + +static int __init init_yaffs_fs(void) +{ + int error = 0; -+ struct file_system_to_install *fsinst; -+ -+ T(YAFFS_TRACE_ALWAYS,("yaffs " __DATE__ " " __TIME__ " Installing. \n")); ++ struct file_system_to_install *fsinst; + ++ T(YAFFS_TRACE_ALWAYS, ++ ("yaffs " __DATE__ " " __TIME__ " Installing. \n")); + ++ /* Install the proc_fs entry */ ++ my_proc_entry = create_proc_entry("yaffs", ++ S_IRUGO | S_IFREG, ++ &proc_root); + -+ /* Install the proc_fs entry */ -+ my_proc_entry = create_proc_read_entry("yaffs", -+ S_IRUGO | S_IFREG, -+ &proc_root, -+ yaffs_proc_read, -+ NULL); -+ if(!my_proc_entry) -+ { -+ return -ENOMEM; -+ } -+ -+ -+ -+ // Now add the file system entries -+ -+ fsinst = fs_to_install; -+ -+ while(fsinst->fst && !error) -+ { -+ error = register_filesystem(fsinst->fst); -+ if(!error) -+ { -+ fsinst->installed = 1; -+ } -+ fsinst++; -+ } -+ -+ // Any errors? uninstall -+ if(error) -+ { -+ fsinst = fs_to_install; -+ -+ while(fsinst->fst) -+ { -+ if(fsinst->installed) -+ { -+ unregister_filesystem(fsinst->fst); -+ fsinst->installed = 0; -+ } -+ fsinst++; -+ } -+ } -+ -+ return error; ++ if (my_proc_entry) { ++ my_proc_entry->write_proc = yaffs_proc_write; ++ my_proc_entry->read_proc = yaffs_proc_read; ++ my_proc_entry->data = NULL; ++ } else { ++ return -ENOMEM; ++ } ++ ++ /* Now add the file system entries */ ++ ++ fsinst = fs_to_install; ++ ++ while (fsinst->fst && !error) { ++ error = register_filesystem(fsinst->fst); ++ if (!error) { ++ fsinst->installed = 1; ++ } ++ fsinst++; ++ } ++ ++ /* Any errors? uninstall */ ++ if (error) { ++ fsinst = fs_to_install; ++ ++ while (fsinst->fst) { ++ if (fsinst->installed) { ++ unregister_filesystem(fsinst->fst); ++ fsinst->installed = 0; ++ } ++ fsinst++; ++ } ++ } ++ ++ return error; +} + +static void __exit exit_yaffs_fs(void) +{ + -+ struct file_system_to_install *fsinst; -+ -+ T(YAFFS_TRACE_ALWAYS,("yaffs " __DATE__ " " __TIME__ " removing. \n")); -+ -+ remove_proc_entry("yaffs",&proc_root); -+ -+ fsinst = fs_to_install; -+ -+ while(fsinst->fst) -+ { -+ if(fsinst->installed) -+ { -+ unregister_filesystem(fsinst->fst); -+ fsinst->installed = 0; -+ } -+ fsinst++; -+ } ++ struct file_system_to_install *fsinst; ++ ++ T(YAFFS_TRACE_ALWAYS, ("yaffs " __DATE__ " " __TIME__ ++ " removing. \n")); ++ ++ remove_proc_entry("yaffs", &proc_root); ++ ++ fsinst = fs_to_install; ++ ++ while (fsinst->fst) { ++ if (fsinst->installed) { ++ unregister_filesystem(fsinst->fst); ++ fsinst->installed = 0; ++ } ++ fsinst++; ++ } + +} + @@ -2400,18 +3409,14 @@ index 0000000..717f41a +module_exit(exit_yaffs_fs) + +MODULE_DESCRIPTION("YAFFS2 - a NAND specific flash file system"); -+MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002,2003,2004"); ++MODULE_AUTHOR("Charles Manning, Aleph One Ltd., 2002-2006"); +MODULE_LICENSE("GPL"); -+ -+ -diff --git a/fs/yaffs/yaffs_guts.c b/fs/yaffs/yaffs_guts.c -new file mode 100644 -index 0000000..bf13f91 ---- /dev/null -+++ b/fs/yaffs/yaffs_guts.c -@@ -0,0 +1,6346 @@ +diff -urN linux.old/fs/yaffs2/yaffs_guts.c linux.dev/fs/yaffs2/yaffs_guts.c +--- linux.old/fs/yaffs2/yaffs_guts.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_guts.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,6675 @@ +/* -+ * YAFFS: Yet another FFS. A NAND-flash specific file system. ++ * YAFFS: Yet another FFS. A NAND-flash specific file system. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering @@ -2423,9 +3428,9 @@ index 0000000..bf13f91 + * published by the Free Software Foundation. + * + */ -+ //yaffs_guts.c + -+const char *yaffs_guts_c_version="$Id: yaffs_guts.c,v 1.15 2005/08/02 04:24:22 charles Exp $"; ++const char *yaffs_guts_c_version = ++ "$Id: yaffs_guts.c,v 1.45 2006/11/14 03:07:17 charles Exp $"; + +#include "yportenv.h" + @@ -2433,8 +3438,17 @@ index 0000000..bf13f91 +#include "yaffs_guts.h" +#include "yaffs_tagsvalidity.h" + -+ +#include "yaffs_tagscompat.h" ++#ifndef CONFIG_YAFFS_OWN_SORT ++#include "yaffs_qsort.h" ++#endif ++#include "yaffs_nand.h" ++ ++#include "yaffs_checkptrw.h" ++ ++#include "yaffs_nand.h" ++#include "yaffs_packedtags2.h" ++ + +#ifdef CONFIG_YAFFS_WINCE +void yfsd_LockYAFFS(BOOL fsLockOnly); @@ -2443,550 +3457,543 @@ index 0000000..bf13f91 + +#define YAFFS_PASSIVE_GC_CHUNKS 2 + -+#if 0 -+// Use Steven Hill's ECC struff instead -+// External functions for ECC on data -+void nand_calculate_ecc (const u_char *dat, u_char *ecc_code); -+int nand_correct_data (u_char *dat, u_char *read_ecc, u_char *calc_ecc); -+#define yaffs_ECCCalculate(data,ecc) nand_calculate_ecc(data,ecc) -+#define yaffs_ECCCorrect(data,read_ecc,calc_ecc) nand_correct_ecc(data,read_ecc,calc_ecc) -+#else +#include "yaffs_ecc.h" -+#endif + -+#if 0 -+// countBits is a quick way of counting the number of bits in a byte. -+// ie. countBits[n] holds the number of 1 bits in a byte with the value n. -+ -+static const char yaffs_countBitsTable[256] = -+{ -+0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8 -+}; + -+static int yaffs_CountBits(__u8 x) -+{ -+ int retVal; -+ retVal = yaffs_countBitsTable[x]; -+ return retVal; -+} -+ -+#endif -+ -+ -+#if 0 -+// Stuff using yea olde tags -+static void yaffs_LoadTagsIntoSpare(yaffs_Spare *sparePtr, yaffs_Tags *tagsPtr); -+static void yaffs_GetTagsFromSpare(yaffs_Device *dev, yaffs_Spare *sparePtr,yaffs_Tags *tagsPtr); -+ -+static int yaffs_ReadChunkTagsFromNAND(yaffs_Device *dev,int chunkInNAND, yaffs_Tags *tags, int *chunkDeleted); -+static int yaffs_TagsMatch(const yaffs_Tags *tags, int objectId, int chunkInObject, int chunkDeleted); -+#else -+#endif -+ -+// NAND access -+ -+ -+static Y_INLINE int yaffs_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *buffer, yaffs_ExtendedTags *tags); -+static Y_INLINE int yaffs_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND, const __u8 *data, yaffs_ExtendedTags *tags); -+static Y_INLINE int yaffs_MarkBlockBad(yaffs_Device *dev, int blockNo); -+static Y_INLINE int yaffs_QueryInitialBlockState(yaffs_Device *dev,int blockNo, yaffs_BlockState *state,unsigned *sequenceNumber); -+// Local prototypes -+static int yaffs_WriteNewChunkWithTagsToNAND(yaffs_Device *dev, const __u8 *buffer, yaffs_ExtendedTags *tags, int useReserve); -+#if 0 -+static int yaffs_CheckObjectHashSanity(yaffs_Device *dev); -+#endif -+static int yaffs_PutChunkIntoFile(yaffs_Object *in,int chunkInInode, int chunkInNAND, int inScan); -+ -+static yaffs_Object *yaffs_CreateNewObject(yaffs_Device *dev,int number,yaffs_ObjectType type); -+static void yaffs_AddObjectToDirectory(yaffs_Object *directory, yaffs_Object *obj); -+static int yaffs_UpdateObjectHeader(yaffs_Object *in,const YCHAR *name, int force,int isShrink, int shadows); -+static void yaffs_RemoveObjectFromDirectory(yaffs_Object *obj); ++/* Robustification (if it ever comes about...) */ ++static void yaffs_RetireBlock(yaffs_Device * dev, int blockInNAND); ++static void yaffs_HandleWriteChunkError(yaffs_Device * dev, int chunkInNAND, int erasedOk); ++static void yaffs_HandleWriteChunkOk(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, ++ const yaffs_ExtendedTags * tags); ++static void yaffs_HandleUpdateChunk(yaffs_Device * dev, int chunkInNAND, ++ const yaffs_ExtendedTags * tags); ++ ++/* Other local prototypes */ ++static int yaffs_UnlinkObject( yaffs_Object *obj); ++static int yaffs_ObjectHasCachedWriteData(yaffs_Object *obj); ++ ++static void yaffs_HardlinkFixup(yaffs_Device *dev, yaffs_Object *hardList); ++ ++static int yaffs_WriteNewChunkWithTagsToNAND(yaffs_Device * dev, ++ const __u8 * buffer, ++ yaffs_ExtendedTags * tags, ++ int useReserve); ++static int yaffs_PutChunkIntoFile(yaffs_Object * in, int chunkInInode, ++ int chunkInNAND, int inScan); ++ ++static yaffs_Object *yaffs_CreateNewObject(yaffs_Device * dev, int number, ++ yaffs_ObjectType type); ++static void yaffs_AddObjectToDirectory(yaffs_Object * directory, ++ yaffs_Object * obj); ++static int yaffs_UpdateObjectHeader(yaffs_Object * in, const YCHAR * name, ++ int force, int isShrink, int shadows); ++static void yaffs_RemoveObjectFromDirectory(yaffs_Object * obj); +static int yaffs_CheckStructures(void); -+static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level, int chunkOffset,int *limit); -+static int yaffs_DoGenericObjectDeletion(yaffs_Object *in); ++static int yaffs_DeleteWorker(yaffs_Object * in, yaffs_Tnode * tn, __u32 level, ++ int chunkOffset, int *limit); ++static int yaffs_DoGenericObjectDeletion(yaffs_Object * in); + -+static yaffs_BlockInfo *yaffs_GetBlockInfo(yaffs_Device *dev,int blockNo); ++static yaffs_BlockInfo *yaffs_GetBlockInfo(yaffs_Device * dev, int blockNo); + -+static __u8 *yaffs_GetTempBuffer(yaffs_Device *dev,int lineNo); -+static void yaffs_ReleaseTempBuffer(yaffs_Device *dev, __u8 *buffer, int lineNo); ++static __u8 *yaffs_GetTempBuffer(yaffs_Device * dev, int lineNo); ++static void yaffs_ReleaseTempBuffer(yaffs_Device * dev, __u8 * buffer, ++ int lineNo); + ++static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev, ++ int chunkInNAND); + -+// Robustification (if it ever comes about...) -+static void yaffs_RetireBlock(yaffs_Device *dev,int blockInNAND); -+#if 0 -+static void yaffs_HandleReadDataError(yaffs_Device *dev,int chunkInNAND); -+#endif -+static void yaffs_HandleWriteChunkError(yaffs_Device *dev,int chunkInNAND); -+static void yaffs_HandleWriteChunkOk(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *tags); -+static void yaffs_HandleUpdateChunk(yaffs_Device *dev,int chunkInNAND, const yaffs_ExtendedTags *tags); ++static int yaffs_UnlinkWorker(yaffs_Object * obj); ++static void yaffs_DestroyObject(yaffs_Object * obj); + -+static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,int chunkInNAND); ++static int yaffs_TagsMatch(const yaffs_ExtendedTags * tags, int objectId, ++ int chunkInObject); + -+static int yaffs_UnlinkWorker(yaffs_Object *obj); -+static void yaffs_DestroyObject(yaffs_Object *obj); ++loff_t yaffs_GetFileSize(yaffs_Object * obj); + -+#if 0 -+static int yaffs_VerifyCompare(const __u8 *d0, const __u8 * d1, const yaffs_Spare *s0, const yaffs_Spare *s1,int dataSize); -+#endif ++static int yaffs_AllocateChunk(yaffs_Device * dev, int useReserve, yaffs_BlockInfo **blockUsedPtr); + -+static int yaffs_TagsMatch(const yaffs_ExtendedTags *tags, int objectId, int chunkInObject); -+ -+ -+loff_t yaffs_GetFileSize(yaffs_Object *obj); -+ -+ -+static int yaffs_AllocateChunk(yaffs_Device *dev,int useReserve); -+ -+static void yaffs_VerifyFreeChunks(yaffs_Device *dev); ++static void yaffs_VerifyFreeChunks(yaffs_Device * dev); + +#ifdef YAFFS_PARANOID -+static int yaffs_CheckFileSanity(yaffs_Object *in); ++static int yaffs_CheckFileSanity(yaffs_Object * in); +#else +#define yaffs_CheckFileSanity(in) +#endif + -+static void yaffs_InvalidateWholeChunkCache(yaffs_Object *in); -+static void yaffs_InvalidateChunkCache(yaffs_Object *object, int chunkId); ++static void yaffs_InvalidateWholeChunkCache(yaffs_Object * in); ++static void yaffs_InvalidateChunkCache(yaffs_Object * object, int chunkId); ++ ++static void yaffs_InvalidateCheckpoint(yaffs_Device *dev); ++ + -+static int yaffs_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *buffer, yaffs_ExtendedTags *tags) -+{ -+ chunkInNAND -= dev->chunkOffset; -+ -+ if(dev->readChunkWithTagsFromNAND) -+ return dev->readChunkWithTagsFromNAND(dev,chunkInNAND,buffer,tags); -+ else -+ return yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(dev,chunkInNAND,buffer,tags); -+} + -+static Y_INLINE int yaffs_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND, const __u8 *buffer, yaffs_ExtendedTags *tags) ++/* Function to calculate chunk and offset */ ++ ++static void yaffs_AddrToChunk(yaffs_Device *dev, loff_t addr, __u32 *chunk, __u32 *offset) +{ -+ chunkInNAND -= dev->chunkOffset; -+ -+ if(tags) -+ { -+ tags->sequenceNumber = dev->sequenceNumber; -+ tags->chunkUsed = 1; -+ if(!yaffs_ValidateTags(tags)) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("Writing uninitialised tags" TENDSTR))); -+ YBUG(); -+ } -+ T(YAFFS_TRACE_WRITE,(TSTR("Writing chunk %d tags %d %d"TENDSTR),chunkInNAND,tags->objectId,tags->chunkId)); ++ if(dev->chunkShift){ ++ /* Easy-peasy power of 2 case */ ++ *chunk = (__u32)(addr >> dev->chunkShift); ++ *offset = (__u32)(addr & dev->chunkMask); + } -+ else ++ else if(dev->crumbsPerChunk) + { -+ T(YAFFS_TRACE_ERROR,(TSTR("Writing with no tags" TENDSTR))); -+ YBUG(); ++ /* Case where we're using "crumbs" */ ++ *offset = (__u32)(addr & dev->crumbMask); ++ addr >>= dev->crumbShift; ++ *chunk = ((__u32)addr)/dev->crumbsPerChunk; ++ *offset += ((addr - (*chunk * dev->crumbsPerChunk)) << dev->crumbShift); + } -+ -+ if(dev->writeChunkWithTagsToNAND) -+ return dev->writeChunkWithTagsToNAND(dev,chunkInNAND,buffer,tags); + else -+ return yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(dev,chunkInNAND,buffer,tags); ++ YBUG(); +} + -+static Y_INLINE int yaffs_MarkBlockBad(yaffs_Device *dev, int blockNo) -+{ -+ blockNo -= dev->blockOffset; -+ -+ if(dev->markNANDBlockBad) -+ return dev->markNANDBlockBad(dev,blockNo); -+ else -+ return yaffs_TagsCompatabilityMarkNANDBlockBad(dev,blockNo); -+} -+static Y_INLINE int yaffs_QueryInitialBlockState(yaffs_Device *dev,int blockNo, yaffs_BlockState *state, unsigned *sequenceNumber) ++/* Function to return the number of shifts for a power of 2 greater than or equal ++ * to the given number ++ * Note we don't try to cater for all possible numbers and this does not have to ++ * be hellishly efficient. ++ */ ++ ++static __u32 ShiftsGE(__u32 x) +{ -+ blockNo -= dev->blockOffset; ++ int extraBits; ++ int nShifts; + -+ if(dev->queryNANDBlock) -+ return dev->queryNANDBlock(dev,blockNo,state,sequenceNumber); -+ else -+ return yaffs_TagsCompatabilityQueryNANDBlock(dev,blockNo,state,sequenceNumber); -+} -+ -+static int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,int blockInNAND) -+{ -+ int result; ++ nShifts = extraBits = 0; + -+ blockInNAND -= dev->blockOffset; -+ -+ dev->nBlockErasures++; -+ result = dev->eraseBlockInNAND(dev,blockInNAND); ++ while(x>1){ ++ if(x & 1) extraBits++; ++ x>>=1; ++ nShifts++; ++ } + -+ if(!result)result = dev->eraseBlockInNAND(dev,blockInNAND); // If at first we don't succeed, try again *once*. -+ return result; ++ if(extraBits) ++ nShifts++; ++ ++ return nShifts; +} + -+static int yaffs_InitialiseNAND(struct yaffs_DeviceStruct *dev) ++/* Function to return the number of shifts to get a 1 in bit 0 ++ */ ++ ++static __u32 ShiftDiv(__u32 x) +{ -+ return dev->initialiseNAND(dev); ++ int nShifts; ++ ++ nShifts = 0; ++ ++ if(!x) return 0; ++ ++ while( !(x&1)){ ++ x>>=1; ++ nShifts++; ++ } ++ ++ return nShifts; +} + + + ++/* ++ * Temporary buffer manipulations. ++ */ + -+// Temporary buffer manipulations -+ -+static __u8 *yaffs_GetTempBuffer(yaffs_Device *dev,int lineNo) ++static __u8 *yaffs_GetTempBuffer(yaffs_Device * dev, int lineNo) +{ -+ int i,j; -+ for(i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) -+ { -+ if(dev->tempBuffer[i].line == 0) -+ { ++ int i, j; ++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) { ++ if (dev->tempBuffer[i].line == 0) { + dev->tempBuffer[i].line = lineNo; -+ if((i+1) > dev->maxTemp) -+ { ++ if ((i + 1) > dev->maxTemp) { + dev->maxTemp = i + 1; -+ for(j = 0; j <= i; j++) -+ dev->tempBuffer[j].maxLine = dev->tempBuffer[j].line; -+ } -+ ++ for (j = 0; j <= i; j++) ++ dev->tempBuffer[j].maxLine = ++ dev->tempBuffer[j].line; ++ } ++ + return dev->tempBuffer[i].buffer; + } + } + -+ T(YAFFS_TRACE_BUFFERS,(TSTR("Out of temp buffers at line %d, other held by lines:"),lineNo)); -+ for(i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) -+ { -+ T(YAFFS_TRACE_BUFFERS,(TSTR(" %d "),dev->tempBuffer[i].line)); ++ T(YAFFS_TRACE_BUFFERS, ++ (TSTR("Out of temp buffers at line %d, other held by lines:"), ++ lineNo)); ++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) { ++ T(YAFFS_TRACE_BUFFERS, (TSTR(" %d "), dev->tempBuffer[i].line)); + } -+ T(YAFFS_TRACE_BUFFERS,(TSTR(" "TENDSTR))); -+ ++ T(YAFFS_TRACE_BUFFERS, (TSTR(" " TENDSTR))); ++ ++ /* ++ * If we got here then we have to allocate an unmanaged one ++ * This is not good. ++ */ ++ + dev->unmanagedTempAllocations++; -+ // Get an unmanaged one -+ return YMALLOC(dev->nBytesPerChunk); -+ -+ ++ return YMALLOC(dev->nDataBytesPerChunk); ++ +} + -+static void yaffs_ReleaseTempBuffer(yaffs_Device *dev, __u8 *buffer, int lineNo) ++static void yaffs_ReleaseTempBuffer(yaffs_Device * dev, __u8 * buffer, ++ int lineNo) +{ + int i; -+ for(i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) -+ { -+ if(dev->tempBuffer[i].buffer == buffer) -+ { ++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) { ++ if (dev->tempBuffer[i].buffer == buffer) { + dev->tempBuffer[i].line = 0; + return; + } + } -+ -+ if(buffer) -+ { -+ // assume it is an unmanaged one. -+ T(YAFFS_TRACE_BUFFERS,(TSTR("Releasing unmanaged temp buffer in line %d" TENDSTR),lineNo)); ++ ++ if (buffer) { ++ /* assume it is an unmanaged one. */ ++ T(YAFFS_TRACE_BUFFERS, ++ (TSTR("Releasing unmanaged temp buffer in line %d" TENDSTR), ++ lineNo)); + YFREE(buffer); + dev->unmanagedTempDeallocations++; + } + +} + ++/* ++ * Determine if we have a managed buffer. ++ */ ++int yaffs_IsManagedTempBuffer(yaffs_Device * dev, const __u8 * buffer) ++{ ++ int i; ++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) { ++ if (dev->tempBuffer[i].buffer == buffer) ++ return 1; ++ ++ } ++ ++ for (i = 0; i < dev->nShortOpCaches; i++) { ++ if( dev->srCache[i].data == buffer ) ++ return 1; ++ ++ } ++ ++ if (buffer == dev->checkpointBuffer) ++ return 1; + -+// Chunk bitmap manipulations ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs: unmaged buffer detected.\n" TENDSTR))); ++ return 0; ++} ++ ++/* ++ * Chunk bitmap manipulations ++ */ + -+static Y_INLINE __u8 *yaffs_BlockBits(yaffs_Device *dev, int blk) ++static Y_INLINE __u8 *yaffs_BlockBits(yaffs_Device * dev, int blk) +{ -+ if(blk < dev->internalStartBlock || blk > dev->internalEndBlock) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR),blk)); ++ if (blk < dev->internalStartBlock || blk > dev->internalEndBlock) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("**>> yaffs: BlockBits block %d is not valid" TENDSTR), ++ blk)); + YBUG(); + } -+ return dev->chunkBits + (dev->chunkBitmapStride * (blk - dev->internalStartBlock)); ++ return dev->chunkBits + ++ (dev->chunkBitmapStride * (blk - dev->internalStartBlock)); +} + -+static Y_INLINE void yaffs_ClearChunkBits(yaffs_Device *dev,int blk) ++static Y_INLINE void yaffs_ClearChunkBits(yaffs_Device * dev, int blk) +{ -+ __u8 *blkBits = yaffs_BlockBits(dev,blk); ++ __u8 *blkBits = yaffs_BlockBits(dev, blk); + -+ memset(blkBits,0,dev->chunkBitmapStride); ++ memset(blkBits, 0, dev->chunkBitmapStride); +} + -+static Y_INLINE void yaffs_ClearChunkBit(yaffs_Device *dev,int blk,int chunk) ++static Y_INLINE void yaffs_ClearChunkBit(yaffs_Device * dev, int blk, int chunk) +{ -+ __u8 *blkBits = yaffs_BlockBits(dev,blk); -+ -+ blkBits[chunk/8] &= ~ (1<<(chunk & 7)); ++ __u8 *blkBits = yaffs_BlockBits(dev, blk); ++ ++ blkBits[chunk / 8] &= ~(1 << (chunk & 7)); +} + -+static Y_INLINE void yaffs_SetChunkBit(yaffs_Device *dev,int blk,int chunk) ++static Y_INLINE void yaffs_SetChunkBit(yaffs_Device * dev, int blk, int chunk) +{ -+ __u8 *blkBits = yaffs_BlockBits(dev,blk); ++ __u8 *blkBits = yaffs_BlockBits(dev, blk); + -+ blkBits[chunk/8] |= (1<<(chunk & 7)); ++ blkBits[chunk / 8] |= (1 << (chunk & 7)); +} + -+static Y_INLINE int yaffs_CheckChunkBit(yaffs_Device *dev,int blk,int chunk) ++static Y_INLINE int yaffs_CheckChunkBit(yaffs_Device * dev, int blk, int chunk) +{ -+ __u8 *blkBits = yaffs_BlockBits(dev,blk); -+ return (blkBits[chunk/8] & (1<<(chunk & 7))) ? 1 :0; ++ __u8 *blkBits = yaffs_BlockBits(dev, blk); ++ return (blkBits[chunk / 8] & (1 << (chunk & 7))) ? 1 : 0; +} + -+static Y_INLINE int yaffs_StillSomeChunkBits(yaffs_Device *dev,int blk) ++static Y_INLINE int yaffs_StillSomeChunkBits(yaffs_Device * dev, int blk) +{ -+ __u8 *blkBits = yaffs_BlockBits(dev,blk); ++ __u8 *blkBits = yaffs_BlockBits(dev, blk); + int i; -+ for(i = 0; i < dev->chunkBitmapStride; i++) -+ { -+ if(*blkBits) return 1; ++ for (i = 0; i < dev->chunkBitmapStride; i++) { ++ if (*blkBits) ++ return 1; + blkBits++; + } + return 0; +} + -+ -+static Y_INLINE int yaffs_HashFunction(int n) ++/* ++ * Simple hash function. Needs to have a reasonable spread ++ */ ++ ++static Y_INLINE int yaffs_HashFunction(int n) +{ ++ n = abs(n); + return (n % YAFFS_NOBJECT_BUCKETS); +} + -+ -+yaffs_Object *yaffs_Root(yaffs_Device *dev) ++/* ++ * Access functions to useful fake objects ++ */ ++ ++yaffs_Object *yaffs_Root(yaffs_Device * dev) +{ + return dev->rootDir; +} + -+yaffs_Object *yaffs_LostNFound(yaffs_Device *dev) ++yaffs_Object *yaffs_LostNFound(yaffs_Device * dev) +{ + return dev->lostNFoundDir; +} + + -+ -+ -+int yaffs_CheckFF(__u8 *buffer,int nBytes) ++/* ++ * Erased NAND checking functions ++ */ ++ ++int yaffs_CheckFF(__u8 * buffer, int nBytes) +{ -+ //Horrible, slow implementation -+ while(nBytes--) -+ { -+ if(*buffer != 0xFF) return 0; ++ /* Horrible, slow implementation */ ++ while (nBytes--) { ++ if (*buffer != 0xFF) ++ return 0; + buffer++; + } + return 1; +} + -+static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,int chunkInNAND) ++static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev, ++ int chunkInNAND) +{ + + int retval = YAFFS_OK; -+ __u8 *data = yaffs_GetTempBuffer(dev,__LINE__); ++ __u8 *data = yaffs_GetTempBuffer(dev, __LINE__); + yaffs_ExtendedTags tags; ++ int result; + -+// NCB dev->readChunkWithTagsFromNAND(dev,chunkInNAND,data,&tags); -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunkInNAND,data,&tags); ++ result = yaffs_ReadChunkWithTagsFromNAND(dev, chunkInNAND, data, &tags); + -+ if(!yaffs_CheckFF(data,dev->nBytesPerChunk) || tags.chunkUsed) -+ { -+ T(YAFFS_TRACE_NANDACCESS,(TSTR("Chunk %d not erased" TENDSTR),chunkInNAND)); ++ if(tags.eccResult > YAFFS_ECC_RESULT_NO_ERROR) ++ retval = YAFFS_FAIL; ++ ++ ++ if (!yaffs_CheckFF(data, dev->nDataBytesPerChunk) || tags.chunkUsed) { ++ T(YAFFS_TRACE_NANDACCESS, ++ (TSTR("Chunk %d not erased" TENDSTR), chunkInNAND)); + retval = YAFFS_FAIL; + } + -+ yaffs_ReleaseTempBuffer(dev,data,__LINE__); -+ -+ return retval; -+ -+} ++ yaffs_ReleaseTempBuffer(dev, data, __LINE__); + ++ return retval; + ++} + -+#if 1 -+static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev, const __u8 *data, yaffs_ExtendedTags *tags,int useReserve) ++static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev, ++ const __u8 * data, ++ yaffs_ExtendedTags * tags, ++ int useReserve) +{ + int chunk; -+ -+ int writeOk = 1; -+ int attempts = 0; -+ + ++ int writeOk = 0; ++ int erasedOk = 1; ++ int attempts = 0; ++ yaffs_BlockInfo *bi; + -+ do{ -+ chunk = yaffs_AllocateChunk(dev,useReserve); -+ -+ if(chunk >= 0) -+ { -+ -+ // First check this chunk is erased... -+#ifndef CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK -+ writeOk = yaffs_CheckChunkErased(dev,chunk); -+#endif -+ if(!writeOk) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs chunk %d was not erased" TENDSTR),chunk)); -+ } -+ else -+ { -+ writeOk = yaffs_WriteChunkWithTagsToNAND(dev,chunk,data,tags); -+ } -+ attempts++; ++ yaffs_InvalidateCheckpoint(dev); ++ ++ do { ++ chunk = yaffs_AllocateChunk(dev, useReserve,&bi); ++ ++ if (chunk >= 0) { ++ /* First check this chunk is erased, if it needs checking. ++ * The checking policy (unless forced always on) is as follows: ++ * Check the first page we try to write in a block. ++ * - If the check passes then we don't need to check any more. ++ * - If the check fails, we check again... ++ * If the block has been erased, we don't need to check. ++ * ++ * However, if the block has been prioritised for gc, then ++ * we think there might be something odd about this block ++ * and stop using it. ++ * ++ * Rationale: ++ * We should only ever see chunks that have not been erased ++ * if there was a partially written chunk due to power loss ++ * This checking policy should catch that case with very ++ * few checks and thus save a lot of checks that are most likely not ++ * needed. ++ */ ++ ++ if(bi->gcPrioritise){ ++ yaffs_DeleteChunk(dev, chunk, 1, __LINE__); ++ } else { ++#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED ++ ++ bi->skipErasedCheck = 0; ++ ++#endif ++ if(!bi->skipErasedCheck){ ++ erasedOk = yaffs_CheckChunkErased(dev, chunk); ++ if(erasedOk && !bi->gcPrioritise) ++ bi->skipErasedCheck = 1; ++ } + -+ if(writeOk) -+ { -+ // Copy the data into the robustification buffer. -+ // NB We do this at the end to prevent duplicates in the case of a write error. -+ //Todo -+ yaffs_HandleWriteChunkOk(dev,chunk,data,tags); -+ } -+ else -+ { -+ yaffs_HandleWriteChunkError(dev,chunk); ++ if (!erasedOk) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>> yaffs chunk %d was not erased" ++ TENDSTR), chunk)); ++ } else { ++ writeOk = ++ yaffs_WriteChunkWithTagsToNAND(dev, chunk, ++ data, tags); ++ } ++ ++ attempts++; ++ ++ if (writeOk) { ++ /* ++ * Copy the data into the robustification buffer. ++ * NB We do this at the end to prevent duplicates in the case of a write error. ++ * Todo ++ */ ++ yaffs_HandleWriteChunkOk(dev, chunk, data, tags); ++ ++ } else { ++ /* The erased check or write failed */ ++ yaffs_HandleWriteChunkError(dev, chunk, erasedOk); ++ } + } + } -+ -+ } while(chunk >= 0 && ! writeOk); -+ -+ if(attempts > 1) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs write required %d attempts" TENDSTR),attempts)); -+ dev->nRetriedWrites+= (attempts - 1); ++ ++ } while (chunk >= 0 && !writeOk); ++ ++ if (attempts > 1) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("**>> yaffs write required %d attempts" TENDSTR), ++ attempts)); ++ dev->nRetriedWrites += (attempts - 1); + } -+ + -+ + return chunk; +} -+#endif + -+ -+/// -+// Functions for robustisizing -+// -+// -+ -+static void yaffs_RetireBlock(yaffs_Device *dev,int blockInNAND) ++/* ++ * Block retiring for handling a broken block. ++ */ ++ ++static void yaffs_RetireBlock(yaffs_Device * dev, int blockInNAND) +{ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockInNAND); ++ ++ yaffs_InvalidateCheckpoint(dev); + -+ yaffs_MarkBlockBad(dev,blockInNAND); -+ -+ yaffs_GetBlockInfo(dev,blockInNAND)->blockState = YAFFS_BLOCK_STATE_DEAD; ++ yaffs_MarkBlockBad(dev, blockInNAND); ++ ++ bi->blockState = YAFFS_BLOCK_STATE_DEAD; ++ bi->gcPrioritise = 0; ++ bi->needsRetiring = 0; + + dev->nRetiredBlocks++; +} + -+ -+#if 0 -+static int yaffs_RewriteBufferedBlock(yaffs_Device *dev) ++/* ++ * Functions for robustisizing TODO ++ * ++ */ ++ ++static void yaffs_HandleWriteChunkOk(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, ++ const yaffs_ExtendedTags * tags) +{ -+ dev->doingBufferedBlockRewrite = 1; -+ // -+ // Remove erased chunks -+ // Rewrite existing chunks to a new block -+ // Set current write block to the new block -+ -+ dev->doingBufferedBlockRewrite = 0; -+ -+ return 1; +} + -+ -+static void yaffs_HandleReadDataError(yaffs_Device *dev,int chunkInNAND) ++static void yaffs_HandleUpdateChunk(yaffs_Device * dev, int chunkInNAND, ++ const yaffs_ExtendedTags * tags) +{ -+ int blockInNAND = chunkInNAND/dev->nChunksPerBlock; -+ -+ // Mark the block for retirement -+ yaffs_GetBlockInfo(dev,blockInNAND)->needsRetiring = 1; -+ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,(TSTR("**>>Block %d marked for retirement" TENDSTR),blockInNAND)); -+ -+ -+ //TODO -+ // Just do a garbage collection on the affected block then retire the block -+ // NB recursion +} + -+ -+static void yaffs_CheckWrittenBlock(yaffs_Device *dev,int chunkInNAND) ++void yaffs_HandleChunkError(yaffs_Device *dev, yaffs_BlockInfo *bi) +{ -+} -+ -+#endif ++ if(!bi->gcPrioritise){ ++ bi->gcPrioritise = 1; ++ dev->hasPendingPrioritisedGCs = 1; ++ bi->chunkErrorStrikes ++; ++ ++ if(bi->chunkErrorStrikes > 3){ ++ bi->needsRetiring = 1; /* Too many stikes, so retire this */ ++ T(YAFFS_TRACE_ALWAYS, (TSTR("yaffs: Block struck out" TENDSTR))); + -+static void yaffs_HandleWriteChunkOk(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *tags) -+{ ++ } ++ ++ } +} + -+static void yaffs_HandleUpdateChunk(yaffs_Device *dev,int chunkInNAND, const yaffs_ExtendedTags *tags) ++static void yaffs_ReportOddballBlocks(yaffs_Device *dev) +{ ++ int i; ++ ++ for(i = dev->internalStartBlock; i <= dev->internalEndBlock && (yaffs_traceMask & YAFFS_TRACE_BAD_BLOCKS); i++){ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,i); ++ if(bi->needsRetiring || bi->gcPrioritise) ++ T(YAFFS_TRACE_BAD_BLOCKS,(TSTR("yaffs block %d%s%s" TENDSTR), ++ i, ++ bi->needsRetiring ? " needs retiring" : "", ++ bi->gcPrioritise ? " gc prioritised" : "")); ++ ++ } +} + -+static void yaffs_HandleWriteChunkError(yaffs_Device *dev,int chunkInNAND) ++static void yaffs_HandleWriteChunkError(yaffs_Device * dev, int chunkInNAND, int erasedOk) +{ -+ int blockInNAND = chunkInNAND/dev->nChunksPerBlock; -+ -+ // Mark the block for retirement -+ yaffs_GetBlockInfo(dev,blockInNAND)->needsRetiring = 1; -+ // Delete the chunk -+ yaffs_DeleteChunk(dev,chunkInNAND,1,__LINE__); -+} + ++ int blockInNAND = chunkInNAND / dev->nChunksPerBlock; ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockInNAND); + ++ yaffs_HandleChunkError(dev,bi); ++ ++ ++ if(erasedOk ) { ++ /* Was an actual write failure, so mark the block for retirement */ ++ bi->needsRetiring = 1; ++ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS, ++ (TSTR("**>> Block %d needs retiring" TENDSTR), blockInNAND)); + -+#if 0 -+static int yaffs_VerifyCompare(const __u8 *d0, const __u8 * d1, const yaffs_Spare *s0, const yaffs_Spare *s1,int dataSize) -+{ -+ -+ -+ if( memcmp(d0,d1,dataSize) != 0 || -+ s0->tagByte0 != s1->tagByte0 || -+ s0->tagByte1 != s1->tagByte1 || -+ s0->tagByte2 != s1->tagByte2 || -+ s0->tagByte3 != s1->tagByte3 || -+ s0->tagByte4 != s1->tagByte4 || -+ s0->tagByte5 != s1->tagByte5 || -+ s0->tagByte6 != s1->tagByte6 || -+ s0->tagByte7 != s1->tagByte7 || -+ s0->ecc1[0] != s1->ecc1[0] || -+ s0->ecc1[1] != s1->ecc1[1] || -+ s0->ecc1[2] != s1->ecc1[2] || -+ s0->ecc2[0] != s1->ecc2[0] || -+ s0->ecc2[1] != s1->ecc2[1] || -+ s0->ecc2[2] != s1->ecc2[2] ) -+ { -+ return 0; -+ } ++ ++ } + -+ return 1; ++ /* Delete the chunk */ ++ yaffs_DeleteChunk(dev, chunkInNAND, 1, __LINE__); +} -+#endif -+ + -+///////////////////////// Object management ////////////////// -+// List of spare objects -+// The list is hooked together using the first pointer -+// in the object + -+// static yaffs_Object *yaffs_freeObjects = NULL; ++/*---------------- Name handling functions ------------*/ + -+// static int yaffs_nFreeObjects; -+ -+// static yaffs_ObjectList *yaffs_allocatedObjectList = NULL; -+ -+// static yaffs_ObjectBucket yaffs_objectBucket[YAFFS_NOBJECT_BUCKETS]; -+ -+ -+static __u16 yaffs_CalcNameSum(const YCHAR *name) ++static __u16 yaffs_CalcNameSum(const YCHAR * name) +{ + __u16 sum = 0; + __u16 i = 1; -+ -+ YUCHAR *bname = (YUCHAR *)name; -+ if(bname) -+ { -+ while ((*bname) && (i <=YAFFS_MAX_NAME_LENGTH)) -+ { ++ ++ YUCHAR *bname = (YUCHAR *) name; ++ if (bname) { ++ while ((*bname) && (i <= YAFFS_MAX_NAME_LENGTH)) { + +#ifdef CONFIG_YAFFS_CASE_INSENSITIVE + sum += yaffs_toupper(*bname) * i; @@ -3000,149 +4007,158 @@ index 0000000..bf13f91 + return sum; +} + -+static void yaffs_SetObjectName(yaffs_Object *obj, const YCHAR *name) ++static void yaffs_SetObjectName(yaffs_Object * obj, const YCHAR * name) +{ +#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM -+ if(name && yaffs_strlen(name) <= YAFFS_SHORT_NAME_LENGTH) -+ { -+ yaffs_strcpy(obj->shortName,name); -+ } -+ else -+ { -+ obj->shortName[0]=_Y('\0'); -+ } ++ if (name && yaffs_strlen(name) <= YAFFS_SHORT_NAME_LENGTH) { ++ yaffs_strcpy(obj->shortName, name); ++ } else { ++ obj->shortName[0] = _Y('\0'); ++ } +#endif -+ obj->sum = yaffs_CalcNameSum(name); ++ obj->sum = yaffs_CalcNameSum(name); +} + -+#if 0 -+void yaffs_CalcECC(const __u8 *data, yaffs_Spare *spare) -+{ -+ yaffs_ECCCalculate(data , spare->ecc1); -+ yaffs_ECCCalculate(&data[256] , spare->ecc2); -+} -+#endif -+ ++/*-------------------- TNODES ------------------- + -+///////////////////////// TNODES /////////////////////// -+ -+// List of spare tnodes -+// The list is hooked together using the first pointer -+// in the tnode. -+ -+//static yaffs_Tnode *yaffs_freeTnodes = NULL; -+ -+// static int yaffs_nFreeTnodes; -+ -+//static yaffs_TnodeList *yaffs_allocatedTnodeList = NULL; ++ * List of spare tnodes ++ * The list is hooked together using the first pointer ++ * in the tnode. ++ */ ++ ++/* yaffs_CreateTnodes creates a bunch more tnodes and ++ * adds them to the tnode free list. ++ * Don't use this function directly ++ */ + ++static int yaffs_CreateTnodes(yaffs_Device * dev, int nTnodes) ++{ ++ int i; ++ int tnodeSize; ++ yaffs_Tnode *newTnodes; ++ __u8 *mem; ++ yaffs_Tnode *curr; ++ yaffs_Tnode *next; ++ yaffs_TnodeList *tnl; ++ ++ if (nTnodes < 1) ++ return YAFFS_OK; ++ ++ /* Calculate the tnode size in bytes for variable width tnode support. ++ * Must be a multiple of 32-bits */ ++ tnodeSize = (dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8; + ++ /* make these things */ + -+// yaffs_CreateTnodes creates a bunch more tnodes and -+// adds them to the tnode free list. -+// Don't use this function directly ++ newTnodes = YMALLOC(nTnodes * tnodeSize); ++ mem = (__u8 *)newTnodes; + -+static int yaffs_CreateTnodes(yaffs_Device *dev,int nTnodes) -+{ -+ int i; -+ yaffs_Tnode *newTnodes; -+ yaffs_TnodeList *tnl; -+ -+ if(nTnodes < 1) return YAFFS_OK; -+ -+ // make these things -+ -+ newTnodes = YMALLOC(nTnodes * sizeof(yaffs_Tnode)); -+ -+ if (!newTnodes) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("yaffs: Could not allocate Tnodes"TENDSTR))); ++ if (!newTnodes) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("yaffs: Could not allocate Tnodes" TENDSTR))); + return YAFFS_FAIL; -+ } -+ -+ // Hook them into the free list -+ for(i = 0; i < nTnodes - 1; i++) -+ { -+ newTnodes[i].internal[0] = &newTnodes[i+1]; ++ } ++ ++ /* Hook them into the free list */ ++#if 0 ++ for (i = 0; i < nTnodes - 1; i++) { ++ newTnodes[i].internal[0] = &newTnodes[i + 1]; +#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG -+ newTnodes[i].internal[YAFFS_NTNODES_INTERNAL] = (void *)1; ++ newTnodes[i].internal[YAFFS_NTNODES_INTERNAL] = (void *)1; +#endif -+ } -+ ++ } ++ + newTnodes[nTnodes - 1].internal[0] = dev->freeTnodes; +#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG -+ newTnodes[nTnodes - 1].internal[YAFFS_NTNODES_INTERNAL] = (void *)1; ++ newTnodes[nTnodes - 1].internal[YAFFS_NTNODES_INTERNAL] = (void *)1; +#endif + dev->freeTnodes = newTnodes; -+ dev->nFreeTnodes+= nTnodes; ++#else ++ /* New hookup for wide tnodes */ ++ for(i = 0; i < nTnodes -1; i++) { ++ curr = (yaffs_Tnode *) &mem[i * tnodeSize]; ++ next = (yaffs_Tnode *) &mem[(i+1) * tnodeSize]; ++ curr->internal[0] = next; ++ } ++ ++ curr = (yaffs_Tnode *) &mem[(nTnodes - 1) * tnodeSize]; ++ curr->internal[0] = dev->freeTnodes; ++ dev->freeTnodes = (yaffs_Tnode *)mem; ++ ++#endif ++ ++ ++ dev->nFreeTnodes += nTnodes; + dev->nTnodesCreated += nTnodes; + -+ // Now add this bunch of tnodes to a list for freeing up. -+ // NB If we can't add this to the management list it isn't fatal -+ // but it just means we can't free this bunch of tnodes later. ++ /* Now add this bunch of tnodes to a list for freeing up. ++ * NB If we can't add this to the management list it isn't fatal ++ * but it just means we can't free this bunch of tnodes later. ++ */ ++ + tnl = YMALLOC(sizeof(yaffs_TnodeList)); -+ if(!tnl) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("yaffs: Could not add tnodes to management list" TENDSTR))); -+ -+ } -+ else -+ { ++ if (!tnl) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("yaffs: Could not add tnodes to management list" TENDSTR))); ++ ++ } else { + tnl->tnodes = newTnodes; + tnl->next = dev->allocatedTnodeList; + dev->allocatedTnodeList = tnl; + } + -+ -+ T(YAFFS_TRACE_ALLOCATE,(TSTR("yaffs: Tnodes added" TENDSTR))); -+ ++ T(YAFFS_TRACE_ALLOCATE, (TSTR("yaffs: Tnodes added" TENDSTR))); + + return YAFFS_OK; +} + ++/* GetTnode gets us a clean tnode. Tries to make allocate more if we run out */ + -+// GetTnode gets us a clean tnode. Tries to make allocate more if we run out -+static yaffs_Tnode *yaffs_GetTnode(yaffs_Device *dev) ++static yaffs_Tnode *yaffs_GetTnodeRaw(yaffs_Device * dev) +{ + yaffs_Tnode *tn = NULL; -+ -+ // If there are none left make more -+ if(!dev->freeTnodes) -+ { -+ yaffs_CreateTnodes(dev,YAFFS_ALLOCATION_NTNODES); ++ ++ /* If there are none left make more */ ++ if (!dev->freeTnodes) { ++ yaffs_CreateTnodes(dev, YAFFS_ALLOCATION_NTNODES); + } -+ -+ if(dev->freeTnodes) -+ { ++ ++ if (dev->freeTnodes) { + tn = dev->freeTnodes; +#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG -+ if(tn->internal[YAFFS_NTNODES_INTERNAL] != (void *)1) -+ { -+ // Hoosterman, this thing looks like it isn't in the list -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: Tnode list bug 1" TENDSTR))); ++ if (tn->internal[YAFFS_NTNODES_INTERNAL] != (void *)1) { ++ /* Hoosterman, this thing looks like it isn't in the list */ ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs: Tnode list bug 1" TENDSTR))); + } +#endif + dev->freeTnodes = dev->freeTnodes->internal[0]; + dev->nFreeTnodes--; -+ // zero out -+ memset(tn,0,sizeof(yaffs_Tnode)); + } -+ + + return tn; +} + -+ -+// FreeTnode frees up a tnode and puts it back on the free list -+static void yaffs_FreeTnode(yaffs_Device*dev, yaffs_Tnode *tn) ++static yaffs_Tnode *yaffs_GetTnode(yaffs_Device * dev) +{ ++ yaffs_Tnode *tn = yaffs_GetTnodeRaw(dev); ++ + if(tn) -+ { ++ memset(tn, 0, (dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8); ++ ++ return tn; ++} ++ ++/* FreeTnode frees up a tnode and puts it back on the free list */ ++static void yaffs_FreeTnode(yaffs_Device * dev, yaffs_Tnode * tn) ++{ ++ if (tn) { +#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG -+ if(tn->internal[YAFFS_NTNODES_INTERNAL] != 0) -+ { -+ // Hoosterman, this thing looks like it is already in the list -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: Tnode list bug 2" TENDSTR))); ++ if (tn->internal[YAFFS_NTNODES_INTERNAL] != 0) { ++ /* Hoosterman, this thing looks like it is already in the list */ ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs: Tnode list bug 2" TENDSTR))); + } + tn->internal[YAFFS_NTNODES_INTERNAL] = (void *)1; +#endif @@ -3152,27 +4168,25 @@ index 0000000..bf13f91 + } +} + -+ -+static void yaffs_DeinitialiseTnodes(yaffs_Device*dev) ++static void yaffs_DeinitialiseTnodes(yaffs_Device * dev) +{ -+ // Free the list of allocated tnodes ++ /* Free the list of allocated tnodes */ + yaffs_TnodeList *tmp; -+ -+ while(dev->allocatedTnodeList) -+ { -+ tmp = dev->allocatedTnodeList->next; ++ ++ while (dev->allocatedTnodeList) { ++ tmp = dev->allocatedTnodeList->next; + + YFREE(dev->allocatedTnodeList->tnodes); + YFREE(dev->allocatedTnodeList); -+ dev->allocatedTnodeList = tmp; -+ ++ dev->allocatedTnodeList = tmp; ++ + } -+ ++ + dev->freeTnodes = NULL; + dev->nFreeTnodes = 0; +} + -+static void yaffs_InitialiseTnodes(yaffs_Device*dev) ++static void yaffs_InitialiseTnodes(yaffs_Device * dev) +{ + dev->allocatedTnodeList = NULL; + dev->freeTnodes = NULL; @@ -3181,220 +4195,244 @@ index 0000000..bf13f91 + +} + -+#if 0 -+void yaffs_TnodeTest(yaffs_Device *dev) -+{ + -+ int i; -+ int j; -+ yaffs_Tnode *tn[1000]; -+ -+ YINFO("Testing TNodes"); -+ -+ for(j = 0; j < 50; j++) -+ { -+ for(i = 0; i < 1000; i++) -+ { -+ tn[i] = yaffs_GetTnode(dev); -+ if(!tn[i]) -+ { -+ YALERT("Getting tnode failed"); -+ } -+ } -+ for(i = 0; i < 1000; i+=3) -+ { -+ yaffs_FreeTnode(dev,tn[i]); -+ tn[i] = NULL; -+ } -+ -+ } ++void yaffs_PutLevel0Tnode(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos, unsigned val) ++{ ++ __u32 *map = (__u32 *)tn; ++ __u32 bitInMap; ++ __u32 bitInWord; ++ __u32 wordInMap; ++ __u32 mask; ++ ++ pos &= YAFFS_TNODES_LEVEL0_MASK; ++ val >>= dev->chunkGroupBits; ++ ++ bitInMap = pos * dev->tnodeWidth; ++ wordInMap = bitInMap /32; ++ bitInWord = bitInMap & (32 -1); ++ ++ mask = dev->tnodeMask << bitInWord; ++ ++ map[wordInMap] &= ~mask; ++ map[wordInMap] |= (mask & (val << bitInWord)); ++ ++ if(dev->tnodeWidth > (32-bitInWord)) { ++ bitInWord = (32 - bitInWord); ++ wordInMap++;; ++ mask = dev->tnodeMask >> (/*dev->tnodeWidth -*/ bitInWord); ++ map[wordInMap] &= ~mask; ++ map[wordInMap] |= (mask & (val >> bitInWord)); ++ } ++} ++ ++__u32 yaffs_GetChunkGroupBase(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos) ++{ ++ __u32 *map = (__u32 *)tn; ++ __u32 bitInMap; ++ __u32 bitInWord; ++ __u32 wordInMap; ++ __u32 val; ++ ++ pos &= YAFFS_TNODES_LEVEL0_MASK; ++ ++ bitInMap = pos * dev->tnodeWidth; ++ wordInMap = bitInMap /32; ++ bitInWord = bitInMap & (32 -1); ++ ++ val = map[wordInMap] >> bitInWord; ++ ++ if(dev->tnodeWidth > (32-bitInWord)) { ++ bitInWord = (32 - bitInWord); ++ wordInMap++;; ++ val |= (map[wordInMap] << bitInWord); ++ } ++ ++ val &= dev->tnodeMask; ++ val <<= dev->chunkGroupBits; ++ ++ return val; +} -+#endif -+ -+ -+////////////////// END OF TNODE MANIPULATION /////////////////////////// + -+/////////////// Functions to manipulate the look-up tree (made up of tnodes) -+// The look up tree is represented by the top tnode and the number of topLevel -+// in the tree. 0 means only the level 0 tnode is in the tree. ++/* ------------------- End of individual tnode manipulation -----------------*/ + ++/* ---------Functions to manipulate the look-up tree (made up of tnodes) ------ ++ * The look up tree is represented by the top tnode and the number of topLevel ++ * in the tree. 0 means only the level 0 tnode is in the tree. ++ */ + -+// FindLevel0Tnode finds the level 0 tnode, if one exists. -+// Used when reading..... -+static yaffs_Tnode *yaffs_FindLevel0Tnode(yaffs_Device *dev,yaffs_FileStructure *fStruct, __u32 chunkId) ++/* FindLevel0Tnode finds the level 0 tnode, if one exists. */ ++static yaffs_Tnode *yaffs_FindLevel0Tnode(yaffs_Device * dev, ++ yaffs_FileStructure * fStruct, ++ __u32 chunkId) +{ -+ ++ + yaffs_Tnode *tn = fStruct->top; + __u32 i; -+ int requiredTallness; ++ int requiredTallness; + int level = fStruct->topLevel; -+ -+ // Check sane level and chunk Id -+ if(level < 0 || level > YAFFS_TNODES_MAX_LEVEL) -+ { -+// char str[50]; -+// sprintf(str,"Bad level %d",level); -+// YALERT(str); ++ ++ /* Check sane level and chunk Id */ ++ if (level < 0 || level > YAFFS_TNODES_MAX_LEVEL) { + return NULL; + } -+ -+ if(chunkId > YAFFS_MAX_CHUNK_ID) -+ { -+// char str[50]; -+// sprintf(str,"Bad chunkId %d",chunkId); -+// YALERT(str); ++ ++ if (chunkId > YAFFS_MAX_CHUNK_ID) { + return NULL; + } + -+ // First check we're tall enough (ie enough topLevel) -+ -+ i = chunkId >> (/*dev->chunkGroupBits + */YAFFS_TNODES_LEVEL0_BITS); ++ /* First check we're tall enough (ie enough topLevel) */ ++ ++ i = chunkId >> YAFFS_TNODES_LEVEL0_BITS; + requiredTallness = 0; -+ while(i) -+ { ++ while (i) { + i >>= YAFFS_TNODES_INTERNAL_BITS; + requiredTallness++; + } -+ -+ -+ if(requiredTallness > fStruct->topLevel) -+ { -+ // Not tall enough, so we can't find it, return NULL. ++ ++ if (requiredTallness > fStruct->topLevel) { ++ /* Not tall enough, so we can't find it, return NULL. */ + return NULL; + } -+ -+ -+ // Traverse down to level 0 -+ while (level > 0 && tn) -+ { -+ tn = tn->internal[(chunkId >>(/* dev->chunkGroupBits + */ YAFFS_TNODES_LEVEL0_BITS + (level-1) * YAFFS_TNODES_INTERNAL_BITS)) & -+ YAFFS_TNODES_INTERNAL_MASK]; ++ ++ /* Traverse down to level 0 */ ++ while (level > 0 && tn) { ++ tn = tn-> ++ internal[(chunkId >> ++ ( YAFFS_TNODES_LEVEL0_BITS + ++ (level - 1) * ++ YAFFS_TNODES_INTERNAL_BITS) ++ ) & ++ YAFFS_TNODES_INTERNAL_MASK]; + level--; -+ ++ + } -+ -+ return tn; ++ ++ return tn; +} + -+// AddOrFindLevel0Tnode finds the level 0 tnode if it exists, otherwise first expands the tree. -+// This happens in two steps: -+// 1. If the tree isn't tall enough, then make it taller. -+// 2. Scan down the tree towards the level 0 tnode adding tnodes if required. -+// -+// Used when modifying the tree. -+// -+static yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device *dev, yaffs_FileStructure *fStruct, __u32 chunkId) ++/* AddOrFindLevel0Tnode finds the level 0 tnode if it exists, otherwise first expands the tree. ++ * This happens in two steps: ++ * 1. If the tree isn't tall enough, then make it taller. ++ * 2. Scan down the tree towards the level 0 tnode adding tnodes if required. ++ * ++ * Used when modifying the tree. ++ * ++ * If the tn argument is NULL, then a fresh tnode will be added otherwise the specified tn will ++ * be plugged into the ttree. ++ */ ++ ++static yaffs_Tnode *yaffs_AddOrFindLevel0Tnode(yaffs_Device * dev, ++ yaffs_FileStructure * fStruct, ++ __u32 chunkId, ++ yaffs_Tnode *passedTn) +{ -+ -+ yaffs_Tnode *tn; -+ ++ + int requiredTallness; + int i; + int l; -+ ++ yaffs_Tnode *tn; ++ + __u32 x; -+ -+ -+ //T((TSTR("AddOrFind topLevel=%d, chunk=%d"),fStruct->topLevel,chunkId)); -+ -+ // Check sane level and page Id -+ if(fStruct->topLevel < 0 || fStruct->topLevel > YAFFS_TNODES_MAX_LEVEL) -+ { -+// char str[50]; -+// sprintf(str,"Bad level %d",fStruct->topLevel); -+// YALERT(str); ++ ++ ++ /* Check sane level and page Id */ ++ if (fStruct->topLevel < 0 || fStruct->topLevel > YAFFS_TNODES_MAX_LEVEL) { + return NULL; + } -+ -+ if(chunkId > YAFFS_MAX_CHUNK_ID) -+ { -+// char str[50]; -+// sprintf(str,"Bad chunkId %d",chunkId); -+// YALERT(str); ++ ++ if (chunkId > YAFFS_MAX_CHUNK_ID) { + return NULL; + } -+ -+ // First check we're tall enough (ie enough topLevel) -+ -+ x = chunkId >> (/*dev->chunkGroupBits + */YAFFS_TNODES_LEVEL0_BITS); ++ ++ /* First check we're tall enough (ie enough topLevel) */ ++ ++ x = chunkId >> YAFFS_TNODES_LEVEL0_BITS; + requiredTallness = 0; -+ while(x) -+ { ++ while (x) { + x >>= YAFFS_TNODES_INTERNAL_BITS; + requiredTallness++; + } -+ -+ //T((TSTR(" required=%d"),requiredTallness)); -+ -+ -+ if(requiredTallness > fStruct->topLevel) -+ { -+ // Not tall enough,gotta make the tree taller -+ for(i = fStruct->topLevel; i < requiredTallness; i++) -+ { -+ //T((TSTR(" add new top"))); -+ ++ ++ ++ if (requiredTallness > fStruct->topLevel) { ++ /* Not tall enough,gotta make the tree taller */ ++ for (i = fStruct->topLevel; i < requiredTallness; i++) { ++ + tn = yaffs_GetTnode(dev); -+ -+ if(tn) -+ { ++ ++ if (tn) { + tn->internal[0] = fStruct->top; + fStruct->top = tn; -+ } -+ else -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("yaffs: no more tnodes" TENDSTR))); ++ } else { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("yaffs: no more tnodes" TENDSTR))); + } + } -+ ++ + fStruct->topLevel = requiredTallness; + } -+ -+ -+ // Traverse down to level 0, adding anything we need -+ ++ ++ /* Traverse down to level 0, adding anything we need */ ++ + l = fStruct->topLevel; + tn = fStruct->top; -+ while (l > 0 && tn) -+ { -+ x = (chunkId >> (/*dev->chunkGroupBits + */YAFFS_TNODES_LEVEL0_BITS + (l-1) * YAFFS_TNODES_INTERNAL_BITS)) & -+ YAFFS_TNODES_INTERNAL_MASK; -+ -+ //T((TSTR(" [%d:%d]"),l,i)); -+ -+ if(!tn->internal[x]) -+ { -+ //T((TSTR(" added"))); -+ -+ tn->internal[x] = yaffs_GetTnode(dev); -+ } -+ -+ tn = tn->internal[x]; -+ l--; + ++ if(l > 0) { ++ while (l > 0 && tn) { ++ x = (chunkId >> ++ ( YAFFS_TNODES_LEVEL0_BITS + ++ (l - 1) * YAFFS_TNODES_INTERNAL_BITS)) & ++ YAFFS_TNODES_INTERNAL_MASK; ++ ++ ++ if((l>1) && !tn->internal[x]){ ++ /* Add missing non-level-zero tnode */ ++ tn->internal[x] = yaffs_GetTnode(dev); ++ ++ } else if(l == 1) { ++ /* Looking from level 1 at level 0 */ ++ if (passedTn) { ++ /* If we already have one, then release it.*/ ++ if(tn->internal[x]) ++ yaffs_FreeTnode(dev,tn->internal[x]); ++ tn->internal[x] = passedTn; ++ ++ } else if(!tn->internal[x]) { ++ /* Don't have one, none passed in */ ++ tn->internal[x] = yaffs_GetTnode(dev); ++ } ++ } ++ ++ tn = tn->internal[x]; ++ l--; ++ } ++ } else { ++ /* top is level 0 */ ++ if(passedTn) { ++ memcpy(tn,passedTn,(dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8); ++ yaffs_FreeTnode(dev,passedTn); ++ } + } -+ -+ //TSTR(TENDSTR))); -+ -+ return tn; -+} + ++ return tn; ++} + -+static int yaffs_FindChunkInGroup(yaffs_Device *dev, int theChunk, yaffs_ExtendedTags *tags, int objectId, int chunkInInode) ++static int yaffs_FindChunkInGroup(yaffs_Device * dev, int theChunk, ++ yaffs_ExtendedTags * tags, int objectId, ++ int chunkInInode) +{ + int j; -+ -+ -+ for(j = 0; theChunk && j < dev->chunkGroupSize; j++) -+ { -+ if(yaffs_CheckChunkBit(dev,theChunk / dev->nChunksPerBlock,theChunk % dev->nChunksPerBlock)) -+ { -+ yaffs_ReadChunkWithTagsFromNAND(dev,theChunk,NULL,tags); -+ if(yaffs_TagsMatch(tags,objectId,chunkInInode)) -+ { -+ // found it; ++ ++ for (j = 0; theChunk && j < dev->chunkGroupSize; j++) { ++ if (yaffs_CheckChunkBit ++ (dev, theChunk / dev->nChunksPerBlock, ++ theChunk % dev->nChunksPerBlock)) { ++ yaffs_ReadChunkWithTagsFromNAND(dev, theChunk, NULL, ++ tags); ++ if (yaffs_TagsMatch(tags, objectId, chunkInInode)) { ++ /* found it; */ + return theChunk; -+ ++ + } + } + theChunk++; @@ -3402,11 +4440,15 @@ index 0000000..bf13f91 + return -1; +} + -+// DeleteWorker scans backwards through the tnode tree and deletes all the -+// chunks and tnodes in the file -+// Returns 1 if the tree was deleted. Returns 0 if it stopped early due to hitting the limit and the delete is incomplete. + -+static int yaffs_DeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level, int chunkOffset,int *limit) ++/* DeleteWorker scans backwards through the tnode tree and deletes all the ++ * chunks and tnodes in the file ++ * Returns 1 if the tree was deleted. ++ * Returns 0 if it stopped early due to hitting the limit and the delete is incomplete. ++ */ ++ ++static int yaffs_DeleteWorker(yaffs_Object * in, yaffs_Tnode * tn, __u32 level, ++ int chunkOffset, int *limit) +{ + int i; + int chunkInInode; @@ -3416,633 +4458,584 @@ index 0000000..bf13f91 + yaffs_Device *dev = in->myDev; + + int allDone = 1; -+ -+ -+ if(tn) -+ { -+ if(level > 0) -+ { -+ -+ for(i = YAFFS_NTNODES_INTERNAL -1; allDone && i >= 0; i--) -+ { -+ if(tn->internal[i]) -+ { -+ if(limit && (*limit) < 0) -+ { ++ ++ if (tn) { ++ if (level > 0) { ++ ++ for (i = YAFFS_NTNODES_INTERNAL - 1; allDone && i >= 0; ++ i--) { ++ if (tn->internal[i]) { ++ if (limit && (*limit) < 0) { + allDone = 0; ++ } else { ++ allDone = ++ yaffs_DeleteWorker(in, ++ tn-> ++ internal ++ [i], ++ level - ++ 1, ++ (chunkOffset ++ << ++ YAFFS_TNODES_INTERNAL_BITS) ++ + i, ++ limit); + } -+ else -+ { -+ allDone = yaffs_DeleteWorker(in,tn->internal[i],level - 1, -+ (chunkOffset << YAFFS_TNODES_INTERNAL_BITS ) + i ,limit); -+ } -+ if(allDone) -+ { -+ yaffs_FreeTnode(dev,tn->internal[i]); -+ tn->internal[i] = NULL; ++ if (allDone) { ++ yaffs_FreeTnode(dev, ++ tn-> ++ internal[i]); ++ tn->internal[i] = NULL; + } -+ } -+ ++ } ++ + } + return (allDone) ? 1 : 0; -+ } -+ else if(level == 0) -+ { ++ } else if (level == 0) { + int hitLimit = 0; -+ -+ for(i = YAFFS_NTNODES_LEVEL0 -1; i >= 0 && !hitLimit; i--) -+ { -+ if(tn->level0[i]) -+ { -+ -+ chunkInInode = (chunkOffset << YAFFS_TNODES_LEVEL0_BITS ) + i; -+ -+ theChunk = tn->level0[i] << dev->chunkGroupBits; -+ -+ foundChunk = yaffs_FindChunkInGroup(dev,theChunk,&tags,in->objectId,chunkInInode); -+ -+ if(foundChunk > 0) -+ { -+ yaffs_DeleteChunk(dev,foundChunk,1,__LINE__); ++ ++ for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0 && !hitLimit; ++ i--) { ++ theChunk = yaffs_GetChunkGroupBase(dev,tn,i); ++ if (theChunk) { ++ ++ chunkInInode = ++ (chunkOffset << ++ YAFFS_TNODES_LEVEL0_BITS) + i; ++ ++ foundChunk = ++ yaffs_FindChunkInGroup(dev, ++ theChunk, ++ &tags, ++ in->objectId, ++ chunkInInode); ++ ++ if (foundChunk > 0) { ++ yaffs_DeleteChunk(dev, ++ foundChunk, 1, ++ __LINE__); + in->nDataChunks--; -+ if(limit) -+ { -+ *limit = *limit-1; -+ if(*limit <= 0) -+ { ++ if (limit) { ++ *limit = *limit - 1; ++ if (*limit <= 0) { + hitLimit = 1; + } + } -+ ++ + } -+ -+ tn->level0[i] = 0; -+ } -+ ++ ++ yaffs_PutLevel0Tnode(dev,tn,i,0); ++ } ++ + } + return (i < 0) ? 1 : 0; + -+ + } -+ ++ + } -+ ++ + return 1; -+ -+} + ++} + -+static void yaffs_SoftDeleteChunk(yaffs_Device *dev, int chunk) ++static void yaffs_SoftDeleteChunk(yaffs_Device * dev, int chunk) +{ + -+ yaffs_BlockInfo *theBlock; -+ -+ T(YAFFS_TRACE_DELETION,(TSTR("soft delete chunk %d" TENDSTR),chunk)); -+ -+ theBlock = yaffs_GetBlockInfo(dev, chunk/dev->nChunksPerBlock); -+ if(theBlock) -+ { ++ yaffs_BlockInfo *theBlock; ++ ++ T(YAFFS_TRACE_DELETION, (TSTR("soft delete chunk %d" TENDSTR), chunk)); ++ ++ theBlock = yaffs_GetBlockInfo(dev, chunk / dev->nChunksPerBlock); ++ if (theBlock) { + theBlock->softDeletions++; + dev->nFreeChunks++; + } +} + -+// SoftDeleteWorker scans backwards through the tnode tree and soft deletes all the chunks in the file. -+// All soft deleting does is increment the block's softdelete count and pulls the chunk out -+// of the tnode. -+// THus, essentially this is the same as DeleteWorker except that the chunks are soft deleted. -+// -+static int yaffs_SoftDeleteWorker(yaffs_Object *in, yaffs_Tnode *tn, __u32 level, int chunkOffset) ++/* SoftDeleteWorker scans backwards through the tnode tree and soft deletes all the chunks in the file. ++ * All soft deleting does is increment the block's softdelete count and pulls the chunk out ++ * of the tnode. ++ * Thus, essentially this is the same as DeleteWorker except that the chunks are soft deleted. ++ */ ++ ++static int yaffs_SoftDeleteWorker(yaffs_Object * in, yaffs_Tnode * tn, ++ __u32 level, int chunkOffset) +{ + int i; + int theChunk; + int allDone = 1; + yaffs_Device *dev = in->myDev; -+ -+ -+ if(tn) -+ { -+ if(level > 0) -+ { -+ -+ for(i = YAFFS_NTNODES_INTERNAL -1; allDone && i >= 0; i--) -+ { -+ if(tn->internal[i]) -+ { -+ allDone = yaffs_SoftDeleteWorker(in,tn->internal[i],level - 1, -+ (chunkOffset << YAFFS_TNODES_INTERNAL_BITS ) + i); -+ if(allDone) -+ { -+ yaffs_FreeTnode(dev,tn->internal[i]); -+ tn->internal[i] = NULL; ++ ++ if (tn) { ++ if (level > 0) { ++ ++ for (i = YAFFS_NTNODES_INTERNAL - 1; allDone && i >= 0; ++ i--) { ++ if (tn->internal[i]) { ++ allDone = ++ yaffs_SoftDeleteWorker(in, ++ tn-> ++ internal[i], ++ level - 1, ++ (chunkOffset ++ << ++ YAFFS_TNODES_INTERNAL_BITS) ++ + i); ++ if (allDone) { ++ yaffs_FreeTnode(dev, ++ tn-> ++ internal[i]); ++ tn->internal[i] = NULL; ++ } else { ++ /* Hoosterman... how could this happen? */ + } -+ else -+ { -+ //Hoosterman... how could this happen. -+ } -+ } ++ } + } + return (allDone) ? 1 : 0; -+ } -+ else if(level == 0) -+ { -+ -+ for(i = YAFFS_NTNODES_LEVEL0 -1; i >=0; i--) -+ { -+ if(tn->level0[i]) -+ { -+ // Note this does not find the real chunk, only the chunk group. -+ // We make an assumption that a chunk group is niot larger than a block. -+ theChunk = (tn->level0[i] << dev->chunkGroupBits); -+ -+ yaffs_SoftDeleteChunk(dev,theChunk); -+ tn->level0[i] = 0; -+ } -+ ++ } else if (level == 0) { ++ ++ for (i = YAFFS_NTNODES_LEVEL0 - 1; i >= 0; i--) { ++ theChunk = yaffs_GetChunkGroupBase(dev,tn,i); ++ if (theChunk) { ++ /* Note this does not find the real chunk, only the chunk group. ++ * We make an assumption that a chunk group is not larger than ++ * a block. ++ */ ++ yaffs_SoftDeleteChunk(dev, theChunk); ++ yaffs_PutLevel0Tnode(dev,tn,i,0); ++ } ++ + } + return 1; -+ ++ + } -+ ++ + } -+ -+ return 1; -+ -+} + ++ return 1; + ++} + -+static void yaffs_SoftDeleteFile(yaffs_Object *obj) ++static void yaffs_SoftDeleteFile(yaffs_Object * obj) +{ -+ if(obj->deleted && -+ obj->variantType == YAFFS_OBJECT_TYPE_FILE && -+ !obj->softDeleted) -+ { -+ if(obj->nDataChunks <= 0) -+ { -+ // Empty file with no duplicate object headers, just delete it immediately -+ yaffs_FreeTnode(obj->myDev,obj->variant.fileVariant.top); -+ obj->variant.fileVariant.top = NULL; -+ T(YAFFS_TRACE_TRACING,(TSTR("yaffs: Deleting empty file %d" TENDSTR),obj->objectId)); -+ yaffs_DoGenericObjectDeletion(obj); -+ } -+ else -+ { -+ yaffs_SoftDeleteWorker(obj, obj->variant.fileVariant.top, obj->variant.fileVariant.topLevel, 0); ++ if (obj->deleted && ++ obj->variantType == YAFFS_OBJECT_TYPE_FILE && !obj->softDeleted) { ++ if (obj->nDataChunks <= 0) { ++ /* Empty file with no duplicate object headers, just delete it immediately */ ++ yaffs_FreeTnode(obj->myDev, ++ obj->variant.fileVariant.top); ++ obj->variant.fileVariant.top = NULL; ++ T(YAFFS_TRACE_TRACING, ++ (TSTR("yaffs: Deleting empty file %d" TENDSTR), ++ obj->objectId)); ++ yaffs_DoGenericObjectDeletion(obj); ++ } else { ++ yaffs_SoftDeleteWorker(obj, ++ obj->variant.fileVariant.top, ++ obj->variant.fileVariant. ++ topLevel, 0); + obj->softDeleted = 1; + } + } +} + ++/* Pruning removes any part of the file structure tree that is beyond the ++ * bounds of the file (ie that does not point to chunks). ++ * ++ * A file should only get pruned when its size is reduced. ++ * ++ * Before pruning, the chunks must be pulled from the tree and the ++ * level 0 tnode entries must be zeroed out. ++ * Could also use this for file deletion, but that's probably better handled ++ * by a special case. ++ */ + -+ -+ -+ -+// Pruning removes any part of the file structure tree that is beyond the -+// bounds of the file (ie that does not point to chunks). -+// -+// A file should only get pruned when its size is reduced. -+// -+// Before pruning, the chunks must be pulled from the tree and the -+// level 0 tnode entries must be zeroed out. -+// Could also use this for file deletion, but that's probably better handled -+// by a special case. -+ -+// yaffs_PruneWorker should only be called by yaffs_PruneFileStructure() -+ -+static yaffs_Tnode *yaffs_PruneWorker(yaffs_Device *dev, yaffs_Tnode *tn, __u32 level, int del0) ++static yaffs_Tnode *yaffs_PruneWorker(yaffs_Device * dev, yaffs_Tnode * tn, ++ __u32 level, int del0) +{ + int i; + int hasData; -+ -+ if(tn) -+ { ++ ++ if (tn) { + hasData = 0; -+ -+ for(i = 0; i < YAFFS_NTNODES_INTERNAL; i++) -+ { -+ if(tn->internal[i] && level > 0) -+ { -+ tn->internal[i] = yaffs_PruneWorker(dev,tn->internal[i],level - 1, ( i == 0) ? del0 : 1); -+ } -+ -+ if(tn->internal[i]) -+ { -+ hasData++; ++ ++ for (i = 0; i < YAFFS_NTNODES_INTERNAL; i++) { ++ if (tn->internal[i] && level > 0) { ++ tn->internal[i] = ++ yaffs_PruneWorker(dev, tn->internal[i], ++ level - 1, ++ (i == 0) ? del0 : 1); ++ } ++ ++ if (tn->internal[i]) { ++ hasData++; + } + } -+ -+ if(hasData == 0 && del0) -+ { -+ // Free and return NULL -+ -+ yaffs_FreeTnode(dev,tn); ++ ++ if (hasData == 0 && del0) { ++ /* Free and return NULL */ ++ ++ yaffs_FreeTnode(dev, tn); + tn = NULL; + } -+ ++ + } + + return tn; -+ ++ +} + -+static int yaffs_PruneFileStructure(yaffs_Device *dev, yaffs_FileStructure *fStruct) ++static int yaffs_PruneFileStructure(yaffs_Device * dev, ++ yaffs_FileStructure * fStruct) +{ + int i; + int hasData; + int done = 0; + yaffs_Tnode *tn; -+ -+ if(fStruct->topLevel > 0) -+ { -+ fStruct->top = yaffs_PruneWorker(dev,fStruct->top, fStruct->topLevel,0); -+ -+ // Now we have a tree with all the non-zero branches NULL but the height -+ // is the same as it was. -+ // Let's see if we can trim internal tnodes to shorten the tree. -+ // We can do this if only the 0th element in the tnode is in use -+ // (ie all the non-zero are NULL) -+ -+ while(fStruct->topLevel && !done) -+ { ++ ++ if (fStruct->topLevel > 0) { ++ fStruct->top = ++ yaffs_PruneWorker(dev, fStruct->top, fStruct->topLevel, 0); ++ ++ /* Now we have a tree with all the non-zero branches NULL but the height ++ * is the same as it was. ++ * Let's see if we can trim internal tnodes to shorten the tree. ++ * We can do this if only the 0th element in the tnode is in use ++ * (ie all the non-zero are NULL) ++ */ ++ ++ while (fStruct->topLevel && !done) { + tn = fStruct->top; -+ ++ + hasData = 0; -+ for(i = 1; i <YAFFS_NTNODES_INTERNAL; i++) -+ { -+ if(tn->internal[i]) -+ { -+ hasData++; ++ for (i = 1; i < YAFFS_NTNODES_INTERNAL; i++) { ++ if (tn->internal[i]) { ++ hasData++; + } + } -+ -+ if(!hasData) -+ { ++ ++ if (!hasData) { + fStruct->top = tn->internal[0]; + fStruct->topLevel--; -+ yaffs_FreeTnode(dev,tn); -+ } -+ else -+ { ++ yaffs_FreeTnode(dev, tn); ++ } else { + done = 1; + } + } + } -+ ++ + return YAFFS_OK; +} + ++/*-------------------- End of File Structure functions.-------------------*/ + ++/* yaffs_CreateFreeObjects creates a bunch more objects and ++ * adds them to the object free list. ++ */ ++static int yaffs_CreateFreeObjects(yaffs_Device * dev, int nObjects) ++{ ++ int i; ++ yaffs_Object *newObjects; ++ yaffs_ObjectList *list; + ++ if (nObjects < 1) ++ return YAFFS_OK; + ++ /* make these things */ ++ newObjects = YMALLOC(nObjects * sizeof(yaffs_Object)); + -+/////////////////////// End of File Structure functions. ///////////////// -+ -+// yaffs_CreateFreeObjects creates a bunch more objects and -+// adds them to the object free list. -+static int yaffs_CreateFreeObjects(yaffs_Device *dev, int nObjects) -+{ -+ int i; -+ yaffs_Object *newObjects; -+ yaffs_ObjectList *list; -+ -+ if(nObjects < 1) return YAFFS_OK; -+ -+ // make these things -+ -+ newObjects = YMALLOC(nObjects * sizeof(yaffs_Object)); -+ -+ if (!newObjects) -+ { -+ T(YAFFS_TRACE_ALLOCATE,(TSTR("yaffs: Could not allocate more objects" TENDSTR))); ++ if (!newObjects) { ++ T(YAFFS_TRACE_ALLOCATE, ++ (TSTR("yaffs: Could not allocate more objects" TENDSTR))); + return YAFFS_FAIL; -+ } -+ -+ // Hook them into the free list -+ for(i = 0; i < nObjects - 1; i++) -+ { -+ newObjects[i].siblings.next = (struct list_head *)(&newObjects[i+1]); -+ } -+ ++ } ++ ++ /* Hook them into the free list */ ++ for (i = 0; i < nObjects - 1; i++) { ++ newObjects[i].siblings.next = ++ (struct list_head *)(&newObjects[i + 1]); ++ } ++ + newObjects[nObjects - 1].siblings.next = (void *)dev->freeObjects; + dev->freeObjects = newObjects; -+ dev->nFreeObjects+= nObjects; -+ dev->nObjectsCreated+= nObjects; -+ -+ // Now add this bunch of Objects to a list for freeing up. -+ ++ dev->nFreeObjects += nObjects; ++ dev->nObjectsCreated += nObjects; ++ ++ /* Now add this bunch of Objects to a list for freeing up. */ ++ + list = YMALLOC(sizeof(yaffs_ObjectList)); -+ if(!list) -+ { -+ T(YAFFS_TRACE_ALLOCATE,(TSTR("Could not add objects to management list" TENDSTR))); -+ } -+ else -+ { ++ if (!list) { ++ T(YAFFS_TRACE_ALLOCATE, ++ (TSTR("Could not add objects to management list" TENDSTR))); ++ } else { + list->objects = newObjects; + list->next = dev->allocatedObjectList; + dev->allocatedObjectList = list; + } -+ -+ -+ ++ + return YAFFS_OK; +} + + -+// AllocateEmptyObject gets us a clean Object. Tries to make allocate more if we run out -+static yaffs_Object *yaffs_AllocateEmptyObject(yaffs_Device *dev) ++/* AllocateEmptyObject gets us a clean Object. Tries to make allocate more if we run out */ ++static yaffs_Object *yaffs_AllocateEmptyObject(yaffs_Device * dev) +{ + yaffs_Object *tn = NULL; -+ -+ // If there are none left make more -+ if(!dev->freeObjects) -+ { -+ yaffs_CreateFreeObjects(dev,YAFFS_ALLOCATION_NOBJECTS); ++ ++ /* If there are none left make more */ ++ if (!dev->freeObjects) { ++ yaffs_CreateFreeObjects(dev, YAFFS_ALLOCATION_NOBJECTS); + } -+ -+ if(dev->freeObjects) -+ { ++ ++ if (dev->freeObjects) { + tn = dev->freeObjects; -+ dev->freeObjects = (yaffs_Object *)(dev->freeObjects->siblings.next); ++ dev->freeObjects = ++ (yaffs_Object *) (dev->freeObjects->siblings.next); + dev->nFreeObjects--; -+ -+ // Now sweeten it up... -+ -+ memset(tn,0,sizeof(yaffs_Object)); ++ ++ /* Now sweeten it up... */ ++ ++ memset(tn, 0, sizeof(yaffs_Object)); + tn->myDev = dev; + tn->chunkId = -1; + tn->variantType = YAFFS_OBJECT_TYPE_UNKNOWN; + INIT_LIST_HEAD(&(tn->hardLinks)); + INIT_LIST_HEAD(&(tn->hashLink)); + INIT_LIST_HEAD(&tn->siblings); -+ -+ // Add it to the lost and found directory. -+ // NB Can't put root or lostNFound in lostNFound so -+ // check if lostNFound exists first -+ if(dev->lostNFoundDir) -+ { -+ yaffs_AddObjectToDirectory(dev->lostNFoundDir,tn); ++ ++ /* Add it to the lost and found directory. ++ * NB Can't put root or lostNFound in lostNFound so ++ * check if lostNFound exists first ++ */ ++ if (dev->lostNFoundDir) { ++ yaffs_AddObjectToDirectory(dev->lostNFoundDir, tn); + } + } -+ + + return tn; +} + -+static yaffs_Object *yaffs_CreateFakeDirectory(yaffs_Device *dev,int number,__u32 mode) ++static yaffs_Object *yaffs_CreateFakeDirectory(yaffs_Device * dev, int number, ++ __u32 mode) +{ + -+ yaffs_Object *obj = yaffs_CreateNewObject(dev,number,YAFFS_OBJECT_TYPE_DIRECTORY); -+ if(obj) -+ { -+ obj->fake = 1; // it is fake so it has no NAND presence... -+ obj->renameAllowed= 0; // ... and we're not allowed to rename it... -+ obj->unlinkAllowed= 0; // ... or unlink it ++ yaffs_Object *obj = ++ yaffs_CreateNewObject(dev, number, YAFFS_OBJECT_TYPE_DIRECTORY); ++ if (obj) { ++ obj->fake = 1; /* it is fake so it has no NAND presence... */ ++ obj->renameAllowed = 0; /* ... and we're not allowed to rename it... */ ++ obj->unlinkAllowed = 0; /* ... or unlink it */ + obj->deleted = 0; + obj->unlinked = 0; + obj->yst_mode = mode; + obj->myDev = dev; -+ obj->chunkId = 0; // Not a valid chunk. ++ obj->chunkId = 0; /* Not a valid chunk. */ + } -+ ++ + return obj; -+ -+} + ++} + -+static void yaffs_UnhashObject(yaffs_Object *tn) ++static void yaffs_UnhashObject(yaffs_Object * tn) +{ + int bucket; + yaffs_Device *dev = tn->myDev; -+ -+ -+ // If it is still linked into the bucket list, free from the list -+ if(!list_empty(&tn->hashLink)) -+ { ++ ++ /* If it is still linked into the bucket list, free from the list */ ++ if (!list_empty(&tn->hashLink)) { + list_del_init(&tn->hashLink); -+ bucket = yaffs_HashFunction(tn->objectId); ++ bucket = yaffs_HashFunction(tn->objectId); + dev->objectBucket[bucket].count--; + } -+ -+} + ++} + -+// FreeObject frees up a Object and puts it back on the free list -+static void yaffs_FreeObject(yaffs_Object *tn) ++/* FreeObject frees up a Object and puts it back on the free list */ ++static void yaffs_FreeObject(yaffs_Object * tn) +{ + + yaffs_Device *dev = tn->myDev; -+ ++ +#ifdef __KERNEL__ -+ if(tn->myInode) -+ { -+ // We're still hooked up to a cached inode. -+ // Don't delete now, but mark for later deletion ++ if (tn->myInode) { ++ /* We're still hooked up to a cached inode. ++ * Don't delete now, but mark for later deletion ++ */ + tn->deferedFree = 1; + return; + } +#endif -+ ++ + yaffs_UnhashObject(tn); -+ -+ // Link into the free list. ++ ++ /* Link into the free list. */ + tn->siblings.next = (struct list_head *)(dev->freeObjects); + dev->freeObjects = tn; + dev->nFreeObjects++; +} + -+ -+ +#ifdef __KERNEL__ + -+void yaffs_HandleDeferedFree(yaffs_Object *obj) ++void yaffs_HandleDeferedFree(yaffs_Object * obj) +{ -+ if(obj->deferedFree) -+ { -+ yaffs_FreeObject(obj); ++ if (obj->deferedFree) { ++ yaffs_FreeObject(obj); + } +} + +#endif + -+ -+ -+static void yaffs_DeinitialiseObjects(yaffs_Device *dev) ++static void yaffs_DeinitialiseObjects(yaffs_Device * dev) +{ -+ // Free the list of allocated Objects -+ ++ /* Free the list of allocated Objects */ ++ + yaffs_ObjectList *tmp; -+ -+ while( dev->allocatedObjectList) -+ { -+ tmp = dev->allocatedObjectList->next; ++ ++ while (dev->allocatedObjectList) { ++ tmp = dev->allocatedObjectList->next; + YFREE(dev->allocatedObjectList->objects); + YFREE(dev->allocatedObjectList); -+ -+ dev->allocatedObjectList = tmp; ++ ++ dev->allocatedObjectList = tmp; + } -+ ++ + dev->freeObjects = NULL; + dev->nFreeObjects = 0; +} + -+static void yaffs_InitialiseObjects(yaffs_Device *dev) ++static void yaffs_InitialiseObjects(yaffs_Device * dev) +{ + int i; -+ ++ + dev->allocatedObjectList = NULL; + dev->freeObjects = NULL; + dev->nFreeObjects = 0; -+ -+ for(i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) -+ { ++ ++ for (i = 0; i < YAFFS_NOBJECT_BUCKETS; i++) { + INIT_LIST_HEAD(&dev->objectBucket[i].list); -+ dev->objectBucket[i].count = 0; ++ dev->objectBucket[i].count = 0; + } + +} + -+ -+ -+ -+ -+ -+static int yaffs_FindNiceObjectBucket(yaffs_Device *dev) ++static int yaffs_FindNiceObjectBucket(yaffs_Device * dev) +{ + static int x = 0; + int i; + int l = 999; + int lowest = 999999; + -+ -+ // First let's see if we can find one that's empty. -+ -+ for(i = 0; i < 10 && lowest > 0; i++) -+ { ++ /* First let's see if we can find one that's empty. */ ++ ++ for (i = 0; i < 10 && lowest > 0; i++) { + x++; -+ x %= YAFFS_NOBJECT_BUCKETS; -+ if(dev->objectBucket[x].count < lowest) -+ { ++ x %= YAFFS_NOBJECT_BUCKETS; ++ if (dev->objectBucket[x].count < lowest) { + lowest = dev->objectBucket[x].count; + l = x; + } -+ ++ + } -+ -+ // If we didn't find an empty list, then try -+ // looking a bit further for a short one -+ -+ for(i = 0; i < 10 && lowest > 3; i++) -+ { ++ ++ /* If we didn't find an empty list, then try ++ * looking a bit further for a short one ++ */ ++ ++ for (i = 0; i < 10 && lowest > 3; i++) { + x++; -+ x %= YAFFS_NOBJECT_BUCKETS; -+ if(dev->objectBucket[x].count < lowest) -+ { ++ x %= YAFFS_NOBJECT_BUCKETS; ++ if (dev->objectBucket[x].count < lowest) { + lowest = dev->objectBucket[x].count; + l = x; + } -+ ++ + } -+ ++ + return l; +} + -+static int yaffs_CreateNewObjectNumber(yaffs_Device *dev) ++static int yaffs_CreateNewObjectNumber(yaffs_Device * dev) +{ + int bucket = yaffs_FindNiceObjectBucket(dev); -+ -+ // Now find an object value that has not already been taken -+ // by scanning the list. -+ ++ ++ /* Now find an object value that has not already been taken ++ * by scanning the list. ++ */ ++ + int found = 0; + struct list_head *i; -+ -+ __u32 n = (__u32)bucket; + -+ //yaffs_CheckObjectHashSanity(); -+ -+ while(!found) -+ { ++ __u32 n = (__u32) bucket; ++ ++ /* yaffs_CheckObjectHashSanity(); */ ++ ++ while (!found) { + found = 1; -+ n += YAFFS_NOBJECT_BUCKETS; -+ if(1 ||dev->objectBucket[bucket].count > 0) -+ { -+ list_for_each(i,&dev->objectBucket[bucket].list) -+ { -+ // If there is already one in the list -+ if(i && list_entry(i, yaffs_Object,hashLink)->objectId == n) -+ { ++ n += YAFFS_NOBJECT_BUCKETS; ++ if (1 || dev->objectBucket[bucket].count > 0) { ++ list_for_each(i, &dev->objectBucket[bucket].list) { ++ /* If there is already one in the list */ ++ if (i ++ && list_entry(i, yaffs_Object, ++ hashLink)->objectId == n) { + found = 0; + } + } + } + } -+ -+ //T(("bucket %d count %d inode %d\n",bucket,yaffs_objectBucket[bucket].count,n); -+ -+ return n; ++ ++ ++ return n; +} + -+static void yaffs_HashObject(yaffs_Object *in) ++static void yaffs_HashObject(yaffs_Object * in) +{ + int bucket = yaffs_HashFunction(in->objectId); + yaffs_Device *dev = in->myDev; -+ -+ if(!list_empty(&in->hashLink)) -+ { -+ //YINFO("!!!"); -+ } + -+ -+ list_add(&in->hashLink,&dev->objectBucket[bucket].list); ++ list_add(&in->hashLink, &dev->objectBucket[bucket].list); + dev->objectBucket[bucket].count++; + +} + -+yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device *dev,__u32 number) ++yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device * dev, __u32 number) +{ + int bucket = yaffs_HashFunction(number); + struct list_head *i; + yaffs_Object *in; -+ -+ list_for_each(i,&dev->objectBucket[bucket].list) -+ { -+ // Look if it is in the list -+ if(i) -+ { -+ in = list_entry(i, yaffs_Object,hashLink); -+ if(in->objectId == number) -+ { ++ ++ list_for_each(i, &dev->objectBucket[bucket].list) { ++ /* Look if it is in the list */ ++ if (i) { ++ in = list_entry(i, yaffs_Object, hashLink); ++ if (in->objectId == number) { +#ifdef __KERNEL__ -+ // Don't tell the VFS about this one if it is defered free -+ if(in->deferedFree) -+ return NULL; ++ /* Don't tell the VFS about this one if it is defered free */ ++ if (in->deferedFree) ++ return NULL; +#endif -+ ++ + return in; + } + } + } -+ ++ + return NULL; +} + -+ -+ -+yaffs_Object *yaffs_CreateNewObject(yaffs_Device *dev,int number,yaffs_ObjectType type) ++yaffs_Object *yaffs_CreateNewObject(yaffs_Device * dev, int number, ++ yaffs_ObjectType type) +{ -+ ++ + yaffs_Object *theObject; + -+ if(number < 0) -+ { ++ if (number < 0) { + number = yaffs_CreateNewObjectNumber(dev); + } -+ ++ + theObject = yaffs_AllocateEmptyObject(dev); -+ -+ if(theObject) -+ { ++ ++ if (theObject) { + theObject->fake = 0; + theObject->renameAllowed = 1; + theObject->unlinkAllowed = 1; @@ -4051,779 +5044,721 @@ index 0000000..bf13f91 + theObject->variantType = type; +#ifdef CONFIG_YAFFS_WINCE + yfsd_WinFileTimeNow(theObject->win_atime); -+ theObject->win_ctime[0] = theObject->win_mtime[0] = theObject->win_atime[0]; -+ theObject->win_ctime[1] = theObject->win_mtime[1] = theObject->win_atime[1]; ++ theObject->win_ctime[0] = theObject->win_mtime[0] = ++ theObject->win_atime[0]; ++ theObject->win_ctime[1] = theObject->win_mtime[1] = ++ theObject->win_atime[1]; + +#else + -+ theObject->yst_atime = theObject->yst_mtime = theObject->yst_ctime = Y_CURRENT_TIME; -+#endif -+ switch(type) -+ { -+ case YAFFS_OBJECT_TYPE_FILE: -+ theObject->variant.fileVariant.fileSize = 0; -+ theObject->variant.fileVariant.scannedFileSize = 0; -+ theObject->variant.fileVariant.shrinkSize = 0xFFFFFFFF; // max __u32 -+ theObject->variant.fileVariant.topLevel = 0; -+ theObject->variant.fileVariant.top = yaffs_GetTnode(dev); -+ break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: -+ INIT_LIST_HEAD(&theObject->variant.directoryVariant.children); -+ break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: -+ // No action required -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: -+ // No action required -+ break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: -+ // No action required -+ break; -+ case YAFFS_OBJECT_TYPE_UNKNOWN: -+ // todo this should not happen -+ break; ++ theObject->yst_atime = theObject->yst_mtime = ++ theObject->yst_ctime = Y_CURRENT_TIME; ++#endif ++ switch (type) { ++ case YAFFS_OBJECT_TYPE_FILE: ++ theObject->variant.fileVariant.fileSize = 0; ++ theObject->variant.fileVariant.scannedFileSize = 0; ++ theObject->variant.fileVariant.shrinkSize = 0xFFFFFFFF; /* max __u32 */ ++ theObject->variant.fileVariant.topLevel = 0; ++ theObject->variant.fileVariant.top = ++ yaffs_GetTnode(dev); ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ INIT_LIST_HEAD(&theObject->variant.directoryVariant. ++ children); ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ /* No action required */ ++ break; ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ /* todo this should not happen */ ++ break; + } + } -+ ++ + return theObject; +} + -+static yaffs_Object *yaffs_FindOrCreateObjectByNumber(yaffs_Device *dev, int number,yaffs_ObjectType type) ++static yaffs_Object *yaffs_FindOrCreateObjectByNumber(yaffs_Device * dev, ++ int number, ++ yaffs_ObjectType type) +{ + yaffs_Object *theObject = NULL; -+ -+ if(number > 0) -+ { -+ theObject = yaffs_FindObjectByNumber(dev,number); ++ ++ if (number > 0) { ++ theObject = yaffs_FindObjectByNumber(dev, number); + } -+ -+ if(!theObject) -+ { -+ theObject = yaffs_CreateNewObject(dev,number,type); ++ ++ if (!theObject) { ++ theObject = yaffs_CreateNewObject(dev, number, type); + } -+ ++ + return theObject; + +} ++ + -+static YCHAR *yaffs_CloneString(const YCHAR *str) ++static YCHAR *yaffs_CloneString(const YCHAR * str) +{ + YCHAR *newStr = NULL; -+ -+ if(str && *str) -+ { ++ ++ if (str && *str) { + newStr = YMALLOC((yaffs_strlen(str) + 1) * sizeof(YCHAR)); -+ yaffs_strcpy(newStr,str); ++ yaffs_strcpy(newStr, str); + } + + return newStr; -+ ++ +} + -+// -+// Mknod (create) a new object. -+// equivalentObject only has meaning for a hard link; -+// aliasString only has meaning for a sumlink. -+// rdev only has meaning for devices (a subset of special objects) -+static yaffs_Object *yaffs_MknodObject( yaffs_ObjectType type, -+ yaffs_Object *parent, -+ const YCHAR *name, -+ __u32 mode, -+ __u32 uid, -+ __u32 gid, -+ yaffs_Object *equivalentObject, -+ const YCHAR *aliasString, -+ __u32 rdev) ++/* ++ * Mknod (create) a new object. ++ * equivalentObject only has meaning for a hard link; ++ * aliasString only has meaning for a sumlink. ++ * rdev only has meaning for devices (a subset of special objects) ++ */ ++ ++static yaffs_Object *yaffs_MknodObject(yaffs_ObjectType type, ++ yaffs_Object * parent, ++ const YCHAR * name, ++ __u32 mode, ++ __u32 uid, ++ __u32 gid, ++ yaffs_Object * equivalentObject, ++ const YCHAR * aliasString, __u32 rdev) +{ + yaffs_Object *in; + + yaffs_Device *dev = parent->myDev; -+ -+ // Check if the entry exists. If it does then fail the call since we don't want a dup. -+ if(yaffs_FindObjectByName(parent,name)) -+ { ++ ++ /* Check if the entry exists. If it does then fail the call since we don't want a dup.*/ ++ if (yaffs_FindObjectByName(parent, name)) { + return NULL; + } -+ -+ in = yaffs_CreateNewObject(dev,-1,type); -+ -+ if(in) -+ { ++ ++ in = yaffs_CreateNewObject(dev, -1, type); ++ ++ if (in) { + in->chunkId = -1; + in->valid = 1; + in->variantType = type; + -+ in->yst_mode = mode; -+ ++ in->yst_mode = mode; ++ +#ifdef CONFIG_YAFFS_WINCE + yfsd_WinFileTimeNow(in->win_atime); + in->win_ctime[0] = in->win_mtime[0] = in->win_atime[0]; + in->win_ctime[1] = in->win_mtime[1] = in->win_atime[1]; -+ ++ +#else + in->yst_atime = in->yst_mtime = in->yst_ctime = Y_CURRENT_TIME; + -+ in->yst_rdev = rdev; -+ in->yst_uid = uid; -+ in->yst_gid = gid; -+#endif ++ in->yst_rdev = rdev; ++ in->yst_uid = uid; ++ in->yst_gid = gid; ++#endif + in->nDataChunks = 0; + -+ yaffs_SetObjectName(in,name); ++ yaffs_SetObjectName(in, name); + in->dirty = 1; -+ -+ yaffs_AddObjectToDirectory(parent,in); -+ ++ ++ yaffs_AddObjectToDirectory(parent, in); ++ + in->myDev = parent->myDev; -+ -+ -+ switch(type) -+ { -+ case YAFFS_OBJECT_TYPE_SYMLINK: -+ in->variant.symLinkVariant.alias = yaffs_CloneString(aliasString); -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: -+ in->variant.hardLinkVariant.equivalentObject = equivalentObject; -+ in->variant.hardLinkVariant.equivalentObjectId = equivalentObject->objectId; -+ list_add(&in->hardLinks,&equivalentObject->hardLinks); -+ break; -+ case YAFFS_OBJECT_TYPE_FILE: // do nothing -+ case YAFFS_OBJECT_TYPE_DIRECTORY: // do nothing -+ case YAFFS_OBJECT_TYPE_SPECIAL: // do nothing -+ case YAFFS_OBJECT_TYPE_UNKNOWN: -+ break; ++ ++ switch (type) { ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ in->variant.symLinkVariant.alias = ++ yaffs_CloneString(aliasString); ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ in->variant.hardLinkVariant.equivalentObject = ++ equivalentObject; ++ in->variant.hardLinkVariant.equivalentObjectId = ++ equivalentObject->objectId; ++ list_add(&in->hardLinks, &equivalentObject->hardLinks); ++ break; ++ case YAFFS_OBJECT_TYPE_FILE: ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ /* do nothing */ ++ break; + } + -+ if(/*yaffs_GetNumberOfFreeChunks(dev) <= 0 || */ -+ yaffs_UpdateObjectHeader(in,name,0,0,0) < 0) -+ { -+ // Could not create the object header, fail the creation ++ if (yaffs_UpdateObjectHeader(in, name, 0, 0, 0) < 0) { ++ /* Could not create the object header, fail the creation */ + yaffs_DestroyObject(in); + in = NULL; + } + + } -+ ++ + return in; +} + -+yaffs_Object *yaffs_MknodFile(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid) ++yaffs_Object *yaffs_MknodFile(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid) +{ -+ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_FILE,parent,name,mode,uid,gid,NULL,NULL,0); ++ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_FILE, parent, name, mode, ++ uid, gid, NULL, NULL, 0); +} + -+yaffs_Object *yaffs_MknodDirectory(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid) ++yaffs_Object *yaffs_MknodDirectory(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid) +{ -+ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_DIRECTORY,parent,name,mode,uid,gid,NULL,NULL,0); ++ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_DIRECTORY, parent, name, ++ mode, uid, gid, NULL, NULL, 0); +} + -+yaffs_Object *yaffs_MknodSpecial(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid, __u32 rdev) ++yaffs_Object *yaffs_MknodSpecial(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid, __u32 rdev) +{ -+ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_SPECIAL,parent,name,mode,uid,gid,NULL,NULL,rdev); ++ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_SPECIAL, parent, name, mode, ++ uid, gid, NULL, NULL, rdev); +} + -+yaffs_Object *yaffs_MknodSymLink(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid,const YCHAR *alias) ++yaffs_Object *yaffs_MknodSymLink(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid, ++ const YCHAR * alias) +{ -+ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_SYMLINK,parent,name,mode,uid,gid,NULL,alias,0); ++ return yaffs_MknodObject(YAFFS_OBJECT_TYPE_SYMLINK, parent, name, mode, ++ uid, gid, NULL, alias, 0); +} + -+// NB yaffs_Link returns the object id of the equivalent object. -+yaffs_Object *yaffs_Link(yaffs_Object *parent, const YCHAR *name, yaffs_Object *equivalentObject) ++/* yaffs_Link returns the object id of the equivalent object.*/ ++yaffs_Object *yaffs_Link(yaffs_Object * parent, const YCHAR * name, ++ yaffs_Object * equivalentObject) +{ -+ // Get the real object in case we were fed a hard link as an equivalent object ++ /* Get the real object in case we were fed a hard link as an equivalent object */ + equivalentObject = yaffs_GetEquivalentObject(equivalentObject); -+ -+ if(yaffs_MknodObject(YAFFS_OBJECT_TYPE_HARDLINK,parent,name,0,0,0,equivalentObject,NULL,0)) -+ { ++ ++ if (yaffs_MknodObject ++ (YAFFS_OBJECT_TYPE_HARDLINK, parent, name, 0, 0, 0, ++ equivalentObject, NULL, 0)) { + return equivalentObject; -+ } -+ else -+ { ++ } else { + return NULL; + } -+ -+} + ++} + -+static int yaffs_ChangeObjectName(yaffs_Object *obj, yaffs_Object *newDir, const YCHAR *newName,int force,int shadows) ++static int yaffs_ChangeObjectName(yaffs_Object * obj, yaffs_Object * newDir, ++ const YCHAR * newName, int force, int shadows) +{ + int unlinkOp; + int deleteOp; -+ -+ yaffs_Object * existingTarget; + -+ if(newDir == NULL) -+ { -+ newDir = obj->parent; // use the old directory ++ yaffs_Object *existingTarget; ++ ++ if (newDir == NULL) { ++ newDir = obj->parent; /* use the old directory */ + } -+ -+ if(newDir->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragendy: yaffs_ChangeObjectName: newDir is not a directory"TENDSTR))); ++ ++ if (newDir->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragendy: yaffs_ChangeObjectName: newDir is not a directory" ++ TENDSTR))); + YBUG(); + } -+ -+ // TODO: Do we need this different handling for YAFFS2 and YAFFS1?? -+ if(obj->myDev->isYaffs2) -+ { ++ ++ /* TODO: Do we need this different handling for YAFFS2 and YAFFS1?? */ ++ if (obj->myDev->isYaffs2) { + unlinkOp = (newDir == obj->myDev->unlinkedDir); -+ } -+ else -+ { -+ unlinkOp = (newDir == obj->myDev->unlinkedDir && obj->variantType == YAFFS_OBJECT_TYPE_FILE); ++ } else { ++ unlinkOp = (newDir == obj->myDev->unlinkedDir ++ && obj->variantType == YAFFS_OBJECT_TYPE_FILE); + } + + deleteOp = (newDir == obj->myDev->deletedDir); -+ -+ existingTarget = yaffs_FindObjectByName(newDir,newName); -+ -+ // If the object is a file going into the unlinked directory, then it is OK to just stuff it in since -+ // duplicate names are allowed. -+ // Otherwise only proceed if the new name does not exist and if we're putting it into a directory. -+ if( (unlinkOp|| -+ deleteOp || -+ force || -+ (shadows > 0) || -+ !existingTarget) && -+ newDir->variantType == YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ yaffs_SetObjectName(obj,newName); ++ ++ existingTarget = yaffs_FindObjectByName(newDir, newName); ++ ++ /* If the object is a file going into the unlinked directory, ++ * then it is OK to just stuff it in since duplicate names are allowed. ++ * else only proceed if the new name does not exist and if we're putting ++ * it into a directory. ++ */ ++ if ((unlinkOp || ++ deleteOp || ++ force || ++ (shadows > 0) || ++ !existingTarget) && ++ newDir->variantType == YAFFS_OBJECT_TYPE_DIRECTORY) { ++ yaffs_SetObjectName(obj, newName); + obj->dirty = 1; -+ -+ yaffs_AddObjectToDirectory(newDir,obj); -+ -+ if(unlinkOp) obj->unlinked = 1; -+ -+ // If it is a deletion then we mark it as a shrink for gc purposes. -+ if(yaffs_UpdateObjectHeader(obj,newName,0,deleteOp,shadows) >= 0) -+ { ++ ++ yaffs_AddObjectToDirectory(newDir, obj); ++ ++ if (unlinkOp) ++ obj->unlinked = 1; ++ ++ /* If it is a deletion then we mark it as a shrink for gc purposes. */ ++ if (yaffs_UpdateObjectHeader(obj, newName, 0, deleteOp, shadows)>= 0) + return YAFFS_OK; -+ } + } -+ ++ + return YAFFS_FAIL; +} + -+ -+ -+int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName, yaffs_Object *newDir, const YCHAR *newName) ++int yaffs_RenameObject(yaffs_Object * oldDir, const YCHAR * oldName, ++ yaffs_Object * newDir, const YCHAR * newName) +{ + yaffs_Object *obj; + yaffs_Object *existingTarget; + int force = 0; -+ ++ +#ifdef CONFIG_YAFFS_CASE_INSENSITIVE -+ // Special case for case insemsitive systems (eg. WinCE). -+ // While look-up is case insensitive, the name isn't. -+ // THerefore we might want to change x.txt to X.txt -+ if(oldDir == newDir && yaffs_strcmp(oldName,newName) == 0) -+ { ++ /* Special case for case insemsitive systems (eg. WinCE). ++ * While look-up is case insensitive, the name isn't. ++ * Therefore we might want to change x.txt to X.txt ++ */ ++ if (oldDir == newDir && yaffs_strcmp(oldName, newName) == 0) { + force = 1; -+ } -+#endif -+ -+ obj = yaffs_FindObjectByName(oldDir,oldName); -+ -+ if(obj && obj->renameAllowed) -+ { -+ -+ // Now do the handling for an existing target, if there is one -+ -+ existingTarget = yaffs_FindObjectByName(newDir,newName); -+ if(existingTarget && -+ existingTarget->variantType == YAFFS_OBJECT_TYPE_DIRECTORY && -+ !list_empty(&existingTarget->variant.directoryVariant.children)) -+ { -+ // There is a target that is a non-empty directory, so we have to fail -+ return YAFFS_FAIL; // EEXIST or ENOTEMPTY -+ } -+ else if(existingTarget) -+ { -+ // Nuke the target first, using shadowing -+ yaffs_ChangeObjectName(obj,newDir,newName,force,existingTarget->objectId); -+ yaffs_Unlink(newDir,newName); -+ } -+ -+ -+ return yaffs_ChangeObjectName(obj,newDir,newName,force,0); + } -+ return YAFFS_FAIL; -+} ++#endif + ++ obj = yaffs_FindObjectByName(oldDir, oldName); ++ /* Check new name to long. */ ++ if (obj->variantType == YAFFS_OBJECT_TYPE_SYMLINK && ++ yaffs_strlen(newName) > YAFFS_MAX_ALIAS_LENGTH) ++ /* ENAMETOOLONG */ ++ return YAFFS_FAIL; ++ else if (obj->variantType != YAFFS_OBJECT_TYPE_SYMLINK && ++ yaffs_strlen(newName) > YAFFS_MAX_NAME_LENGTH) ++ /* ENAMETOOLONG */ ++ return YAFFS_FAIL; + -+#if 0 ++ if (obj && obj->renameAllowed) { + -+static int yaffs_CheckObjectHashSanity(yaffs_Device *dev) -+{ -+ // Scan the buckets and check that the lists -+ // have as many members as the count says there are -+ int bucket; -+ int countEm; -+ struct list_head *j; -+ int ok = YAFFS_OK; -+ -+ for(bucket = 0; bucket < YAFFS_NOBJECT_BUCKETS; bucket++) -+ { -+ countEm = 0; -+ -+ list_for_each(j,&dev->objectBucket[bucket].list) -+ { -+ countEm++; -+ } -+ -+ if(countEm != dev->objectBucket[bucket].count) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("Inode hash inconsistency" TENDSTR))); -+ ok = YAFFS_FAIL; ++ /* Now do the handling for an existing target, if there is one */ ++ ++ existingTarget = yaffs_FindObjectByName(newDir, newName); ++ if (existingTarget && ++ existingTarget->variantType == YAFFS_OBJECT_TYPE_DIRECTORY && ++ !list_empty(&existingTarget->variant.directoryVariant.children)) { ++ /* There is a target that is a non-empty directory, so we fail */ ++ return YAFFS_FAIL; /* EEXIST or ENOTEMPTY */ ++ } else if (existingTarget && existingTarget != obj) { ++ /* Nuke the target first, using shadowing, ++ * but only if it isn't the same object ++ */ ++ yaffs_ChangeObjectName(obj, newDir, newName, force, ++ existingTarget->objectId); ++ yaffs_UnlinkObject(existingTarget); + } -+ } + -+ return ok; ++ return yaffs_ChangeObjectName(obj, newDir, newName, 1, 0); ++ } ++ return YAFFS_FAIL; +} + ++/*------------------------- Block Management and Page Allocation ----------------*/ + -+void yaffs_ObjectTest(yaffs_Device *dev) ++static int yaffs_InitialiseBlocks(yaffs_Device * dev) +{ -+ yaffs_Object *in[1000]; -+ int inNo[1000]; -+ yaffs_Object *inold[1000]; -+ int i; -+ int j; -+ -+ memset(in,0,1000*sizeof(yaffs_Object *)); -+ memset(inold,0,1000*sizeof(yaffs_Object *)); -+ -+ yaffs_CheckObjectHashSanity(dev); -+ -+ for(j = 0; j < 10; j++) -+ { -+ //T(("%d\n",j)); -+ -+ for(i = 0; i < 1000; i++) -+ { -+ in[i] = yaffs_CreateNewObject(dev,-1,YAFFS_OBJECT_TYPE_FILE); -+ if(!in[i]) -+ { -+ YINFO("No more inodes"); -+ } -+ else -+ { -+ inNo[i] = in[i]->objectId; -+ } -+ } -+ -+ for(i = 0; i < 1000; i++) -+ { -+ if(yaffs_FindObjectByNumber(dev,inNo[i]) != in[i]) -+ { -+ //T(("Differnce in look up test\n")); -+ } -+ else -+ { -+ // T(("Look up ok\n")); -+ } -+ } -+ -+ yaffs_CheckObjectHashSanity(dev); -+ -+ for(i = 0; i < 1000; i+=3) -+ { -+ yaffs_FreeObject(in[i]); -+ in[i] = NULL; -+ } -+ ++ int nBlocks = dev->internalEndBlock - dev->internalStartBlock + 1; + -+ yaffs_CheckObjectHashSanity(dev); -+ } -+ -+} -+ -+#endif ++ dev->allocationBlock = -1; /* force it to get a new one */ + -+/////////////////////////// Block Management and Page Allocation /////////////////// -+ -+ -+static int yaffs_InitialiseBlocks(yaffs_Device *dev,int nBlocks) -+{ -+ dev->allocationBlock = -1; // force it to get a new one -+ //Todo we're assuming the malloc will pass. ++ /* Todo we're assuming the malloc will pass. */ + dev->blockInfo = YMALLOC(nBlocks * sizeof(yaffs_BlockInfo)); -+ // Set up dynamic blockinfo stuff. -+ dev->chunkBitmapStride = (dev->nChunksPerBlock+7)/8; ++ if(!dev->blockInfo){ ++ dev->blockInfo = YMALLOC_ALT(nBlocks * sizeof(yaffs_BlockInfo)); ++ dev->blockInfoAlt = 1; ++ } ++ else ++ dev->blockInfoAlt = 0; ++ ++ /* Set up dynamic blockinfo stuff. */ ++ dev->chunkBitmapStride = (dev->nChunksPerBlock + 7) / 8; /* round up bytes */ + dev->chunkBits = YMALLOC(dev->chunkBitmapStride * nBlocks); -+ if(dev->blockInfo && dev->chunkBits) -+ { -+ memset(dev->blockInfo,0,nBlocks * sizeof(yaffs_BlockInfo)); -+ memset(dev->chunkBits,0,dev->chunkBitmapStride * nBlocks); -+ return YAFFS_OK; ++ if(!dev->chunkBits){ ++ dev->chunkBits = YMALLOC_ALT(dev->chunkBitmapStride * nBlocks); ++ dev->chunkBitsAlt = 1; + } ++ else ++ dev->chunkBitsAlt = 0; + ++ if (dev->blockInfo && dev->chunkBits) { ++ memset(dev->blockInfo, 0, nBlocks * sizeof(yaffs_BlockInfo)); ++ memset(dev->chunkBits, 0, dev->chunkBitmapStride * nBlocks); ++ return YAFFS_OK; ++ } ++ + return YAFFS_FAIL; -+ ++ +} + -+static void yaffs_DeinitialiseBlocks(yaffs_Device *dev) ++static void yaffs_DeinitialiseBlocks(yaffs_Device * dev) +{ -+ YFREE(dev->blockInfo); ++ if(dev->blockInfoAlt) ++ YFREE_ALT(dev->blockInfo); ++ else ++ YFREE(dev->blockInfo); ++ dev->blockInfoAlt = 0; ++ + dev->blockInfo = NULL; -+ YFREE(dev->chunkBits); ++ ++ if(dev->chunkBitsAlt) ++ YFREE_ALT(dev->chunkBits); ++ else ++ YFREE(dev->chunkBits); ++ dev->chunkBitsAlt = 0; + dev->chunkBits = NULL; +} + -+ -+static int yaffs_BlockNotDisqualifiedFromGC(yaffs_Device *dev, yaffs_BlockInfo *bi) ++static int yaffs_BlockNotDisqualifiedFromGC(yaffs_Device * dev, ++ yaffs_BlockInfo * bi) +{ + int i; + __u32 seq; + yaffs_BlockInfo *b; -+ -+ if(!dev->isYaffs2) return 1; // disqualification only applies to yaffs2. -+ -+ if(!bi->hasShrinkHeader) return 1; // can gc + ++ if (!dev->isYaffs2) ++ return 1; /* disqualification only applies to yaffs2. */ + -+ // Find the oldest dirty sequence number if we don't know it and save it -+ // so we don't have to keep recomputing it. -+ if(!dev->oldestDirtySequence) -+ { ++ if (!bi->hasShrinkHeader) ++ return 1; /* can gc */ ++ ++ /* Find the oldest dirty sequence number if we don't know it and save it ++ * so we don't have to keep recomputing it. ++ */ ++ if (!dev->oldestDirtySequence) { + seq = dev->sequenceNumber; + -+ for(i = dev->internalStartBlock; i <= dev->internalEndBlock; i++) -+ { -+ b = yaffs_GetBlockInfo(dev,i); -+ if(b->blockState == YAFFS_BLOCK_STATE_FULL && -+ (b->pagesInUse - b->softDeletions )< dev->nChunksPerBlock && -+ b->sequenceNumber < seq) -+ { -+ seq = b->sequenceNumber; ++ for (i = dev->internalStartBlock; i <= dev->internalEndBlock; ++ i++) { ++ b = yaffs_GetBlockInfo(dev, i); ++ if (b->blockState == YAFFS_BLOCK_STATE_FULL && ++ (b->pagesInUse - b->softDeletions) < ++ dev->nChunksPerBlock && b->sequenceNumber < seq) { ++ seq = b->sequenceNumber; + } + } + dev->oldestDirtySequence = seq; + } + -+ -+ // Can't do gc of this block if there are any blocks older than this one that have -+ // discarded pages. ++ /* Can't do gc of this block if there are any blocks older than this one that have ++ * discarded pages. ++ */ + return (bi->sequenceNumber <= dev->oldestDirtySequence); -+ -+ -+ return 1; + +} + -+// FindDiretiestBlock is used to select the dirtiest block (or close enough) -+// for garbage collection. -+// -+ -+ ++/* FindDiretiestBlock is used to select the dirtiest block (or close enough) ++ * for garbage collection. ++ */ + -+static int yaffs_FindBlockForGarbageCollection(yaffs_Device *dev,int aggressive) ++static int yaffs_FindBlockForGarbageCollection(yaffs_Device * dev, ++ int aggressive) +{ + + int b = dev->currentDirtyChecker; -+ ++ + int i; + int iterations; + int dirtiest = -1; -+ int pagesInUse; ++ int pagesInUse; ++ int prioritised=0; + yaffs_BlockInfo *bi; -+ static int nonAggressiveSkip = 0; ++ static int nonAggressiveSkip = 0; ++ int pendingPrioritisedExist = 0; ++ ++ /* First let's see if we need to grab a prioritised block */ ++ if(dev->hasPendingPrioritisedGCs){ ++ for(i = dev->internalStartBlock; i < dev->internalEndBlock && !prioritised; i++){ ++ ++ bi = yaffs_GetBlockInfo(dev, i); ++ if(bi->gcPrioritise) { ++ pendingPrioritisedExist = 1; ++ if(bi->blockState == YAFFS_BLOCK_STATE_FULL && ++ yaffs_BlockNotDisqualifiedFromGC(dev, bi)){ ++ pagesInUse = (bi->pagesInUse - bi->softDeletions); ++ dirtiest = i; ++ prioritised = 1; ++ aggressive = 1; /* Fool the non-aggressive skip logiv below */ ++ } ++ } ++ } ++ ++ if(!pendingPrioritisedExist) /* None found, so we can clear this */ ++ dev->hasPendingPrioritisedGCs = 0; ++ } + -+ // If we're doing aggressive GC then we are happy to take a less-dirty block, and -+ // search harder. -+ // else (we're doing a leasurely gc), then we only bother to do this if the -+ // block has only a few pages in use. -+ ++ /* If we're doing aggressive GC then we are happy to take a less-dirty block, and ++ * search harder. ++ * else (we're doing a leasurely gc), then we only bother to do this if the ++ * block has only a few pages in use. ++ */ + + nonAggressiveSkip--; + -+ if(!aggressive &&(nonAggressiveSkip > 0)) -+ { ++ if (!aggressive && (nonAggressiveSkip > 0)) { + return -1; + } + -+ pagesInUse = (aggressive)? dev->nChunksPerBlock : YAFFS_PASSIVE_GC_CHUNKS + 1; ++ if(!prioritised) ++ pagesInUse = ++ (aggressive) ? dev->nChunksPerBlock : YAFFS_PASSIVE_GC_CHUNKS + 1; + -+ if(aggressive) -+ { -+ iterations = dev->internalEndBlock - dev->internalStartBlock + 1; -+ } -+ else -+ { -+ iterations = dev->internalEndBlock - dev->internalStartBlock + 1; -+ iterations = iterations / 16; -+ if(iterations > 200) -+ { ++ if (aggressive) { ++ iterations = ++ dev->internalEndBlock - dev->internalStartBlock + 1; ++ } else { ++ iterations = ++ dev->internalEndBlock - dev->internalStartBlock + 1; ++ iterations = iterations / 16; ++ if (iterations > 200) { + iterations = 200; + } + } -+ -+ for(i = 0; i <= iterations && pagesInUse > 0 ; i++) -+ { ++ ++ for (i = 0; i <= iterations && pagesInUse > 0 && !prioritised; i++) { + b++; -+ if ( b < dev->internalStartBlock || b > dev->internalEndBlock) -+ { -+ b = dev->internalStartBlock; ++ if (b < dev->internalStartBlock || b > dev->internalEndBlock) { ++ b = dev->internalStartBlock; + } + -+ if(b < dev->internalStartBlock || b > dev->internalEndBlock) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> Block %d is not valid" TENDSTR),b)); ++ if (b < dev->internalStartBlock || b > dev->internalEndBlock) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("**>> Block %d is not valid" TENDSTR), b)); + YBUG(); + } -+ -+ bi = yaffs_GetBlockInfo(dev,b); -+ -+ if(bi->blockState == YAFFS_BLOCK_STATE_FULL && -+ (bi->pagesInUse - bi->softDeletions )< pagesInUse && -+ yaffs_BlockNotDisqualifiedFromGC(dev,bi)) -+ { ++ ++ bi = yaffs_GetBlockInfo(dev, b); ++ ++#if 0 ++ if (bi->blockState == YAFFS_BLOCK_STATE_CHECKPOINT) { ++ dirtiest = b; ++ pagesInUse = 0; ++ } ++ else ++#endif ++ ++ if (bi->blockState == YAFFS_BLOCK_STATE_FULL && ++ (bi->pagesInUse - bi->softDeletions) < pagesInUse && ++ yaffs_BlockNotDisqualifiedFromGC(dev, bi)) { + dirtiest = b; + pagesInUse = (bi->pagesInUse - bi->softDeletions); + } + } -+ ++ + dev->currentDirtyChecker = b; -+ -+ if(dirtiest > 0) -+ { -+ T(YAFFS_TRACE_GC,(TSTR("GC Selected block %d with %d free" TENDSTR),dirtiest,dev->nChunksPerBlock - pagesInUse)); ++ ++ if (dirtiest > 0) { ++ T(YAFFS_TRACE_GC, ++ (TSTR("GC Selected block %d with %d free, prioritised:%d" TENDSTR), dirtiest, ++ dev->nChunksPerBlock - pagesInUse,prioritised)); + } -+ -+ dev->oldestDirtySequence = 0; // clear this -+ -+ if(dirtiest > 0) -+ { ++ ++ dev->oldestDirtySequence = 0; ++ ++ if (dirtiest > 0) { + nonAggressiveSkip = 4; + } + + return dirtiest; +} + -+ -+static void yaffs_BlockBecameDirty(yaffs_Device *dev,int blockNo) ++static void yaffs_BlockBecameDirty(yaffs_Device * dev, int blockNo) +{ -+ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,blockNo); -+ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, blockNo); ++ + int erasedOk = 0; -+ -+ // If the block is still healthy erase it and mark as clean. -+ // If the block has had a data failure, then retire it. ++ ++ /* If the block is still healthy erase it and mark as clean. ++ * If the block has had a data failure, then retire it. ++ */ ++ ++ T(YAFFS_TRACE_GC | YAFFS_TRACE_ERASE, ++ (TSTR("yaffs_BlockBecameDirty block %d state %d %s"TENDSTR), ++ blockNo, bi->blockState, (bi->needsRetiring) ? "needs retiring" : "")); ++ + bi->blockState = YAFFS_BLOCK_STATE_DIRTY; + -+ if(!bi->needsRetiring) -+ { -+ erasedOk = yaffs_EraseBlockInNAND(dev,blockNo); -+ if(!erasedOk) -+ { ++ if (!bi->needsRetiring) { ++ yaffs_InvalidateCheckpoint(dev); ++ erasedOk = yaffs_EraseBlockInNAND(dev, blockNo); ++ if (!erasedOk) { + dev->nErasureFailures++; -+ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,(TSTR("**>> Erasure failed %d" TENDSTR),blockNo)); ++ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS, ++ (TSTR("**>> Erasure failed %d" TENDSTR), blockNo)); + } + } + -+ if(erasedOk && (yaffs_traceMask & YAFFS_TRACE_ERASE)) -+ { -+ int i; -+ for(i = 0; i < dev->nChunksPerBlock; i++) -+ { -+ if(!yaffs_CheckChunkErased(dev,blockNo * dev->nChunksPerBlock + i)) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR(">>Block %d erasure supposedly OK, but chunk %d not erased" TENDSTR),blockNo,i)); -+ } ++ if (erasedOk && (yaffs_traceMask & YAFFS_TRACE_ERASE)) { ++ int i; ++ for (i = 0; i < dev->nChunksPerBlock; i++) { ++ if (!yaffs_CheckChunkErased ++ (dev, blockNo * dev->nChunksPerBlock + i)) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ (">>Block %d erasure supposedly OK, but chunk %d not erased" ++ TENDSTR), blockNo, i)); + } ++ } + } -+ -+ if( erasedOk ) -+ { -+ // Clean it up... ++ ++ if (erasedOk) { ++ /* Clean it up... */ + bi->blockState = YAFFS_BLOCK_STATE_EMPTY; + dev->nErasedBlocks++; + bi->pagesInUse = 0; + bi->softDeletions = 0; -+ bi->hasShrinkHeader=0; -+ yaffs_ClearChunkBits(dev,blockNo); -+ -+ T(YAFFS_TRACE_ERASE,(TSTR("Erased block %d" TENDSTR),blockNo)); -+ } -+ else -+ { -+ dev->nFreeChunks -= dev->nChunksPerBlock; // We lost a block of free space -+ -+ yaffs_RetireBlock(dev,blockNo); -+ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,(TSTR("**>> Block %d retired" TENDSTR),blockNo)); -+ } -+} -+ -+#if 0 -+static void yaffs_DumpBlockStats(yaffs_Device *dev) -+{ -+ int i,j; -+ yaffs_BlockInfo *bi; -+ -+ for(i= dev->internalStartBlock; i <=dev->internalEndBlock; i++) -+ { -+ bi = yaffs_GetBlockInfo(dev,i); -+ T(YAFFS_TRACE_ALLOCATE,(TSTR("%3d state %d shrink %d inuse %d/%d seq %d pages"),i, -+ bi->blockState,bi->hasShrinkHeader,bi->pagesInUse,bi->softDeletions,bi->sequenceNumber)); -+ -+ for(j = 0; j < dev->nChunksPerBlock; j++) -+ { -+ if(yaffs_CheckChunkBit(dev,i,j)) -+ { -+ T(YAFFS_TRACE_ALLOCATE,(TSTR(" %d"),j)); ++ bi->hasShrinkHeader = 0; ++ bi->skipErasedCheck = 1; /* This is clean, so no need to check */ ++ bi->gcPrioritise = 0; ++ yaffs_ClearChunkBits(dev, blockNo); + -+ } -+ } -+ T(YAFFS_TRACE_ALLOCATE,(TSTR(" " TENDSTR))); ++ T(YAFFS_TRACE_ERASE, ++ (TSTR("Erased block %d" TENDSTR), blockNo)); ++ } else { ++ dev->nFreeChunks -= dev->nChunksPerBlock; /* We lost a block of free space */ + ++ yaffs_RetireBlock(dev, blockNo); ++ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS, ++ (TSTR("**>> Block %d retired" TENDSTR), blockNo)); + } +} -+#endif -+ + -+static int yaffs_FindBlockForAllocation(yaffs_Device *dev) ++static int yaffs_FindBlockForAllocation(yaffs_Device * dev) +{ + int i; -+ ++ + yaffs_BlockInfo *bi; -+ -+#if 0 -+ static int j = 0; -+ j++; -+ if(j < 0 || j > 100) -+ { -+ j = 0; -+ yaffs_DumpBlockStats(dev); -+ } -+ -+#endif -+ -+ if(dev->nErasedBlocks < 1) -+ { -+ // Hoosterman we've got a problem. -+ // Can't get space to gc -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: no more eraased blocks" TENDSTR))); ++ ++ if (dev->nErasedBlocks < 1) { ++ /* Hoosterman we've got a problem. ++ * Can't get space to gc ++ */ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("yaffs tragedy: no more eraased blocks" TENDSTR))); + + return -1; + } + -+ // Find an empty block. -+ -+ for(i = dev->internalStartBlock; i <= dev->internalEndBlock; i++) -+ { ++ /* Find an empty block. */ ++ ++ for (i = dev->internalStartBlock; i <= dev->internalEndBlock; i++) { + dev->allocationBlockFinder++; -+ if(dev->allocationBlockFinder < dev->internalStartBlock || dev->allocationBlockFinder> dev->internalEndBlock) -+ { ++ if (dev->allocationBlockFinder < dev->internalStartBlock ++ || dev->allocationBlockFinder > dev->internalEndBlock) { + dev->allocationBlockFinder = dev->internalStartBlock; + } -+ -+ bi = yaffs_GetBlockInfo(dev,dev->allocationBlockFinder); + -+ if(bi->blockState == YAFFS_BLOCK_STATE_EMPTY) -+ { ++ bi = yaffs_GetBlockInfo(dev, dev->allocationBlockFinder); ++ ++ if (bi->blockState == YAFFS_BLOCK_STATE_EMPTY) { + bi->blockState = YAFFS_BLOCK_STATE_ALLOCATING; + dev->sequenceNumber++; + bi->sequenceNumber = dev->sequenceNumber; -+ dev->nErasedBlocks--; -+ T(YAFFS_TRACE_ALLOCATE,(TSTR("Allocated block %d, seq %d, %d left" TENDSTR),dev->allocationBlockFinder,dev->sequenceNumber, dev->nErasedBlocks)); ++ dev->nErasedBlocks--; ++ T(YAFFS_TRACE_ALLOCATE, ++ (TSTR("Allocated block %d, seq %d, %d left" TENDSTR), ++ dev->allocationBlockFinder, dev->sequenceNumber, ++ dev->nErasedBlocks)); + return dev->allocationBlockFinder; + } + } -+ -+ -+ T(YAFFS_TRACE_ALWAYS, (TSTR("yaffs tragedy: no more eraased blocks, but there should have been %d" TENDSTR),dev->nErasedBlocks)); -+ -+ -+ + -+ -+ return -1; -+} ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("yaffs tragedy: no more eraased blocks, but there should have been %d" ++ TENDSTR), dev->nErasedBlocks)); + ++ return -1; ++} + -+// To determine if we have enough space we just look at the -+// number of erased blocks. + -+static int yaffs_CheckSpaceForAllocation(yaffs_Device *dev) ++// Check if there's space to allocate... ++// Thinks.... do we need top make this ths same as yaffs_GetFreeChunks()? ++static int yaffs_CheckSpaceForAllocation(yaffs_Device * dev) +{ -+ int reservedChunks = (dev->nReservedBlocks * dev->nChunksPerBlock); ++ int reservedChunks; ++ int reservedBlocks = dev->nReservedBlocks; ++ int checkpointBlocks; ++ ++ checkpointBlocks = dev->nCheckpointReservedBlocks - dev->blocksInCheckpoint; ++ if(checkpointBlocks < 0) ++ checkpointBlocks = 0; ++ ++ reservedChunks = ((reservedBlocks + checkpointBlocks) * dev->nChunksPerBlock); ++ + return (dev->nFreeChunks > reservedChunks); +} + -+ -+static int yaffs_AllocateChunk(yaffs_Device *dev,int useReserve) ++static int yaffs_AllocateChunk(yaffs_Device * dev, int useReserve, yaffs_BlockInfo **blockUsedPtr) +{ + int retVal; + yaffs_BlockInfo *bi; -+ -+ if(dev->allocationBlock < 0) -+ { -+ // Get next block to allocate off ++ ++ if (dev->allocationBlock < 0) { ++ /* Get next block to allocate off */ + dev->allocationBlock = yaffs_FindBlockForAllocation(dev); + dev->allocationPage = 0; + } -+ -+ if(!useReserve && !yaffs_CheckSpaceForAllocation(dev)) -+ { -+ // Not enough space to allocate unless we're allowed to use the reserve. ++ ++ if (!useReserve && !yaffs_CheckSpaceForAllocation(dev)) { ++ /* Not enough space to allocate unless we're allowed to use the reserve. */ + return -1; + } + -+ if(dev->nErasedBlocks < dev->nReservedBlocks && dev->allocationPage == 0) -+ { -+ T(YAFFS_TRACE_ALLOCATE,(TSTR("Allocating reserve" TENDSTR))); ++ if (dev->nErasedBlocks < dev->nReservedBlocks ++ && dev->allocationPage == 0) { ++ T(YAFFS_TRACE_ALLOCATE, (TSTR("Allocating reserve" TENDSTR))); + } + -+ -+ // Next page please.... -+ if(dev->allocationBlock >= 0) -+ { -+ bi = yaffs_GetBlockInfo(dev,dev->allocationBlock); -+ -+ retVal = (dev->allocationBlock * dev->nChunksPerBlock) + -+ dev->allocationPage; ++ /* Next page please.... */ ++ if (dev->allocationBlock >= 0) { ++ bi = yaffs_GetBlockInfo(dev, dev->allocationBlock); ++ ++ retVal = (dev->allocationBlock * dev->nChunksPerBlock) + ++ dev->allocationPage; + bi->pagesInUse++; -+ yaffs_SetChunkBit(dev,dev->allocationBlock,dev->allocationPage); ++ yaffs_SetChunkBit(dev, dev->allocationBlock, ++ dev->allocationPage); + + dev->allocationPage++; -+ ++ + dev->nFreeChunks--; -+ -+ // If the block is full set the state to full -+ if(dev->allocationPage >= dev->nChunksPerBlock) -+ { ++ ++ /* If the block is full set the state to full */ ++ if (dev->allocationPage >= dev->nChunksPerBlock) { + bi->blockState = YAFFS_BLOCK_STATE_FULL; + dev->allocationBlock = -1; + } + -+ ++ if(blockUsedPtr) ++ *blockUsedPtr = bi; ++ + return retVal; -+ + } -+ T(YAFFS_TRACE_ERROR,(TSTR("!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!" TENDSTR))); ++ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("!!!!!!!!! Allocator out !!!!!!!!!!!!!!!!!" TENDSTR))); + -+ return -1; ++ return -1; +} + -+ -+ -+ -+static int yaffs_GetErasedChunks(yaffs_Device *dev) ++static int yaffs_GetErasedChunks(yaffs_Device * dev) +{ -+ int n; ++ int n; + -+ n = dev->nErasedBlocks * dev->nChunksPerBlock; ++ n = dev->nErasedBlocks * dev->nChunksPerBlock; + -+ if(dev->allocationBlock> 0) -+ { -+ n += (dev->nChunksPerBlock - dev->allocationPage); -+ } ++ if (dev->allocationBlock > 0) { ++ n += (dev->nChunksPerBlock - dev->allocationPage); ++ } + -+ return n; ++ return n; + +} + -+static int yaffs_GarbageCollectBlock(yaffs_Device *dev,int block) ++static int yaffs_GarbageCollectBlock(yaffs_Device * dev, int block) +{ + int oldChunk; + int newChunk; @@ -4832,536 +5767,355 @@ index 0000000..bf13f91 + int retVal = YAFFS_OK; + int cleanups = 0; + int i; ++ int isCheckpointBlock; + + int chunksBefore = yaffs_GetErasedChunks(dev); + int chunksAfter; + -+ yaffs_ExtendedTags tags; -+ -+ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev,block); -+ ++ yaffs_ExtendedTags tags; ++ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, block); ++ + yaffs_Object *object; ++ ++ isCheckpointBlock = (bi->blockState == YAFFS_BLOCK_STATE_CHECKPOINT); + + bi->blockState = YAFFS_BLOCK_STATE_COLLECTING; + -+ T(YAFFS_TRACE_TRACING,(TSTR("Collecting block %d, in use %d, shrink %d, " TENDSTR),block,bi->pagesInUse,bi->hasShrinkHeader)); -+ //T(("Collecting block %d n %d bits %x\n",block, bi->pagesInUse, bi->pageBits)); -+ -+ //yaffs_VerifyFreeChunks(dev); ++ T(YAFFS_TRACE_TRACING, ++ (TSTR("Collecting block %d, in use %d, shrink %d, " TENDSTR), block, ++ bi->pagesInUse, bi->hasShrinkHeader)); + -+ bi->hasShrinkHeader = 0; // clear the flag so that the block can erase -+ -+ dev->nFreeChunks -= bi->softDeletions; // Take off the number of soft deleted entries because -+ // they're going to get really deleted during GC. ++ /*yaffs_VerifyFreeChunks(dev); */ ++ ++ bi->hasShrinkHeader = 0; /* clear the flag so that the block can erase */ ++ ++ /* Take off the number of soft deleted entries because ++ * they're going to get really deleted during GC. ++ */ ++ dev->nFreeChunks -= bi->softDeletions; + + dev->isDoingGC = 1; + -+ if(!yaffs_StillSomeChunkBits(dev,block)) -+ { -+ T(YAFFS_TRACE_TRACING,(TSTR("Collecting block %d that has no chunks in use" TENDSTR),block)); -+ yaffs_BlockBecameDirty(dev,block); -+ } -+ else -+ { ++ if (isCheckpointBlock || ++ !yaffs_StillSomeChunkBits(dev, block)) { ++ T(YAFFS_TRACE_TRACING, ++ (TSTR ++ ("Collecting block %d that has no chunks in use" TENDSTR), ++ block)); ++ yaffs_BlockBecameDirty(dev, block); ++ } else { + -+ __u8 *buffer = yaffs_GetTempBuffer(dev,__LINE__); ++ __u8 *buffer = yaffs_GetTempBuffer(dev, __LINE__); + -+ for(chunkInBlock = 0,oldChunk = block * dev->nChunksPerBlock; -+ chunkInBlock < dev->nChunksPerBlock && yaffs_StillSomeChunkBits(dev,block); -+ chunkInBlock++, oldChunk++ ) -+ { -+ if(yaffs_CheckChunkBit(dev,block,chunkInBlock)) -+ { -+ -+ // This page is in use and might need to be copied off -+ -+ markNAND = 1; -+ -+ //T(("copying page %x from %d to %d\n",mask,oldChunk,newChunk)); -+ -+ yaffs_InitialiseTags(&tags); -+ -+ yaffs_ReadChunkWithTagsFromNAND(dev,oldChunk,buffer, &tags); ++ for (chunkInBlock = 0, oldChunk = block * dev->nChunksPerBlock; ++ chunkInBlock < dev->nChunksPerBlock ++ && yaffs_StillSomeChunkBits(dev, block); ++ chunkInBlock++, oldChunk++) { ++ if (yaffs_CheckChunkBit(dev, block, chunkInBlock)) { + -+ object = yaffs_FindObjectByNumber(dev,tags.objectId); -+ -+ T(YAFFS_TRACE_GC_DETAIL,(TSTR("Collecting page %d, %d %d %d " TENDSTR),chunkInBlock,tags.objectId,tags.chunkId,tags.byteCount)); -+ -+ if(!object) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("page %d in gc has no object " TENDSTR),oldChunk)); -+ } -+ -+ if(object && object->deleted && tags.chunkId != 0) -+ { -+ // Data chunk in a deleted file, throw it away -+ // It's a soft deleted data chunk, -+ // No need to copy this, just forget about it and fix up the -+ // object. -+ -+ //yaffs_PutChunkIntoFile(object, tags.chunkId, 0,0); -+ object->nDataChunks--; -+ -+ if(object->nDataChunks <= 0) -+ { -+ // remeber to clean up the object -+ dev->gcCleanupList[cleanups] = tags.objectId; -+ cleanups++; -+ } -+ markNAND = 0; -+ } -+ else if( 0 /* Todo object && object->deleted && object->nDataChunks == 0 */) -+ { -+ // Deleted object header with no data chunks. -+ // Can be discarded and the file deleted. -+ object->chunkId = 0; -+ yaffs_FreeTnode(object->myDev,object->variant.fileVariant.top); -+ object->variant.fileVariant.top = NULL; -+ yaffs_DoGenericObjectDeletion(object); -+ -+ } -+ else if(object) -+ { -+ // It's either a data chunk in a live file or -+ // an ObjectHeader, so we're interested in it. -+ // NB Need to keep the ObjectHeaders of deleted files -+ // until the whole file has been deleted off -+ tags.serialNumber++; ++ /* This page is in use and might need to be copied off */ + -+ dev->nGCCopies++; -+ -+ if(tags.chunkId == 0) -+ { -+ // It is an object Id, -+ // We need to nuke the shrinkheader flags first -+ // We no longer want the shrinkHeader flag since its work is done -+ // and if it is left in place it will mess up scanning. -+ -+ yaffs_ObjectHeader *oh = (yaffs_ObjectHeader *)buffer; -+ oh->isShrink = 0; -+ tags.extraIsShrinkHeader = 0; -+ } ++ markNAND = 1; + -+ newChunk = yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &tags,1); -+ -+ if(newChunk < 0) -+ { -+ retVal = YAFFS_FAIL; ++ yaffs_InitialiseTags(&tags); ++ ++ yaffs_ReadChunkWithTagsFromNAND(dev, oldChunk, ++ buffer, &tags); ++ ++ object = ++ yaffs_FindObjectByNumber(dev, ++ tags.objectId); ++ ++ T(YAFFS_TRACE_GC_DETAIL, ++ (TSTR ++ ("Collecting page %d, %d %d %d " TENDSTR), ++ chunkInBlock, tags.objectId, tags.chunkId, ++ tags.byteCount)); ++ ++ if (!object) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("page %d in gc has no object " ++ TENDSTR), oldChunk)); + } -+ else -+ { -+ -+ // Ok, now fix up the Tnodes etc. -+ -+ if(tags.chunkId == 0) -+ { -+ // It's a header -+ object->chunkId = newChunk; -+ object->serial = tags.serialNumber; ++ ++ if (object && object->deleted ++ && tags.chunkId != 0) { ++ /* Data chunk in a deleted file, throw it away ++ * It's a soft deleted data chunk, ++ * No need to copy this, just forget about it and ++ * fix up the object. ++ */ ++ ++ object->nDataChunks--; ++ ++ if (object->nDataChunks <= 0) { ++ /* remeber to clean up the object */ ++ dev->gcCleanupList[cleanups] = ++ tags.objectId; ++ cleanups++; + } -+ else -+ { -+ // It's a data chunk -+ yaffs_PutChunkIntoFile(object, tags.chunkId, newChunk,0); ++ markNAND = 0; ++ } else if (0 ++ /* Todo object && object->deleted && object->nDataChunks == 0 */ ++ ) { ++ /* Deleted object header with no data chunks. ++ * Can be discarded and the file deleted. ++ */ ++ object->chunkId = 0; ++ yaffs_FreeTnode(object->myDev, ++ object->variant. ++ fileVariant.top); ++ object->variant.fileVariant.top = NULL; ++ yaffs_DoGenericObjectDeletion(object); ++ ++ } else if (object) { ++ /* It's either a data chunk in a live file or ++ * an ObjectHeader, so we're interested in it. ++ * NB Need to keep the ObjectHeaders of deleted files ++ * until the whole file has been deleted off ++ */ ++ tags.serialNumber++; ++ ++ dev->nGCCopies++; ++ ++ if (tags.chunkId == 0) { ++ /* It is an object Id, ++ * We need to nuke the shrinkheader flags first ++ * We no longer want the shrinkHeader flag since its work is done ++ * and if it is left in place it will mess up scanning. ++ * Also, clear out any shadowing stuff ++ */ ++ ++ yaffs_ObjectHeader *oh; ++ oh = (yaffs_ObjectHeader *)buffer; ++ oh->isShrink = 0; ++ oh->shadowsObject = -1; ++ tags.extraShadows = 0; ++ tags.extraIsShrinkHeader = 0; ++ } ++ ++ newChunk = ++ yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &tags, 1); ++ ++ if (newChunk < 0) { ++ retVal = YAFFS_FAIL; ++ } else { ++ ++ /* Ok, now fix up the Tnodes etc. */ ++ ++ if (tags.chunkId == 0) { ++ /* It's a header */ ++ object->chunkId = newChunk; ++ object->serial = tags.serialNumber; ++ } else { ++ /* It's a data chunk */ ++ yaffs_PutChunkIntoFile ++ (object, ++ tags.chunkId, ++ newChunk, 0); ++ } + } + } ++ ++ yaffs_DeleteChunk(dev, oldChunk, markNAND, __LINE__); ++ + } -+ -+ yaffs_DeleteChunk(dev,oldChunk,markNAND,__LINE__); -+ + } -+ } + -+ yaffs_ReleaseTempBuffer(dev,buffer,__LINE__); ++ yaffs_ReleaseTempBuffer(dev, buffer, __LINE__); + -+ //yaffs_VerifyFreeChunks(dev); + -+ // Do any required cleanups -+ for(i = 0; i < cleanups; i++) -+ { -+ // Time to delete the file too -+ object = yaffs_FindObjectByNumber(dev,dev->gcCleanupList[i]); -+ if(object) -+ { -+ yaffs_FreeTnode(dev,object->variant.fileVariant.top); -+ object->variant.fileVariant.top = NULL; -+ T(YAFFS_TRACE_GC,(TSTR("yaffs: About to finally delete object %d" TENDSTR),object->objectId)); -+ yaffs_DoGenericObjectDeletion(object); ++ /* Do any required cleanups */ ++ for (i = 0; i < cleanups; i++) { ++ /* Time to delete the file too */ ++ object = ++ yaffs_FindObjectByNumber(dev, ++ dev->gcCleanupList[i]); ++ if (object) { ++ yaffs_FreeTnode(dev, ++ object->variant.fileVariant. ++ top); ++ object->variant.fileVariant.top = NULL; ++ T(YAFFS_TRACE_GC, ++ (TSTR ++ ("yaffs: About to finally delete object %d" ++ TENDSTR), object->objectId)); ++ yaffs_DoGenericObjectDeletion(object); ++ object->myDev->nDeletedFiles--; ++ } ++ + } + + } + ++ if (chunksBefore >= (chunksAfter = yaffs_GetErasedChunks(dev))) { ++ T(YAFFS_TRACE_GC, ++ (TSTR ++ ("gc did not increase free chunks before %d after %d" ++ TENDSTR), chunksBefore, chunksAfter)); + } + -+ if(chunksBefore >= (chunksAfter = yaffs_GetErasedChunks(dev))) -+ { -+ T(YAFFS_TRACE_GC,(TSTR("gc did not increase free chunks before %d after %d" TENDSTR),chunksBefore,chunksAfter)); -+ } -+ -+ + dev->isDoingGC = 0; -+ -+ //yaffs_VerifyFreeChunks(dev); -+ -+ return YAFFS_OK; -+} -+ -+#if 0 -+static yaffs_Object *yaffs_FindDeletedUnlinkedFile(yaffs_Device *dev) -+{ -+ // find a file to delete -+ struct list_head *i; -+ yaffs_Object *l; + -+ -+ //Scan the unlinked files looking for one to delete -+ list_for_each(i,&dev->unlinkedDir->variant.directoryVariant.children) -+ { -+ if(i) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ if(l->deleted) -+ { -+ return l; -+ } -+ } -+ } -+ return NULL; -+} -+ -+ -+static void yaffs_DoUnlinkedFileDeletion(yaffs_Device *dev) -+{ -+ // This does background deletion on unlinked files.. only deleted ones. -+ // If we don't have a file we're working on then find one -+ if(!dev->unlinkedDeletion && dev->nDeletedFiles > 0) -+ { -+ dev->unlinkedDeletion = yaffs_FindDeletedUnlinkedFile(dev); -+ } -+ -+ // OK, we're working on a file... -+ if(dev->unlinkedDeletion) -+ { -+ yaffs_Object *obj = dev->unlinkedDeletion; -+ int delresult; -+ int limit; // Number of chunks to delete in a file. -+ // NB this can be exceeded, but not by much. -+ -+ limit = -1; -+ -+ delresult = yaffs_DeleteWorker(obj, obj->variant.fileVariant.top, obj->variant.fileVariant.topLevel, 0,&limit); -+ -+ if(obj->nDataChunks == 0) -+ { -+ // Done all the deleting of data chunks. -+ // Now dump the header and clean up -+ yaffs_FreeTnode(dev,obj->variant.fileVariant.top); -+ obj->variant.fileVariant.top = NULL; -+ yaffs_DoGenericObjectDeletion(obj); -+ dev->nDeletedFiles--; -+ dev->nUnlinkedFiles--; -+ dev->nBackgroundDeletions++; -+ dev->unlinkedDeletion = NULL; -+ } -+ } ++ return YAFFS_OK; +} + -+#endif -+ -+ -+ -+// New garbage collector -+// If we're very low on erased blocks then we do aggressive garbage collection -+// otherwise we do "leasurely" garbage collection. -+// Aggressive gc looks further (whole array) and will accept dirtier blocks. -+// Passive gc only inspects smaller areas and will only accept cleaner blocks. -+// -+// The idea is to help clear out space in a more spread-out manner. -+// Dunno if it really does anything useful. -+// -+static int yaffs_CheckGarbageCollection(yaffs_Device *dev) ++/* New garbage collector ++ * If we're very low on erased blocks then we do aggressive garbage collection ++ * otherwise we do "leasurely" garbage collection. ++ * Aggressive gc looks further (whole array) and will accept less dirty blocks. ++ * Passive gc only inspects smaller areas and will only accept more dirty blocks. ++ * ++ * The idea is to help clear out space in a more spread-out manner. ++ * Dunno if it really does anything useful. ++ */ ++static int yaffs_CheckGarbageCollection(yaffs_Device * dev) +{ + int block; -+ int aggressive; ++ int aggressive; + int gcOk = YAFFS_OK; + int maxTries = 0; + -+ //yaffs_VerifyFreeChunks(dev); -+ -+ if(dev->isDoingGC) -+ { -+ // Bail out so we don't get recursive gc ++ int checkpointBlockAdjust; ++ ++ if (dev->isDoingGC) { ++ /* Bail out so we don't get recursive gc */ + return YAFFS_OK; + } -+ -+ // This loop should pass the first time. -+ // We'll only see looping here if the erase of the collected block fails. + -+ do{ ++ /* This loop should pass the first time. ++ * We'll only see looping here if the erase of the collected block fails. ++ */ ++ ++ do { + maxTries++; -+ if(dev->nErasedBlocks < dev->nReservedBlocks) -+ { -+ // We need a block soon... ++ ++ checkpointBlockAdjust = (dev->nCheckpointReservedBlocks - dev->blocksInCheckpoint); ++ if(checkpointBlockAdjust < 0) ++ checkpointBlockAdjust = 0; ++ ++ if (dev->nErasedBlocks < (dev->nReservedBlocks + checkpointBlockAdjust)) { ++ /* We need a block soon...*/ + aggressive = 1; -+ } -+ else -+ { -+ // We're in no hurry ++ } else { ++ /* We're in no hurry */ + aggressive = 0; + } -+ -+ block = yaffs_FindBlockForGarbageCollection(dev,aggressive); -+ -+ if(block > 0) -+ { ++ ++ block = yaffs_FindBlockForGarbageCollection(dev, aggressive); ++ ++ if (block > 0) { + dev->garbageCollections++; -+ if(!aggressive) -+ { ++ if (!aggressive) { + dev->passiveGarbageCollections++; + } + -+ T(YAFFS_TRACE_GC,(TSTR("yaffs: GC erasedBlocks %d aggressive %d" TENDSTR),dev->nErasedBlocks,aggressive)); ++ T(YAFFS_TRACE_GC, ++ (TSTR ++ ("yaffs: GC erasedBlocks %d aggressive %d" TENDSTR), ++ dev->nErasedBlocks, aggressive)); + -+ gcOk = yaffs_GarbageCollectBlock(dev,block); ++ gcOk = yaffs_GarbageCollectBlock(dev, block); + } + -+ if(dev->nErasedBlocks < (dev->nReservedBlocks) && block > 0) -+ { -+ T(YAFFS_TRACE_GC,(TSTR("yaffs: GC !!!no reclaim!!! erasedBlocks %d after try %d block %d" TENDSTR),dev->nErasedBlocks,maxTries,block)); ++ if (dev->nErasedBlocks < (dev->nReservedBlocks) && block > 0) { ++ T(YAFFS_TRACE_GC, ++ (TSTR ++ ("yaffs: GC !!!no reclaim!!! erasedBlocks %d after try %d block %d" ++ TENDSTR), dev->nErasedBlocks, maxTries, block)); + } -+ } while((dev->nErasedBlocks < dev->nReservedBlocks) && (block > 0) && (maxTries < 2)); ++ } while ((dev->nErasedBlocks < dev->nReservedBlocks) && (block > 0) ++ && (maxTries < 2)); + -+ return aggressive ? gcOk: YAFFS_OK; ++ return aggressive ? gcOk : YAFFS_OK; +} + ++/*------------------------- TAGS --------------------------------*/ + -+//////////////////////////// TAGS /////////////////////////////////////// ++static int yaffs_TagsMatch(const yaffs_ExtendedTags * tags, int objectId, ++ int chunkInObject) ++{ ++ return (tags->chunkId == chunkInObject && ++ tags->objectId == objectId && !tags->chunkDeleted) ? 1 : 0; + ++} + + -+#if 0 ++/*-------------------- Data file manipulation -----------------*/ + -+void yaffs_CalcTagsECC(yaffs_Tags *tags) ++static int yaffs_FindChunkInFile(yaffs_Object * in, int chunkInInode, ++ yaffs_ExtendedTags * tags) +{ -+ // Calculate an ecc -+ -+ unsigned char *b = ((yaffs_TagsUnion *)tags)->asBytes; -+ unsigned i,j; -+ unsigned ecc = 0; -+ unsigned bit = 0; -+ -+ tags->ecc = 0; -+ -+ for(i = 0; i < 8; i++) -+ { -+ for(j = 1; j &0xff; j<<=1) -+ { -+ bit++; -+ if(b[i] & j) -+ { -+ ecc ^= bit; -+ } -+ } -+ } -+ -+ tags->ecc = ecc; -+ -+ -+} ++ /*Get the Tnode, then get the level 0 offset chunk offset */ ++ yaffs_Tnode *tn; ++ int theChunk = -1; ++ yaffs_ExtendedTags localTags; ++ int retVal = -1; + -+int yaffs_CheckECCOnTags(yaffs_Tags *tags) -+{ -+ unsigned ecc = tags->ecc; -+ -+ yaffs_CalcTagsECC(tags); -+ -+ ecc ^= tags->ecc; -+ -+ if(ecc && ecc <= 64) -+ { -+ // TODO: Handle the failure better. Retire? -+ unsigned char *b = ((yaffs_TagsUnion *)tags)->asBytes; ++ yaffs_Device *dev = in->myDev; + -+ ecc--; -+ -+ b[ecc / 8] ^= (1 << (ecc & 7)); -+ -+ // Now recvalc the ecc -+ yaffs_CalcTagsECC(tags); -+ -+ return 1; // recovered error -+ } -+ else if(ecc) -+ { -+ // Wierd ecc failure value -+ // TODO Need to do somethiong here -+ return -1; //unrecovered error ++ if (!tags) { ++ /* Passed a NULL, so use our own tags space */ ++ tags = &localTags; + } -+ -+ return 0; -+} + -+static void yaffs_LoadTagsIntoSpare(yaffs_Spare *sparePtr, yaffs_Tags *tagsPtr) -+{ -+ yaffs_TagsUnion *tu = (yaffs_TagsUnion *)tagsPtr; -+ -+ yaffs_CalcTagsECC(tagsPtr); -+ -+ sparePtr->tagByte0 = tu->asBytes[0]; -+ sparePtr->tagByte1 = tu->asBytes[1]; -+ sparePtr->tagByte2 = tu->asBytes[2]; -+ sparePtr->tagByte3 = tu->asBytes[3]; -+ sparePtr->tagByte4 = tu->asBytes[4]; -+ sparePtr->tagByte5 = tu->asBytes[5]; -+ sparePtr->tagByte6 = tu->asBytes[6]; -+ sparePtr->tagByte7 = tu->asBytes[7]; -+} ++ tn = yaffs_FindLevel0Tnode(dev, &in->variant.fileVariant, chunkInInode); + -+static void yaffs_GetTagsFromSpare(yaffs_Device *dev, yaffs_Spare *sparePtr,yaffs_Tags *tagsPtr) -+{ -+ yaffs_TagsUnion *tu = (yaffs_TagsUnion *)tagsPtr; -+ int result; ++ if (tn) { ++ theChunk = yaffs_GetChunkGroupBase(dev,tn,chunkInInode); + -+ tu->asBytes[0]= sparePtr->tagByte0; -+ tu->asBytes[1]= sparePtr->tagByte1; -+ tu->asBytes[2]= sparePtr->tagByte2; -+ tu->asBytes[3]= sparePtr->tagByte3; -+ tu->asBytes[4]= sparePtr->tagByte4; -+ tu->asBytes[5]= sparePtr->tagByte5; -+ tu->asBytes[6]= sparePtr->tagByte6; -+ tu->asBytes[7]= sparePtr->tagByte7; -+ -+ result = yaffs_CheckECCOnTags(tagsPtr); -+ if(result> 0) -+ { -+ dev->tagsEccFixed++; -+ } -+ else if(result <0) -+ { -+ dev->tagsEccUnfixed++; ++ retVal = ++ yaffs_FindChunkInGroup(dev, theChunk, tags, in->objectId, ++ chunkInInode); + } ++ return retVal; +} + -+static void yaffs_SpareInitialise(yaffs_Spare *spare) ++static int yaffs_FindAndDeleteChunkInFile(yaffs_Object * in, int chunkInInode, ++ yaffs_ExtendedTags * tags) +{ -+ memset(spare,0xFF,sizeof(yaffs_Spare)); -+} ++ /* Get the Tnode, then get the level 0 offset chunk offset */ ++ yaffs_Tnode *tn; ++ int theChunk = -1; ++ yaffs_ExtendedTags localTags; + -+#endif ++ yaffs_Device *dev = in->myDev; ++ int retVal = -1; + -+#if 0 -+static int yaffs_WriteNewChunkWithTagsToNAND(yaffs_Device *dev, const __u8 *buffer, yaffs_ExtendedTags *tags, int useReserve) -+{ -+ // NB There must be tags, data is optional -+ // If there is data, then an ECC is calculated on it. -+ -+ yaffs_Spare spare; -+ -+ if(!tags) -+ { -+ return YAFFS_FAIL; ++ if (!tags) { ++ /* Passed a NULL, so use our own tags space */ ++ tags = &localTags; + } -+ -+ //yaffs_SpareInitialise(&spare); -+ -+ //if(!dev->useNANDECC && buffer) -+ //{ -+ // yaffs_CalcECC(buffer,&spare); -+ //} -+ -+ //yaffs_LoadTagsIntoSpare(&spare,tags); -+ -+ return yaffs_WriteNewChunkToNAND(dev,buffer,&spare,useReserve); -+ -+} -+#endif + -+static int yaffs_TagsMatch(const yaffs_ExtendedTags *tags, int objectId, int chunkInObject) -+{ -+ return ( tags->chunkId == chunkInObject && -+ tags->objectId == objectId && -+ !tags->chunkDeleted) ? 1 : 0; -+ -+} ++ tn = yaffs_FindLevel0Tnode(dev, &in->variant.fileVariant, chunkInInode); + -+///////////////////////////////////////////////////////////////////////////////////////////////////////// ++ if (tn) { + ++ theChunk = yaffs_GetChunkGroupBase(dev,tn,chunkInInode); + -+static int yaffs_FindChunkInFile(yaffs_Object *in,int chunkInInode,yaffs_ExtendedTags *tags) -+{ -+ //Get the Tnode, then get the level 0 offset chunk offset -+ yaffs_Tnode *tn; -+ int theChunk = -1; -+ yaffs_ExtendedTags localTags; -+ int retVal = -1; -+ -+ yaffs_Device *dev = in->myDev; -+ -+ -+ if(!tags) -+ { -+ // Passed a NULL, so use our own tags space -+ tags = &localTags; -+ } -+ -+ tn = yaffs_FindLevel0Tnode(dev,&in->variant.fileVariant, chunkInInode); -+ -+ if(tn) -+ { -+ theChunk = tn->level0[chunkInInode & YAFFS_TNODES_LEVEL0_MASK] << dev->chunkGroupBits; -+ -+ retVal = yaffs_FindChunkInGroup(dev,theChunk,tags,in->objectId,chunkInInode); -+ } -+ return retVal; -+} -+ -+static int yaffs_FindAndDeleteChunkInFile(yaffs_Object *in,int chunkInInode,yaffs_ExtendedTags *tags) -+{ -+ //Get the Tnode, then get the level 0 offset chunk offset -+ yaffs_Tnode *tn; -+ int theChunk = -1; -+ yaffs_ExtendedTags localTags; ++ retVal = ++ yaffs_FindChunkInGroup(dev, theChunk, tags, in->objectId, ++ chunkInInode); + -+ yaffs_Device *dev = in->myDev; -+ int retVal = -1; -+ -+ if(!tags) -+ { -+ // Passed a NULL, so use our own tags space -+ tags = &localTags; -+ } -+ -+ tn = yaffs_FindLevel0Tnode(dev,&in->variant.fileVariant, chunkInInode); -+ -+ if(tn) -+ { -+ -+ theChunk = tn->level0[chunkInInode & YAFFS_TNODES_LEVEL0_MASK] << dev->chunkGroupBits; -+ -+ retVal = yaffs_FindChunkInGroup(dev,theChunk,tags,in->objectId,chunkInInode); -+ -+ // Delete the entry in the filestructure (if found) -+ if(retVal != -1) -+ { -+ tn->level0[chunkInInode & YAFFS_TNODES_LEVEL0_MASK] = 0; ++ /* Delete the entry in the filestructure (if found) */ ++ if (retVal != -1) { ++ yaffs_PutLevel0Tnode(dev,tn,chunkInInode,0); + } -+ } -+ else -+ { -+ //T(("No level 0 found for %d\n", chunkInInode)); -+ } -+ -+ if(retVal == -1) -+ { -+ //T(("Could not find %d to delete\n",chunkInInode)); -+ } -+ return retVal; -+} ++ } else { ++ /*T(("No level 0 found for %d\n", chunkInInode)); */ ++ } + ++ if (retVal == -1) { ++ /* T(("Could not find %d to delete\n",chunkInInode)); */ ++ } ++ return retVal; ++} + +#ifdef YAFFS_PARANOID + -+static int yaffs_CheckFileSanity(yaffs_Object *in) ++static int yaffs_CheckFileSanity(yaffs_Object * in) +{ + int chunk; + int nChunks; @@ -5369,376 +6123,347 @@ index 0000000..bf13f91 + int failed = 0; + int objId; + yaffs_Tnode *tn; -+ yaffs_Tags localTags; -+ yaffs_Tags *tags = &localTags; -+ int theChunk; -+ int chunkDeleted; -+ -+ -+ if(in->variantType != YAFFS_OBJECT_TYPE_FILE) -+ { -+ //T(("Object not a file\n")); ++ yaffs_Tags localTags; ++ yaffs_Tags *tags = &localTags; ++ int theChunk; ++ int chunkDeleted; ++ ++ if (in->variantType != YAFFS_OBJECT_TYPE_FILE) { ++ /* T(("Object not a file\n")); */ + return YAFFS_FAIL; + } -+ ++ + objId = in->objectId; -+ fSize = in->variant.fileVariant.fileSize; -+ nChunks = (fSize + in->myDev->nBytesPerChunk -1)/in->myDev->nBytesPerChunk; -+ -+ for(chunk = 1; chunk <= nChunks; chunk++) -+ { -+ tn = yaffs_FindLevel0Tnode(in->myDev,&in->variant.fileVariant, chunk); -+ -+ if(tn) -+ { -+ -+ theChunk = tn->level0[chunk & YAFFS_TNODES_LEVEL0_MASK] << in->myDev->chunkGroupBits; -+ -+ if(yaffs_CheckChunkBits(dev,theChunk/dev->nChunksPerBlock,theChunk%dev->nChunksPerBlock)) -+ { ++ fSize = in->variant.fileVariant.fileSize; ++ nChunks = ++ (fSize + in->myDev->nDataBytesPerChunk - 1) / in->myDev->nDataBytesPerChunk; + ++ for (chunk = 1; chunk <= nChunks; chunk++) { ++ tn = yaffs_FindLevel0Tnode(in->myDev, &in->variant.fileVariant, ++ chunk); ++ ++ if (tn) { ++ ++ theChunk = yaffs_GetChunkGroupBase(dev,tn,chunk); ++ ++ if (yaffs_CheckChunkBits ++ (dev, theChunk / dev->nChunksPerBlock, ++ theChunk % dev->nChunksPerBlock)) { ++ ++ yaffs_ReadChunkTagsFromNAND(in->myDev, theChunk, ++ tags, ++ &chunkDeleted); ++ if (yaffs_TagsMatch ++ (tags, in->objectId, chunk, chunkDeleted)) { ++ /* found it; */ + -+ yaffs_ReadChunkTagsFromNAND(in->myDev,theChunk,tags,&chunkDeleted); -+ if(yaffs_TagsMatch(tags,in->objectId,chunk,chunkDeleted)) -+ { -+ // found it; -+ + } -+ } -+ else -+ { -+ //T(("File problem file [%d,%d] NAND %d tags[%d,%d]\n", -+ // objId,chunk,theChunk,tags->chunkId,tags->objectId); -+ ++ } else { ++ + failed = 1; -+ + } -+ -+ } -+ else -+ { -+ //T(("No level 0 found for %d\n", chunk)); ++ ++ } else { ++ /* T(("No level 0 found for %d\n", chunk)); */ + } + } -+ ++ + return failed ? YAFFS_FAIL : YAFFS_OK; +} + +#endif + -+static int yaffs_PutChunkIntoFile(yaffs_Object *in,int chunkInInode, int chunkInNAND, int inScan) ++static int yaffs_PutChunkIntoFile(yaffs_Object * in, int chunkInInode, ++ int chunkInNAND, int inScan) +{ -+ // NB inScan is zero unless scanning. For forward scanning, inScan is > 0; for backward scanning inScan is < 0 ++ /* NB inScan is zero unless scanning. ++ * For forward scanning, inScan is > 0; ++ * for backward scanning inScan is < 0 ++ */ ++ + yaffs_Tnode *tn; + yaffs_Device *dev = in->myDev; + int existingChunk; + yaffs_ExtendedTags existingTags; + yaffs_ExtendedTags newTags; + unsigned existingSerial, newSerial; -+ -+ if(in->variantType != YAFFS_OBJECT_TYPE_FILE) -+ { -+ // Just ignore an attempt at putting a chunk into a non-file during scanning -+ // If it is not during Scanning then something went wrong! -+ if(!inScan) -+ { -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy:attempt to put data chunk into a non-file" TENDSTR))); ++ ++ if (in->variantType != YAFFS_OBJECT_TYPE_FILE) { ++ /* Just ignore an attempt at putting a chunk into a non-file during scanning ++ * If it is not during Scanning then something went wrong! ++ */ ++ if (!inScan) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("yaffs tragedy:attempt to put data chunk into a non-file" ++ TENDSTR))); + YBUG(); + } -+ -+ yaffs_DeleteChunk(dev,chunkInNAND,1,__LINE__); ++ ++ yaffs_DeleteChunk(dev, chunkInNAND, 1, __LINE__); + return YAFFS_OK; + } -+ -+ tn = yaffs_AddOrFindLevel0Tnode(dev,&in->variant.fileVariant, chunkInInode); -+ if(!tn) -+ { ++ ++ tn = yaffs_AddOrFindLevel0Tnode(dev, ++ &in->variant.fileVariant, ++ chunkInInode, ++ NULL); ++ if (!tn) { + return YAFFS_FAIL; + } + -+ existingChunk = tn->level0[chunkInInode & YAFFS_TNODES_LEVEL0_MASK]; -+ -+ if(inScan != 0) -+ { -+ // If we're scanning then we need to test for duplicates -+ // NB This does not need to be efficient since it should only ever -+ // happen when the power fails during a write, then only one -+ // chunk should ever be affected. -+ // -+ // Correction for YAFFS2: This could happen quite a lot and we need to think about efficiency! TODO -+ // Update: For backward scanning we don't need to re-read tags so this is quite cheap. -+ -+ -+ -+ if(existingChunk != 0) -+ { -+ // NB Right now existing chunk will not be real chunkId if the device >= 32MB -+ // thus we have to do a FindChunkInFile to get the real chunk id. -+ // -+ // We have a duplicate now we need to decide which one to use: -+ // -+ // Backwards scanning YAFFS2: The old one is what we use, dump the new one. -+ // Forward scanning YAFFS2: The new one is what we use, dump the old one. -+ // YAFFS1: Get both sets of tags and compare serial numbers. -+ // -+ // -+ -+ if(inScan > 0) -+ { -+ // Only do this for forward scanning -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunkInNAND, NULL,&newTags); -+ -+ -+ // Do a proper find -+ existingChunk = yaffs_FindChunkInFile(in,chunkInInode, &existingTags); ++ existingChunk = yaffs_GetChunkGroupBase(dev,tn,chunkInInode); ++ ++ if (inScan != 0) { ++ /* If we're scanning then we need to test for duplicates ++ * NB This does not need to be efficient since it should only ever ++ * happen when the power fails during a write, then only one ++ * chunk should ever be affected. ++ * ++ * Correction for YAFFS2: This could happen quite a lot and we need to think about efficiency! TODO ++ * Update: For backward scanning we don't need to re-read tags so this is quite cheap. ++ */ ++ ++ if (existingChunk != 0) { ++ /* NB Right now existing chunk will not be real chunkId if the device >= 32MB ++ * thus we have to do a FindChunkInFile to get the real chunk id. ++ * ++ * We have a duplicate now we need to decide which one to use: ++ * ++ * Backwards scanning YAFFS2: The old one is what we use, dump the new one. ++ * Forward scanning YAFFS2: The new one is what we use, dump the old one. ++ * YAFFS1: Get both sets of tags and compare serial numbers. ++ */ ++ ++ if (inScan > 0) { ++ /* Only do this for forward scanning */ ++ yaffs_ReadChunkWithTagsFromNAND(dev, ++ chunkInNAND, ++ NULL, &newTags); ++ ++ /* Do a proper find */ ++ existingChunk = ++ yaffs_FindChunkInFile(in, chunkInInode, ++ &existingTags); + } + -+ if(existingChunk <=0) -+ { -+ //Hoosterman - how did this happen? -+ -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: existing chunk < 0 in scan" TENDSTR))); ++ if (existingChunk <= 0) { ++ /*Hoosterman - how did this happen? */ ++ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("yaffs tragedy: existing chunk < 0 in scan" ++ TENDSTR))); + + } + -+ -+ // NB The deleted flags should be false, otherwise the chunks will -+ // not be loaded during a scan -+ ++ /* NB The deleted flags should be false, otherwise the chunks will ++ * not be loaded during a scan ++ */ ++ + newSerial = newTags.serialNumber; + existingSerial = existingTags.serialNumber; -+ -+ if( (inScan > 0) && -+ ( in->myDev->isYaffs2 || -+ existingChunk <= 0 || -+ ((existingSerial+1) & 3) == newSerial)) -+ { -+ // Forward scanning. -+ // Use new -+ // Delete the old one and drop through to update the tnode -+ yaffs_DeleteChunk(dev,existingChunk,1,__LINE__); -+ } -+ else -+ { -+ // Backward scanning or we want to use the existing one -+ // Use existing. -+ // Delete the new one and return early so that the tnode isn't changed -+ yaffs_DeleteChunk(dev,chunkInNAND,1,__LINE__); ++ ++ if ((inScan > 0) && ++ (in->myDev->isYaffs2 || ++ existingChunk <= 0 || ++ ((existingSerial + 1) & 3) == newSerial)) { ++ /* Forward scanning. ++ * Use new ++ * Delete the old one and drop through to update the tnode ++ */ ++ yaffs_DeleteChunk(dev, existingChunk, 1, ++ __LINE__); ++ } else { ++ /* Backward scanning or we want to use the existing one ++ * Use existing. ++ * Delete the new one and return early so that the tnode isn't changed ++ */ ++ yaffs_DeleteChunk(dev, chunkInNAND, 1, ++ __LINE__); + return YAFFS_OK; + } + } + + } -+ -+ if(existingChunk == 0) -+ { ++ ++ if (existingChunk == 0) { + in->nDataChunks++; + } -+ -+ tn->level0[chunkInInode & YAFFS_TNODES_LEVEL0_MASK] = (chunkInNAND >> dev->chunkGroupBits); -+ -+ return YAFFS_OK; -+} + ++ yaffs_PutLevel0Tnode(dev,tn,chunkInInode,chunkInNAND); + ++ return YAFFS_OK; ++} + -+static int yaffs_ReadChunkDataFromObject(yaffs_Object *in,int chunkInInode, __u8 *buffer) ++static int yaffs_ReadChunkDataFromObject(yaffs_Object * in, int chunkInInode, ++ __u8 * buffer) +{ -+ int chunkInNAND = yaffs_FindChunkInFile(in,chunkInInode,NULL); -+ -+ if(chunkInNAND >= 0) -+ { -+ return yaffs_ReadChunkWithTagsFromNAND(in->myDev,chunkInNAND,buffer,NULL); -+ } -+ else -+ { -+ T(YAFFS_TRACE_NANDACCESS,(TSTR("Chunk %d not found zero instead" TENDSTR),chunkInNAND)); ++ int chunkInNAND = yaffs_FindChunkInFile(in, chunkInInode, NULL); + -+ memset(buffer,0,in->myDev->nBytesPerChunk); // get sane data if you read a hole ++ if (chunkInNAND >= 0) { ++ return yaffs_ReadChunkWithTagsFromNAND(in->myDev, chunkInNAND, ++ buffer,NULL); ++ } else { ++ T(YAFFS_TRACE_NANDACCESS, ++ (TSTR("Chunk %d not found zero instead" TENDSTR), ++ chunkInNAND)); ++ /* get sane (zero) data if you read a hole */ ++ memset(buffer, 0, in->myDev->nDataBytesPerChunk); + return 0; + } + +} + -+ -+void yaffs_DeleteChunk(yaffs_Device *dev,int chunkId,int markNAND,int lyn) ++void yaffs_DeleteChunk(yaffs_Device * dev, int chunkId, int markNAND, int lyn) +{ + int block; + int page; + yaffs_ExtendedTags tags; + yaffs_BlockInfo *bi; -+ -+ if(chunkId <= 0) return; -+ ++ ++ if (chunkId <= 0) ++ return; ++ + dev->nDeletions++; + block = chunkId / dev->nChunksPerBlock; + page = chunkId % dev->nChunksPerBlock; -+ -+ bi = yaffs_GetBlockInfo(dev,block); -+ -+ T(YAFFS_TRACE_DELETION,(TSTR("line %d delete of chunk %d" TENDSTR),lyn,chunkId)); -+ -+ if(markNAND && -+ bi->blockState != YAFFS_BLOCK_STATE_COLLECTING && -+ !dev->isYaffs2) -+ { -+// yaffs_SpareInitialise(&spare); + -+#ifdef CONFIG_MTD_NAND_VERIFY_WRITE ++ bi = yaffs_GetBlockInfo(dev, block); + -+ //read data before write, to ensure correct ecc -+ //if we're using MTD verification under Linux -+// yaffs_ReadChunkFromNAND(dev,chunkId,NULL,&spare,0); -+#endif ++ T(YAFFS_TRACE_DELETION, ++ (TSTR("line %d delete of chunk %d" TENDSTR), lyn, chunkId)); ++ ++ if (markNAND && ++ bi->blockState != YAFFS_BLOCK_STATE_COLLECTING && !dev->isYaffs2) { + + yaffs_InitialiseTags(&tags); + + tags.chunkDeleted = 1; + -+ -+ yaffs_WriteChunkWithTagsToNAND(dev,chunkId,NULL,&tags); -+ yaffs_HandleUpdateChunk(dev,chunkId,&tags); ++ yaffs_WriteChunkWithTagsToNAND(dev, chunkId, NULL, &tags); ++ yaffs_HandleUpdateChunk(dev, chunkId, &tags); ++ } else { ++ dev->nUnmarkedDeletions++; + } -+ else -+ { -+ dev->nUnmarkedDeletions++; -+ } -+ -+ -+ // Pull out of the management area. -+ // If the whole block became dirty, this will kick off an erasure. -+ if( bi->blockState == YAFFS_BLOCK_STATE_ALLOCATING || -+ bi->blockState == YAFFS_BLOCK_STATE_FULL || ++ ++ /* Pull out of the management area. ++ * If the whole block became dirty, this will kick off an erasure. ++ */ ++ if (bi->blockState == YAFFS_BLOCK_STATE_ALLOCATING || ++ bi->blockState == YAFFS_BLOCK_STATE_FULL || + bi->blockState == YAFFS_BLOCK_STATE_NEEDS_SCANNING || -+ bi->blockState == YAFFS_BLOCK_STATE_COLLECTING) -+ { -+ dev->nFreeChunks++; ++ bi->blockState == YAFFS_BLOCK_STATE_COLLECTING) { ++ dev->nFreeChunks++; ++ ++ yaffs_ClearChunkBit(dev, block, page); + -+ yaffs_ClearChunkBit(dev,block,page); -+ + bi->pagesInUse--; -+ -+ if(bi->pagesInUse == 0 && -+ !bi->hasShrinkHeader && -+ bi->blockState != YAFFS_BLOCK_STATE_ALLOCATING && -+ bi->blockState != YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ yaffs_BlockBecameDirty(dev,block); -+ } + ++ if (bi->pagesInUse == 0 && ++ !bi->hasShrinkHeader && ++ bi->blockState != YAFFS_BLOCK_STATE_ALLOCATING && ++ bi->blockState != YAFFS_BLOCK_STATE_NEEDS_SCANNING) { ++ yaffs_BlockBecameDirty(dev, block); ++ } ++ ++ } else { ++ /* T(("Bad news deleting chunk %d\n",chunkId)); */ + } -+ else -+ { -+ // T(("Bad news deleting chunk %d\n",chunkId)); -+ } -+ ++ +} + ++static int yaffs_WriteChunkDataToObject(yaffs_Object * in, int chunkInInode, ++ const __u8 * buffer, int nBytes, ++ int useReserve) ++{ ++ /* Find old chunk Need to do this to get serial number ++ * Write new one and patch into tree. ++ * Invalidate old tags. ++ */ + ++ int prevChunkId; ++ yaffs_ExtendedTags prevTags; + ++ int newChunkId; ++ yaffs_ExtendedTags newTags; + -+static int yaffs_WriteChunkDataToObject(yaffs_Object *in,int chunkInInode, const __u8 *buffer,int nBytes,int useReserve) -+{ -+ // Find old chunk Need to do this to get serial number -+ // Write new one and patch into tree. -+ // Invalidate old tags. ++ yaffs_Device *dev = in->myDev; + -+ int prevChunkId; -+ yaffs_ExtendedTags prevTags; -+ -+ int newChunkId; -+ yaffs_ExtendedTags newTags; ++ yaffs_CheckGarbageCollection(dev); + -+ yaffs_Device *dev = in->myDev; ++ /* Get the previous chunk at this location in the file if it exists */ ++ prevChunkId = yaffs_FindChunkInFile(in, chunkInInode, &prevTags); + -+ yaffs_CheckGarbageCollection(dev); ++ /* Set up new tags */ ++ yaffs_InitialiseTags(&newTags); + -+ // Get the previous chunk at this location in the file if it exists -+ prevChunkId = yaffs_FindChunkInFile(in,chunkInInode,&prevTags); -+ -+ // Set up new tags -+ yaffs_InitialiseTags(&newTags); -+ -+ newTags.chunkId = chunkInInode; ++ newTags.chunkId = chunkInInode; + newTags.objectId = in->objectId; -+ newTags.serialNumber = (prevChunkId >= 0) ? prevTags.serialNumber + 1 : 1; -+ newTags.byteCount = nBytes; -+ -+// yaffs_CalcTagsECC(&newTags); ++ newTags.serialNumber = ++ (prevChunkId >= 0) ? prevTags.serialNumber + 1 : 1; ++ newTags.byteCount = nBytes; ++ ++ newChunkId = ++ yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &newTags, ++ useReserve); ++ ++ if (newChunkId >= 0) { ++ yaffs_PutChunkIntoFile(in, chunkInInode, newChunkId, 0); ++ ++ if (prevChunkId >= 0) { ++ yaffs_DeleteChunk(dev, prevChunkId, 1, __LINE__); + -+ newChunkId = yaffs_WriteNewChunkWithTagsToNAND(dev,buffer,&newTags,useReserve); -+ -+ if(newChunkId >= 0) -+ { -+ yaffs_PutChunkIntoFile(in,chunkInInode,newChunkId,0); -+ -+ -+ if(prevChunkId >= 0) -+ { -+ yaffs_DeleteChunk(dev,prevChunkId,1,__LINE__); -+ + } -+ ++ + yaffs_CheckFileSanity(in); + } + return newChunkId; + ++} + ++/* UpdateObjectHeader updates the header on NAND for an object. ++ * If name is not NULL, then that new name is used. ++ */ ++int yaffs_UpdateObjectHeader(yaffs_Object * in, const YCHAR * name, int force, ++ int isShrink, int shadows) ++{ + ++ yaffs_BlockInfo *bi; + ++ yaffs_Device *dev = in->myDev; + -+} ++ int prevChunkId; ++ int retVal = 0; ++ int result = 0; + ++ int newChunkId; ++ yaffs_ExtendedTags newTags; + -+// UpdateObjectHeader updates the header on NAND for an object. -+// If name is not NULL, then that new name is used. -+// -+int yaffs_UpdateObjectHeader(yaffs_Object *in,const YCHAR *name, int force,int isShrink,int shadows) -+{ ++ __u8 *buffer = NULL; ++ YCHAR oldName[YAFFS_MAX_NAME_LENGTH + 1]; ++ ++ yaffs_ObjectHeader *oh = NULL; ++ ++ if (!in->fake || force) { ++ ++ yaffs_CheckGarbageCollection(dev); ++ ++ buffer = yaffs_GetTempBuffer(in->myDev, __LINE__); ++ oh = (yaffs_ObjectHeader *) buffer; + -+ yaffs_BlockInfo *bi; -+ -+ yaffs_Device *dev = in->myDev; -+ -+ int prevChunkId; -+ int retVal = 0; -+ -+ int newChunkId; -+ yaffs_ExtendedTags newTags; -+ -+ __u8 *buffer = NULL; -+ YCHAR oldName[YAFFS_MAX_NAME_LENGTH+1]; -+ -+ // __u8 bufferOld[YAFFS_BYTES_PER_CHUNK]; -+ -+ yaffs_ObjectHeader *oh = NULL; -+ // yaffs_ObjectHeader *ohOld = (yaffs_ObjectHeader *)bufferOld; -+ -+ -+ if(!in->fake || force) -+ { -+ -+ yaffs_CheckGarbageCollection(dev); -+ -+ buffer = yaffs_GetTempBuffer(in->myDev,__LINE__); -+ oh = (yaffs_ObjectHeader *)buffer; -+ + prevChunkId = in->chunkId; -+ -+ if(prevChunkId >= 0) -+ { -+ yaffs_ReadChunkWithTagsFromNAND(dev,prevChunkId,buffer,NULL); -+ memcpy(oldName,oh->name,sizeof(oh->name)); ++ ++ if (prevChunkId >= 0) { ++ result = yaffs_ReadChunkWithTagsFromNAND(dev, prevChunkId, ++ buffer, NULL); ++ memcpy(oldName, oh->name, sizeof(oh->name)); + } + -+ memset(buffer,0xFF,dev->nBytesPerChunk); ++ memset(buffer, 0xFF, dev->nDataBytesPerChunk); + -+ // Header data + oh->type = in->variantType; -+ + oh->yst_mode = in->yst_mode; -+ -+ // shadowing + oh->shadowsObject = shadows; + +#ifdef CONFIG_YAFFS_WINCE @@ -5755,318 +6480,321 @@ index 0000000..bf13f91 + oh->yst_mtime = in->yst_mtime; + oh->yst_ctime = in->yst_ctime; + oh->yst_rdev = in->yst_rdev; -+#endif -+ if(in->parent) -+ { ++#endif ++ if (in->parent) { + oh->parentObjectId = in->parent->objectId; -+ } -+ else -+ { ++ } else { + oh->parentObjectId = 0; + } -+ -+ //oh->sum = in->sum; -+ if(name && *name) -+ { -+ memset(oh->name,0,sizeof(oh->name)); -+ yaffs_strncpy(oh->name,name,YAFFS_MAX_NAME_LENGTH); -+ } -+ else if(prevChunkId) -+ { -+ memcpy(oh->name, oldName,sizeof(oh->name)); -+ } -+ else -+ { -+ memset(oh->name,0,sizeof(oh->name)); ++ ++ if (name && *name) { ++ memset(oh->name, 0, sizeof(oh->name)); ++ yaffs_strncpy(oh->name, name, YAFFS_MAX_NAME_LENGTH); ++ } else if (prevChunkId) { ++ memcpy(oh->name, oldName, sizeof(oh->name)); ++ } else { ++ memset(oh->name, 0, sizeof(oh->name)); + } -+ ++ + oh->isShrink = isShrink; -+ -+ switch(in->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_UNKNOWN: -+ // Should not happen -+ break; -+ case YAFFS_OBJECT_TYPE_FILE: -+ oh->fileSize = (oh->parentObjectId == YAFFS_OBJECTID_DELETED || -+ oh->parentObjectId == YAFFS_OBJECTID_UNLINKED) ? 0 : in->variant.fileVariant.fileSize; -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: -+ oh->equivalentObjectId = in->variant.hardLinkVariant.equivalentObjectId; -+ break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: -+ // Do nothing -+ break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: -+ // Do nothing -+ break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: -+ yaffs_strncpy(oh->alias,in->variant.symLinkVariant.alias,YAFFS_MAX_ALIAS_LENGTH); -+ oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0; -+ break; ++ ++ switch (in->variantType) { ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ /* Should not happen */ ++ break; ++ case YAFFS_OBJECT_TYPE_FILE: ++ oh->fileSize = ++ (oh->parentObjectId == YAFFS_OBJECTID_DELETED ++ || oh->parentObjectId == ++ YAFFS_OBJECTID_UNLINKED) ? 0 : in->variant. ++ fileVariant.fileSize; ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ oh->equivalentObjectId = ++ in->variant.hardLinkVariant.equivalentObjectId; ++ break; ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ /* Do nothing */ ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ /* Do nothing */ ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ yaffs_strncpy(oh->alias, ++ in->variant.symLinkVariant.alias, ++ YAFFS_MAX_ALIAS_LENGTH); ++ oh->alias[YAFFS_MAX_ALIAS_LENGTH] = 0; ++ break; + } + -+ // Tags ++ /* Tags */ + yaffs_InitialiseTags(&newTags); + in->serial++; + newTags.chunkId = 0; + newTags.objectId = in->objectId; + newTags.serialNumber = in->serial; -+ -+ // Add extra info for file header -+ ++ ++ /* Add extra info for file header */ ++ + newTags.extraHeaderInfoAvailable = 1; + newTags.extraParentObjectId = oh->parentObjectId; + newTags.extraFileLength = oh->fileSize; + newTags.extraIsShrinkHeader = oh->isShrink; + newTags.extraEquivalentObjectId = oh->equivalentObjectId; + newTags.extraShadows = (oh->shadowsObject > 0) ? 1 : 0; -+ newTags.extraObjectType = in->variantType; -+ -+ // Create new chunk in NAND -+ newChunkId = yaffs_WriteNewChunkWithTagsToNAND(dev,buffer,&newTags, (prevChunkId >= 0) ? 1 : 0 ); -+ -+ if(newChunkId >= 0) -+ { -+ -+ in->chunkId = newChunkId; -+ -+ if(prevChunkId >= 0) -+ { -+ yaffs_DeleteChunk(dev,prevChunkId,1,__LINE__); ++ newTags.extraObjectType = in->variantType; ++ ++ /* Create new chunk in NAND */ ++ newChunkId = ++ yaffs_WriteNewChunkWithTagsToNAND(dev, buffer, &newTags, ++ (prevChunkId >= 0) ? 1 : 0); ++ ++ if (newChunkId >= 0) { ++ ++ in->chunkId = newChunkId; ++ ++ if (prevChunkId >= 0) { ++ yaffs_DeleteChunk(dev, prevChunkId, 1, ++ __LINE__); + } -+ -+ in->dirty = 0; -+ -+ // If this was a shrink, then mark the block that the chunk lives on -+ if(isShrink) -+ { -+ bi = yaffs_GetBlockInfo(in->myDev,newChunkId / in->myDev->nChunksPerBlock); ++ ++ if(!yaffs_ObjectHasCachedWriteData(in)) ++ in->dirty = 0; ++ ++ /* If this was a shrink, then mark the block that the chunk lives on */ ++ if (isShrink) { ++ bi = yaffs_GetBlockInfo(in->myDev, ++ newChunkId /in->myDev-> nChunksPerBlock); + bi->hasShrinkHeader = 1; + } -+ ++ + } -+ -+ retVal = newChunkId; + -+ } -+ -+ if(buffer) -+ yaffs_ReleaseTempBuffer(dev,buffer,__LINE__); -+ -+ return retVal; -+} ++ retVal = newChunkId; + ++ } + -+/////////////////////// Short Operations Cache //////////////////////////////// -+// In many siturations where there is no high level buffering (eg WinCE) a lot of -+// reads might be short sequential reads, and a lot of writes may be short -+// sequential writes. eg. scanning/writing a jpeg file. -+// In these cases, a short read/write cache can provide a huge perfomance benefit -+// with dumb-as-a-rock code. -+// There are a limited number (~10) of cache chunks per device so that we don't -+// need a very intelligent search. ++ if (buffer) ++ yaffs_ReleaseTempBuffer(dev, buffer, __LINE__); + ++ return retVal; ++} + ++/*------------------------ Short Operations Cache ---------------------------------------- ++ * In many situations where there is no high level buffering (eg WinCE) a lot of ++ * reads might be short sequential reads, and a lot of writes may be short ++ * sequential writes. eg. scanning/writing a jpeg file. ++ * In these cases, a short read/write cache can provide a huge perfomance benefit ++ * with dumb-as-a-rock code. ++ * In Linux, the page cache provides read buffering aand the short op cache provides write ++ * buffering. ++ * ++ * There are a limited number (~10) of cache chunks per device so that we don't ++ * need a very intelligent search. ++ */ + ++static int yaffs_ObjectHasCachedWriteData(yaffs_Object *obj) ++{ ++ yaffs_Device *dev = obj->myDev; ++ int i; ++ yaffs_ChunkCache *cache; ++ int nCaches = obj->myDev->nShortOpCaches; ++ ++ for(i = 0; i < nCaches; i++){ ++ cache = &dev->srCache[i]; ++ if (cache->object == obj && ++ cache->dirty) ++ return 1; ++ } ++ ++ return 0; ++} + + -+static void yaffs_FlushFilesChunkCache(yaffs_Object *obj) ++static void yaffs_FlushFilesChunkCache(yaffs_Object * obj) +{ + yaffs_Device *dev = obj->myDev; -+ int lowest = -99; // Stop compiler whining. ++ int lowest = -99; /* Stop compiler whining. */ + int i; + yaffs_ChunkCache *cache; + int chunkWritten = 0; -+ //int nBytes; + int nCaches = obj->myDev->nShortOpCaches; -+ -+ if (nCaches > 0) -+ { -+ do{ ++ ++ if (nCaches > 0) { ++ do { + cache = NULL; -+ -+ // Find the dirty cache for this object with the lowest chunk id. -+ for(i = 0; i < nCaches; i++) -+ { -+ if(dev->srCache[i].object == obj && -+ dev->srCache[i].dirty) -+ { -+ if(!cache || dev->srCache[i].chunkId < lowest) -+ { ++ ++ /* Find the dirty cache for this object with the lowest chunk id. */ ++ for (i = 0; i < nCaches; i++) { ++ if (dev->srCache[i].object == obj && ++ dev->srCache[i].dirty) { ++ if (!cache ++ || dev->srCache[i].chunkId < ++ lowest) { + cache = &dev->srCache[i]; + lowest = cache->chunkId; + } + } + } -+ -+ if(cache && !cache->locked) -+ { -+ //Write it out and free it up + -+#if 0 -+ nBytes = cache->object->variant.fileVariant.fileSize - ((cache->chunkId -1) * YAFFS_BYTES_PER_CHUNK); -+ -+ if(nBytes > YAFFS_BYTES_PER_CHUNK) -+ { -+ nBytes= YAFFS_BYTES_PER_CHUNK; -+ } -+#endif -+ chunkWritten = yaffs_WriteChunkDataToObject(cache->object, -+ cache->chunkId, -+ cache->data, -+ cache->nBytes,1); ++ if (cache && !cache->locked) { ++ /* Write it out and free it up */ + ++ chunkWritten = ++ yaffs_WriteChunkDataToObject(cache->object, ++ cache->chunkId, ++ cache->data, ++ cache->nBytes, ++ 1); + cache->dirty = 0; + cache->object = NULL; + } -+ -+ } while(cache && chunkWritten > 0); -+ -+ if(cache) -+ { -+ //Hoosterman, disk full while writing cache out. -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: no space during cache write" TENDSTR))); ++ ++ } while (cache && chunkWritten > 0); ++ ++ if (cache) { ++ /* Hoosterman, disk full while writing cache out. */ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("yaffs tragedy: no space during cache write" TENDSTR))); + + } -+ } -+ ++ } ++ +} + ++/*yaffs_FlushEntireDeviceCache(dev) ++ * ++ * ++ */ + -+// Grab us a chunk for use. -+// First look for an empty one. -+// Then look for the least recently used non-dirty one. -+// Then look for the least recently used dirty one...., flush and look again. -+static yaffs_ChunkCache *yaffs_GrabChunkCacheWorker(yaffs_Device *dev) ++void yaffs_FlushEntireDeviceCache(yaffs_Device *dev) +{ ++ yaffs_Object *obj; ++ int nCaches = dev->nShortOpCaches; + int i; -+ int usage; -+ int theOne; + -+ if(dev->nShortOpCaches > 0) -+ { -+ for(i = 0; i < dev->nShortOpCaches; i++) -+ { -+ if(!dev->srCache[i].object) -+ { -+ //T(("Grabbing empty %d\n",i)); -+ -+ //printf("Grabbing empty %d\n",i); ++ /* Find a dirty object in the cache and flush it... ++ * until there are no further dirty objects. ++ */ ++ do { ++ obj = NULL; ++ for( i = 0; i < nCaches && !obj; i++) { ++ if (dev->srCache[i].object && ++ dev->srCache[i].dirty) ++ obj = dev->srCache[i].object; ++ ++ } ++ if(obj) ++ yaffs_FlushFilesChunkCache(obj); + ++ } while(obj); ++ ++} ++ ++ ++/* Grab us a cache chunk for use. ++ * First look for an empty one. ++ * Then look for the least recently used non-dirty one. ++ * Then look for the least recently used dirty one...., flush and look again. ++ */ ++static yaffs_ChunkCache *yaffs_GrabChunkCacheWorker(yaffs_Device * dev) ++{ ++ int i; ++ int usage; ++ int theOne; ++ ++ if (dev->nShortOpCaches > 0) { ++ for (i = 0; i < dev->nShortOpCaches; i++) { ++ if (!dev->srCache[i].object) + return &dev->srCache[i]; -+ } + } -+ ++ + return NULL; -+ -+ theOne = -1; -+ usage = 0; // just to stop the compiler grizzling -+ -+ for(i = 0; i < dev->nShortOpCaches; i++) -+ { -+ if(!dev->srCache[i].dirty && -+ ((dev->srCache[i].lastUse < usage && theOne >= 0)|| -+ theOne < 0)) -+ { ++ ++ theOne = -1; ++ usage = 0; /* just to stop the compiler grizzling */ ++ ++ for (i = 0; i < dev->nShortOpCaches; i++) { ++ if (!dev->srCache[i].dirty && ++ ((dev->srCache[i].lastUse < usage && theOne >= 0) || ++ theOne < 0)) { + usage = dev->srCache[i].lastUse; + theOne = i; + } + } -+ -+ //T(("Grabbing non-empty %d\n",theOne)); -+ -+ //if(theOne >= 0) printf("Grabbed non-empty cache %d\n",theOne); -+ -+ return theOne >= 0 ? &dev->srCache[theOne] : NULL; -+ } -+ else -+ { ++ ++ ++ return theOne >= 0 ? &dev->srCache[theOne] : NULL; ++ } else { + return NULL; + } -+ -+} + ++} + -+static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device *dev) ++static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device * dev) +{ + yaffs_ChunkCache *cache; + yaffs_Object *theObj; + int usage; + int i; + int pushout; -+ -+ if(dev->nShortOpCaches > 0) -+ { -+ // Try find a non-dirty one... -+ ++ ++ if (dev->nShortOpCaches > 0) { ++ /* Try find a non-dirty one... */ ++ + cache = yaffs_GrabChunkCacheWorker(dev); -+ -+ if(!cache) -+ { -+ // They were all dirty, find the last recently used object and flush -+ // its cache, then find again. -+ // NB what's here is not very accurate, we actually flush the object -+ // the last recently used page. -+ -+ // With locking we can't assume we can use entry zero -+ -+ ++ ++ if (!cache) { ++ /* They were all dirty, find the last recently used object and flush ++ * its cache, then find again. ++ * NB what's here is not very accurate, we actually flush the object ++ * the last recently used page. ++ */ ++ ++ /* With locking we can't assume we can use entry zero */ ++ + theObj = NULL; + usage = -1; + cache = NULL; + pushout = -1; -+ -+ for(i = 0; i < dev->nShortOpCaches; i++) -+ { -+ if( dev->srCache[i].object && -+ !dev->srCache[i].locked && -+ (dev->srCache[i].lastUse < usage || !cache)) ++ ++ for (i = 0; i < dev->nShortOpCaches; i++) { ++ if (dev->srCache[i].object && ++ !dev->srCache[i].locked && ++ (dev->srCache[i].lastUse < usage || !cache)) + { -+ usage = dev->srCache[i].lastUse; ++ usage = dev->srCache[i].lastUse; + theObj = dev->srCache[i].object; + cache = &dev->srCache[i]; + pushout = i; + } + } -+ -+ if(!cache || cache->dirty) -+ { -+ -+ //printf("Dirty "); ++ ++ if (!cache || cache->dirty) { ++ /* Flush and try again */ + yaffs_FlushFilesChunkCache(theObj); -+ -+ // Try again + cache = yaffs_GrabChunkCacheWorker(dev); + } -+ else -+ { -+ //printf(" pushout %d\n",pushout); -+ } -+ ++ + } + return cache; -+ } -+ else ++ } else + return NULL; + +} + -+ -+// Find a cached chunk -+static yaffs_ChunkCache *yaffs_FindChunkCache(const yaffs_Object *obj, int chunkId) ++/* Find a cached chunk */ ++static yaffs_ChunkCache *yaffs_FindChunkCache(const yaffs_Object * obj, ++ int chunkId) +{ + yaffs_Device *dev = obj->myDev; + int i; -+ if(dev->nShortOpCaches > 0) -+ { -+ for(i = 0; i < dev->nShortOpCaches; i++) -+ { -+ if(dev->srCache[i].object == obj && -+ dev->srCache[i].chunkId == chunkId) -+ { ++ if (dev->nShortOpCaches > 0) { ++ for (i = 0; i < dev->nShortOpCaches; i++) { ++ if (dev->srCache[i].object == obj && ++ dev->srCache[i].chunkId == chunkId) { + dev->cacheHits++; -+ ++ + return &dev->srCache[i]; + } + } @@ -6074,211 +6802,652 @@ index 0000000..bf13f91 + return NULL; +} + -+// Mark the chunk for the least recently used algorithym -+static void yaffs_UseChunkCache(yaffs_Device *dev, yaffs_ChunkCache *cache, int isAWrite) ++/* Mark the chunk for the least recently used algorithym */ ++static void yaffs_UseChunkCache(yaffs_Device * dev, yaffs_ChunkCache * cache, ++ int isAWrite) +{ + -+ if(dev->nShortOpCaches > 0) -+ { -+ if( dev->srLastUse < 0 || -+ dev->srLastUse > 100000000) -+ { -+ // Reset the cache usages ++ if (dev->nShortOpCaches > 0) { ++ if (dev->srLastUse < 0 || dev->srLastUse > 100000000) { ++ /* Reset the cache usages */ + int i; -+ for(i = 1; i < dev->nShortOpCaches; i++) -+ { ++ for (i = 1; i < dev->nShortOpCaches; i++) { + dev->srCache[i].lastUse = 0; + } + dev->srLastUse = 0; + } + + dev->srLastUse++; -+ ++ + cache->lastUse = dev->srLastUse; + -+ if(isAWrite) -+ { ++ if (isAWrite) { + cache->dirty = 1; + } + } +} + -+// Invalidate a single cache page. -+// Do this when a whole page gets written, -+// ie the short cache for this page is no longer valid. -+static void yaffs_InvalidateChunkCache(yaffs_Object *object, int chunkId) ++/* Invalidate a single cache page. ++ * Do this when a whole page gets written, ++ * ie the short cache for this page is no longer valid. ++ */ ++static void yaffs_InvalidateChunkCache(yaffs_Object * object, int chunkId) +{ -+ if(object->myDev->nShortOpCaches > 0) -+ { -+ yaffs_ChunkCache *cache = yaffs_FindChunkCache(object,chunkId); ++ if (object->myDev->nShortOpCaches > 0) { ++ yaffs_ChunkCache *cache = yaffs_FindChunkCache(object, chunkId); + -+ if(cache) -+ { ++ if (cache) { + cache->object = NULL; + } + } +} + ++/* Invalidate all the cache pages associated with this object ++ * Do this whenever ther file is deleted or resized. ++ */ ++static void yaffs_InvalidateWholeChunkCache(yaffs_Object * in) ++{ ++ int i; ++ yaffs_Device *dev = in->myDev; ++ ++ if (dev->nShortOpCaches > 0) { ++ /* Invalidate it. */ ++ for (i = 0; i < dev->nShortOpCaches; i++) { ++ if (dev->srCache[i].object == in) { ++ dev->srCache[i].object = NULL; ++ } ++ } ++ } ++} ++ ++/*--------------------- Checkpointing --------------------*/ ++ ++ ++static int yaffs_WriteCheckpointValidityMarker(yaffs_Device *dev,int head) ++{ ++ yaffs_CheckpointValidity cp; ++ cp.structType = sizeof(cp); ++ cp.magic = YAFFS_MAGIC; ++ cp.version = YAFFS_CHECKPOINT_VERSION; ++ cp.head = (head) ? 1 : 0; ++ ++ return (yaffs_CheckpointWrite(dev,&cp,sizeof(cp)) == sizeof(cp))? ++ 1 : 0; ++} ++ ++static int yaffs_ReadCheckpointValidityMarker(yaffs_Device *dev, int head) ++{ ++ yaffs_CheckpointValidity cp; ++ int ok; ++ ++ ok = (yaffs_CheckpointRead(dev,&cp,sizeof(cp)) == sizeof(cp)); ++ ++ if(ok) ++ ok = (cp.structType == sizeof(cp)) && ++ (cp.magic == YAFFS_MAGIC) && ++ (cp.version == YAFFS_CHECKPOINT_VERSION) && ++ (cp.head == ((head) ? 1 : 0)); ++ return ok ? 1 : 0; ++} ++ ++static void yaffs_DeviceToCheckpointDevice(yaffs_CheckpointDevice *cp, ++ yaffs_Device *dev) ++{ ++ cp->nErasedBlocks = dev->nErasedBlocks; ++ cp->allocationBlock = dev->allocationBlock; ++ cp->allocationPage = dev->allocationPage; ++ cp->nFreeChunks = dev->nFreeChunks; ++ ++ cp->nDeletedFiles = dev->nDeletedFiles; ++ cp->nUnlinkedFiles = dev->nUnlinkedFiles; ++ cp->nBackgroundDeletions = dev->nBackgroundDeletions; ++ cp->sequenceNumber = dev->sequenceNumber; ++ cp->oldestDirtySequence = dev->oldestDirtySequence; ++ ++} ++ ++static void yaffs_CheckpointDeviceToDevice(yaffs_Device *dev, ++ yaffs_CheckpointDevice *cp) ++{ ++ dev->nErasedBlocks = cp->nErasedBlocks; ++ dev->allocationBlock = cp->allocationBlock; ++ dev->allocationPage = cp->allocationPage; ++ dev->nFreeChunks = cp->nFreeChunks; ++ ++ dev->nDeletedFiles = cp->nDeletedFiles; ++ dev->nUnlinkedFiles = cp->nUnlinkedFiles; ++ dev->nBackgroundDeletions = cp->nBackgroundDeletions; ++ dev->sequenceNumber = cp->sequenceNumber; ++ dev->oldestDirtySequence = cp->oldestDirtySequence; ++} ++ ++ ++static int yaffs_WriteCheckpointDevice(yaffs_Device *dev) ++{ ++ yaffs_CheckpointDevice cp; ++ __u32 nBytes; ++ __u32 nBlocks = (dev->internalEndBlock - dev->internalStartBlock + 1); ++ ++ int ok; ++ ++ /* Write device runtime values*/ ++ yaffs_DeviceToCheckpointDevice(&cp,dev); ++ cp.structType = sizeof(cp); ++ ++ ok = (yaffs_CheckpointWrite(dev,&cp,sizeof(cp)) == sizeof(cp)); ++ ++ /* Write block info */ ++ if(ok) { ++ nBytes = nBlocks * sizeof(yaffs_BlockInfo); ++ ok = (yaffs_CheckpointWrite(dev,dev->blockInfo,nBytes) == nBytes); ++ } ++ ++ /* Write chunk bits */ ++ if(ok) { ++ nBytes = nBlocks * dev->chunkBitmapStride; ++ ok = (yaffs_CheckpointWrite(dev,dev->chunkBits,nBytes) == nBytes); ++ } ++ return ok ? 1 : 0; ++ ++} ++ ++static int yaffs_ReadCheckpointDevice(yaffs_Device *dev) ++{ ++ yaffs_CheckpointDevice cp; ++ __u32 nBytes; ++ __u32 nBlocks = (dev->internalEndBlock - dev->internalStartBlock + 1); ++ ++ int ok; ++ ++ ok = (yaffs_CheckpointRead(dev,&cp,sizeof(cp)) == sizeof(cp)); ++ if(!ok) ++ return 0; ++ ++ if(cp.structType != sizeof(cp)) ++ return 0; ++ ++ ++ yaffs_CheckpointDeviceToDevice(dev,&cp); ++ ++ nBytes = nBlocks * sizeof(yaffs_BlockInfo); ++ ++ ok = (yaffs_CheckpointRead(dev,dev->blockInfo,nBytes) == nBytes); ++ ++ if(!ok) ++ return 0; ++ nBytes = nBlocks * dev->chunkBitmapStride; ++ ++ ok = (yaffs_CheckpointRead(dev,dev->chunkBits,nBytes) == nBytes); ++ ++ return ok ? 1 : 0; ++} ++ ++static void yaffs_ObjectToCheckpointObject(yaffs_CheckpointObject *cp, ++ yaffs_Object *obj) ++{ ++ ++ cp->objectId = obj->objectId; ++ cp->parentId = (obj->parent) ? obj->parent->objectId : 0; ++ cp->chunkId = obj->chunkId; ++ cp->variantType = obj->variantType; ++ cp->deleted = obj->deleted; ++ cp->softDeleted = obj->softDeleted; ++ cp->unlinked = obj->unlinked; ++ cp->fake = obj->fake; ++ cp->renameAllowed = obj->renameAllowed; ++ cp->unlinkAllowed = obj->unlinkAllowed; ++ cp->serial = obj->serial; ++ cp->nDataChunks = obj->nDataChunks; ++ ++ if(obj->variantType == YAFFS_OBJECT_TYPE_FILE) ++ cp->fileSizeOrEquivalentObjectId = obj->variant.fileVariant.fileSize; ++ else if(obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) ++ cp->fileSizeOrEquivalentObjectId = obj->variant.hardLinkVariant.equivalentObjectId; ++} ++ ++static void yaffs_CheckpointObjectToObject( yaffs_Object *obj,yaffs_CheckpointObject *cp) ++{ ++ ++ yaffs_Object *parent; ++ ++ obj->objectId = cp->objectId; ++ ++ if(cp->parentId) ++ parent = yaffs_FindOrCreateObjectByNumber( ++ obj->myDev, ++ cp->parentId, ++ YAFFS_OBJECT_TYPE_DIRECTORY); ++ else ++ parent = NULL; ++ ++ if(parent) ++ yaffs_AddObjectToDirectory(parent, obj); ++ ++ obj->chunkId = cp->chunkId; ++ obj->variantType = cp->variantType; ++ obj->deleted = cp->deleted; ++ obj->softDeleted = cp->softDeleted; ++ obj->unlinked = cp->unlinked; ++ obj->fake = cp->fake; ++ obj->renameAllowed = cp->renameAllowed; ++ obj->unlinkAllowed = cp->unlinkAllowed; ++ obj->serial = cp->serial; ++ obj->nDataChunks = cp->nDataChunks; ++ ++ if(obj->variantType == YAFFS_OBJECT_TYPE_FILE) ++ obj->variant.fileVariant.fileSize = cp->fileSizeOrEquivalentObjectId; ++ else if(obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) ++ obj->variant.hardLinkVariant.equivalentObjectId = cp->fileSizeOrEquivalentObjectId; ++ ++ if(obj->objectId >= YAFFS_NOBJECT_BUCKETS) ++ obj->lazyLoaded = 1; ++} ++ ++ + -+// Invalidate all the cache pages associated with this object -+// Do this whenever ther file is deleted or resized. -+static void yaffs_InvalidateWholeChunkCache(yaffs_Object *in) ++static int yaffs_CheckpointTnodeWorker(yaffs_Object * in, yaffs_Tnode * tn, ++ __u32 level, int chunkOffset) +{ + int i; + yaffs_Device *dev = in->myDev; ++ int ok = 1; ++ int nTnodeBytes = (dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8; ++ ++ if (tn) { ++ if (level > 0) { ++ ++ for (i = 0; i < YAFFS_NTNODES_INTERNAL && ok; i++){ ++ if (tn->internal[i]) { ++ ok = yaffs_CheckpointTnodeWorker(in, ++ tn->internal[i], ++ level - 1, ++ (chunkOffset<<YAFFS_TNODES_INTERNAL_BITS) + i); ++ } ++ } ++ } else if (level == 0) { ++ __u32 baseOffset = chunkOffset << YAFFS_TNODES_LEVEL0_BITS; ++ /* printf("write tnode at %d\n",baseOffset); */ ++ ok = (yaffs_CheckpointWrite(dev,&baseOffset,sizeof(baseOffset)) == sizeof(baseOffset)); ++ if(ok) ++ ok = (yaffs_CheckpointWrite(dev,tn,nTnodeBytes) == nTnodeBytes); ++ } ++ } ++ ++ return ok; ++ ++} ++ ++static int yaffs_WriteCheckpointTnodes(yaffs_Object *obj) ++{ ++ __u32 endMarker = ~0; ++ int ok = 1; + -+ if(dev->nShortOpCaches > 0) -+ { -+ // Now invalidate it. -+ for(i = 0; i < dev->nShortOpCaches; i++) -+ { -+ if(dev->srCache[i].object == in) -+ { -+ dev->srCache[i].object = NULL; ++ if(obj->variantType == YAFFS_OBJECT_TYPE_FILE){ ++ ok = yaffs_CheckpointTnodeWorker(obj, ++ obj->variant.fileVariant.top, ++ obj->variant.fileVariant.topLevel, ++ 0); ++ if(ok) ++ ok = (yaffs_CheckpointWrite(obj->myDev,&endMarker,sizeof(endMarker)) == ++ sizeof(endMarker)); ++ } ++ ++ return ok ? 1 : 0; ++} ++ ++static int yaffs_ReadCheckpointTnodes(yaffs_Object *obj) ++{ ++ __u32 baseChunk; ++ int ok = 1; ++ yaffs_Device *dev = obj->myDev; ++ yaffs_FileStructure *fileStructPtr = &obj->variant.fileVariant; ++ yaffs_Tnode *tn; ++ ++ ok = (yaffs_CheckpointRead(dev,&baseChunk,sizeof(baseChunk)) == sizeof(baseChunk)); ++ ++ while(ok && (~baseChunk)){ ++ /* Read level 0 tnode */ ++ ++ /* printf("read tnode at %d\n",baseChunk); */ ++ tn = yaffs_GetTnodeRaw(dev); ++ if(tn) ++ ok = (yaffs_CheckpointRead(dev,tn,(dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8) == ++ (dev->tnodeWidth * YAFFS_NTNODES_LEVEL0)/8); ++ else ++ ok = 0; ++ ++ if(tn && ok){ ++ ok = yaffs_AddOrFindLevel0Tnode(dev, ++ fileStructPtr, ++ baseChunk, ++ tn) ? 1 : 0; ++ } ++ ++ if(ok) ++ ok = (yaffs_CheckpointRead(dev,&baseChunk,sizeof(baseChunk)) == sizeof(baseChunk)); ++ ++ } ++ ++ return ok ? 1 : 0; ++} ++ ++ ++static int yaffs_WriteCheckpointObjects(yaffs_Device *dev) ++{ ++ yaffs_Object *obj; ++ yaffs_CheckpointObject cp; ++ int i; ++ int ok = 1; ++ struct list_head *lh; ++ ++ ++ /* Iterate through the objects in each hash entry, ++ * dumping them to the checkpointing stream. ++ */ ++ ++ for(i = 0; ok && i < YAFFS_NOBJECT_BUCKETS; i++){ ++ list_for_each(lh, &dev->objectBucket[i].list) { ++ if (lh) { ++ obj = list_entry(lh, yaffs_Object, hashLink); ++ if (!obj->deferedFree) { ++ yaffs_ObjectToCheckpointObject(&cp,obj); ++ cp.structType = sizeof(cp); ++ ++ T(YAFFS_TRACE_CHECKPOINT,( ++ TSTR("Checkpoint write object %d parent %d type %d chunk %d obj addr %x" TENDSTR), ++ cp.objectId,cp.parentId,cp.variantType,cp.chunkId,(unsigned) obj)); ++ ++ ok = (yaffs_CheckpointWrite(dev,&cp,sizeof(cp)) == sizeof(cp)); ++ ++ if(ok && obj->variantType == YAFFS_OBJECT_TYPE_FILE){ ++ ok = yaffs_WriteCheckpointTnodes(obj); ++ } ++ } ++ } ++ } ++ } ++ ++ /* Dump end of list */ ++ memset(&cp,0xFF,sizeof(yaffs_CheckpointObject)); ++ cp.structType = sizeof(cp); ++ ++ if(ok) ++ ok = (yaffs_CheckpointWrite(dev,&cp,sizeof(cp)) == sizeof(cp)); ++ ++ return ok ? 1 : 0; ++} ++ ++static int yaffs_ReadCheckpointObjects(yaffs_Device *dev) ++{ ++ yaffs_Object *obj; ++ yaffs_CheckpointObject cp; ++ int ok = 1; ++ int done = 0; ++ yaffs_Object *hardList = NULL; ++ ++ while(ok && !done) { ++ ok = (yaffs_CheckpointRead(dev,&cp,sizeof(cp)) == sizeof(cp)); ++ if(cp.structType != sizeof(cp)) { ++ /* printf("structure parsing failed\n"); */ ++ ok = 0; ++ } ++ ++ if(ok && cp.objectId == ~0) ++ done = 1; ++ else if(ok){ ++ obj = yaffs_FindOrCreateObjectByNumber(dev,cp.objectId, cp.variantType); ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("Checkpoint read object %d parent %d type %d chunk %d obj addr %x" TENDSTR), ++ cp.objectId,cp.parentId,cp.variantType,cp.chunkId,(unsigned) obj)); ++ if(obj) { ++ yaffs_CheckpointObjectToObject(obj,&cp); ++ if(obj->variantType == YAFFS_OBJECT_TYPE_FILE) { ++ ok = yaffs_ReadCheckpointTnodes(obj); ++ } else if(obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) { ++ obj->hardLinks.next = ++ (struct list_head *) ++ hardList; ++ hardList = obj; ++ } ++ + } + } + } ++ ++ if(ok) ++ yaffs_HardlinkFixup(dev,hardList); ++ ++ return ok ? 1 : 0; ++} ++ ++static int yaffs_WriteCheckpointData(yaffs_Device *dev) ++{ ++ ++ int ok; ++ ++ ok = yaffs_CheckpointOpen(dev,1); ++ ++ if(ok) ++ ok = yaffs_WriteCheckpointValidityMarker(dev,1); ++ if(ok) ++ ok = yaffs_WriteCheckpointDevice(dev); ++ if(ok) ++ ok = yaffs_WriteCheckpointObjects(dev); ++ if(ok) ++ ok = yaffs_WriteCheckpointValidityMarker(dev,0); ++ ++ if(!yaffs_CheckpointClose(dev)) ++ ok = 0; ++ ++ if(ok) ++ dev->isCheckpointed = 1; ++ else ++ dev->isCheckpointed = 0; ++ ++ return dev->isCheckpointed; +} + ++static int yaffs_ReadCheckpointData(yaffs_Device *dev) ++{ ++ int ok; ++ ++ ok = yaffs_CheckpointOpen(dev,0); /* open for read */ ++ ++ if(ok) ++ ok = yaffs_ReadCheckpointValidityMarker(dev,1); ++ if(ok) ++ ok = yaffs_ReadCheckpointDevice(dev); ++ if(ok) ++ ok = yaffs_ReadCheckpointObjects(dev); ++ if(ok) ++ ok = yaffs_ReadCheckpointValidityMarker(dev,0); ++ ++ + ++ if(!yaffs_CheckpointClose(dev)) ++ ok = 0; + ++ if(ok) ++ dev->isCheckpointed = 1; ++ else ++ dev->isCheckpointed = 0; + ++ return ok ? 1 : 0; + -+///////////////////////// File read/write /////////////////////////////// -+// Read and write have very similar structures. -+// In general the read/write has three parts to it -+// * An incomplete chunk to start with (if the read/write is not chunk-aligned) -+// * Some complete chunks -+// * An incomplete chunk to end off with -+// -+// Curve-balls: the first chunk might also be the last chunk. ++} + -+int yaffs_ReadDataFromFile(yaffs_Object *in, __u8 * buffer, __u32 offset, int nBytes) ++static void yaffs_InvalidateCheckpoint(yaffs_Device *dev) +{ ++ if(dev->isCheckpointed || ++ dev->blocksInCheckpoint > 0){ ++ dev->isCheckpointed = 0; ++ yaffs_CheckpointInvalidateStream(dev); ++ if(dev->superBlock && dev->markSuperBlockDirty) ++ dev->markSuperBlockDirty(dev->superBlock); ++ } ++} ++ ++ ++int yaffs_CheckpointSave(yaffs_Device *dev) ++{ ++ yaffs_ReportOddballBlocks(dev); ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("save entry: isCheckpointed %d"TENDSTR),dev->isCheckpointed)); ++ ++ if(!dev->isCheckpointed) ++ yaffs_WriteCheckpointData(dev); + ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("save exit: isCheckpointed %d"TENDSTR),dev->isCheckpointed)); ++ ++ return dev->isCheckpointed; ++} ++ ++int yaffs_CheckpointRestore(yaffs_Device *dev) ++{ ++ int retval; ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("restore entry: isCheckpointed %d"TENDSTR),dev->isCheckpointed)); + ++ retval = yaffs_ReadCheckpointData(dev); ++ ++ T(YAFFS_TRACE_CHECKPOINT,(TSTR("restore exit: isCheckpointed %d"TENDSTR),dev->isCheckpointed)); ++ ++ yaffs_ReportOddballBlocks(dev); ++ ++ return retval; ++} ++ ++/*--------------------- File read/write ------------------------ ++ * Read and write have very similar structures. ++ * In general the read/write has three parts to it ++ * An incomplete chunk to start with (if the read/write is not chunk-aligned) ++ * Some complete chunks ++ * An incomplete chunk to end off with ++ * ++ * Curve-balls: the first chunk might also be the last chunk. ++ */ ++ ++int yaffs_ReadDataFromFile(yaffs_Object * in, __u8 * buffer, loff_t offset, ++ int nBytes) ++{ ++ + int chunk; + int start; + int nToCopy; + int n = nBytes; + int nDone = 0; + yaffs_ChunkCache *cache; -+ ++ + yaffs_Device *dev; -+ ++ + dev = in->myDev; -+ -+ while(n > 0) -+ { -+ chunk = offset / dev->nBytesPerChunk + 1; // The first chunk is 1 -+ start = offset % dev->nBytesPerChunk; + -+ // OK now check for the curveball where the start and end are in -+ // the same chunk. -+ if( (start + n) < dev->nBytesPerChunk) -+ { ++ while (n > 0) { ++ //chunk = offset / dev->nDataBytesPerChunk + 1; ++ //start = offset % dev->nDataBytesPerChunk; ++ yaffs_AddrToChunk(dev,offset,&chunk,&start); ++ chunk++; ++ ++ /* OK now check for the curveball where the start and end are in ++ * the same chunk. ++ */ ++ if ((start + n) < dev->nDataBytesPerChunk) { + nToCopy = n; ++ } else { ++ nToCopy = dev->nDataBytesPerChunk - start; + } -+ else -+ { -+ nToCopy = dev->nBytesPerChunk - start; -+ } -+ -+ cache = yaffs_FindChunkCache(in,chunk); -+ -+ // If the chunk is already in the cache or it is less than a whole chunk -+ // then use the cache (if there is caching) -+ // else bypass the cache. -+ if( cache || nToCopy != dev->nBytesPerChunk) -+ { -+ if(dev->nShortOpCaches > 0) -+ { -+ -+ // If we can't find the data in the cache, then load it up. -+ -+ if(!cache) -+ { ++ ++ cache = yaffs_FindChunkCache(in, chunk); ++ ++ /* If the chunk is already in the cache or it is less than a whole chunk ++ * then use the cache (if there is caching) ++ * else bypass the cache. ++ */ ++ if (cache || nToCopy != dev->nDataBytesPerChunk) { ++ if (dev->nShortOpCaches > 0) { ++ ++ /* If we can't find the data in the cache, then load it up. */ ++ ++ if (!cache) { + cache = yaffs_GrabChunkCache(in->myDev); + cache->object = in; + cache->chunkId = chunk; + cache->dirty = 0; + cache->locked = 0; -+ yaffs_ReadChunkDataFromObject(in,chunk,cache->data); -+ cache->nBytes = 0; ++ yaffs_ReadChunkDataFromObject(in, chunk, ++ cache-> ++ data); ++ cache->nBytes = 0; + } -+ -+ yaffs_UseChunkCache(dev,cache,0); ++ ++ yaffs_UseChunkCache(dev, cache, 0); + + cache->locked = 1; + +#ifdef CONFIG_YAFFS_WINCE + yfsd_UnlockYAFFS(TRUE); +#endif -+ memcpy(buffer,&cache->data[start],nToCopy); ++ memcpy(buffer, &cache->data[start], nToCopy); + +#ifdef CONFIG_YAFFS_WINCE + yfsd_LockYAFFS(TRUE); +#endif + cache->locked = 0; -+ } -+ else -+ { -+ // Read into the local buffer then copy... -+ -+ __u8 *localBuffer = yaffs_GetTempBuffer(dev,__LINE__); -+ yaffs_ReadChunkDataFromObject(in,chunk,localBuffer); ++ } else { ++ /* Read into the local buffer then copy..*/ ++ ++ __u8 *localBuffer = ++ yaffs_GetTempBuffer(dev, __LINE__); ++ yaffs_ReadChunkDataFromObject(in, chunk, ++ localBuffer); +#ifdef CONFIG_YAFFS_WINCE + yfsd_UnlockYAFFS(TRUE); +#endif -+ memcpy(buffer,&localBuffer[start],nToCopy); ++ memcpy(buffer, &localBuffer[start], nToCopy); + +#ifdef CONFIG_YAFFS_WINCE + yfsd_LockYAFFS(TRUE); +#endif -+ yaffs_ReleaseTempBuffer(dev,localBuffer,__LINE__); ++ yaffs_ReleaseTempBuffer(dev, localBuffer, ++ __LINE__); + } + -+ } -+ else -+ { ++ } else { +#ifdef CONFIG_YAFFS_WINCE -+ __u8 *localBuffer = yaffs_GetTempBuffer(dev,__LINE__); -+ -+ // Under WinCE can't do direct transfer. Need to use a local buffer. -+ // This is because we otherwise screw up WinCE's memory mapper -+ yaffs_ReadChunkDataFromObject(in,chunk,localBuffer); ++ __u8 *localBuffer = yaffs_GetTempBuffer(dev, __LINE__); ++ ++ /* Under WinCE can't do direct transfer. Need to use a local buffer. ++ * This is because we otherwise screw up WinCE's memory mapper ++ */ ++ yaffs_ReadChunkDataFromObject(in, chunk, localBuffer); + +#ifdef CONFIG_YAFFS_WINCE -+ yfsd_UnlockYAFFS(TRUE); ++ yfsd_UnlockYAFFS(TRUE); +#endif -+ memcpy(buffer,localBuffer,dev->nBytesPerChunk); ++ memcpy(buffer, localBuffer, dev->nDataBytesPerChunk); + +#ifdef CONFIG_YAFFS_WINCE -+ yfsd_LockYAFFS(TRUE); -+ yaffs_ReleaseTempBuffer(dev,localBuffer,__LINE__); ++ yfsd_LockYAFFS(TRUE); ++ yaffs_ReleaseTempBuffer(dev, localBuffer, __LINE__); +#endif + +#else -+ // A full chunk. Read directly into the supplied buffer. -+ yaffs_ReadChunkDataFromObject(in,chunk,buffer); ++ /* A full chunk. Read directly into the supplied buffer. */ ++ yaffs_ReadChunkDataFromObject(in, chunk, buffer); +#endif + } -+ ++ + n -= nToCopy; + offset += nToCopy; + buffer += nToCopy; + nDone += nToCopy; -+ ++ + } -+ ++ + return nDone; +} + ++int yaffs_WriteDataToFile(yaffs_Object * in, const __u8 * buffer, loff_t offset, ++ int nBytes, int writeThrough) ++{ + -+ -+int yaffs_WriteDataToFile(yaffs_Object *in,const __u8 * buffer, __u32 offset, int nBytes, int writeThrough) -+{ -+ + int chunk; + int start; + int nToCopy; @@ -6288,301 +7457,313 @@ index 0000000..bf13f91 + int startOfWrite = offset; + int chunkWritten = 0; + int nBytesRead; -+ ++ + yaffs_Device *dev; -+ ++ + dev = in->myDev; -+ -+ -+ while(n > 0 && chunkWritten >= 0) -+ { -+ chunk = offset / dev->nBytesPerChunk + 1; -+ start = offset % dev->nBytesPerChunk; -+ + -+ // OK now check for the curveball where the start and end are in -+ // the same chunk. -+ -+ if((start + n) < dev->nBytesPerChunk) -+ { ++ while (n > 0 && chunkWritten >= 0) { ++ //chunk = offset / dev->nDataBytesPerChunk + 1; ++ //start = offset % dev->nDataBytesPerChunk; ++ yaffs_AddrToChunk(dev,offset,&chunk,&start); ++ chunk++; ++ ++ /* OK now check for the curveball where the start and end are in ++ * the same chunk. ++ */ ++ ++ if ((start + n) < dev->nDataBytesPerChunk) { + nToCopy = n; -+ -+ // Now folks, to calculate how many bytes to write back.... -+ // If we're overwriting and not writing to then end of file then -+ // we need to write back as much as was there before. -+ -+ nBytesRead = in->variant.fileVariant.fileSize - ((chunk -1) * dev->nBytesPerChunk); -+ -+ if(nBytesRead > dev->nBytesPerChunk) -+ { -+ nBytesRead = dev->nBytesPerChunk; ++ ++ /* Now folks, to calculate how many bytes to write back.... ++ * If we're overwriting and not writing to then end of file then ++ * we need to write back as much as was there before. ++ */ ++ ++ nBytesRead = ++ in->variant.fileVariant.fileSize - ++ ((chunk - 1) * dev->nDataBytesPerChunk); ++ ++ if (nBytesRead > dev->nDataBytesPerChunk) { ++ nBytesRead = dev->nDataBytesPerChunk; + } -+ -+ nToWriteBack = (nBytesRead > (start + n)) ? nBytesRead : (start +n); -+ -+ } -+ else -+ { -+ nToCopy = dev->nBytesPerChunk - start; -+ nToWriteBack = dev->nBytesPerChunk; ++ ++ nToWriteBack = ++ (nBytesRead > ++ (start + n)) ? nBytesRead : (start + n); ++ ++ } else { ++ nToCopy = dev->nDataBytesPerChunk - start; ++ nToWriteBack = dev->nDataBytesPerChunk; + } -+ -+ if(nToCopy != dev->nBytesPerChunk) -+ { -+ // An incomplete start or end chunk (or maybe both start and end chunk) -+ if(dev->nShortOpCaches > 0) -+ { ++ ++ if (nToCopy != dev->nDataBytesPerChunk) { ++ /* An incomplete start or end chunk (or maybe both start and end chunk) */ ++ if (dev->nShortOpCaches > 0) { + yaffs_ChunkCache *cache; -+ // If we can't find the data in the cache, then load it up. -+ cache = yaffs_FindChunkCache(in,chunk); -+ if(!cache && yaffs_CheckSpaceForAllocation(in->myDev)) -+ { ++ /* If we can't find the data in the cache, then load the cache */ ++ cache = yaffs_FindChunkCache(in, chunk); ++ ++ if (!cache ++ && yaffs_CheckSpaceForAllocation(in-> ++ myDev)) { + cache = yaffs_GrabChunkCache(in->myDev); + cache->object = in; + cache->chunkId = chunk; + cache->dirty = 0; + cache->locked = 0; -+ yaffs_ReadChunkDataFromObject(in,chunk,cache->data); ++ yaffs_ReadChunkDataFromObject(in, chunk, ++ cache-> ++ data); + } -+ -+ if(cache) -+ { -+ yaffs_UseChunkCache(dev,cache,1); ++ else if(cache && ++ !cache->dirty && ++ !yaffs_CheckSpaceForAllocation(in->myDev)){ ++ /* Drop the cache if it was a read cache item and ++ * no space check has been made for it. ++ */ ++ cache = NULL; ++ } ++ ++ if (cache) { ++ yaffs_UseChunkCache(dev, cache, 1); + cache->locked = 1; +#ifdef CONFIG_YAFFS_WINCE -+ yfsd_UnlockYAFFS(TRUE); ++ yfsd_UnlockYAFFS(TRUE); +#endif -+ -+ memcpy(&cache->data[start],buffer,nToCopy); ++ ++ memcpy(&cache->data[start], buffer, ++ nToCopy); + +#ifdef CONFIG_YAFFS_WINCE -+ yfsd_LockYAFFS(TRUE); ++ yfsd_LockYAFFS(TRUE); +#endif + cache->locked = 0; + cache->nBytes = nToWriteBack; -+ -+ if(writeThrough) -+ { -+ chunkWritten = yaffs_WriteChunkDataToObject(cache->object, -+ cache->chunkId, -+ cache->data, -+ cache->nBytes,1); ++ ++ if (writeThrough) { ++ chunkWritten = ++ yaffs_WriteChunkDataToObject ++ (cache->object, ++ cache->chunkId, ++ cache->data, cache->nBytes, ++ 1); + cache->dirty = 0; + } + ++ } else { ++ chunkWritten = -1; /* fail the write */ + } -+ else -+ { -+ chunkWritten = -1; // fail the write -+ } -+ } -+ else -+ { -+ // An incomplete start or end chunk (or maybe both start and end chunk) -+ // Read into the local buffer then copy, then copy over and write back. -+ -+ __u8 *localBuffer = yaffs_GetTempBuffer(dev,__LINE__); -+ -+ yaffs_ReadChunkDataFromObject(in,chunk,localBuffer); -+ ++ } else { ++ /* An incomplete start or end chunk (or maybe both start and end chunk) ++ * Read into the local buffer then copy, then copy over and write back. ++ */ ++ ++ __u8 *localBuffer = ++ yaffs_GetTempBuffer(dev, __LINE__); ++ ++ yaffs_ReadChunkDataFromObject(in, chunk, ++ localBuffer); ++ +#ifdef CONFIG_YAFFS_WINCE + yfsd_UnlockYAFFS(TRUE); +#endif -+ -+ memcpy(&localBuffer[start],buffer,nToCopy); -+ ++ ++ memcpy(&localBuffer[start], buffer, nToCopy); ++ +#ifdef CONFIG_YAFFS_WINCE + yfsd_LockYAFFS(TRUE); +#endif -+ chunkWritten = yaffs_WriteChunkDataToObject(in,chunk,localBuffer,nToWriteBack,0); -+ -+ yaffs_ReleaseTempBuffer(dev,localBuffer,__LINE__); -+ -+ //T(("Write with readback to chunk %d %d start %d copied %d wrote back %d\n",chunk,chunkWritten,start, nToCopy, nToWriteBack)); ++ chunkWritten = ++ yaffs_WriteChunkDataToObject(in, chunk, ++ localBuffer, ++ nToWriteBack, ++ 0); ++ ++ yaffs_ReleaseTempBuffer(dev, localBuffer, ++ __LINE__); ++ + } -+ -+ } -+ else -+ { -+ ++ ++ } else { ++ +#ifdef CONFIG_YAFFS_WINCE -+ // Under WinCE can't do direct transfer. Need to use a local buffer. -+ // This is because we otherwise screw up WinCE's memory mapper -+ __u8 *localBuffer = yaffs_GetTempBuffer(dev,__LINE__); ++ /* Under WinCE can't do direct transfer. Need to use a local buffer. ++ * This is because we otherwise screw up WinCE's memory mapper ++ */ ++ __u8 *localBuffer = yaffs_GetTempBuffer(dev, __LINE__); +#ifdef CONFIG_YAFFS_WINCE -+ yfsd_UnlockYAFFS(TRUE); ++ yfsd_UnlockYAFFS(TRUE); +#endif -+ memcpy(localBuffer,buffer,dev->nBytesPerChunk); ++ memcpy(localBuffer, buffer, dev->nDataBytesPerChunk); +#ifdef CONFIG_YAFFS_WINCE -+ yfsd_LockYAFFS(TRUE); ++ yfsd_LockYAFFS(TRUE); +#endif -+ chunkWritten = yaffs_WriteChunkDataToObject(in,chunk,localBuffer,dev->nBytesPerChunk,0); -+ yaffs_ReleaseTempBuffer(dev,localBuffer,__LINE__); ++ chunkWritten = ++ yaffs_WriteChunkDataToObject(in, chunk, localBuffer, ++ dev->nDataBytesPerChunk, ++ 0); ++ yaffs_ReleaseTempBuffer(dev, localBuffer, __LINE__); +#else -+ // A full chunk. Write directly from the supplied buffer. -+ chunkWritten = yaffs_WriteChunkDataToObject(in,chunk,buffer,dev->nBytesPerChunk,0); ++ /* A full chunk. Write directly from the supplied buffer. */ ++ chunkWritten = ++ yaffs_WriteChunkDataToObject(in, chunk, buffer, ++ dev->nDataBytesPerChunk, ++ 0); +#endif -+ // Since we've overwritten the cached data, we better invalidate it. -+ yaffs_InvalidateChunkCache(in,chunk); -+ //T(("Write to chunk %d %d\n",chunk,chunkWritten)); ++ /* Since we've overwritten the cached data, we better invalidate it. */ ++ yaffs_InvalidateChunkCache(in, chunk); + } -+ -+ if(chunkWritten >= 0) -+ { ++ ++ if (chunkWritten >= 0) { + n -= nToCopy; + offset += nToCopy; + buffer += nToCopy; + nDone += nToCopy; + } -+ ++ + } -+ -+ // Update file object -+ -+ if((startOfWrite + nDone) > in->variant.fileVariant.fileSize) -+ { ++ ++ /* Update file object */ ++ ++ if ((startOfWrite + nDone) > in->variant.fileVariant.fileSize) { + in->variant.fileVariant.fileSize = (startOfWrite + nDone); + } -+ ++ + in->dirty = 1; -+ ++ + return nDone; +} + -+static void yaffs_PruneResizedChunks(yaffs_Object *in, int newSize) ++ ++/* ---------------------- File resizing stuff ------------------ */ ++ ++static void yaffs_PruneResizedChunks(yaffs_Object * in, int newSize) +{ + + yaffs_Device *dev = in->myDev; + int oldFileSize = in->variant.fileVariant.fileSize; + -+ -+ int lastDel = 1 + (oldFileSize-1)/dev->nBytesPerChunk; -+ -+ int startDel = 1 + (newSize + dev->nBytesPerChunk - 1)/ -+ dev->nBytesPerChunk; ++ int lastDel = 1 + (oldFileSize - 1) / dev->nDataBytesPerChunk; ++ ++ int startDel = 1 + (newSize + dev->nDataBytesPerChunk - 1) / ++ dev->nDataBytesPerChunk; + int i; + int chunkId; + -+ // Delete backwards so that we don't end up with holes if -+ // power is lost part-way through the operation. -+ for(i = lastDel; i >= startDel; i--) -+ { -+ // NB this could be optimised somewhat, -+ // eg. could retrieve the tags and write them without -+ // using yaffs_DeleteChunk -+ -+ chunkId = yaffs_FindAndDeleteChunkInFile(in,i,NULL); -+ if(chunkId > 0) -+ { -+ if(chunkId < (dev->internalStartBlock * dev->nChunksPerBlock) || -+ chunkId >= ((dev->internalEndBlock+1) * dev->nChunksPerBlock)) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("Found daft chunkId %d for %d"TENDSTR),chunkId,i)); -+ } -+ else -+ { ++ /* Delete backwards so that we don't end up with holes if ++ * power is lost part-way through the operation. ++ */ ++ for (i = lastDel; i >= startDel; i--) { ++ /* NB this could be optimised somewhat, ++ * eg. could retrieve the tags and write them without ++ * using yaffs_DeleteChunk ++ */ ++ ++ chunkId = yaffs_FindAndDeleteChunkInFile(in, i, NULL); ++ if (chunkId > 0) { ++ if (chunkId < ++ (dev->internalStartBlock * dev->nChunksPerBlock) ++ || chunkId >= ++ ((dev->internalEndBlock + ++ 1) * dev->nChunksPerBlock)) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("Found daft chunkId %d for %d" TENDSTR), ++ chunkId, i)); ++ } else { + in->nDataChunks--; -+ yaffs_DeleteChunk(dev,chunkId,1,__LINE__); ++ yaffs_DeleteChunk(dev, chunkId, 1, __LINE__); + } + } + } -+ ++ +} + -+int yaffs_ResizeFile(yaffs_Object *in, int newSize) ++int yaffs_ResizeFile(yaffs_Object * in, loff_t newSize) +{ + + int oldFileSize = in->variant.fileVariant.fileSize; -+ int sizeOfPartialChunk; ++ int newSizeOfPartialChunk; ++ int newFullChunks; ++ + yaffs_Device *dev = in->myDev; + -+ sizeOfPartialChunk = newSize % dev->nBytesPerChunk; -+ ++ yaffs_AddrToChunk(dev, newSize, &newFullChunks, &newSizeOfPartialChunk); + -+ yaffs_FlushFilesChunkCache(in); ++ yaffs_FlushFilesChunkCache(in); + yaffs_InvalidateWholeChunkCache(in); + + yaffs_CheckGarbageCollection(dev); -+ -+ if(in->variantType != YAFFS_OBJECT_TYPE_FILE) -+ { ++ ++ if (in->variantType != YAFFS_OBJECT_TYPE_FILE) { + return yaffs_GetFileSize(in); + } -+ -+ if(newSize < oldFileSize) -+ { + -+ yaffs_PruneResizedChunks(in,newSize); -+ -+ if(sizeOfPartialChunk != 0) -+ { -+ int lastChunk = 1+ newSize/dev->nBytesPerChunk; -+ __u8 *localBuffer = yaffs_GetTempBuffer(dev,__LINE__); -+ -+ // Got to read and rewrite the last chunk with its new size and zero pad -+ yaffs_ReadChunkDataFromObject(in,lastChunk,localBuffer); -+ -+ memset(localBuffer + sizeOfPartialChunk,0, dev->nBytesPerChunk - sizeOfPartialChunk); ++ if (newSize == oldFileSize) { ++ return oldFileSize; ++ } ++ ++ if (newSize < oldFileSize) { ++ ++ yaffs_PruneResizedChunks(in, newSize); ++ ++ if (newSizeOfPartialChunk != 0) { ++ int lastChunk = 1 + newFullChunks; + -+ yaffs_WriteChunkDataToObject(in,lastChunk,localBuffer,sizeOfPartialChunk,1); -+ -+ yaffs_ReleaseTempBuffer(dev,localBuffer,__LINE__); ++ __u8 *localBuffer = yaffs_GetTempBuffer(dev, __LINE__); ++ ++ /* Got to read and rewrite the last chunk with its new size and zero pad */ ++ yaffs_ReadChunkDataFromObject(in, lastChunk, ++ localBuffer); ++ ++ memset(localBuffer + newSizeOfPartialChunk, 0, ++ dev->nDataBytesPerChunk - newSizeOfPartialChunk); ++ ++ yaffs_WriteChunkDataToObject(in, lastChunk, localBuffer, ++ newSizeOfPartialChunk, 1); ++ ++ yaffs_ReleaseTempBuffer(dev, localBuffer, __LINE__); + } -+ ++ + in->variant.fileVariant.fileSize = newSize; -+ -+ yaffs_PruneFileStructure(dev,&in->variant.fileVariant); -+ -+ // Write a new object header to show we've shrunk the file -+ // Do this only if the file is not in the deleted directories. -+ if(in->parent->objectId != YAFFS_OBJECTID_UNLINKED && -+ in->parent->objectId != YAFFS_OBJECTID_DELETED -+ ) -+ { -+ yaffs_UpdateObjectHeader(in,NULL, 0, 1,0); -+ } + -+ -+ return newSize; -+ ++ yaffs_PruneFileStructure(dev, &in->variant.fileVariant); + } -+ else -+ { -+ return oldFileSize; ++ /* Write a new object header. ++ * show we've shrunk the file, if need be ++ * Do this only if the file is not in the deleted directories. ++ */ ++ if (in->parent->objectId != YAFFS_OBJECTID_UNLINKED && ++ in->parent->objectId != YAFFS_OBJECTID_DELETED) { ++ yaffs_UpdateObjectHeader(in, NULL, 0, ++ (newSize < oldFileSize) ? 1 : 0, 0); + } -+} + ++ return newSize; ++} + -+loff_t yaffs_GetFileSize(yaffs_Object *obj) ++loff_t yaffs_GetFileSize(yaffs_Object * obj) +{ + obj = yaffs_GetEquivalentObject(obj); -+ -+ switch(obj->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_FILE: -+ return obj->variant.fileVariant.fileSize; -+ case YAFFS_OBJECT_TYPE_SYMLINK: -+ return yaffs_strlen(obj->variant.symLinkVariant.alias); -+ default: -+ return 0; ++ ++ switch (obj->variantType) { ++ case YAFFS_OBJECT_TYPE_FILE: ++ return obj->variant.fileVariant.fileSize; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ return yaffs_strlen(obj->variant.symLinkVariant.alias); ++ default: ++ return 0; + } +} + + + -+// yaffs_FlushFile() updates the file's -+// objectId in NAND -+ -+int yaffs_FlushFile(yaffs_Object *in, int updateTime) ++int yaffs_FlushFile(yaffs_Object * in, int updateTime) +{ + int retVal; -+ if(in->dirty) -+ { -+ //T(("flushing object header\n")); -+ ++ if (in->dirty) { + yaffs_FlushFilesChunkCache(in); -+ if(updateTime) -+ { ++ if (updateTime) { +#ifdef CONFIG_YAFFS_WINCE + yfsd_WinFileTimeNow(in->win_mtime); +#else @@ -6592,330 +7773,323 @@ index 0000000..bf13f91 +#endif + } + -+ retVal = (yaffs_UpdateObjectHeader(in,NULL,0,0,0) >= 0)? YAFFS_OK : YAFFS_FAIL; -+ } -+ else -+ { ++ retVal = ++ (yaffs_UpdateObjectHeader(in, NULL, 0, 0, 0) >= ++ 0) ? YAFFS_OK : YAFFS_FAIL; ++ } else { + retVal = YAFFS_OK; + } -+ ++ + return retVal; -+ -+} + ++} + -+static int yaffs_DoGenericObjectDeletion(yaffs_Object *in) ++static int yaffs_DoGenericObjectDeletion(yaffs_Object * in) +{ + -+ // First off, invalidate the file's data in the cache, without flushing. ++ /* First off, invalidate the file's data in the cache, without flushing. */ + yaffs_InvalidateWholeChunkCache(in); + -+ if(in->myDev->isYaffs2 && (in->parent != in->myDev->deletedDir)) -+ { -+ // Move to the unlinked directory so we have a record that it was deleted. -+ yaffs_ChangeObjectName(in, in->myDev->deletedDir,NULL,0,0); ++ if (in->myDev->isYaffs2 && (in->parent != in->myDev->deletedDir)) { ++ /* Move to the unlinked directory so we have a record that it was deleted. */ ++ yaffs_ChangeObjectName(in, in->myDev->deletedDir, NULL, 0, 0); + + } + -+ + yaffs_RemoveObjectFromDirectory(in); -+ yaffs_DeleteChunk(in->myDev,in->chunkId,1,__LINE__); ++ yaffs_DeleteChunk(in->myDev, in->chunkId, 1, __LINE__); + in->chunkId = -1; -+#if 0 -+#ifdef __KERNEL__ -+ if(in->myInode) -+ { -+ in->myInode->u.generic_ip = NULL; -+ in->myInode = 0; -+ } -+#endif -+#endif + + yaffs_FreeObject(in); + return YAFFS_OK; + +} + -+// yaffs_DeleteFile deletes the whole file data -+// and the inode associated with the file. -+// It does not delete the links associated with the file. -+static int yaffs_UnlinkFile(yaffs_Object *in) ++/* yaffs_DeleteFile deletes the whole file data ++ * and the inode associated with the file. ++ * It does not delete the links associated with the file. ++ */ ++static int yaffs_UnlinkFile(yaffs_Object * in) +{ + -+#ifdef CONFIG_YAFFS_DISABLE_BACKGROUND_DELETION -+ -+ // Delete the file data & tnodes -+ -+ yaffs_DeleteWorker(in, in->variant.fileVariant.top, in->variant.fileVariant.topLevel, 0,NULL); -+ -+ -+ yaffs_FreeTnode(in->myDev,in->variant.fileVariant.top); -+ -+ return yaffs_DoGenericObjectDeletion(in); -+#else + int retVal; -+ int immediateDeletion=0; ++ int immediateDeletion = 0; + -+ if(1) -+ { -+ //in->unlinked = 1; -+ //in->myDev->nUnlinkedFiles++; -+ //in->renameAllowed = 0; ++ if (1) { +#ifdef __KERNEL__ -+ if(!in->myInode) -+ { ++ if (!in->myInode) { + immediateDeletion = 1; + + } +#else -+ if(in->inUse <= 0) -+ { ++ if (in->inUse <= 0) { + immediateDeletion = 1; + + } +#endif -+ if(immediateDeletion) -+ { -+ retVal = yaffs_ChangeObjectName(in, in->myDev->deletedDir,NULL,0,0); -+ T(YAFFS_TRACE_TRACING,(TSTR("yaffs: immediate deletion of file %d" TENDSTR),in->objectId)); -+ in->deleted=1; ++ if (immediateDeletion) { ++ retVal = ++ yaffs_ChangeObjectName(in, in->myDev->deletedDir, ++ NULL, 0, 0); ++ T(YAFFS_TRACE_TRACING, ++ (TSTR("yaffs: immediate deletion of file %d" TENDSTR), ++ in->objectId)); ++ in->deleted = 1; + in->myDev->nDeletedFiles++; -+ if( 0 && in->myDev->isYaffs2) -+ { -+ yaffs_ResizeFile(in,0); ++ if (0 && in->myDev->isYaffs2) { ++ yaffs_ResizeFile(in, 0); + } + yaffs_SoftDeleteFile(in); ++ } else { ++ retVal = ++ yaffs_ChangeObjectName(in, in->myDev->unlinkedDir, ++ NULL, 0, 0); + } -+ else -+ { -+ retVal = yaffs_ChangeObjectName(in, in->myDev->unlinkedDir,NULL,0,0); -+ } -+ ++ + } + return retVal; -+ -+ -+#endif +} + -+int yaffs_DeleteFile(yaffs_Object *in) ++int yaffs_DeleteFile(yaffs_Object * in) +{ + int retVal = YAFFS_OK; -+ -+ if(in->nDataChunks > 0) -+ { -+ // Use soft deletion -+ if(!in->unlinked) -+ { ++ ++ if (in->nDataChunks > 0) { ++ /* Use soft deletion if there is data in the file */ ++ if (!in->unlinked) { + retVal = yaffs_UnlinkFile(in); + } -+ if(retVal == YAFFS_OK && -+ in->unlinked && -+ !in->deleted) -+ { ++ if (retVal == YAFFS_OK && in->unlinked && !in->deleted) { + in->deleted = 1; + in->myDev->nDeletedFiles++; + yaffs_SoftDeleteFile(in); + } -+ return in->deleted ? YAFFS_OK : YAFFS_FAIL; -+ } -+ else -+ { -+ // The file has no data chunks so we toss it immediately -+ yaffs_FreeTnode(in->myDev,in->variant.fileVariant.top); ++ return in->deleted ? YAFFS_OK : YAFFS_FAIL; ++ } else { ++ /* The file has no data chunks so we toss it immediately */ ++ yaffs_FreeTnode(in->myDev, in->variant.fileVariant.top); + in->variant.fileVariant.top = NULL; -+ yaffs_DoGenericObjectDeletion(in); -+ -+ return YAFFS_OK; ++ yaffs_DoGenericObjectDeletion(in); ++ ++ return YAFFS_OK; + } +} + -+static int yaffs_DeleteDirectory(yaffs_Object *in) ++static int yaffs_DeleteDirectory(yaffs_Object * in) +{ -+ //First check that the directory is empty. -+ if(list_empty(&in->variant.directoryVariant.children)) -+ { -+ return yaffs_DoGenericObjectDeletion(in); ++ /* First check that the directory is empty. */ ++ if (list_empty(&in->variant.directoryVariant.children)) { ++ return yaffs_DoGenericObjectDeletion(in); + } -+ ++ + return YAFFS_FAIL; -+ ++ +} + -+static int yaffs_DeleteSymLink(yaffs_Object *in) ++static int yaffs_DeleteSymLink(yaffs_Object * in) +{ + YFREE(in->variant.symLinkVariant.alias); + -+ return yaffs_DoGenericObjectDeletion(in); ++ return yaffs_DoGenericObjectDeletion(in); +} + -+static int yaffs_DeleteHardLink(yaffs_Object *in) ++static int yaffs_DeleteHardLink(yaffs_Object * in) +{ -+ // remove this hardlink from the list assocaited with the equivalent -+ // object ++ /* remove this hardlink from the list assocaited with the equivalent ++ * object ++ */ + list_del(&in->hardLinks); -+ return yaffs_DoGenericObjectDeletion(in); ++ return yaffs_DoGenericObjectDeletion(in); +} + -+ -+static void yaffs_DestroyObject(yaffs_Object *obj) ++static void yaffs_DestroyObject(yaffs_Object * obj) +{ -+ switch(obj->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_FILE: yaffs_DeleteFile(obj); break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: yaffs_DeleteDirectory(obj); break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: yaffs_DeleteSymLink(obj); break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: yaffs_DeleteHardLink(obj); break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: yaffs_DoGenericObjectDeletion(obj); break; -+ case YAFFS_OBJECT_TYPE_UNKNOWN: break; // should not happen. ++ switch (obj->variantType) { ++ case YAFFS_OBJECT_TYPE_FILE: ++ yaffs_DeleteFile(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ yaffs_DeleteDirectory(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ yaffs_DeleteSymLink(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ yaffs_DeleteHardLink(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ yaffs_DoGenericObjectDeletion(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ break; /* should not happen. */ + } +} + -+ -+static int yaffs_UnlinkWorker(yaffs_Object *obj) ++static int yaffs_UnlinkWorker(yaffs_Object * obj) +{ + -+ -+ if(obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) -+ { -+ return yaffs_DeleteHardLink(obj); -+ } -+ else if(!list_empty(&obj->hardLinks)) -+ { -+ // Curve ball: We're unlinking an object that has a hardlink. -+ // -+ // This problem arises because we are not strictly following -+ // The Linux link/inode model. -+ // -+ // We can't really delete the object. -+ // Instead, we do the following: -+ // - Select a hardlink. -+ // - Unhook it from the hard links -+ // - Unhook it from its parent directory (so that the rename can work) -+ // - Rename the object to the hardlink's name. -+ // - Delete the hardlink -+ -+ ++ if (obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) { ++ return yaffs_DeleteHardLink(obj); ++ } else if (!list_empty(&obj->hardLinks)) { ++ /* Curve ball: We're unlinking an object that has a hardlink. ++ * ++ * This problem arises because we are not strictly following ++ * The Linux link/inode model. ++ * ++ * We can't really delete the object. ++ * Instead, we do the following: ++ * - Select a hardlink. ++ * - Unhook it from the hard links ++ * - Unhook it from its parent directory (so that the rename can work) ++ * - Rename the object to the hardlink's name. ++ * - Delete the hardlink ++ */ ++ + yaffs_Object *hl; + int retVal; -+ YCHAR name[YAFFS_MAX_NAME_LENGTH+1]; -+ -+ hl = list_entry(obj->hardLinks.next,yaffs_Object,hardLinks); -+ ++ YCHAR name[YAFFS_MAX_NAME_LENGTH + 1]; ++ ++ hl = list_entry(obj->hardLinks.next, yaffs_Object, hardLinks); ++ + list_del_init(&hl->hardLinks); + list_del_init(&hl->siblings); -+ -+ yaffs_GetObjectName(hl,name,YAFFS_MAX_NAME_LENGTH+1); -+ -+ retVal = yaffs_ChangeObjectName(obj, hl->parent, name,0,0); -+ -+ if(retVal == YAFFS_OK) -+ { ++ ++ yaffs_GetObjectName(hl, name, YAFFS_MAX_NAME_LENGTH + 1); ++ ++ retVal = yaffs_ChangeObjectName(obj, hl->parent, name, 0, 0); ++ ++ if (retVal == YAFFS_OK) { + retVal = yaffs_DoGenericObjectDeletion(hl); + } + return retVal; -+ -+ } -+ else -+ { -+ switch(obj->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_FILE: -+ return yaffs_UnlinkFile(obj); -+ break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: -+ return yaffs_DeleteDirectory(obj); -+ break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: -+ return yaffs_DeleteSymLink(obj); -+ break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: -+ return yaffs_DoGenericObjectDeletion(obj); -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: -+ case YAFFS_OBJECT_TYPE_UNKNOWN: -+ default: -+ return YAFFS_FAIL; ++ ++ } else { ++ switch (obj->variantType) { ++ case YAFFS_OBJECT_TYPE_FILE: ++ return yaffs_UnlinkFile(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ return yaffs_DeleteDirectory(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ return yaffs_DeleteSymLink(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ return yaffs_DoGenericObjectDeletion(obj); ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ default: ++ return YAFFS_FAIL; + } + } +} + -+int yaffs_Unlink(yaffs_Object *dir, const YCHAR *name) ++ ++static int yaffs_UnlinkObject( yaffs_Object *obj) +{ -+ yaffs_Object *obj; -+ -+ obj = yaffs_FindObjectByName(dir,name); -+ -+ if(obj && obj->unlinkAllowed) -+ { -+ return yaffs_UnlinkWorker(obj); -+ } -+ -+ return YAFFS_FAIL; -+ -+} + -+//////////////// Initialisation Scanning ///////////////// ++ if (obj && obj->unlinkAllowed) { ++ return yaffs_UnlinkWorker(obj); ++ } + ++ return YAFFS_FAIL; + -+void yaffs_HandleShadowedObject(yaffs_Device *dev, int objId, int backwardScanning) ++} ++int yaffs_Unlink(yaffs_Object * dir, const YCHAR * name) +{ -+ //Todo ++ yaffs_Object *obj; ++ ++ obj = yaffs_FindObjectByName(dir, name); ++ return yaffs_UnlinkObject(obj); +} + -+#if 0 -+// For now we use the SmartMedia check. -+// We look at the blockStatus byte in the first two chunks -+// These must be 0xFF to pass as OK. -+// todo: this function needs to be modifyable foir different NAND types -+// and different chunk sizes. Suggest make this into a per-device configurable -+// function. -+static int yaffs_IsBlockBad(yaffs_Device *dev, int blk) ++/*----------------------- Initialisation Scanning ---------------------- */ ++ ++static void yaffs_HandleShadowedObject(yaffs_Device * dev, int objId, ++ int backwardScanning) +{ -+ yaffsExtendedTags *tags; -+ -+ yaffs_ReadChunkFromNAND(dev,blk * dev->nChunksPerBlock,NULL,&tags,1); -+#if 1 -+ if(yaffs_CountBits(spare.blockStatus) < 7) -+ { -+ return 1; -+ } -+#else -+ if(spare.blockStatus != 0xFF) -+ { -+ return 1; -+ } -+#endif -+ yaffs_ReadChunkFromNAND(dev,blk * dev->nChunksPerBlock + 1,NULL,&spare,1); ++ yaffs_Object *obj; + -+#if 1 -+ if(yaffs_CountBits(spare.blockStatus) < 7) -+ { -+ return 1; -+ } -+#else -+ if(spare.blockStatus != 0xFF) -+ { -+ return 1; ++ if (!backwardScanning) { ++ /* Handle YAFFS1 forward scanning case ++ * For YAFFS1 we always do the deletion ++ */ ++ ++ } else { ++ /* Handle YAFFS2 case (backward scanning) ++ * If the shadowed object exists then ignore. ++ */ ++ if (yaffs_FindObjectByNumber(dev, objId)) { ++ return; ++ } + } -+#endif -+ -+ return 0; -+ -+} + -+#endif ++ /* Let's create it (if it does not exist) assuming it is a file so that it can do shrinking etc. ++ * We put it in unlinked dir to be cleaned up after the scanning ++ */ ++ obj = ++ yaffs_FindOrCreateObjectByNumber(dev, objId, ++ YAFFS_OBJECT_TYPE_FILE); ++ yaffs_AddObjectToDirectory(dev->unlinkedDir, obj); ++ obj->variant.fileVariant.shrinkSize = 0; ++ obj->valid = 1; /* So that we don't read any other info for this file */ + ++} + -+typedef struct -+{ ++typedef struct { + int seq; + int block; +} yaffs_BlockIndex; + + ++static void yaffs_HardlinkFixup(yaffs_Device *dev, yaffs_Object *hardList) ++{ ++ yaffs_Object *hl; ++ yaffs_Object *in; ++ ++ while (hardList) { ++ hl = hardList; ++ hardList = (yaffs_Object *) (hardList->hardLinks.next); ++ ++ in = yaffs_FindObjectByNumber(dev, ++ hl->variant.hardLinkVariant. ++ equivalentObjectId); ++ ++ if (in) { ++ /* Add the hardlink pointers */ ++ hl->variant.hardLinkVariant.equivalentObject = in; ++ list_add(&hl->hardLinks, &in->hardLinks); ++ } else { ++ /* Todo Need to report/handle this better. ++ * Got a problem... hardlink to a non-existant object ++ */ ++ hl->variant.hardLinkVariant.equivalentObject = NULL; ++ INIT_LIST_HEAD(&hl->hardLinks); ++ ++ } ++ ++ } ++ ++} ++ ++ ++ ++ ++ ++static int ybicmp(const void *a, const void *b){ ++ register int aseq = ((yaffs_BlockIndex *)a)->seq; ++ register int bseq = ((yaffs_BlockIndex *)b)->seq; ++ register int ablock = ((yaffs_BlockIndex *)a)->block; ++ register int bblock = ((yaffs_BlockIndex *)b)->block; ++ if( aseq == bseq ) ++ return ablock - bblock; ++ else ++ return aseq - bseq; ++ ++} + -+static int yaffs_Scan(yaffs_Device *dev) ++static int yaffs_Scan(yaffs_Device * dev) +{ + yaffs_ExtendedTags tags; + int blk; @@ -6923,7 +8097,8 @@ index 0000000..bf13f91 + int startIterator; + int endIterator; + int nBlocksToScan = 0; -+ ++ int result; ++ + int chunk; + int c; + int deleted; @@ -6931,271 +8106,285 @@ index 0000000..bf13f91 + yaffs_Object *hardList = NULL; + yaffs_Object *hl; + yaffs_BlockInfo *bi; -+ int sequenceNumber; ++ int sequenceNumber; + yaffs_ObjectHeader *oh; + yaffs_Object *in; + yaffs_Object *parent; + int nBlocks = dev->internalEndBlock - dev->internalStartBlock + 1; -+ ++ + __u8 *chunkData; + + yaffs_BlockIndex *blockIndex = NULL; + -+ T(YAFFS_TRACE_SCAN,(TSTR("yaffs_Scan starts intstartblk %d intendblk %d..." TENDSTR),dev->internalStartBlock,dev->internalEndBlock)); -+ -+ chunkData = yaffs_GetTempBuffer(dev,__LINE__); ++ if (dev->isYaffs2) { ++ T(YAFFS_TRACE_SCAN, ++ (TSTR("yaffs_Scan is not for YAFFS2!" TENDSTR))); ++ return YAFFS_FAIL; ++ } + ++ //TODO Throw all the yaffs2 stuuf out of yaffs_Scan since it is only for yaffs1 format. + ++ T(YAFFS_TRACE_SCAN, ++ (TSTR("yaffs_Scan starts intstartblk %d intendblk %d..." TENDSTR), ++ dev->internalStartBlock, dev->internalEndBlock)); ++ ++ chunkData = yaffs_GetTempBuffer(dev, __LINE__); ++ + dev->sequenceNumber = YAFFS_LOWEST_SEQUENCE_NUMBER; -+ -+ if(dev->isYaffs2) -+ { -+ blockIndex = YMALLOC(nBlocks * sizeof(yaffs_BlockIndex)); ++ ++ if (dev->isYaffs2) { ++ blockIndex = YMALLOC(nBlocks * sizeof(yaffs_BlockIndex)); + } -+ -+ -+ // Scan all the blocks to determine their state -+ for(blk = dev->internalStartBlock; blk <= dev->internalEndBlock; blk++) -+ { -+ bi = yaffs_GetBlockInfo(dev,blk); -+ yaffs_ClearChunkBits(dev,blk); ++ ++ /* Scan all the blocks to determine their state */ ++ for (blk = dev->internalStartBlock; blk <= dev->internalEndBlock; blk++) { ++ bi = yaffs_GetBlockInfo(dev, blk); ++ yaffs_ClearChunkBits(dev, blk); + bi->pagesInUse = 0; + bi->softDeletions = 0; -+ -+ yaffs_QueryInitialBlockState(dev,blk,&state,&sequenceNumber); -+ -+ bi->blockState = state; -+ bi->sequenceNumber = sequenceNumber; + -+ T(YAFFS_TRACE_SCAN_DEBUG,(TSTR("Block scanning block %d state %d seq %d" TENDSTR),blk,state,sequenceNumber)); -+ -+ if(state == YAFFS_BLOCK_STATE_DEAD) -+ { -+ T(YAFFS_TRACE_BAD_BLOCKS,(TSTR("block %d is bad" TENDSTR),blk)); -+ } -+ else if(state == YAFFS_BLOCK_STATE_EMPTY) -+ { -+ T(YAFFS_TRACE_SCAN_DEBUG,(TSTR("Block empty " TENDSTR))); ++ yaffs_QueryInitialBlockState(dev, blk, &state, &sequenceNumber); ++ ++ bi->blockState = state; ++ bi->sequenceNumber = sequenceNumber; ++ ++ T(YAFFS_TRACE_SCAN_DEBUG, ++ (TSTR("Block scanning block %d state %d seq %d" TENDSTR), blk, ++ state, sequenceNumber)); ++ ++ if (state == YAFFS_BLOCK_STATE_DEAD) { ++ T(YAFFS_TRACE_BAD_BLOCKS, ++ (TSTR("block %d is bad" TENDSTR), blk)); ++ } else if (state == YAFFS_BLOCK_STATE_EMPTY) { ++ T(YAFFS_TRACE_SCAN_DEBUG, ++ (TSTR("Block empty " TENDSTR))); + dev->nErasedBlocks++; + dev->nFreeChunks += dev->nChunksPerBlock; -+ } -+ else if(state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ -+ // Determine the highest sequence number -+ if( dev->isYaffs2 && ++ } else if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) { ++ ++ /* Determine the highest sequence number */ ++ if (dev->isYaffs2 && + sequenceNumber >= YAFFS_LOWEST_SEQUENCE_NUMBER && -+ sequenceNumber < YAFFS_HIGHEST_SEQUENCE_NUMBER) -+ { -+ ++ sequenceNumber < YAFFS_HIGHEST_SEQUENCE_NUMBER) { ++ + blockIndex[nBlocksToScan].seq = sequenceNumber; + blockIndex[nBlocksToScan].block = blk; -+ ++ + nBlocksToScan++; + -+ if(sequenceNumber >= dev->sequenceNumber) -+ { -+ dev->sequenceNumber = sequenceNumber; ++ if (sequenceNumber >= dev->sequenceNumber) { ++ dev->sequenceNumber = sequenceNumber; + } -+ } -+ else if(dev->isYaffs2) -+ { -+ // TODO: Nasty sequence number! -+ T(YAFFS_TRACE_SCAN,(TSTR("Block scanning block %d has bad sequence number %d" TENDSTR),blk,sequenceNumber)); ++ } else if (dev->isYaffs2) { ++ /* TODO: Nasty sequence number! */ ++ T(YAFFS_TRACE_SCAN, ++ (TSTR ++ ("Block scanning block %d has bad sequence number %d" ++ TENDSTR), blk, sequenceNumber)); + + } + } + } -+ -+ // Sort the blocks -+ // Dungy old bubble sort for now... -+ if(dev->isYaffs2) -+ { ++ ++ /* Sort the blocks ++ * Dungy old bubble sort for now... ++ */ ++ if (dev->isYaffs2) { + yaffs_BlockIndex temp; + int i; + int j; -+ -+ for(i = 0; i < nBlocksToScan; i++) -+ for(j = i+1; j < nBlocksToScan; j++) -+ if(blockIndex[i].seq > blockIndex[j].seq) -+ { -+ temp = blockIndex[j]; -+ blockIndex[j] = blockIndex[i]; -+ blockIndex[i] = temp; -+ } ++ ++ for (i = 0; i < nBlocksToScan; i++) ++ for (j = i + 1; j < nBlocksToScan; j++) ++ if (blockIndex[i].seq > blockIndex[j].seq) { ++ temp = blockIndex[j]; ++ blockIndex[j] = blockIndex[i]; ++ blockIndex[i] = temp; ++ } + } -+ -+ -+ // Now scan the blocks looking at the data. -+ if(dev->isYaffs2) -+ { ++ ++ /* Now scan the blocks looking at the data. */ ++ if (dev->isYaffs2) { + startIterator = 0; -+ endIterator = nBlocksToScan-1; -+ T(YAFFS_TRACE_SCAN_DEBUG,(TSTR("%d blocks to be scanned" TENDSTR),nBlocksToScan)); -+ } -+ else -+ { ++ endIterator = nBlocksToScan - 1; ++ T(YAFFS_TRACE_SCAN_DEBUG, ++ (TSTR("%d blocks to be scanned" TENDSTR), nBlocksToScan)); ++ } else { + startIterator = dev->internalStartBlock; + endIterator = dev->internalEndBlock; + } -+ -+ // For each block.... -+ for(blockIterator = startIterator; blockIterator <= endIterator; blockIterator++) -+ { -+ -+ if(dev->isYaffs2) -+ { -+ // get the block to scan in the correct order ++ ++ /* For each block.... */ ++ for (blockIterator = startIterator; blockIterator <= endIterator; ++ blockIterator++) { ++ ++ if (dev->isYaffs2) { ++ /* get the block to scan in the correct order */ + blk = blockIndex[blockIterator].block; -+ } -+ else -+ { ++ } else { + blk = blockIterator; + } + -+ -+ bi = yaffs_GetBlockInfo(dev,blk); ++ bi = yaffs_GetBlockInfo(dev, blk); + state = bi->blockState; -+ ++ + deleted = 0; -+ -+ // For each chunk in each block that needs scanning.... -+ for(c = 0; c < dev->nChunksPerBlock && -+ state == YAFFS_BLOCK_STATE_NEEDS_SCANNING; c++) -+ { -+ // Read the tags and decide what to do ++ ++ /* For each chunk in each block that needs scanning....*/ ++ for (c = 0; c < dev->nChunksPerBlock && ++ state == YAFFS_BLOCK_STATE_NEEDS_SCANNING; c++) { ++ /* Read the tags and decide what to do */ + chunk = blk * dev->nChunksPerBlock + c; -+ -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunk,NULL,&tags); + -+ // Let's have a good look at this chunk... -+ -+ -+ if(!dev->isYaffs2 && tags.chunkDeleted) -+ { -+ // YAFFS1 only... -+ // A deleted chunk ++ result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL, ++ &tags); ++ ++ /* Let's have a good look at this chunk... */ ++ ++ if (!dev->isYaffs2 && tags.chunkDeleted) { ++ /* YAFFS1 only... ++ * A deleted chunk ++ */ + deleted++; -+ dev->nFreeChunks ++; -+ //T((" %d %d deleted\n",blk,c)); -+ } -+ else if(!tags.chunkUsed) -+ { -+ // An unassigned chunk in the block -+ // This means that either the block is empty or -+ // this is the one being allocated from -+ -+ if(c == 0) -+ { -+ // We're looking at the first chunk in the block so the block is unused ++ dev->nFreeChunks++; ++ /*T((" %d %d deleted\n",blk,c)); */ ++ } else if (!tags.chunkUsed) { ++ /* An unassigned chunk in the block ++ * This means that either the block is empty or ++ * this is the one being allocated from ++ */ ++ ++ if (c == 0) { ++ /* We're looking at the first chunk in the block so the block is unused */ + state = YAFFS_BLOCK_STATE_EMPTY; + dev->nErasedBlocks++; -+ } -+ else -+ { -+ // this is the block being allocated from -+ T(YAFFS_TRACE_SCAN,(TSTR(" Allocating from %d %d" TENDSTR),blk,c)); ++ } else { ++ /* this is the block being allocated from */ ++ T(YAFFS_TRACE_SCAN, ++ (TSTR ++ (" Allocating from %d %d" TENDSTR), ++ blk, c)); + state = YAFFS_BLOCK_STATE_ALLOCATING; + dev->allocationBlock = blk; + dev->allocationPage = c; -+ dev->allocationBlockFinder = blk; // Set it to here to encourage the allocator to -+ // go forth from here. -+ //Yaffs2 sanity check: -+ // This should be the one with the highest sequence number -+ if(dev->isYaffs2 && (dev->sequenceNumber != bi->sequenceNumber)) -+ { ++ dev->allocationBlockFinder = blk; ++ /* Set it to here to encourage the allocator to go forth from here. */ ++ ++ /* Yaffs2 sanity check: ++ * This should be the one with the highest sequence number ++ */ ++ if (dev->isYaffs2 ++ && (dev->sequenceNumber != ++ bi->sequenceNumber)) { + T(YAFFS_TRACE_ALWAYS, -+ (TSTR("yaffs: Allocation block %d was not highest sequence id: block seq = %d, dev seq = %d" TENDSTR), -+ blk,bi->sequenceNumber,dev->sequenceNumber)); ++ (TSTR ++ ("yaffs: Allocation block %d was not highest sequence id:" ++ " block seq = %d, dev seq = %d" ++ TENDSTR), blk,bi->sequenceNumber,dev->sequenceNumber)); + } + } + + dev->nFreeChunks += (dev->nChunksPerBlock - c); -+ } -+ else if(tags.chunkId > 0) -+ { -+ // chunkId > 0 so it is a data chunk... ++ } else if (tags.chunkId > 0) { ++ /* chunkId > 0 so it is a data chunk... */ + unsigned int endpos; + -+ yaffs_SetChunkBit(dev,blk,c); ++ yaffs_SetChunkBit(dev, blk, c); + bi->pagesInUse++; -+ -+ in = yaffs_FindOrCreateObjectByNumber(dev,tags.objectId,YAFFS_OBJECT_TYPE_FILE); -+ // PutChunkIntoFile checks for a clash (two data chunks with -+ // the same chunkId). -+ yaffs_PutChunkIntoFile(in,tags.chunkId,chunk,1); -+ endpos = (tags.chunkId - 1)* dev->nBytesPerChunk + tags.byteCount; -+ if(in->variantType == YAFFS_OBJECT_TYPE_FILE && in->variant.fileVariant.scannedFileSize <endpos) -+ { -+ in->variant.fileVariant.scannedFileSize = endpos; -+ if(!dev->useHeaderFileSize) -+ { -+ in->variant.fileVariant.fileSize = in->variant.fileVariant.scannedFileSize; ++ ++ in = yaffs_FindOrCreateObjectByNumber(dev, ++ tags. ++ objectId, ++ YAFFS_OBJECT_TYPE_FILE); ++ /* PutChunkIntoFile checks for a clash (two data chunks with ++ * the same chunkId). ++ */ ++ yaffs_PutChunkIntoFile(in, tags.chunkId, chunk, ++ 1); ++ endpos = ++ (tags.chunkId - 1) * dev->nDataBytesPerChunk + ++ tags.byteCount; ++ if (in->variantType == YAFFS_OBJECT_TYPE_FILE ++ && in->variant.fileVariant.scannedFileSize < ++ endpos) { ++ in->variant.fileVariant. ++ scannedFileSize = endpos; ++ if (!dev->useHeaderFileSize) { ++ in->variant.fileVariant. ++ fileSize = ++ in->variant.fileVariant. ++ scannedFileSize; + } + + } -+ //T((" %d %d data %d %d\n",blk,c,tags.objectId,tags.chunkId)); -+ } -+ else -+ { -+ // chunkId == 0, so it is an ObjectHeader. -+ // Thus, we read in the object header and make the object -+ yaffs_SetChunkBit(dev,blk,c); ++ /* T((" %d %d data %d %d\n",blk,c,tags.objectId,tags.chunkId)); */ ++ } else { ++ /* chunkId == 0, so it is an ObjectHeader. ++ * Thus, we read in the object header and make the object ++ */ ++ yaffs_SetChunkBit(dev, blk, c); + bi->pagesInUse++; -+ -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunk,chunkData,NULL); -+ -+ oh = (yaffs_ObjectHeader *)chunkData; -+ -+ in = yaffs_FindObjectByNumber(dev,tags.objectId); -+ if(in && in->variantType != oh->type) -+ { -+ // This should not happen, but somehow -+ // Wev'e ended up with an objectId that has been reused but not yet -+ // deleted, and worse still it has changed type. Delete the old object. -+ ++ ++ result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk, ++ chunkData, ++ NULL); ++ ++ oh = (yaffs_ObjectHeader *) chunkData; ++ ++ in = yaffs_FindObjectByNumber(dev, ++ tags.objectId); ++ if (in && in->variantType != oh->type) { ++ /* This should not happen, but somehow ++ * Wev'e ended up with an objectId that has been reused but not yet ++ * deleted, and worse still it has changed type. Delete the old object. ++ */ ++ + yaffs_DestroyObject(in); -+ ++ + in = 0; + } -+ -+ in = yaffs_FindOrCreateObjectByNumber(dev,tags.objectId,oh->type); -+ -+ if(oh->shadowsObject > 0) -+ { -+ yaffs_HandleShadowedObject(dev,oh->shadowsObject,0); ++ ++ in = yaffs_FindOrCreateObjectByNumber(dev, ++ tags. ++ objectId, ++ oh->type); ++ ++ if (oh->shadowsObject > 0) { ++ yaffs_HandleShadowedObject(dev, ++ oh-> ++ shadowsObject, ++ 0); + } -+ -+ if(in->valid) -+ { -+ // We have already filled this one. We have a duplicate and need to resolve it. -+ ++ ++ if (in->valid) { ++ /* We have already filled this one. We have a duplicate and need to resolve it. */ ++ + unsigned existingSerial = in->serial; + unsigned newSerial = tags.serialNumber; -+ -+ if( dev->isYaffs2 || -+ ((existingSerial+1) & 3) == newSerial) -+ { -+ // Use new one - destroy the exisiting one -+ yaffs_DeleteChunk(dev,in->chunkId,1,__LINE__); ++ ++ if (dev->isYaffs2 || ++ ((existingSerial + 1) & 3) == ++ newSerial) { ++ /* Use new one - destroy the exisiting one */ ++ yaffs_DeleteChunk(dev, ++ in->chunkId, ++ 1, __LINE__); + in->valid = 0; -+ } -+ else -+ { -+ // Use existing - destroy this one. -+ yaffs_DeleteChunk(dev,chunk,1,__LINE__); ++ } else { ++ /* Use existing - destroy this one. */ ++ yaffs_DeleteChunk(dev, chunk, 1, ++ __LINE__); + } + } -+ -+ if(!in->valid && -+ (tags.objectId == YAFFS_OBJECTID_ROOT || -+ tags.objectId == YAFFS_OBJECTID_LOSTNFOUND)) -+ { -+ // We only load some info, don't fiddle with directory structure ++ ++ if (!in->valid && ++ (tags.objectId == YAFFS_OBJECTID_ROOT || ++ tags.objectId == YAFFS_OBJECTID_LOSTNFOUND)) { ++ /* We only load some info, don't fiddle with directory structure */ + in->valid = 1; + in->variantType = oh->type; -+ -+ in->yst_mode = oh->yst_mode; ++ ++ in->yst_mode = oh->yst_mode; +#ifdef CONFIG_YAFFS_WINCE + in->win_atime[0] = oh->win_atime[0]; + in->win_ctime[0] = oh->win_ctime[0]; @@ -7204,24 +8393,22 @@ index 0000000..bf13f91 + in->win_ctime[1] = oh->win_ctime[1]; + in->win_mtime[1] = oh->win_mtime[1]; +#else -+ in->yst_uid = oh->yst_uid; -+ in->yst_gid = oh->yst_gid; ++ in->yst_uid = oh->yst_uid; ++ in->yst_gid = oh->yst_gid; + in->yst_atime = oh->yst_atime; + in->yst_mtime = oh->yst_mtime; + in->yst_ctime = oh->yst_ctime; + in->yst_rdev = oh->yst_rdev; +#endif -+ in->chunkId = chunk; ++ in->chunkId = chunk; ++ ++ } else if (!in->valid) { ++ /* we need to load this info */ + -+ } -+ else if(!in->valid) -+ { -+ // we need to load this info -+ + in->valid = 1; + in->variantType = oh->type; -+ -+ in->yst_mode = oh->yst_mode; ++ ++ in->yst_mode = oh->yst_mode; +#ifdef CONFIG_YAFFS_WINCE + in->win_atime[0] = oh->win_atime[0]; + in->win_ctime[0] = oh->win_ctime[0]; @@ -7230,173 +8417,218 @@ index 0000000..bf13f91 + in->win_ctime[1] = oh->win_ctime[1]; + in->win_mtime[1] = oh->win_mtime[1]; +#else -+ in->yst_uid = oh->yst_uid; -+ in->yst_gid = oh->yst_gid; ++ in->yst_uid = oh->yst_uid; ++ in->yst_gid = oh->yst_gid; + in->yst_atime = oh->yst_atime; + in->yst_mtime = oh->yst_mtime; + in->yst_ctime = oh->yst_ctime; + in->yst_rdev = oh->yst_rdev; +#endif -+ in->chunkId = chunk; ++ in->chunkId = chunk; + -+ yaffs_SetObjectName(in,oh->name); ++ yaffs_SetObjectName(in, oh->name); + in->dirty = 0; -+ -+ // directory stuff... -+ // hook up to parent -+ -+ parent = yaffs_FindOrCreateObjectByNumber(dev,oh->parentObjectId,YAFFS_OBJECT_TYPE_DIRECTORY); -+ if(parent->variantType == YAFFS_OBJECT_TYPE_UNKNOWN) -+ { -+ // Set up as a directory -+ parent->variantType = YAFFS_OBJECT_TYPE_DIRECTORY; -+ INIT_LIST_HEAD(&parent->variant.directoryVariant.children); -+ } -+ else if(parent->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ // Hoosterman, another problem.... -+ // We're trying to use a non-directory as a directory + -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found." TENDSTR))); ++ /* directory stuff... ++ * hook up to parent ++ */ ++ ++ parent = ++ yaffs_FindOrCreateObjectByNumber ++ (dev, oh->parentObjectId, ++ YAFFS_OBJECT_TYPE_DIRECTORY); ++ if (parent->variantType == ++ YAFFS_OBJECT_TYPE_UNKNOWN) { ++ /* Set up as a directory */ ++ parent->variantType = ++ YAFFS_OBJECT_TYPE_DIRECTORY; ++ INIT_LIST_HEAD(&parent->variant. ++ directoryVariant. ++ children); ++ } else if (parent->variantType != ++ YAFFS_OBJECT_TYPE_DIRECTORY) ++ { ++ /* Hoosterman, another problem.... ++ * We're trying to use a non-directory as a directory ++ */ ++ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("yaffs tragedy: attempting to use non-directory as" ++ " a directory in scan. Put in lost+found." ++ TENDSTR))); + parent = dev->lostNFoundDir; + } -+ -+ yaffs_AddObjectToDirectory(parent,in); + -+ if(0 && (parent == dev->deletedDir || -+ parent == dev->unlinkedDir)) -+ { -+ in->deleted = 1; // If it is unlinked at start up then it wants deleting ++ yaffs_AddObjectToDirectory(parent, in); ++ ++ if (0 && (parent == dev->deletedDir || ++ parent == dev->unlinkedDir)) { ++ in->deleted = 1; /* If it is unlinked at start up then it wants deleting */ + dev->nDeletedFiles++; + } -+ -+ // Note re hardlinks. -+ // Since we might scan a hardlink before its equivalent object is scanned -+ // we put them all in a list. -+ // After scanning is complete, we should have all the objects, so we run through this -+ // list and fix up all the chains. -+ -+ switch(in->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_UNKNOWN: // Todo got a problem -+ break; -+ case YAFFS_OBJECT_TYPE_FILE: -+ if(dev->isYaffs2 && oh->isShrink) -+ { -+ // Prune back the shrunken chunks -+ yaffs_PruneResizedChunks(in,oh->fileSize); -+ // Mark the block as having a shrinkHeader -+ bi->hasShrinkHeader = 1; -+ } -+ -+ if(dev->useHeaderFileSize) -+ -+ in->variant.fileVariant.fileSize = oh->fileSize; -+ -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: -+ in->variant.hardLinkVariant.equivalentObjectId = oh->equivalentObjectId; -+ in->hardLinks.next = (struct list_head *)hardList; -+ hardList = in; -+ break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: // Do nothing -+ break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: // Do nothing -+ break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: // Do nothing -+ in->variant.symLinkVariant.alias = yaffs_CloneString(oh->alias); -+ break; ++ /* Note re hardlinks. ++ * Since we might scan a hardlink before its equivalent object is scanned ++ * we put them all in a list. ++ * After scanning is complete, we should have all the objects, so we run through this ++ * list and fix up all the chains. ++ */ ++ ++ switch (in->variantType) { ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ /* Todo got a problem */ ++ break; ++ case YAFFS_OBJECT_TYPE_FILE: ++ if (dev->isYaffs2 ++ && oh->isShrink) { ++ /* Prune back the shrunken chunks */ ++ yaffs_PruneResizedChunks ++ (in, oh->fileSize); ++ /* Mark the block as having a shrinkHeader */ ++ bi->hasShrinkHeader = 1; ++ } ++ ++ if (dev->useHeaderFileSize) ++ ++ in->variant.fileVariant. ++ fileSize = ++ oh->fileSize; ++ ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ in->variant.hardLinkVariant. ++ equivalentObjectId = ++ oh->equivalentObjectId; ++ in->hardLinks.next = ++ (struct list_head *) ++ hardList; ++ hardList = in; ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ /* Do nothing */ ++ break; ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ /* Do nothing */ ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ in->variant.symLinkVariant. ++ alias = ++ yaffs_CloneString(oh->alias); ++ break; + } + -+ if(parent == dev->deletedDir) -+ { ++ if (parent == dev->deletedDir) { + yaffs_DestroyObject(in); + bi->hasShrinkHeader = 1; + } -+ //T((" %d %d header %d \"%s\" type %d\n",blk,c,tags.objectId,oh->name,in->variantType)); + } + } + } -+ -+ if(state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ // If we got this far while scanning, then the block is fully allocated. -+ state = YAFFS_BLOCK_STATE_FULL; ++ ++ if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) { ++ /* If we got this far while scanning, then the block is fully allocated.*/ ++ state = YAFFS_BLOCK_STATE_FULL; + } -+ ++ + bi->blockState = state; -+ -+ // Now let's see if it was dirty -+ if( bi->pagesInUse == 0 && -+ !bi->hasShrinkHeader && -+ bi->blockState == YAFFS_BLOCK_STATE_FULL) -+ { -+ yaffs_BlockBecameDirty(dev,blk); -+ } ++ ++ /* Now let's see if it was dirty */ ++ if (bi->pagesInUse == 0 && ++ !bi->hasShrinkHeader && ++ bi->blockState == YAFFS_BLOCK_STATE_FULL) { ++ yaffs_BlockBecameDirty(dev, blk); ++ } + + } -+ -+ if(blockIndex) -+ { ++ ++ if (blockIndex) { + YFREE(blockIndex); + } + -+ // Ok, we've done all the scanning. + -+ // Fix up the hard link chains. -+ // We should now have scanned all the objects, now it's time to add these -+ // hardlinks. -+ while(hardList) -+ { -+ hl = hardList; -+ hardList = (yaffs_Object *)(hardList->hardLinks.next); -+ -+ in = yaffs_FindObjectByNumber(dev,hl->variant.hardLinkVariant.equivalentObjectId); -+ -+ if(in) -+ { -+ // Add the hardlink pointers -+ hl->variant.hardLinkVariant.equivalentObject=in; -+ list_add(&hl->hardLinks,&in->hardLinks); -+ } -+ else -+ { -+ //Todo Need to report/handle this better. -+ // Got a problem... hardlink to a non-existant object -+ hl->variant.hardLinkVariant.equivalentObject=NULL; -+ INIT_LIST_HEAD(&hl->hardLinks); -+ -+ } -+ -+ } -+ -+ // Handle the unlinked files. Since they were left in an unlinked state we should -+ // just delete them. ++ /* Ok, we've done all the scanning. ++ * Fix up the hard link chains. ++ * We should now have scanned all the objects, now it's time to add these ++ * hardlinks. ++ */ ++ ++ yaffs_HardlinkFixup(dev,hardList); ++ ++ /* Handle the unlinked files. Since they were left in an unlinked state we should ++ * just delete them. ++ */ + { -+ struct list_head *i; ++ struct list_head *i; + struct list_head *n; -+ ++ + yaffs_Object *l; -+ // Soft delete all the unlinked files -+ list_for_each_safe(i,n,&dev->unlinkedDir->variant.directoryVariant.children) -+ { -+ if(i) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ yaffs_DestroyObject(l); ++ /* Soft delete all the unlinked files */ ++ list_for_each_safe(i, n, ++ &dev->unlinkedDir->variant.directoryVariant. ++ children) { ++ if (i) { ++ l = list_entry(i, yaffs_Object, siblings); ++ yaffs_DestroyObject(l); + } -+ } ++ } + } -+ -+ yaffs_ReleaseTempBuffer(dev,chunkData,__LINE__); + -+ T(YAFFS_TRACE_SCAN,(TSTR("yaffs_Scan ends" TENDSTR))); ++ yaffs_ReleaseTempBuffer(dev, chunkData, __LINE__); ++ ++ T(YAFFS_TRACE_SCAN, (TSTR("yaffs_Scan ends" TENDSTR))); + + return YAFFS_OK; +} + ++static void yaffs_CheckObjectDetailsLoaded(yaffs_Object *in) ++{ ++ __u8 *chunkData; ++ yaffs_ObjectHeader *oh; ++ yaffs_Device *dev = in->myDev; ++ yaffs_ExtendedTags tags; ++ int result; ++ ++#if 0 ++ T(YAFFS_TRACE_SCAN,(TSTR("details for object %d %s loaded" TENDSTR), ++ in->objectId, ++ in->lazyLoaded ? "not yet" : "already")); ++#endif ++ ++ if(in->lazyLoaded){ ++ in->lazyLoaded = 0; ++ chunkData = yaffs_GetTempBuffer(dev, __LINE__); ++ ++ result = yaffs_ReadChunkWithTagsFromNAND(dev,in->chunkId,chunkData,&tags); ++ oh = (yaffs_ObjectHeader *) chunkData; ++ ++ in->yst_mode = oh->yst_mode; ++#ifdef CONFIG_YAFFS_WINCE ++ in->win_atime[0] = oh->win_atime[0]; ++ in->win_ctime[0] = oh->win_ctime[0]; ++ in->win_mtime[0] = oh->win_mtime[0]; ++ in->win_atime[1] = oh->win_atime[1]; ++ in->win_ctime[1] = oh->win_ctime[1]; ++ in->win_mtime[1] = oh->win_mtime[1]; ++#else ++ in->yst_uid = oh->yst_uid; ++ in->yst_gid = oh->yst_gid; ++ in->yst_atime = oh->yst_atime; ++ in->yst_mtime = oh->yst_mtime; ++ in->yst_ctime = oh->yst_ctime; ++ in->yst_rdev = oh->yst_rdev; ++ ++#endif ++ yaffs_SetObjectName(in, oh->name); ++ ++ if(in->variantType == YAFFS_OBJECT_TYPE_SYMLINK) ++ in->variant.symLinkVariant.alias = ++ yaffs_CloneString(oh->alias); ++ ++ yaffs_ReleaseTempBuffer(dev,chunkData, __LINE__); ++ } ++} + -+static int yaffs_ScanBackwards(yaffs_Device *dev) ++static int yaffs_ScanBackwards(yaffs_Device * dev) +{ + yaffs_ExtendedTags tags; + int blk; @@ -7404,1192 +8636,1332 @@ index 0000000..bf13f91 + int startIterator; + int endIterator; + int nBlocksToScan = 0; -+ ++ + int chunk; ++ int result; + int c; + int deleted; + yaffs_BlockState state; + yaffs_Object *hardList = NULL; -+ yaffs_Object *hl; + yaffs_BlockInfo *bi; -+ int sequenceNumber; ++ int sequenceNumber; + yaffs_ObjectHeader *oh; + yaffs_Object *in; + yaffs_Object *parent; + int nBlocks = dev->internalEndBlock - dev->internalStartBlock + 1; -+ ++ int itsUnlinked; + __u8 *chunkData; ++ ++ int fileSize; ++ int isShrink; ++ int foundChunksInBlock; ++ int equivalentObjectId; ++ + + yaffs_BlockIndex *blockIndex = NULL; ++ int altBlockIndex = 0; + -+ -+ if(!dev->isYaffs2) -+ { -+ T(YAFFS_TRACE_SCAN,(TSTR("yaffs_ScanBackwards is only for YAFFS2!" TENDSTR))); ++ if (!dev->isYaffs2) { ++ T(YAFFS_TRACE_SCAN, ++ (TSTR("yaffs_ScanBackwards is only for YAFFS2!" TENDSTR))); + return YAFFS_FAIL; + } -+ -+ T(YAFFS_TRACE_SCAN,(TSTR("yaffs_ScanBackwards starts intstartblk %d intendblk %d..." TENDSTR),dev->internalStartBlock,dev->internalEndBlock)); -+ -+ chunkData = yaffs_GetTempBuffer(dev,__LINE__); -+ -+ ++ ++ T(YAFFS_TRACE_SCAN, ++ (TSTR ++ ("yaffs_ScanBackwards starts intstartblk %d intendblk %d..." ++ TENDSTR), dev->internalStartBlock, dev->internalEndBlock)); ++ ++ + dev->sequenceNumber = YAFFS_LOWEST_SEQUENCE_NUMBER; ++ ++ blockIndex = YMALLOC(nBlocks * sizeof(yaffs_BlockIndex)); + -+ blockIndex = YMALLOC(nBlocks * sizeof(yaffs_BlockIndex)); ++ if(!blockIndex) { ++ blockIndex = YMALLOC_ALT(nBlocks * sizeof(yaffs_BlockIndex)); ++ altBlockIndex = 1; ++ } + ++ if(!blockIndex) { ++ T(YAFFS_TRACE_SCAN, ++ (TSTR("yaffs_Scan() could not allocate block index!" TENDSTR))); ++ return YAFFS_FAIL; ++ } + -+ // Scan all the blocks to determine their state -+ for(blk = dev->internalStartBlock; blk <= dev->internalEndBlock; blk++) -+ { -+ bi = yaffs_GetBlockInfo(dev,blk); -+ yaffs_ClearChunkBits(dev,blk); ++ chunkData = yaffs_GetTempBuffer(dev, __LINE__); ++ ++ /* Scan all the blocks to determine their state */ ++ for (blk = dev->internalStartBlock; blk <= dev->internalEndBlock; blk++) { ++ bi = yaffs_GetBlockInfo(dev, blk); ++ yaffs_ClearChunkBits(dev, blk); + bi->pagesInUse = 0; + bi->softDeletions = 0; -+ -+ yaffs_QueryInitialBlockState(dev,blk,&state,&sequenceNumber); -+ ++ ++ yaffs_QueryInitialBlockState(dev, blk, &state, &sequenceNumber); ++ + bi->blockState = state; -+ bi->sequenceNumber = sequenceNumber; ++ bi->sequenceNumber = sequenceNumber; ++ ++ if(bi->sequenceNumber == YAFFS_SEQUENCE_CHECKPOINT_DATA) ++ bi->blockState = state = YAFFS_BLOCK_STATE_CHECKPOINT; ++ ++ T(YAFFS_TRACE_SCAN_DEBUG, ++ (TSTR("Block scanning block %d state %d seq %d" TENDSTR), blk, ++ state, sequenceNumber)); + -+ T(YAFFS_TRACE_SCAN_DEBUG,(TSTR("Block scanning block %d state %d seq %d" TENDSTR),blk,state,sequenceNumber)); + -+ if(state == YAFFS_BLOCK_STATE_DEAD) -+ { -+ T(YAFFS_TRACE_BAD_BLOCKS,(TSTR("block %d is bad" TENDSTR),blk)); -+ } -+ else if(state == YAFFS_BLOCK_STATE_EMPTY) -+ { -+ T(YAFFS_TRACE_SCAN_DEBUG,(TSTR("Block empty " TENDSTR))); ++ if(state == YAFFS_BLOCK_STATE_CHECKPOINT){ ++ /* todo .. fix free space ? */ ++ ++ } else if (state == YAFFS_BLOCK_STATE_DEAD) { ++ T(YAFFS_TRACE_BAD_BLOCKS, ++ (TSTR("block %d is bad" TENDSTR), blk)); ++ } else if (state == YAFFS_BLOCK_STATE_EMPTY) { ++ T(YAFFS_TRACE_SCAN_DEBUG, ++ (TSTR("Block empty " TENDSTR))); + dev->nErasedBlocks++; + dev->nFreeChunks += dev->nChunksPerBlock; -+ } -+ else if(state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ -+ // Determine the highest sequence number -+ if( dev->isYaffs2 && ++ } else if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) { ++ ++ /* Determine the highest sequence number */ ++ if (dev->isYaffs2 && + sequenceNumber >= YAFFS_LOWEST_SEQUENCE_NUMBER && -+ sequenceNumber < YAFFS_HIGHEST_SEQUENCE_NUMBER) -+ { -+ ++ sequenceNumber < YAFFS_HIGHEST_SEQUENCE_NUMBER) { ++ + blockIndex[nBlocksToScan].seq = sequenceNumber; + blockIndex[nBlocksToScan].block = blk; -+ ++ + nBlocksToScan++; + -+ if(sequenceNumber >= dev->sequenceNumber) -+ { -+ dev->sequenceNumber = sequenceNumber; ++ if (sequenceNumber >= dev->sequenceNumber) { ++ dev->sequenceNumber = sequenceNumber; + } -+ } -+ else if(dev->isYaffs2) -+ { -+ // TODO: Nasty sequence number! -+ T(YAFFS_TRACE_SCAN,(TSTR("Block scanning block %d has bad sequence number %d" TENDSTR),blk,sequenceNumber)); ++ } else if (dev->isYaffs2) { ++ /* TODO: Nasty sequence number! */ ++ T(YAFFS_TRACE_SCAN, ++ (TSTR ++ ("Block scanning block %d has bad sequence number %d" ++ TENDSTR), blk, sequenceNumber)); + + } + } + } -+ -+ // Sort the blocks -+ // Dungy old bubble sort for now... ++ ++ T(YAFFS_TRACE_SCAN, ++ (TSTR("%d blocks to be sorted..." TENDSTR), nBlocksToScan)); ++ ++ ++ ++ YYIELD(); ++ ++ /* Sort the blocks */ ++#ifndef CONFIG_YAFFS_USE_OWN_SORT + { ++ /* Use qsort now. */ ++ qsort(blockIndex, nBlocksToScan, sizeof(yaffs_BlockIndex), ybicmp); ++ } ++#else ++ { ++ /* Dungy old bubble sort... */ ++ + yaffs_BlockIndex temp; + int i; + int j; -+ -+ for(i = 0; i < nBlocksToScan; i++) -+ for(j = i+1; j < nBlocksToScan; j++) -+ if(blockIndex[i].seq > blockIndex[j].seq) -+ { -+ temp = blockIndex[j]; -+ blockIndex[j] = blockIndex[i]; -+ blockIndex[i] = temp; -+ } ++ ++ for (i = 0; i < nBlocksToScan; i++) ++ for (j = i + 1; j < nBlocksToScan; j++) ++ if (blockIndex[i].seq > blockIndex[j].seq) { ++ temp = blockIndex[j]; ++ blockIndex[j] = blockIndex[i]; ++ blockIndex[i] = temp; ++ } + } -+ -+ -+ // Now scan the blocks looking at the data. -+ startIterator = 0; -+ endIterator = nBlocksToScan-1; -+ T(YAFFS_TRACE_SCAN_DEBUG,(TSTR("%d blocks to be scanned" TENDSTR),nBlocksToScan)); ++#endif + -+ -+ // For each block.... backwards -+ for(blockIterator = endIterator; blockIterator >= startIterator; blockIterator--) -+ { -+ -+ // get the block to scan in the correct order -+ blk = blockIndex[blockIterator].block; ++ YYIELD(); + ++ T(YAFFS_TRACE_SCAN, (TSTR("...done" TENDSTR))); + -+ bi = yaffs_GetBlockInfo(dev,blk); ++ /* Now scan the blocks looking at the data. */ ++ startIterator = 0; ++ endIterator = nBlocksToScan - 1; ++ T(YAFFS_TRACE_SCAN_DEBUG, ++ (TSTR("%d blocks to be scanned" TENDSTR), nBlocksToScan)); ++ ++ /* For each block.... backwards */ ++ for (blockIterator = endIterator; blockIterator >= startIterator; ++ blockIterator--) { ++ /* Cooperative multitasking! This loop can run for so ++ long that watchdog timers expire. */ ++ YYIELD(); ++ ++ /* get the block to scan in the correct order */ ++ blk = blockIndex[blockIterator].block; ++ ++ bi = yaffs_GetBlockInfo(dev, blk); + state = bi->blockState; -+ ++ + deleted = 0; -+ -+ if( 0 && // Disable since this is redundant. -+ state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ // Let's look at the first chunk in the block -+ chunk = blk * dev->nChunksPerBlock; -+ -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunk,NULL,&tags); + -+ // Let's have a good look at this chunk... -+ -+ if(!tags.chunkUsed) -+ { -+ // An unassigned chunk in the block -+ // This means that either the block is empty or -+ // this is the one being allocated from -+ -+ // We're looking at the first chunk in the block so the block is unused -+ state = YAFFS_BLOCK_STATE_EMPTY; -+ dev->nErasedBlocks++; -+ dev->nFreeChunks += dev->nChunksPerBlock; -+ } -+ -+ } -+ -+ // For each chunk in each block that needs scanning.... -+ for(c = dev->nChunksPerBlock-1; c >= 0 && -+ (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING || -+ state == YAFFS_BLOCK_STATE_ALLOCATING); c--) -+ { -+ // Scan backwards... -+ // Read the tags and decide what to do ++ /* For each chunk in each block that needs scanning.... */ ++ foundChunksInBlock = 0; ++ for (c = dev->nChunksPerBlock - 1; c >= 0 && ++ (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING || ++ state == YAFFS_BLOCK_STATE_ALLOCATING); c--) { ++ /* Scan backwards... ++ * Read the tags and decide what to do ++ */ + chunk = blk * dev->nChunksPerBlock + c; -+ -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunk,NULL,&tags); + -+ // Let's have a good look at this chunk... -+ -+ if(!tags.chunkUsed) -+ { -+ // An unassigned chunk in the block -+ // This means that either the block is empty or -+ // this is the one being allocated from -+ -+ if(c == 0) ++ result = yaffs_ReadChunkWithTagsFromNAND(dev, chunk, NULL, ++ &tags); ++ ++ /* Let's have a good look at this chunk... */ ++ ++ if (!tags.chunkUsed) { ++ /* An unassigned chunk in the block. ++ * If there are used chunks after this one, then ++ * it is a chunk that was skipped due to failing the erased ++ * check. Just skip it so that it can be deleted. ++ * But, more typically, We get here when this is an unallocated ++ * chunk and his means that either the block is empty or ++ * this is the one being allocated from ++ */ ++ ++ if(foundChunksInBlock) + { -+ // We're looking at the first chunk in the block so the block is unused ++ /* This is a chunk that was skipped due to failing the erased check */ ++ ++ } else if (c == 0) { ++ /* We're looking at the first chunk in the block so the block is unused */ + state = YAFFS_BLOCK_STATE_EMPTY; + dev->nErasedBlocks++; -+ } -+ else -+ { -+ // this is the block being allocated from -+ if(state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ T(YAFFS_TRACE_SCAN,(TSTR(" Allocating from %d %d" TENDSTR),blk,c)); -+ } -+ state = YAFFS_BLOCK_STATE_ALLOCATING; -+ dev->allocationBlock = blk; -+ dev->allocationPage = c; -+ dev->allocationBlockFinder = blk; // Set it to here to encourage the allocator to -+ // go forth from here. -+ //Yaffs2 sanity check: -+ // This should be the one with the highest sequence number -+ if(dev->isYaffs2 && (dev->sequenceNumber != bi->sequenceNumber)) -+ { -+ T(YAFFS_TRACE_ALWAYS, -+ (TSTR("yaffs: Allocation block %d was not highest sequence id: block seq = %d, dev seq = %d" TENDSTR), -+ blk,bi->sequenceNumber,dev->sequenceNumber)); ++ } else { ++ if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING || ++ state == YAFFS_BLOCK_STATE_ALLOCATING) { ++ if(dev->sequenceNumber == bi->sequenceNumber) { ++ /* this is the block being allocated from */ ++ ++ T(YAFFS_TRACE_SCAN, ++ (TSTR ++ (" Allocating from %d %d" ++ TENDSTR), blk, c)); ++ ++ state = YAFFS_BLOCK_STATE_ALLOCATING; ++ dev->allocationBlock = blk; ++ dev->allocationPage = c; ++ dev->allocationBlockFinder = blk; ++ } ++ else { ++ /* This is a partially written block that is not ++ * the current allocation block. This block must have ++ * had a write failure, so set up for retirement. ++ */ ++ ++ bi->needsRetiring = 1; ++ bi->gcPrioritise = 1; ++ ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("Partially written block %d being set for retirement" TENDSTR), ++ blk)); ++ } ++ + } ++ + } + -+ dev->nFreeChunks ++; -+ } -+ else if(tags.chunkId > 0) -+ { -+ // chunkId > 0 so it is a data chunk... -+ unsigned int endpos; ++ dev->nFreeChunks++; + -+ __u32 chunkBase = (tags.chunkId - 1)* dev->nBytesPerChunk; ++ } else if (tags.chunkId > 0) { ++ /* chunkId > 0 so it is a data chunk... */ ++ unsigned int endpos; ++ __u32 chunkBase = ++ (tags.chunkId - 1) * dev->nDataBytesPerChunk; ++ ++ foundChunksInBlock = 1; + -+ yaffs_SetChunkBit(dev,blk,c); ++ ++ yaffs_SetChunkBit(dev, blk, c); + bi->pagesInUse++; -+ -+ in = yaffs_FindOrCreateObjectByNumber(dev,tags.objectId,YAFFS_OBJECT_TYPE_FILE); -+ if(in->variantType == YAFFS_OBJECT_TYPE_FILE && -+ chunkBase < in->variant.fileVariant.shrinkSize) -+ { -+ // This has not been invalidated by a resize -+ yaffs_PutChunkIntoFile(in,tags.chunkId,chunk,-1); -+ -+ -+ // File size is calculated by looking at the data chunks if we have not -+ // seen an object header yet. Stop this practice once we find an object header. -+ endpos = (tags.chunkId - 1)* dev->nBytesPerChunk + tags.byteCount; -+ if(!in->valid && // have not got an object header yet -+ in->variant.fileVariant.scannedFileSize <endpos) -+ { -+ in->variant.fileVariant.scannedFileSize = endpos; -+ in->variant.fileVariant.fileSize = in->variant.fileVariant.scannedFileSize; ++ ++ in = yaffs_FindOrCreateObjectByNumber(dev, ++ tags. ++ objectId, ++ YAFFS_OBJECT_TYPE_FILE); ++ if (in->variantType == YAFFS_OBJECT_TYPE_FILE ++ && chunkBase < ++ in->variant.fileVariant.shrinkSize) { ++ /* This has not been invalidated by a resize */ ++ yaffs_PutChunkIntoFile(in, tags.chunkId, ++ chunk, -1); ++ ++ /* File size is calculated by looking at the data chunks if we have not ++ * seen an object header yet. Stop this practice once we find an object header. ++ */ ++ endpos = ++ (tags.chunkId - ++ 1) * dev->nDataBytesPerChunk + ++ tags.byteCount; ++ ++ if (!in->valid && /* have not got an object header yet */ ++ in->variant.fileVariant. ++ scannedFileSize < endpos) { ++ in->variant.fileVariant. ++ scannedFileSize = endpos; ++ in->variant.fileVariant. ++ fileSize = ++ in->variant.fileVariant. ++ scannedFileSize; + } + ++ } else { ++ /* This chunk has been invalidated by a resize, so delete */ ++ yaffs_DeleteChunk(dev, chunk, 1, __LINE__); ++ + } -+ else -+ { -+ // This chunk has been invalidated by a resize, so delete -+ yaffs_DeleteChunk(dev,chunk,1,__LINE__); -+ -+ -+ } -+ //T((" %d %d data %d %d\n",blk,c,tags.objectId,tags.chunkId)); -+ } -+ else -+ { -+ // chunkId == 0, so it is an ObjectHeader. -+ // Thus, we read in the object header and make the object -+ yaffs_SetChunkBit(dev,blk,c); ++ } else { ++ /* chunkId == 0, so it is an ObjectHeader. ++ * Thus, we read in the object header and make the object ++ */ ++ foundChunksInBlock = 1; ++ ++ yaffs_SetChunkBit(dev, blk, c); + bi->pagesInUse++; -+ ++ + oh = NULL; + in = NULL; -+ -+ if(tags.extraHeaderInfoAvailable) -+ { -+ in = yaffs_FindOrCreateObjectByNumber(dev,tags.objectId,tags.extraObjectType); ++ ++ if (tags.extraHeaderInfoAvailable) { ++ in = yaffs_FindOrCreateObjectByNumber ++ (dev, tags.objectId, ++ tags.extraObjectType); + } + -+ -+ if(!in || !in->valid) -+ { -+ -+ // If we don't have valid info then we need to read the chunk -+ // TODO In future we can probably defer reading the chunk and -+ // living with invalid data until needed. -+ -+ yaffs_ReadChunkWithTagsFromNAND(dev,chunk,chunkData,NULL); -+ -+ oh = (yaffs_ObjectHeader *)chunkData; -+ -+ if(!in) -+ in = yaffs_FindOrCreateObjectByNumber(dev,tags.objectId,oh->type); -+ ++ if (!in || ++#ifdef CONFIG_YAFFS_DISABLE_LAZY_LOAD ++ !in->valid || ++#endif ++ tags.extraShadows || ++ (!in->valid && ++ (tags.objectId == YAFFS_OBJECTID_ROOT || ++ tags.objectId == YAFFS_OBJECTID_LOSTNFOUND)) ++ ) { ++ ++ /* If we don't have valid info then we need to read the chunk ++ * TODO In future we can probably defer reading the chunk and ++ * living with invalid data until needed. ++ */ ++ ++ result = yaffs_ReadChunkWithTagsFromNAND(dev, ++ chunk, ++ chunkData, ++ NULL); ++ ++ oh = (yaffs_ObjectHeader *) chunkData; ++ ++ if (!in) ++ in = yaffs_FindOrCreateObjectByNumber(dev, tags.objectId, oh->type); ++ + } -+ -+ if(!in) -+ { -+ // TODO Hoosterman we have a problem! -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: Could not make object for object %d at chunk %d during scan" TENDSTR),tags.objectId,chunk)); ++ ++ if (!in) { ++ /* TODO Hoosterman we have a problem! */ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("yaffs tragedy: Could not make object for object %d " ++ "at chunk %d during scan" ++ TENDSTR), tags.objectId, chunk)); + + } -+ -+ if(in->valid) -+ { -+ // We have already filled this one. We have a duplicate that will be discarded, but -+ // we first have to suck out resize info if it is a file. -+ -+ if( (in->variantType == YAFFS_OBJECT_TYPE_FILE) && -+ ((oh && oh->type == YAFFS_OBJECT_TYPE_FILE) || -+ (tags.extraHeaderInfoAvailable && tags.extraObjectType == YAFFS_OBJECT_TYPE_FILE)) -+ ) -+ { -+ __u32 thisSize = (oh) ? oh->fileSize : tags.extraFileLength; -+ __u32 parentObjectId = (oh) ? oh->parentObjectId : tags.extraParentObjectId; -+ unsigned isShrink = (oh) ? oh->isShrink : tags.extraIsShrinkHeader; -+ -+ // If it is deleted (unlinked at start also means deleted) -+ // we treat the file size as being zeroed at this point. -+ if(parentObjectId == YAFFS_OBJECTID_DELETED || -+ parentObjectId == YAFFS_OBJECTID_UNLINKED) -+ { ++ ++ if (in->valid) { ++ /* We have already filled this one. ++ * We have a duplicate that will be discarded, but ++ * we first have to suck out resize info if it is a file. ++ */ ++ ++ if ((in->variantType == YAFFS_OBJECT_TYPE_FILE) && ++ ((oh && ++ oh-> type == YAFFS_OBJECT_TYPE_FILE)|| ++ (tags.extraHeaderInfoAvailable && ++ tags.extraObjectType == YAFFS_OBJECT_TYPE_FILE)) ++ ) { ++ __u32 thisSize = ++ (oh) ? oh->fileSize : tags. ++ extraFileLength; ++ __u32 parentObjectId = ++ (oh) ? oh-> ++ parentObjectId : tags. ++ extraParentObjectId; ++ unsigned isShrink = ++ (oh) ? oh->isShrink : tags. ++ extraIsShrinkHeader; ++ ++ /* If it is deleted (unlinked at start also means deleted) ++ * we treat the file size as being zeroed at this point. ++ */ ++ if (parentObjectId == ++ YAFFS_OBJECTID_DELETED ++ || parentObjectId == ++ YAFFS_OBJECTID_UNLINKED) { + thisSize = 0; + isShrink = 1; + } -+ -+ if(isShrink && -+ in->variant.fileVariant.shrinkSize > thisSize) -+ { -+ in->variant.fileVariant.shrinkSize = thisSize; ++ ++ if (isShrink && ++ in->variant.fileVariant. ++ shrinkSize > thisSize) { ++ in->variant.fileVariant. ++ shrinkSize = ++ thisSize; + } -+ -+ if(isShrink) -+ { ++ ++ if (isShrink) { + bi->hasShrinkHeader = 1; + } -+ ++ + } -+ // Use existing - destroy this one. -+ yaffs_DeleteChunk(dev,chunk,1,__LINE__); -+ ++ /* Use existing - destroy this one. */ ++ yaffs_DeleteChunk(dev, chunk, 1, __LINE__); ++ + } -+ -+ if(!in->valid && -+ (tags.objectId == YAFFS_OBJECTID_ROOT || -+ tags.objectId == YAFFS_OBJECTID_LOSTNFOUND)) -+ { -+ // We only load some info, don't fiddle with directory structure ++ ++ if (!in->valid && ++ (tags.objectId == YAFFS_OBJECTID_ROOT || ++ tags.objectId == ++ YAFFS_OBJECTID_LOSTNFOUND)) { ++ /* We only load some info, don't fiddle with directory structure */ + in->valid = 1; -+ in->variantType = oh->type; -+ -+ in->yst_mode = oh->yst_mode; ++ ++ if(oh) { ++ in->variantType = oh->type; ++ ++ in->yst_mode = oh->yst_mode; +#ifdef CONFIG_YAFFS_WINCE -+ in->win_atime[0] = oh->win_atime[0]; -+ in->win_ctime[0] = oh->win_ctime[0]; -+ in->win_mtime[0] = oh->win_mtime[0]; -+ in->win_atime[1] = oh->win_atime[1]; -+ in->win_ctime[1] = oh->win_ctime[1]; -+ in->win_mtime[1] = oh->win_mtime[1]; ++ in->win_atime[0] = oh->win_atime[0]; ++ in->win_ctime[0] = oh->win_ctime[0]; ++ in->win_mtime[0] = oh->win_mtime[0]; ++ in->win_atime[1] = oh->win_atime[1]; ++ in->win_ctime[1] = oh->win_ctime[1]; ++ in->win_mtime[1] = oh->win_mtime[1]; +#else -+ in->yst_uid = oh->yst_uid; -+ in->yst_gid = oh->yst_gid; -+ in->yst_atime = oh->yst_atime; -+ in->yst_mtime = oh->yst_mtime; -+ in->yst_ctime = oh->yst_ctime; -+ in->yst_rdev = oh->yst_rdev; ++ in->yst_uid = oh->yst_uid; ++ in->yst_gid = oh->yst_gid; ++ in->yst_atime = oh->yst_atime; ++ in->yst_mtime = oh->yst_mtime; ++ in->yst_ctime = oh->yst_ctime; ++ in->yst_rdev = oh->yst_rdev; ++ +#endif -+ in->chunkId = chunk; ++ } else { ++ in->variantType = tags.extraObjectType; ++ in->lazyLoaded = 1; ++ } ++ ++ in->chunkId = chunk; ++ ++ } else if (!in->valid) { ++ /* we need to load this info */ + -+ } -+ else if(!in->valid) -+ { -+ // we need to load this info -+ + in->valid = 1; -+ in->variantType = oh->type; -+ -+ in->yst_mode = oh->yst_mode; ++ in->chunkId = chunk; ++ ++ if(oh) { ++ in->variantType = oh->type; ++ ++ in->yst_mode = oh->yst_mode; +#ifdef CONFIG_YAFFS_WINCE -+ in->win_atime[0] = oh->win_atime[0]; -+ in->win_ctime[0] = oh->win_ctime[0]; -+ in->win_mtime[0] = oh->win_mtime[0]; -+ in->win_atime[1] = oh->win_atime[1]; -+ in->win_ctime[1] = oh->win_ctime[1]; -+ in->win_mtime[1] = oh->win_mtime[1]; ++ in->win_atime[0] = oh->win_atime[0]; ++ in->win_ctime[0] = oh->win_ctime[0]; ++ in->win_mtime[0] = oh->win_mtime[0]; ++ in->win_atime[1] = oh->win_atime[1]; ++ in->win_ctime[1] = oh->win_ctime[1]; ++ in->win_mtime[1] = oh->win_mtime[1]; +#else -+ in->yst_uid = oh->yst_uid; -+ in->yst_gid = oh->yst_gid; -+ in->yst_atime = oh->yst_atime; -+ in->yst_mtime = oh->yst_mtime; -+ in->yst_ctime = oh->yst_ctime; -+ in->yst_rdev = oh->yst_rdev; -+#endif -+ in->chunkId = chunk; ++ in->yst_uid = oh->yst_uid; ++ in->yst_gid = oh->yst_gid; ++ in->yst_atime = oh->yst_atime; ++ in->yst_mtime = oh->yst_mtime; ++ in->yst_ctime = oh->yst_ctime; ++ in->yst_rdev = oh->yst_rdev; ++#endif ++ ++ if (oh->shadowsObject > 0) ++ yaffs_HandleShadowedObject(dev, ++ oh-> ++ shadowsObject, ++ 1); + -+ if(oh->shadowsObject > 0) -+ { -+ yaffs_HandleShadowedObject(dev,oh->shadowsObject,0); -+ } + ++ yaffs_SetObjectName(in, oh->name); ++ parent = ++ yaffs_FindOrCreateObjectByNumber ++ (dev, oh->parentObjectId, ++ YAFFS_OBJECT_TYPE_DIRECTORY); ++ ++ fileSize = oh->fileSize; ++ isShrink = oh->isShrink; ++ equivalentObjectId = oh->equivalentObjectId; + -+ yaffs_SetObjectName(in,oh->name); -+ in->dirty = 0; -+ -+ // directory stuff... -+ // hook up to parent -+ -+ parent = yaffs_FindOrCreateObjectByNumber(dev,oh->parentObjectId,YAFFS_OBJECT_TYPE_DIRECTORY); -+ if(parent->variantType == YAFFS_OBJECT_TYPE_UNKNOWN) -+ { -+ // Set up as a directory -+ parent->variantType = YAFFS_OBJECT_TYPE_DIRECTORY; -+ INIT_LIST_HEAD(&parent->variant.directoryVariant.children); + } -+ else if(parent->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ // Hoosterman, another problem.... -+ // We're trying to use a non-directory as a directory ++ else { ++ in->variantType = tags.extraObjectType; ++ parent = ++ yaffs_FindOrCreateObjectByNumber ++ (dev, tags.extraParentObjectId, ++ YAFFS_OBJECT_TYPE_DIRECTORY); ++ fileSize = tags.extraFileLength; ++ isShrink = tags.extraIsShrinkHeader; ++ equivalentObjectId = tags.extraEquivalentObjectId; ++ in->lazyLoaded = 1; + -+ T(YAFFS_TRACE_ERROR, (TSTR("yaffs tragedy: attempting to use non-directory as a directory in scan. Put in lost+found." TENDSTR))); -+ parent = dev->lostNFoundDir; + } -+ -+ yaffs_AddObjectToDirectory(parent,in); ++ in->dirty = 0; + -+ if((parent == dev->deletedDir || -+ parent == dev->unlinkedDir)) ++ /* directory stuff... ++ * hook up to parent ++ */ ++ ++ if (parent->variantType == ++ YAFFS_OBJECT_TYPE_UNKNOWN) { ++ /* Set up as a directory */ ++ parent->variantType = ++ YAFFS_OBJECT_TYPE_DIRECTORY; ++ INIT_LIST_HEAD(&parent->variant. ++ directoryVariant. ++ children); ++ } else if (parent->variantType != ++ YAFFS_OBJECT_TYPE_DIRECTORY) + { -+ in->deleted = 1; // If it is unlinked at start up then it wants deleting ++ /* Hoosterman, another problem.... ++ * We're trying to use a non-directory as a directory ++ */ ++ ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("yaffs tragedy: attempting to use non-directory as" ++ " a directory in scan. Put in lost+found." ++ TENDSTR))); ++ parent = dev->lostNFoundDir; + } -+ -+ if( oh->isShrink) -+ { -+ // Mark the block as having a shrinkHeader ++ ++ yaffs_AddObjectToDirectory(parent, in); ++ ++ itsUnlinked = (parent == dev->deletedDir) || ++ (parent == dev->unlinkedDir); ++ ++ if (isShrink) { ++ /* Mark the block as having a shrinkHeader */ + bi->hasShrinkHeader = 1; + } -+ -+ -+ // Note re hardlinks. -+ // Since we might scan a hardlink before its equivalent object is scanned -+ // we put them all in a list. -+ // After scanning is complete, we should have all the objects, so we run through this -+ // list and fix up all the chains. -+ -+ switch(in->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_UNKNOWN: // Todo got a problem -+ break; -+ case YAFFS_OBJECT_TYPE_FILE: -+ -+ -+ if(in->variant.fileVariant.scannedFileSize < oh->fileSize) -+ { -+ in->variant.fileVariant.fileSize = oh->fileSize; -+ in->variant.fileVariant.scannedFileSize = in->variant.fileVariant.fileSize; -+ } -+ -+ if(oh->isShrink && -+ in->variant.fileVariant.shrinkSize > oh->fileSize) -+ { -+ in->variant.fileVariant.shrinkSize = oh->fileSize; -+ } -+ -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: -+ in->variant.hardLinkVariant.equivalentObjectId = oh->equivalentObjectId; -+ in->hardLinks.next = (struct list_head *)hardList; -+ hardList = in; -+ break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: // Do nothing -+ break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: // Do nothing -+ break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: // Do nothing -+ in->variant.symLinkVariant.alias = yaffs_CloneString(oh->alias); -+ break; -+ } + -+#if 0 -+ if(parent == dev->deletedDir) -+ { -+ yaffs_DestroyObject(in); -+ bi->hasShrinkHeader = 1; ++ /* Note re hardlinks. ++ * Since we might scan a hardlink before its equivalent object is scanned ++ * we put them all in a list. ++ * After scanning is complete, we should have all the objects, so we run ++ * through this list and fix up all the chains. ++ */ ++ ++ switch (in->variantType) { ++ case YAFFS_OBJECT_TYPE_UNKNOWN: ++ /* Todo got a problem */ ++ break; ++ case YAFFS_OBJECT_TYPE_FILE: ++ ++ if (in->variant.fileVariant. ++ scannedFileSize < fileSize) { ++ /* This covers the case where the file size is greater ++ * than where the data is ++ * This will happen if the file is resized to be larger ++ * than its current data extents. ++ */ ++ in->variant.fileVariant.fileSize = fileSize; ++ in->variant.fileVariant.scannedFileSize = ++ in->variant.fileVariant.fileSize; ++ } ++ ++ if (isShrink && ++ in->variant.fileVariant.shrinkSize > fileSize) { ++ in->variant.fileVariant.shrinkSize = fileSize; ++ } ++ ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ if(!itsUnlinked) { ++ in->variant.hardLinkVariant.equivalentObjectId = ++ equivalentObjectId; ++ in->hardLinks.next = ++ (struct list_head *) hardList; ++ hardList = in; ++ } ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ /* Do nothing */ ++ break; ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ /* Do nothing */ ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ if(oh) ++ in->variant.symLinkVariant.alias = ++ yaffs_CloneString(oh-> ++ alias); ++ break; + } -+#endif -+ //T((" %d %d header %d \"%s\" type %d\n",blk,c,tags.objectId,oh->name,in->variantType)); ++ + } + } + } -+ -+ if(state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) -+ { -+ // If we got this far while scanning, then the block is fully allocated. -+ state = YAFFS_BLOCK_STATE_FULL; ++ ++ if (state == YAFFS_BLOCK_STATE_NEEDS_SCANNING) { ++ /* If we got this far while scanning, then the block is fully allocated. */ ++ state = YAFFS_BLOCK_STATE_FULL; + } -+ ++ + bi->blockState = state; -+ -+ // Now let's see if it was dirty -+ if( bi->pagesInUse == 0 && -+ !bi->hasShrinkHeader && -+ bi->blockState == YAFFS_BLOCK_STATE_FULL) -+ { -+ yaffs_BlockBecameDirty(dev,blk); -+ } ++ ++ /* Now let's see if it was dirty */ ++ if (bi->pagesInUse == 0 && ++ !bi->hasShrinkHeader && ++ bi->blockState == YAFFS_BLOCK_STATE_FULL) { ++ yaffs_BlockBecameDirty(dev, blk); ++ } + + } -+ -+ if(blockIndex) -+ { ++ ++ if (altBlockIndex) ++ YFREE_ALT(blockIndex); ++ else + YFREE(blockIndex); -+ } + -+ // Ok, we've done all the scanning. ++ /* Ok, we've done all the scanning. ++ * Fix up the hard link chains. ++ * We should now have scanned all the objects, now it's time to add these ++ * hardlinks. ++ */ ++ yaffs_HardlinkFixup(dev,hardList); + -+ // Fix up the hard link chains. -+ // We should now have scanned all the objects, now it's time to add these -+ // hardlinks. -+ while(hardList) -+ { -+ hl = hardList; -+ hardList = (yaffs_Object *)(hardList->hardLinks.next); -+ -+ in = yaffs_FindObjectByNumber(dev,hl->variant.hardLinkVariant.equivalentObjectId); -+ -+ if(in) -+ { -+ // Add the hardlink pointers -+ hl->variant.hardLinkVariant.equivalentObject=in; -+ list_add(&hl->hardLinks,&in->hardLinks); -+ } -+ else -+ { -+ //Todo Need to report/handle this better. -+ // Got a problem... hardlink to a non-existant object -+ hl->variant.hardLinkVariant.equivalentObject=NULL; -+ INIT_LIST_HEAD(&hl->hardLinks); -+ -+ } -+ -+ } + ++ /* ++ * Sort out state of unlinked and deleted objects. ++ */ + { -+ struct list_head *i; ++ struct list_head *i; + struct list_head *n; -+ ++ + yaffs_Object *l; -+ -+ // Soft delete all the unlinked files -+ list_for_each_safe(i,n,&dev->unlinkedDir->variant.directoryVariant.children) -+ { -+ if(i) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ yaffs_DestroyObject(l); ++ ++ /* Soft delete all the unlinked files */ ++ list_for_each_safe(i, n, ++ &dev->unlinkedDir->variant.directoryVariant. ++ children) { ++ if (i) { ++ l = list_entry(i, yaffs_Object, siblings); ++ yaffs_DestroyObject(l); + } -+ } -+ -+ // Soft delete all the deletedDir files -+ list_for_each_safe(i,n,&dev->deletedDir->variant.directoryVariant.children) -+ { -+ if(i) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ yaffs_DestroyObject(l); -+ ++ } ++ ++ /* Soft delete all the deletedDir files */ ++ list_for_each_safe(i, n, ++ &dev->deletedDir->variant.directoryVariant. ++ children) { ++ if (i) { ++ l = list_entry(i, yaffs_Object, siblings); ++ yaffs_DestroyObject(l); ++ + } -+ } ++ } + } -+ -+ yaffs_ReleaseTempBuffer(dev,chunkData,__LINE__); + -+ T(YAFFS_TRACE_SCAN,(TSTR("yaffs_ScanBackwards ends" TENDSTR))); ++ yaffs_ReleaseTempBuffer(dev, chunkData, __LINE__); ++ ++ T(YAFFS_TRACE_SCAN, (TSTR("yaffs_ScanBackwards ends" TENDSTR))); + + return YAFFS_OK; +} + ++/*------------------------------ Directory Functions ----------------------------- */ + -+ -+////////////////////////// Directory Functions ///////////////////////// ++static void yaffs_RemoveObjectFromDirectory(yaffs_Object * obj) ++{ ++ yaffs_Device *dev = obj->myDev; ++ ++ if(dev && dev->removeObjectCallback) ++ dev->removeObjectCallback(obj); ++ ++ list_del_init(&obj->siblings); ++ obj->parent = NULL; ++} + + -+static void yaffs_AddObjectToDirectory(yaffs_Object *directory, yaffs_Object *obj) ++static void yaffs_AddObjectToDirectory(yaffs_Object * directory, ++ yaffs_Object * obj) +{ + -+ if(!directory) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragedy: Trying to add an object to a null pointer directory" TENDSTR))); ++ if (!directory) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragedy: Trying to add an object to a null pointer directory" ++ TENDSTR))); + YBUG(); + } -+ if(directory->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragedy: Trying to add an object to a non-directory" TENDSTR))); ++ if (directory->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragedy: Trying to add an object to a non-directory" ++ TENDSTR))); + YBUG(); + } + -+ if(obj->siblings.prev == NULL) -+ { -+ // Not initialised ++ if (obj->siblings.prev == NULL) { ++ /* Not initialised */ + INIT_LIST_HEAD(&obj->siblings); -+ -+ } -+ else if(!list_empty(&obj->siblings)) -+ { -+ // If it is holed up somewhere else, un hook it -+ list_del_init(&obj->siblings); ++ ++ } else if (!list_empty(&obj->siblings)) { ++ /* If it is holed up somewhere else, un hook it */ ++ yaffs_RemoveObjectFromDirectory(obj); + } -+ // Now add it -+ list_add(&obj->siblings,&directory->variant.directoryVariant.children); ++ /* Now add it */ ++ list_add(&obj->siblings, &directory->variant.directoryVariant.children); + obj->parent = directory; -+ -+ if(directory == obj->myDev->unlinkedDir || directory == obj->myDev->deletedDir) -+ { ++ ++ if (directory == obj->myDev->unlinkedDir ++ || directory == obj->myDev->deletedDir) { + obj->unlinked = 1; + obj->myDev->nUnlinkedFiles++; + obj->renameAllowed = 0; + } +} + -+static void yaffs_RemoveObjectFromDirectory(yaffs_Object *obj) -+{ -+ list_del_init(&obj->siblings); -+ obj->parent = NULL; -+} -+ -+yaffs_Object *yaffs_FindObjectByName(yaffs_Object *directory,const YCHAR *name) ++yaffs_Object *yaffs_FindObjectByName(yaffs_Object * directory, ++ const YCHAR * name) +{ + int sum; -+ ++ + struct list_head *i; -+ YCHAR buffer[YAFFS_MAX_NAME_LENGTH+1]; -+ ++ YCHAR buffer[YAFFS_MAX_NAME_LENGTH + 1]; ++ + yaffs_Object *l; -+ -+ if(!name) -+ { ++ ++ if (!name) { + return NULL; + } + -+ if(!directory) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragedy: yaffs_FindObjectByName: null pointer directory"TENDSTR))); ++ if (!directory) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragedy: yaffs_FindObjectByName: null pointer directory" ++ TENDSTR))); + YBUG(); + } -+ if(directory->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragedy: yaffs_FindObjectByName: non-directory"TENDSTR))); ++ if (directory->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragedy: yaffs_FindObjectByName: non-directory" TENDSTR))); + YBUG(); + } + + sum = yaffs_CalcNameSum(name); -+ -+ list_for_each(i,&directory->variant.directoryVariant.children) -+ { -+ if(i) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ -+ // Special case for lost-n-found -+ if(l->objectId == YAFFS_OBJECTID_LOSTNFOUND) -+ { -+ if(yaffs_strcmp(name,YAFFS_LOSTNFOUND_NAME) == 0) -+ { ++ ++ list_for_each(i, &directory->variant.directoryVariant.children) { ++ if (i) { ++ l = list_entry(i, yaffs_Object, siblings); ++ ++ yaffs_CheckObjectDetailsLoaded(l); ++ ++ /* Special case for lost-n-found */ ++ if (l->objectId == YAFFS_OBJECTID_LOSTNFOUND) { ++ if (yaffs_strcmp(name, YAFFS_LOSTNFOUND_NAME) == 0) { + return l; + } -+ } -+ else if(yaffs_SumCompare(l->sum, sum)|| -+ l->chunkId <= 0) //LostnFound cunk called Objxxx ++ } else if (yaffs_SumCompare(l->sum, sum) || l->chunkId <= 0) + { -+ // Do a real check -+ yaffs_GetObjectName(l,buffer,YAFFS_MAX_NAME_LENGTH); -+ if(yaffs_strcmp(name,buffer) == 0) -+ { ++ /* LostnFound cunk called Objxxx ++ * Do a real check ++ */ ++ yaffs_GetObjectName(l, buffer, ++ YAFFS_MAX_NAME_LENGTH); ++ if (yaffs_strcmp(name, buffer) == 0) { + return l; + } -+ -+ } ++ ++ } + } + } -+ ++ + return NULL; +} + + -+int yaffs_ApplyToDirectoryChildren(yaffs_Object *theDir,int (*fn)(yaffs_Object *)) ++#if 0 ++int yaffs_ApplyToDirectoryChildren(yaffs_Object * theDir, ++ int (*fn) (yaffs_Object *)) +{ -+ struct list_head *i; ++ struct list_head *i; + yaffs_Object *l; -+ + -+ if(!theDir) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragedy: yaffs_FindObjectByName: null pointer directory"TENDSTR))); ++ if (!theDir) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragedy: yaffs_FindObjectByName: null pointer directory" ++ TENDSTR))); + YBUG(); + } -+ if(theDir->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("tragedy: yaffs_FindObjectByName: non-directory"TENDSTR))); ++ if (theDir->variantType != YAFFS_OBJECT_TYPE_DIRECTORY) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("tragedy: yaffs_FindObjectByName: non-directory" TENDSTR))); + YBUG(); + } -+ -+ list_for_each(i,&theDir->variant.directoryVariant.children) -+ { -+ if(i) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ if(l && !fn(l)) -+ { ++ ++ list_for_each(i, &theDir->variant.directoryVariant.children) { ++ if (i) { ++ l = list_entry(i, yaffs_Object, siblings); ++ if (l && !fn(l)) { + return YAFFS_FAIL; + } + } + } -+ ++ + return YAFFS_OK; + +} ++#endif + ++/* GetEquivalentObject dereferences any hard links to get to the ++ * actual object. ++ */ + -+// GetEquivalentObject dereferences any hard links to get to the -+// actual object. -+ -+yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object *obj) ++yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object * obj) +{ -+ if(obj && obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) -+ { -+ // We want the object id of the equivalent object, not this one ++ if (obj && obj->variantType == YAFFS_OBJECT_TYPE_HARDLINK) { ++ /* We want the object id of the equivalent object, not this one */ + obj = obj->variant.hardLinkVariant.equivalentObject; + } + return obj; + +} + -+int yaffs_GetObjectName(yaffs_Object *obj,YCHAR *name,int buffSize) ++int yaffs_GetObjectName(yaffs_Object * obj, YCHAR * name, int buffSize) +{ -+ memset(name,0,buffSize * sizeof(YCHAR)); ++ memset(name, 0, buffSize * sizeof(YCHAR)); + -+ if(obj->objectId == YAFFS_OBJECTID_LOSTNFOUND) -+ { -+ yaffs_strncpy(name,YAFFS_LOSTNFOUND_NAME,buffSize - 1); -+ } -+ else if(obj->chunkId <= 0) -+ { ++ yaffs_CheckObjectDetailsLoaded(obj); ++ ++ if (obj->objectId == YAFFS_OBJECTID_LOSTNFOUND) { ++ yaffs_strncpy(name, YAFFS_LOSTNFOUND_NAME, buffSize - 1); ++ } else if (obj->chunkId <= 0) { + YCHAR locName[20]; -+ // make up a name -+ yaffs_sprintf(locName,_Y("%s%d"),YAFFS_LOSTNFOUND_PREFIX,obj->objectId); -+ yaffs_strncpy(name,locName,buffSize - 1); ++ /* make up a name */ ++ yaffs_sprintf(locName, _Y("%s%d"), YAFFS_LOSTNFOUND_PREFIX, ++ obj->objectId); ++ yaffs_strncpy(name, locName, buffSize - 1); + + } +#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM -+ else if(obj->shortName[0]) -+ { -+ yaffs_strcpy(name,obj->shortName); ++ else if (obj->shortName[0]) { ++ yaffs_strcpy(name, obj->shortName); + } +#endif -+ else -+ { -+ __u8 *buffer = yaffs_GetTempBuffer(obj->myDev,__LINE__); -+ -+ yaffs_ObjectHeader *oh = (yaffs_ObjectHeader *)buffer; ++ else { ++ int result; ++ __u8 *buffer = yaffs_GetTempBuffer(obj->myDev, __LINE__); + -+ memset(buffer,0,obj->myDev->nBytesPerChunk); -+ -+ if(obj->chunkId >= 0) -+ { -+ yaffs_ReadChunkWithTagsFromNAND(obj->myDev,obj->chunkId,buffer,NULL); ++ yaffs_ObjectHeader *oh = (yaffs_ObjectHeader *) buffer; ++ ++ memset(buffer, 0, obj->myDev->nDataBytesPerChunk); ++ ++ if (obj->chunkId >= 0) { ++ result = yaffs_ReadChunkWithTagsFromNAND(obj->myDev, ++ obj->chunkId, buffer, ++ NULL); + } -+ yaffs_strncpy(name,oh->name,buffSize - 1); ++ yaffs_strncpy(name, oh->name, buffSize - 1); + -+ yaffs_ReleaseTempBuffer(obj->myDev,buffer,__LINE__); ++ yaffs_ReleaseTempBuffer(obj->myDev, buffer, __LINE__); + } -+ ++ + return yaffs_strlen(name); +} + -+int yaffs_GetObjectFileLength(yaffs_Object *obj) ++int yaffs_GetObjectFileLength(yaffs_Object * obj) +{ -+ -+ // Dereference any hard linking ++ ++ /* Dereference any hard linking */ + obj = yaffs_GetEquivalentObject(obj); -+ -+ if(obj->variantType == YAFFS_OBJECT_TYPE_FILE) -+ { ++ ++ if (obj->variantType == YAFFS_OBJECT_TYPE_FILE) { + return obj->variant.fileVariant.fileSize; + } -+ if(obj->variantType == YAFFS_OBJECT_TYPE_SYMLINK) -+ { ++ if (obj->variantType == YAFFS_OBJECT_TYPE_SYMLINK) { + return yaffs_strlen(obj->variant.symLinkVariant.alias); ++ } else { ++ /* Only a directory should drop through to here */ ++ return obj->myDev->nDataBytesPerChunk; + } -+ else -+ { -+ // Only a directory should drop through to here -+ return obj->myDev->nBytesPerChunk; -+ } +} + -+int yaffs_GetObjectLinkCount(yaffs_Object *obj) ++int yaffs_GetObjectLinkCount(yaffs_Object * obj) +{ -+ int count = 0; ++ int count = 0; + struct list_head *i; -+ -+ if(!obj->unlinked) -+ { -+ count++; // the object itself ++ ++ if (!obj->unlinked) { ++ count++; /* the object itself */ + } -+ list_for_each(i,&obj->hardLinks) -+ { -+ count++; // add the hard links; ++ list_for_each(i, &obj->hardLinks) { ++ count++; /* add the hard links; */ + } + return count; -+ -+} + ++} + -+int yaffs_GetObjectInode(yaffs_Object *obj) ++int yaffs_GetObjectInode(yaffs_Object * obj) +{ + obj = yaffs_GetEquivalentObject(obj); -+ ++ + return obj->objectId; +} + -+unsigned yaffs_GetObjectType(yaffs_Object *obj) ++unsigned yaffs_GetObjectType(yaffs_Object * obj) +{ + obj = yaffs_GetEquivalentObject(obj); -+ -+ switch(obj->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_FILE: return DT_REG; break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: return DT_DIR; break; -+ case YAFFS_OBJECT_TYPE_SYMLINK: return DT_LNK; break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: return DT_REG; break; -+ case YAFFS_OBJECT_TYPE_SPECIAL: -+ if(S_ISFIFO(obj->yst_mode)) return DT_FIFO; -+ if(S_ISCHR(obj->yst_mode)) return DT_CHR; -+ if(S_ISBLK(obj->yst_mode)) return DT_BLK; -+ if(S_ISSOCK(obj->yst_mode)) return DT_SOCK; -+ default: return DT_REG; break; ++ ++ switch (obj->variantType) { ++ case YAFFS_OBJECT_TYPE_FILE: ++ return DT_REG; ++ break; ++ case YAFFS_OBJECT_TYPE_DIRECTORY: ++ return DT_DIR; ++ break; ++ case YAFFS_OBJECT_TYPE_SYMLINK: ++ return DT_LNK; ++ break; ++ case YAFFS_OBJECT_TYPE_HARDLINK: ++ return DT_REG; ++ break; ++ case YAFFS_OBJECT_TYPE_SPECIAL: ++ if (S_ISFIFO(obj->yst_mode)) ++ return DT_FIFO; ++ if (S_ISCHR(obj->yst_mode)) ++ return DT_CHR; ++ if (S_ISBLK(obj->yst_mode)) ++ return DT_BLK; ++ if (S_ISSOCK(obj->yst_mode)) ++ return DT_SOCK; ++ default: ++ return DT_REG; ++ break; + } +} + -+YCHAR *yaffs_GetSymlinkAlias(yaffs_Object *obj) ++YCHAR *yaffs_GetSymlinkAlias(yaffs_Object * obj) +{ + obj = yaffs_GetEquivalentObject(obj); -+ if(obj->variantType == YAFFS_OBJECT_TYPE_SYMLINK) -+ { ++ if (obj->variantType == YAFFS_OBJECT_TYPE_SYMLINK) { + return yaffs_CloneString(obj->variant.symLinkVariant.alias); -+ } -+ else -+ { ++ } else { + return yaffs_CloneString(_Y("")); + } +} + +#ifndef CONFIG_YAFFS_WINCE + -+int yaffs_SetAttributes(yaffs_Object *obj, struct iattr *attr) ++int yaffs_SetAttributes(yaffs_Object * obj, struct iattr *attr) +{ + unsigned int valid = attr->ia_valid; -+ -+ if(valid & ATTR_MODE) obj->yst_mode = attr->ia_mode; -+ if(valid & ATTR_UID) obj->yst_uid = attr->ia_uid; -+ if(valid & ATTR_GID) obj->yst_gid = attr->ia_gid; -+ -+ if(valid & ATTR_ATIME) obj->yst_atime = Y_TIME_CONVERT(attr->ia_atime); -+ if(valid & ATTR_CTIME) obj->yst_ctime = Y_TIME_CONVERT(attr->ia_ctime); -+ if(valid & ATTR_MTIME) obj->yst_mtime = Y_TIME_CONVERT(attr->ia_mtime); -+ -+ if(valid & ATTR_SIZE) yaffs_ResizeFile(obj,attr->ia_size); -+ -+ yaffs_UpdateObjectHeader(obj,NULL,1,0,0); -+ ++ ++ if (valid & ATTR_MODE) ++ obj->yst_mode = attr->ia_mode; ++ if (valid & ATTR_UID) ++ obj->yst_uid = attr->ia_uid; ++ if (valid & ATTR_GID) ++ obj->yst_gid = attr->ia_gid; ++ ++ if (valid & ATTR_ATIME) ++ obj->yst_atime = Y_TIME_CONVERT(attr->ia_atime); ++ if (valid & ATTR_CTIME) ++ obj->yst_ctime = Y_TIME_CONVERT(attr->ia_ctime); ++ if (valid & ATTR_MTIME) ++ obj->yst_mtime = Y_TIME_CONVERT(attr->ia_mtime); ++ ++ if (valid & ATTR_SIZE) ++ yaffs_ResizeFile(obj, attr->ia_size); ++ ++ yaffs_UpdateObjectHeader(obj, NULL, 1, 0, 0); ++ + return YAFFS_OK; -+ ++ +} -+int yaffs_GetAttributes(yaffs_Object *obj, struct iattr *attr) ++int yaffs_GetAttributes(yaffs_Object * obj, struct iattr *attr) +{ + unsigned int valid = 0; -+ -+ attr->ia_mode = obj->yst_mode; valid |= ATTR_MODE; -+ attr->ia_uid = obj->yst_uid; valid |= ATTR_UID; -+ attr->ia_gid = obj->yst_gid; valid |= ATTR_GID; -+ -+ Y_TIME_CONVERT(attr->ia_atime)= obj->yst_atime; valid |= ATTR_ATIME; -+ Y_TIME_CONVERT(attr->ia_ctime) = obj->yst_ctime; valid |= ATTR_CTIME; -+ Y_TIME_CONVERT(attr->ia_mtime) = obj->yst_mtime; valid |= ATTR_MTIME; + -+ attr->ia_size = yaffs_GetFileSize(obj); valid |= ATTR_SIZE; -+ ++ attr->ia_mode = obj->yst_mode; ++ valid |= ATTR_MODE; ++ attr->ia_uid = obj->yst_uid; ++ valid |= ATTR_UID; ++ attr->ia_gid = obj->yst_gid; ++ valid |= ATTR_GID; ++ ++ Y_TIME_CONVERT(attr->ia_atime) = obj->yst_atime; ++ valid |= ATTR_ATIME; ++ Y_TIME_CONVERT(attr->ia_ctime) = obj->yst_ctime; ++ valid |= ATTR_CTIME; ++ Y_TIME_CONVERT(attr->ia_mtime) = obj->yst_mtime; ++ valid |= ATTR_MTIME; ++ ++ attr->ia_size = yaffs_GetFileSize(obj); ++ valid |= ATTR_SIZE; ++ + attr->ia_valid = valid; -+ ++ + return YAFFS_OK; -+ ++ +} + +#endif + -+int yaffs_DumpObject(yaffs_Object *obj) ++#if 0 ++int yaffs_DumpObject(yaffs_Object * obj) +{ -+// __u8 buffer[YAFFS_BYTES_PER_CHUNK]; + YCHAR name[257]; -+// yaffs_ObjectHeader *oh = (yaffs_ObjectHeader *)buffer; + -+// memset(buffer,0,YAFFS_BYTES_PER_CHUNK); -+ -+// if(obj->chunkId >= 0) -+// { -+// yaffs_ReadChunkFromNAND(obj->myDev,obj->chunkId,buffer,NULL); -+// } -+ -+ yaffs_GetObjectName(obj,name,256); -+ -+ T(YAFFS_TRACE_ALWAYS,(TSTR("Object %d, inode %d \"%s\"\n dirty %d valid %d serial %d sum %d chunk %d type %d size %d\n" TENDSTR), -+ obj->objectId,yaffs_GetObjectInode(obj), name, obj->dirty, obj->valid, obj->serial, -+ obj->sum, obj->chunkId, yaffs_GetObjectType(obj), yaffs_GetObjectFileLength(obj))); ++ yaffs_GetObjectName(obj, name, 256); ++ ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("Object %d, inode %d \"%s\"\n dirty %d valid %d serial %d sum %d" ++ " chunk %d type %d size %d\n" ++ TENDSTR), obj->objectId, yaffs_GetObjectInode(obj), name, ++ obj->dirty, obj->valid, obj->serial, obj->sum, obj->chunkId, ++ yaffs_GetObjectType(obj), yaffs_GetObjectFileLength(obj))); + -+#if 0 -+ YPRINTF(("Object %d \"%s\"\n dirty %d valid %d serial %d sum %d chunk %d\n", -+ obj->objectId, oh->name, obj->dirty, obj->valid, obj->serial, -+ obj->sum, obj->chunkId)); -+ switch(obj->variantType) -+ { -+ case YAFFS_OBJECT_TYPE_FILE: -+ YPRINTF((" FILE length %d\n",obj->variant.fileVariant.fileSize)); -+ break; -+ case YAFFS_OBJECT_TYPE_DIRECTORY: -+ YPRINTF((" DIRECTORY\n")); -+ break; -+ case YAFFS_OBJECT_TYPE_HARDLINK: //todo -+ case YAFFS_OBJECT_TYPE_SYMLINK: -+ case YAFFS_OBJECT_TYPE_UNKNOWN: -+ default: -+ } -+#endif -+ + return YAFFS_OK; +} ++#endif + ++/*---------------------------- Initialisation code -------------------------------------- */ + -+///////////////////////// Initialisation code /////////////////////////// -+ -+ -+static int yaffs_CheckDevFunctions(const yaffs_Device *dev) ++static int yaffs_CheckDevFunctions(const yaffs_Device * dev) +{ + -+ // Common functions, gotta have -+ if(!dev->eraseBlockInNAND || -+ !dev->initialiseNAND) return 0; ++ /* Common functions, gotta have */ ++ if (!dev->eraseBlockInNAND || !dev->initialiseNAND) ++ return 0; + +#ifdef CONFIG_YAFFS_YAFFS2 + -+ // Can use the "with tags" style interface for yaffs1 or yaffs2 -+ if(dev->writeChunkWithTagsToNAND && -+ dev->readChunkWithTagsFromNAND && -+ !dev->writeChunkToNAND && -+ !dev->readChunkFromNAND && -+ dev->markNANDBlockBad && -+ dev->queryNANDBlock) return 1; ++ /* Can use the "with tags" style interface for yaffs1 or yaffs2 */ ++ if (dev->writeChunkWithTagsToNAND && ++ dev->readChunkWithTagsFromNAND && ++ !dev->writeChunkToNAND && ++ !dev->readChunkFromNAND && ++ dev->markNANDBlockBad && dev->queryNANDBlock) ++ return 1; +#endif + -+ // Can use the "spare" style interface for yaffs1 -+ if(!dev->isYaffs2 && -+ !dev->writeChunkWithTagsToNAND && -+ !dev->readChunkWithTagsFromNAND && -+ dev->writeChunkToNAND && -+ dev->readChunkFromNAND && -+ !dev->markNANDBlockBad && -+ !dev->queryNANDBlock) return 1; ++ /* Can use the "spare" style interface for yaffs1 */ ++ if (!dev->isYaffs2 && ++ !dev->writeChunkWithTagsToNAND && ++ !dev->readChunkWithTagsFromNAND && ++ dev->writeChunkToNAND && ++ dev->readChunkFromNAND && ++ !dev->markNANDBlockBad && !dev->queryNANDBlock) ++ return 1; + -+ return 0; // bad ++ return 0; /* bad */ +} + + -+int yaffs_GutsInitialise(yaffs_Device *dev) ++static void yaffs_CreateInitialDirectories(yaffs_Device *dev) ++{ ++ /* Initialise the unlinked, deleted, root and lost and found directories */ ++ ++ dev->lostNFoundDir = dev->rootDir = NULL; ++ dev->unlinkedDir = dev->deletedDir = NULL; ++ ++ dev->unlinkedDir = ++ yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_UNLINKED, S_IFDIR); ++ dev->deletedDir = ++ yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_DELETED, S_IFDIR); ++ ++ dev->rootDir = ++ yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_ROOT, ++ YAFFS_ROOT_MODE | S_IFDIR); ++ dev->lostNFoundDir = ++ yaffs_CreateFakeDirectory(dev, YAFFS_OBJECTID_LOSTNFOUND, ++ YAFFS_LOSTNFOUND_MODE | S_IFDIR); ++ yaffs_AddObjectToDirectory(dev->rootDir, dev->lostNFoundDir); ++} ++ ++int yaffs_GutsInitialise(yaffs_Device * dev) +{ + unsigned x; + int bits; -+ int extraBits; -+ int nBlocks; + -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: yaffs_GutsInitialise()" TENDSTR))); -+ // Check stuff that must be set ++ T(YAFFS_TRACE_TRACING, (TSTR("yaffs: yaffs_GutsInitialise()" TENDSTR))); + -+ if(!dev) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: Need a device" TENDSTR))); ++ /* Check stuff that must be set */ ++ ++ if (!dev) { ++ T(YAFFS_TRACE_ALWAYS, (TSTR("yaffs: Need a device" TENDSTR))); + return YAFFS_FAIL; + } -+ ++ + dev->internalStartBlock = dev->startBlock; -+ dev->internalEndBlock = dev->endBlock; ++ dev->internalEndBlock = dev->endBlock; + dev->blockOffset = 0; + dev->chunkOffset = 0; + dev->nFreeChunks = 0; -+ -+ if(dev->startBlock == 0) -+ { ++ ++ if (dev->startBlock == 0) { + dev->internalStartBlock = dev->startBlock + 1; -+ dev->internalEndBlock = dev->endBlock + 1; ++ dev->internalEndBlock = dev->endBlock + 1; + dev->blockOffset = 1; + dev->chunkOffset = dev->nChunksPerBlock; + } + -+ // Check geometry parameters. -+ -+ if( (dev->isYaffs2 && dev->nBytesPerChunk <1024) || -+ (!dev->isYaffs2 && dev->nBytesPerChunk !=512) || -+ dev->nChunksPerBlock < 2 || -+ dev->nReservedBlocks < 2 || -+ dev->internalStartBlock <= 0 || -+ dev->internalEndBlock <= 0 || -+ dev->internalEndBlock <= (dev->internalStartBlock + dev->nReservedBlocks + 2) // otherwise it is too small -+ ) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: NAND geometry problems: chunk size %d, type is yaffs%s " TENDSTR), -+ dev->nBytesPerChunk, dev->isYaffs2 ? "2" : "")); ++ /* Check geometry parameters. */ ++ ++ if ((dev->isYaffs2 && dev->nDataBytesPerChunk < 1024) || ++ (!dev->isYaffs2 && dev->nDataBytesPerChunk != 512) || ++ dev->nChunksPerBlock < 2 || ++ dev->nReservedBlocks < 2 || ++ dev->internalStartBlock <= 0 || ++ dev->internalEndBlock <= 0 || ++ dev->internalEndBlock <= (dev->internalStartBlock + dev->nReservedBlocks + 2) // otherwise it is too small ++ ) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("yaffs: NAND geometry problems: chunk size %d, type is yaffs%s " ++ TENDSTR), dev->nDataBytesPerChunk, dev->isYaffs2 ? "2" : "")); + return YAFFS_FAIL; + } + -+ if(yaffs_InitialiseNAND(dev) != YAFFS_OK) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: InitialiseNAND failed" TENDSTR))); ++ if (yaffs_InitialiseNAND(dev) != YAFFS_OK) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs: InitialiseNAND failed" TENDSTR))); + return YAFFS_FAIL; + } + -+ // Got the right mix of functions? -+ // -+ if(!yaffs_CheckDevFunctions(dev)) -+ { -+ //Function missing -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: device function(s) missing or wrong\n" TENDSTR))); ++ /* Got the right mix of functions? */ ++ if (!yaffs_CheckDevFunctions(dev)) { ++ /* Function missing */ ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR ++ ("yaffs: device function(s) missing or wrong\n" TENDSTR))); + + return YAFFS_FAIL; + } + -+ // This is really a compilation check. -+ if(!yaffs_CheckStructures()) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs_CheckStructures failed\n" TENDSTR))); ++ /* This is really a compilation check. */ ++ if (!yaffs_CheckStructures()) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs_CheckStructures failed\n" TENDSTR))); + return YAFFS_FAIL; + } + -+ if(dev->isMounted) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: device already mounted\n" TENDSTR))); ++ if (dev->isMounted) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs: device already mounted\n" TENDSTR))); + return YAFFS_FAIL; + } + -+ // -+ // -+ // Finished with most checks. One or two more checks happen later on too. -+ // ++ /* Finished with most checks. One or two more checks happen later on too. */ + + dev->isMounted = 1; + + -+ nBlocks = dev->internalEndBlock - dev->internalStartBlock + 1; -+ + -+ -+ // OK now calculate a few things for the device -+ // Calculate chunkGroupBits. -+ // We need to find the next power of 2 > than internalEndBlock -+ -+ x = dev->nChunksPerBlock * (dev->internalEndBlock+1); ++ /* OK now calculate a few things for the device */ + -+ for(bits = extraBits = 0; x > 1; bits++) -+ { -+ if(x & 1) extraBits++; -+ x >>= 1; -+ } ++ /* ++ * Calculate all the chunk size manipulation numbers: ++ */ ++ /* Start off assuming it is a power of 2 */ ++ dev->chunkShift = ShiftDiv(dev->nDataBytesPerChunk); ++ dev->chunkMask = (1<<dev->chunkShift) - 1; ++ ++ if(dev->nDataBytesPerChunk == (dev->chunkMask + 1)){ ++ /* Yes it is a power of 2, disable crumbs */ ++ dev->crumbMask = 0; ++ dev->crumbShift = 0; ++ dev->crumbsPerChunk = 0; ++ } else { ++ /* Not a power of 2, use crumbs instead */ ++ dev->crumbShift = ShiftDiv(sizeof(yaffs_PackedTags2TagsPart)); ++ dev->crumbMask = (1<<dev->crumbShift)-1; ++ dev->crumbsPerChunk = dev->nDataBytesPerChunk/(1 << dev->crumbShift); ++ dev->chunkShift = 0; ++ dev->chunkMask = 0; ++ } ++ ++ ++ /* ++ * Calculate chunkGroupBits. ++ * We need to find the next power of 2 > than internalEndBlock ++ */ + -+ if(extraBits > 0) bits++; ++ x = dev->nChunksPerBlock * (dev->internalEndBlock + 1); + ++ bits = ShiftsGE(x); + -+ // Level0 Tnodes are 16 bits, so if the bitwidth of the -+ // chunk range we're using is greater than 16 we need -+ // to figure out chunk shift and chunkGroupSize -+ if(bits <= 16) -+ { -+ dev->chunkGroupBits = 0; ++ /* Set up tnode width if wide tnodes are enabled. */ ++ if(!dev->wideTnodesDisabled){ ++ /* bits must be even so that we end up with 32-bit words */ ++ if(bits & 1) ++ bits++; ++ if(bits < 16) ++ dev->tnodeWidth = 16; ++ else ++ dev->tnodeWidth = bits; + } + else -+ { -+ dev->chunkGroupBits = bits - 16; -+ } -+ ++ dev->tnodeWidth = 16; ++ ++ dev->tnodeMask = (1<<dev->tnodeWidth)-1; ++ ++ /* Level0 Tnodes are 16 bits or wider (if wide tnodes are enabled), ++ * so if the bitwidth of the ++ * chunk range we're using is greater than 16 we need ++ * to figure out chunk shift and chunkGroupSize ++ */ ++ ++ if (bits <= dev->tnodeWidth) ++ dev->chunkGroupBits = 0; ++ else ++ dev->chunkGroupBits = bits - dev->tnodeWidth; ++ ++ + dev->chunkGroupSize = 1 << dev->chunkGroupBits; + -+ if(dev->nChunksPerBlock < dev->chunkGroupSize) -+ { -+ // We have a problem because the soft delete won't work if -+ // the chunk group size > chunks per block. -+ // This can be remedied by using larger "virtual blocks". -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: chunk group too large\n" TENDSTR))); -+ ++ if (dev->nChunksPerBlock < dev->chunkGroupSize) { ++ /* We have a problem because the soft delete won't work if ++ * the chunk group size > chunks per block. ++ * This can be remedied by using larger "virtual blocks". ++ */ ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("yaffs: chunk group too large\n" TENDSTR))); ++ + return YAFFS_FAIL; + } + -+ -+ // OK, we've finished verifying the device, lets continue with initialisation -+ -+ // More device initialisation ++ /* OK, we've finished verifying the device, lets continue with initialisation */ ++ ++ /* More device initialisation */ + dev->garbageCollections = 0; + dev->passiveGarbageCollections = 0; + dev->currentDirtyChecker = 0; + dev->bufferedBlock = -1; + dev->doingBufferedBlockRewrite = 0; + dev->nDeletedFiles = 0; -+ dev->nBackgroundDeletions=0; ++ dev->nBackgroundDeletions = 0; + dev->nUnlinkedFiles = 0; -+ dev->eccFixed=0; -+ dev->eccUnfixed=0; -+ dev->tagsEccFixed=0; -+ dev->tagsEccUnfixed=0; ++ dev->eccFixed = 0; ++ dev->eccUnfixed = 0; ++ dev->tagsEccFixed = 0; ++ dev->tagsEccUnfixed = 0; + dev->nErasureFailures = 0; + dev->nErasedBlocks = 0; + dev->isDoingGC = 0; -+ -+ //dev->localBuffer = YMALLOC(dev->nBytesPerChunk); -+ // Initialise temporary buffers ++ dev->hasPendingPrioritisedGCs = 1; /* Assume the worst for now, will get fixed on first GC */ ++ ++ /* Initialise temporary buffers and caches. */ + { + int i; -+ for(i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) -+ { -+ dev->tempBuffer[i].line = 0; // not in use -+ dev->tempBuffer[i].buffer = YMALLOC(dev->nBytesPerChunk); ++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) { ++ dev->tempBuffer[i].line = 0; /* not in use */ ++ dev->tempBuffer[i].buffer = ++ YMALLOC_DMA(dev->nDataBytesPerChunk); + } + } + -+ -+ -+ yaffs_InitialiseBlocks(dev,nBlocks); -+ -+ yaffs_InitialiseTnodes(dev); -+ -+ yaffs_InitialiseObjects(dev); -+ -+ dev->gcCleanupList = YMALLOC(dev->nChunksPerBlock * sizeof(__u32)); -+ -+ if(dev->nShortOpCaches > 0) -+ { ++ if (dev->nShortOpCaches > 0) { + int i; -+ -+ if(dev->nShortOpCaches > YAFFS_MAX_SHORT_OP_CACHES) -+ { ++ ++ if (dev->nShortOpCaches > YAFFS_MAX_SHORT_OP_CACHES) { + dev->nShortOpCaches = YAFFS_MAX_SHORT_OP_CACHES; + } -+ -+ dev->srCache = YMALLOC( dev->nShortOpCaches * sizeof(yaffs_ChunkCache)); -+ -+ for(i=0; i < dev->nShortOpCaches; i++) -+ { ++ ++ dev->srCache = ++ YMALLOC(dev->nShortOpCaches * sizeof(yaffs_ChunkCache)); ++ ++ for (i = 0; i < dev->nShortOpCaches; i++) { + dev->srCache[i].object = NULL; + dev->srCache[i].lastUse = 0; + dev->srCache[i].dirty = 0; -+ dev->srCache[i].data = YMALLOC(dev->nBytesPerChunk); ++ dev->srCache[i].data = YMALLOC_DMA(dev->nDataBytesPerChunk); + } + dev->srLastUse = 0; + } + + dev->cacheHits = 0; + -+ -+ // Initialise the unlinked, root and lost and found directories -+ dev->lostNFoundDir = dev->rootDir = dev->unlinkedDir = dev->deletedDir = NULL; -+ -+ dev->unlinkedDir = yaffs_CreateFakeDirectory(dev,YAFFS_OBJECTID_UNLINKED, S_IFDIR); -+ dev->deletedDir = yaffs_CreateFakeDirectory(dev,YAFFS_OBJECTID_DELETED, S_IFDIR); ++ dev->gcCleanupList = YMALLOC(dev->nChunksPerBlock * sizeof(__u32)); + -+ dev->rootDir = yaffs_CreateFakeDirectory(dev,YAFFS_OBJECTID_ROOT,YAFFS_ROOT_MODE | S_IFDIR); -+ dev->lostNFoundDir = yaffs_CreateFakeDirectory(dev,YAFFS_OBJECTID_LOSTNFOUND,YAFFS_LOSTNFOUND_MODE | S_IFDIR); -+ yaffs_AddObjectToDirectory(dev->rootDir,dev->lostNFoundDir); -+ -+ if(dev->isYaffs2) -+ { ++ if (dev->isYaffs2) { + dev->useHeaderFileSize = 1; + } -+ -+ // Now scan the flash. -+ -+ if(dev->isYaffs2) -+ yaffs_ScanBackwards(dev); -+ else ++ ++ yaffs_InitialiseBlocks(dev); ++ yaffs_InitialiseTnodes(dev); ++ yaffs_InitialiseObjects(dev); ++ ++ yaffs_CreateInitialDirectories(dev); ++ ++ ++ /* Now scan the flash. */ ++ if (dev->isYaffs2) { ++ if(yaffs_CheckpointRestore(dev)) { ++ T(YAFFS_TRACE_CHECKPOINT, ++ (TSTR("yaffs: restored from checkpoint" TENDSTR))); ++ } else { ++ ++ /* Clean up the mess caused by an aborted checkpoint load ++ * and scan backwards. ++ */ ++ yaffs_DeinitialiseBlocks(dev); ++ yaffs_DeinitialiseTnodes(dev); ++ yaffs_DeinitialiseObjects(dev); ++ yaffs_InitialiseBlocks(dev); ++ yaffs_InitialiseTnodes(dev); ++ yaffs_InitialiseObjects(dev); ++ yaffs_CreateInitialDirectories(dev); ++ ++ yaffs_ScanBackwards(dev); ++ } ++ }else + yaffs_Scan(dev); -+ -+ // Zero out stats ++ ++ /* Zero out stats */ + dev->nPageReads = 0; -+ dev->nPageWrites = 0; ++ dev->nPageWrites = 0; + dev->nBlockErasures = 0; + dev->nGCCopies = 0; + dev->nRetriedWrites = 0; + + dev->nRetiredBlocks = 0; -+ ++ + yaffs_VerifyFreeChunks(dev); + -+ T(YAFFS_TRACE_ALWAYS,(TSTR("yaffs: yaffs_GutsInitialise() done.\n" TENDSTR))); ++ T(YAFFS_TRACE_TRACING, ++ (TSTR("yaffs: yaffs_GutsInitialise() done.\n" TENDSTR))); + return YAFFS_OK; -+ ++ +} + -+void yaffs_Deinitialise(yaffs_Device *dev) ++void yaffs_Deinitialise(yaffs_Device * dev) +{ -+ if(dev->isMounted) -+ { ++ if (dev->isMounted) { + int i; -+ ++ + yaffs_DeinitialiseBlocks(dev); + yaffs_DeinitialiseTnodes(dev); + yaffs_DeinitialiseObjects(dev); -+ if(dev->nShortOpCaches > 0) -+ { -+ -+ for(i=0; i < dev->nShortOpCaches; i++) -+ { ++ if (dev->nShortOpCaches > 0) { ++ ++ for (i = 0; i < dev->nShortOpCaches; i++) { + YFREE(dev->srCache[i].data); + } + @@ -8598,170 +9970,130 @@ index 0000000..bf13f91 + + YFREE(dev->gcCleanupList); + -+ for(i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) -+ { ++ for (i = 0; i < YAFFS_N_TEMP_BUFFERS; i++) { + YFREE(dev->tempBuffer[i].buffer); + } -+ -+ dev->isMounted = 0; -+ } -+ -+} -+ -+#if 0 + -+int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev) -+{ -+ int nFree = dev->nFreeChunks - (dev->nChunksPerBlock * YAFFS_RESERVED_BLOCKS); -+ -+ struct list_head *i; -+ yaffs_Object *l; -+ -+ -+ // To the free chunks add the chunks that are in the deleted unlinked files. -+ list_for_each(i,&dev->deletedDir->variant.directoryVariant.children) -+ { -+ l = list_entry(i, yaffs_Object,siblings); -+ if(l->deleted) -+ { -+ nFree++; -+ nFree += l->nDataChunks; -+ } ++ dev->isMounted = 0; + } -+ -+ -+ // printf("___________ nFreeChunks is %d nFree is %d\n",dev->nFreeChunks,nFree); -+ -+ if(nFree < 0) nFree = 0; + -+ return nFree; -+ +} + -+#endif -+ -+static int yaffs_CountFreeChunks(yaffs_Device *dev) ++static int yaffs_CountFreeChunks(yaffs_Device * dev) +{ + int nFree; + int b; + -+ yaffs_BlockInfo *blk; ++ yaffs_BlockInfo *blk; + -+ -+ for(nFree = 0, b = dev->internalStartBlock; b <= dev->internalEndBlock; b++) -+ { -+ blk = yaffs_GetBlockInfo(dev,b); -+ -+ switch(blk->blockState) -+ { -+ case YAFFS_BLOCK_STATE_EMPTY: -+ case YAFFS_BLOCK_STATE_ALLOCATING: -+ case YAFFS_BLOCK_STATE_COLLECTING: -+ case YAFFS_BLOCK_STATE_FULL: nFree += (dev->nChunksPerBlock - blk->pagesInUse + blk->softDeletions); break; -+ default: break; ++ for (nFree = 0, b = dev->internalStartBlock; b <= dev->internalEndBlock; ++ b++) { ++ blk = yaffs_GetBlockInfo(dev, b); ++ ++ switch (blk->blockState) { ++ case YAFFS_BLOCK_STATE_EMPTY: ++ case YAFFS_BLOCK_STATE_ALLOCATING: ++ case YAFFS_BLOCK_STATE_COLLECTING: ++ case YAFFS_BLOCK_STATE_FULL: ++ nFree += ++ (dev->nChunksPerBlock - blk->pagesInUse + ++ blk->softDeletions); ++ break; ++ default: ++ break; + } + + } -+ -+ return nFree; -+} -+ + ++ return nFree; ++} + -+int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev) ++int yaffs_GetNumberOfFreeChunks(yaffs_Device * dev) +{ -+ // This is what we report to the outside world ++ /* This is what we report to the outside world */ + + int nFree; + int nDirtyCacheChunks; -+ -+#if 1 ++ int blocksForCheckpoint; ++ ++#if 1 + nFree = dev->nFreeChunks; +#else + nFree = yaffs_CountFreeChunks(dev); +#endif ++ ++ nFree += dev->nDeletedFiles; + -+ // Now count the number of dirty chunks in the cache and subtract those -+ ++ /* Now count the number of dirty chunks in the cache and subtract those */ ++ + { + int i; -+ for( nDirtyCacheChunks = 0,i = 0; i < dev->nShortOpCaches; i++) -+ { -+ if(dev->srCache[i].dirty) nDirtyCacheChunks++; ++ for (nDirtyCacheChunks = 0, i = 0; i < dev->nShortOpCaches; i++) { ++ if (dev->srCache[i].dirty) ++ nDirtyCacheChunks++; + } + } -+ ++ + nFree -= nDirtyCacheChunks; -+ ++ + nFree -= ((dev->nReservedBlocks + 1) * dev->nChunksPerBlock); + -+ if(nFree < 0) nFree = 0; ++ /* Now we figure out how much to reserve for the checkpoint and report that... */ ++ blocksForCheckpoint = dev->nCheckpointReservedBlocks - dev->blocksInCheckpoint; ++ if(blocksForCheckpoint < 0) ++ blocksForCheckpoint = 0; ++ ++ nFree -= (blocksForCheckpoint * dev->nChunksPerBlock); ++ ++ if (nFree < 0) ++ nFree = 0; ++ ++ return nFree; + -+ return nFree; -+ +} + -+static int yaffs_freeVerificationFailures; ++static int yaffs_freeVerificationFailures; + -+static void yaffs_VerifyFreeChunks(yaffs_Device *dev) ++static void yaffs_VerifyFreeChunks(yaffs_Device * dev) +{ + int counted = yaffs_CountFreeChunks(dev); -+ ++ + int difference = dev->nFreeChunks - counted; -+ -+ if(difference) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("Freechunks verification failure %d %d %d" TENDSTR),dev->nFreeChunks,counted,difference)); -+ yaffs_freeVerificationFailures++; ++ ++ if (difference) { ++ T(YAFFS_TRACE_ALWAYS, ++ (TSTR("Freechunks verification failure %d %d %d" TENDSTR), ++ dev->nFreeChunks, counted, difference)); ++ yaffs_freeVerificationFailures++; + } +} + -+/////////////////// YAFFS test code ////////////////////////////////// ++/*---------------------------------------- YAFFS test code ----------------------*/ + +#define yaffs_CheckStruct(structure,syze, name) \ + if(sizeof(structure) != syze) \ + { \ -+ T(YAFFS_TRACE_ALWAYS,(TSTR("%s should be %d but is %d\n" TENDSTR),name,syze,sizeof(structure))); \ ++ T(YAFFS_TRACE_ALWAYS,(TSTR("%s should be %d but is %d\n" TENDSTR),\ ++ name,syze,sizeof(structure))); \ + return YAFFS_FAIL; \ -+ } -+ -+ ++ } ++ +static int yaffs_CheckStructures(void) +{ -+// yaffs_CheckStruct(yaffs_Tags,8,"yaffs_Tags") -+// yaffs_CheckStruct(yaffs_TagsUnion,8,"yaffs_TagsUnion") -+// yaffs_CheckStruct(yaffs_Spare,16,"yaffs_Spare") ++/* yaffs_CheckStruct(yaffs_Tags,8,"yaffs_Tags") */ ++/* yaffs_CheckStruct(yaffs_TagsUnion,8,"yaffs_TagsUnion") */ ++/* yaffs_CheckStruct(yaffs_Spare,16,"yaffs_Spare") */ +#ifndef CONFIG_YAFFS_TNODE_LIST_DEBUG -+ yaffs_CheckStruct(yaffs_Tnode,2* YAFFS_NTNODES_LEVEL0,"yaffs_Tnode") ++ yaffs_CheckStruct(yaffs_Tnode, 2 * YAFFS_NTNODES_LEVEL0, "yaffs_Tnode") +#endif -+ yaffs_CheckStruct(yaffs_ObjectHeader,512,"yaffs_ObjectHeader") -+ -+ -+ return YAFFS_OK; -+} ++ yaffs_CheckStruct(yaffs_ObjectHeader, 512, "yaffs_ObjectHeader") + -+#if 0 -+void yaffs_GutsTest(yaffs_Device *dev) -+{ -+ -+ if(yaffs_CheckStructures() != YAFFS_OK) -+ { -+ T(YAFFS_TRACE_ALWAYS,(TSTR("One or more structures malformed-- aborting\n" TENDSTR))); -+ return; -+ } -+ -+ yaffs_TnodeTest(dev); -+ yaffs_ObjectTest(dev); ++ return YAFFS_OK; +} -+#endif -+ -+ -diff --git a/fs/yaffs/yaffs_guts.h b/fs/yaffs/yaffs_guts.h -new file mode 100644 -index 0000000..58c52e0 ---- /dev/null -+++ b/fs/yaffs/yaffs_guts.h -@@ -0,0 +1,759 @@ +diff -urN linux.old/fs/yaffs2/yaffs_guts.h linux.dev/fs/yaffs2/yaffs_guts.h +--- linux.old/fs/yaffs2/yaffs_guts.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_guts.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,893 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yaffs_guts.h: Configuration etc for yaffs_guts @@ -8778,7 +10110,7 @@ index 0000000..58c52e0 + * + * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. + * -+ * $Id: yaffs_guts.h,v 1.11 2005/07/31 06:52:40 charles Exp $ ++ * $Id: yaffs_guts.h,v 1.25 2006/10/13 08:52:49 charles Exp $ + */ + +#ifndef __YAFFS_GUTS_H__ @@ -8790,12 +10122,13 @@ index 0000000..58c52e0 +#define YAFFS_OK 1 +#define YAFFS_FAIL 0 + -+// Give us a Y=0x59, -+// Give us an A=0x41, -+// Give us an FF=0xFF -+// Give us an S=0x53 -+// And what have we got... -+#define YAFFS_MAGIC 0x5941FF53 ++/* Give us a Y=0x59, ++ * Give us an A=0x41, ++ * Give us an FF=0xFF ++ * Give us an S=0x53 ++ * And what have we got... ++ */ ++#define YAFFS_MAGIC 0x5941FF53 + +#define YAFFS_NTNODES_LEVEL0 16 +#define YAFFS_TNODES_LEVEL0_BITS 4 @@ -8817,7 +10150,7 @@ index 0000000..58c52e0 +#define YAFFS_MIN_YAFFS2_CHUNK_SIZE 1024 +#define YAFFS_MIN_YAFFS2_SPARE_SIZE 32 + -+#define YAFFS_MAX_CHUNK_ID 0x000FFFFF ++#define YAFFS_MAX_CHUNK_ID 0x000FFFFF + +#define YAFFS_UNUSED_OBJECT_ID 0x0003FFFF + @@ -8828,7 +10161,11 @@ index 0000000..58c52e0 +#define YAFFS_NOBJECT_BUCKETS 256 + + -+#define YAFFS_OBJECT_SPACE 0x40000 ++#define YAFFS_OBJECT_SPACE 0x40000 ++ ++#define YAFFS_NCHECKPOINT_OBJECTS 5000 ++ ++#define YAFFS_CHECKPOINT_VERSION 2 + +#ifdef CONFIG_YAFFS_UNICODE +#define YAFFS_MAX_NAME_LENGTH 127 @@ -8840,36 +10177,41 @@ index 0000000..58c52e0 + +#define YAFFS_SHORT_NAME_LENGTH 15 + -+ -+#define YAFFS_OBJECTID_ROOT 1 ++/* Some special object ids for pseudo objects */ ++#define YAFFS_OBJECTID_ROOT 1 +#define YAFFS_OBJECTID_LOSTNFOUND 2 +#define YAFFS_OBJECTID_UNLINKED 3 +#define YAFFS_OBJECTID_DELETED 4 + ++/* Sseudo object ids for checkpointing */ ++#define YAFFS_OBJECTID_SB_HEADER 0x10 ++#define YAFFS_OBJECTID_CHECKPOINT_DATA 0x20 ++#define YAFFS_SEQUENCE_CHECKPOINT_DATA 0x21 ++ ++/* */ ++ +#define YAFFS_MAX_SHORT_OP_CACHES 20 + +#define YAFFS_N_TEMP_BUFFERS 4 + -+// Sequence numbers are used in YAFFS2 to determine block allocation order. -+// The range is limited slightly to help distinguish bad numbers from good. -+// This also allows us to perhaps in the future use special numbers for -+// special purposes. -+// EFFFFF00 allows the allocation of 8 blocks per second (~1Mbytes) for 15 years, -+// and is a larger number than the lifetime of a 2GB device. -+ ++/* Sequence numbers are used in YAFFS2 to determine block allocation order. ++ * The range is limited slightly to help distinguish bad numbers from good. ++ * This also allows us to perhaps in the future use special numbers for ++ * special purposes. ++ * EFFFFF00 allows the allocation of 8 blocks per second (~1Mbytes) for 15 years, ++ * and is a larger number than the lifetime of a 2GB device. ++ */ +#define YAFFS_LOWEST_SEQUENCE_NUMBER 0x00001000 +#define YAFFS_HIGHEST_SEQUENCE_NUMBER 0xEFFFFF00 + -+ -+// ChunkCache is used for short read/write operations. -+typedef struct -+{ ++/* ChunkCache is used for short read/write operations.*/ ++typedef struct { + struct yaffs_ObjectStruct *object; + int chunkId; + int lastUse; -+ int dirty; -+ int nBytes; // Only valid if the cache is dirty -+ int locked; // Can't push out or flush while locked.. ++ int dirty; ++ int nBytes; /* Only valid if the cache is dirty */ ++ int locked; /* Can't push out or flush while locked. */ +#ifdef CONFIG_YAFFS_YAFFS2 + __u8 *data; +#else @@ -8878,40 +10220,40 @@ index 0000000..58c52e0 +} yaffs_ChunkCache; + + -+#ifndef CONFIG_YAFFS_NO_YAFFS1 -+// Tags structures in RAM -+// NB This uses bitfield. Bitfields should not straddle a u32 boundary otherwise -+// the structure size will get blown out. + -+typedef struct -+{ ++/* Tags structures in RAM ++ * NB This uses bitfield. Bitfields should not straddle a u32 boundary otherwise ++ * the structure size will get blown out. ++ */ ++ ++#ifndef CONFIG_YAFFS_NO_YAFFS1 ++typedef struct { + unsigned chunkId:20; -+ unsigned serialNumber:2; -+ unsigned byteCount:10; -+ unsigned objectId:18; -+ unsigned ecc:12; -+ unsigned unusedStuff:2; ++ unsigned serialNumber:2; ++ unsigned byteCount:10; ++ unsigned objectId:18; ++ unsigned ecc:12; ++ unsigned unusedStuff:2; + +} yaffs_Tags; + -+typedef union -+{ -+ yaffs_Tags asTags; -+ __u8 asBytes[8]; ++typedef union { ++ yaffs_Tags asTags; ++ __u8 asBytes[8]; +} yaffs_TagsUnion; + +#endif + -+typedef enum -+{ ++/* Stuff used for extended tags in YAFFS2 */ ++ ++typedef enum { + YAFFS_ECC_RESULT_UNKNOWN, + YAFFS_ECC_RESULT_NO_ERROR, + YAFFS_ECC_RESULT_FIXED, + YAFFS_ECC_RESULT_UNFIXED +} yaffs_ECCResult; + -+typedef enum -+{ ++typedef enum { + YAFFS_OBJECT_TYPE_UNKNOWN, + YAFFS_OBJECT_TYPE_FILE, + YAFFS_OBJECT_TYPE_SYMLINK, @@ -8920,157 +10262,162 @@ index 0000000..58c52e0 + YAFFS_OBJECT_TYPE_SPECIAL +} yaffs_ObjectType; + -+ -+typedef struct -+{ ++typedef struct { + + unsigned validMarker0; -+ unsigned chunkUsed; // Status of the chunk: used or unused -+ unsigned objectId; // If 0 then this is not part of an object (unused) -+ unsigned chunkId; // If 0 then this is a header, else a data chunk -+ unsigned byteCount; // Only valid for data chunks -+ -+ -+ // The following stuff only has meaning when we read -+ yaffs_ECCResult eccResult; // Only valid when we read. -+ unsigned blockBad; // Only valid on reading ++ unsigned chunkUsed; /* Status of the chunk: used or unused */ ++ unsigned objectId; /* If 0 then this is not part of an object (unused) */ ++ unsigned chunkId; /* If 0 then this is a header, else a data chunk */ ++ unsigned byteCount; /* Only valid for data chunks */ + -+ // YAFFS 1 stuff -+ unsigned chunkDeleted; // The chunk is marked deleted -+ unsigned serialNumber; // Yaffs1 2-bit serial number -+ -+ // YAFFS2 stuff -+ unsigned sequenceNumber; // The sequence number of this block ++ /* The following stuff only has meaning when we read */ ++ yaffs_ECCResult eccResult; ++ unsigned blockBad; + -+ // Extra info if this is an object header (YAFFS2 only) -+ -+ unsigned extraHeaderInfoAvailable; // There is extra info available if this is not zero -+ unsigned extraParentObjectId; // The parent object -+ unsigned extraIsShrinkHeader; // Is it a shrink header? -+ unsigned extraShadows; // Does this shadow another object? -+ -+ yaffs_ObjectType extraObjectType; // What object type? ++ /* YAFFS 1 stuff */ ++ unsigned chunkDeleted; /* The chunk is marked deleted */ ++ unsigned serialNumber; /* Yaffs1 2-bit serial number */ + -+ unsigned extraFileLength; // Length if it is a file -+ unsigned extraEquivalentObjectId; // Equivalent object Id if it is a hard link ++ /* YAFFS2 stuff */ ++ unsigned sequenceNumber; /* The sequence number of this block */ ++ ++ /* Extra info if this is an object header (YAFFS2 only) */ ++ ++ unsigned extraHeaderInfoAvailable; /* There is extra info available if this is not zero */ ++ unsigned extraParentObjectId; /* The parent object */ ++ unsigned extraIsShrinkHeader; /* Is it a shrink header? */ ++ unsigned extraShadows; /* Does this shadow another object? */ ++ ++ yaffs_ObjectType extraObjectType; /* What object type? */ ++ ++ unsigned extraFileLength; /* Length if it is a file */ ++ unsigned extraEquivalentObjectId; /* Equivalent object Id if it is a hard link */ ++ ++ unsigned validMarker1; + -+ unsigned validMarker1; -+ +} yaffs_ExtendedTags; + -+#ifndef CONFIG_YAFFS_NO_YAFFS1 -+// Spare structure -+typedef struct -+{ -+ __u8 tagByte0; -+ __u8 tagByte1; -+ __u8 tagByte2; -+ __u8 tagByte3; -+ __u8 pageStatus; // set to 0 to delete the chunk -+ __u8 blockStatus; -+ __u8 tagByte4; -+ __u8 tagByte5; -+ __u8 ecc1[3]; -+ __u8 tagByte6; -+ __u8 tagByte7; -+ __u8 ecc2[3]; ++/* Spare structure for YAFFS1 */ ++typedef struct { ++ __u8 tagByte0; ++ __u8 tagByte1; ++ __u8 tagByte2; ++ __u8 tagByte3; ++ __u8 pageStatus; /* set to 0 to delete the chunk */ ++ __u8 blockStatus; ++ __u8 tagByte4; ++ __u8 tagByte5; ++ __u8 ecc1[3]; ++ __u8 tagByte6; ++ __u8 tagByte7; ++ __u8 ecc2[3]; +} yaffs_Spare; + -+//Special structure for passing through to mtd ++/*Special structure for passing through to mtd */ +struct yaffs_NANDSpare { -+ yaffs_Spare spare; -+ int eccres1; -+ int eccres2; ++ yaffs_Spare spare; ++ int eccres1; ++ int eccres2; +}; -+#endif + -+ -+// Block data in RAM ++/* Block data in RAM */ + +typedef enum { -+ YAFFS_BLOCK_STATE_UNKNOWN = 0, ++ YAFFS_BLOCK_STATE_UNKNOWN = 0, + + YAFFS_BLOCK_STATE_SCANNING, -+ YAFFS_BLOCK_STATE_NEEDS_SCANNING,// The block might have something on it (ie it is allocating or full, perhaps empty) -+ // but it needs to be scanned to determine its true state. -+ // This state is only valid during yaffs_Scan. -+ // NB We tolerate empty because the pre-scanner might be incapable of deciding -+ // However, if this state is returned on a YAFFS2 device, then we expect a sequence number -+ -+ YAFFS_BLOCK_STATE_EMPTY, // This block is empty -+ -+ YAFFS_BLOCK_STATE_ALLOCATING, // This block is partially allocated. -+ // This is the one currently being used for page -+ // allocation. Should never be more than one of these -+ -+ -+ YAFFS_BLOCK_STATE_FULL, // All the pages in this block have been allocated. -+ // At least one page holds valid data. -+ -+ YAFFS_BLOCK_STATE_DIRTY, // All pages have been allocated and deleted. -+ // Erase me, reuse me. -+ -+ YAFFS_BLOCK_STATE_COLLECTING, // This block is being garbage collected -+ -+ YAFFS_BLOCK_STATE_DEAD // This block has failed and is not in use ++ YAFFS_BLOCK_STATE_NEEDS_SCANNING, ++ /* The block might have something on it (ie it is allocating or full, perhaps empty) ++ * but it needs to be scanned to determine its true state. ++ * This state is only valid during yaffs_Scan. ++ * NB We tolerate empty because the pre-scanner might be incapable of deciding ++ * However, if this state is returned on a YAFFS2 device, then we expect a sequence number ++ */ + -+} yaffs_BlockState; ++ YAFFS_BLOCK_STATE_EMPTY, ++ /* This block is empty */ + ++ YAFFS_BLOCK_STATE_ALLOCATING, ++ /* This block is partially allocated. ++ * At least one page holds valid data. ++ * This is the one currently being used for page ++ * allocation. Should never be more than one of these ++ */ + ++ YAFFS_BLOCK_STATE_FULL, ++ /* All the pages in this block have been allocated. ++ */ + ++ YAFFS_BLOCK_STATE_DIRTY, ++ /* All pages have been allocated and deleted. ++ * Erase me, reuse me. ++ */ + -+typedef struct -+{ ++ YAFFS_BLOCK_STATE_CHECKPOINT, ++ /* This block is assigned to holding checkpoint data. ++ */ ++ ++ YAFFS_BLOCK_STATE_COLLECTING, ++ /* This block is being garbage collected */ ++ ++ YAFFS_BLOCK_STATE_DEAD ++ /* This block has failed and is not in use */ ++} yaffs_BlockState; ++ ++typedef struct { ++ ++ int softDeletions:10; /* number of soft deleted pages */ ++ int pagesInUse:10; /* number of pages in use */ ++ yaffs_BlockState blockState:4; /* One of the above block states */ ++ __u32 needsRetiring:1; /* Data has failed on this block, need to get valid data off */ ++ /* and retire the block. */ ++ __u32 skipErasedCheck: 1; /* If this is set we can skip the erased check on this block */ ++ __u32 gcPrioritise: 1; /* An ECC check or bank check has failed on this block. ++ It should be prioritised for GC */ ++ __u32 chunkErrorStrikes:3; /* How many times we've had ecc etc failures on this block and tried to reuse it */ + -+ int softDeletions:12; // number of soft deleted pages -+ int pagesInUse:12; // number of pages in use -+ yaffs_BlockState blockState:4; // One of the above block states -+ __u32 needsRetiring:1; // Data has failed on this block, need to get valid data off -+ // and retire the block. +#ifdef CONFIG_YAFFS_YAFFS2 -+ __u32 hasShrinkHeader:1;// This block has at least one object header that does a shrink -+ __u32 sequenceNumber; // block sequence number for yaffs2 ++ __u32 hasShrinkHeader:1; /* This block has at least one shrink object header */ ++ __u32 sequenceNumber; /* block sequence number for yaffs2 */ +#endif + +} yaffs_BlockInfo; + ++/* -------------------------- Object structure -------------------------------*/ ++/* This is the object structure as stored on NAND */ + -+//////////////////// Object structure /////////////////////////// -+// This is the object structure as stored on NAND -+ -+typedef struct -+{ ++typedef struct { + yaffs_ObjectType type; + -+ // Apply to everything -+ int parentObjectId; -+ __u16 sum__NoLongerUsed; // checksum of name. Calc this off the name to prevent inconsistencies -+ YCHAR name[YAFFS_MAX_NAME_LENGTH + 1]; ++ /* Apply to everything */ ++ int parentObjectId; ++ __u16 sum__NoLongerUsed; /* checksum of name. No longer used */ ++ YCHAR name[YAFFS_MAX_NAME_LENGTH + 1]; + -+ // Thes following apply to directories, files, symlinks - not hard links -+ __u32 yst_mode; // protection ++ /* Thes following apply to directories, files, symlinks - not hard links */ ++ __u32 yst_mode; /* protection */ + +#ifdef CONFIG_YAFFS_WINCE + __u32 notForWinCE[5]; +#else -+ __u32 yst_uid; // user ID of owner -+ __u32 yst_gid; // group ID of owner -+ __u32 yst_atime; // time of last access -+ __u32 yst_mtime; // time of last modification -+ __u32 yst_ctime; // time of last change ++ __u32 yst_uid; ++ __u32 yst_gid; ++ __u32 yst_atime; ++ __u32 yst_mtime; ++ __u32 yst_ctime; +#endif + -+ // File size applies to files only -+ int fileSize; -+ -+ // Equivalent object id applies to hard links only. -+ int equivalentObjectId; -+ -+ // Alias is for symlinks only. ++ /* File size applies to files only */ ++ int fileSize; ++ ++ /* Equivalent object id applies to hard links only. */ ++ int equivalentObjectId; ++ ++ /* Alias is for symlinks only. */ + YCHAR alias[YAFFS_MAX_ALIAS_LENGTH + 1]; -+ -+ __u32 yst_rdev; // device stuff for block and char devices (maj/min) -+ ++ ++ __u32 yst_rdev; /* device stuff for block and char devices (major/min) */ ++ +#ifdef CONFIG_YAFFS_WINCE + __u32 win_ctime[2]; + __u32 win_atime[2]; @@ -9080,130 +10427,114 @@ index 0000000..58c52e0 + __u32 roomToGrow[10]; +#endif + -+ int shadowsObject; // This object header shadows the specified object if not > 0 ++ int shadowsObject; /* This object header shadows the specified object if > 0 */ + -+ // isShrink applies to object headers written when we shrink the file (ie resize) ++ /* isShrink applies to object headers written when we shrink the file (ie resize) */ + __u32 isShrink; -+ -+} yaffs_ObjectHeader; -+ + ++} yaffs_ObjectHeader; + -+//////////////////// Tnode /////////////////////////// ++/*--------------------------- Tnode -------------------------- */ + -+union yaffs_Tnode_union -+{ ++union yaffs_Tnode_union { +#ifdef CONFIG_YAFFS_TNODE_LIST_DEBUG -+ union yaffs_Tnode_union *internal[YAFFS_NTNODES_INTERNAL+1]; ++ union yaffs_Tnode_union *internal[YAFFS_NTNODES_INTERNAL + 1]; +#else + union yaffs_Tnode_union *internal[YAFFS_NTNODES_INTERNAL]; +#endif -+ __u16 level0[YAFFS_NTNODES_LEVEL0]; -+ ++/* __u16 level0[YAFFS_NTNODES_LEVEL0]; */ ++ +}; + +typedef union yaffs_Tnode_union yaffs_Tnode; + -+struct yaffs_TnodeList_struct -+{ ++struct yaffs_TnodeList_struct { + struct yaffs_TnodeList_struct *next; + yaffs_Tnode *tnodes; +}; + +typedef struct yaffs_TnodeList_struct yaffs_TnodeList; + ++/*------------------------ Object -----------------------------*/ ++/* An object can be one of: ++ * - a directory (no data, has children links ++ * - a regular file (data.... not prunes :->). ++ * - a symlink [symbolic link] (the alias). ++ * - a hard link ++ */ + -+ -+/////////////////// Object //////////////////////////////// -+// An object can be one of: -+// - a directory (no data, has children links -+// - a regular file (data.... not prunes :->). -+// - a symlink [symbolic link] (the alias). -+// - a hard link -+ -+ -+typedef struct -+{ ++typedef struct { + __u32 fileSize; + __u32 scannedFileSize; + __u32 shrinkSize; -+ int topLevel; ++ int topLevel; + yaffs_Tnode *top; +} yaffs_FileStructure; + -+typedef struct -+{ -+ struct list_head children; // list of child links ++typedef struct { ++ struct list_head children; /* list of child links */ +} yaffs_DirectoryStructure; + -+typedef struct -+{ ++typedef struct { + YCHAR *alias; +} yaffs_SymLinkStructure; + -+typedef struct -+{ ++typedef struct { + struct yaffs_ObjectStruct *equivalentObject; -+ __u32 equivalentObjectId; ++ __u32 equivalentObjectId; +} yaffs_HardLinkStructure; + -+typedef union -+{ ++typedef union { + yaffs_FileStructure fileVariant; + yaffs_DirectoryStructure directoryVariant; + yaffs_SymLinkStructure symLinkVariant; + yaffs_HardLinkStructure hardLinkVariant; +} yaffs_ObjectVariant; + -+ -+struct yaffs_ObjectStruct -+{ -+ __u8 deleted: 1; // This should only apply to unlinked files. -+ __u8 softDeleted: 1; // it has also been soft deleted -+ __u8 unlinked: 1; // An unlinked file. The file should be in the unlinked pseudo directory. -+ __u8 fake:1; // A fake object has no presence on NAND. -+ __u8 renameAllowed:1; // Some objects are not allowed to be renamed. ++struct yaffs_ObjectStruct { ++ __u8 deleted:1; /* This should only apply to unlinked files. */ ++ __u8 softDeleted:1; /* it has also been soft deleted */ ++ __u8 unlinked:1; /* An unlinked file. The file should be in the unlinked directory.*/ ++ __u8 fake:1; /* A fake object has no presence on NAND. */ ++ __u8 renameAllowed:1; /* Some objects are not allowed to be renamed. */ + __u8 unlinkAllowed:1; -+ __u8 dirty:1; // the object needs to be written to flash -+ __u8 valid:1; // When the file system is being loaded up, this -+ // object might be created before the data -+ // is available (ie. file data records appear before the header). -+ __u8 serial; // serial number of chunk in NAND. Store here so we don't have to -+ -+ __u8 deferedFree: 1; // For Linux kernel. Object is removed from NAND, but still in the inode cache. -+ // Free of object is defered. -+ -+ __u8 lazyLoaded; // Vital info has been loaded from tags. Not all info available. -+ // ++ __u8 dirty:1; /* the object needs to be written to flash */ ++ __u8 valid:1; /* When the file system is being loaded up, this ++ * object might be created before the data ++ * is available (ie. file data records appear before the header). ++ */ ++ __u8 lazyLoaded:1; /* This object has been lazy loaded and is missing some detail */ + -+ // read back the old one to update. -+ __u16 sum; // sum of the name to speed searching -+ -+ struct yaffs_DeviceStruct *myDev; // The device I'm on -+ -+ -+ struct list_head hashLink; // list of objects in this hash bucket -+ -+ -+ struct list_head hardLinks; // all the equivalent hard linked objects -+ // live on this list -+ // directory structure stuff -+ struct yaffs_ObjectStruct *parent; //my parent directory -+ struct list_head siblings; // siblings in a directory -+ // also used for linking up the free list -+ -+ // Where's my object header in NAND? -+ int chunkId; // where it lives ++ __u8 deferedFree:1; /* For Linux kernel. Object is removed from NAND, but is ++ * still in the inode cache. Free of object is defered. ++ * until the inode is released. ++ */ + -+ int nDataChunks; // Number of data chunks attached to the file. -+ -+ __u32 objectId; // the object id value -+ -+ -+ __u32 yst_mode; // protection ++ __u8 serial; /* serial number of chunk in NAND. Cached here */ ++ __u16 sum; /* sum of the name to speed searching */ ++ ++ struct yaffs_DeviceStruct *myDev; /* The device I'm on */ ++ ++ struct list_head hashLink; /* list of objects in this hash bucket */ ++ ++ struct list_head hardLinks; /* all the equivalent hard linked objects */ ++ ++ /* directory structure stuff */ ++ /* also used for linking up the free list */ ++ struct yaffs_ObjectStruct *parent; ++ struct list_head siblings; ++ ++ /* Where's my object header in NAND? */ ++ int chunkId; ++ ++ int nDataChunks; /* Number of data chunks attached to the file. */ ++ ++ __u32 objectId; /* the object id value */ ++ ++ __u32 yst_mode; + +#ifdef CONFIG_YAFFS_SHORT_NAMES_IN_RAM -+ YCHAR shortName[YAFFS_SHORT_NAME_LENGTH+1]; ++ YCHAR shortName[YAFFS_SHORT_NAME_LENGTH + 1]; +#endif + +#ifndef __KERNEL__ @@ -9215,161 +10546,248 @@ index 0000000..58c52e0 + __u32 win_mtime[2]; + __u32 win_atime[2]; +#else -+ __u32 yst_uid; // user ID of owner -+ __u32 yst_gid; // group ID of owner -+ __u32 yst_atime; // time of last access -+ __u32 yst_mtime; // time of last modification -+ __u32 yst_ctime; // time of last change ++ __u32 yst_uid; ++ __u32 yst_gid; ++ __u32 yst_atime; ++ __u32 yst_mtime; ++ __u32 yst_ctime; +#endif + -+ __u32 yst_rdev; // device stuff for block and char devices -+ -+ ++ __u32 yst_rdev; + +#ifdef __KERNEL__ + struct inode *myInode; + +#endif + -+ -+ + yaffs_ObjectType variantType; -+ -+ yaffs_ObjectVariant variant; -+ -+}; + ++ yaffs_ObjectVariant variant; + ++}; + +typedef struct yaffs_ObjectStruct yaffs_Object; + -+ -+struct yaffs_ObjectList_struct -+{ ++struct yaffs_ObjectList_struct { + yaffs_Object *objects; + struct yaffs_ObjectList_struct *next; +}; + +typedef struct yaffs_ObjectList_struct yaffs_ObjectList; + -+typedef struct -+{ ++typedef struct { + struct list_head list; + int count; +} yaffs_ObjectBucket; + -+///////////////////// Temporary buffers //////////////////// -+// -+// These are chunk-sized working buffers. Each device has a few ++ ++/* yaffs_CheckpointObject holds the definition of an object as dumped ++ * by checkpointing. ++ */ ++ ++typedef struct { ++ int structType; ++ __u32 objectId; ++ __u32 parentId; ++ int chunkId; ++ ++ yaffs_ObjectType variantType:3; ++ __u8 deleted:1; ++ __u8 softDeleted:1; ++ __u8 unlinked:1; ++ __u8 fake:1; ++ __u8 renameAllowed:1; ++ __u8 unlinkAllowed:1; ++ __u8 serial; ++ ++ int nDataChunks; ++ __u32 fileSizeOrEquivalentObjectId; ++ ++}yaffs_CheckpointObject; ++ ++/*--------------------- Temporary buffers ---------------- ++ * ++ * These are chunk-sized working buffers. Each device has a few ++ */ + +typedef struct { + __u8 *buffer; -+ int line; // track from whence this buffer was allocated ++ int line; /* track from whence this buffer was allocated */ + int maxLine; +} yaffs_TempBuffer; + -+//////////////////// Device //////////////////////////////// ++/*----------------- Device ---------------------------------*/ + -+struct yaffs_DeviceStruct -+{ ++struct yaffs_DeviceStruct { + struct list_head devList; + const char *name; + -+ // Entry parameters set up way early. Yaffs sets up the rest. -+ int nBytesPerChunk; // Should be a power of 2 >= 512 -+ int nChunksPerBlock; // does not need to be a power of 2 -+ int nBytesPerSpare; // spare area size -+ int startBlock; // Start block we're allowed to use -+ int endBlock; // End block we're allowed to use -+ int nReservedBlocks; // We want this tuneable so that we can reduce -+ // reserved blocks on NOR and RAM. ++ /* Entry parameters set up way early. Yaffs sets up the rest.*/ ++ int nDataBytesPerChunk; /* Should be a power of 2 >= 512 */ ++ int nChunksPerBlock; /* does not need to be a power of 2 */ ++ int nBytesPerSpare; /* spare area size */ ++ int startBlock; /* Start block we're allowed to use */ ++ int endBlock; /* End block we're allowed to use */ ++ int nReservedBlocks; /* We want this tuneable so that we can reduce */ ++ /* reserved blocks on NOR and RAM. */ + -+ int nShortOpCaches; // If <= 0, then short op caching is disabled, else -+ // the number of short op caches (don't use too many). -+ -+ int useHeaderFileSize; // Flag to determine if we should use file sizes from the header -+ -+ int useNANDECC; // Flag to decide whether or not to use NANDECC ++ /* Stuff used by the partitioned checkpointing mechanism */ ++ int checkpointStartBlock; ++ int checkpointEndBlock; + ++ /* Stuff used by the shared space checkpointing mechanism */ ++ /* If this value is zero, then this mechanism is disabled */ + -+ void *genericDevice; // Pointer to device context -+ // On an mtd this holds the mtd pointer. ++ int nCheckpointReservedBlocks; /* Blocks to reserve for checkpoint data */ + -+ // NAND access functions (Must be set before calling YAFFS) + + -+ int (*writeChunkToNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, const __u8 *data, const yaffs_Spare *spare); -+ int (*readChunkFromNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, __u8 *data, yaffs_Spare *spare); -+ int (*eraseBlockInNAND)(struct yaffs_DeviceStruct *dev,int blockInNAND); -+ int (*initialiseNAND)(struct yaffs_DeviceStruct *dev); ++ ++ int nShortOpCaches; /* If <= 0, then short op caching is disabled, else ++ * the number of short op caches (don't use too many) ++ */ ++ ++ int useHeaderFileSize; /* Flag to determine if we should use file sizes from the header */ ++ ++ int useNANDECC; /* Flag to decide whether or not to use NANDECC */ ++ ++ void *genericDevice; /* Pointer to device context ++ * On an mtd this holds the mtd pointer. ++ */ ++ void *superBlock; ++ ++ /* NAND access functions (Must be set before calling YAFFS)*/ ++ ++ int (*writeChunkToNAND) (struct yaffs_DeviceStruct * dev, ++ int chunkInNAND, const __u8 * data, ++ const yaffs_Spare * spare); ++ int (*readChunkFromNAND) (struct yaffs_DeviceStruct * dev, ++ int chunkInNAND, __u8 * data, ++ yaffs_Spare * spare); ++ int (*eraseBlockInNAND) (struct yaffs_DeviceStruct * dev, ++ int blockInNAND); ++ int (*initialiseNAND) (struct yaffs_DeviceStruct * dev); + +#ifdef CONFIG_YAFFS_YAFFS2 -+ int (*writeChunkWithTagsToNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, const __u8 *data, const yaffs_ExtendedTags *tags); -+ int (*readChunkWithTagsFromNAND)(struct yaffs_DeviceStruct *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags); -+ int (*markNANDBlockBad)(struct yaffs_DeviceStruct *dev, int blockNo); -+ int (*queryNANDBlock)(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber); ++ int (*writeChunkWithTagsToNAND) (struct yaffs_DeviceStruct * dev, ++ int chunkInNAND, const __u8 * data, ++ const yaffs_ExtendedTags * tags); ++ int (*readChunkWithTagsFromNAND) (struct yaffs_DeviceStruct * dev, ++ int chunkInNAND, __u8 * data, ++ yaffs_ExtendedTags * tags); ++ int (*markNANDBlockBad) (struct yaffs_DeviceStruct * dev, int blockNo); ++ int (*queryNANDBlock) (struct yaffs_DeviceStruct * dev, int blockNo, ++ yaffs_BlockState * state, int *sequenceNumber); +#endif + + int isYaffs2; ++ ++ /* The removeObjectCallback function must be supplied by OS flavours that ++ * need it. The Linux kernel does not use this, but yaffs direct does use ++ * it to implement the faster readdir ++ */ ++ void (*removeObjectCallback)(struct yaffs_ObjectStruct *obj); ++ ++ /* Callback to mark the superblock dirsty */ ++ void (*markSuperBlockDirty)(void * superblock); ++ ++ int wideTnodesDisabled; /* Set to disable wide tnodes */ ++ ++ ++ /* End of stuff that must be set before initialisation. */ + -+ // End of stuff that must be set before initialisation. ++ /* Runtime parameters. Set up by YAFFS. */ ++ ++ __u16 chunkGroupBits; /* 0 for devices <= 32MB. else log2(nchunks) - 16 */ ++ __u16 chunkGroupSize; /* == 2^^chunkGroupBits */ ++ ++ /* Stuff to support wide tnodes */ ++ __u32 tnodeWidth; ++ __u32 tnodeMask; + -+ // Runtime parameters. Set up by YAFFS. ++ /* Stuff to support various file offses to chunk/offset translations */ ++ /* "Crumbs" for nDataBytesPerChunk not being a power of 2 */ ++ __u32 crumbMask; ++ __u32 crumbShift; ++ __u32 crumbsPerChunk; + -+ __u16 chunkGroupBits; // 0 for devices <= 32MB. else log2(nchunks) - 16 -+ __u16 chunkGroupSize; // == 2^^chunkGroupBits ++ /* Straight shifting for nDataBytesPerChunk being a power of 2 */ ++ __u32 chunkShift; ++ __u32 chunkMask; + ++ +#ifdef __KERNEL__ + -+ struct semaphore sem;// Semaphore for waiting on erasure. -+ struct semaphore grossLock; // Gross locking semaphore -+ __u8 * spareBuffer; // For mtdif2 use. Don't know the size of the buffer at compile time so we have to allocate it. -+ void (*putSuperFunc)(struct super_block *sb); ++ struct semaphore sem; /* Semaphore for waiting on erasure.*/ ++ struct semaphore grossLock; /* Gross locking semaphore */ ++ __u8 *spareBuffer; /* For mtdif2 use. Don't know the size of the buffer ++ * at compile time so we have to allocate it. ++ */ ++ void (*putSuperFunc) (struct super_block * sb); +#endif + + int isMounted; + -+ // Stuff to support block offsetting to support start block zero ++ int isCheckpointed; ++ ++ ++ /* Stuff to support block offsetting to support start block zero */ + int internalStartBlock; + int internalEndBlock; + int blockOffset; + int chunkOffset; + -+ // Block Info -+ yaffs_BlockInfo *blockInfo; -+ __u8 *chunkBits; // bitmap of chunks in use -+ int chunkBitmapStride; // Number of bytes of chunkBits per block. -+ // Must be consistent with nChunksPerBlock. -+ + -+ int nErasedBlocks; -+ int allocationBlock; // Current block being allocated off ++ /* Runtime checkpointing stuff */ ++ int checkpointPageSequence; /* running sequence number of checkpoint pages */ ++ int checkpointByteCount; ++ int checkpointByteOffset; ++ __u8 *checkpointBuffer; ++ int checkpointOpenForWrite; ++ int blocksInCheckpoint; ++ int checkpointCurrentChunk; ++ int checkpointCurrentBlock; ++ int checkpointNextBlock; ++ int *checkpointBlockList; ++ int checkpointMaxBlocks; ++ ++ /* Block Info */ ++ yaffs_BlockInfo *blockInfo; ++ __u8 *chunkBits; /* bitmap of chunks in use */ ++ unsigned blockInfoAlt:1; /* was allocated using alternative strategy */ ++ unsigned chunkBitsAlt:1; /* was allocated using alternative strategy */ ++ int chunkBitmapStride; /* Number of bytes of chunkBits per block. ++ * Must be consistent with nChunksPerBlock. ++ */ ++ ++ int nErasedBlocks; ++ int allocationBlock; /* Current block being allocated off */ + __u32 allocationPage; -+ int allocationBlockFinder; // Used to search for next allocation block -+ -+ // Runtime state -+ int nTnodesCreated; ++ int allocationBlockFinder; /* Used to search for next allocation block */ ++ ++ /* Runtime state */ ++ int nTnodesCreated; + yaffs_Tnode *freeTnodes; -+ int nFreeTnodes; ++ int nFreeTnodes; + yaffs_TnodeList *allocatedTnodeList; + -+ int isDoingGC; ++ int isDoingGC; + -+ int nObjectsCreated; ++ int nObjectsCreated; + yaffs_Object *freeObjects; -+ int nFreeObjects; ++ int nFreeObjects; + + yaffs_ObjectList *allocatedObjectList; + + yaffs_ObjectBucket objectBucket[YAFFS_NOBJECT_BUCKETS]; + -+ int nFreeChunks; -+ -+ int currentDirtyChecker; // Used to find current dirtiest block -+ -+ __u32 *gcCleanupList; // objects to delete at the end of a GC. -+ -+ // Operations since mount ++ int nFreeChunks; ++ ++ int currentDirtyChecker; /* Used to find current dirtiest block */ ++ ++ __u32 *gcCleanupList; /* objects to delete at the end of a GC. */ ++ ++ /* Statistcs */ + int nPageWrites; + int nPageReads; + int nBlockErasures; @@ -9386,13 +10804,18 @@ index 0000000..58c52e0 + int nDeletions; + int nUnmarkedDeletions; + ++ int hasPendingPrioritisedGCs; /* We think this device might have pending prioritised gcs */ ++ ++ /* Special directories */ + yaffs_Object *rootDir; + yaffs_Object *lostNFoundDir; ++ ++ /* Buffer areas for storing data to recover from write failures TODO ++ * __u8 bufferedData[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK]; ++ * yaffs_Spare bufferedSpare[YAFFS_CHUNKS_PER_BLOCK]; ++ */ + -+ // Buffer areas for storing data to recover from write failures -+// __u8 bufferedData[YAFFS_CHUNKS_PER_BLOCK][YAFFS_BYTES_PER_CHUNK]; -+// yaffs_Spare bufferedSpare[YAFFS_CHUNKS_PER_BLOCK]; -+ int bufferedBlock; // Which block is buffered here? ++ int bufferedBlock; /* Which block is buffered here? */ + int doingBufferedBlockRewrite; + + yaffs_ChunkCache *srCache; @@ -9400,133 +10823,201 @@ index 0000000..58c52e0 + + int cacheHits; + -+ // Stuff for background deletion and unlinked files. -+ yaffs_Object *unlinkedDir; // Directory where unlinked and deleted files live. -+ yaffs_Object *deletedDir; // Directory where deleted objects are sent to disappear. -+ yaffs_Object *unlinkedDeletion; // Current file being background deleted. -+ int nDeletedFiles; // Count of files awaiting deletion; -+ int nUnlinkedFiles; // Count of unlinked files. -+ int nBackgroundDeletions; // Count of background deletions. -+ -+ //__u8 *localBuffer; -+ ++ /* Stuff for background deletion and unlinked files.*/ ++ yaffs_Object *unlinkedDir; /* Directory where unlinked and deleted files live. */ ++ yaffs_Object *deletedDir; /* Directory where deleted objects are sent to disappear. */ ++ yaffs_Object *unlinkedDeletion; /* Current file being background deleted.*/ ++ int nDeletedFiles; /* Count of files awaiting deletion;*/ ++ int nUnlinkedFiles; /* Count of unlinked files. */ ++ int nBackgroundDeletions; /* Count of background deletions. */ ++ ++ + yaffs_TempBuffer tempBuffer[YAFFS_N_TEMP_BUFFERS]; + int maxTemp; + int unmanagedTempAllocations; + int unmanagedTempDeallocations; -+ -+ // yaffs2 runtime stuff -+ unsigned sequenceNumber; //Sequence number of currently allocating block ++ ++ /* yaffs2 runtime stuff */ ++ unsigned sequenceNumber; /* Sequence number of currently allocating block */ + unsigned oldestDirtySequence; -+ ++ +}; + +typedef struct yaffs_DeviceStruct yaffs_Device; + ++/* The static layout of bllock usage etc is stored in the super block header */ ++typedef struct { ++ int StructType; ++ int version; ++ int checkpointStartBlock; ++ int checkpointEndBlock; ++ int startBlock; ++ int endBlock; ++ int rfu[100]; ++} yaffs_SuperBlockHeader; ++ ++/* The CheckpointDevice structure holds the device information that changes at runtime and ++ * must be preserved over unmount/mount cycles. ++ */ ++typedef struct { ++ int structType; ++ int nErasedBlocks; ++ int allocationBlock; /* Current block being allocated off */ ++ __u32 allocationPage; ++ int nFreeChunks; + -+// Function to manipulate block info -+static Y_INLINE yaffs_BlockInfo* yaffs_GetBlockInfo(yaffs_Device *dev, int blk) -+{ -+ if(blk < dev->internalStartBlock || blk > dev->internalEndBlock) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs: getBlockInfo block %d is not valid" TENDSTR),blk)); ++ int nDeletedFiles; /* Count of files awaiting deletion;*/ ++ int nUnlinkedFiles; /* Count of unlinked files. */ ++ int nBackgroundDeletions; /* Count of background deletions. */ ++ ++ /* yaffs2 runtime stuff */ ++ unsigned sequenceNumber; /* Sequence number of currently allocating block */ ++ unsigned oldestDirtySequence; ++ ++} yaffs_CheckpointDevice; ++ ++ ++typedef struct { ++ int structType; ++ __u32 magic; ++ __u32 version; ++ __u32 head; ++} yaffs_CheckpointValidity; ++ ++/* Function to manipulate block info */ ++static Y_INLINE yaffs_BlockInfo *yaffs_GetBlockInfo(yaffs_Device * dev, int blk) ++{ ++ if (blk < dev->internalStartBlock || blk > dev->internalEndBlock) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>> yaffs: getBlockInfo block %d is not valid" TENDSTR), ++ blk)); + YBUG(); + } + return &dev->blockInfo[blk - dev->internalStartBlock]; +} + ++/*----------------------- YAFFS Functions -----------------------*/ + -+//////////// YAFFS Functions ////////////////// -+ -+int yaffs_GutsInitialise(yaffs_Device *dev); -+void yaffs_Deinitialise(yaffs_Device *dev); -+ -+int yaffs_GetNumberOfFreeChunks(yaffs_Device *dev); ++int yaffs_GutsInitialise(yaffs_Device * dev); ++void yaffs_Deinitialise(yaffs_Device * dev); + ++int yaffs_GetNumberOfFreeChunks(yaffs_Device * dev); + -+// Rename -+int yaffs_RenameObject(yaffs_Object *oldDir, const YCHAR *oldName, yaffs_Object *newDir, const YCHAR *newName); ++int yaffs_RenameObject(yaffs_Object * oldDir, const YCHAR * oldName, ++ yaffs_Object * newDir, const YCHAR * newName); + -+// generic Object functions -+int yaffs_Unlink(yaffs_Object *dir, const YCHAR *name); -+int yaffs_DeleteFile(yaffs_Object *obj); ++int yaffs_Unlink(yaffs_Object * dir, const YCHAR * name); ++int yaffs_DeleteFile(yaffs_Object * obj); + -+// Object access functions. -+int yaffs_GetObjectName(yaffs_Object *obj,YCHAR *name,int buffSize); -+int yaffs_GetObjectFileLength(yaffs_Object *obj); -+int yaffs_GetObjectInode(yaffs_Object *obj); -+unsigned yaffs_GetObjectType(yaffs_Object *obj); -+int yaffs_GetObjectLinkCount(yaffs_Object *obj); ++int yaffs_GetObjectName(yaffs_Object * obj, YCHAR * name, int buffSize); ++int yaffs_GetObjectFileLength(yaffs_Object * obj); ++int yaffs_GetObjectInode(yaffs_Object * obj); ++unsigned yaffs_GetObjectType(yaffs_Object * obj); ++int yaffs_GetObjectLinkCount(yaffs_Object * obj); + -+// Change inode attributes -+int yaffs_SetAttributes(yaffs_Object *obj, struct iattr *attr); -+int yaffs_GetAttributes(yaffs_Object *obj, struct iattr *attr); ++int yaffs_SetAttributes(yaffs_Object * obj, struct iattr *attr); ++int yaffs_GetAttributes(yaffs_Object * obj, struct iattr *attr); + -+// File operations -+int yaffs_ReadDataFromFile(yaffs_Object *obj, __u8 *buffer, __u32 offset, int nBytes); -+int yaffs_WriteDataToFile(yaffs_Object *obj, const __u8 *buffer, __u32 offset, int nBytes, int writeThrough); -+int yaffs_ResizeFile(yaffs_Object *obj, int newSize); ++/* File operations */ ++int yaffs_ReadDataFromFile(yaffs_Object * obj, __u8 * buffer, loff_t offset, ++ int nBytes); ++int yaffs_WriteDataToFile(yaffs_Object * obj, const __u8 * buffer, loff_t offset, ++ int nBytes, int writeThrough); ++int yaffs_ResizeFile(yaffs_Object * obj, loff_t newSize); + -+yaffs_Object *yaffs_MknodFile(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid); -+int yaffs_FlushFile(yaffs_Object *obj,int updateTime); ++yaffs_Object *yaffs_MknodFile(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid); ++int yaffs_FlushFile(yaffs_Object * obj, int updateTime); + ++/* Flushing and checkpointing */ ++void yaffs_FlushEntireDeviceCache(yaffs_Device *dev); + -+// Directory operations -+yaffs_Object *yaffs_MknodDirectory(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid); -+yaffs_Object *yaffs_FindObjectByName(yaffs_Object *theDir,const YCHAR *name); -+int yaffs_ApplyToDirectoryChildren(yaffs_Object *theDir,int (*fn)(yaffs_Object *)); ++int yaffs_CheckpointSave(yaffs_Device *dev); ++int yaffs_CheckpointRestore(yaffs_Device *dev); + -+yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device *dev,__u32 number); ++/* Directory operations */ ++yaffs_Object *yaffs_MknodDirectory(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid); ++yaffs_Object *yaffs_FindObjectByName(yaffs_Object * theDir, const YCHAR * name); ++int yaffs_ApplyToDirectoryChildren(yaffs_Object * theDir, ++ int (*fn) (yaffs_Object *)); + -+// Link operations -+yaffs_Object *yaffs_Link(yaffs_Object *parent, const YCHAR *name, yaffs_Object *equivalentObject); ++yaffs_Object *yaffs_FindObjectByNumber(yaffs_Device * dev, __u32 number); + -+yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object *obj); ++/* Link operations */ ++yaffs_Object *yaffs_Link(yaffs_Object * parent, const YCHAR * name, ++ yaffs_Object * equivalentObject); + -+// Symlink operations -+yaffs_Object *yaffs_MknodSymLink(yaffs_Object *parent, const YCHAR *name, __u32 mode, __u32 uid, __u32 gid, const YCHAR *alias); -+YCHAR *yaffs_GetSymlinkAlias(yaffs_Object *obj); ++yaffs_Object *yaffs_GetEquivalentObject(yaffs_Object * obj); + -+// Special inodes (fifos, sockets and devices) -+yaffs_Object *yaffs_MknodSpecial(yaffs_Object *parent,const YCHAR *name, __u32 mode, __u32 uid, __u32 gid,__u32 rdev); ++/* Symlink operations */ ++yaffs_Object *yaffs_MknodSymLink(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid, ++ const YCHAR * alias); ++YCHAR *yaffs_GetSymlinkAlias(yaffs_Object * obj); + ++/* Special inodes (fifos, sockets and devices) */ ++yaffs_Object *yaffs_MknodSpecial(yaffs_Object * parent, const YCHAR * name, ++ __u32 mode, __u32 uid, __u32 gid, __u32 rdev); + -+// Special directories -+yaffs_Object *yaffs_Root(yaffs_Device *dev); -+yaffs_Object *yaffs_LostNFound(yaffs_Device *dev); ++/* Special directories */ ++yaffs_Object *yaffs_Root(yaffs_Device * dev); ++yaffs_Object *yaffs_LostNFound(yaffs_Device * dev); + +#ifdef CONFIG_YAFFS_WINCE -+// CONFIG_YAFFS_WINCE special stuff -+void yfsd_WinFileTimeNow(__u32 target[2]); ++/* CONFIG_YAFFS_WINCE special stuff */ ++void yfsd_WinFileTimeNow(__u32 target[2]); +#endif + +#ifdef __KERNEL__ + -+void yaffs_HandleDeferedFree(yaffs_Object *obj); ++void yaffs_HandleDeferedFree(yaffs_Object * obj); +#endif + ++/* Debug dump */ ++int yaffs_DumpObject(yaffs_Object * obj); + ++void yaffs_GutsTest(yaffs_Device * dev); + ++/* A few useful functions */ ++void yaffs_InitialiseTags(yaffs_ExtendedTags * tags); ++void yaffs_DeleteChunk(yaffs_Device * dev, int chunkId, int markNAND, int lyn); ++int yaffs_CheckFF(__u8 * buffer, int nBytes); ++void yaffs_HandleChunkError(yaffs_Device *dev, yaffs_BlockInfo *bi); + -+// Debug dump -+int yaffs_DumpObject(yaffs_Object *obj); -+ -+ -+void yaffs_GutsTest(yaffs_Device *dev); ++#endif +diff -urN linux.old/fs/yaffs2/yaffsinterface.h linux.dev/fs/yaffs2/yaffsinterface.h +--- linux.old/fs/yaffs2/yaffsinterface.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffsinterface.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,23 @@ ++/* ++ * YAFFS: Yet another FFS. A NAND-flash specific file system. ++ * yaffsinterface.h: Interface to the guts of yaffs. ++ * ++ * Copyright (C) 2002 Aleph One Ltd. ++ * for Toby Churchill Ltd and Brightstar Engineering ++ * ++ * Created by Charles Manning <charles@aleph1.co.uk> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License version 2.1 as ++ * published by the Free Software Foundation. ++ * ++ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. ++ * ++ */ + ++#ifndef __YAFFSINTERFACE_H__ ++#define __YAFFSINTERFACE_H__ + -+void yaffs_InitialiseTags(yaffs_ExtendedTags *tags); -+void yaffs_DeleteChunk(yaffs_Device *dev,int chunkId,int markNAND,int lyn); -+int yaffs_CheckFF(__u8 *buffer,int nBytes); ++int yaffs_Initialise(unsigned nBlocks); + +#endif -+ -diff --git a/fs/yaffs/yaffs_mtdif.c b/fs/yaffs/yaffs_mtdif.c -new file mode 100644 -index 0000000..90146fb ---- /dev/null -+++ b/fs/yaffs/yaffs_mtdif.c -@@ -0,0 +1,153 @@ +diff -urN linux.old/fs/yaffs2/yaffs_mtdif2.c linux.dev/fs/yaffs2/yaffs_mtdif2.c +--- linux.old/fs/yaffs2/yaffs_mtdif2.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_mtdif2.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,234 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yaffs_mtdif.c NAND mtd wrapper functions. @@ -9542,153 +11033,232 @@ index 0000000..90146fb + * + */ + -+const char *yaffs_mtdif_c_version = "$Id: yaffs_mtdif.c,v 1.7 2005/08/01 20:52:35 luc Exp $"; -+ ++/* mtd interface for YAFFS2 */ ++ ++const char *yaffs_mtdif2_c_version = ++ "$Id: yaffs_mtdif2.c,v 1.15 2006/11/08 06:24:34 charles Exp $"; ++ +#include "yportenv.h" + -+#ifdef CONFIG_YAFFS_YAFFS1 + -+#include "yaffs_mtdif.h" ++#include "yaffs_mtdif2.h" + +#include "linux/mtd/mtd.h" +#include "linux/types.h" +#include "linux/time.h" -+#include "linux/mtd/nand.h" -+ -+static struct nand_oobinfo yaffs_oobinfo = { -+ .useecc = 1, -+ .eccbytes = 6, -+ .eccpos = {8, 9, 10, 13, 14, 15} -+}; -+ -+static struct nand_oobinfo yaffs_noeccinfo = { -+ .useecc = 0, -+}; + ++#include "yaffs_packedtags2.h" + -+int nandmtd_WriteChunkToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_Spare *spare) ++int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, ++ const yaffs_ExtendedTags * tags) +{ + struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ struct mtd_oob_ops ops; ++#else + size_t dummy; -+ int retval = 0; -+ -+ loff_t addr = ((loff_t)chunkInNAND) * dev->nBytesPerChunk; -+ -+ __u8 *spareAsBytes = (__u8 *)spare; ++#endif ++ int retval = 0; + -+ if(data && spare) -+ { -+ if(dev->useNANDECC) -+ retval = mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo); -+ else -+ retval = mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo); -+ } ++ loff_t addr = ((loff_t) chunkInNAND) * dev->nDataBytesPerChunk; ++ ++ yaffs_PackedTags2 pt; ++ ++ T(YAFFS_TRACE_MTD, ++ (TSTR ++ ("nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p" ++ TENDSTR), chunkInNAND, data, tags)); ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ if (tags) ++ yaffs_PackTags2(&pt, tags); + else -+ { -+ if(data) -+ retval = mtd->write(mtd,addr,dev->nBytesPerChunk,&dummy,data); -+ if(spare) -+ retval = mtd->write_oob(mtd,addr,YAFFS_BYTES_PER_SPARE,&dummy,spareAsBytes); ++ BUG(); /* both tags and data should always be present */ ++ ++ if (data) { ++ ops.mode = MTD_OOB_AUTO; ++ ops.ooblen = sizeof(pt); ++ ops.len = dev->nDataBytesPerChunk; ++ ops.ooboffs = 0; ++ ops.datbuf = (__u8 *)data; ++ ops.oobbuf = (void *)&pt; ++ retval = mtd->write_oob(mtd, addr, &ops); ++ } else ++ BUG(); /* both tags and data should always be present */ ++#else ++ if (tags) { ++ yaffs_PackTags2(&pt, tags); + } + -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; ++ if (data && tags) { ++ if (dev->useNANDECC) ++ retval = ++ mtd->write_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, (__u8 *) & pt, NULL); ++ else ++ retval = ++ mtd->write_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, (__u8 *) & pt, NULL); ++ } else { ++ if (data) ++ retval = ++ mtd->write(mtd, addr, dev->nDataBytesPerChunk, &dummy, ++ data); ++ if (tags) ++ retval = ++ mtd->write_oob(mtd, addr, mtd->oobsize, &dummy, ++ (__u8 *) & pt); ++ ++ } ++#endif ++ ++ if (retval == 0) ++ return YAFFS_OK; ++ else ++ return YAFFS_FAIL; +} + -+int nandmtd_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_Spare *spare) ++int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, ++ __u8 * data, yaffs_ExtendedTags * tags) +{ + struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ struct mtd_oob_ops ops; ++#endif + size_t dummy; -+ int retval = 0; -+ -+ loff_t addr = ((loff_t)chunkInNAND) * dev->nBytesPerChunk; -+ -+ __u8 *spareAsBytes = (__u8 *)spare; -+ -+ if(data && spare) -+ { -+ if(dev->useNANDECC) -+ { // Careful, this call adds 2 ints to the end of the spare data. Calling function should -+ // allocate enough memory for spare, i.e. [YAFFS_BYTES_PER_SPARE+2*sizeof(int)]. -+ retval = mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_oobinfo); -+ } -+ else -+ { -+ retval = mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,spareAsBytes,&yaffs_noeccinfo); -+ } ++ int retval = 0; ++ ++ loff_t addr = ((loff_t) chunkInNAND) * dev->nDataBytesPerChunk; ++ ++ yaffs_PackedTags2 pt; ++ ++ T(YAFFS_TRACE_MTD, ++ (TSTR ++ ("nandmtd2_ReadChunkWithTagsFromNAND chunk %d data %p tags %p" ++ TENDSTR), chunkInNAND, data, tags)); ++ ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ if (data && !tags) ++ retval = mtd->read(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data); ++ else if (tags) { ++ ops.mode = MTD_OOB_AUTO; ++ ops.ooblen = sizeof(pt); ++ ops.len = data ? dev->nDataBytesPerChunk : sizeof(pt); ++ ops.ooboffs = 0; ++ ops.datbuf = data; ++ ops.oobbuf = dev->spareBuffer; ++ retval = mtd->read_oob(mtd, addr, &ops); + } -+ else -+ { -+ if(data) -+ retval = mtd->read(mtd,addr,dev->nBytesPerChunk,&dummy,data); -+ if(spare) -+ retval = mtd->read_oob(mtd,addr,YAFFS_BYTES_PER_SPARE,&dummy,spareAsBytes); ++#else ++ if (data && tags) { ++ if (dev->useNANDECC) { ++ retval = ++ mtd->read_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, dev->spareBuffer, ++ NULL); ++ } else { ++ retval = ++ mtd->read_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, dev->spareBuffer, ++ NULL); ++ } ++ } else { ++ if (data) ++ retval = ++ mtd->read(mtd, addr, dev->nDataBytesPerChunk, &dummy, ++ data); ++ if (tags) ++ retval = ++ mtd->read_oob(mtd, addr, mtd->oobsize, &dummy, ++ dev->spareBuffer); + } ++#endif + -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; -+} ++ memcpy(&pt, dev->spareBuffer, sizeof(pt)); + -+// Callback not needed for NAND -+#if 0 -+static void nandmtd_EraseCallback(struct erase_info *ei) -+{ -+ yaffs_Device *dev = (yaffs_Device *)ei->priv; -+ up(&dev->sem); -+} -+#endif ++ if (tags) ++ yaffs_UnpackTags2(tags, &pt); ++ ++ if(tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR) ++ tags->eccResult = YAFFS_ECC_RESULT_UNFIXED; + ++ if (retval == 0) ++ return YAFFS_OK; ++ else ++ return YAFFS_FAIL; ++} + -+int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber) ++int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo) +{ + struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); -+ __u32 addr = ((loff_t) blockNumber) * dev->nBytesPerChunk * dev->nChunksPerBlock; -+ struct erase_info ei; -+ int retval = 0; -+ -+ ei.mtd = mtd; -+ ei.addr = addr; -+ ei.len = dev->nBytesPerChunk * dev->nChunksPerBlock; -+ ei.time = 1000; -+ ei.retries = 2; -+ ei.callback = NULL; -+ ei.priv = (u_long)dev; -+ -+ // Todo finish off the ei if required -+ -+ sema_init(&dev->sem,0); ++ int retval; ++ T(YAFFS_TRACE_MTD, ++ (TSTR("nandmtd2_MarkNANDBlockBad %d" TENDSTR), blockNo)); + -+ retval = mtd->erase(mtd,&ei); -+ -+ //No need for callback -+ // down(&dev->sem); // Wait for the erasure to complete ++ retval = ++ mtd->block_markbad(mtd, ++ blockNo * dev->nChunksPerBlock * ++ dev->nDataBytesPerChunk); ++ ++ if (retval == 0) ++ return YAFFS_OK; ++ else ++ return YAFFS_FAIL; + -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; +} + -+int nandmtd_InitialiseNAND(yaffs_Device *dev) ++int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, ++ yaffs_BlockState * state, int *sequenceNumber) +{ -+ return YAFFS_OK; -+} ++ struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); ++ int retval; ++ ++ T(YAFFS_TRACE_MTD, ++ (TSTR("nandmtd2_QueryNANDBlock %d" TENDSTR), blockNo)); ++ retval = ++ mtd->block_isbad(mtd, ++ blockNo * dev->nChunksPerBlock * ++ dev->nDataBytesPerChunk); + -+#endif // CONFIG_YAFFS_YAFFS1 ++ if (retval) { ++ T(YAFFS_TRACE_MTD, (TSTR("block is bad" TENDSTR))); ++ ++ *state = YAFFS_BLOCK_STATE_DEAD; ++ *sequenceNumber = 0; ++ } else { ++ yaffs_ExtendedTags t; ++ nandmtd2_ReadChunkWithTagsFromNAND(dev, ++ blockNo * ++ dev->nChunksPerBlock, NULL, ++ &t); + -diff --git a/fs/yaffs/yaffs_mtdif.h b/fs/yaffs/yaffs_mtdif.h -new file mode 100644 -index 0000000..8846828 ---- /dev/null -+++ b/fs/yaffs/yaffs_mtdif.h -@@ -0,0 +1,33 @@ ++ if (t.chunkUsed) { ++ *sequenceNumber = t.sequenceNumber; ++ *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING; ++ } else { ++ *sequenceNumber = 0; ++ *state = YAFFS_BLOCK_STATE_EMPTY; ++ } ++ } ++ T(YAFFS_TRACE_MTD, ++ (TSTR("block is bad seq %d state %d" TENDSTR), *sequenceNumber, ++ *state)); ++ ++ if (retval == 0) ++ return YAFFS_OK; ++ else ++ return YAFFS_FAIL; ++} ++ +diff -urN linux.old/fs/yaffs2/yaffs_mtdif2.h linux.dev/fs/yaffs2/yaffs_mtdif2.h +--- linux.old/fs/yaffs2/yaffs_mtdif2.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_mtdif2.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,29 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. -+ * yaffs_mtdif.h NAND mtd interface wrappers ++ * yaffs_mtdif.c NAND mtd wrapper functions. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering @@ -9696,35 +11266,29 @@ index 0000000..8846828 + * Created by Charles Manning <charles@aleph1.co.uk> + * + * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License version 2.1 as ++ * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * -+ * -+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. -+ * -+ * $Id: yaffs_mtdif.h,v 1.2 2005/07/19 20:41:59 charles Exp $ + */ + -+#ifndef __YAFFS_MTDIF_H__ -+#define __YAFFS_MTDIF_H__ ++#ifndef __YAFFS_MTDIF2_H__ ++#define __YAFFS_MTDIF2_H__ + +#include "yaffs_guts.h" ++int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, ++ const yaffs_ExtendedTags * tags); ++int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, ++ __u8 * data, yaffs_ExtendedTags * tags); ++int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo); ++int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, ++ yaffs_BlockState * state, int *sequenceNumber); + -+int nandmtd_WriteChunkToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_Spare *spare); -+int nandmtd_ReadChunkFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_Spare *spare); -+int nandmtd_EraseBlockInNAND(yaffs_Device *dev, int blockNumber); -+int nandmtd_InitialiseNAND(yaffs_Device *dev); +#endif -+ -+ -+ -+ -diff --git a/fs/yaffs/yaffs_mtdif2.c b/fs/yaffs/yaffs_mtdif2.c -new file mode 100644 -index 0000000..0c4cc39 ---- /dev/null -+++ b/fs/yaffs/yaffs_mtdif2.c -@@ -0,0 +1,177 @@ +diff -urN linux.old/fs/yaffs2/yaffs_mtdif.c linux.dev/fs/yaffs2/yaffs_mtdif.c +--- linux.old/fs/yaffs2/yaffs_mtdif.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_mtdif.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,243 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yaffs_mtdif.c NAND mtd wrapper functions. @@ -9740,177 +11304,275 @@ index 0000000..0c4cc39 + * + */ + -+// mtd interface for YAFFS2 ++const char *yaffs_mtdif_c_version = ++ "$Id: yaffs_mtdif.c,v 1.17 2006/11/29 20:21:12 charles Exp $"; + -+const char *yaffs_mtdif2_c_version = "$Id: yaffs_mtdif2.c,v 1.6 2005/08/01 20:52:35 luc Exp $"; -+ +#include "yportenv.h" + -+#ifdef CONFIG_YAFFS_YAFFS2 + -+#include "yaffs_mtdif2.h" ++#include "yaffs_mtdif.h" + +#include "linux/mtd/mtd.h" +#include "linux/types.h" +#include "linux/time.h" ++#include "linux/mtd/nand.h" + -+#include "yaffs_packedtags2.h" ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) ++static struct nand_oobinfo yaffs_oobinfo = { ++ .useecc = 1, ++ .eccbytes = 6, ++ .eccpos = {8, 9, 10, 13, 14, 15} ++}; ++ ++static struct nand_oobinfo yaffs_noeccinfo = { ++ .useecc = 0, ++}; ++#endif + ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++static inline void translate_spare2oob(const yaffs_Spare *spare, __u8 *oob) ++{ ++ oob[0] = spare->tagByte0; ++ oob[1] = spare->tagByte1; ++ oob[2] = spare->tagByte2; ++ oob[3] = spare->tagByte3; ++ oob[4] = spare->tagByte4; ++ oob[5] = spare->tagByte5 & 0x3f; ++ oob[5] |= spare->blockStatus == 'Y' ? 0: 0x80; ++ oob[5] |= spare->pageStatus == 0 ? 0: 0x40; ++ oob[6] = spare->tagByte6; ++ oob[7] = spare->tagByte7; ++} + ++static inline void translate_oob2spare(yaffs_Spare *spare, __u8 *oob) ++{ ++ struct yaffs_NANDSpare *nspare = (struct yaffs_NANDSpare *)spare; ++ spare->tagByte0 = oob[0]; ++ spare->tagByte1 = oob[1]; ++ spare->tagByte2 = oob[2]; ++ spare->tagByte3 = oob[3]; ++ spare->tagByte4 = oob[4]; ++ spare->tagByte5 = oob[5] == 0xff ? 0xff : oob[5] & 0x3f; ++ spare->blockStatus = oob[5] & 0x80 ? 0xff : 'Y'; ++ spare->pageStatus = oob[5] & 0x40 ? 0xff : 0; ++ spare->ecc1[0] = spare->ecc1[1] = spare->ecc1[2] = 0xff; ++ spare->tagByte6 = oob[6]; ++ spare->tagByte7 = oob[7]; ++ spare->ecc2[0] = spare->ecc2[1] = spare->ecc2[2] = 0xff; + ++ nspare->eccres1 = nspare->eccres2 = 0; /* FIXME */ ++} ++#endif + -+int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *tags) ++int nandmtd_WriteChunkToNAND(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, const yaffs_Spare * spare) +{ + struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ struct mtd_oob_ops ops; ++#endif + size_t dummy; + int retval = 0; + -+ -+ loff_t addr = ((loff_t)chunkInNAND) * dev->nBytesPerChunk; -+ -+ yaffs_PackedTags2 pt; -+ -+ T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_WriteChunkWithTagsToNAND chunk %d data %p tags %p" TENDSTR),chunkInNAND,data,tags)); -+ -+ if(tags) -+ { -+ yaffs_PackTags2(&pt,tags); ++ loff_t addr = ((loff_t) chunkInNAND) * dev->nDataBytesPerChunk; ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ __u8 spareAsBytes[8]; /* OOB */ ++ ++ if (data && !spare) ++ retval = mtd->write(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data); ++ else if (spare) { ++ if (dev->useNANDECC) { ++ translate_spare2oob(spare, spareAsBytes); ++ ops.mode = MTD_OOB_AUTO; ++ ops.ooblen = 8; /* temp hack */ ++ } else { ++ ops.mode = MTD_OOB_RAW; ++ ops.ooblen = YAFFS_BYTES_PER_SPARE; ++ } ++ ops.len = data ? dev->nDataBytesPerChunk : ops.ooblen; ++ ops.datbuf = (u8 *)data; ++ ops.ooboffs = 0; ++ ops.oobbuf = spareAsBytes; ++ retval = mtd->write_oob(mtd, addr, &ops); + } -+ -+ if(data && tags) -+ { -+ if(dev->useNANDECC) -+ retval = mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,(__u8 *)&pt,NULL); ++#else ++ __u8 *spareAsBytes = (__u8 *) spare; ++ ++ if (data && spare) { ++ if (dev->useNANDECC) ++ retval = ++ mtd->write_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, spareAsBytes, ++ &yaffs_oobinfo); + else -+ retval = mtd->write_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,(__u8 *)&pt,NULL); -+ } -+ else -+ { -+ if(data) -+ retval = mtd->write(mtd,addr,dev->nBytesPerChunk,&dummy,data); -+ if(tags) -+ retval = mtd->write_oob(mtd,addr,mtd->oobsize,&dummy,(__u8 *)&pt); -+ ++ retval = ++ mtd->write_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, spareAsBytes, ++ &yaffs_noeccinfo); ++ } else { ++ if (data) ++ retval = ++ mtd->write(mtd, addr, dev->nDataBytesPerChunk, &dummy, ++ data); ++ if (spare) ++ retval = ++ mtd->write_oob(mtd, addr, YAFFS_BYTES_PER_SPARE, ++ &dummy, spareAsBytes); + } ++#endif + -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; ++ if (retval == 0) ++ return YAFFS_OK; ++ else ++ return YAFFS_FAIL; +} + -+int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags) ++int nandmtd_ReadChunkFromNAND(yaffs_Device * dev, int chunkInNAND, __u8 * data, ++ yaffs_Spare * spare) +{ + struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ struct mtd_oob_ops ops; ++#endif + size_t dummy; -+ int retval = 0; -+ -+ -+ loff_t addr = ((loff_t)chunkInNAND) * dev->nBytesPerChunk; -+ -+ yaffs_PackedTags2 pt; -+ -+ T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_ReadChunkWithTagsToNAND chunk %d data %p tags %p" TENDSTR),chunkInNAND,data,tags)); ++ int retval = 0; + -+ if(data && tags) -+ { -+ if(dev->useNANDECC) -+ { -+ retval = mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,dev->spareBuffer,NULL); -+ } -+ else -+ { -+ retval = mtd->read_ecc(mtd,addr,dev->nBytesPerChunk,&dummy,data,dev->spareBuffer,NULL); -+ } -+ memcpy(&pt,dev->spareBuffer,sizeof(pt)); -+ } -+ else -+ { -+ if(data) -+ retval = mtd->read(mtd,addr,dev->nBytesPerChunk,&dummy,data); -+ if(tags) { -+ retval = mtd->read_oob(mtd,addr,mtd->oobsize,&dummy,dev->spareBuffer); -+ memcpy(&pt, mtd->oobinfo.oobfree[0][0] + (char *)dev->spareBuffer, sizeof(pt)); ++ loff_t addr = ((loff_t) chunkInNAND) * dev->nDataBytesPerChunk; ++#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17)) ++ __u8 spareAsBytes[8]; /* OOB */ ++ ++ if (data && !spare) ++ retval = mtd->read(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data); ++ else if (spare) { ++ if (dev->useNANDECC) { ++ ops.mode = MTD_OOB_AUTO; ++ ops.ooblen = 8; /* temp hack */ ++ } else { ++ ops.mode = MTD_OOB_RAW; ++ ops.ooblen = YAFFS_BYTES_PER_SPARE; ++ } ++ ops.len = data ? dev->nDataBytesPerChunk : ops.ooblen; ++ ops.datbuf = data; ++ ops.ooboffs = 0; ++ ops.oobbuf = spareAsBytes; ++ retval = mtd->read_oob(mtd, addr, &ops); ++ if (dev->useNANDECC) ++ translate_oob2spare(spare, spareAsBytes); + } ++#else ++ __u8 *spareAsBytes = (__u8 *) spare; ++ ++ if (data && spare) { ++ if (dev->useNANDECC) { ++ /* Careful, this call adds 2 ints */ ++ /* to the end of the spare data. Calling function */ ++ /* should allocate enough memory for spare, */ ++ /* i.e. [YAFFS_BYTES_PER_SPARE+2*sizeof(int)]. */ ++ retval = ++ mtd->read_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, spareAsBytes, ++ &yaffs_oobinfo); ++ } else { ++ retval = ++ mtd->read_ecc(mtd, addr, dev->nDataBytesPerChunk, ++ &dummy, data, spareAsBytes, ++ &yaffs_noeccinfo); ++ } ++ } else { ++ if (data) ++ retval = ++ mtd->read(mtd, addr, dev->nDataBytesPerChunk, &dummy, ++ data); ++ if (spare) ++ retval = ++ mtd->read_oob(mtd, addr, YAFFS_BYTES_PER_SPARE, ++ &dummy, spareAsBytes); + } ++#endif + -+ if(tags) -+ yaffs_UnpackTags2(tags,&pt); -+ -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; ++ if (retval == 0) ++ return YAFFS_OK; ++ else ++ return YAFFS_FAIL; +} + -+int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo) ++int nandmtd_EraseBlockInNAND(yaffs_Device * dev, int blockNumber) +{ + struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); -+ int retval; -+ T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_MarkNANDBlockBad %d" TENDSTR),blockNo)); -+ -+ -+ retval = mtd->block_markbad(mtd,blockNo * dev->nChunksPerBlock * dev->nBytesPerChunk); ++ __u32 addr = ++ ((loff_t) blockNumber) * dev->nDataBytesPerChunk ++ * dev->nChunksPerBlock; ++ struct erase_info ei; ++ int retval = 0; + -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; ++ ei.mtd = mtd; ++ ei.addr = addr; ++ ei.len = dev->nDataBytesPerChunk * dev->nChunksPerBlock; ++ ei.time = 1000; ++ ei.retries = 2; ++ ei.callback = NULL; ++ ei.priv = (u_long) dev; + -+} ++ /* Todo finish off the ei if required */ + -+int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber) -+{ -+ struct mtd_info *mtd = (struct mtd_info *)(dev->genericDevice); -+ int retval; -+ -+ T(YAFFS_TRACE_MTD,(TSTR("nandmtd2_QueryNANDBlock %d" TENDSTR),blockNo)); -+ retval = mtd->block_isbad(mtd,blockNo* dev->nChunksPerBlock * dev->nBytesPerChunk); -+ -+ if(retval) -+ { -+ T(YAFFS_TRACE_MTD,(TSTR("block is bad" TENDSTR))); -+ -+ *state = YAFFS_BLOCK_STATE_DEAD; -+ *sequenceNumber = 0; -+ } ++ sema_init(&dev->sem, 0); ++ ++ retval = mtd->erase(mtd, &ei); ++ ++ if (retval == 0) ++ return YAFFS_OK; + else -+ { -+ yaffs_ExtendedTags t; -+ nandmtd2_ReadChunkWithTagsFromNAND(dev,blockNo * dev->nChunksPerBlock,NULL, &t); -+ -+ if(t.chunkUsed) -+ { -+ *sequenceNumber = t.sequenceNumber; -+ *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING; -+ } -+ else -+ { -+ *sequenceNumber = 0; -+ *state = YAFFS_BLOCK_STATE_EMPTY; -+ } -+ } -+ T(YAFFS_TRACE_MTD,(TSTR("block is bad seq %d state %d" TENDSTR), *sequenceNumber,*state)); ++ return YAFFS_FAIL; ++} + -+ if (retval == 0) -+ return YAFFS_OK; -+ else -+ return YAFFS_FAIL; ++int nandmtd_InitialiseNAND(yaffs_Device * dev) ++{ ++ return YAFFS_OK; +} + -+#endif +diff -urN linux.old/fs/yaffs2/yaffs_mtdif.h linux.dev/fs/yaffs2/yaffs_mtdif.h +--- linux.old/fs/yaffs2/yaffs_mtdif.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_mtdif.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,31 @@ ++/* ++ * YAFFS: Yet another FFS. A NAND-flash specific file system. ++ * yaffs_mtdif.h NAND mtd interface wrappers ++ * ++ * Copyright (C) 2002 Aleph One Ltd. ++ * for Toby Churchill Ltd and Brightstar Engineering ++ * ++ * Created by Charles Manning <charles@aleph1.co.uk> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License version 2.1 as ++ * published by the Free Software Foundation. ++ * ++ * ++ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. ++ * ++ * $Id: yaffs_mtdif.h,v 1.3 2005/08/11 01:07:43 marty Exp $ ++ */ + ++#ifndef __YAFFS_MTDIF_H__ ++#define __YAFFS_MTDIF_H__ + ++#include "yaffs_guts.h" + -diff --git a/fs/yaffs/yaffs_mtdif2.h b/fs/yaffs/yaffs_mtdif2.h -new file mode 100644 -index 0000000..5b308ee ---- /dev/null -+++ b/fs/yaffs/yaffs_mtdif2.h -@@ -0,0 +1,27 @@ ++int nandmtd_WriteChunkToNAND(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, const yaffs_Spare * spare); ++int nandmtd_ReadChunkFromNAND(yaffs_Device * dev, int chunkInNAND, __u8 * data, ++ yaffs_Spare * spare); ++int nandmtd_EraseBlockInNAND(yaffs_Device * dev, int blockNumber); ++int nandmtd_InitialiseNAND(yaffs_Device * dev); ++#endif +diff -urN linux.old/fs/yaffs2/yaffs_nand.c linux.dev/fs/yaffs2/yaffs_nand.c +--- linux.old/fs/yaffs2/yaffs_nand.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_nand.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,135 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. -+ * yaffs_mtdif.c NAND mtd wrapper functions. + * + * Copyright (C) 2002 Aleph One Ltd. + * for Toby Churchill Ltd and Brightstar Engineering @@ -9922,25 +11584,132 @@ index 0000000..5b308ee + * published by the Free Software Foundation. + * + */ ++ ++const char *yaffs_nand_c_version = ++ "$Id: yaffs_nand.c,v 1.5 2006/11/08 09:52:12 charles Exp $"; + ++#include "yaffs_nand.h" ++#include "yaffs_tagscompat.h" ++#include "yaffs_tagsvalidity.h" + -+#ifndef __YAFFS_MTDIF2_H__ -+#define __YAFFS_MTDIF2_H__ + ++int yaffs_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, ++ __u8 * buffer, ++ yaffs_ExtendedTags * tags) ++{ ++ int result; ++ yaffs_ExtendedTags localTags; ++ ++ int realignedChunkInNAND = chunkInNAND - dev->chunkOffset; ++ ++ /* If there are no tags provided, use local tags to get prioritised gc working */ ++ if(!tags) ++ tags = &localTags; + -+#include "yaffs_guts.h" -+int nandmtd2_WriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *tags); -+int nandmtd2_ReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags); -+int nandmtd2_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo); -+int nandmtd2_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber); -+ -+#endif -diff --git a/fs/yaffs/yaffs_nandemul2k.h b/fs/yaffs/yaffs_nandemul2k.h -new file mode 100644 -index 0000000..b35d474 ---- /dev/null -+++ b/fs/yaffs/yaffs_nandemul2k.h -@@ -0,0 +1,38 @@ ++ if (dev->readChunkWithTagsFromNAND) ++ result = dev->readChunkWithTagsFromNAND(dev, realignedChunkInNAND, buffer, ++ tags); ++ else ++ result = yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(dev, ++ realignedChunkInNAND, ++ buffer, ++ tags); ++ if(tags && ++ tags->eccResult > YAFFS_ECC_RESULT_NO_ERROR){ ++ ++ yaffs_BlockInfo *bi = yaffs_GetBlockInfo(dev, chunkInNAND/dev->nChunksPerBlock); ++ yaffs_HandleChunkError(dev,bi); ++ } ++ ++ return result; ++} ++ ++int yaffs_WriteChunkWithTagsToNAND(yaffs_Device * dev, ++ int chunkInNAND, ++ const __u8 * buffer, ++ yaffs_ExtendedTags * tags) ++{ ++ chunkInNAND -= dev->chunkOffset; ++ ++ ++ if (tags) { ++ tags->sequenceNumber = dev->sequenceNumber; ++ tags->chunkUsed = 1; ++ if (!yaffs_ValidateTags(tags)) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("Writing uninitialised tags" TENDSTR))); ++ YBUG(); ++ } ++ T(YAFFS_TRACE_WRITE, ++ (TSTR("Writing chunk %d tags %d %d" TENDSTR), chunkInNAND, ++ tags->objectId, tags->chunkId)); ++ } else { ++ T(YAFFS_TRACE_ERROR, (TSTR("Writing with no tags" TENDSTR))); ++ YBUG(); ++ } ++ ++ if (dev->writeChunkWithTagsToNAND) ++ return dev->writeChunkWithTagsToNAND(dev, chunkInNAND, buffer, ++ tags); ++ else ++ return yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(dev, ++ chunkInNAND, ++ buffer, ++ tags); ++} ++ ++int yaffs_MarkBlockBad(yaffs_Device * dev, int blockNo) ++{ ++ blockNo -= dev->blockOffset; ++ ++; ++ if (dev->markNANDBlockBad) ++ return dev->markNANDBlockBad(dev, blockNo); ++ else ++ return yaffs_TagsCompatabilityMarkNANDBlockBad(dev, blockNo); ++} ++ ++int yaffs_QueryInitialBlockState(yaffs_Device * dev, ++ int blockNo, ++ yaffs_BlockState * state, ++ unsigned *sequenceNumber) ++{ ++ blockNo -= dev->blockOffset; ++ ++ if (dev->queryNANDBlock) ++ return dev->queryNANDBlock(dev, blockNo, state, sequenceNumber); ++ else ++ return yaffs_TagsCompatabilityQueryNANDBlock(dev, blockNo, ++ state, ++ sequenceNumber); ++} ++ ++ ++int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev, ++ int blockInNAND) ++{ ++ int result; ++ ++ blockInNAND -= dev->blockOffset; ++ ++ ++ dev->nBlockErasures++; ++ result = dev->eraseBlockInNAND(dev, blockInNAND); ++ ++ return result; ++} ++ ++int yaffs_InitialiseNAND(struct yaffs_DeviceStruct *dev) ++{ ++ return dev->initialiseNAND(dev); ++} ++ ++ ++ +diff -urN linux.old/fs/yaffs2/yaffs_nandemul2k.h linux.dev/fs/yaffs2/yaffs_nandemul2k.h +--- linux.old/fs/yaffs2/yaffs_nandemul2k.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_nandemul2k.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,42 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * @@ -9958,37 +11727,86 @@ index 0000000..b35d474 + * + * yaffs_nandemul2k.h: Interface to emulated NAND functions (2k page size) + * -+ * $Id: yaffs_nandemul2k.h,v 1.1 2004/12/17 04:39:04 charles Exp $ ++ * $Id: yaffs_nandemul2k.h,v 1.2 2005/08/11 02:37:49 marty Exp $ + */ -+ ++ +#ifndef __YAFFS_NANDEMUL2K_H__ +#define __YAFFS_NANDEMUL2K_H__ + -+#include "yaffs_guts.h" -+ -+ -+int nandemul2k_WriteChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,int chunkInNAND, const __u8 *data, yaffs_ExtendedTags *tags); -+int nandemul2k_ReadChunkWithTagsFromNAND(struct yaffs_DeviceStruct *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags); ++#include "yaffs_guts.h" ++ ++int nandemul2k_WriteChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev, ++ int chunkInNAND, const __u8 * data, ++ yaffs_ExtendedTags * tags); ++int nandemul2k_ReadChunkWithTagsFromNAND(struct yaffs_DeviceStruct *dev, ++ int chunkInNAND, __u8 * data, ++ yaffs_ExtendedTags * tags); +int nandemul2k_MarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo); -+int nandemul2k_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber); -+int nandemul2k_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,int blockInNAND); ++int nandemul2k_QueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, ++ yaffs_BlockState * state, int *sequenceNumber); ++int nandemul2k_EraseBlockInNAND(struct yaffs_DeviceStruct *dev, ++ int blockInNAND); +int nandemul2k_InitialiseNAND(struct yaffs_DeviceStruct *dev); +int nandemul2k_GetBytesPerChunk(void); +int nandemul2k_GetChunksPerBlock(void); +int nandemul2k_GetNumberOfBlocks(void); + +#endif +diff -urN linux.old/fs/yaffs2/yaffs_nand.h linux.dev/fs/yaffs2/yaffs_nand.h +--- linux.old/fs/yaffs2/yaffs_nand.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_nand.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,43 @@ ++/* ++ * YAFFS: Yet another FFS. A NAND-flash specific file system. ++ * ++ * Copyright (C) 2002 Aleph One Ltd. ++ * for Toby Churchill Ltd and Brightstar Engineering ++ * ++ * Created by Charles Manning <charles@aleph1.co.uk> ++ * ++ * 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. ++ * ++ */ + -diff --git a/fs/yaffs/yaffs_packedtags1.c b/fs/yaffs/yaffs_packedtags1.c -new file mode 100644 -index 0000000..bab338f ---- /dev/null -+++ b/fs/yaffs/yaffs_packedtags1.c -@@ -0,0 +1,42 @@ ++#ifndef __YAFFS_NAND_H__ ++#define __YAFFS_NAND_H__ ++#include "yaffs_guts.h" ++ ++ ++ ++int yaffs_ReadChunkWithTagsFromNAND(yaffs_Device * dev, int chunkInNAND, ++ __u8 * buffer, ++ yaffs_ExtendedTags * tags); ++ ++int yaffs_WriteChunkWithTagsToNAND(yaffs_Device * dev, ++ int chunkInNAND, ++ const __u8 * buffer, ++ yaffs_ExtendedTags * tags); ++ ++int yaffs_MarkBlockBad(yaffs_Device * dev, int blockNo); ++ ++int yaffs_QueryInitialBlockState(yaffs_Device * dev, ++ int blockNo, ++ yaffs_BlockState * state, ++ unsigned *sequenceNumber); ++ ++int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev, ++ int blockInNAND); ++ ++int yaffs_InitialiseNAND(struct yaffs_DeviceStruct *dev); ++ ++#endif ++ +diff -urN linux.old/fs/yaffs2/yaffs_packedtags1.c linux.dev/fs/yaffs2/yaffs_packedtags1.c +--- linux.old/fs/yaffs2/yaffs_packedtags1.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_packedtags1.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,39 @@ +#include "yaffs_packedtags1.h" +#include "yportenv.h" + -+void yaffs_PackTags1(yaffs_PackedTags1 *pt, const yaffs_ExtendedTags *t) ++void yaffs_PackTags1(yaffs_PackedTags1 * pt, const yaffs_ExtendedTags * t) +{ + pt->chunkId = t->chunkId; + pt->serialNumber = t->serialNumber; @@ -9998,75 +11816,62 @@ index 0000000..bab338f + pt->deleted = (t->chunkDeleted) ? 0 : 1; + pt->unusedStuff = 0; + pt->shouldBeFF = 0xFFFFFFFF; -+ ++ +} + -+void yaffs_UnpackTags1(yaffs_ExtendedTags *t, const yaffs_PackedTags1 *pt) ++void yaffs_UnpackTags1(yaffs_ExtendedTags * t, const yaffs_PackedTags1 * pt) +{ -+ static const __u8 allFF[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,0xff, 0xff, 0xff, 0xff}; -+ -+ if(memcmp(allFF,pt,sizeof(yaffs_PackedTags1))) -+ { ++ static const __u8 allFF[] = ++ { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, ++0xff }; ++ ++ if (memcmp(allFF, pt, sizeof(yaffs_PackedTags1))) { + t->blockBad = 0; -+ if(pt->shouldBeFF != 0xFFFFFFFF) -+ { ++ if (pt->shouldBeFF != 0xFFFFFFFF) { + t->blockBad = 1; + } + t->chunkUsed = 1; + t->objectId = pt->objectId; + t->chunkId = pt->chunkId; + t->byteCount = pt->byteCount; -+ t->eccResult = YAFFS_ECC_RESULT_NO_ERROR; ++ t->eccResult = YAFFS_ECC_RESULT_NO_ERROR; + t->chunkDeleted = (pt->deleted) ? 0 : 1; + t->serialNumber = pt->serialNumber; -+ } -+ else -+ { -+ memset(t,0,sizeof(yaffs_ExtendedTags)); -+ ++ } else { ++ memset(t, 0, sizeof(yaffs_ExtendedTags)); ++ + } +} -+ -diff --git a/fs/yaffs/yaffs_packedtags1.h b/fs/yaffs/yaffs_packedtags1.h -new file mode 100644 -index 0000000..0f76615 ---- /dev/null -+++ b/fs/yaffs/yaffs_packedtags1.h -@@ -0,0 +1,28 @@ +diff -urN linux.old/fs/yaffs2/yaffs_packedtags1.h linux.dev/fs/yaffs2/yaffs_packedtags1.h +--- linux.old/fs/yaffs2/yaffs_packedtags1.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_packedtags1.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,22 @@ +// This is used to pack YAFFS1 tags, not YAFFS2 tags. + +#ifndef __YAFFS_PACKEDTAGS1_H__ +#define __YAFFS_PACKEDTAGS1_H__ + -+ +#include "yaffs_guts.h" + -+typedef struct -+{ -+ unsigned chunkId:20; -+ unsigned serialNumber:2; -+ unsigned byteCount:10; -+ unsigned objectId:18; -+ unsigned ecc:12; -+ unsigned deleted:1; -+ unsigned unusedStuff:1; -+ unsigned shouldBeFF; ++typedef struct { ++ unsigned chunkId:20; ++ unsigned serialNumber:2; ++ unsigned byteCount:10; ++ unsigned objectId:18; ++ unsigned ecc:12; ++ unsigned deleted:1; ++ unsigned unusedStuff:1; ++ unsigned shouldBeFF; + +} yaffs_PackedTags1; + -+ -+ -+void yaffs_PackTags1(yaffs_PackedTags1 *pt, const yaffs_ExtendedTags *t); -+void yaffs_UnpackTags1(yaffs_ExtendedTags *t, const yaffs_PackedTags1 *pt); ++void yaffs_PackTags1(yaffs_PackedTags1 * pt, const yaffs_ExtendedTags * t); ++void yaffs_UnpackTags1(yaffs_ExtendedTags * t, const yaffs_PackedTags1 * pt); +#endif -+ -+ -diff --git a/fs/yaffs/yaffs_packedtags2.c b/fs/yaffs/yaffs_packedtags2.c -new file mode 100644 -index 0000000..f4de18d ---- /dev/null -+++ b/fs/yaffs/yaffs_packedtags2.c -@@ -0,0 +1,164 @@ +diff -urN linux.old/fs/yaffs2/yaffs_packedtags2.c linux.dev/fs/yaffs2/yaffs_packedtags2.c +--- linux.old/fs/yaffs2/yaffs_packedtags2.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_packedtags2.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,184 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * @@ -10081,20 +11886,21 @@ index 0000000..f4de18d + * modify it under the terms of the GNU Lesser General Public License + * version 2.1 as published by the Free Software Foundation. + */ -+ ++ +#include "yaffs_packedtags2.h" +#include "yportenv.h" +#include "yaffs_tagsvalidity.h" + ++/* This code packs a set of extended tags into a binary structure for ++ * NAND storage ++ */ + ++/* Some of the information is "extra" struff which can be packed in to ++ * speed scanning ++ * This is defined by having the EXTRA_HEADER_INFO_FLAG set. ++ */ + -+// This code packs a set of extended tags into a binary structure for NAND storage -+ -+// Some of the information is "extra" struff which can be packed in to speed scanning -+// This is defined by having the EXTRA_HEADER_INFO_FLAG set. -+ -+ -+// Extra flags applied to chunkId ++/* Extra flags applied to chunkId */ + +#define EXTRA_HEADER_INFO_FLAG 0x80000000 +#define EXTRA_SHRINK_FLAG 0x40000000 @@ -10103,125 +11909,145 @@ index 0000000..f4de18d + +#define ALL_EXTRA_FLAGS 0xF0000000 + -+ -+ -+// Also, the top 4 bits of the object Id are set to the object type. ++/* Also, the top 4 bits of the object Id are set to the object type. */ +#define EXTRA_OBJECT_TYPE_SHIFT (28) +#define EXTRA_OBJECT_TYPE_MASK ((0x0F) << EXTRA_OBJECT_TYPE_SHIFT) + -+ -+ -+static void yaffs_DumpPackedTags2(const yaffs_PackedTags2 *pt) ++static void yaffs_DumpPackedTags2(const yaffs_PackedTags2 * pt) +{ -+ T(YAFFS_TRACE_MTD,(TSTR("packed tags obj %d chunk %d byte %d seq %d"TENDSTR),pt->t.objectId,pt->t.chunkId,pt->t.byteCount,pt->t.sequenceNumber)); ++ T(YAFFS_TRACE_MTD, ++ (TSTR("packed tags obj %d chunk %d byte %d seq %d" TENDSTR), ++ pt->t.objectId, pt->t.chunkId, pt->t.byteCount, ++ pt->t.sequenceNumber)); +} + -+static void yaffs_DumpTags2(const yaffs_ExtendedTags *t) ++static void yaffs_DumpTags2(const yaffs_ExtendedTags * t) +{ -+ T(YAFFS_TRACE_MTD,(TSTR("ext.tags eccres %d blkbad %d chused %d obj %d chunk%d byte %d del %d ser %d seq %d"TENDSTR), -+ t->eccResult, t->blockBad, t->chunkUsed, t->objectId, t->chunkId, t->byteCount, t->chunkDeleted, t->serialNumber, t->sequenceNumber)); -+ ++ T(YAFFS_TRACE_MTD, ++ (TSTR ++ ("ext.tags eccres %d blkbad %d chused %d obj %d chunk%d byte " ++ "%d del %d ser %d seq %d" ++ TENDSTR), t->eccResult, t->blockBad, t->chunkUsed, t->objectId, ++ t->chunkId, t->byteCount, t->chunkDeleted, t->serialNumber, ++ t->sequenceNumber)); ++ +} + -+void yaffs_PackTags2(yaffs_PackedTags2 *pt, const yaffs_ExtendedTags *t) ++void yaffs_PackTags2(yaffs_PackedTags2 * pt, const yaffs_ExtendedTags * t) +{ + pt->t.chunkId = t->chunkId; + pt->t.sequenceNumber = t->sequenceNumber; + pt->t.byteCount = t->byteCount; + pt->t.objectId = t->objectId; -+ -+ if(t->chunkId == 0 && t->extraHeaderInfoAvailable) -+ { -+ // Store the extra header info instead -+ pt->t.chunkId = EXTRA_HEADER_INFO_FLAG | t->extraParentObjectId; // We save the parent object in the chunkId -+ if(t->extraIsShrinkHeader) -+ { -+ pt->t.chunkId |= EXTRA_SHRINK_FLAG; ++ ++ if (t->chunkId == 0 && t->extraHeaderInfoAvailable) { ++ /* Store the extra header info instead */ ++ /* We save the parent object in the chunkId */ ++ pt->t.chunkId = EXTRA_HEADER_INFO_FLAG ++ | t->extraParentObjectId; ++ if (t->extraIsShrinkHeader) { ++ pt->t.chunkId |= EXTRA_SHRINK_FLAG; + } -+ if(t->extraShadows) -+ { -+ pt->t.chunkId |= EXTRA_SHADOWS_FLAG; ++ if (t->extraShadows) { ++ pt->t.chunkId |= EXTRA_SHADOWS_FLAG; + } -+ ++ + pt->t.objectId &= ~EXTRA_OBJECT_TYPE_MASK; -+ pt->t.objectId |= (t->extraObjectType << EXTRA_OBJECT_TYPE_SHIFT); -+ -+ if(t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) -+ { -+ pt->t.byteCount = t->extraEquivalentObjectId; -+ } -+ else if(t->extraObjectType == YAFFS_OBJECT_TYPE_FILE) -+ { -+ pt->t.byteCount = t->extraFileLength; -+ } -+ else -+ { -+ pt->t.byteCount = 0; ++ pt->t.objectId |= ++ (t->extraObjectType << EXTRA_OBJECT_TYPE_SHIFT); ++ ++ if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) { ++ pt->t.byteCount = t->extraEquivalentObjectId; ++ } else if (t->extraObjectType == YAFFS_OBJECT_TYPE_FILE) { ++ pt->t.byteCount = t->extraFileLength; ++ } else { ++ pt->t.byteCount = 0; + } + } -+ ++ + yaffs_DumpPackedTags2(pt); + yaffs_DumpTags2(t); -+ ++ +#ifndef YAFFS_IGNORE_TAGS_ECC -+ { -+ yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc); ++ { ++ yaffs_ECCCalculateOther((unsigned char *)&pt->t, ++ sizeof(yaffs_PackedTags2TagsPart), ++ &pt->ecc); + } +#endif +} + -+void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt) ++void yaffs_UnpackTags2(yaffs_ExtendedTags * t, yaffs_PackedTags2 * pt) +{ + -+ -+ memset(t,0,sizeof(yaffs_ExtendedTags)); -+ ++ memset(t, 0, sizeof(yaffs_ExtendedTags)); ++ + yaffs_InitialiseTags(t); -+ -+ if(pt->t.sequenceNumber != 0xFFFFFFFF) -+ { -+ // Page is in use ++ ++ if (pt->t.sequenceNumber != 0xFFFFFFFF) { ++ /* Page is in use */ +#ifdef YAFFS_IGNORE_TAGS_ECC + { -+ t->eccResult = 0; ++ t->eccResult = YAFFS_ECC_RESULT_NO_ERROR; + } +#else + { + yaffs_ECCOther ecc; -+ yaffs_ECCCalculateOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&ecc); -+ t->eccResult = yaffs_ECCCorrectOther((unsigned char *)&pt->t,sizeof(yaffs_PackedTags2TagsPart),&pt->ecc,&ecc); ++ int result; ++ yaffs_ECCCalculateOther((unsigned char *)&pt->t, ++ sizeof ++ (yaffs_PackedTags2TagsPart), ++ &ecc); ++ result = ++ yaffs_ECCCorrectOther((unsigned char *)&pt->t, ++ sizeof ++ (yaffs_PackedTags2TagsPart), ++ &pt->ecc, &ecc); ++ switch(result){ ++ case 0: ++ t->eccResult = YAFFS_ECC_RESULT_NO_ERROR; ++ break; ++ case 1: ++ t->eccResult = YAFFS_ECC_RESULT_FIXED; ++ break; ++ case -1: ++ t->eccResult = YAFFS_ECC_RESULT_UNFIXED; ++ break; ++ default: ++ t->eccResult = YAFFS_ECC_RESULT_UNKNOWN; ++ } + } +#endif + t->blockBad = 0; + t->chunkUsed = 1; + t->objectId = pt->t.objectId; -+ t->chunkId = pt->t.chunkId; ++ t->chunkId = pt->t.chunkId; + t->byteCount = pt->t.byteCount; + t->chunkDeleted = 0; + t->serialNumber = 0; + t->sequenceNumber = pt->t.sequenceNumber; -+ -+ // Do extra header info stuff -+ -+ if(pt->t.chunkId & EXTRA_HEADER_INFO_FLAG) -+ { ++ ++ /* Do extra header info stuff */ ++ ++ if (pt->t.chunkId & EXTRA_HEADER_INFO_FLAG) { + t->chunkId = 0; + t->byteCount = 0; -+ ++ + t->extraHeaderInfoAvailable = 1; -+ t->extraParentObjectId = pt->t.chunkId & (~(ALL_EXTRA_FLAGS)); -+ t->extraIsShrinkHeader = (pt->t.chunkId & EXTRA_SHRINK_FLAG) ? 1 : 0; -+ t->extraShadows = (pt->t.chunkId & EXTRA_SHADOWS_FLAG) ? 1 : 0; -+ t->extraObjectType = pt->t.objectId >> EXTRA_OBJECT_TYPE_SHIFT; ++ t->extraParentObjectId = ++ pt->t.chunkId & (~(ALL_EXTRA_FLAGS)); ++ t->extraIsShrinkHeader = ++ (pt->t.chunkId & EXTRA_SHRINK_FLAG) ? 1 : 0; ++ t->extraShadows = ++ (pt->t.chunkId & EXTRA_SHADOWS_FLAG) ? 1 : 0; ++ t->extraObjectType = ++ pt->t.objectId >> EXTRA_OBJECT_TYPE_SHIFT; + t->objectId &= ~EXTRA_OBJECT_TYPE_MASK; -+ -+ if(t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) -+ { -+ t->extraEquivalentObjectId = pt->t.byteCount; -+ } -+ else -+ { -+ t->extraFileLength = pt->t.byteCount; ++ ++ if (t->extraObjectType == YAFFS_OBJECT_TYPE_HARDLINK) { ++ t->extraEquivalentObjectId = pt->t.byteCount; ++ } else { ++ t->extraFileLength = pt->t.byteCount; + } + } + } @@ -10230,49 +12056,224 @@ index 0000000..f4de18d + yaffs_DumpTags2(t); + +} -+ -diff --git a/fs/yaffs/yaffs_packedtags2.h b/fs/yaffs/yaffs_packedtags2.h -new file mode 100644 -index 0000000..564dd58 ---- /dev/null -+++ b/fs/yaffs/yaffs_packedtags2.h -@@ -0,0 +1,30 @@ -+// This is used to pack YAFFS2 tags, not YAFFS1tags. +diff -urN linux.old/fs/yaffs2/yaffs_packedtags2.h linux.dev/fs/yaffs2/yaffs_packedtags2.h +--- linux.old/fs/yaffs2/yaffs_packedtags2.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_packedtags2.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,23 @@ ++/* This is used to pack YAFFS2 tags, not YAFFS1tags. */ + +#ifndef __YAFFS_PACKEDTAGS2_H__ +#define __YAFFS_PACKEDTAGS2_H__ + -+ +#include "yaffs_guts.h" +#include "yaffs_ecc.h" + -+ -+typedef struct -+{ -+ unsigned sequenceNumber; -+ unsigned objectId; -+ unsigned chunkId; -+ unsigned byteCount; ++typedef struct { ++ unsigned sequenceNumber; ++ unsigned objectId; ++ unsigned chunkId; ++ unsigned byteCount; +} yaffs_PackedTags2TagsPart; + -+typedef struct -+{ -+ yaffs_PackedTags2TagsPart t; -+ yaffs_ECCOther ecc; ++typedef struct { ++ yaffs_PackedTags2TagsPart t; ++ yaffs_ECCOther ecc; +} yaffs_PackedTags2; + -+ -+void yaffs_PackTags2(yaffs_PackedTags2 *pt, const yaffs_ExtendedTags *t); -+void yaffs_UnpackTags2(yaffs_ExtendedTags *t, yaffs_PackedTags2 *pt); ++void yaffs_PackTags2(yaffs_PackedTags2 * pt, const yaffs_ExtendedTags * t); ++void yaffs_UnpackTags2(yaffs_ExtendedTags * t, yaffs_PackedTags2 * pt); +#endif +diff -urN linux.old/fs/yaffs2/yaffs_qsort.c linux.dev/fs/yaffs2/yaffs_qsort.c +--- linux.old/fs/yaffs2/yaffs_qsort.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_qsort.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,156 @@ ++/* ++ * Copyright (c) 1992, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 3. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#include "yportenv.h" ++//#include <linux/string.h> ++ ++/* ++ * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". ++ */ ++#define swapcode(TYPE, parmi, parmj, n) { \ ++ long i = (n) / sizeof (TYPE); \ ++ register TYPE *pi = (TYPE *) (parmi); \ ++ register TYPE *pj = (TYPE *) (parmj); \ ++ do { \ ++ register TYPE t = *pi; \ ++ *pi++ = *pj; \ ++ *pj++ = t; \ ++ } while (--i > 0); \ ++} ++ ++#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \ ++ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1; ++ ++static __inline void ++swapfunc(char *a, char *b, int n, int swaptype) ++{ ++ if (swaptype <= 1) ++ swapcode(long, a, b, n) ++ else ++ swapcode(char, a, b, n) ++} ++ ++#define swap(a, b) \ ++ if (swaptype == 0) { \ ++ long t = *(long *)(a); \ ++ *(long *)(a) = *(long *)(b); \ ++ *(long *)(b) = t; \ ++ } else \ ++ swapfunc(a, b, es, swaptype) ++ ++#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype) ++ ++static __inline char * ++med3(char *a, char *b, char *c, int (*cmp)(const void *, const void *)) ++{ ++ return cmp(a, b) < 0 ? ++ (cmp(b, c) < 0 ? b : (cmp(a, c) < 0 ? c : a )) ++ :(cmp(b, c) > 0 ? b : (cmp(a, c) < 0 ? a : c )); ++} + ++#define min(a,b) (((a) < (b)) ? (a) : (b)) ++void ++qsort(void *aa, size_t n, size_t es, int (*cmp)(const void *, const void *)) ++{ ++ char *pa, *pb, *pc, *pd, *pl, *pm, *pn; ++ int d, r, swaptype, swap_cnt; ++ register char *a = aa; + -diff --git a/fs/yaffs/yaffs_tagscompat.c b/fs/yaffs/yaffs_tagscompat.c -new file mode 100644 -index 0000000..fdf1cbc ---- /dev/null -+++ b/fs/yaffs/yaffs_tagscompat.c -@@ -0,0 +1,698 @@ ++loop: SWAPINIT(a, es); ++ swap_cnt = 0; ++ if (n < 7) { ++ for (pm = (char *)a + es; pm < (char *) a + n * es; pm += es) ++ for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; ++ pl -= es) ++ swap(pl, pl - es); ++ return; ++ } ++ pm = (char *)a + (n / 2) * es; ++ if (n > 7) { ++ pl = (char *)a; ++ pn = (char *)a + (n - 1) * es; ++ if (n > 40) { ++ d = (n / 8) * es; ++ pl = med3(pl, pl + d, pl + 2 * d, cmp); ++ pm = med3(pm - d, pm, pm + d, cmp); ++ pn = med3(pn - 2 * d, pn - d, pn, cmp); ++ } ++ pm = med3(pl, pm, pn, cmp); ++ } ++ swap(a, pm); ++ pa = pb = (char *)a + es; ++ ++ pc = pd = (char *)a + (n - 1) * es; ++ for (;;) { ++ while (pb <= pc && (r = cmp(pb, a)) <= 0) { ++ if (r == 0) { ++ swap_cnt = 1; ++ swap(pa, pb); ++ pa += es; ++ } ++ pb += es; ++ } ++ while (pb <= pc && (r = cmp(pc, a)) >= 0) { ++ if (r == 0) { ++ swap_cnt = 1; ++ swap(pc, pd); ++ pd -= es; ++ } ++ pc -= es; ++ } ++ if (pb > pc) ++ break; ++ swap(pb, pc); ++ swap_cnt = 1; ++ pb += es; ++ pc -= es; ++ } ++ if (swap_cnt == 0) { /* Switch to insertion sort */ ++ for (pm = (char *) a + es; pm < (char *) a + n * es; pm += es) ++ for (pl = pm; pl > (char *) a && cmp(pl - es, pl) > 0; ++ pl -= es) ++ swap(pl, pl - es); ++ return; ++ } ++ ++ pn = (char *)a + n * es; ++ r = min(pa - (char *)a, pb - pa); ++ vecswap(a, pb - r, r); ++ r = min((long)(pd - pc), (long)(pn - pd - es)); ++ vecswap(pb, pn - r, r); ++ if ((r = pb - pa) > es) ++ qsort(a, r / es, es, cmp); ++ if ((r = pd - pc) > es) { ++ /* Iterate rather than recurse to save stack space */ ++ a = pn - r; ++ n = r / es; ++ goto loop; ++ } ++/* qsort(pn - r, r / es, es, cmp);*/ ++} +diff -urN linux.old/fs/yaffs2/yaffs_qsort.h linux.dev/fs/yaffs2/yaffs_qsort.h +--- linux.old/fs/yaffs2/yaffs_qsort.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_qsort.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,23 @@ ++/* ++ * YAFFS: Yet another FFS. A NAND-flash specific file system. ++ * yaffs_qsort.h: Interface to BSD-licensed qsort routine. ++ * ++ * Copyright (C) 2002 Aleph One Ltd. ++ * for Toby Churchill Ltd and Brightstar Engineering ++ * ++ * Created by Charles Manning <charles@aleph1.co.uk> ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU Lesser General Public License version 2.1 as ++ * published by the Free Software Foundation. ++ * ++ * $Id: yaffs_qsort.h,v 1.2 2006/11/07 23:20:09 charles Exp $ ++ */ ++ ++#ifndef __YAFFS_QSORT_H__ ++#define __YAFFS_QSORT_H__ ++ ++extern void qsort (void *const base, size_t total_elems, size_t size, ++ int (*cmp)(const void *, const void *)); ++ ++#endif +diff -urN linux.old/fs/yaffs2/yaffs_tagscompat.c linux.dev/fs/yaffs2/yaffs_tagscompat.c +--- linux.old/fs/yaffs2/yaffs_tagscompat.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_tagscompat.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,532 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yaffs_tagscompat.h: Tags compatability layer to use YAFFS1 formatted NAND. @@ -10285,40 +12286,41 @@ index 0000000..fdf1cbc + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * -+ * $Id: yaffs_tagscompat.c,v 1.3 2005/07/31 06:47:12 marty Exp $ ++ * $Id: yaffs_tagscompat.c,v 1.8 2005/11/29 20:54:32 marty Exp $ + */ + +#include "yaffs_guts.h" +#include "yaffs_tagscompat.h" +#include "yaffs_ecc.h" + -+static void yaffs_HandleReadDataError(yaffs_Device *dev,int chunkInNAND); ++static void yaffs_HandleReadDataError(yaffs_Device * dev, int chunkInNAND); +#ifdef NOTYET -+static void yaffs_CheckWrittenBlock(yaffs_Device *dev,int chunkInNAND); -+static void yaffs_HandleWriteChunkOk(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_Spare *spare); -+static void yaffs_HandleUpdateChunk(yaffs_Device *dev,int chunkInNAND, const yaffs_Spare *spare); -+static void yaffs_HandleWriteChunkError(yaffs_Device *dev,int chunkInNAND); -+#endif -+ -+ -+static const char yaffs_countBitsTable[256] = -+{ -+0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7, -+4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8 ++static void yaffs_CheckWrittenBlock(yaffs_Device * dev, int chunkInNAND); ++static void yaffs_HandleWriteChunkOk(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, ++ const yaffs_Spare * spare); ++static void yaffs_HandleUpdateChunk(yaffs_Device * dev, int chunkInNAND, ++ const yaffs_Spare * spare); ++static void yaffs_HandleWriteChunkError(yaffs_Device * dev, int chunkInNAND); ++#endif ++ ++static const char yaffs_countBitsTable[256] = { ++ 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, ++ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ++ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ++ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ++ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ++ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ++ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ++ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ++ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, ++ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ++ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ++ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ++ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, ++ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ++ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, ++ 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 +}; + +static int yaffs_CountBits(__u8 x) @@ -10328,33 +12330,29 @@ index 0000000..fdf1cbc + return retVal; +} + ++/********** Tags ECC calculations *********/ + -+/////////////// Tags ECC calculations /////////////////// -+ -+void yaffs_CalcECC(const __u8 *data, yaffs_Spare *spare) ++void yaffs_CalcECC(const __u8 * data, yaffs_Spare * spare) +{ -+ yaffs_ECCCalculate(data , spare->ecc1); -+ yaffs_ECCCalculate(&data[256] , spare->ecc2); ++ yaffs_ECCCalculate(data, spare->ecc1); ++ yaffs_ECCCalculate(&data[256], spare->ecc2); +} + -+void yaffs_CalcTagsECC(yaffs_Tags *tags) ++void yaffs_CalcTagsECC(yaffs_Tags * tags) +{ -+ // Calculate an ecc ++ /* Calculate an ecc */ + -+ unsigned char *b = ((yaffs_TagsUnion *)tags)->asBytes; -+ unsigned i,j; -+ unsigned ecc = 0; ++ unsigned char *b = ((yaffs_TagsUnion *) tags)->asBytes; ++ unsigned i, j; ++ unsigned ecc = 0; + unsigned bit = 0; + + tags->ecc = 0; + -+ for(i = 0; i < 8; i++) -+ { -+ for(j = 1; j &0xff; j<<=1) -+ { ++ for (i = 0; i < 8; i++) { ++ for (j = 1; j & 0xff; j <<= 1) { + bit++; -+ if(b[i] & j) -+ { ++ if (b[i] & j) { + ecc ^= bit; + } + } @@ -10362,49 +12360,46 @@ index 0000000..fdf1cbc + + tags->ecc = ecc; + -+ +} + -+int yaffs_CheckECCOnTags(yaffs_Tags *tags) ++int yaffs_CheckECCOnTags(yaffs_Tags * tags) +{ + unsigned ecc = tags->ecc; + + yaffs_CalcTagsECC(tags); + + ecc ^= tags->ecc; -+ -+ if(ecc && ecc <= 64) -+ { -+ // TODO: Handle the failure better. Retire? -+ unsigned char *b = ((yaffs_TagsUnion *)tags)->asBytes; ++ ++ if (ecc && ecc <= 64) { ++ /* TODO: Handle the failure better. Retire? */ ++ unsigned char *b = ((yaffs_TagsUnion *) tags)->asBytes; + + ecc--; + + b[ecc / 8] ^= (1 << (ecc & 7)); + -+ // Now recvalc the ecc ++ /* Now recvalc the ecc */ + yaffs_CalcTagsECC(tags); + -+ return 1; // recovered error -+ } -+ else if(ecc) -+ { -+ // Wierd ecc failure value -+ // TODO Need to do somethiong here -+ return -1; //unrecovered error ++ return 1; /* recovered error */ ++ } else if (ecc) { ++ /* Wierd ecc failure value */ ++ /* TODO Need to do somethiong here */ ++ return -1; /* unrecovered error */ + } + + return 0; +} + -+//////////////////////////// Tags /////////////////////////////////////// ++/********** Tags **********/ + -+static void yaffs_LoadTagsIntoSpare(yaffs_Spare *sparePtr, yaffs_Tags *tagsPtr) ++static void yaffs_LoadTagsIntoSpare(yaffs_Spare * sparePtr, ++ yaffs_Tags * tagsPtr) +{ -+ yaffs_TagsUnion *tu = (yaffs_TagsUnion *)tagsPtr; ++ yaffs_TagsUnion *tu = (yaffs_TagsUnion *) tagsPtr; + + yaffs_CalcTagsECC(tagsPtr); -+ ++ + sparePtr->tagByte0 = tu->asBytes[0]; + sparePtr->tagByte1 = tu->asBytes[1]; + sparePtr->tagByte2 = tu->asBytes[2]; @@ -10415,568 +12410,406 @@ index 0000000..fdf1cbc + sparePtr->tagByte7 = tu->asBytes[7]; +} + -+static void yaffs_GetTagsFromSpare(yaffs_Device *dev, yaffs_Spare *sparePtr,yaffs_Tags *tagsPtr) ++static void yaffs_GetTagsFromSpare(yaffs_Device * dev, yaffs_Spare * sparePtr, ++ yaffs_Tags * tagsPtr) +{ -+ yaffs_TagsUnion *tu = (yaffs_TagsUnion *)tagsPtr; ++ yaffs_TagsUnion *tu = (yaffs_TagsUnion *) tagsPtr; + int result; + -+ tu->asBytes[0]= sparePtr->tagByte0; -+ tu->asBytes[1]= sparePtr->tagByte1; -+ tu->asBytes[2]= sparePtr->tagByte2; -+ tu->asBytes[3]= sparePtr->tagByte3; -+ tu->asBytes[4]= sparePtr->tagByte4; -+ tu->asBytes[5]= sparePtr->tagByte5; -+ tu->asBytes[6]= sparePtr->tagByte6; -+ tu->asBytes[7]= sparePtr->tagByte7; -+ -+ result = yaffs_CheckECCOnTags(tagsPtr); -+ if(result> 0) -+ { ++ tu->asBytes[0] = sparePtr->tagByte0; ++ tu->asBytes[1] = sparePtr->tagByte1; ++ tu->asBytes[2] = sparePtr->tagByte2; ++ tu->asBytes[3] = sparePtr->tagByte3; ++ tu->asBytes[4] = sparePtr->tagByte4; ++ tu->asBytes[5] = sparePtr->tagByte5; ++ tu->asBytes[6] = sparePtr->tagByte6; ++ tu->asBytes[7] = sparePtr->tagByte7; ++ ++ result = yaffs_CheckECCOnTags(tagsPtr); ++ if (result > 0) { + dev->tagsEccFixed++; -+ } -+ else if(result <0) -+ { ++ } else if (result < 0) { + dev->tagsEccUnfixed++; + } +} + -+static void yaffs_SpareInitialise(yaffs_Spare *spare) ++static void yaffs_SpareInitialise(yaffs_Spare * spare) +{ -+ memset(spare,0xFF,sizeof(yaffs_Spare)); ++ memset(spare, 0xFF, sizeof(yaffs_Spare)); +} + -+ -+ -+ -+static int yaffs_WriteChunkToNAND(struct yaffs_DeviceStruct *dev,int chunkInNAND, const __u8 *data, yaffs_Spare *spare) ++static int yaffs_WriteChunkToNAND(struct yaffs_DeviceStruct *dev, ++ int chunkInNAND, const __u8 * data, ++ yaffs_Spare * spare) +{ -+ if(chunkInNAND < dev->startBlock * dev->nChunksPerBlock) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs chunk %d is not valid" TENDSTR),chunkInNAND)); ++ if (chunkInNAND < dev->startBlock * dev->nChunksPerBlock) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR("**>> yaffs chunk %d is not valid" TENDSTR), ++ chunkInNAND)); + return YAFFS_FAIL; + } + + dev->nPageWrites++; -+ return dev->writeChunkToNAND(dev,chunkInNAND,data,spare); ++ return dev->writeChunkToNAND(dev, chunkInNAND, data, spare); +} + -+ -+ +static int yaffs_ReadChunkFromNAND(struct yaffs_DeviceStruct *dev, -+ int chunkInNAND, -+ __u8 *data, -+ yaffs_Spare *spare, -+ yaffs_ECCResult *eccResult, -+ int doErrorCorrection) ++ int chunkInNAND, ++ __u8 * data, ++ yaffs_Spare * spare, ++ yaffs_ECCResult * eccResult, ++ int doErrorCorrection) +{ + int retVal; + yaffs_Spare localSpare; + + dev->nPageReads++; -+ -+ + -+ -+ if(!spare && data) -+ { -+ // If we don't have a real spare, then we use a local one. -+ // Need this for the calculation of the ecc ++ if (!spare && data) { ++ /* If we don't have a real spare, then we use a local one. */ ++ /* Need this for the calculation of the ecc */ + spare = &localSpare; + } -+ + -+ if(!dev->useNANDECC) -+ { -+ retVal = dev->readChunkFromNAND(dev,chunkInNAND,data,spare); -+ if(data && doErrorCorrection) -+ { -+ // Do ECC correction -+ //Todo handle any errors -+ int eccResult1,eccResult2; -+ __u8 calcEcc[3]; -+ -+ yaffs_ECCCalculate(data,calcEcc); -+ eccResult1 = yaffs_ECCCorrect (data,spare->ecc1, calcEcc); -+ yaffs_ECCCalculate(&data[256],calcEcc); -+ eccResult2 = yaffs_ECCCorrect(&data[256],spare->ecc2, calcEcc); -+ -+ if(eccResult1>0) -+ { -+ T(YAFFS_TRACE_ERROR, (TSTR("**>>ecc error fix performed on chunk %d:0" TENDSTR),chunkInNAND)); ++ if (!dev->useNANDECC) { ++ retVal = dev->readChunkFromNAND(dev, chunkInNAND, data, spare); ++ if (data && doErrorCorrection) { ++ /* Do ECC correction */ ++ /* Todo handle any errors */ ++ int eccResult1, eccResult2; ++ __u8 calcEcc[3]; ++ ++ yaffs_ECCCalculate(data, calcEcc); ++ eccResult1 = ++ yaffs_ECCCorrect(data, spare->ecc1, calcEcc); ++ yaffs_ECCCalculate(&data[256], calcEcc); ++ eccResult2 = ++ yaffs_ECCCorrect(&data[256], spare->ecc2, calcEcc); ++ ++ if (eccResult1 > 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>yaffs ecc error fix performed on chunk %d:0" ++ TENDSTR), chunkInNAND)); + dev->eccFixed++; -+ } -+ else if(eccResult1<0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error unfixed on chunk %d:0" TENDSTR),chunkInNAND)); ++ } else if (eccResult1 < 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>yaffs ecc error unfixed on chunk %d:0" ++ TENDSTR), chunkInNAND)); + dev->eccUnfixed++; + } + -+ if(eccResult2>0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error fix performed on chunk %d:1" TENDSTR),chunkInNAND)); ++ if (eccResult2 > 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>yaffs ecc error fix performed on chunk %d:1" ++ TENDSTR), chunkInNAND)); + dev->eccFixed++; -+ } -+ else if(eccResult2<0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error unfixed on chunk %d:1" TENDSTR),chunkInNAND)); ++ } else if (eccResult2 < 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>yaffs ecc error unfixed on chunk %d:1" ++ TENDSTR), chunkInNAND)); + dev->eccUnfixed++; + } + -+ if(eccResult1 || eccResult2) -+ { -+ // Hoosterman, we had a data problem on this page -+ yaffs_HandleReadDataError(dev,chunkInNAND); ++ if (eccResult1 || eccResult2) { ++ /* We had a data problem on this page */ ++ yaffs_HandleReadDataError(dev, chunkInNAND); + } -+ -+ if(eccResult1 < 0 || eccResult2 < 0) ++ ++ if (eccResult1 < 0 || eccResult2 < 0) + *eccResult = YAFFS_ECC_RESULT_UNFIXED; -+ else if(eccResult1 > 0 || eccResult2 > 0) ++ else if (eccResult1 > 0 || eccResult2 > 0) + *eccResult = YAFFS_ECC_RESULT_FIXED; + else + *eccResult = YAFFS_ECC_RESULT_NO_ERROR; + } -+ } -+ else -+ { -+ // Must allocate enough memory for spare+2*sizeof(int) for ecc results from device. -+ struct yaffs_NANDSpare nspare; -+ retVal = dev->readChunkFromNAND(dev,chunkInNAND,data,(yaffs_Spare*)&nspare); -+ memcpy (spare, &nspare, sizeof(yaffs_Spare)); -+ if(data && doErrorCorrection) -+ { -+ if(nspare.eccres1>0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error fix performed on chunk %d:0" TENDSTR),chunkInNAND)); -+ } -+ else if(nspare.eccres1<0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error unfixed on chunk %d:0" TENDSTR),chunkInNAND)); ++ } else { ++ /* Must allocate enough memory for spare+2*sizeof(int) */ ++ /* for ecc results from device. */ ++ struct yaffs_NANDSpare nspare; ++ retVal = ++ dev->readChunkFromNAND(dev, chunkInNAND, data, ++ (yaffs_Spare *) & nspare); ++ memcpy(spare, &nspare, sizeof(yaffs_Spare)); ++ if (data && doErrorCorrection) { ++ if (nspare.eccres1 > 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>mtd ecc error fix performed on chunk %d:0" ++ TENDSTR), chunkInNAND)); ++ } else if (nspare.eccres1 < 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>mtd ecc error unfixed on chunk %d:0" ++ TENDSTR), chunkInNAND)); + } + -+ if(nspare.eccres2>0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error fix performed on chunk %d:1" TENDSTR),chunkInNAND)); -+ } -+ else if(nspare.eccres2<0) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>>ecc error unfixed on chunk %d:1" TENDSTR),chunkInNAND)); ++ if (nspare.eccres2 > 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>mtd ecc error fix performed on chunk %d:1" ++ TENDSTR), chunkInNAND)); ++ } else if (nspare.eccres2 < 0) { ++ T(YAFFS_TRACE_ERROR, ++ (TSTR ++ ("**>>mtd ecc error unfixed on chunk %d:1" ++ TENDSTR), chunkInNAND)); + } + -+ if(nspare.eccres1 || nspare.eccres2) -+ { -+ // Hoosterman, we had a data problem on this page -+ yaffs_HandleReadDataError(dev,chunkInNAND); ++ if (nspare.eccres1 || nspare.eccres2) { ++ /* We had a data problem on this page */ ++ yaffs_HandleReadDataError(dev, chunkInNAND); + } -+ -+ if(nspare.eccres1 < 0 || nspare.eccres2 < 0) ++ ++ if (nspare.eccres1 < 0 || nspare.eccres2 < 0) + *eccResult = YAFFS_ECC_RESULT_UNFIXED; -+ else if(nspare.eccres1 > 0 || nspare.eccres2 > 0) ++ else if (nspare.eccres1 > 0 || nspare.eccres2 > 0) + *eccResult = YAFFS_ECC_RESULT_FIXED; + else + *eccResult = YAFFS_ECC_RESULT_NO_ERROR; + -+ + } + } + return retVal; +} + +#ifdef NOTYET -+static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev,int chunkInNAND) ++static int yaffs_CheckChunkErased(struct yaffs_DeviceStruct *dev, ++ int chunkInNAND) +{ + + static int init = 0; + static __u8 cmpbuf[YAFFS_BYTES_PER_CHUNK]; + static __u8 data[YAFFS_BYTES_PER_CHUNK]; -+ // Might as well always allocate the larger size for dev->useNANDECC == true; ++ /* Might as well always allocate the larger size for */ ++ /* dev->useNANDECC == true; */ + static __u8 spare[sizeof(struct yaffs_NANDSpare)]; + -+ dev->readChunkFromNAND(dev,chunkInNAND,data,(yaffs_Spare *)spare); ++ dev->readChunkFromNAND(dev, chunkInNAND, data, (yaffs_Spare *) spare); + -+ if(!init) -+ { -+ memset(cmpbuf,0xff,YAFFS_BYTES_PER_CHUNK); ++ if (!init) { ++ memset(cmpbuf, 0xff, YAFFS_BYTES_PER_CHUNK); + init = 1; + } + -+ if(memcmp(cmpbuf,data,YAFFS_BYTES_PER_CHUNK)) return YAFFS_FAIL; -+ if(memcmp(cmpbuf,spare,16)) return YAFFS_FAIL; -+ ++ if (memcmp(cmpbuf, data, YAFFS_BYTES_PER_CHUNK)) ++ return YAFFS_FAIL; ++ if (memcmp(cmpbuf, spare, 16)) ++ return YAFFS_FAIL; + + return YAFFS_OK; + +} +#endif + -+#if 0 -+int yaffs_EraseBlockInNAND(struct yaffs_DeviceStruct *dev,int blockInNAND) -+{ -+ dev->nBlockErasures++; -+ return dev->eraseBlockInNAND(dev,blockInNAND); -+} -+ -+int yaffs_InitialiseNAND(struct yaffs_DeviceStruct *dev) -+{ -+ return dev->initialiseNAND(dev); -+} -+ -+#endif -+ -+#if 0 -+static int yaffs_WriteNewChunkToNAND(struct yaffs_DeviceStruct *dev, const __u8 *data, yaffs_Spare *spare,int useReserve) -+{ -+ int chunk; -+ -+ int writeOk = 1; -+ int attempts = 0; -+ -+ unsigned char rbData[YAFFS_BYTES_PER_CHUNK]; -+ yaffs_Spare rbSpare; -+ -+ do{ -+ chunk = yaffs_AllocateChunk(dev,useReserve); -+ -+ if(chunk >= 0) -+ { -+ -+ // First check this chunk is erased... -+#ifndef CONFIG_YAFFS_DISABLE_CHUNK_ERASED_CHECK -+ writeOk = yaffs_CheckChunkErased(dev,chunk); -+#endif -+ if(!writeOk) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs chunk %d was not erased" TENDSTR),chunk)); -+ } -+ else -+ { -+ writeOk = yaffs_WriteChunkToNAND(dev,chunk,data,spare); -+ } -+ attempts++; -+ if(writeOk) -+ { -+ // Readback & verify -+ // If verify fails, then delete this chunk and try again -+ // To verify we compare everything except the block and -+ // page status bytes. -+ // NB We check a raw read without ECC correction applied -+ yaffs_ReadChunkFromNAND(dev,chunk,rbData,&rbSpare,0); -+ -+#ifndef CONFIG_YAFFS_DISABLE_WRITE_VERIFY -+ if(!yaffs_VerifyCompare(data,rbData,spare,&rbSpare)) -+ { -+ // Didn't verify -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs write verify failed on chunk %d" TENDSTR), chunk)); -+ -+ writeOk = 0; -+ } -+#endif -+ -+ } -+ if(writeOk) -+ { -+ // Copy the data into the write buffer. -+ // NB We do this at the end to prevent duplicates in the case of a write error. -+ //Todo -+ yaffs_HandleWriteChunkOk(dev,chunk,data,spare); -+ } -+ else -+ { -+ yaffs_HandleWriteChunkError(dev,chunk); -+ } -+ } -+ -+ } while(chunk >= 0 && ! writeOk); -+ -+ if(attempts > 1) -+ { -+ T(YAFFS_TRACE_ERROR,(TSTR("**>> yaffs write required %d attempts" TENDSTR),attempts)); -+ dev->nRetriedWrites+= (attempts - 1); -+ } -+ -+ return chunk; -+} -+ -+#endif -+ -+/// -+// Functions for robustisizing -+// -+// -+#if 0 -+ -+static void yaffs_RetireBlock(yaffs_Device *dev,int blockInNAND) -+{ -+ // Ding the blockStatus in the first two pages of the block. -+ -+ yaffs_Spare spare; -+ -+ memset(&spare, 0xff,sizeof(yaffs_Spare)); -+ -+ spare.blockStatus = 0; -+ -+ // TODO change this retirement marking for other NAND types -+ yaffs_WriteChunkToNAND(dev, blockInNAND * dev->nChunksPerBlock, NULL , &spare); -+ yaffs_WriteChunkToNAND(dev, blockInNAND * dev->nChunksPerBlock + 1, NULL , &spare); -+ -+ yaffs_GetBlockInfo(dev,blockInNAND)->blockState = YAFFS_BLOCK_STATE_DEAD; -+ dev->nRetiredBlocks++; -+} -+ -+#endif -+ -+#if 0 -+static int yaffs_RewriteBufferedBlock(yaffs_Device *dev) -+{ -+ dev->doingBufferedBlockRewrite = 1; -+ // -+ // Remove erased chunks -+ // Rewrite existing chunks to a new block -+ // Set current write block to the new block -+ -+ dev->doingBufferedBlockRewrite = 0; -+ -+ return 1; -+} -+ -+#endif ++/* ++ * Functions for robustisizing ++ */ + -+static void yaffs_HandleReadDataError(yaffs_Device *dev,int chunkInNAND) ++static void yaffs_HandleReadDataError(yaffs_Device * dev, int chunkInNAND) +{ -+ int blockInNAND = chunkInNAND/dev->nChunksPerBlock; ++ int blockInNAND = chunkInNAND / dev->nChunksPerBlock; + -+ // Mark the block for retirement -+ yaffs_GetBlockInfo(dev,blockInNAND)->needsRetiring = 1; -+ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS,(TSTR("**>>Block %d marked for retirement" TENDSTR),blockInNAND)); ++ /* Mark the block for retirement */ ++ yaffs_GetBlockInfo(dev, blockInNAND)->needsRetiring = 1; ++ T(YAFFS_TRACE_ERROR | YAFFS_TRACE_BAD_BLOCKS, ++ (TSTR("**>>Block %d marked for retirement" TENDSTR), blockInNAND)); + -+ -+ //TODO -+ // Just do a garbage collection on the affected block then retire the block -+ // NB recursion ++ /* TODO: ++ * Just do a garbage collection on the affected block ++ * then retire the block ++ * NB recursion ++ */ +} + -+ +#ifdef NOTYET -+static void yaffs_CheckWrittenBlock(yaffs_Device *dev,int chunkInNAND) ++static void yaffs_CheckWrittenBlock(yaffs_Device * dev, int chunkInNAND) +{ +} + -+static void yaffs_HandleWriteChunkOk(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_Spare *spare) ++static void yaffs_HandleWriteChunkOk(yaffs_Device * dev, int chunkInNAND, ++ const __u8 * data, ++ const yaffs_Spare * spare) +{ +} + -+static void yaffs_HandleUpdateChunk(yaffs_Device *dev,int chunkInNAND, const yaffs_Spare *spare) ++static void yaffs_HandleUpdateChunk(yaffs_Device * dev, int chunkInNAND, ++ const yaffs_Spare * spare) +{ +} + -+static void yaffs_HandleWriteChunkError(yaffs_Device *dev,int chunkInNAND) ++static void yaffs_HandleWriteChunkError(yaffs_Device * dev, int chunkInNAND) +{ -+ int blockInNAND = chunkInNAND/dev->nChunksPerBlock; ++ int blockInNAND = chunkInNAND / dev->nChunksPerBlock; + -+ // Mark the block for retirement -+ yaffs_GetBlockInfo(dev,blockInNAND)->needsRetiring = 1; -+ // Delete the chunk -+ yaffs_DeleteChunk(dev,chunkInNAND,1,__LINE__); ++ /* Mark the block for retirement */ ++ yaffs_GetBlockInfo(dev, blockInNAND)->needsRetiring = 1; ++ /* Delete the chunk */ ++ yaffs_DeleteChunk(dev, chunkInNAND, 1, __LINE__); +} + -+ -+ -+ -+static int yaffs_VerifyCompare(const __u8 *d0, const __u8 * d1, const yaffs_Spare *s0, const yaffs_Spare *s1) ++static int yaffs_VerifyCompare(const __u8 * d0, const __u8 * d1, ++ const yaffs_Spare * s0, const yaffs_Spare * s1) +{ + -+ -+ if( memcmp(d0,d1,YAFFS_BYTES_PER_CHUNK) != 0 || -+ s0->tagByte0 != s1->tagByte0 || -+ s0->tagByte1 != s1->tagByte1 || -+ s0->tagByte2 != s1->tagByte2 || -+ s0->tagByte3 != s1->tagByte3 || -+ s0->tagByte4 != s1->tagByte4 || -+ s0->tagByte5 != s1->tagByte5 || -+ s0->tagByte6 != s1->tagByte6 || -+ s0->tagByte7 != s1->tagByte7 || -+ s0->ecc1[0] != s1->ecc1[0] || -+ s0->ecc1[1] != s1->ecc1[1] || -+ s0->ecc1[2] != s1->ecc1[2] || -+ s0->ecc2[0] != s1->ecc2[0] || -+ s0->ecc2[1] != s1->ecc2[1] || -+ s0->ecc2[2] != s1->ecc2[2] ) -+ { -+ return 0; -+ } ++ if (memcmp(d0, d1, YAFFS_BYTES_PER_CHUNK) != 0 || ++ s0->tagByte0 != s1->tagByte0 || ++ s0->tagByte1 != s1->tagByte1 || ++ s0->tagByte2 != s1->tagByte2 || ++ s0->tagByte3 != s1->tagByte3 || ++ s0->tagByte4 != s1->tagByte4 || ++ s0->tagByte5 != s1->tagByte5 || ++ s0->tagByte6 != s1->tagByte6 || ++ s0->tagByte7 != s1->tagByte7 || ++ s0->ecc1[0] != s1->ecc1[0] || ++ s0->ecc1[1] != s1->ecc1[1] || ++ s0->ecc1[2] != s1->ecc1[2] || ++ s0->ecc2[0] != s1->ecc2[0] || ++ s0->ecc2[1] != s1->ecc2[1] || s0->ecc2[2] != s1->ecc2[2]) { ++ return 0; ++ } + + return 1; +} -+#endif /* NOTYET */ ++#endif /* NOTYET */ + -+#if 0 -+typedef struct -+{ -+ -+ unsigned validMarker0; -+ unsigned chunkUsed; // Status of the chunk: used or unused -+ unsigned objectId; // If 0 then this is not part of an object (unused) -+ unsigned chunkId; // If 0 then this is a header -+ unsigned byteCount; // Only valid for data chunks -+ // The following stuff only has meaning when we read -+ yaffs_ECCResult eccResult; // Only valid when we read. -+ unsigned blockBad; // Only valid on reading -+ -+ // YAFFS 1 stuff -+ unsigned chunkDeleted; // The chunk is marked deleted -+ unsigned serialNumber; // Yaffs1 2-bit serial number -+ -+ // YAFFS2 stuff -+ unsigned sequenceNumber; // The sequence number of this block -+ -+ unsigned validMarker1; -+ -+} yaffs_ExtendedTags; -+ -+ -+typedef struct -+{ -+ unsigned chunkId:20; -+ unsigned serialNumber:2; -+ unsigned byteCount:10; -+ unsigned objectId:18; -+ unsigned ecc:12; -+ unsigned unusedStuff:2; -+} yaffs_Tags; -+ -+ -+#endif -+ -+int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *eTags) ++int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device * dev, ++ int chunkInNAND, ++ const __u8 * data, ++ const yaffs_ExtendedTags * ++ eTags) +{ + yaffs_Spare spare; -+ yaffs_Tags tags; -+ ++ yaffs_Tags tags; ++ + yaffs_SpareInitialise(&spare); -+ -+ if(eTags->chunkDeleted) -+ { ++ ++ if (eTags->chunkDeleted) { + spare.pageStatus = 0; -+ } -+ else -+ { ++ } else { + tags.objectId = eTags->objectId; + tags.chunkId = eTags->chunkId; + tags.byteCount = eTags->byteCount; + tags.serialNumber = eTags->serialNumber; -+ -+// NCB -+ if (!dev->useNANDECC && data) -+ { -+ yaffs_CalcECC(data,&spare); ++ ++ if (!dev->useNANDECC && data) { ++ yaffs_CalcECC(data, &spare); + } ++ yaffs_LoadTagsIntoSpare(&spare, &tags); + -+// /NCB -+ yaffs_LoadTagsIntoSpare(&spare,&tags); -+ + } -+ -+ return yaffs_WriteChunkToNAND(dev,chunkInNAND,data,&spare); -+} + ++ return yaffs_WriteChunkToNAND(dev, chunkInNAND, data, &spare); ++} + -+int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *eTags) ++int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev, ++ int chunkInNAND, ++ __u8 * data, ++ yaffs_ExtendedTags * eTags) +{ + + yaffs_Spare spare; + yaffs_Tags tags; + yaffs_ECCResult eccResult; -+ -+// NCB -+ static yaffs_Spare spareFF; -+ static int init; -+ -+ if(!init) -+ { -+ memset(&spareFF,0xFF,sizeof(spareFF)); -+ init = 1; -+ } -+// /NCB -+ if(yaffs_ReadChunkFromNAND(dev,chunkInNAND,data,&spare,&eccResult,1)) -+ { -+// added NCB - eTags may be NULL ++ ++ static yaffs_Spare spareFF; ++ static int init; ++ ++ if (!init) { ++ memset(&spareFF, 0xFF, sizeof(spareFF)); ++ init = 1; ++ } ++ ++ if (yaffs_ReadChunkFromNAND ++ (dev, chunkInNAND, data, &spare, &eccResult, 1)) { ++ /* eTags may be NULL */ + if (eTags) { + -+ int deleted = (yaffs_CountBits(spare.pageStatus) < 7) ? 1 : 0; -+ -+ yaffs_GetTagsFromSpare(dev,&spare,&tags); -+ -+ eTags->chunkDeleted = deleted; -+ eTags->objectId = tags.objectId; -+ eTags->chunkId = tags.chunkId; -+ eTags->byteCount = tags.byteCount; -+ eTags->serialNumber = tags.serialNumber; -+ eTags->eccResult = eccResult; -+ eTags->blockBad = 0; // We're reading it therefore it is not a bad block -+ -+// NCB added 18/2/2005 -+ eTags->chunkUsed = (memcmp(&spareFF,&spare,sizeof(spareFF)) != 0) ? 1:0; ++ int deleted = ++ (yaffs_CountBits(spare.pageStatus) < 7) ? 1 : 0; ++ ++ eTags->chunkDeleted = deleted; ++ eTags->eccResult = eccResult; ++ eTags->blockBad = 0; /* We're reading it */ ++ /* therefore it is not a bad block */ ++ eTags->chunkUsed = ++ (memcmp(&spareFF, &spare, sizeof(spareFF)) != ++ 0) ? 1 : 0; ++ ++ if (eTags->chunkUsed) { ++ yaffs_GetTagsFromSpare(dev, &spare, &tags); ++ ++ eTags->objectId = tags.objectId; ++ eTags->chunkId = tags.chunkId; ++ eTags->byteCount = tags.byteCount; ++ eTags->serialNumber = tags.serialNumber; ++ } + } -+ -+ return YAFFS_OK; -+ } -+ else -+ { ++ ++ return YAFFS_OK; ++ } else { + return YAFFS_FAIL; + } +} + -+int yaffs_TagsCompatabilityMarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockInNAND) ++int yaffs_TagsCompatabilityMarkNANDBlockBad(struct yaffs_DeviceStruct *dev, ++ int blockInNAND) +{ + + yaffs_Spare spare; + -+ memset(&spare, 0xff,sizeof(yaffs_Spare)); ++ memset(&spare, 0xff, sizeof(yaffs_Spare)); + -+ spare.blockStatus = 0; ++ spare.blockStatus = 'Y'; ++ ++ yaffs_WriteChunkToNAND(dev, blockInNAND * dev->nChunksPerBlock, NULL, ++ &spare); ++ yaffs_WriteChunkToNAND(dev, blockInNAND * dev->nChunksPerBlock + 1, ++ NULL, &spare); + -+ yaffs_WriteChunkToNAND(dev, blockInNAND * dev->nChunksPerBlock, NULL , &spare); -+ yaffs_WriteChunkToNAND(dev, blockInNAND * dev->nChunksPerBlock + 1, NULL , &spare); -+ + return YAFFS_OK; -+ ++ +} + ++int yaffs_TagsCompatabilityQueryNANDBlock(struct yaffs_DeviceStruct *dev, ++ int blockNo, yaffs_BlockState * ++ state, ++ int *sequenceNumber) ++{ ++ ++ yaffs_Spare spare0, spare1; ++ static yaffs_Spare spareFF; ++ static int init; ++ yaffs_ECCResult dummy; ++ ++ if (!init) { ++ memset(&spareFF, 0xFF, sizeof(spareFF)); ++ init = 1; ++ } ++ ++ *sequenceNumber = 0; ++ ++ yaffs_ReadChunkFromNAND(dev, blockNo * dev->nChunksPerBlock, NULL, ++ &spare0, &dummy, 1); ++ yaffs_ReadChunkFromNAND(dev, blockNo * dev->nChunksPerBlock + 1, NULL, ++ &spare1, &dummy, 1); ++ ++ if (yaffs_CountBits(spare0.blockStatus & spare1.blockStatus) < 7) ++ *state = YAFFS_BLOCK_STATE_DEAD; ++ else if (memcmp(&spareFF, &spare0, sizeof(spareFF)) == 0) ++ *state = YAFFS_BLOCK_STATE_EMPTY; ++ else ++ *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING; + -+int yaffs_TagsCompatabilityQueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber) -+{ -+ -+ yaffs_Spare spare0,spare1; -+ static yaffs_Spare spareFF; -+ static int init; -+ yaffs_ECCResult dummy; -+ -+ if(!init) -+ { -+ memset(&spareFF,0xFF,sizeof(spareFF)); -+ init = 1; -+ } -+ -+ *sequenceNumber = 0; -+ -+ yaffs_ReadChunkFromNAND(dev,blockNo * dev->nChunksPerBlock,NULL,&spare0,&dummy,1); -+ yaffs_ReadChunkFromNAND(dev,blockNo * dev->nChunksPerBlock + 1,NULL,&spare1,&dummy,1); -+ -+ if(yaffs_CountBits(spare0.blockStatus & spare1.blockStatus) < 7) -+ *state = YAFFS_BLOCK_STATE_DEAD; -+ else if(memcmp(&spareFF,&spare0,sizeof(spareFF)) == 0) -+ *state = YAFFS_BLOCK_STATE_EMPTY; -+ else -+ *state = YAFFS_BLOCK_STATE_NEEDS_SCANNING; -+ -+ return YAFFS_OK; -+} -+ -diff --git a/fs/yaffs/yaffs_tagscompat.h b/fs/yaffs/yaffs_tagscompat.h -new file mode 100644 -index 0000000..20b627f ---- /dev/null -+++ b/fs/yaffs/yaffs_tagscompat.h -@@ -0,0 +1,30 @@ ++ return YAFFS_OK; ++} +diff -urN linux.old/fs/yaffs2/yaffs_tagscompat.h linux.dev/fs/yaffs2/yaffs_tagscompat.h +--- linux.old/fs/yaffs2/yaffs_tagscompat.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_tagscompat.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,40 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. + * yaffs_ramdisk.h: yaffs ram disk component @@ -10989,30 +12822,38 @@ index 0000000..20b627f + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * -+ * $Id: yaffs_tagscompat.h,v 1.1 2004/11/03 08:14:07 charles Exp $ ++ * $Id: yaffs_tagscompat.h,v 1.2 2005/08/11 02:33:03 marty Exp $ + */ + -+// This provides a rma disk under yaffs. -+// NB this is not intended for NAND emulation. -+// Use this with dev->useNANDECC enabled, then ECC overheads are not required. -+ ++/* This provides a ram disk under yaffs. ++ * NB this is not intended for NAND emulation. ++ * Use this with dev->useNANDECC enabled, then ECC overheads are not required. ++ */ +#ifndef __YAFFS_TAGSCOMPAT_H__ +#define __YAFFS_TAGSCOMPAT_H__ + -+ +#include "yaffs_guts.h" -+int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device *dev,int chunkInNAND,const __u8 *data, const yaffs_ExtendedTags *tags); -+int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device *dev,int chunkInNAND, __u8 *data, yaffs_ExtendedTags *tags); -+int yaffs_TagsCompatabilityMarkNANDBlockBad(struct yaffs_DeviceStruct *dev, int blockNo); -+int yaffs_TagsCompatabilityQueryNANDBlock(struct yaffs_DeviceStruct *dev, int blockNo, yaffs_BlockState *state, int *sequenceNumber); -+ -+#endif -diff --git a/fs/yaffs/yaffs_tagsvalidity.c b/fs/yaffs/yaffs_tagsvalidity.c -new file mode 100644 -index 0000000..2cbbeaa ---- /dev/null -+++ b/fs/yaffs/yaffs_tagsvalidity.c -@@ -0,0 +1,35 @@ ++int yaffs_TagsCompatabilityWriteChunkWithTagsToNAND(yaffs_Device * dev, ++ int chunkInNAND, ++ const __u8 * data, ++ const yaffs_ExtendedTags * ++ tags); ++int yaffs_TagsCompatabilityReadChunkWithTagsFromNAND(yaffs_Device * dev, ++ int chunkInNAND, ++ __u8 * data, ++ yaffs_ExtendedTags * ++ tags); ++int yaffs_TagsCompatabilityMarkNANDBlockBad(struct yaffs_DeviceStruct *dev, ++ int blockNo); ++int yaffs_TagsCompatabilityQueryNANDBlock(struct yaffs_DeviceStruct *dev, ++ int blockNo, yaffs_BlockState * ++ state, int *sequenceNumber); ++ ++#endif +diff -urN linux.old/fs/yaffs2/yaffs_tagsvalidity.c linux.dev/fs/yaffs2/yaffs_tagsvalidity.c +--- linux.old/fs/yaffs2/yaffs_tagsvalidity.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_tagsvalidity.c 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,31 @@ + +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. @@ -11026,34 +12867,28 @@ index 0000000..2cbbeaa + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * -+ * $Id: yaffs_tagsvalidity.c,v 1.1 2005/04/29 18:09:16 charles Exp $ ++ * $Id: yaffs_tagsvalidity.c,v 1.2 2005/08/11 02:33:03 marty Exp $ + */ -+//yaffs_tagsvalidity.c + +#include "yaffs_tagsvalidity.h" + -+ -+ -+void yaffs_InitialiseTags(yaffs_ExtendedTags *tags) ++void yaffs_InitialiseTags(yaffs_ExtendedTags * tags) +{ -+ memset(tags,0,sizeof(yaffs_ExtendedTags)); ++ memset(tags, 0, sizeof(yaffs_ExtendedTags)); + tags->validMarker0 = 0xAAAAAAAA; + tags->validMarker1 = 0x55555555; +} + -+int yaffs_ValidateTags(yaffs_ExtendedTags *tags) ++int yaffs_ValidateTags(yaffs_ExtendedTags * tags) +{ + return (tags->validMarker0 == 0xAAAAAAAA && + tags->validMarker1 == 0x55555555); + +} -+ -diff --git a/fs/yaffs/yaffs_tagsvalidity.h b/fs/yaffs/yaffs_tagsvalidity.h -new file mode 100644 -index 0000000..26673d1 ---- /dev/null -+++ b/fs/yaffs/yaffs_tagsvalidity.h -@@ -0,0 +1,27 @@ +diff -urN linux.old/fs/yaffs2/yaffs_tagsvalidity.h linux.dev/fs/yaffs2/yaffs_tagsvalidity.h +--- linux.old/fs/yaffs2/yaffs_tagsvalidity.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yaffs_tagsvalidity.h 2006-12-14 04:21:47.000000000 +0100 +@@ -0,0 +1,25 @@ + +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. @@ -11067,56 +12902,21 @@ index 0000000..26673d1 + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * -+ * $Id: yaffs_tagsvalidity.h,v 1.1 2005/04/29 18:09:16 charles Exp $ ++ * $Id: yaffs_tagsvalidity.h,v 1.2 2005/08/11 02:33:03 marty Exp $ + */ +//yaffs_tagsvalidity.h + -+ +#ifndef __YAFFS_TAGS_VALIDITY_H__ +#define __YAFFS_TAGS_VALIDITY_H__ + +#include "yaffs_guts.h" + -+void yaffs_InitialiseTags(yaffs_ExtendedTags *tags); -+int yaffs_ValidateTags(yaffs_ExtendedTags *tags); -+#endif -+ -diff --git a/fs/yaffs/yaffsinterface.h b/fs/yaffs/yaffsinterface.h -new file mode 100644 -index 0000000..e4b0ff1 ---- /dev/null -+++ b/fs/yaffs/yaffsinterface.h -@@ -0,0 +1,25 @@ -+/* -+ * YAFFS: Yet another FFS. A NAND-flash specific file system. -+ * yaffsinterface.h: Interface to the guts of yaffs. -+ * -+ * Copyright (C) 2002 Aleph One Ltd. -+ * for Toby Churchill Ltd and Brightstar Engineering -+ * -+ * Created by Charles Manning <charles@aleph1.co.uk> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Lesser General Public License version 2.1 as -+ * published by the Free Software Foundation. -+ * -+ * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. -+ * -+ */ -+ -+#ifndef __YAFFSINTERFACE_H__ -+#define __YAFFSINTERFACE_H__ -+ -+ -+int yaffs_Initialise(unsigned nBlocks); -+ ++void yaffs_InitialiseTags(yaffs_ExtendedTags * tags); ++int yaffs_ValidateTags(yaffs_ExtendedTags * tags); +#endif -+ -diff --git a/fs/yaffs/yportenv.h b/fs/yaffs/yportenv.h -new file mode 100644 -index 0000000..13c63bb ---- /dev/null -+++ b/fs/yaffs/yportenv.h +diff -urN linux.old/fs/yaffs2/yportenv.h linux.dev/fs/yaffs2/yportenv.h +--- linux.old/fs/yaffs2/yportenv.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux.dev/fs/yaffs2/yportenv.h 2006-12-14 04:26:06.000000000 +0100 @@ -0,0 +1,165 @@ +/* + * YAFFS: Yet another FFS. A NAND-flash specific file system. @@ -11135,29 +12935,29 @@ index 0000000..13c63bb + * + * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. + * -+ * $Id: yportenv.h,v 1.6 2005/07/31 00:26:57 charles Exp $ ++ * $Id: yportenv.h,v 1.11 2006/05/21 09:39:12 charles Exp $ + * + */ -+ ++ +#ifndef __YPORTENV_H__ +#define __YPORTENV_H__ + -+ +#if defined CONFIG_YAFFS_WINCE + +#include "ywinceenv.h" + +#elif defined __KERNEL__ + ++#include "moduleconfig.h" + -+ -+// Linux kernel -+#include <linux/config.h> ++/* Linux kernel */ ++#include <linux/autoconf.h> +#include <linux/kernel.h> +#include <linux/version.h> +#include <linux/mm.h> +#include <linux/string.h> +#include <linux/slab.h> ++#include <linux/vmalloc.h> + +#define YCHAR char +#define YUCHAR unsigned char @@ -11173,9 +12973,15 @@ index 0000000..13c63bb +#define YAFFS_LOSTNFOUND_NAME "lost+found" +#define YAFFS_LOSTNFOUND_PREFIX "obj" + -+//#define YPRINTF(x) printk x ++/* #define YPRINTF(x) printk x */ +#define YMALLOC(x) kmalloc(x,GFP_KERNEL) +#define YFREE(x) kfree(x) ++#define YMALLOC_ALT(x) vmalloc(x) ++#define YFREE_ALT(x) vfree(x) ++#define YMALLOC_DMA(x) YMALLOC(x) ++ ++// KR - added for use in scan so processes aren't blocked indefinitely. ++#define YYIELD() schedule() + +#define YAFFS_ROOT_MODE 0666 +#define YAFFS_LOSTNFOUND_MODE 0666 @@ -11195,15 +13001,14 @@ index 0000000..13c63bb +#define TSTR(x) KERN_WARNING x +#define TOUT(p) printk p + -+ +#elif defined CONFIG_YAFFS_DIRECT + -+// Direct interface ++/* Direct interface */ +#include "ydirectenv.h" + +#elif defined CONFIG_YAFFS_UTIL + -+// Stuff for YAFFS utilities ++/* Stuff for YAFFS utilities */ + +#include "stdlib.h" +#include "stdio.h" @@ -11213,7 +13018,8 @@ index 0000000..13c63bb + +#define YMALLOC(x) malloc(x) +#define YFREE(x) free(x) -+ ++#define YMALLOC_ALT(x) malloc(x) ++#define YFREE_ALT(x) free(x) + +#define YCHAR char +#define YUCHAR unsigned char @@ -11226,19 +13032,16 @@ index 0000000..13c63bb + +#define Y_INLINE inline + -+//#define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s)) -+//#define YALERT(s) YINFO(s) -+ ++/* #define YINFO(s) YPRINTF(( __FILE__ " %d %s\n",__LINE__,s)) */ ++/* #define YALERT(s) YINFO(s) */ + +#define TENDSTR "\n" +#define TSTR(x) x +#define TOUT(p) printf p + -+ +#define YAFFS_LOSTNFOUND_NAME "lost+found" +#define YAFFS_LOSTNFOUND_PREFIX "obj" -+//#define YPRINTF(x) printf x -+ ++/* #define YPRINTF(x) printf x */ + +#define YAFFS_ROOT_MODE 0666 +#define YAFFS_LOSTNFOUND_MODE 0666 @@ -11247,11 +13050,10 @@ index 0000000..13c63bb +#define yaffs_strcmp(a,b) strcmp(a,b) + +#else -+// Should have specified a configuration type ++/* Should have specified a configuration type */ +#error Unknown configuration + -+#endif -+ ++#endif + +extern unsigned yaffs_traceMask; + @@ -11270,17 +13072,14 @@ index 0000000..13c63bb +#define YAFFS_TRACE_GC_DETAIL 0x00001000 +#define YAFFS_TRACE_SCAN_DEBUG 0x00002000 +#define YAFFS_TRACE_MTD 0x00004000 ++#define YAFFS_TRACE_CHECKPOINT 0x00008000 +#define YAFFS_TRACE_ALWAYS 0x40000000 +#define YAFFS_TRACE_BUG 0x80000000 + -+#define T(mask,p) do{ if((mask) & (yaffs_traceMask | YAFFS_TRACE_ERROR)) TOUT(p);} while(0) -+ ++#define T(mask,p) do{ if((mask) & (yaffs_traceMask | YAFFS_TRACE_ERROR)) TOUT(p);} while(0) + +#ifndef CONFIG_YAFFS_WINCE +#define YBUG() T(YAFFS_TRACE_BUG,(TSTR("==>> yaffs bug: " __FILE__ " %d" TENDSTR),__LINE__)) +#endif + +#endif -+ -+ - diff --git a/target/linux/rdc-2.6/Makefile b/target/linux/rdc-2.6/Makefile index 1269676611..e385659312 100644 --- a/target/linux/rdc-2.6/Makefile +++ b/target/linux/rdc-2.6/Makefile @@ -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 diff --git a/target/linux/rdc-2.6/patches/000-rdc_fixes.patch b/target/linux/rdc-2.6/patches/000-rdc_fixes.patch index 5e3878d08f..d62f938fd4 100644 --- a/target/linux/rdc-2.6/patches/000-rdc_fixes.patch +++ b/target/linux/rdc-2.6/patches/000-rdc_fixes.patch @@ -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 diff --git a/target/linux/rdc-2.6/patches/001-rdc3210_flash_map.patch b/target/linux/rdc-2.6/patches/001-rdc3210_flash_map.patch index a3d2ac6b74..6b4b2af6c1 100644 --- a/target/linux/rdc-2.6/patches/001-rdc3210_flash_map.patch +++ b/target/linux/rdc-2.6/patches/001-rdc3210_flash_map.patch @@ -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 diff --git a/target/linux/rdc-2.6/patches/002-r6040_ethernet.patch b/target/linux/rdc-2.6/patches/002-r6040_ethernet.patch index 88a9ea17ea..1402369bfb 100644 --- a/target/linux/rdc-2.6/patches/002-r6040_ethernet.patch +++ b/target/linux/rdc-2.6/patches/002-r6040_ethernet.patch @@ -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; diff --git a/target/linux/sibyte-2.6/Makefile b/target/linux/sibyte-2.6/Makefile index 1b4fdfbc94..644927d19d 100644 --- a/target/linux/sibyte-2.6/Makefile +++ b/target/linux/sibyte-2.6/Makefile @@ -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)) diff --git a/target/linux/sibyte-2.6/patches/000-DUART.patch b/target/linux/sibyte-2.6/patches/000-DUART.patch index fe899f1453..86b7666da6 100644 --- a/target/linux/sibyte-2.6/patches/000-DUART.patch +++ b/target/linux/sibyte-2.6/patches/000-DUART.patch @@ -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; diff --git a/target/linux/uml-2.6/Makefile b/target/linux/uml-2.6/Makefile index 3ca6b021d3..0fa8ab2334 100644 --- a/target/linux/uml-2.6/Makefile +++ b/target/linux/uml-2.6/Makefile @@ -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)) diff --git a/target/linux/uml-2.6/config b/target/linux/uml-2.6/config index d1fd6b7588..bb26856ee1 100644 --- a/target/linux/uml-2.6/config +++ b/target/linux/uml-2.6/config @@ -1,768 +1,724 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Tue Aug 22 17:19:49 2006 -# -CONFIG_GENERIC_HARDIRQS=y -CONFIG_UML=y -CONFIG_MMU=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_IRQ_RELEASE_METHOD=y - -# -# UML-specific options -# -# CONFIG_MODE_TT is not set -# CONFIG_STATIC_LINK is not set -CONFIG_MODE_SKAS=y - -# -# Host processor type and features -# -# CONFIG_M386 is not set -CONFIG_M486=y -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -CONFIG_X86_GENERIC=y -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=7 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_F00F_BUG=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_ALIGNMENT_16=y -CONFIG_X86_INTEL_USERCOPY=y -CONFIG_UML_X86=y -# CONFIG_64BIT is not set -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_HOST_2G_2G=y -CONFIG_TOP_ADDR=0x80000000 -# CONFIG_3_LEVEL_PGTABLES is not set -CONFIG_STUB_CODE=0x7fffe000 -CONFIG_STUB_DATA=0x7ffff000 -CONFIG_STUB_START=0x7fffe000 -CONFIG_ARCH_HAS_SC_SIGNALS=y -CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA=y -CONFIG_GENERIC_HWEIGHT=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y -# CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set -CONFIG_FLATMEM=y -CONFIG_FLAT_NODE_MEM_MAP=y -# CONFIG_SPARSEMEM_STATIC is not set -CONFIG_SPLIT_PTLOCK_CPUS=4 -CONFIG_LD_SCRIPT_DYN=y -CONFIG_NET=y +CONFIG_3_LEVEL_PGTABLES=y +CONFIG_64BIT=y +# CONFIG_6PACK is not set +# CONFIG_8139CP is not set +# CONFIG_9P_FS is not set +# CONFIG_ACENIC is not set +# CONFIG_ACORN_PARTITION is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_AIRO=m +CONFIG_AIRO_CS=m +# CONFIG_AMD8111_ETH is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_APPLICOM is not set +CONFIG_ARCH_FLATMEM_ENABLE=y +# CONFIG_ARCH_HAS_SC_SIGNALS is not set +# CONFIG_ARCH_REUSE_HOST_VSYSCALL_AREA is not set +# CONFIG_ARCNET is not set +CONFIG_ARPD=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_ATA is not set +# CONFIG_ATALK is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_ATM is not set +CONFIG_ATMEL=m +# CONFIG_ATM_AMBASSADOR is not set +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_DUMMY=m +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_LANAI is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +# CONFIG_ATM_NICSTAR is not set +CONFIG_ATM_TCP=m +# CONFIG_ATM_ZATM is not set +# CONFIG_AUDIT is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BASE_FULL=y +CONFIG_BASE_SMALL=0 +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +CONFIG_BCM43XX_PIO=y +# CONFIG_BCM43XX_PIO_MODE is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m -CONFIG_HOSTFS=y -# CONFIG_HPPFS is not set -CONFIG_MCONSOLE=y -CONFIG_MAGIC_SYSRQ=y -CONFIG_NEST_LEVEL=0 -# CONFIG_HIGHMEM is not set -CONFIG_KERNEL_STACK_ORDER=2 -CONFIG_UML_REAL_TIME_CLOCK=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID is not set +CONFIG_BLK_DEV_COW_COMMON=y +CONFIG_BLK_DEV_CRYPTOLOOP=m +# CONFIG_BLK_DEV_DAC960 is not set +CONFIG_BLK_DEV_INITRD=y +# CONFIG_BLK_DEV_IO_TRACE is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +CONFIG_BLK_DEV_SD=m +# CONFIG_BLK_DEV_SR is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_UBD=y +CONFIG_BLK_DEV_UBD_SYNC=y +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLOCK=y +# CONFIG_BNX2 is not set +CONFIG_BONDING=m +# CONFIG_BPQETHER is not set +CONFIG_BRIDGE=y +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE_NF_EBTABLES=m CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -CONFIG_POSIX_MQUEUE=y +CONFIG_BSD_DISKLABEL=y CONFIG_BSD_PROCESS_ACCT=y # CONFIG_BSD_PROCESS_ACCT_V3 is not set -CONFIG_SYSCTL=y -# CONFIG_AUDIT is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y -CONFIG_RELAY=y -CONFIG_INITRAMFS_SOURCE="" -CONFIG_UID16=y -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -# CONFIG_EMBEDDED is not set -CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set -CONFIG_KALLSYMS_EXTRA_PASS=y -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y +# CONFIG_BT is not set +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBPA10X=m +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIDTL1 is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIVHCI=m +CONFIG_BT_HIDP=m +CONFIG_BT_L2CAP=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_SCO=m CONFIG_BUG=y -CONFIG_ELF_CORE=y -CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set -CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -CONFIG_LBD=y -# CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=y -CONFIG_IOSCHED_CFQ=y +CONFIG_CARDBUS=y +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_CASSINI is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_CHELSIO_T1 is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CICADA_PHY is not set +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CLS_U32_MARK=y +CONFIG_CLS_U32_PERF=y +CONFIG_CMDLINE="" +# CONFIG_CODA_FS is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_CONNECTOR is not set +CONFIG_CON_CHAN="xterm" +CONFIG_CON_ZERO_CHAN="fd:0,fd:1" +CONFIG_CRAMFS=y +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +CONFIG_CROSSCOMPILE=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_AES_X86_64 is not set +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +# CONFIG_CRYPTO_TWOFISH_X86_64 is not set +CONFIG_CRYPTO_WP512=m +# CONFIG_DAVICOM_PHY is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_FS 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_DECNET is not set CONFIG_DEFAULT_AS=y -# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_BIC is not set # CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_CUBIC is not set +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_HTCP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" - -# -# Block devices -# -CONFIG_BLK_DEV_UBD=y -CONFIG_BLK_DEV_UBD_SYNC=y -CONFIG_BLK_DEV_COW_COMMON=y -# CONFIG_MMAPPER is not set -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_CRYPTOLOOP=y -CONFIG_BLK_DEV_NBD=y -CONFIG_BLK_DEV_RAM=y -CONFIG_BLK_DEV_RAM_COUNT=16 -CONFIG_BLK_DEV_RAM_SIZE=4096 -CONFIG_BLK_DEV_INITRD=y -# CONFIG_ATA_OVER_ETH is not set - -# -# Character Devices -# -CONFIG_STDERR_CONSOLE=y -CONFIG_STDIO_CONSOLE=y -CONFIG_SSL=y -CONFIG_NULL_CHAN=y -CONFIG_PORT_CHAN=y -CONFIG_PTY_CHAN=y -CONFIG_TTY_CHAN=y -CONFIG_XTERM_CHAN=y -# CONFIG_NOCONFIG_CHAN is not set -CONFIG_CON_ZERO_CHAN="fd:0,fd:1" -CONFIG_CON_CHAN="xterm" -CONFIG_SSL_CHAN="pty" -CONFIG_UNIX98_PTYS=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y -CONFIG_SOFT_WATCHDOG=m -CONFIG_UML_WATCHDOG=m -CONFIG_UML_SOUND=m -CONFIG_SOUND=m -CONFIG_HOSTAUDIO=m -CONFIG_UML_RANDOM=y - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y +# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="vegas" +CONFIG_DEFAULT_VEGAS=y +# CONFIG_DEFAULT_WESTWOOD is not set +CONFIG_DEFCONFIG_LIST="arch/$ARCH/defconfig" +CONFIG_DETECT_SOFTLOCKUP=y +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DGRS is not set +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_DL2K is not set +# CONFIG_DMA_ENGINE is not set +CONFIG_DNOTIFY=y +# CONFIG_DRM is not set +# CONFIG_DTLK is not set +# CONFIG_DUMMY is not set +# CONFIG_DVB is not set +CONFIG_E100=m +# CONFIG_E1000 is not set +# CONFIG_ECONET is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EFS_FS is not set +CONFIG_ELF_CORE=y +# CONFIG_EMBEDDED is not set +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_EPIC100 is not set +CONFIG_EPOLL=y +# CONFIG_EQUALIZER is not set +CONFIG_EXPERIMENTAL=y +CONFIG_EXPORTFS=m +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# 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_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_FAT_FS=m +# CONFIG_FB is not set +# CONFIG_FDDI is not set +# CONFIG_FEALNX is not set +CONFIG_FIB_RULES=y +CONFIG_FLATMEM=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLAT_NODE_MEM_MAP=y +# CONFIG_FORCEDETH is not set +# CONFIG_FORCED_INLINING is not set +CONFIG_FRAME_POINTER=y +CONFIG_FS_POSIX_ACL=y +# CONFIG_FTL is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set +# CONFIG_FUSION_SPI is not set +CONFIG_FUTEX=y # CONFIG_FW_LOADER is not set -# CONFIG_DEBUG_DRIVER is not set - -# -# Networking -# - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m +CONFIG_GACT_PROB=y +# CONFIG_GAMEPORT is not set +# CONFIG_GCOV is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_TIME=y +# CONFIG_GFS2_FS is not set +# CONFIG_GPROF is not set +# CONFIG_HAMACHI is not set +# CONFIG_HAMRADIO is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_HERMES=m +CONFIG_HFSPLUS_FS=m +CONFIG_HFS_FS=m +# CONFIG_HIPPI is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_CS=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_PLX=m +CONFIG_HOSTAUDIO=m +CONFIG_HOSTFS=y +CONFIG_HOTPLUG=y +# CONFIG_HOTPLUG_PCI is not set +# CONFIG_HP100 is not set +# CONFIG_HPFS_FS is not set +# CONFIG_HPPFS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_HZ_1000 is not set +# CONFIG_I2O is not set +# CONFIG_I82092 is not set +# CONFIG_IEEE1394 is not set +CONFIG_IEEE80211=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +# CONFIG_IFB is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -# CONFIG_IP_ROUTE_FWMARK is not set -CONFIG_IP_ROUTE_MULTIPATH=y -CONFIG_IP_ROUTE_MULTIPATH_CACHED=y -CONFIG_IP_ROUTE_MULTIPATH_RR=y -CONFIG_IP_ROUTE_MULTIPATH_RANDOM=y -CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=y -CONFIG_IP_ROUTE_MULTIPATH_DRR=y -CONFIG_IP_ROUTE_VERBOSE=y -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -CONFIG_NET_IPGRE_BROADCAST=y -CONFIG_IPSEC_NAT_TRAVERSAL=y -# CONFIG_IP_MROUTE is not set -CONFIG_ARPD=y -# CONFIG_SYN_COOKIES is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET_AH=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_INET_DIAG=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -CONFIG_INET_DIAG=m CONFIG_INET_TCP_DIAG=m -CONFIG_TCP_CONG_ADVANCED=y - -# -# TCP congestion control -# -CONFIG_TCP_CONG_BIC=y -CONFIG_TCP_CONG_CUBIC=m -CONFIG_TCP_CONG_WESTWOOD=m -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=m -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_TUNNEL=m +# CONFIG_INFINIBAND is not set +# CONFIG_INFTL is not set +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INIT_ENV_ARG_LIMIT=128 +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_INPUT is not set +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_TSDEV is not set +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_CFQ=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m +# CONFIG_IPC_NS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y CONFIG_IPV6=m +# CONFIG_IPV6_MIP6 is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_PRIVACY is not set CONFIG_IPV6_ROUTER_PREF=y # CONFIG_IPV6_ROUTE_INFO is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_SIT=m CONFIG_IPV6_TUNNEL=m -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -CONFIG_BRIDGE_NETFILTER=y - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=m -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m -# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y - -# -# IP: Netfilter Configuration -# +CONFIG_IPW2100=m +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2200=m +# CONFIG_IPW2200_DEBUG is not set +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPX is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_DCCP=m +CONFIG_IP_DCCP_ACKVEC=y +CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=m +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_IP_DCCP_TFRC_LIB=m +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_IPP2P=m -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 +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=y -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=m +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=m -CONFIG_IP_NF_TARGET_REDIRECT=m -CONFIG_IP_NF_TARGET_ROUTE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -CONFIG_IP_NF_NAT_SNMP_BASIC=m -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_NAT_PPTP=m 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_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_TFTP=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_SET=m -CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPHASH=m CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_IPTREE=m CONFIG_IP_NF_SET_MACIPMAP=m -CONFIG_IP_NF_SET_PORTMAP=m -CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_NETHASH=m -CONFIG_IP_NF_SET_IPTREE=m -CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_IMQ=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_TARGET_SET=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_IMQ=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_TARGET_ROUTE=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set +# CONFIG_IP_VS is not set +# CONFIG_IRDA is not set +CONFIG_IRQ_RELEASE_METHOD=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISDN is not set +CONFIG_ISO9660_FS=m +# CONFIG_IXGB is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS_FS is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_JOLIET=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +# CONFIG_KARMA_PARTITION is not set +CONFIG_KERNEL_STACK_ORDER=2 +# CONFIG_KEYS is not set +# CONFIG_KMOD is not set +# CONFIG_LAPB is not set +# CONFIG_LASAT is not set +CONFIG_LBD=y +# CONFIG_LDM_PARTITION is not set +CONFIG_LD_SCRIPT_DYN=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +CONFIG_LIBCRC32C=m CONFIG_LLC=y # CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# 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 - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -# CONFIG_NET_SCH_CLK_JIFFIES is not set -CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -CONFIG_NET_SCH_NETEM=m -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCKD=m +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_LOCKD_V4=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_LSF is not set +# CONFIG_LXT_PHY is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_MARKEINS is not set +# CONFIG_MARVELL_PHY is not set +CONFIG_MCONSOLE=y +# CONFIG_MD is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_SAS is not set +CONFIG_MII=y +CONFIG_MINIX_FS=m +# CONFIG_MINIX_SUBPARTITION is not set +CONFIG_MINI_FO=m +CONFIG_MKISS=m +# CONFIG_MMAPPER is not set +# CONFIG_MMC is not set +CONFIG_MMU=y +CONFIG_MODE_SKAS=y +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +CONFIG_MSDOS_FS=m +CONFIG_MSDOS_PARTITION=y +# CONFIG_MYRI10GE is not set +# CONFIG_NCP_FS is not set +CONFIG_NEST_LEVEL=0 +CONFIG_NET=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETDEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +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 +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=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +# CONFIG_NETPOLL is not set +# CONFIG_NETROM is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_ACT_GACT=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_POLICE=m +# CONFIG_NET_ACT_SIMP is not set CONFIG_NET_CLS=y +CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -CONFIG_CLS_U32_PERF=y -CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_IND=y +CONFIG_NET_CLS_POLICE=y +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_ROUTE4=m CONFIG_NET_CLS_RSVP=m CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_U32=m CONFIG_NET_EMATCH=y -CONFIG_NET_EMATCH_STACK=32 CONFIG_NET_EMATCH_CMP=m -CONFIG_NET_EMATCH_NBYTE=m -CONFIG_NET_EMATCH_U32=m CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_STACK=32 CONFIG_NET_EMATCH_TEXT=m -CONFIG_NET_CLS_ACT=y -CONFIG_NET_ACT_POLICE=m -CONFIG_NET_ACT_GACT=m -CONFIG_GACT_PROB=y -CONFIG_NET_ACT_MIRRED=m -CONFIG_NET_ACT_IPT=m -CONFIG_NET_ACT_PEDIT=m -CONFIG_NET_ACT_SIMP=m -CONFIG_NET_CLS_IND=y +CONFIG_NET_EMATCH_U32=m CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -# CONFIG_IRDA is not set -# CONFIG_BT is not set -CONFIG_IEEE80211=m -CONFIG_IEEE80211_DEBUG=y -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_SOFTMAC=m -# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set -CONFIG_WIRELESS_EXT=y - -# -# UML Network Devices -# -CONFIG_UML_NET=y -CONFIG_UML_NET_ETHERTAP=y -CONFIG_UML_NET_TUNTAP=y -CONFIG_UML_NET_SLIP=y -CONFIG_UML_NET_DAEMON=y -CONFIG_UML_NET_MCAST=y -# CONFIG_UML_NET_PCAP is not set -CONFIG_UML_NET_SLIRP=y - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_IFB is not set -CONFIG_DUMMY=m -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -CONFIG_IMQ=m -# CONFIG_IMQ_BEHAVIOR_AA is not set -# CONFIG_IMQ_BEHAVIOR_AB is not set -CONFIG_IMQ_BEHAVIOR_BA=y -# CONFIG_IMQ_BEHAVIOR_BB is not set -CONFIG_IMQ_NUM_DEVS=2 -CONFIG_TUN=m - -# -# PHY device support -# - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set - -# -# Wan interfaces -# -CONFIG_WAN=y -# CONFIG_SYNCLINK_SYNCPPP is not set -# CONFIG_HDLC is not set -# CONFIG_DLCI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -CONFIG_PPP_SYNC_TTY=m -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_SLIP=m -# CONFIG_SLIP_COMPRESSED is not set -# CONFIG_SLIP_SMART is not set -# CONFIG_SLIP_MODE_SLIP6 is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set +CONFIG_NET_ETHERNET=y +# CONFIG_NET_FC is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_NET_IPIP=m +CONFIG_NET_KEY=m +CONFIG_NET_PCI=y +# CONFIG_NET_PCMCIA is not set +CONFIG_NET_PKTGEN=m # CONFIG_NET_POLL_CONTROLLER is not set - -# -# Connector - unified userspace <-> kernelspace linker -# -# CONFIG_CONNECTOR is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=y -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=y -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=y -# CONFIG_REISERFS_CHECK is not set -CONFIG_REISERFS_PROC_INFO=y -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -CONFIG_FS_POSIX_ACL=y -CONFIG_XFS_FS=m -CONFIG_XFS_EXPORT=y -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set -# CONFIG_XFS_POSIX_ACL is not set -# CONFIG_XFS_RT is not set -# CONFIG_OCFS2_FS is not set -CONFIG_MINI_FO=m -CONFIG_MINIX_FS=m -CONFIG_ROMFS_FS=y -CONFIG_INOTIFY=y -CONFIG_QUOTA=y -# CONFIG_QFMT_V1 is not set -# CONFIG_QFMT_V2 is not set -CONFIG_QUOTACTL=y -CONFIG_DNOTIFY=y -CONFIG_AUTOFS_FS=m -CONFIG_AUTOFS4_FS=m -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y -CONFIG_ZISOFS=y -CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -CONFIG_NTFS_FS=m -# CONFIG_NTFS_DEBUG is not set -# CONFIG_NTFS_RW is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -CONFIG_PROC_KCORE=y -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -CONFIG_CRAMFS=y -CONFIG_SQUASHFS=y -CONFIG_SQUASHFS_EMBEDDED=y -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -CONFIG_NFS_V3_ACL=y -# CONFIG_NFS_V4 is not set -# CONFIG_NFS_DIRECTIO is not set +# CONFIG_NET_RADIO is not set +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_CBQ=m +# CONFIG_NET_SCH_CLK_CPU is not set +CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y +# CONFIG_NET_SCH_CLK_JIFFIES is not set +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_TEQL=m +# CONFIG_NET_TULIP is not set +CONFIG_NET_WIRELESS=y +CONFIG_NET_WIRELESS_RTNETLINK=y +CONFIG_NEW_LEDS=y CONFIG_NFSD=m -CONFIG_NFSD_V2_ACL=y -CONFIG_NFSD_V3=y -CONFIG_NFSD_V3_ACL=y -# CONFIG_NFSD_V4 is not set CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -# CONFIG_RPCSEC_GSS_KRB5 is not set -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp437" -CONFIG_CIFS=m -CONFIG_CIFS_STATS=y -# CONFIG_CIFS_STATS2 is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -CONFIG_9P_FS=m - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -# CONFIG_MAC_PARTITION is not set -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=y -CONFIG_NLS_DEFAULT="iso8859-1" +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFTL is not set +CONFIG_NLS=m +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_CODEPAGE_437=m # CONFIG_NLS_CODEPAGE_737 is not set # CONFIG_NLS_CODEPAGE_775 is not set @@ -778,129 +734,547 @@ CONFIG_NLS_CODEPAGE_850=m # CONFIG_NLS_CODEPAGE_865 is not set # CONFIG_NLS_CODEPAGE_866 is not set # CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_874 is not set # CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set # CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_DEFAULT="iso8859-1" CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set # CONFIG_NLS_ISO8859_5 is not set # CONFIG_NLS_ISO8859_6 is not set # CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set # CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m # CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=m - -# -# Security options -# -# CONFIG_KEYS is not set +CONFIG_NOCONFIG_CHAN=y +CONFIG_NORTEL_HERMES=m +# CONFIG_NS83820 is not set +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +# CONFIG_NULL_CHAN is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +# CONFIG_PARPORT is not set +CONFIG_PARTITION_ADVANCED=y +CONFIG_PCCARD=m +CONFIG_PCCARD_NONSTATIC=m +CONFIG_PCI=y +CONFIG_PCI_ATMEL=m +CONFIG_PCI_HERMES=m +CONFIG_PCMCIA=m +# CONFIG_PCMCIA_AHA152X is not set +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_HERMES is not set +# CONFIG_PCMCIA_IOCTL is not set +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_RAYCS is not set +# CONFIG_PCMCIA_SPECTRUM is not set +# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_WL3501 is not set +# CONFIG_PCNET32 is not set +# CONFIG_PD6729 is not set +# CONFIG_PHONE is not set +# CONFIG_PHYLIB is not set +CONFIG_PLIST=y +CONFIG_PLX_HERMES=m +CONFIG_PORT_CHAN=y +CONFIG_POSIX_MQUEUE=y +CONFIG_PPP=m +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +# CONFIG_PPP_MULTILINK is not set +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_PRINTK=y +# CONFIG_PRINTK_TIME is not set +CONFIG_PRISM54=m +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROFILING is not set +CONFIG_PTY_CHAN=y +# CONFIG_QEMU is not set +# CONFIG_QLA3XXX is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_R3964 is not set +# CONFIG_R8169 is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MAXIRADIO is not set +# CONFIG_RAID_ATTRS is not set +CONFIG_RAMFS=y +# CONFIG_RAW_DRIVER is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_REISERFS_PROC_INFO is not set +CONFIG_RELAY=y +CONFIG_RESOURCES_64BIT=y +# CONFIG_RFD_FTL is not set +CONFIG_ROMFS_FS=m +# CONFIG_ROSE is not set +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_RTC_CLASS is not set +CONFIG_RT_MUTEXES=y +# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_S2IO is not set +# CONFIG_SCHEDSTATS is not set +CONFIG_SCSI=m +# CONFIG_SCSI_3W_9XXX is not set +# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_AIC79XX is not set +# CONFIG_SCSI_AIC7XXX is not set +# CONFIG_SCSI_AIC7XXX_OLD is not set +# CONFIG_SCSI_AIC94XX is not set +# CONFIG_SCSI_ARCMSR is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DPT_I2O is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_FUTURE_DOMAIN is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_LPFC is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_NSP32 is not set +CONFIG_SCSI_PROC_FS=y +# CONFIG_SCSI_QLA_FC is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_STEX is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=y -# CONFIG_CRYPTO_AES_586 is not set -# CONFIG_CRYPTO_AES_X86_64 is not set -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -CONFIG_CRYPTO_DEFLATE=m -# CONFIG_CRYPTO_MICHAEL_MIC is not set -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# - -# -# Library routines -# -CONFIG_CRC_CCITT=m -# CONFIG_CRC16 is not set -CONFIG_CRC32=m -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y -CONFIG_ZLIB_DEFLATE=m +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SEMAPHORE_SLEEPERS=y +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_CS=m +CONFIG_SERIAL_8250_NR_UARTS=2 +# CONFIG_SERIAL_8250_PCI is not set +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_SERIO is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_SHAPER is not set +CONFIG_SHMEM=y +# CONFIG_SIS190 is not set +# CONFIG_SIS900 is not set +# CONFIG_SK98LIN is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +CONFIG_SLAB=y +CONFIG_SLHC=m +CONFIG_SLIP=m +# CONFIG_SLIP_COMPRESSED is not set +# CONFIG_SLIP_MODE_SLIP6 is not set +# CONFIG_SLIP_SMART is not set +# CONFIG_SLOB is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +CONFIG_SMP_BROKEN=y +CONFIG_SND=m +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# 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_DARLA24 is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +CONFIG_SND_HWDEP=m +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_MIXART is not set +CONFIG_SND_MIXER_OSS=m +# CONFIG_SND_MONA is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_NM256 is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_PCM=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_PDAUDIOCF is not set +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_TIMER=m +# CONFIG_SND_TRIDENT is not set +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_VXPOCKET is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SNI_RM200_PCI is not set +CONFIG_SOFT_WATCHDOG=m +# CONFIG_SOLARIS_X86_PARTITION is not set +CONFIG_SOUND=m +# CONFIG_SOUND_PRIME is not set +# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_SPARSEMEM_STATIC is not set +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_SSFDC is not set +CONFIG_SSL=y +CONFIG_SSL_CHAN="pty" +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_STANDALONE=y +# CONFIG_STATIC_LINK is not set +CONFIG_STDERR_CONSOLE=y +CONFIG_STDIO_CONSOLE=y +# CONFIG_STRIP is not set +CONFIG_STUB_CODE=0x7fbfffe000 +CONFIG_STUB_DATA=0x7fbffff000 +CONFIG_STUB_START=0x7fbfffe000 +# CONFIG_SUNDANCE is not set +# CONFIG_SUNGEM is not set +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +# CONFIG_SUN_PARTITION is not set +CONFIG_SWAP=y +# CONFIG_SYNCLINK_CS is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_SYSCTL=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +# CONFIG_SYSV_FS is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_TASKSTATS is not set +# CONFIG_TCG_TPM is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_WESTWOOD=m CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m CONFIG_TEXTSEARCH_BM=m CONFIG_TEXTSEARCH_FSM=m - -# -# Multi-device support (RAID and LVM) -# -CONFIG_MD=y -CONFIG_BLK_DEV_MD=m -CONFIG_MD_LINEAR=m -CONFIG_MD_RAID0=m -CONFIG_MD_RAID1=m -CONFIG_MD_RAID10=m -CONFIG_MD_RAID5=m -# CONFIG_MD_RAID5_RESHAPE is not set -CONFIG_MD_RAID6=m -CONFIG_MD_MULTIPATH=m -# CONFIG_MD_FAULTY is not set -CONFIG_BLK_DEV_DM=y -CONFIG_DM_CRYPT=y -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -# CONFIG_INPUT is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -CONFIG_DEBUG_KERNEL=y -CONFIG_LOG_BUF_SHIFT=14 -CONFIG_DETECT_SOFTLOCKUP=y -# CONFIG_SCHEDSTATS is not set -CONFIG_DEBUG_SLAB=y -# CONFIG_DEBUG_SLAB_LEAK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_INFO=y -# CONFIG_DEBUG_FS is not set -# CONFIG_DEBUG_VM is not set -CONFIG_FRAME_POINTER=y +CONFIG_TEXTSEARCH_KMP=m +# CONFIG_TIFM_CORE is not set +# CONFIG_TIGON3 is not set +# CONFIG_TINY_SHMEM is not set +# CONFIG_TIPC is not set +# CONFIG_TLAN is not set +CONFIG_TMD_HERMES=m +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +CONFIG_TOP_ADDR=0x80000000 +# CONFIG_TR is not set +# CONFIG_TRACE_IRQFLAGS_SUPPORT is not set +CONFIG_TTY_CHAN=y +CONFIG_TUN=m +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y +# CONFIG_UFS_FS is not set +CONFIG_UID16=y +# CONFIG_ULTRIX_PARTITION is not set +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_UNIX=y +CONFIG_UNIX98_PTYS=y +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_UNUSED_SYMBOLS is not set CONFIG_UNWIND_INFO=y -# CONFIG_FORCED_INLINING is not set -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_GPROF is not set -# CONFIG_GCOV is not set -# CONFIG_SYSCALL_DEBUG is not set +CONFIG_USB=m +# CONFIG_USB_ACECAD is not set +CONFIG_USB_ACM=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_APPLETOUCH is not set +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +CONFIG_USB_ATM=m +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_CATC=m +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_DABUSB is not set +# CONFIG_USB_DEBUG is not set +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DSBR is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_EZUSB=y +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_HID is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_KAWETH=m +# CONFIG_USB_KBD is not set +# CONFIG_USB_KBTAB is not set +# CONFIG_USB_KEYSPAN_REMOTE is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LIBUSUAL is not set +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_MOUSE is not set +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_OTG is not set +CONFIG_USB_PEGASUS=m +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_POWERMATE is not set +CONFIG_USB_PRINTER=m +# CONFIG_USB_RIO500 is not set +CONFIG_USB_RTL8150=m +CONFIG_USB_SERIAL=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_XIRCOM=m +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_SL811_HCD is not set +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_STORAGE=m +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_KARMA=y +# CONFIG_USB_STORAGE_ONETOUCH is not set +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_USBAT=y +# CONFIG_USB_TEST is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_USBNET=m +CONFIG_USB_USBNET_MII=m +# CONFIG_USB_WACOM is not set +# CONFIG_USB_XPAD is not set +# CONFIG_USB_XUSBATM is not set +# CONFIG_USB_YEALINK is not set +CONFIG_USB_ZD1201=m +# CONFIG_UTS_NS is not set +CONFIG_VFAT_FS=m +# CONFIG_VIA_VELOCITY is not set +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_VLAN_8021Q=y +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_VT is not set +# CONFIG_VXFS_FS is not set +# CONFIG_W1 is not set +# CONFIG_WAN is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y +# CONFIG_WDTPCI is not set +CONFIG_WIRELESS_EXT=y +# CONFIG_WR_PPMC is not set +# CONFIG_X25 is not set +CONFIG_XFRM=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_USER=m +CONFIG_XFS_FS=m +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_SECURITY is not set +CONFIG_XTERM_CHAN=y +# CONFIG_YAM is not set +# CONFIG_YELLOWFIN is not set +CONFIG_YENTA=m +# CONFIG_YENTA_O2 is not set +# CONFIG_YENTA_RICOH is not set +# CONFIG_YENTA_TI is not set +# CONFIG_YENTA_TOSHIBA is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_ZISOFS=y +CONFIG_ZISOFS_FS=m +CONFIG_ZLIB_DEFLATE=m +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/uml-2.6/config-diff b/target/linux/uml-2.6/config-diff new file mode 100644 index 0000000000..0bc59aacea --- /dev/null +++ b/target/linux/uml-2.6/config-diff @@ -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 diff --git a/target/linux/uml-2.6/patches/01-no_syscallx b/target/linux/uml-2.6/patches/01-no_syscallx deleted file mode 100644 index 6b542d0ea1..0000000000 --- a/target/linux/uml-2.6/patches/01-no_syscallx +++ /dev/null @@ -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; - } diff --git a/target/linux/uml-2.6/patches/02-missing_definitions.patch b/target/linux/uml-2.6/patches/02-missing_definitions.patch deleted file mode 100644 index 7facbfff3b..0000000000 --- a/target/linux/uml-2.6/patches/02-missing_definitions.patch +++ /dev/null @@ -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; - diff --git a/target/linux/uml-2.6/patches/03-missing_include.patch b/target/linux/uml-2.6/patches/03-missing_include.patch deleted file mode 100644 index 1245082db9..0000000000 --- a/target/linux/uml-2.6/patches/03-missing_include.patch +++ /dev/null @@ -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" diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile index 1c61bd3195..c7835bd48e 100644 --- a/target/linux/x86-2.6/Makefile +++ b/target/linux/x86-2.6/Makefile @@ -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 diff --git a/target/linux/x86-2.6/config b/target/linux/x86-2.6/config index 02aee5cf81..d4fc547e50 100644 --- a/target/linux/x86-2.6/config +++ b/target/linux/x86-2.6/config @@ -1,2089 +1,1625 @@ -# -# Automatically generated make config: don't edit -# Linux kernel version: 2.6.17 -# Tue Oct 31 22:13:20 2006 -# -CONFIG_X86_32=y -CONFIG_SEMAPHORE_SLEEPERS=y -CONFIG_X86=y -CONFIG_MMU=y -CONFIG_GENERIC_ISA_DMA=y -CONFIG_GENERIC_IOMAP=y -CONFIG_GENERIC_HWEIGHT=y +# CONFIG_3C515 is not set +# CONFIG_60XX_WDT is not set +# CONFIG_6PACK is not set +# CONFIG_8139CP 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_9P_FS is not set +# CONFIG_AC3200 is not set +# CONFIG_ACENIC is not set +# CONFIG_ACORN_PARTITION is not set +# CONFIG_ACPI is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_ADFS_FS is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_AFFS_FS is not set +# CONFIG_AFS_FS is not set +# CONFIG_AGP is not set +CONFIG_AIRO=m +CONFIG_AIRO_CS=m +# CONFIG_ALIM1535_WDT is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_APPLICOM is not set +# CONFIG_APRICOT is not set +CONFIG_ARCH_FLATMEM_ENABLE=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y -CONFIG_DMI=y - -# -# Code maturity level options -# -CONFIG_EXPERIMENTAL=y -CONFIG_BROKEN_ON_SMP=y -CONFIG_INIT_ENV_ARG_LIMIT=32 - -# -# General setup -# -CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -CONFIG_SWAP=y -CONFIG_SYSVIPC=y -# CONFIG_POSIX_MQUEUE is not set -# CONFIG_BSD_PROCESS_ACCT is not set -CONFIG_SYSCTL=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +# CONFIG_ARCNET is not set +# CONFIG_ARLAN is not set +CONFIG_ARPD=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_AT1700 is not set +# CONFIG_ATA is not set +# CONFIG_ATALK is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_ATA_OVER_ETH is not set +CONFIG_ATM=m +CONFIG_ATMEL=m +# CONFIG_ATM_AMBASSADOR is not set +CONFIG_ATM_BR2684=m +CONFIG_ATM_BR2684_IPFILTER=y +CONFIG_ATM_CLIP=m +CONFIG_ATM_CLIP_NO_ICMP=y +CONFIG_ATM_DUMMY=m +# CONFIG_ATM_ENI is not set +# CONFIG_ATM_FIRESTREAM is not set +# CONFIG_ATM_FORE200E_MAYBE is not set +# CONFIG_ATM_HE is not set +# CONFIG_ATM_HORIZON is not set +# CONFIG_ATM_IA is not set +# CONFIG_ATM_IDT77252 is not set +# CONFIG_ATM_LANAI is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +# CONFIG_ATM_NICSTAR is not set +CONFIG_ATM_TCP=m +# CONFIG_ATM_ZATM is not set # CONFIG_AUDIT is not set -# CONFIG_IKCONFIG is not set -# CONFIG_RELAY is not set -CONFIG_INITRAMFS_SOURCE="../../root" -CONFIG_INITRAMFS_ROOT_UID=0 -CONFIG_INITRAMFS_ROOT_GID=0 -CONFIG_UID16=y -# CONFIG_VM86 is not set -CONFIG_CC_OPTIMIZE_FOR_SIZE=y -CONFIG_EMBEDDED=y -# CONFIG_KALLSYMS is not set -CONFIG_HOTPLUG=y -CONFIG_PRINTK=y -CONFIG_BUG=y -# CONFIG_ELF_CORE is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_AUTOFS_FS is not set +CONFIG_AX25=m +# CONFIG_AX25_DAMA_SLAVE is not set +# CONFIG_B44 is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set CONFIG_BASE_FULL=y -CONFIG_FUTEX=y -CONFIG_EPOLL=y -CONFIG_SHMEM=y -CONFIG_SLAB=y -# CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -# CONFIG_SLOB is not set - -# -# Loadable module support -# -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -# CONFIG_MODULE_FORCE_UNLOAD is not set -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -# CONFIG_KMOD is not set - -# -# Block layer -# -# CONFIG_LBD is not set +# CONFIG_BASLER_EXCITE is not set +# CONFIG_BAYCOM_SER_FDX is not set +# CONFIG_BAYCOM_SER_HDX is not set +CONFIG_BCM43XX=m +CONFIG_BCM43XX_DEBUG=y +CONFIG_BCM43XX_DMA=y +CONFIG_BCM43XX_DMA_AND_PIO_MODE=y +# CONFIG_BCM43XX_DMA_MODE is not set +CONFIG_BCM43XX_PIO=y +# CONFIG_BCM43XX_PIO_MODE is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_MISC is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_DEV_3W_XXXX_RAID 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_COW_COMMON is not set +CONFIG_BLK_DEV_CRYPTOLOOP=m +# 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_DAC960 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_INITRD=y # CONFIG_BLK_DEV_IO_TRACE is not set -# CONFIG_LSF is not set - -# -# IO Schedulers -# -CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set -CONFIG_IOSCHED_DEADLINE=y -# CONFIG_IOSCHED_CFQ is not set +# CONFIG_BLK_DEV_IT821X is not set +# CONFIG_BLK_DEV_JMICRON is not set +CONFIG_BLK_DEV_LOOP=m +CONFIG_BLK_DEV_NBD=m +# 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_RAM is not set +# CONFIG_BLK_DEV_RZ1000 is not set +CONFIG_BLK_DEV_SC1200=y +CONFIG_BLK_DEV_SD=m +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SIS5513 is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_UB is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_VIA82CXXX=y +# CONFIG_BLK_DEV_XD is not set +CONFIG_BLOCK=y +# CONFIG_BNX2 is not set +CONFIG_BONDING=m +# CONFIG_BPQETHER is not set +CONFIG_BRIDGE=y +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_NETFILTER=y +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BROKEN_ON_SMP=y +CONFIG_BSD_DISKLABEL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_BT=m +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIBLUECARD is not set +CONFIG_BT_HCIBPA10X=m +# CONFIG_BT_HCIBT3C is not set +# CONFIG_BT_HCIBTUART is not set +# CONFIG_BT_HCIDTL1 is not set +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y +CONFIG_BT_HCIVHCI=m +CONFIG_BT_HIDP=m +CONFIG_BT_L2CAP=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_SCO=m +CONFIG_BUG=y +CONFIG_CARDBUS=y +# CONFIG_CARDMAN_4000 is not set +# CONFIG_CARDMAN_4040 is not set +# CONFIG_CASSINI is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_CD_NO_IDESCSI is not set +# CONFIG_CHELSIO_T1 is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CICADA_PHY is not set +CONFIG_CIFS=m +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_EXPERIMENTAL is not set +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_STATS=y +# CONFIG_CIFS_STATS2 is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_XATTR is not set +CONFIG_CLS_U32_MARK=y +CONFIG_CLS_U32_PERF=y +CONFIG_CMDLINE="" +# CONFIG_CODA_FS is not set +CONFIG_COMPAT_VDSO=y +CONFIG_CONFIGFS_FS=y +# CONFIG_CONNECTOR is not set +# 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_CRAMFS is not set +CONFIG_CRC16=m +CONFIG_CRC32=y +CONFIG_CRC_CCITT=m +CONFIG_CROSSCOMPILE=y +CONFIG_CRYPTO=y +CONFIG_CRYPTO_AES=m +CONFIG_CRYPTO_AES_586=m +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=m +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CRC32C=m +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_DEV_PADLOCK is not set +CONFIG_CRYPTO_ECB=m +CONFIG_CRYPTO_HASH=m +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TEST=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_586=m +CONFIG_CRYPTO_TWOFISH_COMMON=m +CONFIG_CRYPTO_WP512=m +# CONFIG_CS5535_GPIO is not set +# CONFIG_CS89x0 is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_DCDBAS is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DECNET is not set # CONFIG_DEFAULT_AS is not set -CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_BIC is not set # CONFIG_DEFAULT_CFQ is not set -# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_CUBIC is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_HTCP is not set CONFIG_DEFAULT_IOSCHED="deadline" - -# -# Processor type and features -# -CONFIG_SCx200HR_TIMER=y -# CONFIG_SMP is not set -CONFIG_X86_PC=y -# CONFIG_X86_ELAN is not set -# CONFIG_X86_VOYAGER is not set -# CONFIG_X86_NUMAQ is not set -# CONFIG_X86_SUMMIT is not set -# CONFIG_X86_BIGSMP is not set -# CONFIG_X86_VISWS is not set -# CONFIG_X86_GENERICARCH is not set -# CONFIG_X86_ES7000 is not set -# CONFIG_M386 is not set -CONFIG_M486=y -# CONFIG_M586 is not set -# CONFIG_M586TSC is not set -# CONFIG_M586MMX is not set -# CONFIG_M686 is not set -# CONFIG_MPENTIUMII is not set -# CONFIG_MPENTIUMIII is not set -# CONFIG_MPENTIUMM is not set -# CONFIG_MPENTIUM4 is not set -# CONFIG_MK6 is not set -# CONFIG_MK7 is not set -# CONFIG_MK8 is not set -# CONFIG_MCRUSOE is not set -# CONFIG_MEFFICEON is not set -# CONFIG_MWINCHIPC6 is not set -# CONFIG_MWINCHIP2 is not set -# CONFIG_MWINCHIP3D is not set -# CONFIG_MGEODEGX1 is not set -# CONFIG_MGEODE_LX is not set -# CONFIG_MCYRIXIII is not set -# CONFIG_MVIAC3_2 is not set -# CONFIG_X86_GENERIC is not set -CONFIG_X86_CMPXCHG=y -CONFIG_X86_XADD=y -CONFIG_X86_L1_CACHE_SHIFT=4 -CONFIG_RWSEM_XCHGADD_ALGORITHM=y -CONFIG_GENERIC_CALIBRATE_DELAY=y -CONFIG_X86_PPRO_FENCE=y -CONFIG_X86_F00F_BUG=y -CONFIG_X86_WP_WORKS_OK=y -CONFIG_X86_INVLPG=y -CONFIG_X86_BSWAP=y -CONFIG_X86_POPAD_OK=y -CONFIG_X86_ALIGNMENT_16=y -# CONFIG_HPET_TIMER is not set -CONFIG_PREEMPT_NONE=y -# CONFIG_PREEMPT_VOLUNTARY is not set -# CONFIG_PREEMPT is not set -# CONFIG_X86_UP_APIC is not set -# CONFIG_X86_MCE is not set -# CONFIG_TOSHIBA is not set -# CONFIG_I8K is not set -# CONFIG_X86_REBOOTFIXUPS is not set -# CONFIG_MICROCODE is not set -# CONFIG_X86_MSR is not set -# CONFIG_X86_CPUID is not set - -# -# Firmware Drivers -# -# CONFIG_EDD is not set +# CONFIG_DEFAULT_NOOP is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="vegas" +CONFIG_DEFAULT_VEGAS=y +# CONFIG_DEFAULT_WESTWOOD is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # CONFIG_DELL_RBU is not set -# CONFIG_DCDBAS is not set -CONFIG_NOHIGHMEM=y -# CONFIG_HIGHMEM4G is not set -# CONFIG_HIGHMEM64G is not set -CONFIG_VMSPLIT_3G=y -# CONFIG_VMSPLIT_3G_OPT is not set -# CONFIG_VMSPLIT_2G is not set -# CONFIG_VMSPLIT_1G is not set -CONFIG_PAGE_OFFSET=0xC0000000 -CONFIG_ARCH_FLATMEM_ENABLE=y -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_SELECT_MEMORY_MODEL=y -CONFIG_FLATMEM_MANUAL=y +# CONFIG_DEPCA is not set +# CONFIG_DEVFS_DEBUG is not set +CONFIG_DEVFS_FS=y +CONFIG_DEVFS_MOUNT=y +# CONFIG_DGRS is not set # CONFIG_DISCONTIGMEM_MANUAL is not set -# CONFIG_SPARSEMEM_MANUAL is not set +# CONFIG_DL2K is not set +# CONFIG_DMASCC is not set +# CONFIG_DMA_ENGINE is not set +CONFIG_DMI=y +# CONFIG_DNOTIFY is not set +CONFIG_DOUBLEFAULT=y +# CONFIG_DRM is not set +# CONFIG_DTLK is not set +# CONFIG_DUMMY is not set +# CONFIG_DVB is not set +CONFIG_E100=m +# CONFIG_E1000 is not set +CONFIG_EARLY_PRINTK=y +# CONFIG_ECONET is not set +# CONFIG_EDAC is not set +# CONFIG_EDD is not set +# CONFIG_EEPRO100 is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EFS_FS 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_ELF_CORE is not set +# CONFIG_ELPLUS is not set +CONFIG_EMBEDDED=y +CONFIG_ENABLE_MUST_CHECK=y +# CONFIG_EPIC100 is not set +CONFIG_EPOLL=y +# CONFIG_EQUALIZER is not set +# CONFIG_EUROTECH_WDT is not set +CONFIG_EXPERIMENTAL=y +CONFIG_EXPORTFS=m +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# 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_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_FAT_FS=m +# CONFIG_FB is not set +# CONFIG_FDDI is not set +# CONFIG_FEALNX is not set +CONFIG_FIB_RULES=y +# CONFIG_FIRMWARE_EDID is not set CONFIG_FLATMEM=y +CONFIG_FLATMEM_MANUAL=y CONFIG_FLAT_NODE_MEM_MAP=y -CONFIG_SPARSEMEM_STATIC=y -CONFIG_SPLIT_PTLOCK_CPUS=4 -# CONFIG_MATH_EMULATION is not set -# CONFIG_MTRR is not set -# CONFIG_REGPARM is not set -# CONFIG_SECCOMP is not set +# CONFIG_FORCEDETH is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_FTAPE is not set +# CONFIG_FTL is not set +# CONFIG_FUSE_FS is not set +# CONFIG_FUSION is not set +# CONFIG_FUSION_FC is not set +# CONFIG_FUSION_SAS is not set +# CONFIG_FUSION_SPI is not set +CONFIG_FUTEX=y +CONFIG_FW_LOADER=y +CONFIG_GACT_PROB=y +# CONFIG_GAMEPORT is not set +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_IOMAP=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_ISA_DMA=y +CONFIG_GENERIC_TIME=y +# CONFIG_GFS2_FS is not set +# CONFIG_HAMACHI is not set +CONFIG_HAMRADIO=y +# CONFIG_HANGCHECK_TIMER is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_HERMES=m +CONFIG_HFSPLUS_FS=m +CONFIG_HFS_FS=m +# CONFIG_HIGHMEM4G is not set +# CONFIG_HIGHMEM64G is not set +# CONFIG_HIPPI is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_CS=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_HOSTAP_PCI=m +CONFIG_HOSTAP_PLX=m +CONFIG_HOTPLUG=y +# CONFIG_HOTPLUG_PCI is not set +# CONFIG_HP100 is not set +# CONFIG_HPET_TIMER is not set +# CONFIG_HPFS_FS is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_HWMON is not set +# CONFIG_HWMON_VID 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_HZ_1000 is not set -CONFIG_HZ=100 -# CONFIG_KEXEC is not set -CONFIG_PHYSICAL_START=0x100000 - -# -# Power management options (ACPI, APM) -# -# CONFIG_PM is not set - -# -# ACPI (Advanced Configuration and Power Interface) Support -# -# CONFIG_ACPI is not set - -# -# CPU Frequency scaling -# -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -# CONFIG_CPU_FREQ_DEBUG is not set -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_STAT_DETAILS=y -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE 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_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set - -# -# CPUFreq processor drivers -# -# CONFIG_X86_POWERNOW_K6 is not set -# CONFIG_X86_POWERNOW_K7 is not set -# CONFIG_X86_POWERNOW_K8 is not set -CONFIG_X86_GX_SUSPMOD=m -# CONFIG_X86_SPEEDSTEP_CENTRINO is not set -# CONFIG_X86_SPEEDSTEP_ICH is not set -# CONFIG_X86_SPEEDSTEP_SMI is not set -# CONFIG_X86_P4_CLOCKMOD is not set -# CONFIG_X86_CPUFREQ_NFORCE2 is not set -# CONFIG_X86_LONGRUN is not set - -# -# shared options -# -# CONFIG_X86_SPEEDSTEP_LIB is not set - -# -# Bus options (PCI, PCMCIA, EISA, MCA, ISA) -# -CONFIG_PCI=y -# CONFIG_PCI_GOBIOS is not set -# CONFIG_PCI_GOMMCONFIG is not set -# CONFIG_PCI_GODIRECT is not set -CONFIG_PCI_GOANY=y -CONFIG_PCI_BIOS=y -CONFIG_PCI_DIRECT=y -# CONFIG_PCIEPORTBUS is not set -CONFIG_ISA_DMA_API=y -CONFIG_ISA=y -# CONFIG_EISA is not set -# CONFIG_MCA is not set -CONFIG_SCx200=y - -# -# PCCARD (PCMCIA/CardBus) support -# -CONFIG_PCCARD=m -# CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m -# CONFIG_PCMCIA_LOAD_CIS is not set -# CONFIG_PCMCIA_IOCTL is not set -CONFIG_CARDBUS=y - -# -# PC-card bridges -# -CONFIG_YENTA=m -# CONFIG_YENTA_O2 is not set -# CONFIG_YENTA_RICOH is not set -# CONFIG_YENTA_TI is not set -# CONFIG_YENTA_TOSHIBA is not set -# CONFIG_PD6729 is not set +# 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_I2O is not set +# CONFIG_I6300ESB_WDT is not set # CONFIG_I82092 is not set # CONFIG_I82365 is not set -# CONFIG_TCIC is not set -CONFIG_PCMCIA_PROBE=y -CONFIG_PCCARD_NONSTATIC=m - -# -# PCI Hotplug Support -# -# CONFIG_HOTPLUG_PCI is not set - -# -# Executable file formats -# -CONFIG_BINFMT_ELF=y -# CONFIG_BINFMT_AOUT is not set -# CONFIG_BINFMT_MISC is not set - -# -# Networking -# -CONFIG_NET=y - -# -# Networking options -# -# CONFIG_NETDEBUG is not set -CONFIG_PACKET=y -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -CONFIG_NET_KEY=m +# 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_IEEE1394 is not set +CONFIG_IEEE80211=m +CONFIG_IEEE80211_CRYPT_CCMP=m +CONFIG_IEEE80211_CRYPT_TKIP=m +CONFIG_IEEE80211_CRYPT_WEP=m +# CONFIG_IEEE80211_DEBUG is not set +CONFIG_IEEE80211_SOFTMAC=m +# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set +CONFIG_IFB=m +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_IMQ=m +# CONFIG_IMQ_BEHAVIOR_AA is not set +# CONFIG_IMQ_BEHAVIOR_AB is not set +CONFIG_IMQ_BEHAVIOR_BA=y +# CONFIG_IMQ_BEHAVIOR_BB is not set +CONFIG_IMQ_NUM_DEVS=2 CONFIG_INET=y -CONFIG_IP_MULTICAST=y -CONFIG_IP_ADVANCED_ROUTER=y -CONFIG_ASK_IP_FIB_HASH=y -# CONFIG_IP_FIB_TRIE is not set -CONFIG_IP_FIB_HASH=y -CONFIG_IP_MULTIPLE_TABLES=y -CONFIG_IP_ROUTE_FWMARK=y -CONFIG_IP_ROUTE_MULTIPATH=y -# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set -# CONFIG_IP_ROUTE_VERBOSE is not set -# CONFIG_IP_PNP is not set -CONFIG_NET_IPIP=m -CONFIG_NET_IPGRE=m -# CONFIG_NET_IPGRE_BROADCAST is not set -CONFIG_IPSEC_NAT_TRAVERSAL=y -# CONFIG_IP_MROUTE is not set -# CONFIG_ARPD is not set -# CONFIG_SYN_COOKIES is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET_AH=m +CONFIG_INET_DCCP_DIAG=m +CONFIG_INET_DIAG=m CONFIG_INET_ESP=m CONFIG_INET_IPCOMP=m -CONFIG_INET_XFRM_TUNNEL=m -CONFIG_INET_TUNNEL=m -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 -CONFIG_TCP_CONG_HTCP=m -CONFIG_TCP_CONG_HSTCP=m -CONFIG_TCP_CONG_HYBLA=m -CONFIG_TCP_CONG_VEGAS=y -CONFIG_TCP_CONG_SCALABLE=m - -# -# IP: Virtual Server Configuration -# -# CONFIG_IP_VS is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_TUNNEL=m +# CONFIG_INFINIBAND is not set +# CONFIG_INFTL is not set +CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_SOURCE="" +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_INPUT is not set +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_EVDEV=m +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MISC is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_OWNER=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_RAW=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_IMQ=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_TARGET_ROUTE=m +# CONFIG_IPC_NS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_IPSEC_NAT_TRAVERSAL=y CONFIG_IPV6=m +# CONFIG_IPV6_MIP6 is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set # CONFIG_IPV6_PRIVACY is not set CONFIG_IPV6_ROUTER_PREF=y # CONFIG_IPV6_ROUTE_INFO is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m +CONFIG_IPV6_SIT=m # CONFIG_IPV6_TUNNEL is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set -# CONFIG_BRIDGE_NETFILTER is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -CONFIG_NETFILTER_XTABLES=y -CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m -CONFIG_NETFILTER_XT_TARGET_CONNMARK=m -CONFIG_NETFILTER_XT_TARGET_MARK=y -CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m -CONFIG_NETFILTER_XT_TARGET_NOTRACK=m -CONFIG_NETFILTER_XT_MATCH_COMMENT=m -CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m -CONFIG_NETFILTER_XT_MATCH_CONNMARK=m -CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m -CONFIG_NETFILTER_XT_MATCH_DCCP=m -CONFIG_NETFILTER_XT_MATCH_ESP=m -CONFIG_NETFILTER_XT_MATCH_HELPER=m -CONFIG_NETFILTER_XT_MATCH_LENGTH=m -CONFIG_NETFILTER_XT_MATCH_LIMIT=m -CONFIG_NETFILTER_XT_MATCH_MAC=m -CONFIG_NETFILTER_XT_MATCH_MARK=m -CONFIG_NETFILTER_XT_MATCH_POLICY=m -CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y -CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m -CONFIG_NETFILTER_XT_MATCH_REALM=m -CONFIG_NETFILTER_XT_MATCH_SCTP=m -CONFIG_NETFILTER_XT_MATCH_STATE=y -CONFIG_NETFILTER_XT_MATCH_STRING=m -CONFIG_NETFILTER_XT_MATCH_TCPMSS=y - -# -# IP: Netfilter Configuration -# +CONFIG_IPW2100=m +# CONFIG_IPW2100_DEBUG is not set +CONFIG_IPW2100_MONITOR=y +CONFIG_IPW2200=m +# CONFIG_IPW2200_DEBUG is not set +CONFIG_IPW2200_MONITOR=y +# CONFIG_IPW2200_PROMISCUOUS is not set +# CONFIG_IPW2200_QOS is not set +# CONFIG_IPW2200_RADIOTAP is not set +# CONFIG_IPX is not set +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_DCCP=m +CONFIG_IP_DCCP_ACKVEC=y +CONFIG_IP_DCCP_CCID2=m +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=m +CONFIG_IP_DCCP_TFRC_LIB=m +CONFIG_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +# CONFIG_IP_MROUTE is not set +CONFIG_IP_MULTICAST=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_NF_AMANDA=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_CONNTRACK=y -CONFIG_IP_NF_CT_ACCT=y -CONFIG_IP_NF_CONNTRACK_MARK=y # CONFIG_IP_NF_CONNTRACK_EVENTS is not set +CONFIG_IP_NF_CONNTRACK_MARK=y +CONFIG_IP_NF_CT_ACCT=y CONFIG_IP_NF_CT_PROTO_SCTP=m +CONFIG_IP_NF_FILTER=y CONFIG_IP_NF_FTP=m -CONFIG_IP_NF_IRC=m -# CONFIG_IP_NF_NETBIOS_NS is not set -CONFIG_IP_NF_TFTP=m -CONFIG_IP_NF_AMANDA=m -CONFIG_IP_NF_PPTP=m CONFIG_IP_NF_H323=m -CONFIG_IP_NF_SIP=m -CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_IPTABLES=y -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_IPP2P=m -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 +CONFIG_IP_NF_IRC=m +CONFIG_IP_NF_MANGLE=y CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m CONFIG_IP_NF_MATCH_HASHLIMIT=m +CONFIG_IP_NF_MATCH_IPP2P=m +CONFIG_IP_NF_MATCH_IPRANGE=m CONFIG_IP_NF_MATCH_LAYER7=m # CONFIG_IP_NF_MATCH_LAYER7_DEBUG is not set -CONFIG_IP_NF_FILTER=y -CONFIG_IP_NF_TARGET_REJECT=y -CONFIG_IP_NF_TARGET_IMQ=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_MATCH_OWNER=m +CONFIG_IP_NF_MATCH_RECENT=m +CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_MATCH_TIME=m +CONFIG_IP_NF_MATCH_TOS=m +CONFIG_IP_NF_MATCH_TTL=m CONFIG_IP_NF_NAT=y -CONFIG_IP_NF_NAT_NEEDED=y -CONFIG_IP_NF_TARGET_MASQUERADE=y -CONFIG_IP_NF_TARGET_REDIRECT=y -CONFIG_IP_NF_TARGET_ROUTE=m -CONFIG_IP_NF_TARGET_NETMAP=m -CONFIG_IP_NF_TARGET_SAME=m -# CONFIG_IP_NF_NAT_SNMP_BASIC is not set -CONFIG_IP_NF_NAT_IRC=m -CONFIG_IP_NF_NAT_FTP=m -CONFIG_IP_NF_NAT_TFTP=m CONFIG_IP_NF_NAT_AMANDA=m -CONFIG_IP_NF_NAT_PPTP=m +CONFIG_IP_NF_NAT_FTP=m CONFIG_IP_NF_NAT_H323=m +CONFIG_IP_NF_NAT_IRC=m +CONFIG_IP_NF_NAT_NEEDED=y +CONFIG_IP_NF_NAT_PPTP=m 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_NAT_SNMP_BASIC is not set +CONFIG_IP_NF_NAT_TFTP=m +# CONFIG_IP_NF_NETBIOS_NS is not set +CONFIG_IP_NF_PPTP=m +CONFIG_IP_NF_QUEUE=m CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m CONFIG_IP_NF_SET=m -CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_HASHSIZE=1024 +CONFIG_IP_NF_SET_IPHASH=m CONFIG_IP_NF_SET_IPMAP=m +CONFIG_IP_NF_SET_IPTREE=m CONFIG_IP_NF_SET_MACIPMAP=m -CONFIG_IP_NF_SET_PORTMAP=m -CONFIG_IP_NF_SET_IPHASH=m +CONFIG_IP_NF_SET_MAX=256 CONFIG_IP_NF_SET_NETHASH=m -CONFIG_IP_NF_SET_IPTREE=m -CONFIG_IP_NF_MATCH_SET=m +CONFIG_IP_NF_SET_PORTMAP=m +CONFIG_IP_NF_SIP=m +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_IMQ=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_TARGET_REJECT=y +CONFIG_IP_NF_TARGET_ROUTE=m +CONFIG_IP_NF_TARGET_SAME=m CONFIG_IP_NF_TARGET_SET=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -CONFIG_IP6_NF_QUEUE=m -CONFIG_IP6_NF_IPTABLES=m -CONFIG_IP6_NF_MATCH_RT=m -CONFIG_IP6_NF_MATCH_OPTS=m -CONFIG_IP6_NF_MATCH_FRAG=m -CONFIG_IP6_NF_MATCH_HL=m -CONFIG_IP6_NF_MATCH_OWNER=m -CONFIG_IP6_NF_MATCH_IPV6HEADER=m -CONFIG_IP6_NF_MATCH_AH=m -CONFIG_IP6_NF_MATCH_EUI64=m -CONFIG_IP6_NF_FILTER=m -CONFIG_IP6_NF_TARGET_IMQ=m -CONFIG_IP6_NF_TARGET_LOG=m -CONFIG_IP6_NF_TARGET_REJECT=m -CONFIG_IP6_NF_TARGET_ROUTE=m -CONFIG_IP6_NF_MANGLE=m -CONFIG_IP6_NF_TARGET_HL=m -CONFIG_IP6_NF_RAW=m - -# -# Bridge: Netfilter Configuration -# -CONFIG_BRIDGE_NF_EBTABLES=m -CONFIG_BRIDGE_EBT_BROUTE=m -CONFIG_BRIDGE_EBT_T_FILTER=m -CONFIG_BRIDGE_EBT_T_NAT=m -CONFIG_BRIDGE_EBT_802_3=m -CONFIG_BRIDGE_EBT_AMONG=m -CONFIG_BRIDGE_EBT_ARP=m -CONFIG_BRIDGE_EBT_IP=m -CONFIG_BRIDGE_EBT_LIMIT=m -CONFIG_BRIDGE_EBT_MARK=m -CONFIG_BRIDGE_EBT_PKTTYPE=m -CONFIG_BRIDGE_EBT_STP=m -CONFIG_BRIDGE_EBT_VLAN=m -CONFIG_BRIDGE_EBT_ARPREPLY=m -CONFIG_BRIDGE_EBT_DNAT=m -CONFIG_BRIDGE_EBT_MARK_T=m -CONFIG_BRIDGE_EBT_REDIRECT=m -CONFIG_BRIDGE_EBT_SNAT=m -CONFIG_BRIDGE_EBT_LOG=m -CONFIG_BRIDGE_EBT_ULOG=m - -# -# DCCP Configuration (EXPERIMENTAL) -# -# CONFIG_IP_DCCP is not set - -# -# SCTP Configuration (EXPERIMENTAL) -# +CONFIG_IP_NF_TARGET_TCPMSS=y +CONFIG_IP_NF_TARGET_TOS=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_IP_NF_TFTP=m +# CONFIG_IP_PNP is not set +CONFIG_IP_ROUTE_FWMARK=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_MULTIPATH_CACHED=y +CONFIG_IP_ROUTE_MULTIPATH_DRR=m +CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m +CONFIG_IP_ROUTE_MULTIPATH_RR=m +CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m +CONFIG_IP_ROUTE_VERBOSE=y # CONFIG_IP_SCTP is not set - -# -# TIPC Configuration (EXPERIMENTAL) -# -# CONFIG_TIPC is not set -CONFIG_ATM=m -CONFIG_ATM_CLIP=m -CONFIG_ATM_CLIP_NO_ICMP=y -CONFIG_ATM_LANE=m -CONFIG_ATM_MPOA=m -CONFIG_ATM_BR2684=m -CONFIG_ATM_BR2684_IPFILTER=y -CONFIG_BRIDGE=y -CONFIG_VLAN_8021Q=y -# CONFIG_DECNET is not set -CONFIG_LLC=y -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set +# CONFIG_IP_VS is not set +# CONFIG_IRDA is not set +CONFIG_ISA=y +CONFIG_ISAPNP=y +CONFIG_ISA_DMA_API=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISDN is not set +CONFIG_ISO9660_FS=m +# CONFIG_ITCO_WDT is not set +# CONFIG_IXGB is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_SUMMARY is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS_FS is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_JOLIET=y +# CONFIG_KALLSYMS is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_KEXEC is not set +# CONFIG_KEYS is not set +# CONFIG_KMOD is not set +CONFIG_KTIME_SCALAR=y +# CONFIG_LANCE 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 - -# -# QoS and/or fair queueing -# -CONFIG_NET_SCHED=y -CONFIG_NET_SCH_CLK_JIFFIES=y -# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set -# CONFIG_NET_SCH_CLK_CPU is not set - -# -# Queueing/Scheduling -# -CONFIG_NET_SCH_CBQ=m -CONFIG_NET_SCH_HTB=m -CONFIG_NET_SCH_HFSC=m -CONFIG_NET_SCH_ATM=m -CONFIG_NET_SCH_PRIO=m -CONFIG_NET_SCH_RED=m -CONFIG_NET_SCH_SFQ=m -CONFIG_NET_SCH_ESFQ=m -CONFIG_NET_SCH_TEQL=m -CONFIG_NET_SCH_TBF=m -CONFIG_NET_SCH_GRED=m -CONFIG_NET_SCH_DSMARK=m -# CONFIG_NET_SCH_NETEM is not set -CONFIG_NET_SCH_INGRESS=m - -# -# Classification -# -CONFIG_NET_CLS=y -CONFIG_NET_CLS_BASIC=m -CONFIG_NET_CLS_TCINDEX=m -CONFIG_NET_CLS_ROUTE4=m -CONFIG_NET_CLS_ROUTE=y -CONFIG_NET_CLS_FW=m -CONFIG_NET_CLS_U32=m -# CONFIG_CLS_U32_PERF is not set -# CONFIG_CLS_U32_MARK is not set -CONFIG_NET_CLS_RSVP=m -CONFIG_NET_CLS_RSVP6=m -# CONFIG_NET_EMATCH is not set -# CONFIG_NET_CLS_ACT is not set -CONFIG_NET_CLS_POLICE=y -# CONFIG_NET_CLS_IND is not set -CONFIG_NET_ESTIMATOR=y - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -CONFIG_HAMRADIO=y - -# -# Packet Radio protocols -# -CONFIG_AX25=m -# CONFIG_AX25_DAMA_SLAVE is not set -# CONFIG_NETROM is not set -# CONFIG_ROSE is not set - -# -# AX.25 network device drivers -# +# CONFIG_LASAT is not set +# CONFIG_LBD is not set +# CONFIG_LDM_PARTITION is not set +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_NET48XX=m +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +# CONFIG_LEDS_TRIGGER_IDE_DISK is not set +CONFIG_LEDS_TRIGGER_TIMER=y +# CONFIG_LEGACY_PTYS is not set +CONFIG_LIBCRC32C=m +CONFIG_LLC=y +CONFIG_LLC2=m +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_LOCKD=m +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_LOCKD_V4=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_LSF is not set +# CONFIG_LXT_PHY 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_MAC_PARTITION=y +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_MARKEINS is not set +# CONFIG_MARVELL_PHY 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_MD is not set +# CONFIG_MEFFICEON is not set +# CONFIG_MEGARAID_LEGACY is not set +# CONFIG_MEGARAID_NEWGEN is not set +# CONFIG_MEGARAID_SAS is not set +# CONFIG_MGEODEGX1 is not set +# CONFIG_MGEODE_LX is not set +# CONFIG_MICROCODE is not set +CONFIG_MII=y +CONFIG_MINIX_FS=m +# CONFIG_MINIX_SUBPARTITION 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_MKISS=m -# CONFIG_6PACK is not set -# CONFIG_BPQETHER is not set -# CONFIG_DMASCC is not set -# CONFIG_SCC is not set -# CONFIG_BAYCOM_SER_FDX is not set -# CONFIG_BAYCOM_SER_HDX is not set -# CONFIG_YAM is not set -# CONFIG_IRDA is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -CONFIG_BT_HCIUSB_SCO=y -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIBCM203X is not set -# CONFIG_BT_HCIBPA10X is not set -# CONFIG_BT_HCIBFUSB is not set -# CONFIG_BT_HCIDTL1 is not set -# CONFIG_BT_HCIBT3C is not set -# CONFIG_BT_HCIBLUECARD is not set -# CONFIG_BT_HCIBTUART is not set -# CONFIG_BT_HCIVHCI is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -# CONFIG_IEEE80211_SOFTMAC is not set -CONFIG_WIRELESS_EXT=y - -# -# Device Drivers -# - -# -# Generic Driver Options -# -CONFIG_STANDALONE=y -CONFIG_PREVENT_FIRMWARE_BUILD=y -CONFIG_FW_LOADER=y - -# -# Connector - unified userspace <-> kernelspace linker -# -CONFIG_CONNECTOR=m - -# -# Memory Technology Devices (MTD) -# +# CONFIG_MMC is not set +CONFIG_MMU=y +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MPENTIUM4 is not set +# CONFIG_MPENTIUMII is not set +# CONFIG_MPENTIUMIII is not set +# CONFIG_MPENTIUMM is not set +CONFIG_MSDOS_FS=m +CONFIG_MSDOS_PARTITION=y CONFIG_MTD=y -# CONFIG_MTD_DEBUG is not set -# CONFIG_MTD_CONCAT is not set -CONFIG_MTD_PARTITIONS=y -# CONFIG_MTD_REDBOOT_PARTS is not set -# CONFIG_MTD_CMDLINE_PARTS is not set - -# -# User Modules And Translation Layers -# -CONFIG_MTD_CHAR=y +# CONFIG_MTD_ABSENT is not set CONFIG_MTD_BLOCK=y -# CONFIG_FTL is not set -# CONFIG_NFTL is not set -# CONFIG_INFTL is not set -# CONFIG_RFD_FTL is not set - -# -# RAM/ROM/Flash chip drivers -# +CONFIG_MTD_BLOCK2MTD=y # CONFIG_MTD_CFI is not set -# CONFIG_MTD_JEDECPROBE is not set -CONFIG_MTD_MAP_BANK_WIDTH_1=y -CONFIG_MTD_MAP_BANK_WIDTH_2=y -CONFIG_MTD_MAP_BANK_WIDTH_4=y -# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set -# CONFIG_MTD_MAP_BANK_WIDTH_32 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_RAM is not set -# CONFIG_MTD_ROM is not set -# CONFIG_MTD_ABSENT is not set -# CONFIG_MTD_OBSOLETE_CHIPS is not set - -# -# Mapping drivers for chip access -# +CONFIG_MTD_CHAR=y +# CONFIG_MTD_CMDLINE_PARTS is not set # CONFIG_MTD_COMPLEX_MAPPINGS is not set -# CONFIG_MTD_TS5500 is not set -# CONFIG_MTD_PLATRAM is not set - -# -# Self-contained MTD device drivers -# -# CONFIG_MTD_PMC551 is not set -# CONFIG_MTD_SLRAM is not set -# CONFIG_MTD_PHRAM is not set -# CONFIG_MTD_MTDRAM is not set -CONFIG_MTD_BLOCK2MTD=y - -# -# Disk-On-Chip Device Drivers -# +# 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 - -# -# NAND Flash Device Drivers -# +# 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 - -# -# OneNAND Flash Device Drivers -# +# CONFIG_MTD_OBSOLETE_CHIPS is not set # CONFIG_MTD_ONENAND is not set - -# -# Parallel port support -# +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_MYRI10GE is not set +CONFIG_NATSEMI=m +# CONFIG_NCP_FS is not set +CONFIG_NE2K_PCI=m +CONFIG_NET=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETDEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_NETLINK is not set +CONFIG_NETFILTER_XTABLES=y +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +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 +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=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +# CONFIG_NETPOLL is not set +# CONFIG_NETROM is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_ACT_GACT=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_POLICE=m +# CONFIG_NET_ACT_SIMP is not set +CONFIG_NET_CLS=y +CONFIG_NET_CLS_ACT=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_CLS_POLICE=y +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_U32=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_U32=m +CONFIG_NET_ESTIMATOR=y +CONFIG_NET_ETHERNET=y +# CONFIG_NET_FC is not set +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_NET_IPIP=m +# CONFIG_NET_ISA is not set +CONFIG_NET_KEY=m +CONFIG_NET_PCI=y +# CONFIG_NET_PCMCIA is not set +CONFIG_NET_PKTGEN=m +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_NET_RADIO=y +# CONFIG_NET_SB1000 is not set +CONFIG_NET_SCHED=y +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_CBQ=m +# CONFIG_NET_SCH_CLK_CPU is not set +# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set +CONFIG_NET_SCH_CLK_JIFFIES=y +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_ESFQ=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_TEQL=m +# CONFIG_NET_TULIP is not set +CONFIG_NET_VENDOR_3COM=y +# CONFIG_NET_VENDOR_RACAL is not set +# CONFIG_NET_VENDOR_SMC is not set +CONFIG_NET_WIRELESS=y +CONFIG_NET_WIRELESS_RTNETLINK=y +CONFIG_NEW_LEDS=y +CONFIG_NFSD=m +CONFIG_NFSD_TCP=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V3_ACL is not set +CONFIG_NFSD_V4=y +CONFIG_NFS_COMMON=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFS_FS=m +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFTL is not set +CONFIG_NLS=m +# CONFIG_NLS_ASCII is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_CODEPAGE_437=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=m +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_ISO8859_1=m +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_ISO8859_9 is not set +CONFIG_NLS_KOI8_R=m +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=m +CONFIG_NOHIGHMEM=y +CONFIG_NORTEL_HERMES=m +# CONFIG_NS83820 is not set +CONFIG_NSC_GPIO=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_FS=m +CONFIG_NTFS_RW=y +CONFIG_NVRAM=y +# CONFIG_OCFS2_FS is not set +# CONFIG_OSF_PARTITION is not set +CONFIG_PACKET=y +CONFIG_PACKET_MMAP=y +CONFIG_PAGE_OFFSET=0xC0000000 # CONFIG_PARPORT is not set - -# -# Plug and Play support -# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_PC8736x_GPIO is not set +CONFIG_PCCARD=m +CONFIG_PCCARD_NONSTATIC=m +CONFIG_PCI=y +# CONFIG_PCIEPORTBUS is not set +# CONFIG_PCIPCWATCHDOG is not set +CONFIG_PCI_ATMEL=m +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_PCI_HERMES=m +CONFIG_PCMCIA=m +# CONFIG_PCMCIA_AHA152X is not set +CONFIG_PCMCIA_ATMEL=m +# CONFIG_PCMCIA_DEBUG is not set +# CONFIG_PCMCIA_FDOMAIN is not set +# CONFIG_PCMCIA_HERMES is not set +# CONFIG_PCMCIA_IOCTL is not set +# CONFIG_PCMCIA_LOAD_CIS is not set +# CONFIG_PCMCIA_NETWAVE is not set +# CONFIG_PCMCIA_NINJA_SCSI is not set +CONFIG_PCMCIA_PROBE=y +# CONFIG_PCMCIA_QLOGIC is not set +# CONFIG_PCMCIA_RAYCS is not set +# CONFIG_PCMCIA_SPECTRUM is not set +# CONFIG_PCMCIA_SYM53C500 is not set +# CONFIG_PCMCIA_WAVELAN is not set +# CONFIG_PCMCIA_WL3501 is not set +# CONFIG_PCNET32 is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_PD6729 is not set +# CONFIG_PHONE is not set +# CONFIG_PHYLIB is not set +CONFIG_PHYSICAL_START=0x100000 +CONFIG_PLIST=y +CONFIG_PLX_HERMES=m +# CONFIG_PM is not set CONFIG_PNP=y -# CONFIG_PNP_DEBUG is not set - -# -# Protocols -# -CONFIG_ISAPNP=y # CONFIG_PNPBIOS is not set - -# -# Block devices -# -# CONFIG_BLK_DEV_FD is not set -# CONFIG_BLK_DEV_XD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set -# CONFIG_BLK_DEV_COW_COMMON is not set -CONFIG_BLK_DEV_LOOP=m -CONFIG_BLK_DEV_CRYPTOLOOP=m -CONFIG_BLK_DEV_NBD=m -# CONFIG_BLK_DEV_SX8 is not set -# CONFIG_BLK_DEV_UB is not set -# CONFIG_BLK_DEV_RAM is not set -CONFIG_BLK_DEV_INITRD=y -# CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set - -# -# ATA/ATAPI/MFM/RLL support -# -CONFIG_IDE=y -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_HD_IDE is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set -# CONFIG_IDE_TASK_IOCTL is not set - -# -# IDE chipset support/bugfixes -# -CONFIG_IDE_GENERIC=y -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_IDEPNP is not set -CONFIG_BLK_DEV_IDEPCI=y -CONFIG_IDEPCI_SHARE_IRQ=y -# CONFIG_BLK_DEV_OFFBOARD is not set -CONFIG_BLK_DEV_GENERIC=y -# CONFIG_BLK_DEV_OPTI621 is not set -# CONFIG_BLK_DEV_RZ1000 is not set -CONFIG_BLK_DEV_IDEDMA_PCI=y -# CONFIG_BLK_DEV_IDEDMA_FORCED is not set -CONFIG_IDEDMA_PCI_AUTO=y -# CONFIG_IDEDMA_ONLYDISK 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_CMD64X is not set -# CONFIG_BLK_DEV_TRIFLEX is not set -# CONFIG_BLK_DEV_CY82C693 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_HPT34X is not set -# CONFIG_BLK_DEV_HPT366 is not set -CONFIG_BLK_DEV_SC1200=y -# CONFIG_BLK_DEV_PIIX is not set -# CONFIG_BLK_DEV_IT821X is not set -# CONFIG_BLK_DEV_NS87415 is not set -# CONFIG_BLK_DEV_PDC202XX_OLD is not set -# CONFIG_BLK_DEV_PDC202XX_NEW is not set -# CONFIG_BLK_DEV_SVWKS is not set -# CONFIG_BLK_DEV_SIIMAGE is not set -# CONFIG_BLK_DEV_SIS5513 is not set -# CONFIG_BLK_DEV_SLC90E66 is not set -# CONFIG_BLK_DEV_TRM290 is not set -CONFIG_BLK_DEV_VIA82CXXX=y -# CONFIG_IDE_ARM is not set -# CONFIG_IDE_CHIPSETS is not set -CONFIG_BLK_DEV_IDEDMA=y -# CONFIG_IDEDMA_IVB is not set -CONFIG_IDEDMA_AUTO=y -# CONFIG_BLK_DEV_HD is not set - -# -# SCSI device support -# +# CONFIG_PNP_DEBUG is not set +# CONFIG_POSIX_MQUEUE is not set +CONFIG_PPP=m +CONFIG_PPPOATM=m +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_SYNC_TTY=m +# CONFIG_PREEMPT is not set +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_PRINTK=y +# CONFIG_PRINTK_TIME is not set +CONFIG_PRISM54=m +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROFILING is not set +# CONFIG_QEMU is not set +# CONFIG_QLA3XXX is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QUOTA is not set +# CONFIG_R3964 is not set +# CONFIG_R8169 is not set +# CONFIG_RADIO_GEMTEK_PCI is not set +# CONFIG_RADIO_MAESTRO is not set +# CONFIG_RADIO_MAXIRADIO is not set # CONFIG_RAID_ATTRS is not set +CONFIG_RAMFS=y +# CONFIG_RAW_DRIVER is not set +# CONFIG_REGPARM is not set +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_FS_XATTR is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_RELAY is not set +# CONFIG_RESOURCES_64BIT is not set +# CONFIG_RFD_FTL is not set +CONFIG_ROMFS_FS=m +# CONFIG_ROSE is not set +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_RPCSEC_GSS_SPKM3 is not set +CONFIG_RTC=y +# CONFIG_RTC_CLASS is not set +CONFIG_RT_MUTEXES=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +# CONFIG_S2IO is not set +# 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=m -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -# CONFIG_CHR_DEV_ST is not set -# CONFIG_CHR_DEV_OSST is not set -# CONFIG_BLK_DEV_SR is not set -# CONFIG_CHR_DEV_SG is not set -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -# CONFIG_SCSI_MULTI_LUN is not set -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set - -# -# SCSI Transport Attributes -# -# 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 - -# -# SCSI low-level drivers -# -# CONFIG_ISCSI_TCP is not set -# CONFIG_BLK_DEV_3W_XXXX_RAID is not set # CONFIG_SCSI_3W_9XXX is not set # CONFIG_SCSI_7000FASST is not set +# CONFIG_SCSI_AACRAID is not set # CONFIG_SCSI_ACARD is not set +# CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_AHA152X is not set # CONFIG_SCSI_AHA1542 is not set -# CONFIG_SCSI_AACRAID is not set +# CONFIG_SCSI_AIC79XX is not set # CONFIG_SCSI_AIC7XXX is not set # CONFIG_SCSI_AIC7XXX_OLD is not set -# CONFIG_SCSI_AIC79XX is not set -# CONFIG_SCSI_DPT_I2O is not set -# CONFIG_SCSI_ADVANSYS is not set -# CONFIG_SCSI_IN2000 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_AIC94XX is not set +# CONFIG_SCSI_ARCMSR is not set # CONFIG_SCSI_BUSLOGIC is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_DC395x is not set +# CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_DMX3191D is not set +# CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_DTC3280 is not set # CONFIG_SCSI_EATA is not set +# CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_FUTURE_DOMAIN 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_IPS is not set -# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_HPTIOP is not set +# CONFIG_SCSI_IN2000 is not set # CONFIG_SCSI_INIA100 is not set +# CONFIG_SCSI_INITIO is not set +# CONFIG_SCSI_IPS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_LPFC is not set +CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_IPR is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_NSP32 is not set # CONFIG_SCSI_PAS16 is not set +CONFIG_SCSI_PROC_FS=y # CONFIG_SCSI_PSI240I is not set -# CONFIG_SCSI_QLOGIC_FAS is not set -# CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_QLA_FC is not set -# CONFIG_SCSI_LPFC is not set +# CONFIG_SCSI_QLA_ISCSI is not set +# CONFIG_SCSI_QLOGIC_1280 is not set +# CONFIG_SCSI_QLOGIC_FAS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_STEX is not set # CONFIG_SCSI_SYM53C416 is not set -# CONFIG_SCSI_DC395x is not set -# CONFIG_SCSI_DC390T is not set +# CONFIG_SCSI_SYM53C8XX_2 is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set # CONFIG_SCSI_ULTRASTOR is not set -# CONFIG_SCSI_NSP32 is not set -# CONFIG_SCSI_DEBUG is not set - -# -# PCMCIA SCSI adapter support -# -# CONFIG_PCMCIA_AHA152X is not set -# CONFIG_PCMCIA_FDOMAIN is not set -# CONFIG_PCMCIA_NINJA_SCSI is not set -# CONFIG_PCMCIA_QLOGIC is not set -# CONFIG_PCMCIA_SYM53C500 is not set - -# -# Old CD-ROM drivers (not SCSI, not IDE) -# -# CONFIG_CD_NO_IDESCSI is not set - -# -# Multi-device support (RAID and LVM) -# -# CONFIG_MD is not set - -# -# Fusion MPT device support -# -# CONFIG_FUSION is not set -# CONFIG_FUSION_SPI is not set -# CONFIG_FUSION_FC is not set -# CONFIG_FUSION_SAS is not set - -# -# IEEE 1394 (FireWire) support -# -# CONFIG_IEEE1394 is not set - -# -# I2O device support -# -# CONFIG_I2O is not set - -# -# Network device support -# -CONFIG_NETDEVICES=y -# CONFIG_DUMMY is not set -CONFIG_BONDING=m -# CONFIG_EQUALIZER is not set -CONFIG_IMQ=m -# CONFIG_IMQ_BEHAVIOR_AA is not set -# CONFIG_IMQ_BEHAVIOR_AB is not set -CONFIG_IMQ_BEHAVIOR_BA=y -# CONFIG_IMQ_BEHAVIOR_BB is not set -CONFIG_IMQ_NUM_DEVS=2 -CONFIG_TUN=m -# CONFIG_NET_SB1000 is not set - -# -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# -# PHY device support -# -CONFIG_PHYLIB=m - -# -# MII PHY device drivers -# -CONFIG_MARVELL_PHY=m -CONFIG_DAVICOM_PHY=m -CONFIG_QSEMI_PHY=m -CONFIG_LXT_PHY=m -CONFIG_CICADA_PHY=m - -# -# Ethernet (10 or 100Mbit) -# -CONFIG_NET_ETHERNET=y -CONFIG_MII=y -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_CASSINI is not set -CONFIG_NET_VENDOR_3COM=y -# CONFIG_EL1 is not set -# CONFIG_EL2 is not set -# CONFIG_ELPLUS is not set -# CONFIG_EL16 is not set -# CONFIG_EL3 is not set -# CONFIG_3C515 is not set -CONFIG_VORTEX=m -# CONFIG_TYPHOON is not set -# CONFIG_LANCE is not set -# CONFIG_NET_VENDOR_SMC is not set -# CONFIG_NET_VENDOR_RACAL is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_AT1700 is not set -# CONFIG_DEPCA is not set -# CONFIG_HP100 is not set -# CONFIG_NET_ISA is not set -CONFIG_NET_PCI=y -# CONFIG_PCNET32 is not set -# CONFIG_AMD8111_ETH is not set -# CONFIG_ADAPTEC_STARFIRE is not set -# CONFIG_AC3200 is not set -# CONFIG_APRICOT is not set -# CONFIG_B44 is not set -CONFIG_FORCEDETH=m -# CONFIG_CS89x0 is not set -# CONFIG_DGRS is not set -# CONFIG_EEPRO100 is not set -CONFIG_E100=m -# CONFIG_FEALNX is not set -CONFIG_NATSEMI=m -CONFIG_NE2K_PCI=m -# CONFIG_8139CP is not set -CONFIG_8139TOO=m -CONFIG_8139TOO_PIO=y -# CONFIG_8139TOO_TUNE_TWISTER is not set -# CONFIG_8139TOO_8129 is not set -# CONFIG_8139_OLD_RX_RESET is not set -CONFIG_SIS900=m -# CONFIG_EPIC100 is not set -# CONFIG_SUNDANCE is not set -# CONFIG_TLAN is not set -CONFIG_VIA_RHINE=m -# CONFIG_VIA_RHINE_MMIO is not set - -# -# Ethernet (1000 Mbit) -# -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -CONFIG_E1000=m -# CONFIG_E1000_NAPI is not set -# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -CONFIG_R8169=m -CONFIG_R8169_NAPI=y -# CONFIG_R8169_VLAN is not set -CONFIG_SIS190=m -# CONFIG_SKGE is not set -# CONFIG_SKY2 is not set -# CONFIG_SK98LIN is not set -# CONFIG_VIA_VELOCITY is not set -# CONFIG_TIGON3 is not set -# CONFIG_BNX2 is not set - -# -# Ethernet (10000 Mbit) -# -# CONFIG_CHELSIO_T1 is not set -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set - -# -# Token Ring devices -# -# CONFIG_TR is not set - -# -# Wireless LAN (non-hamradio) -# -CONFIG_NET_RADIO=y -CONFIG_NET_WIRELESS_RTNETLINK=y - -# -# Obsolete Wireless cards support (pre-802.11) -# -# CONFIG_STRIP is not set -# CONFIG_ARLAN is not set -# CONFIG_WAVELAN is not set -# CONFIG_PCMCIA_WAVELAN is not set -# CONFIG_PCMCIA_NETWAVE is not set - -# -# Wireless 802.11 Frequency Hopping cards support -# -# CONFIG_PCMCIA_RAYCS is not set - -# -# Wireless 802.11b ISA/PCI cards support -# -CONFIG_IPW2100=m -CONFIG_IPW2100_MONITOR=y -# CONFIG_IPW2100_DEBUG is not set -CONFIG_IPW2200=m -CONFIG_IPW2200_MONITOR=y -CONFIG_IPW_QOS=y -# CONFIG_IPW2200_DEBUG is not set -CONFIG_AIRO=m -CONFIG_HERMES=m -CONFIG_PLX_HERMES=m -CONFIG_TMD_HERMES=m -# CONFIG_NORTEL_HERMES is not set -CONFIG_PCI_HERMES=m -CONFIG_ATMEL=m -CONFIG_PCI_ATMEL=m - -# -# Wireless 802.11b Pcmcia/Cardbus cards support -# -# CONFIG_PCMCIA_HERMES is not set -# CONFIG_PCMCIA_SPECTRUM is not set -CONFIG_AIRO_CS=m -CONFIG_PCMCIA_ATMEL=m -# CONFIG_PCMCIA_WL3501 is not set - -# -# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support -# -CONFIG_PRISM54=m -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -CONFIG_HOSTAP_FIRMWARE_NVRAM=y -CONFIG_HOSTAP_PLX=m -CONFIG_HOSTAP_PCI=m -CONFIG_HOSTAP_CS=m -CONFIG_NET_WIRELESS=y - -# -# PCMCIA network device support -# -# CONFIG_NET_PCMCIA is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# ATM drivers -# -CONFIG_ATM_DUMMY=m -CONFIG_ATM_TCP=m -# CONFIG_ATM_LANAI is not set -# CONFIG_ATM_ENI is not set -# CONFIG_ATM_FIRESTREAM is not set -# CONFIG_ATM_ZATM is not set -# CONFIG_ATM_NICSTAR is not set -# CONFIG_ATM_IDT77252 is not set -# CONFIG_ATM_AMBASSADOR is not set -# CONFIG_ATM_HORIZON is not set -# CONFIG_ATM_IA is not set -# CONFIG_ATM_FORE200E_MAYBE is not set -# CONFIG_ATM_HE is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -CONFIG_PPP_FILTER=y -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -CONFIG_PPP_MPPE=m -CONFIG_PPPOE=m -CONFIG_PPPOATM=m -# CONFIG_SLIP is not set -# CONFIG_NET_FC is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set - -# -# ISDN subsystem -# -# CONFIG_ISDN is not set - -# -# Telephony Support -# -# CONFIG_PHONE is not set - -# -# Input device support -# -CONFIG_INPUT=m - -# -# Userland interfaces -# -# CONFIG_INPUT_MOUSEDEV is not set -# CONFIG_INPUT_JOYDEV is not set -# CONFIG_INPUT_TSDEV is not set -CONFIG_INPUT_EVDEV=m -# CONFIG_INPUT_EVBUG is not set - -# -# Input Device Drivers -# -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_INPUT_JOYSTICK is not set -# CONFIG_INPUT_TOUCHSCREEN is not set -# CONFIG_INPUT_MISC is not set - -# -# Hardware I/O ports -# -# CONFIG_SERIO is not set -# CONFIG_GAMEPORT is not set - -# -# Character devices -# -# CONFIG_VT is not set -# CONFIG_SERIAL_NONSTANDARD is not set - -# -# Serial drivers -# -CONFIG_SERIAL_8250=y -CONFIG_SERIAL_8250_CONSOLE=y -# CONFIG_SERIAL_8250_PCI is not set -# CONFIG_SERIAL_8250_PNP is not set -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=2 -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -# CONFIG_SERIAL_8250_EXTENDED is not set - -# -# Non-8250 serial port support -# -CONFIG_SERIAL_CORE=y -CONFIG_SERIAL_CORE_CONSOLE=y -# CONFIG_SERIAL_JSM is not set -CONFIG_UNIX98_PTYS=y -# CONFIG_LEGACY_PTYS is not set - -# -# IPMI -# -# CONFIG_IPMI_HANDLER is not set - -# -# Watchdog Cards -# -CONFIG_WATCHDOG=y -CONFIG_WATCHDOG_NOWAYOUT=y - -# -# Watchdog Device Drivers -# -CONFIG_SOFT_WATCHDOG=m -# CONFIG_ACQUIRE_WDT is not set -# CONFIG_ADVANTECH_WDT is not set -# CONFIG_ALIM1535_WDT is not set -# CONFIG_ALIM7101_WDT is not set -# CONFIG_SC520_WDT is not set -# CONFIG_EUROTECH_WDT is not set -# CONFIG_IB700_WDT is not set -# CONFIG_IBMASR is not set -# CONFIG_WAFER_WDT is not set -# CONFIG_I6300ESB_WDT is not set -# CONFIG_I8XX_TCO is not set -CONFIG_SC1200_WDT=m -CONFIG_SCx200_WDT=m -# CONFIG_60XX_WDT is not set -# CONFIG_SBC8360_WDT is not set -# CONFIG_CPU5_WDT is not set -# CONFIG_W83627HF_WDT is not set -# CONFIG_W83877F_WDT is not set -# CONFIG_W83977F_WDT is not set -# CONFIG_MACHZ_WDT is not set -# CONFIG_SBC_EPX_C3_WATCHDOG is not set - -# -# ISA-based Watchdog Cards -# -# CONFIG_PCWATCHDOG is not set -# CONFIG_MIXCOMWD is not set -# CONFIG_WDT is not set - -# -# PCI-based Watchdog Cards -# -# CONFIG_PCIPCWATCHDOG is not set -# CONFIG_WDTPCI is not set - -# -# USB-based Watchdog Cards -# -# CONFIG_USBPCWATCHDOG is not set -# CONFIG_HW_RANDOM is not set -CONFIG_NVRAM=y -CONFIG_RTC=y -# CONFIG_DTLK is not set -# CONFIG_R3964 is not set -# CONFIG_APPLICOM is not set -# CONFIG_SONYPI is not set - -# -# Ftape, the floppy tape device driver -# -# CONFIG_FTAPE is not set -# CONFIG_AGP is not set -# CONFIG_DRM is not set - -# -# PCMCIA character devices -# -# CONFIG_SYNCLINK_CS is not set -# CONFIG_CARDMAN_4000 is not set -# CONFIG_CARDMAN_4040 is not set -# CONFIG_MWAVE is not set +CONFIG_SCx200=y +CONFIG_SCx200HR_TIMER=y +CONFIG_SCx200_ACB=m CONFIG_SCx200_GPIO=m -# CONFIG_CS5535_GPIO is not set -# CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set - -# -# TPM devices -# -# CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set - -# -# I2C support -# -CONFIG_I2C=m -CONFIG_I2C_CHARDEV=m - -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=m -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - -# -# I2C Hardware Bus support -# -# 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_ELEKTOR is not set -# CONFIG_I2C_I801 is not set -# CONFIG_I2C_I810 is not set -# CONFIG_I2C_PIIX4 is not set -# CONFIG_I2C_NFORCE2 is not set -# CONFIG_I2C_PARPORT_LIGHT is not set -# CONFIG_I2C_PROSAVAGE is not set -# CONFIG_I2C_SAVAGE4 is not set CONFIG_SCx200_I2C=m CONFIG_SCx200_I2C_SCL=12 CONFIG_SCx200_I2C_SDA=13 -CONFIG_SCx200_ACB=m -# 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_I2C_PCA_ISA is not set - -# -# Miscellaneous I2C Chip support -# +CONFIG_SCx200_WDT=m +# CONFIG_SECCOMP is not set +# CONFIG_SECURITY is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SEMAPHORE_SLEEPERS=y # CONFIG_SENSORS_DS1337 is not set # CONFIG_SENSORS_DS1374 is not set # CONFIG_SENSORS_EEPROM is not set -# CONFIG_SENSORS_PCF8574 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_SENSORS_MAX6875 is not set -# CONFIG_I2C_DEBUG_CORE is not set -# CONFIG_I2C_DEBUG_ALGO is not set -# CONFIG_I2C_DEBUG_BUS is not set -# CONFIG_I2C_DEBUG_CHIP is not set - -# -# SPI support -# -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set - -# -# Dallas's 1-wire bus -# -# CONFIG_W1 is not set - -# -# Hardware Monitoring support -# -# CONFIG_HWMON is not set -# CONFIG_HWMON_VID is not set - -# -# Misc devices -# -# CONFIG_IBM_ASM is not set - -# -# Multimedia devices -# -CONFIG_VIDEO_DEV=m -# CONFIG_VIDEO_V4L1 is not set -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y - -# -# Video Capture Adapters -# - -# -# Video Capture Adapters -# -# CONFIG_VIDEO_ADV_DEBUG is not set -# CONFIG_VIDEO_VIVI is not set -# CONFIG_VIDEO_BT848 is not set -# CONFIG_VIDEO_CPIA2 is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -# CONFIG_VIDEO_SAA7134 is not set -# CONFIG_VIDEO_CX88 is not set - -# -# Encoders and Decoders -# -# CONFIG_VIDEO_MSP3400 is not set -# CONFIG_VIDEO_CS53L32A is not set -# CONFIG_VIDEO_WM8775 is not set -# CONFIG_VIDEO_WM8739 is not set -# CONFIG_VIDEO_CX25840 is not set -# CONFIG_VIDEO_SAA7127 is not set -# CONFIG_VIDEO_UPD64031A is not set -# CONFIG_VIDEO_UPD64083 is not set - -# -# V4L USB devices -# - -# -# Radio Adapters -# - -# -# Digital Video Broadcasting Devices -# -# CONFIG_DVB is not set -# CONFIG_USB_DABUSB is not set - -# -# Graphics support -# -# CONFIG_FB is not set - -# -# Sound -# -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_CS=m +# CONFIG_SERIAL_8250_EXTENDED is not set +CONFIG_SERIAL_8250_NR_UARTS=2 +# CONFIG_SERIAL_8250_PCI is not set +# CONFIG_SERIAL_8250_PNP is not set +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_SERIO is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_SHAPER is not set +CONFIG_SHMEM=y +# CONFIG_SIS190 is not set +# CONFIG_SIS900 is not set +# CONFIG_SK98LIN is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +CONFIG_SLAB=y +CONFIG_SLHC=m +# CONFIG_SLIP is not set +# CONFIG_SLOB is not set +CONFIG_SMB_FS=m +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_SMP is not set +# CONFIG_SMSC37B787_WDT is not set CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -# CONFIG_SND_SEQUENCER is not set -# CONFIG_SND_MIXER_OSS is not set -# CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_RTCTIMER is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ISA devices -# -# CONFIG_SND_ADLIB is not set # CONFIG_SND_AD1816A is not set # CONFIG_SND_AD1848 is not set -# CONFIG_SND_ALS100 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_DT019X is not set -# CONFIG_SND_ES968 is not set -# CONFIG_SND_ES1688 is not set -# CONFIG_SND_ES18XX 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_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_MIRO is not set -# CONFIG_SND_SB8 is not set -# CONFIG_SND_SB16 is not set -# CONFIG_SND_SBAWE is not set -# CONFIG_SND_SGALAXY is not set -# CONFIG_SND_SSCAPE is not set -# CONFIG_SND_WAVEFRONT is not set - -# -# PCI devices -# # CONFIG_SND_AD1889 is not set +# CONFIG_SND_ADLIB is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ALS100 is not set # CONFIG_SND_ALS300 is not set # CONFIG_SND_ALS4000 is not set -# CONFIG_SND_ALI5451 is not set # CONFIG_SND_ATIIXP is not set # CONFIG_SND_ATIIXP_MODEM is not set # CONFIG_SND_AU8810 is not set # CONFIG_SND_AU8820 is not set # CONFIG_SND_AU8830 is not set +# CONFIG_SND_AZT2320 is not set # CONFIG_SND_AZT3328 is not set # CONFIG_SND_BT87X is not set # CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMI8330 is not set # CONFIG_SND_CMIPCI is not set +# CONFIG_SND_CS4231 is not set +# CONFIG_SND_CS4232 is not set +# CONFIG_SND_CS4236 is not set # CONFIG_SND_CS4281 is not set # CONFIG_SND_CS46XX is not set # CONFIG_SND_CS5535AUDIO is not set +# CONFIG_SND_DARLA20 is not set +# CONFIG_SND_DARLA24 is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_DT019X is not set +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_ECHO3G is not set # CONFIG_SND_EMU10K1 is not set # CONFIG_SND_EMU10K1X is not set # CONFIG_SND_ENS1370 is not set # CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1688 is not set +# CONFIG_SND_ES18XX is not set # CONFIG_SND_ES1938 is not set # CONFIG_SND_ES1968 is not set +# CONFIG_SND_ES968 is not set # CONFIG_SND_FM801 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_GUSCLASSIC is not set +# CONFIG_SND_GUSEXTREME is not set +# CONFIG_SND_GUSMAX is not set # CONFIG_SND_HDA_INTEL is not set # CONFIG_SND_HDSP is not set # CONFIG_SND_HDSPM is not set +CONFIG_SND_HWDEP=m # CONFIG_SND_ICE1712 is not set # CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIO is not set # CONFIG_SND_INTEL8X0 is not set # CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_INTERWAVE is not set +# CONFIG_SND_INTERWAVE_STB is not set # CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_LAYLA24 is not set # CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_MIRO is not set # CONFIG_SND_MIXART is not set +CONFIG_SND_MIXER_OSS=m +# CONFIG_SND_MONA is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_MTPAV is not set # CONFIG_SND_NM256 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_OSSEMUL=y +CONFIG_SND_PCM=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y # CONFIG_SND_PCXHR is not set +# CONFIG_SND_PDAUDIOCF is not set +CONFIG_SND_RAWMIDI=m # CONFIG_SND_RIPTIDE is not set # CONFIG_SND_RME32 is not set # CONFIG_SND_RME96 is not set # CONFIG_SND_RME9652 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_SEQUENCER is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_SGALAXY is not set # CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_SSCAPE is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_TIMER=m # CONFIG_SND_TRIDENT is not set +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_USB_USX2Y is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +CONFIG_SND_VERBOSE_PROCFS=y # CONFIG_SND_VIA82XX is not set # CONFIG_SND_VIA82XX_MODEM is not set # CONFIG_SND_VX222 is not set -# CONFIG_SND_YMFPCI is not set - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -# CONFIG_SND_USB_USX2Y is not set - -# -# PCMCIA devices -# # CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# Open Sound System -# +# CONFIG_SND_WAVEFRONT is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SNI_RM200_PCI is not set +CONFIG_SOFT_WATCHDOG=m +# CONFIG_SOLARIS_X86_PARTITION is not set +CONFIG_SOUND=m # CONFIG_SOUND_PRIME is not set - -# -# USB support -# +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_SPARSEMEM_STATIC=y +# CONFIG_SPI is not set +# CONFIG_SPI_MASTER is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_SQUASHFS_VMALLOC is not set +# CONFIG_SSFDC is not set +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_STANDALONE=y +# CONFIG_STRIP is not set +# CONFIG_SUNDANCE is not set +# CONFIG_SUNGEM is not set +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +# CONFIG_SUN_PARTITION is not set +CONFIG_SWAP=y +# CONFIG_SYNCLINK_CS is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_SYSCTL=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSFS=y +CONFIG_SYSVIPC=y +# CONFIG_SYSV_FS is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_TASKSTATS is not set +# CONFIG_TCG_TPM is not set +# CONFIG_TCIC is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_VEGAS=y +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_WESTWOOD=m +# CONFIG_TELCLOCK is not set +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_TEXTSEARCH_KMP=m +# CONFIG_TIFM_CORE is not set +# CONFIG_TIGON3 is not set +# CONFIG_TINY_SHMEM is not set +# CONFIG_TIPC is not set +# CONFIG_TLAN is not set +CONFIG_TMD_HERMES=m +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_TOSHIBA is not set +# CONFIG_TR is not set +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_TUN=m +# CONFIG_TYPHOON is not set +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y +# CONFIG_UFS_FS is not set +CONFIG_UID16=y +# CONFIG_ULTRIX_PARTITION is not set +CONFIG_UNIX=y +CONFIG_UNIX98_PTYS=y +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_UNWIND_INFO is not set +CONFIG_USB=m +# CONFIG_USBPCWATCHDOG is not set +# CONFIG_USB_ACECAD is not set +CONFIG_USB_ACM=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_AIPTEK is not set +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_APPLETOUCH is not set +CONFIG_USB_ARCH_HAS_EHCI=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y -CONFIG_USB_ARCH_HAS_EHCI=y -CONFIG_USB=m +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_ATI_REMOTE is not set +# CONFIG_USB_ATI_REMOTE2 is not set +CONFIG_USB_ATM=m +# CONFIG_USB_AUERSWALD is not set +# CONFIG_USB_BANDWIDTH is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_CATC=m +# CONFIG_USB_CXACRU is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_DABUSB is not set # CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# CONFIG_USB_DEVICEFS=y -# CONFIG_USB_BANDWIDTH is not set +# CONFIG_USB_DSBR is not set # CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# CONFIG_USB_EHCI_HCD=m -# CONFIG_USB_EHCI_SPLIT_ISO is not set # CONFIG_USB_EHCI_ROOT_HUB_TT is not set -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_OHCI_HCD=m -# CONFIG_USB_OHCI_BIG_ENDIAN is not set -CONFIG_USB_OHCI_LITTLE_ENDIAN=y -CONFIG_USB_UHCI_HCD=m -# CONFIG_USB_SL811_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m - -# -# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' -# - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_ONETOUCH is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Input Devices -# +# CONFIG_USB_EHCI_SPLIT_ISO is not set +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EPSON2888 is not set +CONFIG_USB_EZUSB=y +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_GADGET is not set # CONFIG_USB_HID is not set - -# -# USB HID Boot Protocol drivers -# +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_ISP116X_HCD is not set +CONFIG_USB_KAWETH=m # CONFIG_USB_KBD is not set -# CONFIG_USB_MOUSE is not set -# CONFIG_USB_AIPTEK is not set -# CONFIG_USB_WACOM is not set -# CONFIG_USB_ACECAD is not set # CONFIG_USB_KBTAB is not set -# CONFIG_USB_POWERMATE is not set -# CONFIG_USB_TOUCHSCREEN is not set -# CONFIG_USB_YEALINK is not set -# CONFIG_USB_XPAD is not set -# CONFIG_USB_ATI_REMOTE is not set -# CONFIG_USB_ATI_REMOTE2 is not set # CONFIG_USB_KEYSPAN_REMOTE is not set -# CONFIG_USB_APPLETOUCH is not set - -# -# USB Imaging devices -# +# CONFIG_USB_LCD is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LIBUSUAL is not set # CONFIG_USB_MDC800 is not set # CONFIG_USB_MICROTEK is not set - -# -# USB Network Adapters -# -# CONFIG_USB_CATC is not set -# CONFIG_USB_KAWETH is not set -# CONFIG_USB_PEGASUS is not set -# CONFIG_USB_RTL8150 is not set -# CONFIG_USB_USBNET is not set -# CONFIG_USB_ZD1201 is not set # CONFIG_USB_MON is not set - -# -# USB port drivers -# - -# -# USB Serial Converter support -# +# CONFIG_USB_MOUSE is not set +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_OHCI_BIG_ENDIAN is not set +# CONFIG_USB_OHCI_HCD is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_OTG is not set +CONFIG_USB_PEGASUS=m +# CONFIG_USB_PHIDGET is not set +# CONFIG_USB_POWERMATE is not set +CONFIG_USB_PRINTER=m +# CONFIG_USB_RIO500 is not set +CONFIG_USB_RTL8150=m CONFIG_USB_SERIAL=m -# CONFIG_USB_SERIAL_GENERIC 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_AIRCABLE=m +CONFIG_USB_SERIAL_AIRPRIME=m +CONFIG_USB_SERIAL_ARK3116=m CONFIG_USB_SERIAL_BELKIN=m -# CONFIG_USB_SERIAL_WHITEHEAT is not set -# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set -# CONFIG_USB_SERIAL_CP2101 is not set -# CONFIG_USB_SERIAL_CYPRESS_M8 is not set -# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_CP2101=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_EMPEG=m CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_FUNSOFT is not set -CONFIG_USB_SERIAL_VISOR=m -# CONFIG_USB_SERIAL_IPAQ is not set -# CONFIG_USB_SERIAL_IR is not set -# CONFIG_USB_SERIAL_EDGEPORT is not set -# CONFIG_USB_SERIAL_EDGEPORT_TI is not set -# CONFIG_USB_SERIAL_GARMIN is not set -# CONFIG_USB_SERIAL_IPW is not set -# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set -# CONFIG_USB_SERIAL_KEYSPAN is not set -# CONFIG_USB_SERIAL_KLSI is not set -# CONFIG_USB_SERIAL_KOBIL_SCT is not set +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m CONFIG_USB_SERIAL_MCT_U232=m -# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTION=m CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_HP4X is not set -# CONFIG_USB_SERIAL_SAFE is not set -# CONFIG_USB_SERIAL_TI is not set -# CONFIG_USB_SERIAL_CYBERJACK is not set -# CONFIG_USB_SERIAL_XIRCOM is not set -# CONFIG_USB_SERIAL_OPTION is not set -# CONFIG_USB_SERIAL_OMNINET is not set - -# -# USB Miscellaneous drivers -# -# CONFIG_USB_EMI62 is not set -# CONFIG_USB_EMI26 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_CYTHERM is not set -# CONFIG_USB_PHIDGETKIT is not set -# CONFIG_USB_PHIDGETSERVO is not set -# CONFIG_USB_IDMOUSE is not set +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_XIRCOM=m # CONFIG_USB_SISUSBVGA is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# -CONFIG_USB_ATM=m +# CONFIG_USB_SL811_HCD is not set CONFIG_USB_SPEEDTOUCH=m -# CONFIG_USB_CXACRU is not set +CONFIG_USB_STORAGE=m +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_DATAFAB=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_DPCM=y +CONFIG_USB_STORAGE_FREECOM=y +# CONFIG_USB_STORAGE_ISD200 is not set +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_KARMA=y +# CONFIG_USB_STORAGE_ONETOUCH is not set +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_USBAT=y +# CONFIG_USB_TEST is not set +# CONFIG_USB_TOUCHSCREEN is not set +# CONFIG_USB_TRANCEVIBRATOR is not set CONFIG_USB_UEAGLEATM=m +CONFIG_USB_UHCI_HCD=m +CONFIG_USB_USBNET=m +CONFIG_USB_USBNET_MII=m +# CONFIG_USB_WACOM is not set +# CONFIG_USB_XPAD is not set # CONFIG_USB_XUSBATM is not set - -# -# USB Gadget Support -# -# CONFIG_USB_GADGET is not set - -# -# MMC/SD Card support -# -# CONFIG_MMC is not set - -# -# LED devices -# -CONFIG_NEW_LEDS=y -CONFIG_LEDS_CLASS=y - -# -# LED drivers -# - -# -# LED Triggers -# -CONFIG_LEDS_TRIGGERS=y -CONFIG_LEDS_TRIGGER_TIMER=m -# CONFIG_LEDS_TRIGGER_IDE_DISK is not set - -# -# InfiniBand support -# -# CONFIG_INFINIBAND is not set - -# -# EDAC - error detection and reporting (RAS) (EXPERIMENTAL) -# -# CONFIG_EDAC is not set - -# -# Real Time Clock -# -# CONFIG_RTC_CLASS is not set - -# -# File systems -# -CONFIG_EXT2_FS=y -# CONFIG_EXT2_FS_XATTR is not set -# CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m -# CONFIG_EXT3_FS_XATTR is not set -CONFIG_JBD=m -# CONFIG_JBD_DEBUG is not set -CONFIG_REISERFS_FS=m -# CONFIG_REISERFS_CHECK is not set -# CONFIG_REISERFS_PROC_INFO is not set -# CONFIG_REISERFS_FS_XATTR is not set -CONFIG_JFS_FS=m -# CONFIG_JFS_POSIX_ACL is not set -# CONFIG_JFS_SECURITY is not set -# CONFIG_JFS_DEBUG is not set -# CONFIG_JFS_STATISTICS is not set -# CONFIG_FS_POSIX_ACL is not set +# CONFIG_USB_YEALINK is not set +CONFIG_USB_ZD1201=m +# CONFIG_UTS_NS is not set +CONFIG_VFAT_FS=m +CONFIG_VIA_RHINE=m +# CONFIG_VIA_RHINE_MMIO is not set +CONFIG_VIA_RHINE_NAPI=y +# CONFIG_VIA_VELOCITY is not set +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_V4L1 is not set +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_VIVI is not set +# CONFIG_VITESSE_PHY is not set +CONFIG_VLAN_8021Q=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_VM_EVENT_COUNTERS is not set +CONFIG_VORTEX=m +# CONFIG_VT is not set +# CONFIG_VXFS_FS is not set +# CONFIG_W1 is not set +# 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_WAN is not set +# CONFIG_WAN_ROUTER is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_WAVELAN is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +CONFIG_WIRELESS_EXT=y +# CONFIG_WR_PPMC is not set +# CONFIG_X25 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 +CONFIG_XFRM=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_USER=m CONFIG_XFS_FS=m -# CONFIG_XFS_QUOTA is not set -# CONFIG_XFS_SECURITY is not set # CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_QUOTA is not set # CONFIG_XFS_RT is not set -# CONFIG_OCFS2_FS is not set -CONFIG_MINI_FO=m -CONFIG_MINIX_FS=m -# CONFIG_ROMFS_FS is not set -CONFIG_INOTIFY=y -# CONFIG_QUOTA is not set -# CONFIG_DNOTIFY is not set -# CONFIG_AUTOFS_FS is not set -# CONFIG_AUTOFS4_FS is not set -# CONFIG_FUSE_FS is not set - -# -# CD-ROM/DVD Filesystems -# -CONFIG_ISO9660_FS=m -CONFIG_JOLIET=y +# CONFIG_XFS_SECURITY is not set +# CONFIG_YAM is not set +# CONFIG_YELLOWFIN is not set +CONFIG_YENTA=m +# CONFIG_YENTA_O2 is not set +# CONFIG_YENTA_RICOH is not set +# CONFIG_YENTA_TI is not set +# CONFIG_YENTA_TOSHIBA is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set CONFIG_ZISOFS=y CONFIG_ZISOFS_FS=m -CONFIG_UDF_FS=m -CONFIG_UDF_NLS=y - -# -# DOS/FAT/NT Filesystems -# -CONFIG_FAT_FS=m -CONFIG_MSDOS_FS=m -CONFIG_VFAT_FS=m -CONFIG_FAT_DEFAULT_CODEPAGE=437 -CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" -# CONFIG_NTFS_FS is not set - -# -# Pseudo filesystems -# -CONFIG_PROC_FS=y -# CONFIG_PROC_KCORE is not set -CONFIG_DEVFS_FS=y -CONFIG_DEVFS_MOUNT=y -# CONFIG_DEVFS_DEBUG is not set -CONFIG_SYSFS=y -CONFIG_TMPFS=y -# CONFIG_HUGETLBFS is not set -# CONFIG_HUGETLB_PAGE is not set -CONFIG_RAMFS=y -# CONFIG_CONFIGFS_FS is not set - -# -# Miscellaneous filesystems -# -# CONFIG_ADFS_FS is not set -# CONFIG_AFFS_FS is not set -CONFIG_HFS_FS=m -CONFIG_HFSPLUS_FS=m -# CONFIG_BEFS_FS is not set -# CONFIG_BFS_FS is not set -# CONFIG_EFS_FS is not set -# CONFIG_JFFS_FS is not set -CONFIG_JFFS2_FS=y -CONFIG_JFFS2_FS_DEBUG=0 -CONFIG_JFFS2_FS_WRITEBUFFER=y -# CONFIG_JFFS2_SUMMARY is not set -CONFIG_JFFS2_COMPRESSION_OPTIONS=y -CONFIG_JFFS2_ZLIB=y -CONFIG_JFFS2_RTIME=y -# CONFIG_JFFS2_RUBIN is not set -# CONFIG_JFFS2_CMODE_NONE is not set -CONFIG_JFFS2_CMODE_PRIORITY=y -# CONFIG_JFFS2_CMODE_SIZE is not set -# CONFIG_CRAMFS is not set -CONFIG_SQUASHFS=y -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 -# CONFIG_SQUASHFS_VMALLOC is not set -# CONFIG_VXFS_FS is not set -# CONFIG_HPFS_FS is not set -# CONFIG_QNX4FS_FS is not set -# CONFIG_SYSV_FS is not set -# CONFIG_UFS_FS is not set - -# -# Network File Systems -# -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -# CONFIG_NFSD is not set -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -CONFIG_RPCSEC_GSS_KRB5=m -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -# CONFIG_SMB_NLS_DEFAULT is not set -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set -# CONFIG_9P_FS is not set - -# -# Partition Types -# -CONFIG_PARTITION_ADVANCED=y -# CONFIG_ACORN_PARTITION is not set -# CONFIG_OSF_PARTITION is not set -# CONFIG_AMIGA_PARTITION is not set -# CONFIG_ATARI_PARTITION is not set -CONFIG_MAC_PARTITION=y -CONFIG_MSDOS_PARTITION=y -# CONFIG_BSD_DISKLABEL is not set -# CONFIG_MINIX_SUBPARTITION is not set -# CONFIG_SOLARIS_X86_PARTITION is not set -# CONFIG_UNIXWARE_DISKLABEL is not set -# CONFIG_LDM_PARTITION is not set -# CONFIG_SGI_PARTITION is not set -# CONFIG_ULTRIX_PARTITION is not set -# CONFIG_SUN_PARTITION is not set -# CONFIG_KARMA_PARTITION is not set -# CONFIG_EFI_PARTITION is not set - -# -# Native Language Support -# -CONFIG_NLS=m -CONFIG_NLS_DEFAULT="iso8859-1" -CONFIG_NLS_CODEPAGE_437=m -# CONFIG_NLS_CODEPAGE_737 is not set -# CONFIG_NLS_CODEPAGE_775 is not set -CONFIG_NLS_CODEPAGE_850=m -# CONFIG_NLS_CODEPAGE_852 is not set -# CONFIG_NLS_CODEPAGE_855 is not set -# CONFIG_NLS_CODEPAGE_857 is not set -# CONFIG_NLS_CODEPAGE_860 is not set -# CONFIG_NLS_CODEPAGE_861 is not set -# CONFIG_NLS_CODEPAGE_862 is not set -# CONFIG_NLS_CODEPAGE_863 is not set -# CONFIG_NLS_CODEPAGE_864 is not set -# CONFIG_NLS_CODEPAGE_865 is not set -# CONFIG_NLS_CODEPAGE_866 is not set -# CONFIG_NLS_CODEPAGE_869 is not set -# CONFIG_NLS_CODEPAGE_936 is not set -# CONFIG_NLS_CODEPAGE_950 is not set -# CONFIG_NLS_CODEPAGE_932 is not set -# CONFIG_NLS_CODEPAGE_949 is not set -# CONFIG_NLS_CODEPAGE_874 is not set -# CONFIG_NLS_ISO8859_8 is not set -# CONFIG_NLS_CODEPAGE_1250 is not set -# CONFIG_NLS_CODEPAGE_1251 is not set -# CONFIG_NLS_ASCII is not set -CONFIG_NLS_ISO8859_1=m -# CONFIG_NLS_ISO8859_2 is not set -# CONFIG_NLS_ISO8859_3 is not set -# CONFIG_NLS_ISO8859_4 is not set -# CONFIG_NLS_ISO8859_5 is not set -# CONFIG_NLS_ISO8859_6 is not set -# CONFIG_NLS_ISO8859_7 is not set -# CONFIG_NLS_ISO8859_9 is not set -# CONFIG_NLS_ISO8859_13 is not set -# CONFIG_NLS_ISO8859_14 is not set -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -# CONFIG_NLS_KOI8_U is not set -CONFIG_NLS_UTF8=m - -# -# Instrumentation Support -# -# CONFIG_PROFILING is not set -# CONFIG_KPROBES is not set - -# -# Kernel hacking -# -# CONFIG_PRINTK_TIME is not set -# CONFIG_MAGIC_SYSRQ is not set -# CONFIG_DEBUG_KERNEL is not set -CONFIG_LOG_BUF_SHIFT=14 -# CONFIG_DEBUG_BUGVERBOSE is not set -# CONFIG_DEBUG_FS is not set -# CONFIG_UNWIND_INFO is not set -CONFIG_EARLY_PRINTK=y -CONFIG_STACK_BACKTRACE_COLS=2 -CONFIG_DOUBLEFAULT=y - -# -# Security options -# -# CONFIG_KEYS is not set -# CONFIG_SECURITY is not set - -# -# Cryptographic options -# -CONFIG_CRYPTO=y -CONFIG_CRYPTO_HMAC=y -# CONFIG_CRYPTO_NULL is not set -# CONFIG_CRYPTO_MD4 is not set -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -# CONFIG_CRYPTO_SHA256 is not set -# CONFIG_CRYPTO_SHA512 is not set -# CONFIG_CRYPTO_WP512 is not set -# CONFIG_CRYPTO_TGR192 is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_BLOWFISH is not set -# CONFIG_CRYPTO_TWOFISH is not set -# CONFIG_CRYPTO_SERPENT is not set -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_AES_586=m -# CONFIG_CRYPTO_CAST5 is not set -# CONFIG_CRYPTO_CAST6 is not set -# CONFIG_CRYPTO_TEA is not set -CONFIG_CRYPTO_ARC4=m -# CONFIG_CRYPTO_KHAZAD is not set -# CONFIG_CRYPTO_ANUBIS is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_MICHAEL_MIC=m -# CONFIG_CRYPTO_CRC32C is not set -# CONFIG_CRYPTO_TEST is not set - -# -# Hardware crypto devices -# -# CONFIG_CRYPTO_DEV_PADLOCK is not set - -# -# Library routines -# -CONFIG_CRC_CCITT=m -CONFIG_CRC16=m -CONFIG_CRC32=y -# CONFIG_LIBCRC32C is not set -CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y -CONFIG_TEXTSEARCH=y -CONFIG_TEXTSEARCH_KMP=m -CONFIG_TEXTSEARCH_BM=m -CONFIG_TEXTSEARCH_FSM=m -CONFIG_GENERIC_HARDIRQS=y -CONFIG_GENERIC_IRQ_PROBE=y -CONFIG_X86_BIOS_REBOOT=y -CONFIG_KTIME_SCALAR=y +CONFIG_ZLIB_INFLATE=y diff --git a/target/linux/x86-2.6/config-diff b/target/linux/x86-2.6/config-diff new file mode 100644 index 0000000000..45d58591e3 --- /dev/null +++ b/target/linux/x86-2.6/config-diff @@ -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 diff --git a/target/linux/x86-2.6/patches/100-scx200_hr_timer.patch b/target/linux/x86-2.6/patches/100-scx200_hr_timer.patch deleted file mode 100644 index 38fc16a74c..0000000000 --- a/target/linux/x86-2.6/patches/100-scx200_hr_timer.patch +++ /dev/null @@ -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 |