From a3d62deca257f2a5b9be1963aba395f7d8a0c08a Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2010 16:05:27 +0000 Subject: [PATCH 01/16] [atheros] fix ethernet driver remove function to use the correct annotation (#6311) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20350 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/atheros/patches-2.6.30/110-ar2313_ethernet.patch | 4 ++-- target/linux/atheros/patches-2.6.31/110-ar2313_ethernet.patch | 4 ++-- target/linux/atheros/patches-2.6.32/110-ar2313_ethernet.patch | 4 ++-- target/linux/atheros/patches-2.6.33/110-ar2313_ethernet.patch | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) 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) From 013976e1d1771291fd549b39163f22cc724257e4 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2010 17:16:36 +0000 Subject: [PATCH 02/16] [package] add pcmcia hermes module, patch from Guillaume Lecerf git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20353 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/kernel/modules/wireless.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/package/kernel/modules/wireless.mk b/package/kernel/modules/wireless.mk index 9f498ee90..5da3211cb 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_DIR)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 From c55e10aab7cee13246923cc674f70710bb381018 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2010 17:16:41 +0000 Subject: [PATCH 03/16] [package] If /var/spool/cron/crontabs is a directory, then /etc/init.d/cron will place a spurious "crontabs" symlink into it. Patch fro Stefan Monnier git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20354 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/busybox/files/cron | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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} } From f27821cfcab3a5f8561399086e92db8585cf2925 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2010 17:16:45 +0000 Subject: [PATCH 04/16] [package] disable ucitrigger for now, not used, patch from Dave Kooper git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20355 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/target.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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:= From 9e7554db871433758f661e85f8ff95501b62d935 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2010 17:16:50 +0000 Subject: [PATCH 05/16] change from /jffs to /overlay, patch from Daniel Dickinson git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20356 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- include/image.mk | 3 +-- package/base-files/Makefile | 2 +- .../base-files/files/lib/firstboot/20_no_fo_mount_jffs | 4 ++-- .../files/lib/firstboot/30_is_rootfs_mounted | 2 +- package/base-files/files/lib/firstboot/30_no_fo_pivot | 2 +- .../base-files/files/lib/firstboot/40_copy_ramoverlay | 2 +- package/base-files/files/lib/firstboot/50_pivot | 4 ++-- .../base-files/files/lib/firstboot/99_10_no_fo_cleanup | 2 +- package/base-files/files/lib/functions/boot.sh | 3 +-- package/base-files/files/lib/preinit/40_mount_jffs2 | 3 ++- .../base-files/files/lib/preinit/70_pivot_jffs2_root | 3 ++- package/base-files/files/lib/upgrade/common.sh | 10 +++++----- package/base-files/files/sbin/firstboot | 4 ++-- package/block-extroot/files/50_determine_usb_root | 4 ++-- package/block-extroot/files/60_pivot_usb_root | 2 +- package/opkg/files/opkg.conf | 2 +- 16 files changed, 26 insertions(+), 26 deletions(-) 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/package/base-files/Makefile b/package/base-files/Makefile index 0d4c29eec..88ab61018 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -364,7 +364,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/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 From a27a0f0fe52cf674b810e01f9e888067fd8bad87 Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 21 Mar 2010 17:56:19 +0000 Subject: [PATCH 06/16] [package] fix path to the orinoco pcmcia driver, thanks hauke git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20357 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/kernel/modules/wireless.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/modules/wireless.mk b/package/kernel/modules/wireless.mk index 5da3211cb..41a05ff59 100644 --- a/package/kernel/modules/wireless.mk +++ b/package/kernel/modules/wireless.mk @@ -111,7 +111,7 @@ define KernelPackage/net-hermes-pcmcia TITLE:=Hermes based PCMCIA adaptors DEPENDS:=@PCMCIA_SUPPORT +kmod-net-hermes KCONFIG:=CONFIG_PCMCIA_HERMES - FILES:=$(LINUX_DIR)/drivers/net/wireless/$(ORINOCO_DIR)orinoco_cs.$(LINUX_KMOD_SUFFIX) + FILES:=$(LINUX_DIR)/drivers/net/wireless/orinoco/orinoco_cs.$(LINUX_KMOD_SUFFIX) AUTOLOAD:=$(call AutoLoad,55,orinoco_cs) endef From e6e930942664682d11abe4ad7ccd0bada1afecfa Mon Sep 17 00:00:00 2001 From: juhosg Date: Sun, 21 Mar 2010 18:16:07 +0000 Subject: [PATCH 07/16] ar71xx: change PHY select logic, and update phy_masks git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20358 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../files/arch/mips/ar71xx/dev-ap91-eth.c | 2 - .../ar71xx/files/arch/mips/ar71xx/mach-ap81.c | 1 - .../ar71xx/files/arch/mips/ar71xx/mach-ap83.c | 1 - .../files/arch/mips/ar71xx/mach-aw-nr580.c | 1 - .../files/arch/mips/ar71xx/mach-dir-615-c1.c | 1 - .../files/arch/mips/ar71xx/mach-mzk-w04nu.c | 1 - .../files/arch/mips/ar71xx/mach-mzk-w300nh.c | 1 - .../ar71xx/files/arch/mips/ar71xx/mach-pb42.c | 1 - .../ar71xx/files/arch/mips/ar71xx/mach-pb44.c | 1 - .../files/arch/mips/ar71xx/mach-rb4xx.c | 7 +- .../files/arch/mips/ar71xx/mach-tew-632brp.c | 1 - .../files/arch/mips/ar71xx/mach-tl-wr1043nd.c | 1 - .../files/arch/mips/ar71xx/mach-tl-wr841n.c | 1 - .../files/arch/mips/ar71xx/mach-tl-wr941nd.c | 1 - .../ar71xx/files/arch/mips/ar71xx/mach-ubnt.c | 12 +-- .../files/arch/mips/ar71xx/mach-wndr3700.c | 1 - .../files/arch/mips/ar71xx/mach-wnr2000.c | 1 - .../files/arch/mips/ar71xx/mach-wp543.c | 2 +- .../files/arch/mips/ar71xx/mach-wrt400n.c | 1 - .../arch/mips/ar71xx/mach-wzr-hp-g300nh.c | 1 - .../ar71xx/files/drivers/net/ag71xx/ag71xx.h | 2 +- .../files/drivers/net/ag71xx/ag71xx_phy.c | 82 ++++++++----------- 22 files changed, 41 insertions(+), 82 deletions(-) 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..0527e13a9 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); @@ -216,7 +216,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 +248,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 +282,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; } From 8b81ef5e98b43ed1eb1df4dc23646db3ac3e0666 Mon Sep 17 00:00:00 2001 From: juhosg Date: Sun, 21 Mar 2010 18:16:24 +0000 Subject: [PATCH 08/16] ar71xx: use the RB411 setup for the RB411U git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20359 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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 0527e13a9..f3fa4cf30 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c @@ -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(); } From 84ad36f3f8dba233aa08344c7bad277bcf150376 Mon Sep 17 00:00:00 2001 From: acoul Date: Sun, 21 Mar 2010 18:18:13 +0000 Subject: [PATCH 09/16] atheros: config-2.6.33, add missing option on commit r20332 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20360 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/atheros/config-2.6.33 | 1 + 1 file changed, 1 insertion(+) 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 From 14d26e83af6c3f771002f93cee01d80998b2b0c4 Mon Sep 17 00:00:00 2001 From: hauke Date: Sun, 21 Mar 2010 19:12:36 +0000 Subject: [PATCH 10/16] kernel: fix some documentation git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20362 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/kernel/modules/netfilter.mk | 92 ++++++++++++++++++++++------- 1 file changed, 72 insertions(+), 20 deletions(-) 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)) From 0e89584a5c96856f476fcad90cf2170a4c5f4f42 Mon Sep 17 00:00:00 2001 From: jow Date: Sun, 21 Mar 2010 22:35:58 +0000 Subject: [PATCH 11/16] [package] hostapd: always strip "11" from hwmode value git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20363 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/hostapd/files/hostapd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 15cd0290d99bf2b0e3c096d26bd678e1615c37ad Mon Sep 17 00:00:00 2001 From: acoul Date: Mon, 22 Mar 2010 11:39:47 +0000 Subject: [PATCH 13/16] hostap-driver: fix DEPENDS on Makefile git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20366 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/hostap-driver/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/hostap-driver/Makefile b/package/hostap-driver/Makefile index f78d7877d..0867672b8 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 From a62005234bdbcbc729a2c23b49974174ec12e8c3 Mon Sep 17 00:00:00 2001 From: acoul Date: Mon, 22 Mar 2010 11:43:46 +0000 Subject: [PATCH 14/16] hostap-driver: fix a typo (thanks acinonyx) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20367 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/hostap-driver/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/hostap-driver/Makefile b/package/hostap-driver/Makefile index 0867672b8..3ea3a25e2 100644 --- a/package/hostap-driver/Makefile +++ b/package/hostap-driver/Makefile @@ -103,7 +103,7 @@ endef define KernelPackage/hostap-pci $(call KernelPackage/hostap/Default) TITLE:=Host AP driver for PCI adaptors - DEPENDS:=@@PCI_SUPPORT +kmod-hostap + DEPENDS:=@PCI_SUPPORT +kmod-hostap KCONFIG:=CONFIG_HOSTAP_PCI AUTOLOAD:=$(call AutoLoad,60,hostap_pci) endef From 124c6d16d7692446d6ff6bbae6f10f32eafcc66e Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 22 Mar 2010 15:22:26 +0000 Subject: [PATCH 15/16] [xburst] sound jz4740_pcm: Don't request dma channel mor then once. It is possible that the hw_params callback is called multiple times when using the oss emulation layer. Thus we need to check whether the dma channel has already been requested otherwise we'll end up with all dma channels being requested by sound driver. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20369 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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..4a4de195a 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) From 113249c0a943849326e437dedcd62b2128bc06b1 Mon Sep 17 00:00:00 2001 From: lars Date: Mon, 22 Mar 2010 18:57:50 +0000 Subject: [PATCH 16/16] [xburst] sound jz4740_pcm: Set dma channel to NULL after it has been freed, because hw_free can be called multiple times aswell. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20373 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../linux/xburst/files-2.6.32/sound/soc/jz4740/jz4740-pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 4a4de195a..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 @@ -136,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; }