1. 30 Aug, 2012 7 commits
    • david decotigny's avatar
      forcedeth: fix TX timeout caused by TX pause on down link · 1ff39eb6
      david decotigny authored
      On some dual-port forcedeth devices such as MCP55 10de:0373 (rev a3),
      when autoneg & TX pause are enabled while port is connected but
      interface is down, the NIC will eventually freeze (TX timeouts,
      network unreachable).
      
      This patch ensures that TX pause is not configured in hardware when
      interface is down. The TX pause request will be honored when interface
      is later configured.
      
      Tested:
       - hardware is MCP55 device id 10de:0373 (rev a3), dual-port
       - eth0 connected and UP, eth1 connected but DOWN
       - without this patch, following sequence would brick NIC:
            ifconfig eth0 down
            ifconfig eth1 up
            ifconfig eth1 down
            ethtool -A eth1 autoneg off rx on tx off
            ifconfig eth1 up
            ifconfig eth1 down
            ethtool -A eth1 autoneg on rx on tx on
            ifconfig eth1 up
            ifconfig eth1 down
            ifup eth0
            sleep 120  # or longer
            ethtool eth1
         Just in case, sequence to un-brick:
            ifconfig eth0 down
            ethtool -A eth1 autoneg off rx on tx off
            ifconfig eth1 up
            ifconfig eth1 down
            ifup eth0
       - with this patch: no TX timeout after "bricking" sequence above
      
      Details:
       - The following register accesses have been identified as the ones
         causing the NIC to freeze in "bricking" sequence above:
          - write NVREG_TX_PAUSEFRAME_ENABLE_V1 to eth1's register NvRegTxPauseFrame
          - write NVREG_MISC1_PAUSE_TX | NVREG_MISC1_FORCE to eth1's register NvRegMisc1
          - write 0 to eth1's register NvRegTransmitterControl
         This is what this patch avoids.
      Signed-off-by: default avatarDavid Decotigny <decot@googlers.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ff39eb6
    • david decotigny's avatar
      forcedeth: fix buffer overflow · ba9aa134
      david decotigny authored
      Found by manual code inspection.
      
      Tested: compile, reboot, ethtool -d ethX
      Signed-off-by: default avatarDavid Decotigny <decot@googlers.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ba9aa134
    • Timur Tabi's avatar
      netdev/phy: add MDIO bus multiplexer driven by a memory-mapped device · 6cc2ff82
      Timur Tabi authored
      Add support for an MDIO bus multiplexer controlled by a simple memory-mapped
      device, like an FPGA.  The device must be memory-mapped and contain only
      8-bit registers (which keeps things simple).
      
      Tested on a Freescale P5020DS board which uses the "PIXIS" FPGA attached
      to the localbus.
      Signed-off-by: default avatarTimur Tabi <timur@freescale.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6cc2ff82
    • Srinivas Kandagatla's avatar
      of/mdio-gpio: Simplify the way device tree support is implemented. · e92bdf4b
      Srinivas Kandagatla authored
      This patch cleans up the way device tree support is added in mdio-gpio
      driver. I found lot of code duplication which is not necessary.
      Also strangely a new platform driver was also introduced for device tree
      support. All this forced me to do this cleanup patch.
      After this patch, the driver probe checks the of_node pointer to get the
      data from device tree.
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e92bdf4b
    • Srinivas Kandagatla's avatar
      of/mdio: Add dummy functions in of_mdio.h. · f9dc9ac5
      Srinivas Kandagatla authored
      This patch adds dummy functions in of_mdio.h, so that driver need not
      ifdef there code with CONFIG_OF.
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f9dc9ac5
    • Eric Dumazet's avatar
      netpoll: provide an IP ident in UDP frames · ee130409
      Eric Dumazet authored
      Let's fill IP header ident field with a meaningful value,
      it might help some setups.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ee130409
    • Gao feng's avatar
      net: dev: fix the incorrect hold of net namespace's lo device · 6549dd43
      Gao feng authored
      When moving a net device from one net namespace to another
      net namespace,dev_change_net_namespace calls NETDEV_DOWN
      event,so the original net namespace's dst entries which
      beloned to this net device will be put into dst_garbage
      list.
      
      then dev_change_net_namespace will set this net device's
      net to the new net namespace.
      
      If we unregister this net device's driver, this will trigger
      the NETDEV_UNREGISTER_FINAL event, dst_ifdown will be called,
      and get this net device's dst entries from dst_garbage list,
      put these entries' dev to the new net namespace's lo device.
      
      It's not what we want,actually we need these dst entries hold
      the original net namespace's lo device,this incorrect device
      holding will trigger emg message like below.
      unregister_netdevice: waiting for lo to become free. Usage count = 1
      
      so we should call NETDEV_UNREGISTER_FINAL event in
      dev_change_net_namespace too,in order to make sure dst entries
      already in the dst_garbage list, we need rcu_barrier before we
      call NETDEV_UNREGISTER_FINAL event.
      
      With help form Eric Dumazet.
      Signed-off-by: default avatarGao feng <gaofeng@cn.fujitsu.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6549dd43
  2. 24 Aug, 2012 30 commits
  3. 23 Aug, 2012 3 commits