mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 02:43:53 +08:00
kernel: igc: revert sync with upstream updates
These updates are for kernel 5.15. Fixes: #778 Fixes: 5765e132a070df ("kernel: igc: sync with upstream updates") Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
parent
5765e132a0
commit
91b00aff4f
@ -4942,9 +4942,6 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg)
|
||||
u8 __iomem *hw_addr = READ_ONCE(hw->hw_addr);
|
||||
u32 value = 0;
|
||||
|
||||
if (IGC_REMOVED(hw_addr))
|
||||
return ~value;
|
||||
|
||||
value = readl(&hw_addr[reg]);
|
||||
|
||||
/* reads should not return all F's */
|
||||
|
@ -540,17 +540,6 @@ static void igc_ptp_time_restore(struct igc_adapter *adapter)
|
||||
igc_ptp_write_i225(adapter, &ts);
|
||||
}
|
||||
|
||||
static void igc_ptm_stop(struct igc_adapter *adapter)
|
||||
{
|
||||
struct igc_hw *hw = &adapter->hw;
|
||||
u32 ctrl;
|
||||
|
||||
ctrl = rd32(IGC_PTM_CTRL);
|
||||
ctrl &= ~IGC_PTM_CTRL_EN;
|
||||
|
||||
wr32(IGC_PTM_CTRL, ctrl);
|
||||
}
|
||||
|
||||
/**
|
||||
* igc_ptp_suspend - Disable PTP work items and prepare for suspend
|
||||
* @adapter: Board private structure
|
||||
@ -568,10 +557,8 @@ void igc_ptp_suspend(struct igc_adapter *adapter)
|
||||
adapter->ptp_tx_skb = NULL;
|
||||
clear_bit_unlock(__IGC_PTP_TX_IN_PROGRESS, &adapter->state);
|
||||
|
||||
if (pci_device_is_present(adapter->pdev)) {
|
||||
if (pci_device_is_present(adapter->pdev))
|
||||
igc_ptp_time_save(adapter);
|
||||
igc_ptm_stop(adapter);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -252,8 +252,7 @@ u32 igc_rd32(struct igc_hw *hw, u32 reg);
|
||||
#define wr32(reg, val) \
|
||||
do { \
|
||||
u8 __iomem *hw_addr = READ_ONCE((hw)->hw_addr); \
|
||||
if (!IGC_REMOVED(hw_addr)) \
|
||||
writel((val), &hw_addr[(reg)]); \
|
||||
writel((val), &hw_addr[(reg)]); \
|
||||
} while (0)
|
||||
|
||||
#define rd32(reg) (igc_rd32(hw, reg))
|
||||
|
Loading…
x
Reference in New Issue
Block a user