patch-dsl_hal_api_c 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --- sangam-atm-1.0.orig/dsl_hal_api.c 2007-03-07 04:13:06.000000000 +0100
  2. +++ sangam-atm-1.0/dsl_hal_api.c 2009-12-17 19:39:11.092420102 +0100
  3. @@ -254,15 +254,15 @@
  4. * of phyEnableDisableWord & phyControlWord to avoid changing API struct
  5. * which may cause change required to application data structure.
  6. ******************************************************************************/
  7. -#include <dev_host_interface.h>
  8. -#include <dsl_hal_register.h>
  9. -#include <dsl_hal_support.h>
  10. +#include "dev_host_interface.h"
  11. +#include "dsl_hal_register.h"
  12. +#include "dsl_hal_support.h"
  13. #ifndef NO_ADV_STATS
  14. -#include <dsl_hal_logtable.h>
  15. +#include "dsl_hal_logtable.h"
  16. #endif
  17. -#include <dsl_hal_version.h>
  18. +#include "dsl_hal_version.h"
  19. // UR8_MERGE_START CQ11054 Jack Zhang
  20. static unsigned int highprecision_selected = 0; //By default we use low precision for backward compt.
  21. @@ -958,9 +958,6 @@ int dslhal_api_pollTrainingStatus(tidsl_
  22. /*char *tmp;*/
  23. DEV_HOST_dspOamSharedInterface_t *pdspOamSharedInterface, dspOamSharedInterface;
  24. -#if SWTC
  25. - DEV_HOST_tcHostCommDef_t TCHostCommDef;
  26. -#endif
  27. dgprintf(5,"dslhal_api_pollTrainingStatus\n");
  28. pdspOamSharedInterface = (DEV_HOST_dspOamSharedInterface_t *) ptidsl->pmainAddr;
  29. @@ -971,17 +968,6 @@ int dslhal_api_pollTrainingStatus(tidsl_
  30. dgprintf(1,"dslhal_support_blockRead failed\n");
  31. return DSLHAL_ERROR_BLOCK_READ;
  32. }
  33. -#if SWTC
  34. - dspOamSharedInterface.tcHostComm_p =(DEV_HOST_tcHostCommDef_t *) dslhal_support_byteSwap32((unsigned int)dspOamSharedInterface.tcHostComm_p);
  35. -
  36. - rc = dslhal_support_blockRead((PVOID)dspOamSharedInterface.tcHostComm_p,
  37. - &TCHostCommDef, sizeof(DEV_HOST_tcHostCommDef_t));
  38. - if (rc)
  39. - {
  40. - dgprintf(1,"dslhal_support_blockRead failed\n");
  41. - return DSLHAL_ERROR_BLOCK_READ;
  42. - }
  43. -#endif
  44. rc = dslhal_support_processTrainingState(ptidsl);
  45. if(rc)
  46. @@ -1025,9 +1011,6 @@ int dslhal_api_handleTrainingInterrupt(t
  47. /*char *tmp;*/
  48. DEV_HOST_dspOamSharedInterface_t *pdspOamSharedInterface, dspOamSharedInterface;
  49. -#if SWTC
  50. - DEV_HOST_tcHostCommDef_t TCHostCommDef;
  51. -#endif
  52. dgprintf(6,"dslhal_api_handleTrainingInterrupt\n");
  53. pdspOamSharedInterface = (DEV_HOST_dspOamSharedInterface_t *) ptidsl->pmainAddr;
  54. rc = dslhal_support_blockRead(pdspOamSharedInterface, &dspOamSharedInterface,
  55. @@ -1037,17 +1020,6 @@ int dslhal_api_handleTrainingInterrupt(t
  56. dgprintf(1,"dslhal_support_blockRead failed\n");
  57. return DSLHAL_ERROR_BLOCK_READ;
  58. }
  59. -#if SWTC
  60. - dspOamSharedInterface.tcHostComm_p =(DEV_HOST_tcHostCommDef_t *) dslhal_support_byteSwap32((unsigned int)dspOamSharedInterface.tcHostComm_p);
  61. -
  62. - rc = dslhal_support_blockRead((PVOID)dspOamSharedInterface.tcHostComm_p,
  63. - &TCHostCommDef, sizeof(DEV_HOST_tcHostCommDef_t));
  64. - if (rc)
  65. - {
  66. - dgprintf(1,"dslhal_support_blockRead failed\n");
  67. - return DSLHAL_ERROR_BLOCK_READ;
  68. - }
  69. -#endif
  70. if(intrSource & MASK_BITFIELD_INTERRUPTS)
  71. {
  72. @@ -1705,27 +1677,15 @@ void dslhal_api_gatherStatistics(tidsl_t
  73. /* Get ATM Stats for both US and DS for Channel 0*/
  74. ptidsl->AppData.usAtm_count[0] = dslhal_support_byteSwap32(usAtmStats0.goodCount);
  75. ptidsl->AppData.usIdle_count[0] = dslhal_support_byteSwap32(usAtmStats0.idleCount);
  76. -#if SWTC
  77. - ptidsl->AppData.usPdu_count[0] = dslhal_support_byteSwap32(usAtmStats0.pduCount);
  78. -#endif
  79. ptidsl->AppData.dsGood_count[0] = dslhal_support_byteSwap32(dsAtmStats0.goodCount);
  80. ptidsl->AppData.dsIdle_count[0] = dslhal_support_byteSwap32(dsAtmStats0.idleCount);
  81. -#if SWTC
  82. - ptidsl->AppData.dsPdu_count[0] = dslhal_support_byteSwap32(dsAtmStats0.pduCount);
  83. -#endif
  84. ptidsl->AppData.dsBadHec_count[0] = dslhal_support_byteSwap32((dsAtmStats0.badHecCount));
  85. ptidsl->AppData.dsOVFDrop_count[0] = dslhal_support_byteSwap32((dsAtmStats0.ovflwDropCount));
  86. /* Get ATM Stats for both US and DS for Channel 1*/
  87. ptidsl->AppData.usAtm_count[1] = dslhal_support_byteSwap32(usAtmStats1.goodCount);
  88. ptidsl->AppData.usIdle_count[1] = dslhal_support_byteSwap32(usAtmStats1.idleCount);
  89. -#if SWTC
  90. - ptidsl->AppData.usPdu_count[1] = dslhal_support_byteSwap32(usAtmStats1.pduCount);
  91. -#endif
  92. ptidsl->AppData.dsGood_count[1] = dslhal_support_byteSwap32(dsAtmStats1.goodCount);
  93. ptidsl->AppData.dsIdle_count[1] = dslhal_support_byteSwap32(dsAtmStats1.idleCount);
  94. -#if SWTC
  95. - ptidsl->AppData.dsPdu_count[1] = dslhal_support_byteSwap32(dsAtmStats1.pduCount);
  96. -#endif
  97. ptidsl->AppData.dsBadHec_count[1] = dslhal_support_byteSwap32((dsAtmStats1.badHecCount));
  98. ptidsl->AppData.dsOVFDrop_count[1] = dslhal_support_byteSwap32((dsAtmStats1.ovflwDropCount));