ixgbe_gld.c revision da14cebe459d3275048785f25bd869cb09b5307f
/*
* 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(c) 2007-2008 Intel Corporation. All rights reserved.
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "ixgbe_sw.h"
/*
* Retrieve a value for one of the statistics.
*/
int
{
int i;
return (ECANCELED);
}
switch (stat) {
case MAC_STAT_IFSPEED:
break;
case MAC_STAT_MULTIRCV:
break;
case MAC_STAT_BRDCSTRCV:
break;
case MAC_STAT_MULTIXMT:
break;
case MAC_STAT_BRDCSTXMT:
break;
case MAC_STAT_NORCVBUF:
for (i = 0; i < 8; i++) {
}
break;
case MAC_STAT_IERRORS:
break;
case MAC_STAT_RBYTES:
for (i = 0; i < 16; i++) {
}
break;
case MAC_STAT_OBYTES:
for (i = 0; i < 16; i++) {
}
break;
case MAC_STAT_IPACKETS:
break;
case MAC_STAT_OPACKETS:
break;
/* RFC 1643 stats */
case ETHER_STAT_FCS_ERRORS:
break;
break;
case ETHER_STAT_MACRCV_ERRORS:
break;
case ETHER_STAT_XCVR_ADDR:
/* The Internal PHY's MDI address for each MAC is 1 */
*val = 1;
break;
case ETHER_STAT_XCVR_ID:
break;
case ETHER_STAT_XCVR_INUSE:
switch (ixgbe->link_speed) {
*val =
break;
break;
default:
break;
}
break;
case ETHER_STAT_CAP_1000FDX:
break;
case ETHER_STAT_CAP_100FDX:
break;
case ETHER_STAT_CAP_ASMPAUSE:
break;
case ETHER_STAT_CAP_PAUSE:
break;
case ETHER_STAT_CAP_AUTONEG:
break;
break;
break;
break;
case ETHER_STAT_ADV_CAP_PAUSE:
break;
break;
break;
case ETHER_STAT_LP_CAP_100FDX:
break;
break;
case ETHER_STAT_LP_CAP_PAUSE:
break;
break;
case ETHER_STAT_LINK_ASMPAUSE:
break;
case ETHER_STAT_LINK_PAUSE:
break;
case ETHER_STAT_LINK_AUTONEG:
break;
case ETHER_STAT_LINK_DUPLEX:
*val = LINK_DUPLEX_FULL;
break;
break;
case ETHER_STAT_CAP_REMFAULT:
break;
case ETHER_STAT_ADV_REMFAULT:
break;
case ETHER_STAT_LP_REMFAULT:
break;
case ETHER_STAT_JABBER_ERRORS:
break;
default:
return (ENOTSUP);
}
return (0);
}
/*
* was in when the interface was registered.
*/
int
ixgbe_m_start(void *arg)
{
return (ECANCELED);
}
return (EIO);
}
/*
* Enable and start the watchdog timer
*/
return (0);
}
/*
* that the interface can be unregistered.
*/
void
ixgbe_m_stop(void *arg)
{
return;
}
/*
* Disable and stop the watchdog timer
*/
}
/*
* Set the promiscuity of the device.
*/
int
{
return (ECANCELED);
}
if (on)
else
return (0);
}
/*
* addresses for which the device will receive packets.
*/
int
{
int result;
return (ECANCELED);
}
return (result);
}
/*
* Pass on M_IOCTL messages passed to the DLD, and support
* private IOCTLs for debugging and ndd.
*/
void
{
case LB_GET_INFO_SIZE:
case LB_GET_INFO:
case LB_GET_MODE:
case LB_SET_MODE:
break;
case ND_GET:
case ND_SET:
break;
default:
break;
}
/*
* Decide how to reply
*/
switch (status) {
default:
case IOC_INVAL:
/*
* Error, reply with a NAK and EINVAL or the specified error
*/
break;
case IOC_DONE:
/*
* OK, reply already sent
*/
break;
case IOC_ACK:
/*
* OK, reply with an ACK
*/
break;
case IOC_REPLY:
/*
* OK, send prepared reply as ACK or NAK
*/
break;
}
}
/*
* Obtain the MAC's capabilities and associated data from
* the driver.
*/
{
switch (cap) {
case MAC_CAPAB_HCKSUM: {
/*
* We advertise our capabilities only if tx hcksum offload is
* enabled. On receive, the stack will accept checksummed
* packets anyway, even if we haven't said we can deliver
* them.
*/
if (!ixgbe->tx_hcksum_enable)
return (B_FALSE);
break;
}
case MAC_CAPAB_LSO: {
if (ixgbe->lso_enable) {
break;
} else {
return (B_FALSE);
}
}
case MAC_CAPAB_RINGS: {
case MAC_RING_TYPE_RX:
break;
case MAC_RING_TYPE_TX:
break;
default:
break;
}
break;
}
default:
return (B_FALSE);
}
return (B_TRUE);
}