xgehal-ring.c revision a23fd118e437af0a7877dd313db8fdaa3537c675
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER START
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * The contents of this file are subject to the terms of the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Common Development and Distribution License (the "License").
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You may not use this file except in compliance with the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * See the License for the specific language governing permissions
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * and limitations under the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * When distributing Covered Code, include this CDDL HEADER in each
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * If applicable, add the following below this CDDL HEADER, with the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * fields enclosed by brackets "[]" replaced with your own identifying
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * information: Portions Copyright [yyyy] [name of copyright owner]
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * CDDL HEADER END
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Copyright (c) 2002-2005 Neterion, Inc.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * All right Reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * FileName : hal-ring.c
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Description: Rx ring object implementation
9512fe850e98fdd448c638ca63fdd92a8a510255ahl * Created: 10 May 2004
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#if defined(XGE_OS_DMA_REQUIRES_SYNC) && defined(XGE_HAL_DMA_DTR_STREAMING)
23b5c241225a8ade2b6b9f06ebb891ee459e3b02tomee /* get owner memblock index */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl /* get owner memblock by memblock index */
9512fe850e98fdd448c638ca63fdd92a8a510255ahl memblock = __hal_mempool_memblock(mempoolh, memblock_idx);
9512fe850e98fdd448c638ca63fdd92a8a510255ahl__hal_ring_item_dma_addr(xge_hal_mempool_h mempoolh, void *item,
int memblock_idx;
void *memblock;
from_dma =
sizeof(u64),
(unsigned long long)to_dma);
static xge_hal_status_e
void *memblock,
int memblock_index,
void *item,
int index,
int is_last,
void *userdata)
void *rxdblock_priv;
int memblock_item_idx;
#ifdef XGE_DEBUG_ASSERT
#if defined(XGE_HAL_USE_5B_MODE)
#if defined(XGE_OS_PLATFORM_64BIT)
if (is_last) {
if (index > 0 ) {
return XGE_HAL_OK;
reopen);
return status;
return XGE_HAL_OK;
#if defined(XGE_HAL_RX_MULTI_RESERVE)
#if defined(XGE_HAL_RX_MULTI_POST)
return XGE_HAL_ERR_OUT_OF_MEMORY;
ring);
return XGE_HAL_ERR_OUT_OF_MEMORY;
attr,
return status;
!= XGE_HAL_OK) {
return status;
return XGE_HAL_OK;
#if defined(XGE_HAL_RX_MULTI_RESERVE)
#if defined(XGE_HAL_RX_MULTI_POST)
void *first_block;
int block_num;
val64 = 0;
for (i = 0; i < XGE_HAL_MAX_RING_NUM; i++) {
(unsigned long long)val64);
val64 = 0;
for (i = 0; i < XGE_HAL_MAX_RING_NUM; i++) {
(unsigned long long)val64);
for (i = 0; i < XGE_HAL_MAX_RING_NUM; i++) {
(unsigned long long)val64);
for (i = 0; i < XGE_HAL_MAX_RING_NUM; i++) {
#ifdef XGE_HAL_HERC_EMULATION
xge_os_wmb();
(unsigned long long)val64);
for (i = 0; i < XGE_HAL_MAX_RING_NUM; i++) {