diff --git a/net/intel-em-kmod/files/patch-e1000__osdep.h b/net/intel-em-kmod/files/patch-e1000__osdep.h new file mode 100644 index 000000000000..9066cb3ebcc4 --- /dev/null +++ b/net/intel-em-kmod/files/patch-e1000__osdep.h @@ -0,0 +1,11 @@ +--- e1000_osdep.h.orig 2020-04-08 15:13:17 UTC ++++ e1000_osdep.h +@@ -134,7 +134,7 @@ struct e1000_osdep + bus_space_handle_t io_bus_space_handle; + bus_space_tag_t flash_bus_space_tag; + bus_space_handle_t flash_bus_space_handle; +- struct device *dev; ++ device_t dev; + }; + + #define E1000_REGISTER(hw, reg) (((hw)->mac.type >= e1000_82543) \ diff --git a/net/intel-em-kmod/files/patch-em_compat.c b/net/intel-em-kmod/files/patch-em_compat.c new file mode 100644 index 000000000000..f300a7d3da95 --- /dev/null +++ b/net/intel-em-kmod/files/patch-em_compat.c @@ -0,0 +1,20 @@ +--- em_compat.c.orig 2020-04-08 22:13:17.000000000 +0700 ++++ em_compat.c 2026-05-24 15:19:17.203086000 +0700 +@@ -30,6 +30,17 @@ + + #include "em_compat.h" + ++/* Forward compatibility for post-15 */ ++#if __FreeBSD_version >= 1500000 ++ ++void ++if_etherbpfmtap(if_t ifh, struct mbuf *m) ++{ ++ ether_bpf_mtap_if(ifh, m); ++} ++ ++#endif ++ + /* Backward compatibility for pre-11 */ + #if __FreeBSD_version < 1100000 + diff --git a/net/intel-em-kmod/files/patch-em_compat.h b/net/intel-em-kmod/files/patch-em_compat.h new file mode 100644 index 000000000000..44e60f8cd1fc --- /dev/null +++ b/net/intel-em-kmod/files/patch-em_compat.h @@ -0,0 +1,14 @@ +--- em_compat.h.orig 2020-04-08 22:13:17.000000000 +0700 ++++ em_compat.h 2026-05-24 15:21:37.852854000 +0700 +@@ -43,6 +43,11 @@ + #include + #include + ++/* Forward compatibility for 15+ */ ++#if __FreeBSD_version >= 1500000 ++void if_etherbpfmtap(if_t ifp, struct mbuf *m); ++#endif ++ + /* Backward compatibility for pre-11 */ + #if __FreeBSD_version < 1100000 + diff --git a/net/intel-em-kmod/files/patch-if__em.h b/net/intel-em-kmod/files/patch-if__em.h new file mode 100644 index 000000000000..8184faafac55 --- /dev/null +++ b/net/intel-em-kmod/files/patch-if__em.h @@ -0,0 +1,11 @@ +--- if_em.h.orig 2020-04-08 15:13:17 UTC ++++ if_em.h +@@ -395,7 +395,7 @@ struct adapter { + + /* FreeBSD operating-system-specific structures. */ + struct e1000_osdep osdep; +- struct device *dev; ++ device_t dev; + struct cdev *led_dev; + + struct resource *memory; diff --git a/net/intel-em-kmod/files/patch-if__lem.h b/net/intel-em-kmod/files/patch-if__lem.h new file mode 100644 index 000000000000..649446fa38f6 --- /dev/null +++ b/net/intel-em-kmod/files/patch-if__lem.h @@ -0,0 +1,11 @@ +--- if_lem.h.orig 2020-04-08 15:13:17 UTC ++++ if_lem.h +@@ -297,7 +297,7 @@ struct adapter { + + /* FreeBSD operating-system-specific structures. */ + struct e1000_osdep osdep; +- struct device *dev; ++ device_t dev; + struct cdev *led_dev; + + struct resource *memory; diff --git a/net/intel-em-kmod/files/patch-if_em.c b/net/intel-em-kmod/files/patch-if_em.c new file mode 100644 index 000000000000..eef7847c1e11 --- /dev/null +++ b/net/intel-em-kmod/files/patch-if_em.c @@ -0,0 +1,23 @@ +--- if_em.c.orig 2026-05-24 14:44:46.949390000 +0700 ++++ if_em.c 2026-05-24 14:50:16.444411000 +0700 +@@ -1584,10 +1588,7 @@ em_irq_fast(void *arg) + em_irq_fast(void *arg) + { + struct adapter *adapter = arg; +- if_t ifp; + u32 reg_icr; +- +- ifp = adapter->ifp; + + reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR); + +@@ -4478,6 +4479,9 @@ em_setup_receive_ring(struct rx_ring *rxr) + goto fail; + } + rxbuf->m_head->m_len = adapter->rx_mbuf_sz; ++#ifndef M_HASFCS ++#define M_HASFCS M_PROTO5 ++#endif + rxbuf->m_head->m_flags &= ~M_HASFCS; /* we strip it */ + rxbuf->m_head->m_pkthdr.len = adapter->rx_mbuf_sz; + diff --git a/net/intel-em-kmod/files/patch-if_lem.c b/net/intel-em-kmod/files/patch-if_lem.c new file mode 100644 index 000000000000..c0e898707f04 --- /dev/null +++ b/net/intel-em-kmod/files/patch-if_lem.c @@ -0,0 +1,14 @@ +--- if_lem.c.orig 2026-05-24 15:03:45.830943000 +0700 ++++ if_lem.c 2026-05-24 15:06:00.908555000 +0700 +@@ -1483,11 +1483,8 @@ lem_irq_fast(void *arg) + lem_irq_fast(void *arg) + { + struct adapter *adapter = arg; +- if_t ifp; + u32 reg_icr; + +- ifp = adapter->ifp; +- + reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR); + + /* Hot eject? */