Deleted Added
sdiff udiff text old ( 229939 ) new ( 231796 )
full compact
1/******************************************************************************
2
3 Copyright (c) 2001-2011, Intel Corporation
4 All rights reserved.
5
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions are met:
8

--- 16 unchanged lines hidden (view full) ---

25 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 POSSIBILITY OF SUCH DAMAGE.
31
32******************************************************************************/
33/*$FreeBSD: head/sys/dev/e1000/if_lem.c 229939 2012-01-10 19:57:23Z luigi $*/
34
35#ifdef HAVE_KERNEL_OPTION_HEADERS
36#include "opt_device_polling.h"
37#include "opt_inet.h"
38#include "opt_inet6.h"
39#endif
40
41#include <sys/param.h>

--- 2621 unchanged lines hidden (view full) ---

2663 tx_buffer = &adapter->tx_buffer_area[i];
2664 bus_dmamap_sync(adapter->txtag, tx_buffer->map,
2665 BUS_DMASYNC_POSTWRITE);
2666 bus_dmamap_unload(adapter->txtag, tx_buffer->map);
2667 m_freem(tx_buffer->m_head);
2668 tx_buffer->m_head = NULL;
2669#ifdef DEV_NETMAP
2670 if (slot) {
2671 /* slot si is mapped to the i-th NIC-ring entry */
2672 int si = i + na->tx_rings[0].nkr_hwofs;
2673 uint64_t paddr;
2674 void *addr;
2675
2676 if (si > na->num_tx_desc)
2677 si -= na->num_tx_desc;
2678 addr = PNMB(slot + si, &paddr);
2679 adapter->tx_desc_base[si].buffer_addr = htole64(paddr);
2680 /* reload the map for netmap mode */
2681 netmap_load_map(adapter->txtag, tx_buffer->map, addr);
2682 }
2683#endif /* DEV_NETMAP */
2684 tx_buffer->next_eop = -1;
2685 }

--- 553 unchanged lines hidden (view full) ---

3239 rx_buffer->m_head = NULL;
3240 }
3241 }
3242
3243 /* Allocate new ones. */
3244 for (i = 0; i < adapter->num_rx_desc; i++) {
3245#ifdef DEV_NETMAP
3246 if (slot) {
3247 /* slot si is mapped to the i-th NIC-ring entry */
3248 int si = i + na->rx_rings[0].nkr_hwofs;
3249 uint64_t paddr;
3250 void *addr;
3251
3252 if (si > na->num_rx_desc)
3253 si -= na->num_rx_desc;
3254 addr = PNMB(slot + si, &paddr);
3255 netmap_load_map(adapter->rxtag, rx_buffer->map, addr);
3256 /* Update descriptor */
3257 adapter->rx_desc_base[i].buffer_addr = htole64(paddr);
3258 continue;
3259 }
3260#endif /* DEV_NETMAP */
3261 error = lem_get_buf(adapter, i);

--- 1436 unchanged lines hidden ---