From 969e527bbefedfa5142b6552823386e5eb10667f Mon Sep 17 00:00:00 2001 From: Daniel Gimpelevich Date: Fri, 24 Jun 2016 15:22:22 +0200 Subject: lantiq: Reduce ugliness of ugly hack Signed-off-by: Daniel Gimpelevich --- .../lantiq/ltq-adsl/patches/140-linux_3.18.patch | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'package/kernel/lantiq/ltq-adsl') diff --git a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch index 80f085492c..1d1e5669ac 100644 --- a/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch +++ b/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch @@ -1,6 +1,6 @@ --- a/src/include/drv_dsl_cpe_os_linux.h +++ b/src/include/drv_dsl_cpe_os_linux.h -@@ -214,12 +214,35 @@ static inline int dsl_mutex_lock(struct +@@ -214,12 +214,25 @@ static inline int dsl_mutex_lock(struct #define DSL_DRV_MUTEX_LOCK(id) down_interruptible(&(id)) #define DSL_DRV_MUTEX_UNLOCK(id) up(&(id)) #endif @@ -8,21 +8,11 @@ +static inline long +ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout) +{ -+ unsigned long flags; -+ wait_queue_t wait; -+ -+ init_waitqueue_entry(&wait, current); -+ -+ __set_current_state(TASK_INTERRUPTIBLE); -+ spin_lock_irqsave(&q->lock, flags); -+ __add_wait_queue(q, &wait); -+ spin_unlock(&q->lock); ++ DEFINE_WAIT(wait); + ++ prepare_to_wait(q, &wait, TASK_INTERRUPTIBLE); + timeout = schedule_timeout(timeout); -+ -+ spin_lock_irq(&q->lock); -+ __remove_wait_queue(q, &wait); -+ spin_unlock_irqrestore(&q->lock, flags); ++ finish_wait(q, &wait); + + return timeout; +} -- cgit v1.2.3 From 1520c5ac9519ebc16903af665d6dc5c88c20d5a9 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 24 Jun 2016 16:39:07 +0200 Subject: package/lantiq: make lantiq kernel modules work with xway_legacy Signed-off-by: John Crispin --- package/kernel/lantiq/ltq-adsl/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'package/kernel/lantiq/ltq-adsl') diff --git a/package/kernel/lantiq/ltq-adsl/Makefile b/package/kernel/lantiq/ltq-adsl/Makefile index 26c931e2a9..bd0dd7c3e7 100644 --- a/package/kernel/lantiq/ltq-adsl/Makefile +++ b/package/kernel/lantiq/ltq-adsl/Makefile @@ -30,14 +30,14 @@ define KernelPackage/ltq-adsl-template TITLE:=adsl driver for $(1) URL:=http://www.lantiq.com/ VARIANT:=$(1) - DEPENDS:=@TARGET_lantiq_$(2) +kmod-ltq-adsl-$(1)-mei + DEPENDS:=@$(2) +kmod-ltq-adsl-$(1)-mei FILES:=$(PKG_BUILD_DIR)/src/drv_dsl_cpe_api.ko AUTOLOAD:=$(call AutoLoad,51,drv_dsl_cpe_api) endef -KernelPackage/ltq-adsl-danube=$(call KernelPackage/ltq-adsl-template,danube,xway) -KernelPackage/ltq-adsl-ar9=$(call KernelPackage/ltq-adsl-template,ar9,xway) -KernelPackage/ltq-adsl-ase=$(call KernelPackage/ltq-adsl-template,ase,ase) +KernelPackage/ltq-adsl-danube=$(call KernelPackage/ltq-adsl-template,danube,(TARGET_lantiq_xway||TARGET_lantiq_xway_legacy)) +KernelPackage/ltq-adsl-ar9=$(call KernelPackage/ltq-adsl-template,ar9,TARGET_lantiq_xway) +KernelPackage/ltq-adsl-ase=$(call KernelPackage/ltq-adsl-template,ase,TARGET_lantiq_ase) define KernelPackage/ltq-dsl/config source "$(SOURCE)/Config.in" -- cgit v1.2.3