/*
* 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-2010 Intel Corporation. All rights reserved.
*/
/*
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
* Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
*/
#include "ixgbe_sw.h"
/*
* was in when the interface was registered.
*/
int
{
return (ECANCELED);
}
return (EIO);
}
/*
* Enable and start the watchdog timer
*/
return (0);
}
/*
* that the interface can be unregistered.
*/
void
{
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
{
return;
}
case LB_GET_INFO_SIZE:
case LB_GET_INFO:
case LB_GET_MODE:
case LB_SET_MODE:
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);
}
int
{
int err = 0;
return (ECANCELED);
}
/*
* We cannot always rely on the common code maintaining
* hw->phy.speeds_supported, therefore we fall back to use the recorded
* supported speeds which were obtained during instance init in
* ixgbe_init_params().
*/
if (speeds == 0)
/*
* All en_* parameters are locked (read-only)
* while the device is in any sort of loopback mode.
*/
return (EBUSY);
}
/*
* We allow speed changes only on baseT PHYs. MAC_PROP_EN_* are marked
* read-only on non-baseT PHYs.
*/
switch (pr_num) {
case MAC_PROP_EN_10GFDX_CAP:
goto setup_link;
} else {
break;
}
case MAC_PROP_EN_5000FDX_CAP:
goto setup_link;
} else {
break;
}
case MAC_PROP_EN_2500FDX_CAP:
goto setup_link;
} else {
break;
}
case MAC_PROP_EN_1000FDX_CAP:
goto setup_link;
} else {
break;
}
case MAC_PROP_EN_100FDX_CAP:
goto setup_link;
} else {
break;
}
case MAC_PROP_AUTONEG:
break;
} else {
goto setup_link;
}
case MAC_PROP_FLOWCTRL:
switch (flow_control) {
default:
break;
case LINK_FLOWCTRL_NONE:
break;
case LINK_FLOWCTRL_RX:
break;
case LINK_FLOWCTRL_TX:
break;
case LINK_FLOWCTRL_BI:
break;
}
if (err == 0) {
}
break;
case MAC_PROP_ADV_10GFDX_CAP:
case MAC_PROP_ADV_5000FDX_CAP:
case MAC_PROP_ADV_2500FDX_CAP:
case MAC_PROP_ADV_1000FDX_CAP:
case MAC_PROP_ADV_100FDX_CAP:
case MAC_PROP_STATUS:
case MAC_PROP_SPEED:
case MAC_PROP_DUPLEX:
break;
case MAC_PROP_MTU:
err = 0;
break;
}
break;
}
break;
}
if (err == 0) {
sizeof (struct ether_vlan_header) + ETHERFCSL;
/*
* Set rx buffer size
*/
/*
* Set tx buffer size
*/
}
break;
case MAC_PROP_PRIVATE:
break;
default:
break;
}
return (err);
}
int
{
int err = 0;
/*
* We cannot always rely on the common code maintaining
* hw->phy.speeds_supported, therefore we fall back to use the recorded
* supported speeds which were obtained during instance init in
* ixgbe_init_params().
*/
if (speeds == 0)
switch (pr_num) {
case MAC_PROP_DUPLEX:
sizeof (link_duplex_t));
break;
case MAC_PROP_SPEED:
break;
case MAC_PROP_AUTONEG:
break;
case MAC_PROP_FLOWCTRL:
case ixgbe_fc_none:
break;
case ixgbe_fc_rx_pause:
break;
case ixgbe_fc_tx_pause:
break;
case ixgbe_fc_full:
break;
}
break;
case MAC_PROP_ADV_10GFDX_CAP:
if (speeds & IXGBE_LINK_SPEED_10GB_FULL)
else
break;
case MAC_PROP_EN_10GFDX_CAP:
if (speeds & IXGBE_LINK_SPEED_10GB_FULL)
else
break;
case MAC_PROP_ADV_5000FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_5GB_FULL)
else
break;
case MAC_PROP_EN_5000FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_5GB_FULL)
else
break;
case MAC_PROP_ADV_2500FDX_CAP:
else
break;
case MAC_PROP_EN_2500FDX_CAP:
else
break;
case MAC_PROP_ADV_1000FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_1GB_FULL)
else
break;
case MAC_PROP_EN_1000FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_1GB_FULL)
else
break;
case MAC_PROP_ADV_100FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_100_FULL)
else
break;
case MAC_PROP_EN_100FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_100_FULL)
else
break;
case MAC_PROP_PRIVATE:
pr_valsize, pr_val);
break;
default:
break;
}
return (err);
}
void
{
/*
* We cannot always rely on the common code maintaining
* hw->phy.speeds_supported, therefore we fall back to use the
* recorded supported speeds which were obtained during instance init in
* ixgbe_init_params().
*/
if (speeds == 0)
switch (pr_num) {
case MAC_PROP_DUPLEX:
case MAC_PROP_SPEED:
break;
case MAC_PROP_ADV_100FDX_CAP:
break;
case MAC_PROP_ADV_1000FDX_CAP:
break;
case MAC_PROP_ADV_2500FDX_CAP:
break;
case MAC_PROP_ADV_5000FDX_CAP:
break;
case MAC_PROP_ADV_10GFDX_CAP:
break;
/*
* We allow speed changes only on baseT PHYs. MAC_PROP_EN_* are marked
* read-only on non-baseT (SFP) PHYs.
*/
case MAC_PROP_AUTONEG:
break;
case MAC_PROP_EN_10GFDX_CAP:
if (speeds & IXGBE_LINK_SPEED_10GB_FULL) {
}
break;
case MAC_PROP_EN_5000FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_5GB_FULL) {
}
break;
case MAC_PROP_EN_2500FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_2_5GB_FULL) {
}
break;
case MAC_PROP_EN_1000FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_1GB_FULL) {
}
break;
case MAC_PROP_EN_100FDX_CAP:
if (speeds & IXGBE_LINK_SPEED_100_FULL) {
}
break;
case MAC_PROP_FLOWCTRL:
break;
case MAC_PROP_MTU:
break;
case MAC_PROP_PRIVATE: {
int value;
return;
}
} else {
return;
}
}
}
}
{
/*
* All en_* parameters are locked (read-only) while
* the device is in any sort of loopback mode ...
*/
switch (pr_num) {
case MAC_PROP_EN_10GFDX_CAP:
case MAC_PROP_EN_5000FDX_CAP:
case MAC_PROP_EN_2500FDX_CAP:
case MAC_PROP_EN_1000FDX_CAP:
case MAC_PROP_EN_100FDX_CAP:
case MAC_PROP_AUTONEG:
case MAC_PROP_FLOWCTRL:
return (B_TRUE);
}
return (B_FALSE);
}
/* ARGSUSED */
int
{
int err = 0;
long result;
int i;
return (err);
}
if (result < MIN_TX_COPY_THRESHOLD ||
else {
}
return (err);
}
return (err);
}
if (result < MIN_TX_RECYCLE_THRESHOLD ||
else {
}
return (err);
}
return (err);
}
if (result < MIN_TX_OVERLOAD_THRESHOLD ||
else {
}
return (err);
}
return (err);
}
if (result < MIN_TX_RESCHED_THRESHOLD ||
else {
}
return (err);
}
return (err);
}
if (result < MIN_RX_COPY_THRESHOLD ||
else {
}
return (err);
}
return (err);
}
if (result < MIN_RX_LIMIT_PER_INTR ||
else {
}
return (err);
}
return (err);
}
else {
/*
* 82599, X540 and X550 require the interrupt throttling
* rate is a multiple of 8. This is enforced by the
* register definiton.
*/
ixgbe->intr_throttling[0] =
}
for (i = 0; i < MAX_INTR_VECTOR; i++)
ixgbe->intr_throttling[i] =
ixgbe->intr_throttling[0];
/* Set interrupt throttling rate */
ixgbe->intr_throttling[i]);
}
return (err);
}
return (ENOTSUP);
}
int
{
int value;
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
err = 0;
goto done;
}
done:
if (err == 0) {
}
return (err);
}