FreeBSD/sys/dev/mps/mps.c
/*
 * Add one dma segment to the scatter-gather list for a command.
 */
Add one dma segment to the scatter-gather list for a command.
Add one dma segment to the scatter - gather list for a command .
int
mps_add_dmaseg(struct mps_command *cm, vm_paddr_t pa, size_t len, u_int flags,
    int segsleft)
{
	MPI2_SGE_SIMPLE64 sge;
	bzero(&sge, sizeof(sge));
	flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT |
	    MPI2_SGE_FLAGS_64_BIT_ADDRESSING;
	sge.FlagsLength = htole32(len | (flags << MPI2_SGE_FLAGS_SHIFT));
	mps_from_u64(pa, &sge.Address);
	return (mps_push_sge(cm, &sge, sizeof sge, segsleft));
}
int mps_add_dmaseg ( struct mps_command * cm , vm_paddr_t pa , size_t len , u_int flags , int segsleft ) { MPI2_SGE_SIMPLE64 sge ; bzero ( & sge , sizeof ( sge ) ) ; flags |= MPI2_SGE_FLAGS_SIMPLE_ELEMENT | MPI2_SGE_FLAGS_64_BIT_ADDRESSING ; sge . FlagsLength = htole32 ( len | ( flags << MPI2_SGE_FLAGS_SHIFT ) ) ; mps_from_u64 ( pa , & sge . Address ) ; return ( mps_push_sge ( cm , & sge , sizeof sge , segsleft ) ) ; }
Add one dma segment to the scatter-gather list for a command.
Add one dma segment to the scatter - gather list for a command .
/*
	 * This driver always uses 64-bit address elements for simplicity.
	 */