首页 > 解决方案 > 网络驱动程序中的链接更改是什么意思这意味着 TX 到 RX 因此存在链接更改或者它的速度像数据传输 phydev->speed 还是什么

问题描述

为什么驱动程序会引发 PHY 中断。这是内核的工作吗,为什么内核的驱动程序部分会引发 PHY 中断

   u32 status = //read registers
   if (status & LinkChg_Status)
    phy_mac_interrupt(tp->phydev);

上面的代码在request_irq(pci_irq_vector(pdev, 0), rtl8169_interrupt,中断上下文中

在 kernel.org 上它说

Sometime during startup, the network driver needs to establish a connection 

betweenthe PHY device, and the network device. At this time, the PHY's bus and   
drivers need to all have been loaded, so it is ready for the connection. At this 
point, there are several ways to connect to the PHY:

    The PAL handles everything, and only calls the network driver when the link state
    changes, so it can react.

在上面的陈述中link state changes可能是什么?这是否意味着在一种状态下它的 TX 和在链路更改为 RX 时?

标签: clinuxlinux-kernelkernelnetwork-driver

解决方案


从它说的数据表

Packet Underrun/Link Change:当 CAPR 被写入但 Rx 缓冲区为空时,或者当链路状态改变时,该位设置为 1。


推荐阅读