Date: Tue, 11 Feb 2025 03:44:22 GMT From: Kevin Bowling <kbowling@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: bf6f0db8a762 - main - ixgbe: Add ixgbe_dev_from_hw() back Message-ID: <202502110344.51B3iM2v074910@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=bf6f0db8a762966b08430692c92ae34e667948db commit bf6f0db8a762966b08430692c92ae34e667948db Author: Kevin Bowling <kbowling@FreeBSD.org> AuthorDate: 2025-02-11 03:40:51 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2025-02-11 03:41:51 +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. MFC after: 3 days --- 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?202502110344.51B3iM2v074910>