Ubiquiti loco xw eth0 bug: Unterschied zwischen den Versionen
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
K cat |
Leo (Diskussion | Beiträge) →Find a way to detect hang of eth0: more... |
||
| Zeile 52: | Zeile 52: | ||
ID can be read in ag71xx_link_adjust() in file ag71xx_main.c. See http://pastebin.com/0ze9iFcb for an example. |
|||
'''But''' the ID is not changing when eth0 hangs. The output when it hangs is: |
|||
| ⚫ | |||
[155921.360000] eth0: link up (10Mbps/Half duplex) |
|||
| ⚫ | |||
[155923.370000] eth0: link down |
|||
[155923.380000] br-lan: port 1(eth0) entered disabled state |
|||
Next try: Use another patch from Till... |
|||
Example Log output |
|||
root@OpenWrt:/tmp# logread | grep PHY |
|||
| ⚫ | |||
| ⚫ | |||
Sun Apr 26 21:09:55 2015 kern.info kernel: [ 20.240000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) |
|||
Sun Apr 26 21:15:12 2015 kern.info kernel: [ 337.290000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) |
|||
Sun Apr 26 21:15:14 2015 kern.info kernel: [ 339.300000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) |
|||
===Find a way to reset eth0=== |
===Find a way to reset eth0=== |
||
Version vom 1. Mai 2015, 13:26 Uhr
Bug description
Some Ubiquiti loco xw have a hardware bug which results in an interface shutdown with now possibility to bring the interface without reboot. More details, see https://dev.openwrt.org/ticket/19085
Steps for building workaround
Find a way to detect hang of eth0
In general there are two places where uid of PHY is printed.
1. ag71xx_phy.c
function: static int ag71xx_phy_connect_multi(struct ag71xx *ag)
....
DBG("%s: PHY found at %s, uid=%08x\n",
dev_name(dev),
dev_name(&ag->mii_bus->phy_map[phy_addr]->dev),
ag->mii_bus->phy_map[phy_addr]->phy_id);
dev_info(dev, "connected to PHY at %s [uid=%08x, driver=%s]\n",
dev_name(&phydev->dev), phydev->phy_id, phydev->drv->name);
2. ag71xx_main.c
void ag71xx_link_adjust(struct ag71xx *ag)
....
struct device *dev = &ag->pdev->dev;
struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
struct phy_device *phydev = NULL;
int phy_addr;
int ret = 0;
for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) {
if (!(pdata->phy_mask & (1 << phy_addr)))
continue;
if (ag->mii_bus->phy_map[phy_addr] == NULL)
continue;
DBG("%s: PHY found at %s, uid=%08x\n",
dev_name(dev),
dev_name(&ag->mii_bus->phy_map[phy_addr]->dev),
ag->mii_bus->phy_map[phy_addr]->phy_id);
if (phydev == NULL)
phydev = ag->mii_bus->phy_map[phy_addr];
}
dev_info(dev, "connected to PHY at %s [uid=%08x, driver=%s]\n",
dev_name(&phydev->dev), phydev->phy_id, phydev->drv->name);
ID can be read in ag71xx_link_adjust() in file ag71xx_main.c. See http://pastebin.com/0ze9iFcb for an example. But the ID is not changing when eth0 hangs. The output when it hangs is:
[155921.360000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) [155921.360000] eth0: link up (10Mbps/Half duplex) [155923.370000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) [155923.370000] eth0: link down [155923.380000] br-lan: port 1(eth0) entered disabled state
Next try: Use another patch from Till...
Find a way to reset eth0
...TODO...