diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-02-03 18:29:09 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2026-06-15 14:14:19 +0000 |
| commit | 3d0b6c69dced4936fccff6733912a0ef93214dbe (patch) | |
| tree | 3a0cb7b689f95907204601bb61bd1d3a5a84f25d | |
| parent | c5d6e2085a471cbb75cc7b88b37a2fe6276c16f8 (diff) | |
LinuxKPI: scatterlist.h: implement sg_init_marker()
Add sg_init_marker() which is needed by mt76 drivers USB attachment.
Sponosored by: The FreeBSD Foundation
MFC after: 3 days
Reviewed by: emaste, dumbbell
Differential Revision: https://reviews.freebsd.org/D57594
| -rw-r--r-- | sys/compat/linuxkpi/common/include/linux/scatterlist.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index c49c2179d359..4ab3de5fb64d 100644 --- a/sys/compat/linuxkpi/common/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h @@ -189,6 +189,12 @@ sg_mark_end(struct scatterlist *sg) } static inline void +sg_init_marker(struct scatterlist *sg, uint32_t num_sgs) +{ + sg_mark_end(&sg[num_sgs - 1]); +} + +static inline void sg_init_table(struct scatterlist *sg, unsigned int nents) { bzero(sg, sizeof(*sg) * nents); |
