aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/myri10ge/myri10ge.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 14:56:22 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-10 14:56:22 -0700
commit6ed911fb04886c5510a41cd89203b931b1c5d261 (patch)
treeb4ee4111fe5371fb84a0c632b8aa749ae49cc874 /drivers/net/myri10ge/myri10ge.c
parentMerge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev (diff)
parentbonding/bond_main.c: make 2 functions static (diff)
downloadlinux-dev-6ed911fb04886c5510a41cd89203b931b1c5d261.tar.xz
linux-dev-6ed911fb04886c5510a41cd89203b931b1c5d261.zip
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (40 commits) bonding/bond_main.c: make 2 functions static ps3: gigabit ethernet driver for PS3, take3 [netdrvr] Fix dependencies for ax88796 ne2k clone driver eHEA: Capability flag for DLPAR support Remove sk98lin ethernet driver. sunhme.c:quattro_pci_find() must be __devinit bonding / ipv6: no addrconf for slaves separately from master atl1: remove write-only var in tx handler macmace: use "unsigned long flags;" Cleanup usbnet_probe() return value handling netxen: deinline and sparse fix eeprom_93cx6: shorten pulse timing to match spec (bis) phylib: Add Marvell 88E1112 phy id phylib: cleanup marvell.c a bit AX88796 network driver IOC3: Switch to pci refcounting safe APIs e100: Fix Tyan motherboard e100 not receiving IPMI commands QE Ethernet driver writes to wrong register to mask interrupts rrunner.c:rr_init() must be __devinit tokenring/3c359.c:xl_init() must be __devinit ...
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r--drivers/net/myri10ge/myri10ge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index d0cc122fa3f0..e1732c164a40 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -60,6 +60,7 @@
#include <linux/crc32.h>
#include <linux/moduleparam.h>
#include <linux/io.h>
+#include <linux/log2.h>
#include <net/checksum.h>
#include <asm/byteorder.h>
#include <asm/io.h>
@@ -1804,7 +1805,7 @@ static int myri10ge_open(struct net_device *dev)
*/
big_pow2 = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
if (big_pow2 < MYRI10GE_ALLOC_SIZE / 2) {
- while ((big_pow2 & (big_pow2 - 1)) != 0)
+ while (!is_power_of_2(big_pow2))
big_pow2++;
mgp->big_bytes = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
} else {