1. 31 8月, 2012 7 次提交
    • D
      forcedeth: fix TX timeout caused by TX pause on down link · 1ff39eb6
      david decotigny 提交于
      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: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1ff39eb6
    • D
      forcedeth: fix buffer overflow · ba9aa134
      david decotigny 提交于
      Found by manual code inspection.
      
      Tested: compile, reboot, ethtool -d ethX
      Signed-off-by: NDavid Decotigny <decot@googlers.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba9aa134
    • T
      netdev/phy: add MDIO bus multiplexer driven by a memory-mapped device · 6cc2ff82
      Timur Tabi 提交于
      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: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cc2ff82
    • S
      of/mdio-gpio: Simplify the way device tree support is implemented. · e92bdf4b
      Srinivas Kandagatla 提交于
      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: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e92bdf4b
    • S
      of/mdio: Add dummy functions in of_mdio.h. · f9dc9ac5
      Srinivas Kandagatla 提交于
      This patch adds dummy functions in of_mdio.h, so that driver need not
      ifdef there code with CONFIG_OF.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f9dc9ac5
    • E
      netpoll: provide an IP ident in UDP frames · ee130409
      Eric Dumazet 提交于
      Let's fill IP header ident field with a meaningful value,
      it might help some setups.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ee130409
    • G
      net: dev: fix the incorrect hold of net namespace's lo device · 6549dd43
      Gao feng 提交于
      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: NGao feng <gaofeng@cn.fujitsu.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Acked-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6549dd43
  2. 25 8月, 2012 29 次提交
  3. 24 8月, 2012 3 次提交
  4. 23 8月, 2012 1 次提交