• Home
  • Raw
  • Download

Lines Matching refs:walk

375 static inline void dsgl_walk_init(struct dsgl_walk *walk,  in dsgl_walk_init()  argument
378 walk->dsgl = dsgl; in dsgl_walk_init()
379 walk->nents = 0; in dsgl_walk_init()
380 walk->to = (struct phys_sge_pairs *)(dsgl + 1); in dsgl_walk_init()
383 static inline void dsgl_walk_end(struct dsgl_walk *walk, unsigned short qid, in dsgl_walk_end() argument
388 phys_cpl = walk->dsgl; in dsgl_walk_end()
398 CPL_RX_PHYS_DSGL_NOOFSGENTR_V(walk->nents)); in dsgl_walk_end()
405 static inline void dsgl_walk_add_page(struct dsgl_walk *walk, in dsgl_walk_add_page() argument
413 j = walk->nents; in dsgl_walk_add_page()
414 walk->to->len[j % 8] = htons(size); in dsgl_walk_add_page()
415 walk->to->addr[j % 8] = cpu_to_be64(addr); in dsgl_walk_add_page()
418 walk->to++; in dsgl_walk_add_page()
419 walk->nents = j; in dsgl_walk_add_page()
422 static void dsgl_walk_add_sg(struct dsgl_walk *walk, in dsgl_walk_add_sg() argument
429 unsigned int j = walk->nents; in dsgl_walk_add_sg()
450 walk->to->len[j % 8] = htons(ent_len); in dsgl_walk_add_sg()
451 walk->to->addr[j % 8] = cpu_to_be64(sg_dma_address(sg) + in dsgl_walk_add_sg()
457 walk->to++; in dsgl_walk_add_sg()
459 walk->last_sg = sg; in dsgl_walk_add_sg()
460 walk->last_sg_len = min_t(u32, left_size, sg_dma_len(sg) - in dsgl_walk_add_sg()
466 walk->nents = j; in dsgl_walk_add_sg()
469 static inline void ulptx_walk_init(struct ulptx_walk *walk, in ulptx_walk_init() argument
472 walk->sgl = ulp; in ulptx_walk_init()
473 walk->nents = 0; in ulptx_walk_init()
474 walk->pair_idx = 0; in ulptx_walk_init()
475 walk->pair = ulp->sge; in ulptx_walk_init()
476 walk->last_sg = NULL; in ulptx_walk_init()
477 walk->last_sg_len = 0; in ulptx_walk_init()
480 static inline void ulptx_walk_end(struct ulptx_walk *walk) in ulptx_walk_end() argument
482 walk->sgl->cmd_nsge = htonl(ULPTX_CMD_V(ULP_TX_SC_DSGL) | in ulptx_walk_end()
483 ULPTX_NSGE_V(walk->nents)); in ulptx_walk_end()
487 static inline void ulptx_walk_add_page(struct ulptx_walk *walk, in ulptx_walk_add_page() argument
494 if (walk->nents == 0) { in ulptx_walk_add_page()
495 walk->sgl->len0 = cpu_to_be32(size); in ulptx_walk_add_page()
496 walk->sgl->addr0 = cpu_to_be64(addr); in ulptx_walk_add_page()
498 walk->pair->addr[walk->pair_idx] = cpu_to_be64(addr); in ulptx_walk_add_page()
499 walk->pair->len[walk->pair_idx] = cpu_to_be32(size); in ulptx_walk_add_page()
500 walk->pair_idx = !walk->pair_idx; in ulptx_walk_add_page()
501 if (!walk->pair_idx) in ulptx_walk_add_page()
502 walk->pair++; in ulptx_walk_add_page()
504 walk->nents++; in ulptx_walk_add_page()
507 static void ulptx_walk_add_sg(struct ulptx_walk *walk, in ulptx_walk_add_sg() argument
529 if (sg && (walk->nents == 0)) { in ulptx_walk_add_sg()
532 walk->sgl->len0 = cpu_to_be32(sgmin); in ulptx_walk_add_sg()
533 walk->sgl->addr0 = cpu_to_be64(sg_dma_address(sg) + skip_len); in ulptx_walk_add_sg()
534 walk->nents++; in ulptx_walk_add_sg()
536 walk->last_sg = sg; in ulptx_walk_add_sg()
537 walk->last_sg_len = sgmin + skip_len; in ulptx_walk_add_sg()
548 walk->pair->len[walk->pair_idx] = cpu_to_be32(sgmin); in ulptx_walk_add_sg()
549 walk->pair->addr[walk->pair_idx] = in ulptx_walk_add_sg()
551 walk->pair_idx = !walk->pair_idx; in ulptx_walk_add_sg()
552 walk->nents++; in ulptx_walk_add_sg()
553 if (!walk->pair_idx) in ulptx_walk_add_sg()
554 walk->pair++; in ulptx_walk_add_sg()
557 walk->last_sg = sg; in ulptx_walk_add_sg()
558 walk->last_sg_len = skip_len; in ulptx_walk_add_sg()