1. 17 11月, 2011 3 次提交
    • S
      stmmac: remove spin_lock in stmmac_ioctl. · 989508ba
      Srinivas Kandagatla 提交于
      This patch removes un-needed spin_lock in stmmac_ioctl while reading and
      writing mdio registers. While holding spin_lock the code must be
      atomic, which is not true in this case as both mdiobus_read and writes
      have mutex locks.
      
      Without this patch reading mdio registers via mii-tool results in below
      BUG:
      mii-tool -vvv eth0"
      Using SIOCGMIIPHY=0x8947
      BUG: sleeping function called from invalid context at kernel/mutex.c:287
      in_atomic(): 1, irqs_disabled(): 0, pid: 614, name: mii-tool
      2 locks held by mii-tool/614:
       #0:  (rtnl_mutex){......}, at: [<c01fd80c>] dev_ioctl+0x550/0x674
       #1:  (&priv->lock){......}, at: [<c01b34ec>] stmmac_ioctl+0x4c/0x78
      [<c002ea14>] (unwind_backtrace+0x0/0xcc) from [<c0272c38>]
      (mutex_lock_nested+0x24/0x35c)
      [<c0272c38>] (mutex_lock_nested+0x24/0x35c) from [<c01b237c>]
      (mdiobus_read+0x44/0x70)
      [<c01b237c>] (mdiobus_read+0x44/0x70) from [<c01b0c64>]
      (phy_mii_ioctl+0x4c/0x138)
      [<c01b0c64>] (phy_mii_ioctl+0x4c/0x138) from [<c01b34fc>]
      (stmmac_ioctl+0x5c/0x78)
      [<c01b34fc>] (stmmac_ioctl+0x5c/0x78) from [<c01fcec8>]
      (dev_ifsioc+0x2a4/0x2c8)
      [<c01fcec8>] (dev_ifsioc+0x2a4/0x2c8) from [<c01fd81c>]
      (dev_ioctl+0x560/0x674)
      [<c01fd81c>] (dev_ioctl+0x560/0x674) from [<c00c36e0>]
      (vfs_ioctl+0x2c/0x8c)
      [<c00c36e0>] (vfs_ioctl+0x2c/0x8c) from [<c00c4130>]
      (do_vfs_ioctl+0x530/0x578)
      [<c00c4130>] (do_vfs_ioctl+0x530/0x578) from [<c00c41ac>]
      (sys_ioctl+0x34/0x54)
      [<c00c41ac>] (sys_ioctl+0x34/0x54) from [<c0028aa0>]
      (ret_fast_syscall+0x0/0x2c)
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      989508ba
    • G
      stmmac: parameters auto-tuning through HW cap reg · 19e30c14
      Giuseppe CAVALLARO 提交于
      New GMAC devices (newer than the databook 3.50a) have the
      HW capability register that provides which features are actually
      supported by the hardware.
      
      On old devices many information have to be passed through the
      platform, for example: enhanced descriptor structure,
      TX COE etc. These are mandatory to properly configure the driver.
      This remains still valid because the driver has to support old
      Synopsys devices but now it's also able to override them using the
      values from the HW capability register if supported.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      19e30c14
    • S
      stmmac: fix advertising 1000Base capabilties for non GMII iface · c5b9b4e4
      Srinivas Kandagatla 提交于
      This patch fixes the way to stop the 1000Base advertising
      capabilties for non GMII interfaces.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@st.com>
      Acked-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c5b9b4e4
  2. 28 10月, 2011 3 次提交
  3. 20 10月, 2011 7 次提交
  4. 19 10月, 2011 1 次提交
  5. 23 9月, 2011 1 次提交
  6. 16 9月, 2011 6 次提交
  7. 18 8月, 2011 1 次提交
  8. 12 8月, 2011 1 次提交
  9. 22 7月, 2011 3 次提交
  10. 19 7月, 2011 2 次提交
  11. 20 6月, 2011 1 次提交
  12. 14 6月, 2011 1 次提交
  13. 23 5月, 2011 2 次提交
    • P
      Add appropriate <linux/prefetch.h> include for prefetch users · 70c71606
      Paul Gortmaker 提交于
      After discovering that wide use of prefetch on modern CPUs
      could be a net loss instead of a win, net drivers which were
      relying on the implicit inclusion of prefetch.h via the list
      headers showed up in the resulting cleanup fallout.  Give
      them an explicit include via the following $0.02 script.
      
       =========================================
       #!/bin/bash
       MANUAL=""
       for i in `git grep -l 'prefetch(.*)' .` ; do
       	grep -q '<linux/prefetch.h>' $i
       	if [ $? = 0 ] ; then
       		continue
       	fi
      
       	(	echo '?^#include <linux/?a'
       		echo '#include <linux/prefetch.h>'
       		echo .
       		echo w
       		echo q
       	) | ed -s $i > /dev/null 2>&1
       	if [ $? != 0 ]; then
       		echo $i needs manual fixup
       		MANUAL="$i $MANUAL"
       	fi
       done
       echo ------------------- 8\<----------------------
       echo vi $MANUAL
       =========================================
      Signed-off-by: NPaul <paul.gortmaker@windriver.com>
      [ Fixed up some incorrect #include placements, and added some
        non-network drivers and the fib_trie.c case    - Linus ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      70c71606
    • P
      drivers/net: add prefetch header for prefetch users · c0cba59e
      Paul Gortmaker 提交于
      After discovering that wide use of prefetch on modern CPUs
      could be a net loss instead of a win, net drivers which were
      relying on the implicit inclusion of prefetch.h via the list
      headers showed up in the resulting cleanup fallout.  Give
      them an explicit include via the following $0.02 script.
      
       =========================================
       #!/bin/bash
       MANUAL=""
       for i in `git grep -l 'prefetch(.*)' .` ; do
       	grep -q '<linux/prefetch.h>' $i
       	if [ $? = 0 ] ; then
       		continue
       	fi
      
       	(	echo '?^#include <linux/?a'
       		echo '#include <linux/prefetch.h>'
       		echo .
       		echo w
       		echo q
       	) | ed -s $i > /dev/null 2>&1
       	if [ $? != 0 ]; then
       		echo $i needs manual fixup
       		MANUAL="$i $MANUAL"
       	fi
       done
       echo ------------------- 8\<----------------------
       echo vi $MANUAL
       =========================================
      Signed-off-by: NPaul <paul.gortmaker@windriver.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0cba59e
  14. 06 5月, 2011 1 次提交
  15. 12 4月, 2011 2 次提交
  16. 11 4月, 2011 1 次提交
  17. 14 2月, 2011 1 次提交
  18. 22 12月, 2010 1 次提交
  19. 11 12月, 2010 1 次提交
  20. 07 12月, 2010 1 次提交