100-compat.patch 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. Index: drv_dsl_cpe_api-4.11.4/src/include/drv_dsl_cpe_os_linux.h
  2. ===================================================================
  3. --- drv_dsl_cpe_api-4.11.4.orig/src/include/drv_dsl_cpe_os_linux.h 2011-10-26 00:35:29.000000000 +0200
  4. +++ drv_dsl_cpe_api-4.11.4/src/include/drv_dsl_cpe_os_linux.h 2012-11-28 23:05:38.766342592 +0100
  5. @@ -17,7 +17,7 @@
  6. #endif
  7. #include <asm/ioctl.h>
  8. -#include <linux/autoconf.h>
  9. +#include <generated/autoconf.h>
  10. #include <linux/module.h>
  11. #include <linux/kernel.h>
  12. #include <linux/init.h>
  13. @@ -28,7 +28,7 @@
  14. #include <linux/sched.h>
  15. #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,17))
  16. - #include <linux/utsrelease.h>
  17. + #include <generated/utsrelease.h>
  18. #endif
  19. #include <linux/types.h>
  20. @@ -40,7 +40,6 @@
  21. #include <linux/delay.h>
  22. #include <linux/poll.h>
  23. #include <asm/uaccess.h>
  24. -#include <linux/smp_lock.h>
  25. #ifdef INCLUDE_DSL_CPE_API_IFXOS_SUPPORT
  26. /** IFXOS includes*/
  27. Index: drv_dsl_cpe_api-4.11.4/src/Makefile.in
  28. ===================================================================
  29. --- drv_dsl_cpe_api-4.11.4.orig/src/Makefile.in 2012-03-05 15:24:31.000000000 +0100
  30. +++ drv_dsl_cpe_api-4.11.4/src/Makefile.in 2012-11-28 23:05:38.770342592 +0100
  31. @@ -72,7 +72,7 @@
  32. # the headerfile of linux kernels 2.6.x contain to much arithmetic
  33. # with void pointers (which is allowed for gcc!)
  34. -@KERNEL_2_6_FALSE@am__append_8 = -Wpointer-arith
  35. +@KERNEL_2_6_FALSE@am__append_8 =
  36. subdir = src
  37. DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
  38. ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
  39. Index: drv_dsl_cpe_api-4.11.4/src/common/drv_dsl_cpe_os_linux.c
  40. ===================================================================
  41. --- drv_dsl_cpe_api-4.11.4.orig/src/common/drv_dsl_cpe_os_linux.c 2011-10-26 00:35:28.000000000 +0200
  42. +++ drv_dsl_cpe_api-4.11.4/src/common/drv_dsl_cpe_os_linux.c 2012-11-28 23:05:38.770342592 +0100
  43. @@ -12,6 +12,7 @@
  44. #define DSL_INTERN
  45. +#include <linux/device.h>
  46. #include "drv_dsl_cpe_api.h"
  47. #include "drv_dsl_cpe_api_ioctl.h"
  48. @@ -34,7 +35,7 @@
  49. static DSL_ssize_t DSL_DRV_Write(DSL_DRV_file_t *pFile, const DSL_char_t * pBuf,
  50. DSL_DRV_size_t nSize, DSL_DRV_offset_t * pLoff);
  51. -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode, DSL_DRV_file_t * pFile,
  52. +static long DSL_DRV_Ioctls(DSL_DRV_file_t * pFile,
  53. DSL_uint_t nCommand, unsigned long nArg);
  54. static int DSL_DRV_Open(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
  55. @@ -71,7 +72,7 @@
  56. open: DSL_DRV_Open,
  57. release: DSL_DRV_Release,
  58. write: DSL_DRV_Write,
  59. - ioctl: DSL_DRV_Ioctls,
  60. + unlocked_ioctl: DSL_DRV_Ioctls,
  61. poll: DSL_DRV_Poll
  62. };
  63. #else
  64. @@ -172,7 +173,7 @@
  65. \return Success or failure.
  66. \ingroup Internal
  67. */
  68. -static DSL_int_t DSL_DRV_Ioctls(DSL_DRV_inode_t * pINode,
  69. +static long DSL_DRV_Ioctls(
  70. DSL_DRV_file_t * pFile,
  71. DSL_uint_t nCommand,
  72. unsigned long nArg)
  73. @@ -222,14 +223,7 @@
  74. }
  75. }
  76. - if (pINode == DSL_NULL)
  77. - {
  78. - bIsInKernel = DSL_TRUE;
  79. - }
  80. - else
  81. - {
  82. bIsInKernel = DSL_FALSE;
  83. - }
  84. if ( (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API) ||
  85. (_IOC_TYPE(nCommand) == DSL_IOC_MAGIC_CPE_API_G997) ||
  86. @@ -1082,6 +1076,7 @@
  87. int __init DSL_ModuleInit(void)
  88. {
  89. DSL_int_t i;
  90. + static struct class *dsl_class;
  91. printk(DSL_DRV_CRLF DSL_DRV_CRLF "Lantiq CPE API Driver version: %s" DSL_DRV_CRLF,
  92. &(dsl_cpe_api_version[4]));
  93. @@ -1127,6 +1122,10 @@
  94. DSL_DRV_DevNodeInit();
  95. + dsl_class = class_create(THIS_MODULE, "dsl_cpe_api0");
  96. + device_create(dsl_class, NULL, MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0), NULL, "dsl_cpe_api0");
  97. +
  98. +
  99. return 0;
  100. }
  101. Index: drv_dsl_cpe_api-4.11.4/src/device/drv_dsl_cpe_msg_vrx.c
  102. ===================================================================
  103. --- drv_dsl_cpe_api-4.11.4.orig/src/device/drv_dsl_cpe_msg_vrx.c 2012-03-05 11:25:21.000000000 +0100
  104. +++ drv_dsl_cpe_api-4.11.4/src/device/drv_dsl_cpe_msg_vrx.c 2012-11-28 23:06:46.418344288 +0100
  105. @@ -685,6 +685,7 @@
  106. DSL_ProfileType_t nProfile = DSL_PROFILE_LAST;
  107. DSL_G997_XTUSystemEnablingData_t data = {{0,0,0,0,0,0,0,0}};
  108. + //printk("%s:%s[%d]\n", __FILE__, __func__, __LINE__);
  109. DSL_DEBUG( DSL_DBG_MSG,
  110. (pContext, SYS_DBG_MSG"DSL[%02d]: IN - DSL_DRV_VXX_SendMsgSelectedProfileVdsl2Get"
  111. DSL_DRV_CRLF, DSL_DEV_NUM(pContext)));
  112. @@ -985,8 +988,10 @@
  113. /* Check consistency of XTSE status setting - Only one bit should be set at
  114. a time */
  115. + //printk("XTSE (%d) - ", DSL_G997_NUM_XTSE_OCTETS);
  116. for (i = 0, nBitCount = 0; i < DSL_G997_NUM_XTSE_OCTETS; i++)
  117. {
  118. + //printk("%02X ", data.XTSE[i]);
  119. for (j = 0; j < 8; j++)
  120. {
  121. if ( ((data.XTSE[i] >> j) & 0x01) != 0)
  122. @@ -996,6 +1001,8 @@
  123. }
  124. }
  125. + //printk("\n");
  126. +
  127. if (nBitCount > 1)
  128. {
  129. DSL_DEBUG( DSL_DBG_ERR,