diff --git a/include/image.mk b/include/image.mk index 47871f954..0ce6336cc 100644 --- a/include/image.mk +++ b/include/image.mk @@ -62,14 +62,13 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) $(call Image/Build,jffs2-$(1)) endef define Image/mkfs/jffs2 - rm -rf $(TARGET_DIR)/jffs $(foreach SZ,$(JFFS2_BLOCKSIZE),$(call Image/mkfs/jffs2/sub,$(SZ))) endef endif ifeq ($(CONFIG_TARGET_ROOTFS_SQUASHFS),y) define Image/mkfs/squashfs - @mkdir -p $(TARGET_DIR)/jffs + @mkdir -p $(TARGET_DIR)/overlay $(MKSQUASHFS_CMD) $(TARGET_DIR) $(KDIR)/root.squashfs -nopad -noappend -root-owned $(SQUASHFS_OPTS) $(call Image/Build,squashfs) endef diff --git a/include/target.mk b/include/target.mk index 2bfb70278..61ff2d21a 100644 --- a/include/target.mk +++ b/include/target.mk @@ -12,7 +12,7 @@ __target_inc=1 DEVICE_TYPE?=router # Default packages - the really basic set -DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg ucitrigger +DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg # For router targets DEFAULT_PACKAGES.router:=dnsmasq iptables ppp ppp-mod-pppoe kmod-ipt-nathelper firewall DEFAULT_PACKAGES.bootloader:= diff --git a/package/base-files/Makefile b/package/base-files/Makefile index ca5aaa532..7f44cf756 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -369,7 +369,7 @@ define Package/base-files/install mkdir -p $(1)/dev mkdir -p $(1)/etc/crontabs mkdir -p $(1)/etc/rc.d - mkdir -p $(1)/jffs + mkdir -p $(1)/overlay mkdir -p $(1)/lib/firmware $(if $(LIB_SUFFIX),-ln -s lib $(1)/lib$(LIB_SUFFIX)) mkdir -p $(1)/mnt diff --git a/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs b/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs index da914b143..8a1d4e06d 100644 --- a/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs +++ b/package/base-files/files/lib/firstboot/20_no_fo_mount_jffs @@ -5,11 +5,11 @@ no_fo_mount_jffs() { # initialize jffs2 - mount "$mtdpart" /jffs -t jffs2 || exit + mount "$mtdpart" /overlay -t jffs2 || exit # workaround to ensure that union can attach properly sync - ls /jffs >/dev/null + ls /overlay >/dev/null } boot_hook_add no_fo no_fo_mount_jffs diff --git a/package/base-files/files/lib/firstboot/30_is_rootfs_mounted b/package/base-files/files/lib/firstboot/30_is_rootfs_mounted index 7c3fe6c4c..e2ba01d50 100644 --- a/package/base-files/files/lib/firstboot/30_is_rootfs_mounted +++ b/package/base-files/files/lib/firstboot/30_is_rootfs_mounted @@ -4,7 +4,7 @@ # Copyright (C) 2010 Vertical Communications skip_if_rootfs_mounted() { - mount "$mtdpart" /rom/jffs -t jffs2 || exit + mount "$mtdpart" /rom/overlay -t jffs2 || exit } boot_hook_add switch2jffs skip_if_rootfs_mounted diff --git a/package/base-files/files/lib/firstboot/30_no_fo_pivot b/package/base-files/files/lib/firstboot/30_no_fo_pivot index cb82cde5d..b5c2601ee 100644 --- a/package/base-files/files/lib/firstboot/30_no_fo_pivot +++ b/package/base-files/files/lib/firstboot/30_no_fo_pivot @@ -5,7 +5,7 @@ no_fo_pivot() { # switch to the new (empty) jffs2 - fopivot /jffs /rom 1 + fopivot /overlay /rom 1 } boot_hook_add no_fo no_fo_pivot diff --git a/package/base-files/files/lib/firstboot/40_copy_ramoverlay b/package/base-files/files/lib/firstboot/40_copy_ramoverlay index 4b6a8828f..39c2edacb 100644 --- a/package/base-files/files/lib/firstboot/40_copy_ramoverlay +++ b/package/base-files/files/lib/firstboot/40_copy_ramoverlay @@ -8,7 +8,7 @@ copy_ramoverlay() { mount -o remount,ro none / 2>&- # copy ramoverlay to jffs2 echo -n "copying files ... " - cp -a /tmp/root/* /rom/jffs 2>&- + cp -a /tmp/root/* /rom/overlay 2>&- echo "done" } diff --git a/package/base-files/files/lib/firstboot/50_pivot b/package/base-files/files/lib/firstboot/50_pivot index fa1c7b540..53801d7a8 100644 --- a/package/base-files/files/lib/firstboot/50_pivot +++ b/package/base-files/files/lib/firstboot/50_pivot @@ -9,9 +9,9 @@ with_fo_pivot() { pivot /rom /mnt mount -o move /mnt /tmp/root - # /jffs is the overlay + # /overlay is the overlay # /rom is the readonly - fopivot /jffs /rom + fopivot /overlay /rom } boot_hook_add switch2jffs with_fo_pivot diff --git a/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup b/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup index 5eddfb14f..6dedcb1e8 100644 --- a/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup +++ b/package/base-files/files/lib/firstboot/99_10_no_fo_cleanup @@ -5,7 +5,7 @@ no_fo_cleanup() { echo "done" - umount -l /jffs + umount -l /overlay umount -l /tmp/root exit 0 } diff --git a/package/base-files/files/lib/functions/boot.sh b/package/base-files/files/lib/functions/boot.sh index 96c1c59db..e6f6633ad 100644 --- a/package/base-files/files/lib/functions/boot.sh +++ b/package/base-files/files/lib/functions/boot.sh @@ -42,7 +42,7 @@ dupe() { # { cd $2 find . -xdev -type d - echo "./dev ./jffs ./mnt ./proc ./tmp" + echo "./dev ./overlay ./mnt ./proc ./tmp" # xdev skips mounted directories cd $1 } | xargs mkdir -p @@ -69,7 +69,6 @@ pivot() { # mount -o move $2/dev /dev mount -o move $2/tmp /tmp mount -o move $2/sys /sys 2>&- - mount -o move $2/jffs /jffs 2>&- mount -o move $2/overlay /overlay 2>&- return 0 } diff --git a/package/base-files/files/lib/preinit/40_mount_jffs2 b/package/base-files/files/lib/preinit/40_mount_jffs2 index 99fe262c6..cb743ea75 100644 --- a/package/base-files/files/lib/preinit/40_mount_jffs2 +++ b/package/base-files/files/lib/preinit/40_mount_jffs2 @@ -3,7 +3,8 @@ # Copyright (C) 2010 Vertical Communications find_mount_jffs2() { - mount "$(find_mtd_part rootfs_data)" /jffs -t jffs2 + mkdir -p /tmp/overlay + mount "$(find_mtd_part rootfs_data)" /tmp/overlay -t jffs2 } jffs2_not_mounted() { diff --git a/package/base-files/files/lib/preinit/70_pivot_jffs2_root b/package/base-files/files/lib/preinit/70_pivot_jffs2_root index f0a2a5569..821bfb14f 100644 --- a/package/base-files/files/lib/preinit/70_pivot_jffs2_root +++ b/package/base-files/files/lib/preinit/70_pivot_jffs2_root @@ -5,7 +5,8 @@ rootfs_pivot() { check_skip || jffs2_not_mounted || { echo "switching to jffs2" - fopivot /jffs /rom && pi_mount_skip_next=true + mount -o move /tmp/overlay /overlay 2>&- + fopivot /overlay /rom && pi_mount_skip_next=true } } diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 3beb6484d..970016e7b 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -35,7 +35,7 @@ install_bin() { # [ ... ] pivot() { # mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1 - mkdir -p $1$2 $1/proc $1/dev $1/tmp $1/jffs && \ + mkdir -p $1$2 $1/proc $1/dev $1/tmp $1/overlay && \ mount -o move /proc $1/proc && \ pivot_root $1 $1$2 || { umount $1 $1 @@ -43,7 +43,7 @@ pivot() { # } mount -o move $2/dev /dev mount -o move $2/tmp /tmp - mount -o move $2/jffs /jffs 2>&- + mount -o move $2/overlay /overlay 2>&- return 0 } @@ -63,9 +63,9 @@ run_ramfs() { # [...] mount -o remount,ro /mnt umount -l /mnt - grep /jffs /proc/mounts > /dev/null && { - mount -o remount,ro /jffs - umount -l /jffs + grep /overlay /proc/mounts > /dev/null && { + mount -o remount,ro /overlay + umount -l /overlay } # spawn a new shell from ramdisk to reduce the probability of cache issues diff --git a/package/base-files/files/sbin/firstboot b/package/base-files/files/sbin/firstboot index e9994dec3..4da299189 100755 --- a/package/base-files/files/sbin/firstboot +++ b/package/base-files/files/sbin/firstboot @@ -27,8 +27,8 @@ if [ "${0##*/}" = "firstboot" ]; then boot_run_hook jffs2reset else mtd erase "$partname" - mount "$mtdpart" /jffs -t jffs2 - fopivot /jffs /rom 1 + mount "$mtdpart" /overlay -t jffs2 + fopivot /overlay /rom 1 fi fi diff --git a/package/block-extroot/files/50_determine_usb_root b/package/block-extroot/files/50_determine_usb_root index 1e5f153b6..192990c91 100644 --- a/package/block-extroot/files/50_determine_usb_root +++ b/package/block-extroot/files/50_determine_usb_root @@ -16,8 +16,8 @@ determine_external_root() { # extroot requires extroot and fstab config files, therefore # we assume configuration is incomplete and not to be used if either of them # is missing (for jffs versions of these files on squashfs image) - if [ "$jffs" = "/jffs" ] && [ -r "/jffs/etc/config/fstab" ]; then - UCI_CONFIG_DIR="/jffs/etc/config" + if [ "$jffs" = "/tmp/overlay" ] && [ -r "/tmp/overlay/etc/config/fstab" ]; then + UCI_CONFIG_DIR="/tmp/overlay/etc/config" ER_IS_SQUASHFS=true fi diff --git a/package/block-extroot/files/60_pivot_usb_root b/package/block-extroot/files/60_pivot_usb_root index c8572a35f..1c9be97ca 100644 --- a/package/block-extroot/files/60_pivot_usb_root +++ b/package/block-extroot/files/60_pivot_usb_root @@ -10,7 +10,7 @@ external_root_pivot() { check_skip || [ "$pi_extroot_mount_success" != "true" ] || { echo "switching to external rootfs" if [ "$ER_IS_SQUASHFS" = "true" ]; then - umount /jffs + umount /tmp/overlay fi mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true } diff --git a/package/busybox/files/cron b/package/busybox/files/cron index aa538969b..2e020bbc6 100755 --- a/package/busybox/files/cron +++ b/package/busybox/files/cron @@ -6,7 +6,7 @@ start () { loglevel=$(/sbin/uci get "system.@system[0].cronloglevel" 2>/dev/null) [ -z "$(ls /etc/crontabs/)" ] && exit 1 mkdir -p /var/spool/cron - [ -L /var/spool/cron/crontabs ] || ln -s /etc/crontabs /var/spool/cron/crontabs + ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null crond -c /etc/crontabs -l ${loglevel:-5} } diff --git a/package/hostap-driver/Makefile b/package/hostap-driver/Makefile index f78d7877d..3ea3a25e2 100644 --- a/package/hostap-driver/Makefile +++ b/package/hostap-driver/Makefile @@ -79,7 +79,7 @@ endef define KernelPackage/hostap-cs $(call KernelPackage/hostap/Default) TITLE:=Host AP driver for PCMCIA adaptors - DEPENDS:=@PCMCIA_SUPPORT kmod-hostap +kmod-pcmcia-core + DEPENDS:=@PCMCIA_SUPPORT +kmod-hostap +kmod-pcmcia-core KCONFIG:=CONFIG_HOSTAP_CS AUTOLOAD:=$(call AutoLoad,60,hostap_cs) endef @@ -103,7 +103,7 @@ endef define KernelPackage/hostap-pci $(call KernelPackage/hostap/Default) TITLE:=Host AP driver for PCI adaptors - DEPENDS:= kmod-hostap + DEPENDS:=@PCI_SUPPORT +kmod-hostap KCONFIG:=CONFIG_HOSTAP_PCI AUTOLOAD:=$(call AutoLoad,60,hostap_pci) endef @@ -129,7 +129,7 @@ endef define KernelPackage/hostap-plx $(call KernelPackage/hostap/Default) TITLE:=Host AP driver for PLX9052 based PCI adaptors - DEPENDS:=@PCI_SUPPORT kmod-hostap + DEPENDS:=@PCI_SUPPORT +kmod-hostap KCONFIG:=CONFIG_HOSTAP_PLX AUTOLOAD:=$(call AutoLoad,60,hostap_plx) endef diff --git a/package/hostapd/files/hostapd.sh b/package/hostapd/files/hostapd.sh index b477cd773..c83c06df8 100644 --- a/package/hostapd/files/hostapd.sh +++ b/package/hostapd/files/hostapd.sh @@ -119,7 +119,7 @@ hostapd_setup_vif() { config_get channel "$device" channel config_get hwmode "$device" hwmode case "$hwmode" in - bg) hwmode=g;; + *bg) hwmode=g;; esac [ "$channel" = auto ] && channel= [ -n "$channel" -a -z "$hwmode" ] && wifi_fixup_hwmode "$device" @@ -127,7 +127,7 @@ hostapd_setup_vif() { ctrl_interface=/var/run/hostapd-$ifname driver=$driver interface=$ifname -${hwmode:+hw_mode=$hwmode} +${hwmode:+hw_mode=${hwmode#11}} ${channel:+channel=$channel} $hostapd_cfg EOF diff --git a/package/kernel/modules/netfilter.mk b/package/kernel/modules/netfilter.mk index 0b8cb21a9..bf46a72c4 100644 --- a/package/kernel/modules/netfilter.mk +++ b/package/kernel/modules/netfilter.mk @@ -21,12 +21,18 @@ endef define KernelPackage/ipt-core/description Netfilter core kernel modules Includes: - - limit - - LOG - - mac - - multiport - - TCPMSS - - REJECT + - ipt_limit + - xt_limit + - ipt_mac + - xt_mac + - ipt_multiport + - xt_multiport + - ipt_comment + - xt_comment + - ipt_LOG + - ipt_TCPMSS + - xt_TCPMSS + - ipt_REJECT endef $(eval $(call KernelPackage,ipt-core)) @@ -94,6 +100,8 @@ define KernelPackage/ipt-filter/description Includes: - ipt_layer7 - ipt_string + - xt_layer7 + - xt_string endef $(eval $(call KernelPackage,ipt-filter)) @@ -110,14 +118,30 @@ endef define KernelPackage/ipt-ipopt/description Netfilter (IPv4) modules for matching/changing IP packet options Includes: - - ipt_CLASSIFY - - ipt_dscp/DSCP - - ipt_ecn/ECN + - ipt_dscp + - xt_dscp + - xt_DSCP + - ipt_ecn - ipt_length - - ipt_tos/TOS - - ipt_tcpmms - - ipt_ttl/TTL + - xt_length + - ipt_mark + - xt_mark + - xt_statistic + - ipt_tcpmss + - xt_tcpmss + - ipt_time + - xt_time - ipt_unclean + - ipt_CLASSIFY + - xt_CLASSIFY + - ipt_DSCP + - ipt_ECN + - ipt_MARK + - xt_MARK + - xt_tos + - xt_TOS + - xt_hl + - xt_HL endef $(eval $(call KernelPackage,ipt-ipopt)) @@ -136,6 +160,8 @@ define KernelPackage/ipt-ipsec/description Includes: - ipt_ah - ipt_esp + - xt_esp + - xt_policy endef $(eval $(call KernelPackage,ipt-ipsec)) @@ -188,12 +214,17 @@ endef define KernelPackage/ipt-nathelper/description Default Netfilter (IPv4) Conntrack and NAT helpers Includes: - - conntrack_ftp - - nat_ftp - - conntrack_irc - - nat_irc - - conntrack_tftp - - nat_tftp + - ip_conntrack_ftp + - ip_nat_ftp + - nf_conntrack_ftp + - nf_nat_ftp + - ip_conntrack_irc + - ip_nat_irc + - nf_conntrack_irc + - nf_nat_irc + - ip_conntrack_tftp + - nf_conntrack_tftp + - nf_nat_tftp endef $(eval $(call KernelPackage,ipt-nathelper)) @@ -211,13 +242,32 @@ define KernelPackage/ipt-nathelper-extra/description Extra Netfilter (IPv4) Conntrack and NAT helpers Includes: - ip_conntrack_amanda + - nf_conntrack_amanda + - nf_nat_amanda - ip_conntrack_proto_gre - ip_nat_proto_gre + - nf_conntrack_proto_gre + - nf_nat_proto_gre + - ip_conntrack_h323 + - ip_nat_h323 + - nf_conntrack_h323 + - nf_nat_h323 + - ip_conntrack_mms + - ip_nat_mms - ip_conntrack_pptp - ip_nat_pptp + - nf_conntrack_pptp + - nf_nat_pptp + - ip_conntrack_rtsp + - ip_nat_rtsp + - nf_conntrack_rtsp + - nf_nat_rtsp - ip_conntrack_sip - ip_nat_sip + - nf_conntrack_sip + - nf_nat_sip - ip_nat_snmp_basic + - nf_nat_snmp_basic endef $(eval $(call KernelPackage,ipt-nathelper-extra)) @@ -309,10 +359,12 @@ endef define KernelPackage/ipt-extra/description Other Netfilter (IPv4) kernel modules Includes: + - ipt_condition - ipt_owner - - ipt_physdev + - xt_physdev - ipt_pkttype - - ipt_recent + - xt_pkttype + - xt_quota endef $(eval $(call KernelPackage,ipt-extra)) diff --git a/package/kernel/modules/wireless.mk b/package/kernel/modules/wireless.mk index 9f498ee90..41a05ff59 100644 --- a/package/kernel/modules/wireless.mk +++ b/package/kernel/modules/wireless.mk @@ -106,6 +106,22 @@ endef $(eval $(call KernelPackage,net-hermes-plx)) +define KernelPackage/net-hermes-pcmcia + SUBMENU:=$(WIRELESS_MENU) + TITLE:=Hermes based PCMCIA adaptors + DEPENDS:=@PCMCIA_SUPPORT +kmod-net-hermes + KCONFIG:=CONFIG_PCMCIA_HERMES + FILES:=$(LINUX_DIR)/drivers/net/wireless/orinoco/orinoco_cs.$(LINUX_KMOD_SUFFIX) + AUTOLOAD:=$(call AutoLoad,55,orinoco_cs) +endef + +define KernelPackage/net-hermes-pcmcia/description + Kernel modules for Hermes based PCMCIA adaptors +endef + +$(eval $(call KernelPackage,net-hermes-pcmcia)) + + define KernelPackage/net-prism54 SUBMENU:=$(WIRELESS_MENU) TITLE:=Intersil Prism54 support diff --git a/package/opkg/files/opkg.conf b/package/opkg/files/opkg.conf index fb61d7a47..0e85936ba 100644 --- a/package/opkg/files/opkg.conf +++ b/package/opkg/files/opkg.conf @@ -2,4 +2,4 @@ src/gz snapshots http://downloads.openwrt.org/snapshots/trunk/$S/packages dest root / dest ram /tmp lists_dir ext /var/opkg-lists -option overlay_root /jffs +option overlay_root /overlay diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c index 571901e67..c48af45cf 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c @@ -48,7 +48,6 @@ void __init ap91_eth_init(u8 *mac_addr, const char *port_names[]) /* WAN port */ ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0x0; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.fifo_cfg1 = 0x0fff0000; @@ -57,7 +56,6 @@ void __init ap91_eth_init(u8 *mac_addr, const char *port_names[]) /* LAN ports */ ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth1_data.phy_mask = 0x0; ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.fifo_cfg1 = 0x0fff0000; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c index 6fa950f70..cd865b001 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c @@ -113,7 +113,6 @@ static void __init ap81_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.has_ar8216 = 1; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c index 72c001631..9aa17dce1 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c @@ -206,7 +206,6 @@ static void __init ap83_generic_setup(void) ar71xx_add_device_eth(0); ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; - ar71xx_eth1_data.phy_mask = 0x0; ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c index a6f1daf46..b9b037a7c 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c @@ -80,7 +80,6 @@ static void __init aw_nr580_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c index 5eb594c31..f5eb7b2e4 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c @@ -144,7 +144,6 @@ static void __init dir_615c1_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c index 1e5a93381..42d0f81e6 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c @@ -135,7 +135,6 @@ static void __init mzk_w04nu_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.has_ar8216 = 1; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c index 3a38c8285..ed431d824 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c @@ -134,7 +134,6 @@ static void __init mzk_w300nh_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.has_ar8216 = 1; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c index 96a976f8a..576da4ba7 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c @@ -55,7 +55,6 @@ static void __init pb42_init(void) ar71xx_eth0_data.phy_mask = PB42_WAN_PHYMASK; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth1_data.phy_mask = PB42_LAN_PHYMASK; ar71xx_eth1_data.speed = SPEED_100; ar71xx_eth1_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c index 052884f5c..aa746665e 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c @@ -179,7 +179,6 @@ static void __init pb44_init(void) ar71xx_add_device_eth(0); ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; - ar71xx_eth1_data.phy_mask = PB44_LAN_PHYMASK; ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_pll_data.pll_1000 = 0x110000; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c index bf1a39f3b..f3fa4cf30 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c @@ -177,10 +177,10 @@ static void __init rb411_setup(void) rb4xx_generic_setup(); rb4xx_add_device_spi(); - ar71xx_add_device_mdio(0xfffffffe); + ar71xx_add_device_mdio(0xfffffffc); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0x00000001; + ar71xx_eth0_data.phy_mask = 0x00000003; ar71xx_add_device_eth(0); @@ -192,16 +192,7 @@ MIPS_MACHINE(AR71XX_MACH_RB_411, "411", "MikroTik RouterBOARD 411/A/AH", static void __init rb411u_setup(void) { - rb4xx_generic_setup(); - rb4xx_add_device_spi(); - - ar71xx_add_device_mdio(0xfffffffd); - - ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0x00000002; - ar71xx_add_device_eth(0); - - ar71xx_pci_init(ARRAY_SIZE(rb4xx_pci_irqs), rb4xx_pci_irqs); + rb411_setup(); ar71xx_add_device_usb(); } @@ -216,7 +207,6 @@ static void __init rb433_setup(void) ar71xx_add_device_mdio(0xffffffe9); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0x00000006; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; @@ -249,7 +239,6 @@ static void __init rb450_generic_setup(int gige) ar71xx_add_device_mdio(0xffffffe0); ar71xx_eth0_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0x0000000f; ar71xx_eth0_data.speed = (gige) ? SPEED_1000 : SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; @@ -284,7 +273,6 @@ static void __init rb493_setup(void) ar71xx_add_device_mdio(0x3fffff00); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c index 4abb8e4ed..2bf9ad9b0 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c @@ -120,7 +120,6 @@ static void __init tew_632brp_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c index fd8e5fce8..3b7b764c2 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c @@ -130,7 +130,6 @@ static void __init tl_wr1043nd_setup(void) ar71xx_eth0_data.mii_bus_dev = &tl_wr1043nd_rtl8366rb_device.dev; ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; - ar71xx_eth0_data.phy_mask = 0x0; ar71xx_eth0_data.speed = SPEED_1000; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_pll_data.pll_1000 = 0x1a000000; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c index 9f9e3c6e8..1b849e18b 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c @@ -120,7 +120,6 @@ static void __init tl_wr841n_v1_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0x0; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c index 67af5b0f1..0c648939f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c @@ -121,7 +121,6 @@ static void __init tl_wr941nd_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0x0; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c index 5b1c504f3..3cd5a63ef 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c @@ -136,9 +136,6 @@ static void __init ubnt_generic_setup(void) #define UBNT_RS_WAN_PHYMASK (1 << 20) #define UBNT_RS_LAN_PHYMASK ((1 << 16) | (1 << 17) | (1 << 18) | (1 << 19)) -#define UBNT_RSPRO_WAN_PHYMASK (1 << 4) -#define UBNT_RSPRO_LAN_PHYMASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)) - static void __init ubnt_rs_setup(void) { ubnt_generic_setup(); @@ -149,8 +146,6 @@ static void __init ubnt_rs_setup(void) ar71xx_eth0_data.phy_mask = UBNT_RS_WAN_PHYMASK; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth1_data.phy_mask = UBNT_RS_LAN_PHYMASK; - ar71xx_eth1_data.speed = SPEED_100; ar71xx_eth1_data.duplex = DUPLEX_FULL; @@ -169,6 +164,9 @@ MIPS_MACHINE(AR71XX_MACH_UBNT_RS, "UBNT-RS", "Ubiquiti RouterStation", MIPS_MACHINE(AR71XX_MACH_UBNT_AR71XX, "Ubiquiti AR71xx-based board", "Ubiquiti RouterStation", ubnt_rs_setup); +#define UBNT_RSPRO_WAN_PHYMASK (1 << 4) +#define UBNT_RSPRO_LAN_PHYMASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3)) + static void __init ubnt_rspro_setup(void) { ubnt_generic_setup(); @@ -179,8 +177,6 @@ static void __init ubnt_rspro_setup(void) ar71xx_eth0_data.phy_mask = UBNT_RSPRO_WAN_PHYMASK; ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; - ar71xx_eth1_data.phy_mask = UBNT_RSPRO_LAN_PHYMASK; - ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; @@ -235,7 +231,6 @@ static void __init ubnt_m_setup(void) ar71xx_add_device_mdio(~0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.fifo_cfg1 = 0x0010ffff; @@ -272,7 +267,6 @@ static void __init ubnt_nano_m_setup(void) ubnt_m_setup(); ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth1_data.phy_mask = 0; ar71xx_eth1_data.speed = SPEED_1000; ar71xx_eth1_data.duplex = DUPLEX_FULL; ar71xx_eth1_data.fifo_cfg1 = 0x0010ffff; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c index 3dd97789a..62931e6a1 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c @@ -173,7 +173,6 @@ static void __init wndr3700_setup(void) ar71xx_eth0_pll_data.pll_1000 = 0x11110000; ar71xx_eth0_data.mii_bus_dev = &wndr3700_rtl8366s_device.dev; ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_1000; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c index bf4be8946..73422d6ba 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c @@ -122,7 +122,6 @@ static void __init wnr2000_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.has_ar8216 = 1; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c index bf8b9f562..22585842e 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c @@ -79,7 +79,7 @@ static void __init wp543_setup(void) ar71xx_add_device_mdio(0xfffffff7); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ar71xx_eth0_data.phy_mask = 0x00000008; + ar71xx_eth0_data.phy_mask = 0x08; ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC | RESET_MODULE_GE0_PHY; ar71xx_add_device_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c index 3d50afcbb..886f94728 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c @@ -143,7 +143,6 @@ static void __init wrt400n_setup(void) ar71xx_add_device_mdio(0x0); ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_100; ar71xx_eth0_data.duplex = DUPLEX_FULL; ar71xx_eth0_data.has_ar8216 = 1; diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c index c6fb241c5..b52cc601f 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c @@ -234,7 +234,6 @@ static void __init wzrhpg300nh_setup(void) ar71xx_eth0_pll_data.pll_1000 = 0x1e000100; ar71xx_eth0_data.mii_bus_dev = &wzrhpg300nh_rtl8366s_device.dev; ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; - ar71xx_eth0_data.phy_mask = 0xf; ar71xx_eth0_data.speed = SPEED_1000; ar71xx_eth0_data.duplex = DUPLEX_FULL; diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h index 841c67fb9..5be89987b 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h @@ -38,7 +38,7 @@ #define ETH_FCS_LEN 4 #define AG71XX_DRV_NAME "ag71xx" -#define AG71XX_DRV_VERSION "0.5.32" +#define AG71XX_DRV_VERSION "0.5.33" #define AG71XX_NAPI_WEIGHT 64 #define AG71XX_OOM_REFILL (1 + HZ/10) diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c index 4425b740e..9c76544af 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c @@ -47,10 +47,6 @@ void ag71xx_phy_start(struct ag71xx *ag) if (ag->phy_dev) { phy_start(ag->phy_dev); } else { - struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); - - ag->duplex = pdata->duplex; - ag->speed = pdata->speed; ag->link = 1; ag71xx_link_adjust(ag); } @@ -61,9 +57,7 @@ void ag71xx_phy_stop(struct ag71xx *ag) if (ag->phy_dev) { phy_stop(ag->phy_dev); } else { - ag->duplex = -1; ag->link = 0; - ag->speed = 0; ag71xx_link_adjust(ag); } } @@ -81,12 +75,16 @@ static int ag71xx_phy_connect_fixed(struct ag71xx *ag) case SPEED_1000: break; default: - printk(KERN_ERR "%s: invalid speed specified\n", - dev->name); + printk(KERN_ERR "%s: invalid speed specified\n", dev->name); ret = -EINVAL; break; } + printk(KERN_DEBUG "%s: using fixed link parameters\n", dev->name); + + ag->duplex = pdata->duplex; + ag->speed = pdata->speed; + return ret; } @@ -95,7 +93,6 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag) struct net_device *dev = ag->dev; struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag); struct phy_device *phydev = NULL; - int phy_count = 0; int phy_addr; int ret = 0; @@ -113,51 +110,40 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag) if (phydev == NULL) phydev = ag->mii_bus->phy_map[phy_addr]; - - phy_count++; } - switch (phy_count) { - case 0: + if (!phydev) { printk(KERN_ERR "%s: no PHY found with phy_mask=%08x\n", dev->name, pdata->phy_mask); - ret = -ENODEV; - break; - case 1: - ag->phy_dev = phy_connect(dev, dev_name(&phydev->dev), - &ag71xx_phy_link_adjust, 0, pdata->phy_if_mode); - - if (IS_ERR(ag->phy_dev)) { - printk(KERN_ERR "%s: could not connect to PHY at %s\n", - dev->name, dev_name(&phydev->dev)); - return PTR_ERR(ag->phy_dev); - } - - /* mask with MAC supported features */ - if (pdata->has_gbit) - phydev->supported &= PHY_GBIT_FEATURES; - else - phydev->supported &= PHY_BASIC_FEATURES; - - phydev->advertising = phydev->supported; - - printk(KERN_DEBUG "%s: connected to PHY at %s " - "[uid=%08x, driver=%s]\n", - dev->name, dev_name(&phydev->dev), - phydev->phy_id, phydev->drv->name); - - ag->link = 0; - ag->speed = 0; - ag->duplex = -1; - break; - - default: - printk(KERN_DEBUG "%s: connected to %d PHYs\n", - dev->name, phy_count); - ret = ag71xx_phy_connect_fixed(ag); - break; + return -ENODEV; } + ag->phy_dev = phy_connect(dev, dev_name(&phydev->dev), + &ag71xx_phy_link_adjust, 0, + pdata->phy_if_mode); + + if (IS_ERR(ag->phy_dev)) { + printk(KERN_ERR "%s: could not connect to PHY at %s\n", + dev->name, dev_name(&phydev->dev)); + return PTR_ERR(ag->phy_dev); + } + + /* mask with MAC supported features */ + if (pdata->has_gbit) + phydev->supported &= PHY_GBIT_FEATURES; + else + phydev->supported &= PHY_BASIC_FEATURES; + + phydev->advertising = phydev->supported; + + printk(KERN_DEBUG "%s: connected to PHY at %s [uid=%08x, driver=%s]\n", + dev->name, dev_name(&phydev->dev), + phydev->phy_id, phydev->drv->name); + + ag->link = 0; + ag->speed = 0; + ag->duplex = -1; + return ret; } diff --git a/target/linux/atheros/config-2.6.33 b/target/linux/atheros/config-2.6.33 index a823710dc..24ded4461 100644 --- a/target/linux/atheros/config-2.6.33 +++ b/target/linux/atheros/config-2.6.33 @@ -96,6 +96,7 @@ CONFIG_HAVE_IDE=y CONFIG_HAVE_OPROFILE=y CONFIG_HW_HAS_PCI=y CONFIG_HW_RANDOM=y +CONFIG_IMAGE_CMDLINE_HACK=y CONFIG_INITRAMFS_SOURCE="" # CONFIG_INLINE_READ_LOCK is not set # CONFIG_INLINE_READ_LOCK_BH is not set diff --git a/target/linux/atheros/patches-2.6.30/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.30/110-ar2313_ethernet.patch index 5c28ae8b7..fa9eead51 100644 --- a/target/linux/atheros/patches-2.6.30/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.30/110-ar2313_ethernet.patch @@ -355,7 +355,7 @@ + tasklet_kill(&sp->rx_tasklet); +} + -+static int __exit ar231x_remove(struct platform_device *pdev) ++static int __devexit ar231x_remove(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct ar231x_private *sp = netdev_priv(dev); @@ -392,7 +392,7 @@ +static struct platform_driver ar231x_driver = { + .driver.name = "ar231x-eth", + .probe = ar231x_probe, -+ .remove = ar231x_remove, ++ .remove = __devexit_p(ar231x_remove), +}; + +int __init ar231x_module_init(void) diff --git a/target/linux/atheros/patches-2.6.31/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.31/110-ar2313_ethernet.patch index e003e6b0d..b47ccc4ba 100644 --- a/target/linux/atheros/patches-2.6.31/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.31/110-ar2313_ethernet.patch @@ -355,7 +355,7 @@ + tasklet_kill(&sp->rx_tasklet); +} + -+static int __exit ar231x_remove(struct platform_device *pdev) ++static int __devexit ar231x_remove(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct ar231x_private *sp = netdev_priv(dev); @@ -392,7 +392,7 @@ +static struct platform_driver ar231x_driver = { + .driver.name = "ar231x-eth", + .probe = ar231x_probe, -+ .remove = ar231x_remove, ++ .remove = __devexit_p(ar231x_remove), +}; + +int __init ar231x_module_init(void) diff --git a/target/linux/atheros/patches-2.6.32/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.32/110-ar2313_ethernet.patch index 6f511a730..33e4ae332 100644 --- a/target/linux/atheros/patches-2.6.32/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.32/110-ar2313_ethernet.patch @@ -355,7 +355,7 @@ + tasklet_kill(&sp->rx_tasklet); +} + -+static int __exit ar231x_remove(struct platform_device *pdev) ++static int __devexit ar231x_remove(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct ar231x_private *sp = netdev_priv(dev); @@ -392,7 +392,7 @@ +static struct platform_driver ar231x_driver = { + .driver.name = "ar231x-eth", + .probe = ar231x_probe, -+ .remove = ar231x_remove, ++ .remove = __devexit_p(ar231x_remove), +}; + +int __init ar231x_module_init(void) diff --git a/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch index f24ee12b7..6ce948efe 100644 --- a/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch @@ -355,7 +355,7 @@ + tasklet_kill(&sp->rx_tasklet); +} + -+static int __exit ar231x_remove(struct platform_device *pdev) ++static int __devexit ar231x_remove(struct platform_device *pdev) +{ + struct net_device *dev = platform_get_drvdata(pdev); + struct ar231x_private *sp = netdev_priv(dev); @@ -392,7 +392,7 @@ +static struct platform_driver ar231x_driver = { + .driver.name = "ar231x-eth", + .probe = ar231x_probe, -+ .remove = ar231x_remove, ++ .remove = __devexit_p(ar231x_remove), +}; + +int __init ar231x_module_init(void) diff --git a/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c b/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c index c71c5b48b..3ccc652a0 100644 --- a/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c +++ b/target/linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c @@ -105,10 +105,11 @@ static int jz4740_pcm_hw_params(struct snd_pcm_substream *substream, struct jz4740_pcm_config *config; config = rtd->dai->cpu_dai->dma_data; - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { - prtd->dma = jz4740_dma_request(substream, "PCM Playback"); - } else { - prtd->dma = jz4740_dma_request(substream, "PCM Capture"); + if (!prtd->dma) { + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + prtd->dma = jz4740_dma_request(substream, "PCM Playback"); + else + prtd->dma = jz4740_dma_request(substream, "PCM Capture"); } if (!prtd->dma) @@ -135,8 +136,10 @@ static int jz4740_pcm_hw_free(struct snd_pcm_substream *substream) struct jz4740_runtime_data *prtd = substream->runtime->private_data; snd_pcm_set_runtime_buffer(substream, NULL); - if (prtd->dma) + if (prtd->dma) { jz4740_dma_free(prtd->dma); + prtd->dma = NULL; + } return 0; }