/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <hxge_impl.h>
#include <hpi_vmac.h>
#include <hpi_rxdma.h>
/*
* System interrupt registers that are under function zero management.
*/
{
/* Configure the initial timer resolution */
return (status);
}
/*
* Set up the logical device group's logical devices that
* the group owns.
*/
return (status);
}
/* Configure the system interrupt data */
return (status);
}
return (status);
}
{
int i, j;
return (HXGE_ERROR);
}
return (HXGE_ERROR);
}
ldvp->ldg_assigned);
if (rs != HPI_SUCCESS) {
"<== hxge_fzc_intr_ldg_num_set failed "
" rs 0x%x ldv %d ldg %d",
return (HXGE_ERROR | rs);
}
"<== hxge_fzc_intr_ldg_num_set OK ldv %d ldg %d",
}
}
return (HXGE_OK);
}
{
return (HXGE_ERROR);
}
return (HXGE_ERROR | rs);
}
return (HXGE_OK);
}
{
int i;
"<== hxge_fzc_intr_sid_set: no ldg"));
return (HXGE_ERROR);
}
"==> hxge_fzc_intr_sid_set(%d): group %d vector %d",
if (rs != HPI_SUCCESS) {
"<== hxge_fzc_intr_sid_set:failed 0x%x", rs));
return (HXGE_ERROR | rs);
}
}
return (HXGE_OK);
}
/*
* Receive DMA registers that are under function zero management.
*/
/*ARGSUSED*/
{
/* Initialize the RXDMA logical pages */
return (status);
return (status);
}
/*ARGSUSED*/
{
"==> hxge_init_fzc_rxdma_channel_pages"));
/* Initialize the page handle */
if (rs != HPI_SUCCESS)
return (HXGE_ERROR | rs);
"<== hxge_init_fzc_rxdma_channel_pages"));
return (HXGE_OK);
}
/*ARGSUSED*/
{
/* Initialize the TXDMA logical pages */
return (status);
}
{
/*
* Configure the rxdma clock divider
* This is the granularity counter based on
* the hardware system clock (i.e. 300 Mhz) and
* it is running around 3 nanoseconds.
* So, set the clock divider counter to 1000 to get
* microsecond granularity.
* For example, for a 3 microsecond timeout, the timeout
* will be set to 1.
*/
if (rs != HPI_SUCCESS)
return (HXGE_ERROR | rs);
"<== hxge_init_fzc_rx_common:status 0x%08x", status));
return (status);
}
{
"==> hxge_init_fzc_txdma_channel_pages"));
/* Initialize the page handle */
if (rs == HPI_SUCCESS)
return (HXGE_OK);
else
return (HXGE_ERROR | rs);
}
{
if (rs == HPI_SUCCESS)
return (HXGE_OK);
else
return (HXGE_ERROR | rs);
}