diff --git a/kmod/igb_main.c b/kmod/igb_main.c index 589607b..b8f429e 100755 --- a/kmod/igb_main.c +++ b/kmod/igb_main.c @@ -1915,7 +1915,7 @@ void igb_down(struct igb_adapter *adapter) and watchdog - performing required actions before altering the adapter state and registers */ - del_timer_sync(&adapter->watchdog_timer); + timer_delete_sync(&adapter->watchdog_timer); cancel_work_sync(&adapter->watchdog_task); /* signal that we're down so the interrupt handler does not @@ -1947,8 +1947,8 @@ void igb_down(struct igb_adapter *adapter) adapter->flags &= ~IGB_FLAG_NEED_LINK_UPDATE; if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA) - del_timer_sync(&adapter->dma_err_timer); - del_timer_sync(&adapter->phy_info_timer); + timer_delete_sync(&adapter->dma_err_timer); + timer_delete_sync(&adapter->phy_info_timer); /* record the stats before reset*/ igb_update_stats(adapter); @@ -2215,6 +2215,9 @@ static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], u16 vid, #endif u16 flags +#ifdef HAVE_NDO_FDB_ADD_NOTIFIED + , bool *notified +#endif #ifdef HAVE_NDO_FDB_ADD_EXT_ACK , struct netlink_ext_ack *extack #endif @@ -3260,10 +3263,10 @@ static void igb_remove(struct pci_dev *pdev) * disable watchdog from being rescheduled. */ set_bit(__IGB_DOWN, &adapter->state); - del_timer_sync(&adapter->watchdog_timer); + timer_delete_sync(&adapter->watchdog_timer); if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA) - del_timer_sync(&adapter->dma_err_timer); - del_timer_sync(&adapter->phy_info_timer); + timer_delete_sync(&adapter->dma_err_timer); + timer_delete_sync(&adapter->phy_info_timer); cancel_work_sync(&adapter->reset_task); if (adapter->flags & IGB_FLAG_DETECT_BAD_DMA) diff --git a/kmod/igb_ptp.c b/kmod/igb_ptp.c index be7f5a2..e7bf60c 100644 --- a/kmod/igb_ptp.c +++ b/kmod/igb_ptp.c @@ -93,7 +93,11 @@ * SYSTIM read access for the 82576 */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0) +static u64 igb_ptp_read_82576(struct cyclecounter *cc) +#else static cycle_t igb_ptp_read_82576(const struct cyclecounter *cc) +#endif { struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc); struct e1000_hw *hw = &igb->hw; @@ -113,7 +117,11 @@ static cycle_t igb_ptp_read_82576(const struct cyclecounter *cc) * SYSTIM read access for the 82580 */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0) +static u64 igb_ptp_read_82580(struct cyclecounter *cc) +#else static cycle_t igb_ptp_read_82580(const struct cyclecounter *cc) +#endif { struct igb_adapter *igb = container_of(cc, struct igb_adapter, cc); struct e1000_hw *hw = &igb->hw; diff --git a/kmod/kcompat.h b/kmod/kcompat.h index 63786dc..ca2bc2a 100644 --- a/kmod/kcompat.h +++ b/kmod/kcompat.h @@ -4809,4 +4809,13 @@ static inline void skb_frag_off_add(skb_frag_t *frag, int delta) #define HAVE_FS_NO_LLSEEK #endif /* 6.12.0 */ +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,13,0)) +#define HAVE_NDO_FDB_ADD_NOTIFIED +#endif /* 6.13.0 */ + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,15,0)) +#define timer_delete_sync(timer) del_timer_sync(timer) +#endif /* 6.15.0 */ + + #endif /* _KCOMPAT_H_ */