The branch main has been updated by bz:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=3d0b6c69dced4936fccff6733912a0ef93214dbe

commit 3d0b6c69dced4936fccff6733912a0ef93214dbe
Author:     Bjoern A. Zeeb <[email protected]>
AuthorDate: 2026-02-03 18:29:09 +0000
Commit:     Bjoern A. Zeeb <[email protected]>
CommitDate: 2026-06-15 14:14:19 +0000

    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
---
 sys/compat/linuxkpi/common/include/linux/scatterlist.h | 6 ++++++
 1 file changed, 6 insertions(+)

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
@@ -188,6 +188,12 @@ sg_mark_end(struct scatterlist *sg)
        sg->page_link &= ~SG_PAGE_LINK_CHAIN;
 }
 
+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)
 {

Reply via email to