mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
Merge branch 'bug-fixes-for-the-hibmcge-ethernet-driver'
Jijie Shao says: ==================== bug fixes for the hibmcge ethernet driver This patch set is intended to fix several issues for hibmcge driver: 1. Patch1 fixes the issue where buf avl irq is disabled after irq_handle. 2. Patch2 eliminates the error logs in scenarios without phy. 3. Patch3 fixes the issue where the network port becomes unusable after a PCIe RAS event. ==================== Link: https://patch.msgid.link/20251025014642.265259-1-shaojijie@huawei.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
8df206f7b6
|
|
@ -17,6 +17,7 @@
|
|||
#define HBG_PCU_CACHE_LINE_SIZE 32
|
||||
#define HBG_TX_TIMEOUT_BUF_LEN 1024
|
||||
#define HBG_RX_DESCR 0x01
|
||||
#define HBG_NO_PHY 0xFF
|
||||
|
||||
#define HBG_PACKET_HEAD_SIZE ((HBG_RX_SKIP1 + HBG_RX_SKIP2 + \
|
||||
HBG_RX_DESCR) * HBG_PCU_CACHE_LINE_SIZE)
|
||||
|
|
|
|||
|
|
@ -136,12 +136,11 @@ static pci_ers_result_t hbg_pci_err_detected(struct pci_dev *pdev,
|
|||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
|
||||
netif_device_detach(netdev);
|
||||
|
||||
if (state == pci_channel_io_perm_failure)
|
||||
if (state == pci_channel_io_perm_failure) {
|
||||
netif_device_detach(netdev);
|
||||
return PCI_ERS_RESULT_DISCONNECT;
|
||||
}
|
||||
|
||||
pci_disable_device(pdev);
|
||||
return PCI_ERS_RESULT_NEED_RESET;
|
||||
}
|
||||
|
||||
|
|
@ -150,6 +149,9 @@ static pci_ers_result_t hbg_pci_err_slot_reset(struct pci_dev *pdev)
|
|||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct hbg_priv *priv = netdev_priv(netdev);
|
||||
|
||||
netif_device_detach(netdev);
|
||||
pci_disable_device(pdev);
|
||||
|
||||
if (pci_enable_device(pdev)) {
|
||||
dev_err(&pdev->dev,
|
||||
"failed to re-enable PCI device after reset\n");
|
||||
|
|
|
|||
|
|
@ -244,6 +244,9 @@ void hbg_hw_adjust_link(struct hbg_priv *priv, u32 speed, u32 duplex)
|
|||
|
||||
hbg_hw_mac_enable(priv, HBG_STATUS_ENABLE);
|
||||
|
||||
if (priv->mac.phy_addr == HBG_NO_PHY)
|
||||
return;
|
||||
|
||||
/* wait MAC link up */
|
||||
ret = readl_poll_timeout(priv->io_base + HBG_REG_AN_NEG_STATE_ADDR,
|
||||
link_status,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ static void hbg_irq_handle_rx_buf_val(struct hbg_priv *priv,
|
|||
const struct hbg_irq_info *irq_info)
|
||||
{
|
||||
priv->stats.rx_fifo_less_empty_thrsld_cnt++;
|
||||
hbg_hw_irq_enable(priv, irq_info->mask, true);
|
||||
}
|
||||
|
||||
#define HBG_IRQ_I(name, handle) \
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#define HBG_MDIO_OP_INTERVAL_US (5 * 1000)
|
||||
|
||||
#define HBG_NP_LINK_FAIL_RETRY_TIMES 5
|
||||
#define HBG_NO_PHY 0xFF
|
||||
|
||||
static void hbg_mdio_set_command(struct hbg_mac *mac, u32 cmd)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user