• Home
  • Raw
  • Download

Lines Matching refs:sgc

818 static u32 get_physaddr_from_sgc(struct esas2r_sg_context *sgc, u64 *addr)  in get_physaddr_from_sgc()  argument
822 if (likely(sgc->cur_offset == sgc->exp_offset)) { in get_physaddr_from_sgc()
828 if (sgc->sgel_count < sgc->num_sgel) { in get_physaddr_from_sgc()
830 if (sgc->exp_offset > (u8 *)0) { in get_physaddr_from_sgc()
832 sgc->cur_sgel = sg_next(sgc->cur_sgel); in get_physaddr_from_sgc()
833 ++(sgc->sgel_count); in get_physaddr_from_sgc()
837 len = sg_dma_len(sgc->cur_sgel); in get_physaddr_from_sgc()
838 (*addr) = sg_dma_address(sgc->cur_sgel); in get_physaddr_from_sgc()
841 sgc->exp_offset += len; in get_physaddr_from_sgc()
846 } else if (sgc->cur_offset < sgc->exp_offset) { in get_physaddr_from_sgc()
852 len = sg_dma_len(sgc->cur_sgel); in get_physaddr_from_sgc()
853 (*addr) = sg_dma_address(sgc->cur_sgel); in get_physaddr_from_sgc()
855 sgc->exp_offset -= len; in get_physaddr_from_sgc()
859 (sgc->cur_offset - sgc->exp_offset); in get_physaddr_from_sgc()
861 sgc->exp_offset += len; in get_physaddr_from_sgc()
865 sgc->exp_offset - sgc->cur_offset); in get_physaddr_from_sgc()
882 struct esas2r_sg_context sgc; in esas2r_queuecommand() local
917 esas2r_sgc_init(&sgc, a, rq, NULL); in esas2r_queuecommand()
919 sgc.length = bufflen; in esas2r_queuecommand()
920 sgc.cur_offset = NULL; in esas2r_queuecommand()
922 sgc.cur_sgel = scsi_sglist(cmd); in esas2r_queuecommand()
923 sgc.exp_offset = NULL; in esas2r_queuecommand()
924 sgc.num_sgel = scsi_dma_map(cmd); in esas2r_queuecommand()
925 sgc.sgel_count = 0; in esas2r_queuecommand()
927 if (unlikely(sgc.num_sgel < 0)) { in esas2r_queuecommand()
932 sgc.get_phys_addr = (PGETPHYSADDR)get_physaddr_from_sgc; in esas2r_queuecommand()
934 if (unlikely(!esas2r_build_sg_list(a, rq, &sgc))) { in esas2r_queuecommand()