lantiq: fix dsl drivers for 3.18
authorJohn Crispin <john@openwrt.org>
Mon, 9 Feb 2015 12:12:52 +0000 (12:12 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 9 Feb 2015 12:12:52 +0000 (12:12 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 44346

package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
package/kernel/lantiq/ltq-adsl/patches/140-linux_3.18.patch [new file with mode: 0644]
package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c

index 4ddc4c6aed4476eaa3915d68faad39a13f09cb7f..c58732498aa25fd932cbe11d1f90793c92392327 100644 (file)
@@ -109,7 +109,7 @@ typedef enum {
 
 /* wait for an event, timeout is measured in ms */
 #define MEI_WAIT_EVENT_TIMEOUT(ev,timeout)\
-        interruptible_sleep_on_timeout(&ev,timeout * HZ / 1000)
+        wait_event_interruptible_timeout(ev,0 == 1, timeout * HZ / 1000)
 #define MEI_WAKEUP_EVENT(ev)\
         wake_up_interruptible(&ev)
 #endif /* IFX_MEI_BSP */
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
new file mode 100644 (file)
index 0000000..a0a9acd
--- /dev/null
@@ -0,0 +1,13 @@
+Index: drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h
+===================================================================
+--- 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
++++ drv_dsl_cpe_api-3.24.4.4/src/include/drv_dsl_cpe_os_linux.h        2015-02-08 10:02:19.580740173 +0100
+@@ -218,7 +218,7 @@
+ #define DSL_DRV_WAKEUP_WAKELIST(queue)       wake_up_interruptible(&(queue))
+ #define DSL_DRV_INIT_EVENT(name,ev)          init_waitqueue_head(&(ev))
+ /* wait for an event, timeout is measured in ms */
+-#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t)     interruptible_sleep_on_timeout(&(ev), (t) * HZ / 1000)
++#define DSL_DRV_WAIT_EVENT_TIMEOUT(ev,t)     wait_event_interruptible_timeout((ev), 0 == 1, (t) * HZ / 1000)
+ #define DSL_DRV_WAIT_EVENT(ev)               interruptible_sleep_on(&(ev))
+ #define DSL_DRV_WAKEUP_EVENT(ev)             wake_up_interruptible(&(ev))
+ #define DSL_DRV_TimeMSecGet()                DSL_DRV_ElapsedTimeMSecGet(0)
index 1b9b710bfb7359ddb1b10c39c5b72c57982b6aba..9c25c154b54f9c8b29688f0a3588c463df0497a3 100644 (file)
@@ -66,7 +66,7 @@ unsigned long cgu_get_pp32_clock(void)
        return rate;
 }
 
-static void ptm_setup(struct net_device *, int);
+static void ptm_setup(struct net_device *);
 static struct net_device_stats *ptm_get_stats(struct net_device *);
 static int ptm_open(struct net_device *);
 static int ptm_stop(struct net_device *);
@@ -134,8 +134,9 @@ unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
  * ####################################
  */
 
-static void ptm_setup(struct net_device *dev, int ndev)
+static void ptm_setup(struct net_device *dev)
 {
+    int ndev = 0;
     dev->netdev_ops      = &g_ptm_netdev_ops;
     netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
     dev->watchdog_timeo  = ETH_WATCHDOG_TIMEOUT;
@@ -951,10 +952,9 @@ static int ifx_ptm_init(void)
     }
 
     for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) {
-        g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], ether_setup);
+        g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], ether_setup, ptm_setup);
         if ( g_net_dev[i] == NULL )
             goto ALLOC_NETDEV_FAIL;
-        ptm_setup(g_net_dev[i], i);
     }
 
     for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) {