ixgbe: Add ixgbe_dev_from_hw() back

This got lost many years ago in 8eb6488ebb

It is used by the driver's DBG printfs.

(cherry picked from commit bf6f0db8a762966b08430692c92ae34e667948db)
This commit is contained in:
Kevin Bowling 2025-02-10 20:40:51 -07:00 committed by Franco Fichtner
parent 1a58aadf5d
commit 2eba2832e9
2 changed files with 7 additions and 0 deletions

View file

@ -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)
{

View file

@ -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);