/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to dma/nwl_engine.c

  • Committer: Suren A. Chilingaryan
  • Date: 2015-04-26 23:54:44 UTC
  • Revision ID: csa@suren.me-20150426235444-l9kvuvvfb2ovg8h1
Further adjustments to get ready for independent event plugins

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
        do {
94
94
            nwl_read_register(val, ctx, base, REG_DMA_ENG_CTRL_STATUS);
95
95
            gettimeofday(&cur, NULL);
96
 
        } while ((val & (DMA_ENG_STATE_MASK|DMA_ENG_USER_RESET))&&(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < PCILIB_REGISTER_TIMEOUT));
 
96
        } while ((val & (DMA_ENG_STATE_MASK|DMA_ENG_USER_RESET))&&(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < PCILIB_NWL_REGISTER_TIMEOUT));
97
97
    
98
98
        if (val & (DMA_ENG_STATE_MASK|DMA_ENG_USER_RESET)) {
99
99
            pcilib_error("Timeout during reset of DMA engine %i", ectx->desc->addr);
110
110
        do {
111
111
            nwl_read_register(val, ctx, base, REG_DMA_ENG_CTRL_STATUS);
112
112
            gettimeofday(&cur, NULL);
113
 
        } while ((val & DMA_ENG_RESET)&&(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < PCILIB_REGISTER_TIMEOUT));
 
113
        } while ((val & DMA_ENG_RESET)&&(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < PCILIB_NWL_REGISTER_TIMEOUT));
114
114
    
115
115
        if (val & DMA_ENG_RESET) {
116
116
            pcilib_error("Timeout during reset of DMA engine %i", ectx->desc->addr);
183
183
        do {
184
184
            nwl_read_register(val, ctx, base, REG_DMA_ENG_CTRL_STATUS);
185
185
            gettimeofday(&cur, NULL);
186
 
        } while ((val & (DMA_ENG_RUNNING))&&(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < PCILIB_REGISTER_TIMEOUT));
 
186
        } while ((val & (DMA_ENG_RUNNING))&&(((cur.tv_sec - start.tv_sec)*1000000 + (cur.tv_usec - start.tv_usec)) < PCILIB_NWL_REGISTER_TIMEOUT));
187
187
 
188
188
        if (ectx->ring) {
189
189
            ring_pa = pcilib_kmem_get_pa(ctx->dmactx.pcilib, ectx->ring);