#19085: nanostation m5 loco xw "loses" interface
------------------------+------------------------
  Reporter:  anonymous  |      Owner:  developers
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:
 Component:  kernel     |    Version:  Trunk
Resolution:             |   Keywords:
------------------------+------------------------

Comment (by leoso):

 We are now able to detect the bug in the same way as Ubnt is doing it.
 Presence of the bug can be detected by reading the PHY ID. When the chip
 "hangs" it is not returning the correct PHY ID. This can be reproduced by
 us now. It is important to fetch the ID directly from the hardware every
 time because the ID is cached by the driver by default.
 We use the follwing code .

 {{{
 --- a/ag71xx_phy.c        2015-06-18 09:00:03.211078658 +0200
 +++ b/ag71xx_phy.c        2015-06-27 21:07:07.402581651 +0200
 @@ -21,7 +21,11 @@
         int status_change = 0;

         spin_lock_irqsave(&ag->lock, flags);
 -
 +
 +       int id1 = phy_read( phydev, 2 );
 +       int id2 = phy_read( phydev, 3 );
 +       printk("Opennet Hack09: id=%04x %04x",id1, id2); /* should be
 "004d d023" before bug occured */
 +
         if (phydev->link) {
                 if (ag->duplex != phydev->duplex
                     || ag->speed != phydev->speed) {

 }}}

 As output of dmesg we get
 {{{
 ...
 Opennet Hack09: id=004d d023Opennet Hack09: id=004d d023Opennet Hack09:
 id=004d d023Opennet Hack09: id=004d d023Opennet Hack09: id=004d
 d023Opennet Hack09: id=004d d023Opennet Hack09: id=004d d023Opennet
 Hack09: id=004d d023Opennet Hack09: id=0000 0000
 [ 2038.330000] eth0: link up (10Mbps/Half duplex)
 [ 2040.340000] Opennet Hack09: id=0000 0000
 [ 2040.340000] eth0: link down
 [ 2040.340000] br-lan: port 1(eth0) entered disabled state
 [ 4355.520000] device br-lan entered promiscuous mode
 [ 4369.450000] device br-lan left promiscuous mode
 }}}
  to be the
 The next step is to implement the reset operation as suggested in
 [#comment:9].

 In earlier posts there was the question which PHY driver is used by ag71xx
 in our scenario. It is the "Generic PHY" driver which can be found under
 linux-3.18.14/drivers/net/phy/phy_device.c.

--
Ticket URL: <https://dev.openwrt.org/ticket/19085#comment:37>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to