Ubiquiti loco xw eth0 bug: Unterschied zwischen den Versionen
Erscheinungsbild
Inhalt gelöscht Inhalt hinzugefügt
Leo (Diskussion | Beiträge) →Bug description: added description |
Leo (Diskussion | Beiträge) →Find a way to detect hang of eth0: additional information |
||
| Zeile 7: | Zeile 7: | ||
===Find a way to detect hang of eth0=== |
===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); |
|||
Detection in ag71xx_link_adjust() in file ag71xx_main.c ist possible. See http://pastebin.com/0ze9iFcb for an example. |
Detection in ag71xx_link_adjust() in file ag71xx_main.c ist possible. See http://pastebin.com/0ze9iFcb for an example. |
||
| Zeile 17: | Zeile 62: | ||
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: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) |
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 29. April 2015, 18:36 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);
Detection in ag71xx_link_adjust() in file ag71xx_main.c ist possible. See http://pastebin.com/0ze9iFcb for an example.
Example Log output
root@OpenWrt:/tmp# logread | grep PHY Sun Apr 26 21:09:48 2015 kern.info kernel: [ 6.160000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) Sun Apr 26 21:09:48 2015 kern.info kernel: [ 7.370000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:01 [uid=004dd023, driver=Generic PHY] (Opennet-Info1) 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
...TODO...