diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-11 10:27:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-11 10:27:24 -0400 |
commit | c44eaf41a5a423993932c9a9ad279ee132779b48 (patch) | |
tree | 3554fc0bfdcd97936417d6d001d00710d11e67e5 /drivers/net/mlx4/en_rx.c | |
parent | 4263a2f1dad8c8e7ce2352a0cbc882c2b0c044a9 (diff) | |
parent | 88edaa415966af965bb7eb7056d8b58145462c8e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
net: Add support for SMSC LAN9530, LAN9730 and LAN89530
mlx4_en: Restoring RX buffer pointer in case of failure
mlx4: Sensing link type at device initialization
ipv4: Fix "Set rt->rt_iif more sanely on output routes."
MAINTAINERS: add entry for Xen network backend
be2net: Fix suspend/resume operation
be2net: Rename some struct members for clarity
pppoe: drop PPPOX_ZOMBIEs in pppoe_flush_dev
dsa/mv88e6131: add support for mv88e6085 switch
ipv6: Enable RFS sk_rxhash tracking for ipv6 sockets (v2)
be2net: Fix a potential crash during shutdown.
bna: Fix for handling firmware heartbeat failure
can: mcp251x: Allow pass IRQ flags through platform data.
smsc911x: fix mac_lock acquision before calling smsc911x_mac_read
iwlwifi: accept EEPROM version 0x423 for iwl6000
rt2x00: fix cancelling uninitialized work
rtlwifi: Fix some warnings/bugs
p54usb: IDs for two new devices
wl12xx: fix potential buffer overflow in testmode nvs push
zd1211rw: reset rx idle timer from tasklet
...
Diffstat (limited to 'drivers/net/mlx4/en_rx.c')
-rw-r--r-- | drivers/net/mlx4/en_rx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index cfd50bc49169..62dd21b06df4 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c | |||
@@ -345,6 +345,8 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv) | |||
345 | err = mlx4_en_init_allocator(priv, ring); | 345 | err = mlx4_en_init_allocator(priv, ring); |
346 | if (err) { | 346 | if (err) { |
347 | en_err(priv, "Failed initializing ring allocator\n"); | 347 | en_err(priv, "Failed initializing ring allocator\n"); |
348 | if (ring->stride <= TXBB_SIZE) | ||
349 | ring->buf -= TXBB_SIZE; | ||
348 | ring_ind--; | 350 | ring_ind--; |
349 | goto err_allocator; | 351 | goto err_allocator; |
350 | } | 352 | } |
@@ -369,6 +371,8 @@ err_buffers: | |||
369 | ring_ind = priv->rx_ring_num - 1; | 371 | ring_ind = priv->rx_ring_num - 1; |
370 | err_allocator: | 372 | err_allocator: |
371 | while (ring_ind >= 0) { | 373 | while (ring_ind >= 0) { |
374 | if (priv->rx_ring[ring_ind].stride <= TXBB_SIZE) | ||
375 | priv->rx_ring[ring_ind].buf -= TXBB_SIZE; | ||
372 | mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]); | 376 | mlx4_en_destroy_allocator(priv, &priv->rx_ring[ring_ind]); |
373 | ring_ind--; | 377 | ring_ind--; |
374 | } | 378 | } |