Lines Matching refs:sg
101 * 'contig' implies a contiguous buffer, whereas 'sg' implies a
202 static inline dma_addr_t qm_sg_addr(const struct qm_sg_entry *sg)
204 return be64_to_cpu(sg->data) & 0xffffffffffLLU;
207 static inline u64 qm_sg_entry_get64(const struct qm_sg_entry *sg)
209 return be64_to_cpu(sg->data) & 0xffffffffffLLU;
212 static inline void qm_sg_entry_set64(struct qm_sg_entry *sg, u64 addr)
214 sg->addr_hi = upper_32_bits(addr);
215 sg->addr_lo = cpu_to_be32(lower_32_bits(addr));
218 static inline bool qm_sg_entry_is_final(const struct qm_sg_entry *sg)
220 return be32_to_cpu(sg->cfg) & QM_SG_FIN;
223 static inline bool qm_sg_entry_is_ext(const struct qm_sg_entry *sg)
225 return be32_to_cpu(sg->cfg) & QM_SG_EXT;
228 static inline int qm_sg_entry_get_len(const struct qm_sg_entry *sg)
230 return be32_to_cpu(sg->cfg) & QM_SG_LEN_MASK;
233 static inline void qm_sg_entry_set_len(struct qm_sg_entry *sg, int len)
235 sg->cfg = cpu_to_be32(len & QM_SG_LEN_MASK);
238 static inline void qm_sg_entry_set_f(struct qm_sg_entry *sg, int len)
240 sg->cfg = cpu_to_be32(QM_SG_FIN | (len & QM_SG_LEN_MASK));
243 static inline int qm_sg_entry_get_off(const struct qm_sg_entry *sg)
245 return be32_to_cpu(sg->offset) & QM_SG_OFF_MASK;