diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-25 21:57:07 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-25 21:57:07 -0500 |
| commit | e2197787efe54c0dcbdc4f6acb6dabb65f27f347 (patch) | |
| tree | fb9bbf08293f0f43954f128708e6422f1d21a404 /drivers/net/benet/be_main.c | |
| parent | 4f4e65d2484811210a2826fa9d59712c7fcf1b49 (diff) | |
| parent | 39d321577405e8e269fd238b278aaf2425fa788a (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: (42 commits)
virtio_net: Make delayed refill more reliable
sfc: Use fixed-size buffers for MCDI NVRAM requests
sfc: Add workspace for GMAC bug workaround to MCDI MAC_STATS buffer
tcp_probe: avoid modulus operation and wrap fix
qlge: Only free resources if they were allocated
netns xfrm: deal with dst entries in netns
sky2: revert config space change
vlan: fix vlan_skb_recv()
netns xfrm: fix "ip xfrm state|policy count" misreport
sky2: Enable/disable WOL per hardware device
net: Fix IPv6 GSO type checks in Intel ethernet drivers
igb/igbvf: cleanup exception handling in tx_map_adv
MAINTAINERS: Add Intel igbvf maintainer
e1000/e1000e: don't use small hardware rx buffers
fmvj18x_cs: add new id (Panasonic lan & modem card)
be2net: swap only first 2 fields of mcc_wrb
Please add support for Microsoft MN-120 PCMCIA network card
be2net: fix bug in rx page posting
wimax/i2400m: Add support for more i6x50 SKUs
e1000e: enhance frame fragment detection
...
Diffstat (limited to 'drivers/net/benet/be_main.c')
| -rw-r--r-- | drivers/net/benet/be_main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 3a1f7902c16d..33ab8c7f14fe 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
| @@ -910,7 +910,7 @@ static inline struct page *be_alloc_pages(u32 size) | |||
| 910 | static void be_post_rx_frags(struct be_adapter *adapter) | 910 | static void be_post_rx_frags(struct be_adapter *adapter) |
| 911 | { | 911 | { |
| 912 | struct be_rx_page_info *page_info_tbl = adapter->rx_obj.page_info_tbl; | 912 | struct be_rx_page_info *page_info_tbl = adapter->rx_obj.page_info_tbl; |
| 913 | struct be_rx_page_info *page_info = NULL; | 913 | struct be_rx_page_info *page_info = NULL, *prev_page_info = NULL; |
| 914 | struct be_queue_info *rxq = &adapter->rx_obj.q; | 914 | struct be_queue_info *rxq = &adapter->rx_obj.q; |
| 915 | struct page *pagep = NULL; | 915 | struct page *pagep = NULL; |
| 916 | struct be_eth_rx_d *rxd; | 916 | struct be_eth_rx_d *rxd; |
| @@ -941,7 +941,6 @@ static void be_post_rx_frags(struct be_adapter *adapter) | |||
| 941 | rxd = queue_head_node(rxq); | 941 | rxd = queue_head_node(rxq); |
| 942 | rxd->fragpa_lo = cpu_to_le32(frag_dmaaddr & 0xFFFFFFFF); | 942 | rxd->fragpa_lo = cpu_to_le32(frag_dmaaddr & 0xFFFFFFFF); |
| 943 | rxd->fragpa_hi = cpu_to_le32(upper_32_bits(frag_dmaaddr)); | 943 | rxd->fragpa_hi = cpu_to_le32(upper_32_bits(frag_dmaaddr)); |
| 944 | queue_head_inc(rxq); | ||
| 945 | 944 | ||
| 946 | /* Any space left in the current big page for another frag? */ | 945 | /* Any space left in the current big page for another frag? */ |
| 947 | if ((page_offset + rx_frag_size + rx_frag_size) > | 946 | if ((page_offset + rx_frag_size + rx_frag_size) > |
| @@ -949,10 +948,13 @@ static void be_post_rx_frags(struct be_adapter *adapter) | |||
| 949 | pagep = NULL; | 948 | pagep = NULL; |
| 950 | page_info->last_page_user = true; | 949 | page_info->last_page_user = true; |
| 951 | } | 950 | } |
| 951 | |||
| 952 | prev_page_info = page_info; | ||
| 953 | queue_head_inc(rxq); | ||
| 952 | page_info = &page_info_tbl[rxq->head]; | 954 | page_info = &page_info_tbl[rxq->head]; |
| 953 | } | 955 | } |
| 954 | if (pagep) | 956 | if (pagep) |
| 955 | page_info->last_page_user = true; | 957 | prev_page_info->last_page_user = true; |
| 956 | 958 | ||
| 957 | if (posted) { | 959 | if (posted) { |
| 958 | atomic_add(posted, &rxq->used); | 960 | atomic_add(posted, &rxq->used); |
