Date: Fri, 14 Feb 2025 01:24:52 GMT From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 0d1eed3701a8 - stable/14 - ixgbe: Add ixgbe_dev_from_hw() back Message-ID: <202502140124.51E1OqEj013945@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=0d1eed3701a836d0a8d0152619b1dccc96c810ba commit 0d1eed3701a836d0a8d0152619b1dccc96c810ba Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2025-02-11 03:40:51 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2025-02-14 01:24:31 +0000 ixgbe: Add ixgbe_dev_from_hw() back This got lost many years ago in 8eb6488ebb0dcd92517625e4833ddf7d26e3b3a3 It is used by the driver's DBG printfs. (cherry picked from commit bf6f0db8a762966b08430692c92ae34e667948db) --- sys/dev/ixgbe/ixgbe_osdep.c | 6 ++++++ sys/dev/ixgbe/ixgbe_osdep.h | 1 + 2 files changed, 7 insertions(+) diff --git a/sys/dev/ixgbe/ixgbe_osdep.c b/sys/dev/ixgbe/ixgbe_osdep.c index 2fa651df8936..892924712c38 100644 --- a/sys/dev/ixgbe/ixgbe_osdep.c +++ b/sys/dev/ixgbe/ixgbe_osdep.c @@ -33,6 +33,12 @@ #include "ixgbe.h" +inline device_t +ixgbe_dev_from_hw(struct ixgbe_hw *hw) +{ + return ((struct ixgbe_softc *)hw->back)->dev; +} + inline u16 ixgbe_read_pci_cfg(struct ixgbe_hw *hw, u32 reg) { diff --git a/sys/dev/ixgbe/ixgbe_osdep.h b/sys/dev/ixgbe/ixgbe_osdep.h index eca15f0f3816..cf7c578fd684 100644 --- a/sys/dev/ixgbe/ixgbe_osdep.h +++ b/sys/dev/ixgbe/ixgbe_osdep.h @@ -197,6 +197,7 @@ struct ixgbe_osdep /* These routines need struct ixgbe_hw declared */ struct ixgbe_hw; +device_t ixgbe_dev_from_hw(struct ixgbe_hw *hw); /* These routines are needed by the shared code */ extern u16 ixgbe_read_pci_cfg(struct ixgbe_hw *, u32);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202502140124.51E1OqEj013945>