Changeset 44844


Ignore:
Timestamp:
2015-03-16T14:05:42+01:00 (3 years ago)
Author:
nbd
Message:

ltq-adsl: fix bugs in linux 3.18 compatiblity change

Signed-off-by: Felix Fietkau <nbd@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch

    r44346 r44844  
    1 Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 
    2 =================================================================== 
    3 --- drv_dsl_cpe_api-3.24.4.4.orig/src/include/drv_dsl_cpe_os_linux.h    2015-02-08 09:59:02.424259834 +0100 
    4 +++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h 2015-02-08 10:02:19.580740173 +0100 
    5 @@ -218,7 +218,7 @@ 
     1--- a/src/include/drv_dsl_cpe_os_linux.h 
     2+++ b/src/include/drv_dsl_cpe_os_linux.h 
     3@@ -214,12 +214,35 @@ static inline int dsl_mutex_lock(struct  
     4 #define DSL_DRV_MUTEX_LOCK(id)               down_interruptible(&(id)) 
     5 #define DSL_DRV_MUTEX_UNLOCK(id)             up(&(id)) 
     6 #endif 
     7+ 
     8+static inline long 
     9+ugly_hack_sleep_on_timeout(wait_queue_head_t *q, long timeout) 
     10+{ 
     11+       unsigned long flags; 
     12+       wait_queue_t wait; 
     13+ 
     14+       init_waitqueue_entry(&wait, current); 
     15+ 
     16+       __set_current_state(TASK_INTERRUPTIBLE); 
     17+       spin_lock_irqsave(&q->lock, flags); 
     18+       __add_wait_queue(q, &wait); 
     19+       spin_unlock(&q->lock); 
     20+ 
     21+       timeout = schedule_timeout(timeout); 
     22+ 
     23+       spin_lock_irq(&q->lock); 
     24+       __remove_wait_queue(q, &wait); 
     25+       spin_unlock_irqrestore(&q->lock, flags); 
     26+ 
     27+       return timeout; 
     28+} 
     29+ 
     30 #define DSL_DRV_INIT_WAKELIST(name,queue)    init_waitqueue_head(&(queue)) 
    631 #define DSL_DRV_WAKEUP_WAKELIST(queue)       wake_up_interruptible(&(queue)) 
    732 #define DSL_DRV_INIT_EVENT(name,ev)          init_waitqueue_head(&(ev)) 
    833 /* wait for an event, timeout is measured in ms */ 
    934-#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t)     interruptible_sleep_on_timeout(&(ev), (t) * HZ / 1000) 
    10 +#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t)     wait_event_interruptible_timeout((ev), 0 == 1, (t) * HZ / 1000) 
    11  #define DSL_DRV_WAIT_EVENT(ev)               interruptible_sleep_on(&(ev)) 
     35-#define DSL_DRV_WAIT_EVENT(ev)               interruptible_sleep_on(&(ev)) 
     36+#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t)     ugly_hack_sleep_on_timeout(&(ev), (t) * HZ / 1000) 
     37+#define DSL_DRV_WAIT_EVENT(ev)               ugly_hack_sleep_on_timeout(&(ev), MAX_SCHEDULE_TIMEOUT) 
    1238 #define DSL_DRV_WAKEUP_EVENT(ev)             wake_up_interruptible(&(ev)) 
    1339 #define DSL_DRV_TimeMSecGet()                DSL_DRV_ElapsedTimeMSecGet(0) 
     40 #define DSL_WAIT(ms)   msleep(ms) 
Note: See TracChangeset for help on using the changeset viewer.